/* ==================== CSS VARIABLES ==================== */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2234;
    --bg-card-hover: #1f2a42;
    --bg-input: #151d2e;
    --border-color: #2a3550;
    --border-glow: rgba(99, 102, 241, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 50px rgba(0, 0, 0, 0.4);
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(26, 34, 52, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* ==================== RESET ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::selection { background: var(--accent); color: #fff; }

/* ==================== LOGIN SCREEN ==================== */
.login-screen {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1040 30%, #0d1f3c 60%, #0a0e1a 100%);
    overflow: hidden;
}
.login-bg-particles {
    position: absolute; inset: 0; overflow: hidden; z-index: 0;
}
.particle {
    position: absolute; border-radius: 50%; opacity: 0.15;
    background: radial-gradient(circle, var(--accent-light), transparent 70%);
    animation: particleFloat 20s infinite ease-in-out;
}
.p1 { width: 400px; height: 400px; top: -10%; left: -5%; animation-delay: 0s; }
.p2 { width: 300px; height: 300px; bottom: -5%; right: -5%; animation-delay: -5s; }
.p3 { width: 200px; height: 200px; top: 50%; left: 60%; animation-delay: -10s; }
.p4 { width: 150px; height: 150px; top: 20%; right: 20%; animation-delay: -3s; opacity: 0.1; }
.p5 { width: 250px; height: 250px; bottom: 20%; left: 30%; animation-delay: -7s; opacity: 0.08; }
.p6 { width: 180px; height: 180px; top: 60%; right: 40%; animation-delay: -13s; opacity: 0.12; }

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.1); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.05); }
}
.login-card {
    position: relative; z-index: 1;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px; padding: 48px 40px;
    width: 100%; max-width: 420px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(99, 102, 241, 0.1);
    animation: loginSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0; transform: translateY(40px);
}
@keyframes loginSlideUp {
    to { opacity: 1; transform: translateY(0); }
}
.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo-icon {
    width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
    0%, 100% { box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 8px 50px rgba(99, 102, 241, 0.6); }
}
.login-logo-icon i { font-size: 28px; color: #fff; }
.login-logo h1 { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.login-subtitle { color: var(--text-secondary); font-size: 14px; letter-spacing: 3px; text-transform: uppercase; }

.login-field {
    position: relative; margin-bottom: 18px;
    animation: fieldSlideUp 0.5s ease forwards;
    animation-fill-mode: forwards;
}
.login-field:nth-child(1) { animation-delay: 0.15s; }
.login-field:nth-child(2) { animation-delay: 0.25s; }
@keyframes fieldSlideUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}
.login-field i:first-child {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 16px; transition: var(--transition);
}
.login-field input {
    width: 100%; padding: 14px 50px 14px 46px;
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: 12px; color: #fff; font-size: 14px;
    transition: var(--transition);
}
.login-field input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.login-field input:focus + i, .login-field input:focus ~ i { color: var(--accent); }
.login-field input::placeholder { color: var(--text-muted); }
.toggle-pass {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; color: var(--text-muted); font-size: 16px; padding: 4px;
}
.toggle-pass:hover { color: var(--accent); }

.login-options {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; font-size: 13px;
    animation: fieldSlideUp 0.5s 0.35s ease forwards;
    animation-fill-mode: forwards;
}
.remember-me { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); cursor: pointer; }
.remember-me input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

.login-error {
    padding: 10px 14px; border-radius: 10px; margin-bottom: 14px;
    font-size: 13px; color: var(--danger);
    background: var(--danger-bg); border: 1px solid rgba(239, 68, 68, 0.2);
    animation: shake 0.5s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
.login-lockout {
    padding: 10px 14px; border-radius: 10px; margin-bottom: 14px;
    font-size: 13px; color: var(--warning);
    background: var(--warning-bg); border: 1px solid rgba(245, 158, 11, 0.2);
}

.login-btn {
    width: 100%; padding: 14px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff; font-size: 16px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    animation: fieldSlideUp 0.5s 0.45s ease forwards;
    animation-fill-mode: forwards;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.login-btn i { transition: transform 0.3s; }
.login-btn:hover i { transform: translateX(4px); }

.login-footer-text {
    text-align: center; margin-top: 24px; font-size: 12px; color: var(--text-muted);
    animation: fieldSlideUp 0.5s 0.55s ease forwards;
    animation-fill-mode: forwards;
}
.login-footer-text i { color: var(--success); margin-right: 4px; }

/* ==================== PRELOADER ==================== */
.preloader-hidden { display: none; }
.preloader-visible {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
}
.loader { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.loader-ring {
    position: absolute; width: 100%; height: 100%;
    border: 3px solid transparent; border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1.2s linear infinite;
}
.loader-ring:nth-child(2) {
    width: 60%; height: 60%;
    border-top-color: #8b5cf6;
    animation-direction: reverse; animation-duration: 0.8s;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
    position: absolute; bottom: -35px; white-space: nowrap;
    font-size: 12px; color: var(--text-secondary); letter-spacing: 2px;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed; left: 0; top: 0; width: var(--sidebar-width); height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    display: flex; flex-direction: column;
    z-index: 1000; transition: var(--transition);
    overflow: hidden;
}
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--glass-border); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}
.logo-icon i { color: #fff; font-size: 18px; }
.logo-text h2 { font-size: 18px; font-weight: 800; line-height: 1.2; }
.logo-text span { font-size: 11px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-item { margin-bottom: 4px; }
.nav-item a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    transition: var(--transition); position: relative;
}
.nav-item a i { width: 20px; text-align: center; font-size: 16px; transition: var(--transition); }
.nav-item:hover a { color: var(--text-primary); background: rgba(99, 102, 241, 0.08); }
.nav-item.active a {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.1);
}
.nav-item.active a::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 24px; border-radius: 0 3px 3px 0;
    background: linear-gradient(to bottom, var(--accent), #8b5cf6);
}
.nav-item.active a i { color: var(--accent-light); }

.sidebar-footer {
    padding: 16px; border-top: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: space-between;
}
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: #fff;
}
.user-details { display: flex; flex-direction: column; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-muted); }
.logout-btn {
    width: 34px; height: 34px; border-radius: 10px;
    background: rgba(239, 68, 68, 0.1); color: var(--danger);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); font-size: 14px;
}
.logout-btn:hover { background: rgba(239, 68, 68, 0.2); transform: translateY(-1px); }

/* ==================== MAIN ==================== */
.main-content {
    margin-left: var(--sidebar-width); min-height: 100vh;
    transition: var(--transition); display: flex; flex-direction: column;
}

/* ==================== TOPBAR ==================== */
.topbar {
    height: var(--topbar-height); padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.mobile-toggle { display: none; font-size: 20px; color: var(--text-secondary); background: none; }
.page-title { font-size: 22px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.search-wrapper { position: relative; }
.search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 8px 14px;
    transition: var(--transition);
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
.search-box i { color: var(--text-muted); font-size: 14px; }
.search-box input { background: none; border: none; color: #fff; font-size: 13px; width: 200px; outline: none; }
.search-box input::placeholder { color: var(--text-muted); }
.search-clear { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 12px; padding: 2px; transition: var(--transition); }
.search-clear:hover { color: var(--danger); }
.search-results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    min-width: 360px; max-height: 420px; overflow-y: auto;
    background: var(--bg-secondary); border: 1px solid var(--glass-border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    z-index: 500; backdrop-filter: blur(20px);
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.search-group-label {
    padding: 8px 16px; font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--accent-light); background: var(--bg-input);
    border-bottom: 1px solid var(--glass-border); position: sticky; top: 0;
}
.search-result-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; cursor: pointer; transition: var(--transition);
    border-bottom: 1px solid var(--glass-border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(99, 102, 241, 0.08); }
.search-result-icon {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}
.search-result-icon.apt { background: rgba(99, 102, 241, 0.15); color: var(--accent-light); }
.search-result-icon.cc { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.search-result-icon.pe { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.search-result-icon.emi { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-sub { font-size: 11px; color: var(--text-muted); }
.search-result-amount { font-weight: 700; font-size: 13px; flex-shrink: 0; }
.search-no-results { padding: 30px 16px; text-align: center; color: var(--text-muted); }
.search-no-results i { font-size: 32px; display: block; margin-bottom: 8px; opacity: 0.3; }
.search-no-results p { font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.notification-btn {
    position: relative; width: 38px; height: 38px; border-radius: 10px;
    background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-secondary); font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.notification-btn:hover { border-color: var(--accent); color: var(--accent); }
.badge {
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.badge[data-count="0"] { display: none; }
.date-display {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-secondary);
}
.date-display i { color: var(--accent-light); }
.logout-btn-top {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(239, 68, 68, 0.08); color: var(--danger);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); font-size: 14px;
}
.logout-btn-top:hover { background: rgba(239, 68, 68, 0.15); }

/* ==================== PAGES ==================== */
.page { display: none; padding: 24px; animation: fadeIn 0.4s ease; }
.page.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== DASHBOARD ==================== */
.stats-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px; margin-bottom: 24px;
}
.stat-card {
    border-radius: var(--radius); padding: 22px;
    display: flex; align-items: center; gap: 16px;
    position: relative; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    transition: transform 0.5s cubic-bezier(0.34,1.3,0.64,1), box-shadow 0.45s cubic-bezier(0.4,0,0.2,1), border-color 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.stat-card::before {
    content: ''; position: absolute;
    top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.6s ease; pointer-events: none;
}
.stat-card:hover::before { left: 150%; }
.stat-card::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 20% 20%, rgba(255,255,255,0.06), transparent 65%);
    pointer-events: none; transition: opacity 0.4s ease; opacity: 0;
}
.stat-card:hover::after { opacity: 1; }
.stat-card:hover {
    transform: translateY(-7px) rotateX(4deg) rotateY(-2deg) scale(1.025);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.35);
}
.stat-icon {
    width: 54px; height: 54px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px; flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.stat-card:hover .stat-icon {
    transform: scale(1.12) rotate(-4deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.stat-info { flex: 1; min-width: 0; }
.stat-label {
    font-size: 11px; color: var(--text-secondary); display: block; margin-bottom: 5px;
    text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600;
}
.stat-value {
    font-size: 21px; font-weight: 800; margin: 0;
    word-break: break-word; overflow-wrap: break-word;
    background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,0.7));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-sub { font-size: 11px; color: var(--text-muted); display: block; margin-top: 3px; }

.gradient-purple {
    background: linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(139,92,246,0.10) 60%, rgba(99,102,241,0.06) 100%);
    border-color: rgba(99,102,241,0.18) !important;
}
.gradient-purple .stat-icon { background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(139,92,246,0.25)); color: #a5b4fc; }
.gradient-blue {
    background: linear-gradient(135deg, rgba(59,130,246,0.18) 0%, rgba(99,102,241,0.10) 60%, rgba(59,130,246,0.06) 100%);
    border-color: rgba(59,130,246,0.18) !important;
}
.gradient-blue .stat-icon { background: linear-gradient(135deg, rgba(59,130,246,0.35), rgba(99,102,241,0.25)); color: #93c5fd; }
.gradient-green {
    background: linear-gradient(135deg, rgba(16,185,129,0.18) 0%, rgba(52,211,153,0.10) 60%, rgba(16,185,129,0.06) 100%);
    border-color: rgba(16,185,129,0.18) !important;
}
.gradient-green .stat-icon { background: linear-gradient(135deg, rgba(16,185,129,0.35), rgba(52,211,153,0.25)); color: #6ee7b7; }
.gradient-orange {
    background: linear-gradient(135deg, rgba(245,158,11,0.18) 0%, rgba(252,211,77,0.10) 60%, rgba(245,158,11,0.06) 100%);
    border-color: rgba(245,158,11,0.18) !important;
}
.gradient-orange .stat-icon { background: linear-gradient(135deg, rgba(245,158,11,0.35), rgba(252,211,77,0.25)); color: #fde68a; }
.gradient-red {
    background: linear-gradient(135deg, rgba(239,68,68,0.18) 0%, rgba(252,165,165,0.10) 60%, rgba(239,68,68,0.06) 100%);
    border-color: rgba(239,68,68,0.18) !important;
}
.gradient-red .stat-icon { background: linear-gradient(135deg, rgba(239,68,68,0.35), rgba(252,165,165,0.25)); color: #fca5a5; }
.gradient-teal {
    background: linear-gradient(135deg, rgba(20,184,166,0.18) 0%, rgba(6,182,212,0.10) 60%, rgba(20,184,166,0.06) 100%);
    border-color: rgba(20,184,166,0.18) !important;
}
.gradient-teal .stat-icon { background: linear-gradient(135deg, rgba(20,184,166,0.35), rgba(6,182,212,0.25)); color: #5eead4; }
.gradient-dark { background: linear-gradient(135deg, #1e293b, #0f172a); }
.gradient-gold {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(217,119,6,0.1));
    border-color: rgba(245,158,11,0.2) !important;
}

.charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 24px; align-items: start; }
.charts-row-full { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 24px; }
.chart-card-wide { min-height: 320px; max-height: 400px; }
.chart-card, .info-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 20px;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
    position: relative;
    overflow: hidden;
}
.chart-card::before, .info-card::before {
    content: ''; position: absolute; inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(139, 92, 246, 0.02), transparent 60%);
    pointer-events: none; z-index: 0;
}
.chart-card:hover, .info-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-6px) rotateX(2deg) rotateY(-1deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--glass-border);
    position: relative; z-index: 1;
}
.card-header h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-header h3 i { color: var(--accent-light); font-size: 14px; }
.chart-container { position: relative; height: 280px; max-height: 280px; overflow: hidden; z-index: 1; }
.chart-container canvas { max-height: 100% !important; }
.chart-container-sm { height: 240px; max-height: 240px; }
.chart-no-data {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; color: var(--text-muted); gap: 8px;
}
.chart-no-data i { font-size: 36px; opacity: 0.2; }
.chart-no-data p { font-size: 13px; }

.view-all { font-size: 13px; color: var(--accent-light); font-weight: 500; transition: var(--transition); }
.view-all:hover { color: var(--accent); }
.bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* Apartment Summary in Dashboard */
.apartment-summary-list { display: flex; flex-direction: column; gap: 10px; max-height: 350px; overflow-y: auto; }
.apt-summary-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px; background: var(--bg-input); border-radius: var(--radius-sm);
    transition: var(--transition); border: 1px solid transparent;
}
.apt-summary-item:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.apt-summary-left { display: flex; align-items: center; gap: 12px; }
.apt-summary-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px;
}
.apt-summary-name { font-weight: 600; font-size: 14px; }
.apt-summary-location { font-size: 11px; color: var(--text-muted); }
.apt-summary-right { text-align: right; }
.apt-summary-value { font-weight: 700; font-size: 14px; }
.apt-summary-pending { font-size: 11px; color: var(--warning); }

/* Recent Transactions in Dashboard */
.recent-transactions { max-height: 350px; overflow-y: auto; }
.tx-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--glass-border);
}
.tx-item:last-child { border-bottom: none; }
.tx-left { display: flex; align-items: center; gap: 10px; }
.tx-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.tx-icon.expense { background: var(--danger-bg); color: var(--danger); }
.tx-icon.income { background: var(--success-bg); color: var(--success); }
.tx-icon.card { background: var(--info-bg); color: var(--info); }
.tx-desc { font-size: 13px; font-weight: 500; }
.tx-date { font-size: 11px; color: var(--text-muted); }
.tx-amount { font-weight: 700; font-size: 14px; }
.tx-amount.negative { color: var(--danger); }
.tx-amount.positive { color: var(--success); }

/* ==================== SECTION HEADER ==================== */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.section-header h2 { font-size: 24px; font-weight: 800; }

/* ==================== APARTMENT OVERVIEW CARDS ==================== */
.apartment-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px; margin-bottom: 24px;
}
.apartment-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 22px;
    cursor: pointer; transition: var(--transition);
    position: relative; overflow: hidden;
    animation: cardPopIn 0.4s ease forwards;
    opacity: 0; transform: scale(0.95);
}
.apartment-card:nth-child(1) { animation-delay: 0.05s; }
.apartment-card:nth-child(2) { animation-delay: 0.1s; }
.apartment-card:nth-child(3) { animation-delay: 0.15s; }
.apartment-card:nth-child(4) { animation-delay: 0.2s; }
@keyframes cardPopIn {
    to { opacity: 1; transform: scale(1); }
}
.apartment-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    opacity: 0; transition: var(--transition);
}
.apartment-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.apartment-card:hover::before { opacity: 1; }
.apartment-card.selected { border-color: var(--accent); box-shadow: 0 0 20px rgba(99, 102, 241, 0.2); }
.apartment-card.selected::before { opacity: 1; }
.apt-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.apt-card-name { font-size: 17px; font-weight: 700; }
.apt-card-location { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.apt-card-badge {
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
    background: rgba(99, 102, 241, 0.15); color: var(--accent-light);
}
.apt-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.apt-card-stat { padding: 10px; background: var(--bg-input); border-radius: var(--radius-sm); }
.apt-card-stat label { font-size: 10px; color: var(--text-muted); display: block; text-transform: uppercase; letter-spacing: 0.5px; }
.apt-card-stat span { font-size: 14px; font-weight: 700; }
.apt-card-actions { display: flex; gap: 6px; margin-top: 14px; }
.apt-card-actions button {
    flex: 1; padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 500;
    border: 1px solid var(--border-color); background: var(--bg-input);
    color: var(--text-secondary); transition: var(--transition);
}
.apt-card-actions button:hover { border-color: var(--accent); color: var(--accent-light); }
.apt-card-actions button.btn-danger-outline:hover { border-color: var(--danger); color: var(--danger); }

/* ==================== APARTMENT SELECTOR TABS ==================== */
.apt-selector {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
    padding: 6px; background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--glass-border);
}
.apt-tab {
    padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 600;
    background: transparent; color: var(--text-secondary);
    border: 1px solid transparent;
    transition: var(--transition);
}
.apt-tab:hover { color: var(--text-primary); background: rgba(99, 102, 241, 0.08); }
.apt-tab.active {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.apt-tab i { margin-right: 6px; }

/* ==================== MINI STATS ==================== */
.apt-stats-row, .mini-stats-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin-bottom: 22px;
}
@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.mini-stat-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(26,34,52,0.7) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; padding: 16px 18px;
    display: flex; align-items: center; gap: 14px;
    transition: all 0.4s cubic-bezier(0.34,1.3,0.64,1);
    animation: fadeInScale 0.45s cubic-bezier(0.34,1.3,0.64,1) both;
    opacity: 0; position: relative; overflow: hidden;
}
.mini-stat-card::before {
    content: ''; position: absolute;
    top: 0; left: -80%; width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.04), transparent);
    transition: left 0.5s ease; pointer-events: none;
}
.mini-stat-card:hover::before { left: 130%; }
.mini-stat-card:hover {
    border-color: rgba(99,102,241,0.35); transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 28px rgba(0,0,0,0.25), 0 0 0 1px rgba(99,102,241,0.1);
}
.mini-stat-card:nth-child(1) { animation-delay: 0.06s; }
.mini-stat-card:nth-child(2) { animation-delay: 0.12s; }
.mini-stat-card:nth-child(3) { animation-delay: 0.18s; }
.mini-stat-card:nth-child(4) { animation-delay: 0.24s; }
.mini-stat-card:nth-child(5) { animation-delay: 0.30s; }
.mini-stat-card i {
    font-size: 20px; color: var(--accent-light);
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(99,102,241,0.12); border-radius: 12px;
    border: 1px solid rgba(99,102,241,0.18);
    transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 2px 8px rgba(99,102,241,0.15);
}
.mini-stat-card:hover i {
    transform: scale(1.15) rotate(-5deg);
    background: rgba(99,102,241,0.2);
    box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}
.mini-stat-card span { font-size: 11px; color: var(--text-muted); display: block; letter-spacing: 0.3px; }
.mini-stat-card h4 { font-size: 19px; font-weight: 800; margin: 2px 0 0; letter-spacing: -0.3px; }
.mini-stat-card.pending-glow {
    border-color: rgba(245,158,11,0.25);
    box-shadow: 0 0 14px rgba(245,158,11,0.06);
}
.mini-stat-card.pending-glow i { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.2); color: #fbbf24; box-shadow: 0 2px 8px rgba(245,158,11,0.15); }
.text-orange { color: var(--warning) !important; }
.text-green { color: var(--success) !important; }
.text-red { color: var(--danger) !important; }

/* ==================== CATEGORY GRID ==================== */
.subsection-title {
    font-size: 16px; font-weight: 700; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.subsection-title i { color: var(--accent-light); font-size: 14px; }
.category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px; margin-bottom: 24px;
}
.category-box {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); padding: 18px;
    transition: var(--transition); position: relative; overflow: hidden;
    animation: fadeInScale 0.4s ease forwards;
    opacity: 0;
}
.category-box:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.category-box::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--cat-color, var(--accent));
}
.category-box-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.category-box-name {
    font-size: 13px; font-weight: 600; text-transform: capitalize;
    display: flex; align-items: center; gap: 6px;
}
.category-box-name i { color: var(--cat-color, var(--accent-light)); font-size: 14px; }
.category-box-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cbox-stat { text-align: center; padding: 8px; background: var(--bg-input); border-radius: 8px; }
.cbox-stat label { font-size: 10px; color: var(--text-muted); display: block; text-transform: uppercase; letter-spacing: 0.3px; }
.cbox-stat .paid { font-size: 14px; font-weight: 700; color: var(--success); }
.cbox-stat .pending { font-size: 14px; font-weight: 700; color: var(--warning); }

/* Category colors */
.category-box[data-cat="electricity"] { --cat-color: #fbbf24; }
.category-box[data-cat="sewerage"] { --cat-color: #60a5fa; }
.category-box[data-cat="service_charges"] { --cat-color: #a78bfa; }
.category-box[data-cat="cooling"] { --cat-color: #22d3ee; }
.category-box[data-cat="maintenance"] { --cat-color: #f97316; }
.category-box[data-cat="cleaning"] { --cat-color: #34d399; }
.category-box[data-cat="renovation"] { --cat-color: #f472b6; }
.category-box[data-cat="internet"] { --cat-color: #06b6d4; }
.category-box[data-cat="installment"] { --cat-color: #6366f1; }
.category-box[data-cat="downpayment"] { --cat-color: #ef4444; }
.category-box[data-cat="commission"] { --cat-color: #8b5cf6; }
.category-box[data-cat="rent"] { --cat-color: #10b981; }

/* ==================== CREDIT CARD DISPLAY ==================== */
.credit-cards-display {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px; margin-bottom: 24px;
}
.cc-card-visual {
    border-radius: var(--radius-lg); padding: 24px;
    color: #fff; position: relative; overflow: hidden;
    height: 190px; cursor: pointer;
    transition: var(--transition);
    animation: cardPopIn 0.5s ease forwards;
    opacity: 0; transform: scale(0.95);
}
.cc-card-visual:hover { transform: translateY(-5px) scale(1.02); box-shadow: var(--shadow-lg); }
.cc-card-visual::before {
    content: ''; position: absolute; top: -50%; right: -30%;
    width: 250px; height: 250px;
    background: rgba(255, 255, 255, 0.05); border-radius: 50%;
}
.cc-card-visual::after {
    content: ''; position: absolute; bottom: -40%; left: -20%;
    width: 200px; height: 200px;
    background: rgba(255, 255, 255, 0.03); border-radius: 50%;
}
.cc-card-visual.gradient-purple { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.cc-card-visual.gradient-blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.cc-card-visual.gradient-green { background: linear-gradient(135deg, #10b981, #059669); }
.cc-card-visual.gradient-orange { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.cc-card-visual.gradient-dark { background: linear-gradient(135deg, #1e293b, #334155); }
.cc-card-visual.gradient-gold { background: linear-gradient(135deg, #d97706, #b45309); }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.cc-bank { font-size: 14px; font-weight: 700; opacity: 0.9; }
.cc-type-icon { font-size: 28px; opacity: 0.8; }
.cc-number { font-size: 20px; font-weight: 600; letter-spacing: 3px; margin-top: 30px; position: relative; z-index: 1; }
.cc-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 20px; position: relative; z-index: 1; }
.cc-name { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; }
.cc-limit { font-size: 11px; opacity: 0.7; }
.cc-actions {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    display: flex; gap: 6px; opacity: 0; transition: var(--transition);
}
.cc-card-visual:hover .cc-actions { opacity: 1; }
.cc-actions button {
    width: 28px; height: 28px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.15); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; backdrop-filter: blur(5px);
    transition: var(--transition);
}
.cc-actions button:hover { background: rgba(255, 255, 255, 0.3); }

/* ==================== BANK PAYMENT BOX ==================== */
.bank-payment-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.04));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius); padding: 24px;
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 22px; position: relative; overflow: hidden;
}
.bank-payment-box::before {
    content: ''; position: absolute; right: -30px; top: -30px;
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(239, 68, 68, 0.08);
}
.bank-pay-icon {
    width: 60px; height: 60px; border-radius: 16px;
    background: rgba(239, 68, 68, 0.15);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.bank-pay-icon i { font-size: 26px; color: var(--danger); }
.bank-pay-info { flex: 1; position: relative; z-index: 1; }
.bank-pay-info span { font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.bank-pay-info h2 { font-size: 32px; font-weight: 900; color: var(--danger); margin: 4px 0 8px; }
.bank-pay-breakdown { display: flex; gap: 20px; }
.bank-pay-breakdown span { font-size: 13px; color: var(--text-secondary); }
.bank-pay-breakdown strong { color: var(--text-primary); }

/* ==================== EXPENSE CATEGORY CARDS ==================== */
.expense-category-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.category-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); padding: 16px; text-align: center;
    cursor: pointer; transition: var(--transition);
    animation: cardPopIn 0.4s ease forwards; opacity: 0;
}
.category-card:nth-child(1) { animation-delay: 0.05s; }
.category-card:nth-child(2) { animation-delay: 0.08s; }
.category-card:nth-child(3) { animation-delay: 0.11s; }
.category-card:nth-child(4) { animation-delay: 0.14s; }
.category-card:nth-child(5) { animation-delay: 0.17s; }
.category-card:nth-child(6) { animation-delay: 0.2s; }
.category-card:nth-child(7) { animation-delay: 0.23s; }
.category-card:nth-child(8) { animation-delay: 0.26s; }
.category-card:nth-child(9) { animation-delay: 0.29s; }
.category-card:nth-child(10) { animation-delay: 0.32s; }
.category-card:nth-child(11) { animation-delay: 0.35s; }
.category-card:nth-child(12) { animation-delay: 0.38s; }
.category-card:nth-child(13) { animation-delay: 0.41s; }
.category-card:nth-child(14) { animation-delay: 0.44s; }
.category-card:nth-child(15) { animation-delay: 0.47s; }
.category-card:nth-child(16) { animation-delay: 0.5s; }
.category-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.category-card.active { border-color: var(--accent); box-shadow: 0 0 15px rgba(99, 102, 241, 0.15); }
.cat-icon { font-size: 24px; margin-bottom: 8px; }
.cat-info span { font-size: 12px; color: var(--text-secondary); display: block; }
.cat-info h4 { font-size: 16px; font-weight: 700; margin: 4px 0 0; }
.cat-home .cat-icon { color: #60a5fa; }
.cat-fuel .cat-icon { color: #f59e0b; }
.cat-grocery .cat-icon { color: #10b981; }
.cat-shopping .cat-icon { color: #f472b6; }
.cat-utilities .cat-icon { color: #fbbf24; }
.cat-health .cat-icon { color: #ef4444; }
.cat-entertainment .cat-icon { color: #8b5cf6; }
.cat-other .cat-icon { color: #94a3b8; }
.cat-food .cat-icon { color: #fb923c; }
.cat-accessories .cat-icon { color: #a78bfa; }
.cat-car .cat-icon { color: #2dd4bf; }
.cat-haris .cat-icon { color: #38bdf8; }
.cat-mama .cat-icon { color: #f9a8d4; }
.cat-subs .cat-icon { color: #c084fc; }
.cat-fine .cat-icon { color: #fcd34d; }
.cat-aptrent .cat-icon { color: #4ade80; }
.cat-ccpay .cat-icon { color: #818cf8; }

/* ==================== FILTER BAR ==================== */
.filter-bar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
    padding: 12px 16px; background: var(--bg-card);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
}
.filter-bar h3 {
    font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.filter-bar h3 i { color: var(--accent-light); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-select, .filter-input {
    padding: 8px 12px; border-radius: 8px; font-size: 12px;
    background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.filter-select:focus, .filter-input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}
.filter-select option { background: var(--bg-secondary); }
.filter-input { width: 140px; }

/* ==================== TABLE ==================== */
.table-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
}
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: var(--bg-input); }
.data-table th {
    padding: 12px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-muted); text-align: left;
    white-space: nowrap;
}
.data-table td {
    padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: rgba(99, 102, 241, 0.04); }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-empty {
    text-align: center; padding: 50px 20px; color: var(--text-muted);
}
.table-empty i { font-size: 40px; margin-bottom: 12px; opacity: 0.3; display: block; }
.table-empty p { font-size: 14px; }

/* Status badges */
.status-badge {
    padding: 4px 10px; border-radius: 20px; font-size: 11px;
    font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
}
.status-badge::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.status-badge.paid { background: var(--success-bg); color: var(--success); }
.status-badge.paid::before { background: var(--success); }
.status-badge.pending { background: var(--warning-bg); color: var(--warning); }
.status-badge.pending::before { background: var(--warning); }
.status-badge.received { background: var(--info-bg); color: var(--info); }
.status-badge.received::before { background: var(--info); }
.status-badge.active { background: var(--success-bg); color: var(--success); }
.status-badge.active::before { background: var(--success); }
.status-badge.completed { background: var(--info-bg); color: var(--info); }
.status-badge.completed::before { background: var(--info); }

/* Action buttons */
.action-btn {
    width: 30px; height: 30px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; border: 1px solid var(--border-color);
    background: var(--bg-input); color: var(--text-secondary);
    transition: var(--transition); margin-right: 4px;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.action-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.progress-bar-wrap {
    width: 80px; height: 6px; background: var(--bg-input);
    border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px;
}
.progress-bar-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    transition: width 0.6s ease;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
    transition: var(--transition); border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4); }
.btn-secondary {
    background: var(--bg-input); color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-accent {
    background: rgba(99, 102, 241, 0.15); color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.btn-accent:hover { background: rgba(99, 102, 241, 0.25); }
.btn-danger {
    background: var(--danger); color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 5000;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    padding: 20px; opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal {
    background: var(--bg-secondary); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 720px; }
.animate-modal {
    animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-header-danger { background: var(--danger-bg); }
.modal-close {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--bg-input); color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; transition: var(--transition);
}
.modal-close:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px; border-top: 1px solid var(--glass-border);
    display: flex; justify-content: flex-end; gap: 10px;
}
.confirm-icon { text-align: center; font-size: 48px; color: var(--warning); margin-bottom: 16px; }
.confirm-icon i { animation: wobble 0.6s ease; }
@keyframes wobble {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Form */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 0; }
.form-group { margin-bottom: 15px; }
.form-group label {
    display: block; font-size: 11px; font-weight: 700; color: var(--text-secondary);
    margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.7px;
    transition: color 0.25s;
}
.form-group:focus-within label { color: var(--accent-light); }
.form-input {
    width: 100%; padding: 10px 14px; border-radius: 11px;
    background: rgba(15,18,35,0.7); color: #fff; font-size: 13px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.form-input:hover {
    border-color: rgba(99,102,241,0.3);
    background: rgba(15,18,35,0.85);
}
.form-input:focus {
    border-color: var(--accent);
    background: rgba(15,18,35,0.95);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15), inset 0 1px 3px rgba(0,0,0,0.2);
}
.form-input::placeholder { color: rgba(100,116,139,0.6); }

/* ==================== SETTINGS ==================== */
.settings-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 18px;
}
.settings-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); overflow: hidden;
}
.settings-body { padding: 20px; }
.settings-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }

.toggle-label {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    font-size: 13px; color: var(--text-secondary); line-height: 1.4;
}
.toggle-label span:not(.toggle-slider) {
    flex: 1; min-width: 0;
}
.toggle-input { display: none; }
.toggle-slider {
    width: 44px; min-width: 44px; height: 24px; border-radius: 12px;
    background: var(--bg-input); border: 1px solid var(--border-color);
    position: relative; transition: var(--transition); flex-shrink: 0;
}
.toggle-slider::before {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--text-muted); transition: var(--transition);
}
.toggle-input:checked + .toggle-slider {
    background: var(--accent); border-color: var(--accent);
}
.toggle-input:checked + .toggle-slider::before {
    transform: translateX(20px); background: #fff;
}
.sync-status { margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 13px; }

/* Form Grid */
.form-grid-2 {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
@media (max-width: 540px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* Toggle Switch Cards */
.toggle-cards-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin: 16px 0;
}
.toggle-card {
    display: flex; align-items: center; gap: 12px;
    background: rgba(15,18,35,0.5); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; padding: 14px 16px; cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34,1.3,0.64,1);
    position: relative; overflow: hidden;
}
.toggle-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent, transparent);
    transition: all 0.4s ease; opacity: 0;
}
.toggle-card::after {
    content: ''; position: absolute;
    top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.04), transparent);
    transition: left 0.5s ease; pointer-events: none;
}
.toggle-card:hover::after { left: 150%; }
.toggle-card:hover {
    border-color: rgba(99,102,241,0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2), 0 0 0 1px rgba(99,102,241,0.08);
}
.toggle-card.on {
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 6px 28px rgba(99,102,241,0.18), 0 0 0 1px rgba(99,102,241,0.12);
    animation: toggleCardOn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes toggleCardOn {
    0% { transform: scale(0.97); }
    60% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.toggle-card.on::before {
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.06));
    opacity: 1;
}
.toggle-card-icon {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.toggle-card.on .toggle-card-icon {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 0 5px 18px rgba(0,0,0,0.35);
    animation: iconBounce 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes iconBounce {
    0% { transform: scale(0.8) rotate(0); }
    60% { transform: scale(1.2) rotate(-8deg); }
    100% { transform: scale(1.12) rotate(-5deg); }
}
.toggle-card-info {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
    position: relative; z-index: 1;
}
.toggle-card-title {
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    transition: color 0.3s;
}
.toggle-card.on .toggle-card-title { color: var(--accent-light); }
.toggle-card-desc {
    font-size: 11px; color: var(--text-muted); line-height: 1.3;
}
/* Modern Toggle Switch */
.toggle-switch {
    position: relative; z-index: 2; flex-shrink: 0; cursor: pointer;
}
.toggle-switch input { display: none; }
.toggle-track {
    display: block; width: 48px; height: 26px; border-radius: 13px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    position: relative; transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.toggle-thumb {
    position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-track {
    background: var(--accent); border-color: var(--accent);
    box-shadow: 0 0 12px rgba(99,102,241,0.35);
}
.toggle-switch input:checked + .toggle-track .toggle-thumb {
    transform: translateX(22px); background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
@media (max-width: 768px) {
    .toggle-cards-row { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
    .toggle-card { padding: 12px; gap: 10px; }
    .toggle-card-desc { display: none; }
}
.expense-vat-toggle-row {
    grid-template-columns: 1fr;
    margin: 6px 0 0;
    grid-column: 1 / -1;
}
#offExpVatPaidAmountWrap {
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.sync-status.success { background: var(--success-bg); color: var(--success); }
.sync-status.error { background: var(--danger-bg); color: var(--danger); }

/* ==================== NOTIFICATIONS ==================== */
.notification-container {
    position: fixed; top: 20px; right: 20px; z-index: 9000;
    display: flex; flex-direction: column; gap: 10px;
}
.notification {
    padding: 14px 20px; border-radius: 12px; font-size: 13px; font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: notifSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateX(100%);
    min-width: 300px; max-width: 420px;
    backdrop-filter: blur(20px);
}
@keyframes notifSlide { to { transform: translateX(0); } }
.notification.closing {
    animation: notifOut 0.3s ease forwards;
}
@keyframes notifOut { to { transform: translateX(120%); opacity: 0; } }
.notification.success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.notification.error { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.notification.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.notification.info { background: rgba(59, 130, 246, 0.15); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.2); }
.notification i { font-size: 18px; flex-shrink: 0; }
.notif-close { margin-left: auto; cursor: pointer; opacity: 0.7; transition: var(--transition); }
.notif-close:hover { opacity: 1; }

/* ==================== FOOTER ==================== */
.footer {
    margin-top: auto; padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}
.footer-content p { font-size: 13px; color: var(--text-secondary); }
.footer-content strong { color: var(--accent-light); }
.footer-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ==================== ANIMATIONS ==================== */
.animate-in {
    opacity: 0; transform: translateY(28px) rotateX(-10deg) scale(0.95);
    animation: slideUp3D 0.65s cubic-bezier(0.22,1,0.36,1) forwards;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}
@keyframes slideUp3D {
    0%  { opacity: 0; transform: translateY(28px) rotateX(-10deg) scale(0.95); }
    55% { opacity: 1; transform: translateY(-5px) rotateX(1.5deg) scale(1.008); }
    100%{ opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}
.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: 0.08s; }
.animate-in:nth-child(3) { animation-delay: 0.16s; }
.animate-in:nth-child(4) { animation-delay: 0.24s; }
.animate-in:nth-child(5) { animation-delay: 0.32s; }
.animate-in:nth-child(6) { animation-delay: 0.40s; }

/* Smooth number counting animation class */
.counting { transition: none; }

/* Hover lift effect */
.hover-lift { transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease; }
.hover-lift:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow); }

/* Ripple effect for buttons */
.btn::after {
    content: ''; position: absolute; inset: 0;
    border-radius: inherit; background: rgba(255, 255, 255, 0.1);
    opacity: 0; transform: scale(0);
    transition: transform 0.4s, opacity 0.4s;
}
.btn { position: relative; overflow: hidden; }
.btn:active::after { opacity: 1; transform: scale(2); transition: 0s; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .charts-row { grid-template-columns: 1fr; }
    .charts-row-full { grid-template-columns: 1fr; }
    .bottom-row { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px; z-index: 2000;
    }
    .sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: flex; }
    .search-wrapper { display: none; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page { padding: 16px; }
    .topbar { padding: 0 16px; }
    .login-card { margin: 16px; padding: 32px 24px; }
    .credit-cards-display { grid-template-columns: 1fr; }
    .apartment-cards { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr 1fr; }
    .expense-category-cards { grid-template-columns: repeat(4, 1fr); }
    .filter-bar { flex-direction: column; align-items: flex-start; }
    .filters { width: 100%; }
    .bank-payment-box { flex-direction: column; text-align: center; }
    .bank-pay-breakdown { justify-content: center; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .expense-category-cards { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: 1fr; }
    .apt-stats-row { grid-template-columns: 1fr 1fr; }
    .page-title { font-size: 18px; }
    .apt-selector { overflow-x: auto; flex-wrap: nowrap; }
    .apt-tab { white-space: nowrap; flex-shrink: 0; }
    .bank-pay-info h2 { font-size: 24px; }
}

/* Mobile overlay */
.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1999;
    display: none; opacity: 0; transition: opacity 0.3s;
}
.sidebar-overlay.active { display: block; opacity: 1; }

/* ==================== CASH INFLOW SOURCE CARDS ==================== */
.ci-source-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px;
}
.ci-source-card {
    background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    padding: 14px; text-align: center; cursor: pointer; transition: var(--transition);
    animation: fadeInUp 0.4s ease-out backwards;
}
.ci-source-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.ci-source-card.active { border-color: var(--success); box-shadow: 0 0 15px rgba(16, 185, 129, 0.15); }
.ci-source-card i { font-size: 20px; margin-bottom: 6px; color: var(--success); display: block; }
.ci-source-card span { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.ci-source-card h4 { font-size: 15px; font-weight: 700; }

/* ==================== BALANCE IN HAND BOX ==================== */
.balance-in-hand-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.2); border-radius: var(--radius);
    padding: 20px 24px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.balance-in-hand-box .bih-main { display: flex; align-items: center; gap: 16px; }
.balance-in-hand-box .bih-main i { font-size: 32px; color: var(--success); }
.balance-in-hand-box .bih-main h2 { font-size: 28px; font-weight: 800; color: var(--success); }
.balance-in-hand-box .bih-main span { font-size: 12px; color: var(--text-secondary); display: block; }
.balance-in-hand-box .bih-details { display: flex; gap: 24px; }
.balance-in-hand-box .bih-details div { text-align: center; }
.balance-in-hand-box .bih-details span { font-size: 11px; color: var(--text-muted); display: block; }
.balance-in-hand-box .bih-details h4 { font-size: 16px; font-weight: 700; }

@media (max-width: 480px) {
    .ci-source-cards { grid-template-columns: repeat(2, 1fr); }
    .balance-in-hand-box { flex-direction: column; text-align: center; }
    .balance-in-hand-box .bih-main { flex-direction: column; }
}

/* ==================== DATE RANGE FILTER BAR ==================== */
.date-range-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: rgba(99, 102, 241, 0.06); border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px;
}
.date-range-bar label { font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.date-range-bar input[type="date"] {
    background: var(--card); border: 1px solid var(--border); color: var(--text-primary);
    border-radius: 8px; padding: 7px 12px; font-size: 13px; font-family: inherit;
}
.date-range-bar input[type="date"]:focus { border-color: var(--accent); outline: none; }
.date-range-bar .drb-presets { display: flex; gap: 6px; margin-left: auto; }
.date-range-bar .drb-btn {
    background: var(--card); border: 1px solid var(--border); color: var(--text-secondary);
    padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.date-range-bar .drb-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.date-range-bar .drb-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.date-range-bar .drb-btn-clear {
    background: transparent; border: 1px solid rgba(239,68,68,0.3); color: var(--danger);
    padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.date-range-bar .drb-btn-clear:hover { background: rgba(239,68,68,0.1); }
.date-range-bar .drb-summary {
    font-size: 12px; color: var(--accent-light); font-weight: 600;
    padding: 5px 12px; background: rgba(99,102,241,0.1); border-radius: 8px;
}
@media (max-width: 640px) {
    .date-range-bar { flex-direction: column; align-items: stretch; }
    .date-range-bar .drb-presets { margin-left: 0; flex-wrap: wrap; }
}

/* ==================== OFFICE MODULE ==================== */

/* Office Date Filter - Premium */
.off-date-filter {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(139,92,246,0.06) 100%);
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: 16px; padding: 16px 20px; margin-bottom: 22px;
    position: relative; overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.off-date-filter::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.04) 0%, transparent 60%);
    pointer-events: none;
}
.off-date-filter:hover {
    border-color: rgba(99,102,241,0.35);
    box-shadow: 0 4px 24px rgba(99,102,241,0.1);
}
.off-df-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--accent-gradient); display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
    animation: dfIconPulse 3s ease-in-out infinite;
}
@keyframes dfIconPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
    50% { box-shadow: 0 4px 20px rgba(99,102,241,0.5); }
}
.off-df-inputs {
    display: flex; align-items: center; gap: 10px;
}
.off-df-field { display: flex; flex-direction: column; gap: 3px; }
.off-df-field label {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--accent-light); opacity: 0.7;
}
.off-df-date {
    background: rgba(15,18,35,0.6); border: 1px solid rgba(99,102,241,0.2);
    color: var(--text-primary); border-radius: 10px; padding: 9px 14px;
    font-size: 13px; font-family: inherit; font-weight: 500;
    transition: all 0.25s ease;
}
.off-df-date:focus {
    border-color: var(--accent); outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    background: rgba(15,18,35,0.8);
}
.off-df-arrow {
    color: rgba(99,102,241,0.4); font-size: 12px; margin-top: 16px;
    animation: dfArrowSlide 2s ease-in-out infinite;
}
@keyframes dfArrowSlide {
    0%, 100% { transform: translateX(0); opacity: 0.4; }
    50% { transform: translateX(3px); opacity: 0.8; }
}
.off-df-divider {
    width: 1px; height: 36px; background: linear-gradient(to bottom, transparent, rgba(99,102,241,0.3), transparent);
    flex-shrink: 0;
}
.off-df-presets {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.off-df-preset {
    background: rgba(15,18,35,0.5); border: 1px solid rgba(99,102,241,0.15);
    color: var(--text-secondary); padding: 7px 14px; border-radius: 10px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    display: flex; align-items: center; gap: 5px; white-space: nowrap;
    position: relative; overflow: hidden;
}
.off-df-preset i { font-size: 10px; opacity: 0.6; transition: all 0.25s; }
.off-df-preset:hover {
    border-color: var(--accent); color: var(--accent-light);
    background: rgba(99,102,241,0.1); transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(99,102,241,0.15);
}
.off-df-preset:hover i { opacity: 1; }
.off-df-preset:active { transform: translateY(0) scale(0.97); }
.off-df-preset.active {
    background: var(--accent-gradient); border-color: transparent; color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
    animation: dfPresetPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.off-df-preset.active i { opacity: 1; }
@keyframes dfPresetPop {
    0% { transform: scale(0.92); } 50% { transform: scale(1.04); } 100% { transform: scale(1); }
}
.off-df-preset.off-df-clear {
    border-color: rgba(239,68,68,0.2); color: var(--danger);
}
.off-df-preset.off-df-clear:hover {
    background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4);
    box-shadow: 0 3px 10px rgba(239,68,68,0.12);
}
.off-df-summary {
    display: none; align-items: center; gap: 6px;
    font-size: 12px; color: var(--accent-light); font-weight: 700;
    padding: 6px 14px; background: rgba(99,102,241,0.12); border-radius: 10px;
    border: 1px solid rgba(99,102,241,0.2); margin-left: auto;
}
.off-df-summary:not(:empty) { display: flex; }
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 768px) {
    .off-date-filter { padding: 14px; gap: 12px; }
    .off-df-icon { display: none; }
    .off-df-divider { display: none; }
    .off-df-inputs { width: 100%; }
    .off-df-presets { width: 100%; }
    .off-df-summary { margin-left: 0; width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .off-df-inputs { flex-wrap: wrap; }
    .off-df-arrow { display: none; }
    .off-df-field { width: 100%; }
    .off-df-date { width: 100%; }
}

.office-tabs {
    display: flex; gap: 8px; margin-bottom: 20px;
}
.office-tab {
    padding: 10px 20px; border-radius: 10px; border: 1px solid var(--border-color);
    background: var(--bg-card); color: var(--text-secondary); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.25s; display: flex; align-items: center; gap: 8px;
}
.office-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.office-tab.active {
    background: var(--accent-gradient); color: #fff; border-color: transparent;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.office-tab-content { display: none; }
.office-tab-content.active { display: block; animation: fadeIn 0.3s ease; }

.split-result-box {
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.06));
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 14px; padding: 18px; margin: 14px 0;
    box-shadow: 0 4px 20px rgba(99,102,241,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
    position: relative; overflow: hidden;
}
.split-result-box::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), transparent);
}
.stat-glass {
    background: linear-gradient(145deg, rgba(26,34,52,0.9) 0%, rgba(15,18,35,0.8) 100%) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 14px; padding: 18px 20px;
    display: flex; align-items: center; gap: 14px;
    transition: all 0.4s cubic-bezier(0.34,1.3,0.64,1);
    position: relative; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
}
.stat-glass::before {
    content: ''; position: absolute;
    top: 0; left: -80%; width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.03), transparent);
    transition: left 0.5s ease; pointer-events: none;
}
.stat-glass:hover::before { left: 130%; }
.stat-glass:hover {
    border-color: rgba(99,102,241,0.3) !important;
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(99,102,241,0.08);
}

.form-divider {
    position: relative; text-align: center; margin: 20px 0 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4) 30%, rgba(139,92,246,0.4) 50%, rgba(99,102,241,0.4) 70%, transparent);
}
.form-divider span {
    background: var(--bg-card); color: var(--accent-light); font-size: 10px;
    font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px;
    padding: 0 14px; position: relative; top: -9px;
    display: inline-flex; align-items: center; gap: 6px;
}
.form-divider span::before, .form-divider span::after {
    content: ''; display: inline-block; width: 4px; height: 4px;
    border-radius: 50%; background: var(--accent-light); opacity: 0.5;
}

.status-badge {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 600; text-transform: capitalize;
}
.status-badge.received { background: rgba(16,185,129,0.15); color: #34d399; }
.status-badge.paid { background: rgba(16,185,129,0.15); color: #34d399; }
.status-badge.pending { background: rgba(245,158,11,0.15); color: #fbbf24; }

.stats-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stats-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }

@media (max-width: 768px) {
    .office-tabs { flex-wrap: wrap; }
    .stats-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-grid-3 { grid-template-columns: 1fr; }
}

/* Agent Cards */
.agent-cards-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.agent-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 22px; transition: all 0.3s;
}
.agent-card:hover {
    border-color: var(--accent); transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99,102,241,0.15);
}
.agent-card-header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
    padding-bottom: 16px; border-bottom: 1px solid var(--border-color);
}
.agent-avatar {
    width: 46px; height: 46px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 18px;
    font-weight: 800; color: #fff; flex-shrink: 0;
}
.agent-name-block { display: flex; flex-direction: column; gap: 4px; }
.agent-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; }
.agent-deals-badge {
    font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px;
    background: rgba(99,102,241,0.12); color: var(--accent-light); width: fit-content;
}
.agent-card-stats { display: flex; flex-direction: column; gap: 10px; }
.agent-stat-row {
    display: flex; justify-content: space-between; align-items: center;
}
.agent-stat-label {
    font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px;
}
.agent-stat-label i { font-size: 11px; width: 14px; text-align: center; color: var(--text-muted); }
.agent-stat-value { font-size: 14px; font-weight: 700; color: var(--text-primary); }
@media (max-width: 900px) { .agent-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .agent-cards-grid { grid-template-columns: 1fr; } }
