
:root {
    --fa-bg: #f5f6f8;
    --fa-surface: #ffffff;
    --fa-border: #e5e7eb;
    --fa-text: #14161a;
    --fa-text-muted: #6b7280;
    --fa-primary: #5b5fef;
    --fa-primary-hover: #4a4ed6;
    --fa-sidebar-bg: #14161f;
    --fa-sidebar-text: #c9cbd8;
    --fa-sidebar-active: #5b5fef;
    --fa-radius: 12px;
}
[data-bs-theme="dark"] {
    --fa-bg: #0d0e12;
    --fa-surface: #16171d;
    --fa-border: #262832;
    --fa-text: #f1f2f5;
    --fa-text-muted: #9297a6;
    --fa-sidebar-bg: #0a0b0f;
}
body { background: var(--fa-bg); color: var(--fa-text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* Guest / auth pages */
.guest-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.guest-wrapper { width: 100%; max-width: 420px; padding: 24px; }
.guest-card { background: var(--fa-surface); border: 1px solid var(--fa-border); border-radius: var(--fa-radius); padding: 40px; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.guest-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.25rem; margin-bottom: 28px; color: var(--fa-primary); }
.guest-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.guest-subtitle { color: var(--fa-text-muted); font-size: .9rem; margin-bottom: 24px; }
.guest-footer { margin-top: 20px; text-align: center; font-size: .875rem; }
.guest-footer a { color: var(--fa-primary); text-decoration: none; }

/* App shell */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { width: 240px; background: var(--fa-sidebar-bg); color: var(--fa-sidebar-text); flex-shrink: 0; padding: 20px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; padding: 8px 12px 24px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav .nav-link { color: var(--fa-sidebar-text); padding: 10px 12px; border-radius: 8px; display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--fa-sidebar-active); color: #fff; }
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-topbar { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--fa-border); background: var(--fa-surface); position: sticky; top: 0; z-index: 10; }
.topbar-title { font-weight: 600; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.btn-icon { border: 1px solid var(--fa-border); background: var(--fa-surface); border-radius: 8px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.btn-user { border: 1px solid var(--fa-border); background: var(--fa-surface); border-radius: 8px; }
.app-content { padding: 24px; flex: 1; }

/* Cards / dashboard widgets */
.fa-card { background: var(--fa-surface); border: 1px solid var(--fa-border); border-radius: var(--fa-radius); padding: 20px; }
.fa-stat-label { color: var(--fa-text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.fa-stat-value { font-size: 1.6rem; font-weight: 700; margin-top: 4px; }
.fa-stat-value.positive { color: #16a34a; }
.fa-stat-value.negative { color: #dc2626; }

@media (max-width: 991px) {
    .app-sidebar { position: fixed; left: -260px; z-index: 1000; transition: left .2s; box-shadow: 4px 0 20px rgba(0,0,0,.2); }
    .app-sidebar.open { left: 0 !important; }
}
