/* === Base Layout Styles === */
body {
    padding-top: 0;
    font-size: 0.9em;
}

/* === Typography === */
h2 {
    font-size: 1.5rem !important;
    font-weight: 600;
}

.h2 {
    font-size: 1.5rem !important;
    font-weight: 600;
}

/* === Navigation and Sidebar === */
.sidebar {
    top: 56px;
    height: calc(100vh - 56px);
    position: fixed;
    z-index: 1000;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.nav-custom .nav-link {
    font-size: 1.0rem;
    font-weight: 500;
    line-height: 1.5;
}

/* === Main Content Layout === */
.main-content {
    margin-left: 200px;
    margin-top: 60px;
    padding: 20px 20px 20px 20px;
    width: calc(100% - 200px);
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s ease, width 0.3s ease;
    overflow-x: auto;
    box-sizing: border-box;
    background-color: #f8f9fa;
}

body.sidebar-collapsed .main-content {
    margin-left: 48px;
    width: calc(100% - 48px);
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* === Minimalistic Card Styling === */
.card {
    border: none;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* === Table Styling === */
.table {
    border-collapse: collapse;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 0.75rem 1rem;
}

.table td {
    border-bottom: 1px solid #f1f3f4;
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* === Button Styling === */
.btn {
    border-radius: 0.375rem !important;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #157347;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* === Minimal Icon Button === */
.btn-icon {
  border: none !important;
  background: transparent !important;
  color: #6c757d !important;
  padding: 0.375rem 0.5rem;
  font-size: 1.1em;
  transition: color 0.15s, background 0.15s;
}
.btn-icon:hover, .btn-icon:focus {
  color: #0d6efd !important;
  background: #f1f3f4 !important;
  box-shadow: none !important;
}

/* === Force visible border for outline buttons (icon actions) === */
.btn.btn-outline-primary {
  border: 1px solid #0d6efd !important;
}
.btn.btn-outline-secondary {
  border: 1px solid #6c757d !important;
}
.btn.btn-outline-danger {
  border: 1px solid #dc3545 !important;
}
.btn.btn-outline-info {
  border: 1px solid #0dcaf0 !important;
}
.btn.btn-outline-success {
  border: 1px solid #198754 !important;
}
.btn.btn-outline-warning {
  border: 1px solid #ffc107 !important;
}

/* === Form Controls === */
.form-control, .form-select {
    border-radius: 0;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* === Alert Styling === */
.alert {
    border-radius: 0;
    border: none;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1e7dd;
    border-left-color: #198754;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #0dcaf0;
    color: #055160;
}

/* === Badge Styling === */
.badge {
    border-radius: 0.375rem !important;
    font-weight: 500;
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
}

.badge.bg-success-subtle {
    border-color: #b6dfc8;
}
.badge.bg-danger-subtle {
    border-color: #f5bfc0;
}
.badge.bg-warning-subtle {
    border-color: #ffe5b5;
}
.badge.bg-info-subtle {
    border-color: #bfe6fa;
}
.badge.bg-primary-subtle {
    border-color: #b6c8f5;
}
.badge.bg-secondary-subtle {
    border-color: #d1d5db;
}
.badge.bg-light-subtle {
    border-color: #e9ecef;
}
.badge.bg-dark-subtle {
    border-color: #6c757d;
}

/* === Progress Bar === */
.progress {
    border-radius: 0;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 0;
}

/* === Dropdown Styling === */
.dropdown-menu {
    border-radius: 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* === Modal Styling === */
.modal-content {
    border-radius: 0;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* === Navigation Tabs === */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    border-radius: 0;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
}

.nav-tabs .nav-link.active {
    border-bottom-color: #0d6efd;
    color: #0d6efd;
    background-color: transparent;
}

/* === Pagination === */
.pagination {
    border-radius: 0;
}

.page-link {
    border-radius: 0;
    border: 1px solid #dee2e6;
    color: #0d6efd;
}

.page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* === Responsive Tables === */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* === Prevent horizontal overflow === */
.container-fluid, .row, .col-12 {
    max-width: 100%;
    overflow-x: hidden;
}

/* === Cards and Containers === */
.summary-card, .tenant-card, .payment-card {
    border-radius: 10px;
    border: none;
    transition: all 0.2s ease-in-out;
    margin-bottom: 1rem;
}

.summary-card:hover, .tenant-card:hover, .payment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === Filter and Status Elements === */

.status-badge {
    border-radius: 20px;
    padding: 5px 10px;
}

.progress {
    border-radius: 10px;
    height: 24px;
}

/* === Grid Layouts === */
.tenant-info-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* === Button Styles === */
.action-buttons .btn {
    margin-left: 0.25rem;
}

.action-buttons {
    white-space: nowrap;
}

/* === Custom Gradients === */
.custom-gradient {
    background: linear-gradient(to right, #000000, #999999);
    color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* === Responsive Adjustments === */
@media (max-width: 767.98px) {
    .action-buttons .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .tenant-info-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}


 
         
        .history-card {
            border-radius: 10px;
            transition: all 0.2s ease-in-out;
            margin-bottom: 1rem;
        }
        .history-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .tenant-info-grid {
            display: grid;
            gap: 0.75rem;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        }
        @media (max-width: 767.98px) {
            .tenant-info-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            }
        }

/* === Compact Statistics Cards === */
.stat-card {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    height: 100%;
    min-height: 70px;
}

.stat-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    color: #6c757d;
    background: #f8f9fa;
    flex-shrink: 0;
}

.stat-card-primary .stat-icon {
    color: #0d6efd;
    background: #e7f1ff;
}

.stat-card-info .stat-icon {
    color: #0dcaf0;
    background: #e7f9fc;
}

.stat-card-warning .stat-icon {
    color: #ffc107;
    background: #fff8e1;
}

.stat-card-success .stat-icon {
    color: #198754;
    background: #e8f5e8;
}

.stat-card-danger .stat-icon {
    color: #dc3545;
    background: #ffeaea;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 0.125rem;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.125rem;
    line-height: 1.2;
}

.stat-percentage {
    font-size: 0.6875rem;
    color: #28a745;
    font-weight: 500;
}

.stat-subtitle {
    font-size: 0.6875rem;
    color: #6c757d;
    font-weight: 500;
}

/* Compact Statistics Cards Responsive */
@media (max-width: 768px) {
    .stat-card {
        padding: 0.5rem;
        min-height: 60px;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
        margin-right: 0.5rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}

/* === Main Content Statistics Alignment === */
.main-content > .main-content-stats {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.main-content-stats {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.main-content-stats > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (min-width: 768px) {
    .main-content-stats {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

.compact-filters-section {
    padding-top: 20px;
}
    