* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2E7D32;
    --primary-green-light: #4CAF50;
    --primary-green-dark: #1B5E20;
    --primary-blue: #1565C0;
    --primary-blue-light: #42A5F5;
    --primary-blue-dark: #0D47A1;
    --white: #FFFFFF;
    --bg-white: #FFFFFF;
    --bg-light: #F5F7FA;
    --text-dark: #212121;
    --text-medium: #555555;
    --text-light: #888888;
    --border-color: #E0E0E0;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --danger: #D32F2F;
    --danger-light: #EF5350;
    --warning: #F57C00;
    --success: #2E7D32;
    --sidebar-width: 260px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== LOGIN PAGE ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.login-box h1 {
    text-align: center;
    color: var(--primary-green-dark);
    margin-bottom: 8px;
    font-size: 24px;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 14px;
}

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
}

.login-logo img {
    height: 48px;
    width: auto;
}

.password-wrapper .password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--text-dark);
}

.remember-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-light);
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary-green);
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.3s;
    background: var(--white);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
}

.btn-success {
    background: var(--primary-green);
    color: var(--white);
}

.btn-success:hover {
    background: var(--primary-green-dark);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #B71C1C;
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-medium);
}

.btn-outline:hover {
    background: var(--bg-light);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    width: 100%;
}

.btn-block {
    width: 100%;
}

.login-error {
    background: #FFEBEE;
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13px;
    display: none;
}

.login-error.show {
    display: block;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-green-dark) 0%, var(--primary-green) 50%, var(--primary-blue-dark) 100%);
    color: var(--white);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 16px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-left-color: var(--white);
}

.sidebar-nav a .icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(180deg, var(--primary-green-dark) 0%, var(--primary-blue-dark) 100%);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    transition: color 0.3s;
}

.sidebar-footer a:hover {
    color: var(--white);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-white);
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.topbar h1 {
    font-size: 20px;
    color: var(--text-dark);
    font-weight: 700;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar .user-info .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.content-area {
    padding: 32px;
}

/* ===== CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-card .stat-icon.green {
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary-green);
}

.stat-card .stat-icon.blue {
    background: rgba(21, 101, 192, 0.1);
    color: var(--primary-blue);
}

.stat-card .stat-icon.orange {
    background: rgba(245, 124, 0, 0.1);
    color: var(--warning);
}

.stat-card .stat-icon.red {
    background: rgba(211, 47, 47, 0.1);
    color: var(--danger);
}

.stat-card .stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-card .stat-info p {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ===== DATA TABLE ===== */
.table-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: var(--bg-light);
}

table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

table tbody tr:hover {
    background: rgba(21, 101, 192, 0.02);
}

table tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary-green);
}

.badge-danger {
    background: rgba(211, 47, 47, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(245, 124, 0, 0.1);
    color: var(--warning);
}

.badge-info {
    background: rgba(21, 101, 192, 0.1);
    color: var(--primary-blue);
}

.badge-occupancy {
    font-weight: 600;
    opacity: 0.85;
    margin-left: 2px;
}

.badge-secondary {
    background: rgba(136, 136, 136, 0.1);
    color: var(--text-light);
}

.action-btns {
    display: flex;
    gap: 6px;
}

.action-btns .btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--bg-light);
    color: var(--text-medium);
}

.action-btns .btn-icon:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.action-btns .btn-icon.danger:hover {
    background: var(--danger);
    color: var(--white);
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.modal-lg {
    max-width: 800px;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--danger);
    color: var(--white);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Confirm Modal */
.confirm-modal .modal {
    max-width: 420px;
    text-align: center;
}

.confirm-modal .modal-body {
    padding: 32px 24px;
}

.confirm-modal .confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.confirm-modal .confirm-icon.danger {
    background: rgba(211, 47, 47, 0.1);
    color: var(--danger);
}

.confirm-modal .confirm-icon.warning {
    background: rgba(245, 124, 0, 0.1);
    color: var(--warning);
}

.confirm-modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.confirm-modal p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.confirm-modal .modal-footer {
    justify-content: center;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar input[type="date"],
.filter-bar select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--white);
    color: var(--text-dark);
}

.filter-bar input[type="date"]:focus,
.filter-bar select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
}

/* ===== SEARCH ===== */
.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 14px 10px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    width: 240px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
    width: 300px;
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-medium);
}

.pagination button:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.pagination button.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    min-width: 300px;
}

.toast.success {
    background: var(--primary-green);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--primary-blue);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-medium);
}

.empty-state p {
    font-size: 13px;
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.2);
    background: linear-gradient(135deg, var(--primary-green-dark), var(--primary-blue-dark));
    color: var(--white);
    font-size: 20px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.hamburger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.hamburger:active {
    transform: scale(0.95);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        transform: translateX(100%);
        right: 0;
        left: auto;
        box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        padding: 12px 16px;
    }

    .topbar h1 {
        font-size: 16px;
    }

    .content-area {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .stat-card .stat-info h3 {
        font-size: 22px;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-actions {
        width: 100%;
        flex-direction: column;
    }

    .table-actions select,
    .table-actions .search-box {
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .search-box input:focus {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-container::-webkit-scrollbar {
        height: 6px;
    }

    .table-container::-webkit-scrollbar-track {
        background: var(--bg-light);
        border-radius: 3px;
    }

    .table-container::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }

    .table-container::-webkit-scrollbar-thumb:hover {
        background: var(--text-light);
    }

    table {
        min-width: 600px;
    }

    table th,
    table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar input[type="date"],
    .filter-bar select {
        width: 100%;
    }

    .modal {
        max-width: 95vw;
        margin: 0 8px;
    }

    .modal.modal-lg {
        max-width: 95vw;
    }

    .modal-header h2 {
        font-size: 15px;
    }

    .modal-body {
        padding: 16px;
    }

    .action-btns {
        gap: 4px;
    }

    .action-btns .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .pay-history-toolbar {
        flex-direction: column;
    }

    .pay-history-toolbar .search-box {
        width: 100%;
    }

    .pay-history-toolbar .search-box input {
        width: 100%;
    }

    .bill-tabs {
        overflow-x: auto;
    }

    .bill-tabs .bill-tab {
        padding: 8px 14px;
        font-size: 12px;
        white-space: nowrap;
    }

    .pagination button {
        padding: 6px 10px;
        font-size: 11px;
    }

    * {
        scrollbar-width: thin;
        scrollbar-color: var(--border-color) transparent;
    }

    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-light);
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 10px 12px;
    }

    .content-area {
        padding: 10px;
    }

    table {
        min-width: 480px;
    }

    table th,
    table td {
        padding: 8px 6px;
        font-size: 11px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== DASHBOARD SPECIFIC ===== */
.recent-section {
    margin-top: 32px;
}

.recent-section h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

/* ===== MISC ===== */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.font-mono {
    font-family: 'Courier New', monospace;
}

.text-muted {
    color: var(--text-light);
}

.text-green { color: var(--primary-green); }
.text-blue { color: var(--primary-blue); }
.text-red { color: var(--danger); }

.amount {
    font-weight: 700;
    font-size: 14px;
}

/* ===== PAYMENT HISTORY MODAL ===== */
.pay-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pay-history-toolbar .search-box input {
    width: 220px;
}

.pay-history-toolbar .search-box input:focus {
    width: 280px;
}

.rows-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rows-selector label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
}

.rows-selector select {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--white);
    color: var(--text-dark);
}

.rows-selector select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* ===== BILL TABS ===== */
.bill-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 16px;
}

.bill-tabs .bill-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.bill-tabs .bill-tab:hover {
    color: var(--primary-blue);
}

.bill-tabs .bill-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* ===== ROOM DETAIL GRID ===== */
.room-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.room-detail-grid .detail-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px 14px;
}

.room-detail-grid .detail-label {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.room-detail-grid .detail-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===== DASHBOARD CHART ===== */
.chart-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
}

.chart-container h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.chart-container canvas {
    max-height: 300px;
    width: 100% !important;
}

/* ===== LOGIN SUCCESS MODAL ===== */
.login-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-success-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-success-card {
    background: #FFFFFF;
    width: 380px;
    max-width: 90vw;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.login-success-overlay.active .login-success-card {
    transform: scale(1);
}

.login-success-icon {
    width: 80px;
    height: 80px;
    margin: 48px auto 24px;
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(46, 125, 50, 0.35);
    animation: popIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: scale(0.4);
}

.login-success-check {
    width: 28px;
    height: 16px;
    border-left: 4px solid #FFFFFF;
    border-bottom: 4px solid #FFFFFF;
    transform: rotate(-45deg) translate(4px, -4px);
    opacity: 0;
    animation: drawCheck 0.3s ease 0.45s forwards;
}

.login-success-overlay h3 {
    font-size: 22px;
    font-weight: 700;
    color: #2E7D32;
    margin: 0 0 10px;
    padding: 0 32px;
    animation: fadeUp 0.4s ease 0.55s both;
}

.login-success-overlay p {
    font-size: 14px;
    color: #555555;
    margin: 0 0 6px;
    padding: 0 32px;
    animation: fadeUp 0.4s ease 0.6s both;
}

.login-success-redirect {
    font-size: 12px !important;
    color: #888888 !important;
    margin-top: 22px !important;
    margin-bottom: 36px !important;
    animation: fadeUp 0.4s ease 0.65s both;
}

.login-success-bar {
    width: 100%;
    height: 3px;
    background: #E0E0E0;
    overflow: hidden;
}

.login-success-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2E7D32, #1565C0);
    width: 100%;
    animation: shrinkBar 2s linear forwards;
}

@media (max-width: 480px) {
    .login-success-card {
        width: 90vw;
    }

    .login-success-icon {
        width: 64px;
        height: 64px;
        margin: 36px auto 20px;
    }

    .login-success-check {
        width: 22px;
        height: 12px;
        border-left-width: 3px;
        border-bottom-width: 3px;
    }

    .login-success-overlay h3 {
        font-size: 18px;
        padding: 0 20px;
    }

    .login-success-overlay p {
        padding: 0 20px;
        font-size: 13px;
    }

    .login-success-redirect {
        margin-bottom: 28px !important;
    }
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawCheck {
    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shrinkBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* ===== TENANT SELECTOR LIST (Add Tenant from Room) ===== */
.atr-tenant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}

.atr-tenant-item:hover:not([style*="cursor: not-allowed"]) {
    background: rgba(21, 101, 192, 0.04);
}

.atr-tenant-item:last-child {
    border-bottom: none;
}
