:root {
    --fc-black: #0a0a0a;
    --fc-white: #ffffff;
    --fc-navy: #001f3f;
    --fc-teal: #1abc9c;
    --fc-gray-50: #fafafa;
    --fc-gray-100: #f4f4f5;
    --fc-gray-200: #e4e4e7;
    --fc-gray-300: #d4d4d8;
    --fc-gray-400: #a1a1aa;
    --fc-gray-500: #71717a;
    --fc-gray-600: #52525b;
    --fc-gray-700: #3f3f46;
    --fc-gray-800: #27272a;
    --fc-gray-900: #18181b;
    --fc-radius: 12px;
    --fc-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
    --fc-font: 'Outfit', system-ui, -apple-system, sans-serif;
    --guest-nav-height: 65px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--fc-font);
    background: var(--fc-gray-50);
    color: var(--fc-gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; }

.container { width: min(1080px, 100%); margin-inline: auto; padding-inline: clamp(1.75rem, 6vw, 4rem); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 1.25rem;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s ease;
    text-decoration: none;
}
.btn-primary { background: var(--fc-black); color: var(--fc-white); }
.btn-primary:hover { background: var(--fc-gray-800); }
.btn-outline { background: transparent; border-color: var(--fc-gray-300); color: var(--fc-gray-900); }
.btn-outline:hover { border-color: var(--fc-black); }
.btn-ghost { background: transparent; color: var(--fc-gray-600); }
.btn-ghost:hover { color: var(--fc-black); background: var(--fc-gray-100); }
.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }
.btn-lg { padding: .875rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .8125rem; font-weight: 600; margin-bottom: .375rem; color: var(--fc-gray-700); }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: .625rem .875rem;
    border: 1px solid var(--fc-gray-300);
    border-radius: 8px;
    font-size: .9375rem;
    background: var(--fc-white);
    transition: border-color .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--fc-black);
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
.form-error { color: #dc2626; font-size: .8125rem; margin-top: .25rem; }
.form-hint { color: var(--fc-gray-500); font-size: .8125rem; margin-top: .25rem; }

/* Cards */
.card {
    background: var(--fc-white);
    border: 1px solid var(--fc-gray-200);
    border-radius: var(--fc-radius);
    box-shadow: var(--fc-shadow);
}
.card-body { padding: 1.25rem; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--fc-gray-200); font-weight: 600; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat-card { padding: 1.25rem; }
.stat-label { font-size: .8125rem; color: var(--fc-gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 1.75rem; font-weight: 700; margin-top: .25rem; }
.stat-change { font-size: .8125rem; margin-top: .25rem; }
.stat-change.positive { color: #16a34a; }
.stat-change.negative { color: #dc2626; }

/* Layout - Guest */
.guest-layout { min-height: 100vh; display: flex; flex-direction: column; overflow: visible; padding-top: var(--guest-nav-height); }
.guest-main { flex: 1; overflow: visible; }
.guest-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .875rem clamp(1.25rem, 5vw, 3rem); border-bottom: 1px solid var(--fc-gray-200); background: rgba(255, 255, 255, .97);
    position: fixed; top: 0; left: 0; right: 0; z-index: 300;
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.guest-nav-brand { flex-shrink: 0; }
.guest-nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 0; border: 1px solid var(--fc-gray-200);
    border-radius: 8px; background: var(--fc-white); cursor: pointer;
}
.guest-nav-toggle span {
    display: block; width: 18px; height: 2px; margin: 0 auto;
    background: var(--fc-gray-900); border-radius: 1px; transition: transform .2s;
}
.guest-nav-menu {
    display: flex; align-items: center; gap: 1.25rem;
    flex: 1; justify-content: center; overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
}
.guest-nav-menu::-webkit-scrollbar { display: none; }
.guest-nav-menu a {
    font-size: .875rem; font-weight: 500; color: var(--fc-gray-600);
    white-space: nowrap; text-decoration: none; transition: color .15s;
}
.guest-nav-menu a:hover { color: var(--fc-black); }
.guest-nav-links { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.locale-switcher { display: inline-flex; margin: 0; }
.locale-switcher-select {
    padding: .35rem .6rem;
    border-radius: 8px;
    border: 1px solid var(--fc-gray-300);
    background: var(--fc-white);
    color: var(--fc-gray-800);
    font-size: .8125rem;
    cursor: pointer;
    max-width: 9.5rem;
}
body.theme-dark .locale-switcher-select {
    background: #2a2a32;
    border-color: #3a3a44;
    color: #e5e7eb;
}
.guest-footer {
    padding: 2rem clamp(1.25rem, 5vw, 3rem);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #2a2a2a;
    color: #e5e7eb;
}
.guest-footer-inner {
    max-width: 1080px; margin: 0 auto;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.guest-footer-inner p { margin: 0; color: #9ca3af; font-size: .875rem; }
.guest-footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.guest-footer-links a {
    font-size: .875rem; color: #d1d5db; text-decoration: none;
}
.guest-footer-links a:hover { color: #fff; text-decoration: underline; }
body.theme-dark .guest-footer { background: #2a2a2a; }
.legal-page { padding: 3rem 0 4rem; }
.legal-page h1 { margin: 0 0 .5rem; font-size: clamp(1.75rem, 4vw, 2.25rem); }
.legal-content { padding: 2rem; margin-top: 1.5rem; }
.legal-content h2 { font-size: 1.125rem; margin: 1.5rem 0 .75rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin: 0 0 1rem; color: var(--fc-gray-700); line-height: 1.7; }
.legal-content a { color: var(--fc-teal); }
html { scroll-behavior: smooth; }
.guest-main { flex: 1; }

/* Layout - App */
.app-layout { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 260px; background: #0a0a0a; color: var(--fc-white);
    display: flex; flex-direction: column; flex-shrink: 0;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    transition: transform .25s ease;
}
.app-sidebar-logo { padding: 1.25rem 1.5rem; border-bottom: 1px solid #27272a; }
.app-sidebar-logo img { height: 36px; }
.sidebar-logo { height: 36px; width: auto; display: block; }
.nav-logo { height: 40px; width: auto; display: block; }
.auth-logo { height: 56px; width: auto; display: block; }
.app-nav { flex: 1; min-height: 0; padding: 0; }
.app-nav-scroll {
    height: 100%; overflow-y: auto; overflow-x: hidden;
    direction: rtl; padding: 1rem 0;
    scrollbar-width: thin; scrollbar-color: #3f3f46 #18181b;
}
.app-nav-scroll > * { direction: ltr; }
.app-nav-scroll::-webkit-scrollbar { width: 8px; }
.app-nav-scroll::-webkit-scrollbar-track { background: #18181b; }
.app-nav-scroll::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; }
.app-nav-scroll::-webkit-scrollbar-thumb:hover { background: #52525b; }
.app-nav-section { padding: .5rem 1.5rem; font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: #71717a; }
.app-nav-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .625rem 1.5rem; font-size: .875rem; color: #a1a1aa;
    transition: all .15s;
}
.app-nav-link:hover, .app-nav-link.active { color: var(--fc-white); background: #27272a; }
.app-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.app-nav-link.nav-locked { opacity: .72; }
.app-nav-link .nav-lock-icon {
    margin-inline-start: auto;
    font-size: .7rem;
    opacity: .75;
}
.app-sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid #27272a; background: #0a0a0a; }
.sidebar-user-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.sidebar-logout-btn {
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(220,38,38,.35);
    background: rgba(220,38,38,.12); color: #ef4444; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: background .15s, border-color .15s, transform .15s;
}
.sidebar-logout-btn:hover { background: rgba(220,38,38,.22); border-color: #ef4444; transform: scale(1.04); }
.app-main { flex: 1; margin-left: 260px; display: flex; flex-direction: column; min-width: 0; }
.app-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.5rem; background: var(--fc-white); border-bottom: 1px solid var(--fc-gray-200);
    position: sticky; top: 0; z-index: 250;
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.app-header h1 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.app-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* Mobile sidebar toggle */
.sidebar-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--fc-gray-200); }
.table th { font-weight: 600; color: var(--fc-gray-600); font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; }
.table tr:hover td { background: var(--fc-gray-50); }

/* Badges */
.badge {
    display: inline-flex; align-items: center; padding: .2rem .6rem;
    border-radius: 999px; font-size: .75rem; font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-neutral { background: var(--fc-gray-100); color: var(--fc-gray-600); }

/* Progress */
.progress { height: 8px; background: var(--fc-gray-200); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--fc-black); border-radius: 999px; transition: width .3s; }

/* Alerts */
.alert { padding: .875rem 1rem; border-radius: 8px; font-size: .875rem; margin-bottom: 1rem; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Financial graph grid backgrounds */
.landing-grid-light {
    background-color: #fafbfc;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
}
.landing-grid-dark {
    background-color: #1e293b;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--fc-white);
}
.landing-graph-grid-dark {
    background-color: #2a2a2a;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    color: #f8fafc;
}
.landing-hero.landing-grid-light {
    background-color: #fafbfc;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    background-size: 24px 24px, 24px 24px, 100% 100%;
}
.feature-section.landing-grid-light { background-color: #fafbfc; }

.landing-contact.landing-grid-dark {
    color: #f8fafc;
}
.landing-contact.landing-grid-dark .landing-contact-copy p,
.landing-contact.landing-grid-dark .contact-list li,
.landing-contact.landing-graph-grid-dark .landing-contact-copy p,
.landing-contact.landing-graph-grid-dark .contact-list li { color: #cbd5e1; }
.landing-contact.landing-grid-dark .contact-list a,
.landing-contact.landing-graph-grid-dark .contact-list a { color: #5eead4; }

.onboarding-page.auth-page-grid {
    background-color: #1e293b;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    position: relative;
}
.onboarding-page.auth-page-grid .onboarding-card { position: relative; z-index: 1; }
.auth-back-home {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 2;
    color: #e2e8f0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.auth-back-home:hover { color: #fff; }

/* Landing packages */
.landing-packages { background: var(--fc-white); padding: clamp(4rem, 8vh, 6rem) 0; }
.landing-packages-header { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.landing-packages-header h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; margin: 0 0 .75rem; }
.landing-packages-header p { color: var(--fc-gray-600); margin: 0; line-height: 1.6; }
.landing-packages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.landing-package-card {
    position: relative; background: var(--fc-white); border: 1px solid var(--fc-gray-200);
    border-radius: 16px; padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem;
}
.landing-package-card.is-featured { border-color: var(--fc-teal); box-shadow: 0 12px 40px rgba(26,188,156,.12); }
.landing-package-badge {
    position: absolute; top: -10px; right: 1rem; background: var(--fc-teal); color: #fff;
    font-size: .6875rem; font-weight: 700; text-transform: uppercase; padding: .25rem .625rem; border-radius: 999px;
}
.landing-package-price strong { font-size: 2rem; font-weight: 800; }
.landing-package-price span { color: var(--fc-gray-500); font-size: .875rem; }
.landing-package-tagline { color: var(--fc-gray-600); font-size: .9375rem; line-height: 1.5; margin: 0; }
.landing-package-benefits { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.package-card-flex { display: flex; flex-direction: column; height: 100%; }
.package-card-cta { margin-top: auto; }
.package-benefits-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.package-benefits-list li,
.landing-package-benefits li { display: flex; gap: .625rem; align-items: flex-start; }
.package-benefit-check { color: #16a34a; font-weight: 800; line-height: 1.35; flex-shrink: 0; }
.package-benefits-list li strong,
.landing-package-benefits li strong { display: block; font-size: .875rem; margin-bottom: .125rem; }
.package-benefits-list li span,
.landing-package-benefits li span { display: block; font-size: .8125rem; color: var(--fc-gray-600); line-height: 1.45; }
.pricing-benefits-detail { list-style: none; padding: 0; margin: 0 0 .5rem; flex: 1; }

/* Sidebar light theme */
.app-sidebar.sidebar-light { color: #0f172a; border-right: 1px solid #e2e8f0; }
.app-sidebar.sidebar-light .app-sidebar-logo { border-bottom-color: #e2e8f0; }
.app-sidebar.sidebar-light .app-nav-section { color: #64748b; }
.app-sidebar.sidebar-light .app-nav-link { color: #475569; }
.app-sidebar.sidebar-light .app-nav-link:hover,
.app-sidebar.sidebar-light .app-nav-link.active { color: #0f172a; background: #f1f5f9; }
.app-sidebar.sidebar-light .app-sidebar-footer { background: inherit; border-top-color: #e2e8f0; }
.app-sidebar.sidebar-light .app-nav-scroll { scrollbar-color: #cbd5e1 #f8fafc; }
.app-sidebar {
    --sidebar-logout-color: #a1a1aa;
    --sidebar-logout-hover-bg: #27272a;
    --sidebar-logout-hover-color: #fff;
}
.app-sidebar.sidebar-light {
    --sidebar-logout-color: #64748b;
    --sidebar-logout-hover-bg: #fee2e2;
    --sidebar-logout-hover-color: #b91c1c;
}

.color-swatch-light { box-shadow: inset 0 0 0 1px #d4d4d8; }

/* Upgrade / pricing detail */
.pricing-benefits-detail { list-style: none; padding: 0; margin: 1rem 0 1.25rem; display: flex; flex-direction: column; gap: .875rem; }
.pricing-benefits-detail li strong { display: block; font-size: .875rem; margin-bottom: .125rem; }
.pricing-benefits-detail li span { display: block; font-size: .8125rem; color: var(--fc-gray-600); line-height: 1.45; }
.promo-redeem-card { border: 1px dashed var(--fc-gray-300); background: var(--fc-gray-50); }
.promo-redeem-title { margin: 0 0 .25rem; font-size: 1.125rem; }
.promo-redeem-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.promo-redeem-form .form-input { flex: 1; min-width: 180px; max-width: 280px; }

/* Landing page */
.landing { overflow: visible; width: 100%; }
.landing-section {
    min-height: auto;
    display: flex;
    align-items: center;
    padding: clamp(4rem, 10vh, 7rem) 0;
    position: relative;
    width: 100%;
}
.landing-hero {
    min-height: 100svh;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, var(--fc-white) 0%, var(--fc-gray-50) 100%);
    padding-top: 5rem;
}
.feature-section,
.feature-section-alt {
    min-height: 100svh;
    padding: clamp(4rem, 8vh, 6rem) 0;
}
.landing-hero-inner { max-width: 720px; }
.landing-logo { height: 80px; width: auto; margin-bottom: 2rem; }
.landing-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.12;
    margin: 0 0 1rem;
    letter-spacing: -.02em;
}
.landing-hero p {
    font-size: 1.125rem;
    color: var(--fc-gray-600);
    margin: 0 auto 2rem;
    max-width: 560px;
    line-height: 1.65;
}
.landing-download-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    margin-top: 2.5rem;
    color: var(--fc-gray-500);
    font-size: .875rem;
    font-weight: 500;
    transition: color .2s, transform .2s;
    animation: bounce-hint 2s ease-in-out infinite;
}
.landing-download-hint:hover { color: var(--fc-teal); }
.landing-download-hint svg { opacity: .7; }
@keyframes bounce-hint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}
.landing-hero-visual { margin-top: 3rem; width: min(520px, 90vw); }
.landing-hero .hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-2 { transition-delay: .2s; }

/* Feature sections */
.feature-section { background: var(--fc-white); }
.feature-section-alt { background: var(--fc-gray-50); }
.feature-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    width: 100%;
    padding-inline: clamp(.5rem, 2vw, 1rem);
}
.feature-split-reverse .feature-copy { order: 2; }
.feature-split-reverse .feature-visual { order: 1; }
.feature-tag {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--fc-teal);
    margin-bottom: 1rem;
}
.feature-copy h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 1rem;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.feature-copy p {
    font-size: 1.0625rem;
    color: var(--fc-gray-600);
    line-height: 1.7;
    margin: 0 0 1.5rem;
}
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.feature-list li {
    padding: .5rem 0 .5rem 1.5rem;
    position: relative;
    color: var(--fc-gray-700);
    font-size: .9375rem;
}
.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--fc-teal);
    border-radius: 50%;
}

/* Mockup frames */
.mockup-frame {
    background: var(--fc-white);
    border: 1px solid var(--fc-gray-200);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.1), 0 4px 16px rgba(0,0,0,.06);
    overflow: hidden;
}
.mockup-bar {
    height: 36px;
    background: var(--fc-gray-100);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border-bottom: 1px solid var(--fc-gray-200);
}
.mockup-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fc-gray-300);
}
.mockup-bar span:first-child { background: #ff5f57; }
.mockup-bar span:nth-child(2) { background: #febc2e; }
.mockup-bar span:nth-child(3) { background: #28c840; }
.mockup-body { padding: 1.25rem; }

/* Hero mockup */
.mock-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1rem; }
.mock-stat { background: var(--fc-gray-50); border-radius: 8px; padding: .75rem; text-align: center; }
.mock-stat small { display: block; font-size: .6875rem; color: var(--fc-gray-500); text-transform: uppercase; letter-spacing: .04em; }
.mock-stat strong { font-size: 1.125rem; }
.mock-chart { display: flex; align-items: flex-end; gap: 8px; height: 100px; padding-top: .5rem; }
.mock-chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--fc-teal), var(--fc-navy));
    border-radius: 4px 4px 0 0;
    animation: grow-bar 1.2s ease forwards;
    transform-origin: bottom;
    transform: scaleY(0);
}
.is-visible .mock-chart-bar { animation: grow-bar 1s ease forwards; }
.is-visible .mock-chart-bar:nth-child(1) { animation-delay: .1s; }
.is-visible .mock-chart-bar:nth-child(2) { animation-delay: .2s; }
.is-visible .mock-chart-bar:nth-child(3) { animation-delay: .3s; }
.is-visible .mock-chart-bar:nth-child(4) { animation-delay: .4s; }
.is-visible .mock-chart-bar:nth-child(5) { animation-delay: .5s; }
.is-visible .mock-chart-bar:nth-child(6) { animation-delay: .6s; }
@keyframes grow-bar { to { transform: scaleY(1); } }

.float-anim { animation: float 4s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Dashboard detail mockup */
.mock-line-chart { height: 120px; margin-bottom: 1rem; }
.mock-line-chart svg { width: 100%; height: 100%; }
.chart-line-anim { stroke-dasharray: 400; stroke-dashoffset: 400; }
.is-visible .chart-line-anim { animation: draw-line 1.5s ease forwards .3s; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.mock-goals { display: flex; flex-direction: column; gap: .75rem; }
.mock-goal span { font-size: .8125rem; font-weight: 600; display: block; margin-bottom: .375rem; }

/* Transaction mockup */
.mock-tx-list { display: flex; flex-direction: column; gap: .5rem; }
.mock-tx {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    background: var(--fc-gray-50);
    border-radius: 10px;
    opacity: 0;
    transform: translateX(-20px);
}
.is-visible .mock-tx-anim { animation: slide-tx .5s ease forwards; animation-delay: calc(var(--i) * 0.12s + 0.2s); }
@keyframes slide-tx { to { opacity: 1; transform: translateX(0); } }
.mock-tx-icon { font-size: 1.25rem; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mock-tx strong { display: block; font-size: .875rem; }
.mock-tx small { color: var(--fc-gray-500); font-size: .75rem; }
.mock-tx-amt { margin-left: auto; font-weight: 700; font-size: .875rem; font-family: ui-monospace, monospace; }
.mock-tx-amt.expense { color: #dc2626; }
.mock-tx-amt.income { color: #16a34a; }

/* Budget mockup */
.mock-budget { display: flex; flex-direction: column; gap: 1rem; }
.mock-budget-head { display: flex; justify-content: space-between; font-size: .8125rem; margin-bottom: .375rem; }
.mock-budget-head span:first-child { font-weight: 600; }
.budget-anim { transition: width 1.2s ease; }
.is-visible .budget-anim { animation: expand-budget 1.2s ease forwards; }
@keyframes expand-budget { from { width: 0 !important; } }
.progress-bar.danger { background: #dc2626; }

/* AI chat mockup */
.mock-ai-chat { display: flex; flex-direction: column; gap: .75rem; min-height: 180px; }
.mock-ai-bubble {
    padding: .875rem 1rem;
    border-radius: 12px;
    font-size: .875rem;
    line-height: 1.5;
    max-width: 90%;
}
.mock-ai-bubble.user { align-self: flex-end; background: var(--fc-black); color: var(--fc-white); }
.mock-ai-bubble.assistant { align-self: flex-start; background: var(--fc-gray-100); border: 1px solid var(--fc-gray-200); }
.reveal-typing { opacity: 0; }
.is-visible .reveal-typing { animation: fade-in .6s ease forwards 1s; }
@keyframes fade-in { to { opacity: 1; } }

/* Subscription mockup */
.mock-subs { display: flex; flex-direction: column; gap: .5rem; }
.mock-sub-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .875rem;
    background: var(--fc-gray-50);
    border-radius: 10px;
    opacity: 0;
    transform: translateY(16px);
}
.is-visible .stagger-anim { animation: stagger-in .5s ease forwards; animation-delay: calc(var(--i) * 0.15s + 0.2s); }
@keyframes stagger-in { to { opacity: 1; transform: translateY(0); } }
.mock-sub-card span:first-child { font-size: 1.5rem; }
.mock-sub-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.mock-sub-icon img { width: 36px; height: 36px; object-fit: contain; display: block; }
.icon-on-light { mix-blend-mode: lighten; }
.mock-tx-icon img { width: 28px; height: 28px; object-fit: contain; display: block; }
.mock-sub-card strong { display: block; font-size: .875rem; }
.mock-sub-card small { color: var(--fc-gray-500); font-size: .75rem; }
.mock-sub-total { text-align: right; padding-top: .75rem; font-size: .875rem; color: var(--fc-gray-600); border-top: 1px solid var(--fc-gray-200); margin-top: .5rem; }

/* Team mockup */
.mock-team { display: flex; flex-direction: column; gap: .5rem; }
.mock-member {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    background: var(--fc-gray-50);
    border-radius: 10px;
    opacity: 0;
    transform: translateY(16px);
}
.mock-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fc-navy);
    color: var(--fc-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
}
.mock-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--fc-white);
    box-shadow: 0 0 0 1px var(--fc-gray-200);
}
.mock-member strong { display: block; font-size: .875rem; }
.mock-member small { color: var(--fc-gray-500); font-size: .75rem; }
.mock-invite-btn {
    text-align: center;
    padding: .75rem;
    border: 2px dashed var(--fc-gray-300);
    border-radius: 10px;
    color: var(--fc-gray-500);
    font-size: .875rem;
    margin-top: .25rem;
}

.slide-in-right { transform: translateX(40px); opacity: 0; transition: all .8s ease; }
.slide-in-left { transform: translateX(-40px); opacity: 0; transition: all .8s ease; }
.is-visible .slide-in-right, .is-visible .slide-in-left { transform: translateX(0); opacity: 1; }
.pulse-border { transition: box-shadow .8s ease; }
.is-visible .pulse-border { animation: pulse-shadow 2s ease infinite; }
@keyframes pulse-shadow {
    0%, 100% { box-shadow: 0 20px 60px rgba(26,188,156,.1); }
    50% { box-shadow: 0 20px 60px rgba(26,188,156,.25); }
}

/* Download section */
.landing-download {
    min-height: min(88vh, 920px);
    justify-content: center;
    text-align: center;
}
.landing-download:not(.landing-graph-grid-dark) {
    background: var(--fc-black);
    color: var(--fc-white);
}
.landing-download-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}
.landing-download-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 .75rem;
    color: #f8fafc;
}
.landing-download-header p {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #cbd5e1;
    max-width: 560px;
    margin-inline: auto;
}
.landing-download-stores {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}
.landing-download-notify {
    width: 100%;
    max-width: 520px;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(6px);
}
.landing-download-notify .form-label { color: #e2e8f0; }
.landing-download-logo { height: 72px; margin-bottom: 1.5rem; }

/* Reviews */
.landing-reviews { background: var(--fc-gray-50); }
.landing-reviews-header { text-align: center; max-width: 560px; margin: 0 auto 2.5rem; }
.landing-reviews-header h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; margin: 0 0 .75rem; }
.landing-reviews-header p { color: var(--fc-gray-600); margin: 0; line-height: 1.6; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.review-card {
    background: var(--fc-white); border: 1px solid var(--fc-gray-200);
    border-radius: 16px; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
    opacity: 0; transform: translateY(16px);
}
.review-stars { color: #f59e0b; letter-spacing: .1em; font-size: .875rem; }
.review-card p { margin: 0; color: var(--fc-gray-700); line-height: 1.6; font-size: .9375rem; flex: 1; }
.review-card footer { display: flex; align-items: center; gap: .75rem; }
.review-card footer strong { display: block; font-size: .875rem; }
.review-card footer small { color: var(--fc-gray-500); font-size: .75rem; }

/* Contact */
.landing-contact-inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
    max-width: 960px; margin: 0 auto;
}
.landing-contact-copy h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; margin: 0 0 .75rem; }
.landing-contact-copy p { color: var(--fc-gray-600); line-height: 1.6; margin: 0 0 1.5rem; }
.contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .75rem; }
.contact-list li { font-size: .9375rem; color: var(--fc-gray-600); }
.contact-list a { color: var(--fc-teal); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-form { padding: 1.5rem; }
.download-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.store-btn {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    background: var(--fc-gray-900);
    border: 1px solid var(--fc-gray-700);
    border-radius: 12px;
    color: var(--fc-white);
    transition: border-color .2s, transform .2s;
    text-align: left;
}
.store-btn:hover { border-color: var(--fc-teal); transform: translateY(-2px); }
.store-btn small { display: block; font-size: .6875rem; color: var(--fc-gray-400); }
.store-btn strong { font-size: 1rem; }
.download-notify-form { text-align: left; max-width: 480px; margin: 0 auto; }
.download-notify-form .form-label { color: var(--fc-gray-400); }
.download-notify-row {
    display: flex;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.download-notify-row .form-input {
    flex: 1;
    min-width: 0;
    background: var(--fc-gray-900);
    border: none;
    border-radius: 0;
    color: var(--fc-white);
    padding: .75rem 1rem;
}
.download-notify-row .form-input::placeholder { color: var(--fc-gray-500); }
.download-notify-row .form-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(26,188,156,.35);
}
.btn-notify-cta {
    flex-shrink: 0;
    white-space: nowrap;
    border: none;
    border-radius: 0;
    padding: 0 1.25rem;
    font-weight: 700;
    font-size: .875rem;
    background: #1abc9c;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.btn-notify-cta:hover { background: #16a085; }
.header-admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(26,188,156,.12);
    color: #1abc9c;
    border: 1px solid rgba(26,188,156,.35);
    transition: background .15s, transform .15s;
}
.header-admin-link:hover { background: rgba(26,188,156,.22); transform: scale(1.04); }

/* Final CTA */
.landing-cta {
    min-height: 50vh;
    background: var(--fc-white);
    text-align: center;
}
.landing-cta h2 { font-size: 2rem; font-weight: 800; margin: 0 0 .75rem; }
.landing-cta p { color: var(--fc-gray-600); margin: 0 0 1.5rem; font-size: 1.0625rem; }

/* Legacy landing (kept for preview etc.) */
.hero { padding: 4rem 0; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; margin: 0 0 1rem; }
.hero p { font-size: 1.125rem; color: var(--fc-gray-600); max-width: 600px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.features { padding: 4rem 0; background: var(--fc-white); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.feature-card { padding: 1.5rem; border: 1px solid var(--fc-gray-200); border-radius: var(--fc-radius); }
.feature-card h3 { margin: 0 0 .5rem; font-size: 1.125rem; }
.feature-card p { margin: 0; color: var(--fc-gray-600); font-size: .9375rem; }
.feature-icon { width: 40px; height: 40px; background: var(--fc-black); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.feature-icon svg { width: 20px; height: 20px; stroke: white; fill: none; }

/* Auth */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-brand {
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
    color: var(--fc-white);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100vh;
}
.auth-brand-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.auth-brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.82) 100%);
}
.auth-brand-content {
    position: relative;
    z-index: 1;
    padding: 3rem;
    max-width: 520px;
}
.auth-brand h2 { font-size: 2rem; font-weight: 800; margin: 1.5rem 0 .75rem; }
.auth-brand p { color: rgba(255,255,255,.82); font-size: 1rem; line-height: 1.6; margin: 0; }
.auth-brand .auth-logo { filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-form { width: min(400px, 100%); }
.auth-form h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 .5rem; }
.auth-form .subtitle { color: var(--fc-gray-500); margin-bottom: 1.5rem; font-size: .9375rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--fc-gray-400); font-size: .8125rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--fc-gray-200); }

.auth-locale-widget {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1200;
}
.auth-locale-widget-trigger {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--fc-gray-300);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--fc-gray-800);
    cursor: pointer;
}
.auth-locale-widget-panel {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    min-width: 180px;
    padding: .75rem;
    border-radius: 12px;
    border: 1px solid var(--fc-gray-200);
    background: var(--fc-white);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.auth-locale-widget-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--fc-gray-500);
    margin-bottom: .5rem;
}
.auth-locale-widget-options {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.auth-locale-widget-option {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .5rem .65rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    font-size: .875rem;
    cursor: pointer;
}
.auth-locale-widget-option:hover,
.auth-locale-widget-option.is-active {
    background: var(--fc-gray-100);
    border-color: var(--fc-gray-200);
}
.auth-demo-accounts {
    margin-top: 1.25rem;
    padding: .875rem 1rem;
    border-radius: 10px;
    border: 1px dashed var(--fc-gray-300);
    background: var(--fc-gray-50);
    font-size: .8125rem;
    color: var(--fc-gray-600);
}
.auth-demo-accounts summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--fc-gray-800);
}
.auth-demo-accounts ul {
    margin: .75rem 0 0;
    padding-left: 1.1rem;
}
.auth-demo-accounts li + li { margin-top: .35rem; }
.auth-demo-accounts code {
    font-size: .75rem;
    background: var(--fc-white);
    padding: .1rem .35rem;
    border-radius: 4px;
}

/* Preview mockup */
.preview-mockup { background: var(--fc-gray-100); border-radius: var(--fc-radius); padding: 1rem; border: 1px solid var(--fc-gray-200); }
.preview-screen { background: var(--fc-white); border-radius: 8px; overflow: hidden; border: 1px solid var(--fc-gray-200); }
.preview-bar { height: 32px; background: var(--fc-gray-100); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.preview-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fc-gray-300); }

/* Chart container */
.chart-container { position: relative; height: 280px; }

/* AI chat */
.ai-chat { display: flex; flex-direction: column; height: 500px; }
.ai-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.ai-message { max-width: 80%; padding: .875rem 1rem; border-radius: 12px; font-size: .9375rem; }
.ai-message.user { align-self: flex-end; background: var(--fc-black); color: var(--fc-white); }
.ai-message.assistant { align-self: flex-start; background: var(--fc-gray-100); border: 1px solid var(--fc-gray-200); }
.ai-input-bar { display: flex; gap: .5rem; padding: 1rem; border-top: 1px solid var(--fc-gray-200); }

/* Grid utilities */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gap-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.text-muted { color: var(--fc-gray-500); }
.text-sm { font-size: .875rem; }
.text-right { text-align: right; }
.font-mono { font-family: ui-monospace, monospace; }

/* Responsive */
@media (max-width: 768px) {
    .auth-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .auth-brand { min-height: 240px; }
    .auth-brand-content { padding: 1.5rem; }
    .auth-brand h2 { font-size: 1.5rem; margin-top: 1rem; }
    .auth-brand p { font-size: .875rem; }
    .app-sidebar { transform: translateX(-100%); z-index: 320; }
    .app-sidebar.open { transform: translateX(0); }
    .sidebar-overlay { z-index: 310; }
    .sidebar-overlay.open { display: block; }
    .sidebar-toggle { display: block; }
    .app-main { margin-left: 0; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; gap: .75rem; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.5rem; }
    .app-content { padding: 1rem; }
    .app-header {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
        padding: .65rem .85rem;
    }
    .app-header-left,
    .app-header-right {
        width: 100%;
        min-width: 0;
    }
    .app-header-left h1 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
        min-width: 0;
    }
    .app-header-right {
        flex-wrap: wrap;
        gap: .4rem;
        justify-content: flex-end;
    }
    .workspace-switcher {
        flex: 1 1 100%;
        order: -1;
        margin: 0;
    }
    .workspace-switcher-select {
        width: 100%;
        max-width: none;
    }
    .header-user-chip {
        gap: .35rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .plan-badge {
        font-size: .625rem;
        padding: .2rem .4rem;
    }
    .header-notify-btn,
    .header-admin-link {
        width: 34px;
        height: 34px;
    }
    .header-avatar {
        width: 32px;
        height: 32px;
    }
    .feature-split, .feature-split-reverse { grid-template-columns: 1fr; gap: 2rem; }
    .feature-split-reverse .feature-copy, .feature-split-reverse .feature-visual { order: unset; }
    .landing-section { min-height: auto; padding: 4rem 0 3rem; }
    .landing-hero { min-height: 100svh; padding-top: 1rem; }
    .landing-hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
    .landing-hero p { font-size: 1rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
    .download-notify-row { flex-direction: column; border-radius: 10px; }
    .download-notify-row .form-input { border-radius: 10px 10px 0 0; }
    .btn-notify-cta { border-radius: 0 0 10px 10px; width: 100%; padding: .75rem 1rem; }
    .guest-nav { flex-wrap: wrap; }
    .guest-nav-toggle { display: flex; order: 2; margin-left: auto; }
    .guest-nav-links { order: 3; }
    .guest-nav-menu {
        order: 4; width: 100%; flex-direction: column; align-items: stretch;
        display: none; gap: 0; padding: .5rem 0 0; border-top: 1px solid var(--fc-gray-200);
        max-height: none; overflow: visible;
    }
    .guest-nav-menu.is-open { display: flex; }
    .guest-nav-menu a {
        padding: .75rem 0; border-bottom: 1px solid var(--fc-gray-100);
        white-space: normal;
    }
    .guest-nav-download { display: none; }
    .landing-contact-inner { grid-template-columns: 1fr; gap: 2rem; }
    .reviews-grid { grid-template-columns: 1fr; }
    .guest-footer-inner { flex-direction: column; align-items: flex-start; }
    .floating-ai { bottom: 1rem; right: 1rem; }
    .floating-ai-panel { width: min(340px, calc(100vw - 2rem)); }
    .nav-logo { height: 34px; }
    .landing-logo { height: 64px; }
}

/* Dark theme */
body.theme-light {
    --fc-gray-50: #fafafa;
    --fc-gray-100: #f4f4f5;
    --fc-gray-200: #e4e4e7;
    --fc-gray-300: #d4d4d8;
    --fc-gray-400: #a1a1aa;
    --fc-gray-500: #71717a;
    --fc-gray-600: #52525b;
    --fc-gray-700: #3f3f46;
    --fc-gray-800: #27272a;
    --fc-gray-900: #18181b;
    --fc-white: #ffffff;
    --fc-black: #0a0a0a;
    background: #ffffff;
    color: #0a0a0a;
}
body.theme-light .card,
body.theme-light .app-header,
body.theme-light .form-input,
body.theme-light .form-select,
body.theme-light .guest-nav {
    background: #ffffff;
    border-color: #e4e4e7;
    color: #0a0a0a;
}
body.theme-light .btn-primary { background: #0a0a0a; color: #ffffff; }
body.theme-light .btn-outline { border-color: #d4d4d8; color: #0a0a0a; }
body.theme-light .table tr:hover td { background: #f4f4f5; }

/* Dark theme — softened charcoal palette (not pure black) */
body.theme-dark {
    --fc-gray-50: #16161a;
    --fc-gray-100: #1e1e24;
    --fc-gray-200: #2a2a32;
    --fc-gray-300: #3a3a44;
    --fc-gray-400: #6b7280;
    --fc-gray-500: #9ca3af;
    --fc-gray-600: #d1d5db;
    --fc-gray-700: #e5e7eb;
    --fc-gray-800: #f3f4f6;
    --fc-gray-900: #f9fafb;
    --fc-white: #1e1e24;
    --fc-black: #f4f4f5;
    background: #16161a;
    color: #f4f4f5;
}
body.theme-dark .card,
body.theme-dark .app-header,
body.theme-dark .form-input,
body.theme-dark .form-textarea,
body.theme-dark .form-select {
    background: #1e1e24;
    border-color: #2a2a32;
    color: #f4f4f5;
}
body.theme-dark .form-input::placeholder,
body.theme-dark .form-textarea::placeholder {
    color: #6b7280;
    opacity: 1;
}
body.theme-dark .card-header { border-bottom-color: #2a2a32; }
body.theme-dark .table th { color: #9ca3af; }
body.theme-dark .table td { border-bottom-color: #2a2a32; }
body.theme-dark .table tr:hover td { background: #2a2a32; }
body.theme-dark .btn-primary { background: #f4f4f5; color: #16161a; }
body.theme-dark .btn-primary:hover { background: #e5e7eb; }
body.theme-dark .btn-outline { border-color: #3a3a44; color: #f4f4f5; }
body.theme-dark .btn-outline:hover { border-color: #9ca3af; background: #2a2a32; }
body.theme-dark .btn-ghost { color: #9ca3af; }
body.theme-dark .btn-ghost:hover { color: #f4f4f5; background: #2a2a32; }
body.theme-dark .progress { background: #2a2a32; }
body.theme-dark .progress-bar { background: var(--fc-chart-color, #1abc9c); }
body.theme-dark .app-main,
body.theme-dark .app-content,
body.theme-dark .guest-main,
body.theme-dark .modal-content,
body.theme-dark .floating-ai-panel,
body.theme-dark .demo-dashboard-frame {
    background: #16161a;
    color: #f4f4f5;
}
body.theme-dark .guest-footer,
body.theme-dark .alert {
    background: #1e1e24;
    color: #f4f4f5;
}
body.theme-dark .alert-success { background: rgba(22, 101, 52, 0.2); border-color: rgba(74, 222, 128, 0.35); color: #86efac; }
body.theme-dark .alert-error { background: rgba(127, 29, 29, 0.25); border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
body.theme-dark .text-muted { color: #9ca3af !important; }
body.theme-dark .form-label { color: #d1d5db; }
body.theme-dark .form-hint { color: #6b7280; }
body.theme-dark .guest-nav { background: #1e1e24; border-color: #2a2a32; }
body.theme-dark .guest-nav a { color: #d1d5db; }
body.theme-dark .guest-nav a:hover { color: #f9fafb; }
body.theme-dark .badge-neutral { background: #2a2a32; color: #d1d5db; }
body.theme-dark .badge-success { background: rgba(22, 101, 52, 0.25); color: #86efac; }
body.theme-dark .badge-warning { background: rgba(133, 77, 14, 0.25); color: #fde047; }
body.theme-dark .badge-danger { background: rgba(127, 29, 29, 0.25); color: #fca5a5; }
body.theme-dark .onboarding-page { background: #16161a; }
body.theme-dark .onboarding-card { background: #1e1e24; border-color: #2a2a32; color: #f4f4f5; }
body.theme-dark .dashboard-empty {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.14), #1e1e24);
    border-color: rgba(26, 188, 156, 0.35);
}
body.theme-dark .dashboard-empty h2 { color: #f4f4f5; }
body.theme-dark .chart-empty-state { color: #9ca3af; }
body.theme-dark .demo-chart-placeholder { background: #1e1e24; border-color: #2a2a32; }
body.theme-dark .donation-qr-placeholder { border-color: #3a3a44; color: #9ca3af; }
body.theme-dark .api-docs-box { background: #1e1e24 !important; border-color: #2a2a32 !important; }

/* Floating AI */
.floating-ai { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000; }
.floating-ai-btn:hover { transform: scale(1.08); }
.floating-ai-panel {
    display: none; position: absolute; bottom: 70px; right: 0; width: min(360px, calc(100vw - 2rem));
    background: var(--fc-white); border: 1px solid var(--fc-gray-200); border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.15); overflow: hidden;
}
.floating-ai-panel.open { display: flex; flex-direction: column; }
.floating-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--fc-gray-200);
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--fc-white);
    flex-shrink: 0;
}
.floating-ai-messages { max-height: 320px; overflow-y: auto; padding: 1.25rem 1rem 1rem; display: flex; flex-direction: column; gap: .75rem; }
.floating-ai-input { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--fc-gray-200); }

/* Filters */
.filter-panel { display: none; }
.filter-panel.open { display: block; }
.filter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.filter-toggle.active { color: var(--fc-teal); border-color: var(--fc-teal); }

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}
.settings-grid > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    width: 100%;
}
.settings-grid > .card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.5rem;
}
.settings-grid > .card .card-body > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.settings-grid > .card .card-body > form > .btn-primary,
.settings-grid > .card .card-body > form > .btn-danger,
.settings-grid > .card .card-body > form > button[type="submit"]:last-child {
    margin-top: auto;
}
.settings-grid > .card.settings-danger-zone {
    grid-column: 1 / -1;
}
.settings-card-intro {
    margin: 0 0 1rem;
    line-height: 1.45;
}
.settings-check-row {
    color: var(--fc-gray-700);
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 0 0 .65rem;
    font-size: .875rem;
    line-height: 1.4;
    cursor: pointer;
}
body.theme-dark .settings-check-row { color: #d4d4d8; }
.settings-grid > .card .card-header {
    padding: .875rem 1.5rem;
}
.settings-grid > .card .form-group:last-of-type {
    margin-bottom: 1rem;
}
.input-with-copy { display: flex; gap: .5rem; align-items: stretch; }
.input-with-copy .form-input { flex: 1; min-width: 0; }
.input-with-copy .copy-btn { flex-shrink: 0; }
.color-picker-grid { display: flex; flex-wrap: wrap; gap: .6rem; }
.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.06); }
.color-swatch.active {
    border-color: var(--fc-teal);
    box-shadow: 0 0 0 2px var(--fc-white), 0 0 0 4px var(--fc-teal);
}
.color-swatch input { display: none; }
.color-swatch-check {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    opacity: 0;
    background: rgba(255, 255, 255, .18);
    pointer-events: none;
    transition: opacity .15s ease;
}
.color-swatch.active .color-swatch-check { opacity: 1; }
.admin-layout-root .color-swatch.active,
body.theme-dark .color-swatch.active {
    box-shadow: 0 0 0 2px #1e1e24, 0 0 0 4px var(--fc-teal);
}

/* Profile */
.profile-avatar-lg { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--fc-gray-200); }
.sidebar-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.sidebar-user { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }

/* Accounts */
.account-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--fc-gray-200); }
.account-card:last-child { border-bottom: none; }
.account-card-icon { font-size: 1.75rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.pricing-card { text-align: center; }
.pricing-current { border-color: var(--fc-teal); box-shadow: 0 0 0 2px var(--fc-teal); }
.pricing-price { font-size: 2rem; font-weight: 800; margin: .5rem 0; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--fc-gray-500); }

/* Onboarding */
.onboarding-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--fc-gray-50); }
.onboarding-card { width: min(480px, 100%); background: var(--fc-white); border: 1px solid var(--fc-gray-200); border-radius: 16px; padding: 2rem; box-shadow: var(--fc-shadow); }
.onboarding-logo { height: 64px; display: block; margin: 0 auto 1.5rem; }
.onboarding-card h1 { text-align: center; font-size: 1.5rem; margin: 0 0 .5rem; }

/* Logo / branding */
.brand-logo {
    display: block;
    object-fit: contain;
    background: transparent;
    max-width: 100%;
}
.nav-logo { height: 44px; width: auto; }
.brand-logo--large,
.landing-logo { height: 80px; width: auto; margin-bottom: 2rem; }
.landing-download-logo { height: 72px; width: auto; margin-bottom: 1.5rem; }
.sidebar-logo { height: 36px; width: auto; }
.auth-logo { height: 56px; width: auto; }
.onboarding-logo { height: 64px; width: auto; display: block; margin: 0 auto 1.5rem; }
.demo-brand-logo { height: 32px; width: auto; }
.onboarding-logo-wrap { display: flex; justify-content: center; }

/* Service icons (subscription / transaction mockups) */
.service-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
    overflow: hidden;
}
.service-icon-img {
    width: 88%;
    height: 88%;
    object-fit: contain;
    display: block;
}
.service-icon-logo {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.service-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.mock-sub-icon .service-icon-wrap,
.mock-sub-icon .service-icon-logo,
.mock-tx-icon .service-icon-wrap { width: 36px; height: 36px; }
.demo-tx-row .service-icon-wrap,
.demo-sub-row .service-icon-wrap,
.demo-sub-row .service-icon-logo { width: 38px; height: 38px; }

/* Settings danger zone */
.settings-danger-zone { border-color: #fecaca; }
.settings-danger-zone .card-header { color: #dc2626; background: #fef2f2; border-bottom-color: #fecaca; }
.delete-confirm-check { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; color: #7f1d1d; margin-top: .75rem; }
.btn-danger {
    background: #dc2626; color: #fff; border: 1px solid #dc2626;
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.form-error { color: #dc2626; font-size: .8125rem; margin-top: .25rem; }

/* Password toggle */
.password-field { position: relative; }
.password-field .form-input { padding-right: 2.75rem; }
.password-toggle {
    position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--fc-gray-500);
    padding: .25rem; font-size: 1rem; line-height: 1;
}
.password-toggle:hover { color: var(--fc-gray-900); }

/* Social auth */
.social-auth { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .5rem; }
.social-btn {
    display: flex; align-items: center; justify-content: center; gap: .625rem;
    padding: .625rem 1rem; border: 1px solid var(--fc-gray-300); border-radius: 8px;
    font-size: .875rem; font-weight: 600; transition: all .15s;
}
.social-btn:hover { border-color: var(--fc-black); background: var(--fc-gray-50); }
.social-btn i { font-size: 1.125rem; width: 1.25rem; text-align: center; }

/* Transaction search */
.tx-search-bar {
    display: flex; gap: .5rem; padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--fc-gray-200); background: var(--fc-white);
}
.tx-search-bar .form-input { flex: 1; }
.tx-search-bar .search-icon { color: var(--fc-gray-400); align-self: center; padding-left: .25rem; }

/* Support chat */
.support-chat { display: flex; flex-direction: column; gap: 1rem; }
.support-ticket { border: 1px solid var(--fc-gray-200); border-radius: var(--fc-radius); overflow: hidden; }
.support-ticket-header { padding: 1rem 1.25rem; background: var(--fc-gray-50); border-bottom: 1px solid var(--fc-gray-200); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.support-replies { padding: 1rem; display: flex; flex-direction: column; gap: .75rem; max-height: 400px; overflow-y: auto; }
.support-reply { padding: .875rem 1rem; border-radius: 12px; font-size: .9375rem; max-width: 85%; white-space: pre-wrap; }
.support-reply.user { align-self: flex-end; background: var(--fc-black); color: var(--fc-white); }
.support-reply.ai, .support-reply.admin { align-self: flex-start; background: var(--fc-gray-100); border: 1px solid var(--fc-gray-200); }
.support-reply.ai { border-left: 3px solid var(--fc-teal); }
.support-reply-form { padding: 1rem; border-top: 1px solid var(--fc-gray-200); display: flex; gap: .5rem; }

/* Icon thumbnails on light backgrounds - legacy */
.icon-thumb {
    width: 32px; height: 32px; object-fit: contain; display: block;
    background: #fff; border-radius: 8px; padding: 3px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.mock-sub-icon .icon-thumb { width: 34px; height: 34px; }

/* Demo dashboard embed */
.demo-dashboard-embed { margin-bottom: 1rem; }
.demo-dashboard-frame {
    display: grid; grid-template-columns: 220px 1fr; min-height: 420px;
    border: 1px solid var(--fc-gray-200); border-radius: 16px; overflow: hidden;
    background: var(--fc-white); box-shadow: var(--fc-shadow);
}
.demo-dashboard-sidebar {
    background: #0a0a0a; color: #fafafa; display: flex; flex-direction: column;
    padding: 1rem 0; border-right: 1px solid #27272a;
}
.demo-dashboard-brand { padding: 0 1rem 1rem; font-weight: 800; font-size: 1rem; }
.demo-dashboard-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; overflow-y: auto; direction: rtl; scrollbar-width: thin; scrollbar-color: #3f3f46 #18181b; }
.demo-dashboard-nav > * { direction: ltr; }
.demo-nav-item {
    display: flex; align-items: center; gap: .625rem; padding: .625rem 1rem;
    background: none; border: none; color: #a1a1aa; font: inherit; font-size: .8125rem;
    text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.demo-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.demo-nav-item:hover, .demo-nav-item.is-active { background: #27272a; color: #fff; }
.demo-dashboard-note { padding: .75rem 1rem 0; font-size: .6875rem; color: #71717a; }
.demo-dashboard-main { padding: 1.25rem 1.5rem; background: var(--fc-gray-50); }
.demo-dashboard-main h3 { margin: 0 0 1rem; font-size: 1.125rem; }
.demo-panel { display: none; }
.demo-panel.is-active { display: block; animation: fade-in .3s ease; }
.demo-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1rem; }
.demo-stat { background: var(--fc-white); border: 1px solid var(--fc-gray-200); border-radius: 10px; padding: .875rem; }
.demo-stat small { display: block; color: var(--fc-gray-500); font-size: .75rem; }
.demo-stat strong { font-size: 1.125rem; }
.demo-chart-placeholder { display: flex; align-items: flex-end; gap: .5rem; height: 140px; padding: 1rem; background: var(--fc-white); border: 1px solid var(--fc-gray-200); border-radius: 10px; }
.demo-chart-bar { flex: 1; background: linear-gradient(180deg, var(--fc-teal), #148f77); border-radius: 4px 4px 0 0; min-height: 12px; }
.demo-tx-list, .demo-sub-list, .demo-budget-list { display: flex; flex-direction: column; gap: .5rem; }
.demo-tx-row, .demo-sub-row { display: flex; align-items: center; gap: .75rem; padding: .75rem; background: var(--fc-white); border: 1px solid var(--fc-gray-200); border-radius: 10px; }
.demo-tx-row strong, .demo-sub-row strong { display: block; font-size: .875rem; }
.demo-tx-row small, .demo-sub-row small { color: var(--fc-gray-500); font-size: .75rem; }
.demo-tx-row span.expense { margin-left: auto; color: #dc2626; font-weight: 600; }
.demo-tx-row span.income { margin-left: auto; color: #16a34a; font-weight: 600; }
.demo-sub-row span:last-child { margin-left: auto; font-weight: 600; }
.demo-budget-row { background: var(--fc-white); border: 1px solid var(--fc-gray-200); border-radius: 10px; padding: .75rem; }
.demo-budget-head { display: flex; justify-content: space-between; font-size: .875rem; margin-bottom: .5rem; }
.demo-dashboard-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }

/* Dashboard empty state */
.dashboard-empty { padding: 1.25rem 1.5rem; background: linear-gradient(135deg, #f0fdf9, #fff); border-color: #99f6e4; }
.dashboard-empty-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dashboard-empty-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.chart-empty-state { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1200;
    display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-dialog {
    width: min(480px, 100%); max-height: 90vh; overflow-y: auto;
    background: var(--fc-white); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--fc-gray-200); }
.modal-header h2 { margin: 0; font-size: 1.125rem; }
.modal-tabs { display: flex; border-bottom: 1px solid var(--fc-gray-200); }
.modal-tab {
    flex: 1; padding: .75rem; border: none; background: none; font: inherit;
    font-size: .875rem; font-weight: 600; color: var(--fc-gray-500); cursor: pointer;
}
.modal-tab.is-active { color: var(--fc-black); box-shadow: inset 0 -2px 0 var(--fc-teal); }
.modal-body { padding: 1.25rem; }
.modal-tab-panel { display: none; }
.modal-tab-panel.is-active { display: block; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--fc-gray-200);
}
.settings-payment-status {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .75rem 0;
}
body.theme-dark .modal-dialog { background: #1e1e24; }
body.theme-dark .modal-header,
body.theme-dark .modal-tabs,
body.theme-dark .modal-footer { border-color: #2a2a32; }
body.theme-dark .modal-tab { color: #9ca3af; }
body.theme-dark .modal-tab.is-active { color: #f4f4f5; }
.ai-tx-preview { margin-top: 1rem; }
.ai-tx-card { padding: 1rem; background: var(--fc-gray-50); border: 1px solid var(--fc-gray-200); border-radius: 10px; }
.ai-tx-card p { margin: .5rem 0 .75rem; font-size: .875rem; }
.ai-tx-suggest p { margin: .35rem 0 .5rem; font-size: .8125rem; }

/* AI import batch review */
.ai-import-batch {
    padding: .75rem !important;
    border: 1px solid var(--fc-gray-200);
    border-radius: 12px;
    background: var(--fc-gray-50);
    max-width: 100%;
}
.ai-import-batch-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .35rem;
}
.ai-import-hint { margin: 0 0 .65rem; line-height: 1.4; }
.ai-import-batch-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .75rem;
    padding-right: .15rem;
}
.ai-import-row {
    border: 1px solid var(--fc-gray-200);
    border-radius: 10px;
    background: var(--fc-white);
    padding: .5rem .65rem;
}
.ai-import-row-view {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
}
.ai-import-row-summary {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
    flex: 1;
}
.ai-import-row-type {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--fc-gray-500);
}
.ai-import-row-amount { font-weight: 700; font-size: .875rem; }
.ai-import-row-desc {
    font-size: .8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ai-import-row-btns {
    display: flex;
    gap: .15rem;
    flex-shrink: 0;
}
.ai-import-row-form { margin-top: .5rem; }
.ai-import-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}
.ai-import-form-grid .form-label { font-size: .75rem; margin-bottom: .15rem; }
.ai-import-form-grid label:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ai-import-form-actions {
    display: flex;
    gap: .35rem;
    margin-top: .5rem;
}
.ai-import-batch-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: .25rem;
    border-top: 1px solid var(--fc-gray-200);
}
body.theme-dark .ai-import-batch { background: #2a2a32; border-color: #3a3a44; }
body.theme-dark .ai-import-row { background: #1e1e24; border-color: #3a3a44; }
body.theme-dark .ai-import-batch-actions { border-top-color: #3a3a44; }

/* Enhanced pricing */
.upgrade-hero { text-align: center; margin-bottom: 2rem; }
.upgrade-hero h2 { margin: 0 0 .5rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.billing-toggle {
    display: inline-flex; gap: .25rem; margin-top: 1rem; padding: .25rem;
    background: var(--fc-gray-100); border-radius: 999px; border: 1px solid var(--fc-gray-200);
}
.billing-toggle-btn {
    border: none; background: transparent; padding: .5rem 1rem; border-radius: 999px;
    font: inherit; font-size: .875rem; font-weight: 600; color: var(--fc-gray-600); cursor: pointer;
}
.billing-toggle-btn.is-active { background: var(--fc-white); color: var(--fc-black); box-shadow: var(--fc-shadow); }
.billing-save { font-size: .6875rem; color: var(--fc-teal); font-weight: 700; margin-left: .25rem; }
.pricing-grid-enhanced { align-items: stretch; }
.pricing-card-enhanced { position: relative; display: flex; flex-direction: column; height: 100%; }
.pricing-card-enhanced .card-body { display: flex; flex-direction: column; flex: 1; }
.pricing-benefits-detail li { display: flex; gap: .625rem; align-items: flex-start; margin-bottom: .75rem; }
.team-row {
    display: flex; justify-content: space-between; align-items: center; gap: .75rem;
    padding: .75rem 0; border-bottom: 1px solid var(--fc-gray-200);
}
.team-row-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.team-role-form .form-select-sm { min-width: 110px; }
.workspace-switcher { margin-right: .75rem; }
.workspace-switcher-select {
    background: var(--fc-gray-100); border: 1px solid var(--fc-gray-200); border-radius: 8px;
    padding: .4rem .65rem; font-size: .8125rem; max-width: 220px;
}
body.theme-dark .workspace-switcher-select {
    background: #27272a; border-color: #3f3f46; color: #fafafa;
}
.admin-chart-card canvas { min-height: 220px; }
.pricing-featured { border-color: var(--fc-teal); box-shadow: 0 0 0 1px var(--fc-teal); transform: translateY(-4px); }
.pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--fc-teal); color: #fff; font-size: .6875rem; font-weight: 700;
    padding: .25rem .75rem; border-radius: 999px; white-space: nowrap;
}
.pricing-badge-current { background: var(--fc-gray-900); }
.pricing-card-enhanced h3 { margin: .5rem 0; font-size: 1.25rem; }
.pricing-description { color: var(--fc-gray-600); font-size: .875rem; min-height: 2.5rem; }
.pricing-features { list-style: none; padding: 0; margin: 1rem 0; flex: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; padding: .35rem 0; color: var(--fc-gray-700); }
.pricing-features svg { color: #16a34a; flex-shrink: 0; margin-top: .15rem; }

/* Floating AI button with new icon */
.floating-ai-btn {
    width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--fc-teal), #148f77);
    box-shadow: 0 4px 20px rgba(26,188,156,.35);
    display: flex; align-items: center; justify-content: center; transition: transform .2s;
    overflow: hidden;
}
.floating-ai-btn img { width: 30px; height: 30px; object-fit: contain; filter: brightness(0) invert(1); }

@media (max-width: 768px) {
    .filter-grid { grid-template-columns: 1fr; }
    .floating-ai-panel { right: -1rem; }
    .feature-section, .feature-section-alt { min-height: auto; }
    .demo-dashboard-frame { grid-template-columns: 1fr; min-height: auto; }
    .demo-dashboard-sidebar { border-right: none; border-bottom: 1px solid #27272a; }
    .demo-dashboard-nav { flex-direction: row; overflow-x: auto; padding: 0 .5rem .5rem; }
    .demo-nav-item { white-space: nowrap; border-radius: 8px; }
    .dashboard-empty-inner { flex-direction: column; align-items: flex-start; }
}

/* Header user chip & plan badge */
.app-header-left { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.app-header-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.header-user-chip { display: flex; align-items: center; gap: .75rem; direction: ltr; }
.header-user-link {
    display: flex; flex-direction: row; align-items: center; gap: .625rem;
    text-decoration: none; color: inherit;
    padding: .25rem .5rem; border-radius: 999px; transition: background .15s;
}
.header-user-name { order: 1; font-size: .875rem; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-avatar { order: 2; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--fc-gray-200); flex-shrink: 0; }
.header-user-link:hover { background: var(--fc-gray-100); }
.header-notifications { position: relative; }
.header-notify-btn {
    position: relative; width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--fc-gray-200); background: var(--fc-white); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; color: var(--fc-gray-700);
}
.header-notify-btn:hover { border-color: var(--fc-teal); color: var(--fc-teal); }
.header-notify-badge {
    position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 999px; background: #dc2626; color: #fff; font-size: .6875rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.header-notify-panel {
    display: none; position: absolute; right: 0; top: calc(100% + .5rem); width: min(360px, 90vw);
    background: var(--fc-white); border: 1px solid var(--fc-gray-200); border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.12); z-index: 400; max-height: 420px; overflow: hidden;
}
.header-notify-panel.open { display: flex; flex-direction: column; }
.header-notify-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--fc-gray-200); }
.header-notify-list { overflow-y: auto; max-height: 340px; }
.header-notify-item { padding: .75rem 1rem; border-bottom: 1px solid var(--fc-gray-100); }
.header-notify-item.is-read { opacity: .65; }
.header-notify-item p { margin: .25rem 0 0; font-size: .8125rem; color: var(--fc-gray-700); }
.plan-badge {
    font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: .25rem .5rem; border-radius: 999px; white-space: nowrap;
}
.plan-badge-upgrade { background: #fef3c7; color: #b45309; text-decoration: none; }
.plan-badge-upgrade:hover { background: #fde68a; }
.plan-badge-pro { background: #dbeafe; color: #1d4ed8; }
.plan-badge-family { background: #d1fae5; color: #047857; }
.sidebar-logout-only { width: 100%; }
.sidebar-logout-link { color: var(--sidebar-logout-color) !important; justify-content: center; }
.sidebar-logout-link:hover { color: var(--sidebar-logout-hover-color) !important; background: var(--sidebar-logout-hover-bg) !important; }

/* Sticky headers */
.app-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, .97);
}
.guest-nav.is-scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.08); }

/* Pagination */
.pagination-wrap { padding: 1rem 1.25rem; border-top: 1px solid var(--fc-gray-200); }
.pagination-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.pagination-info { font-size: .8125rem; color: var(--fc-gray-500); }
.pagination-links { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.pagination-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2rem; height: 2rem; padding: 0 .5rem;
    font-size: .8125rem; font-weight: 500; color: var(--fc-gray-700);
    border: 1px solid var(--fc-gray-200); border-radius: 8px;
    background: var(--fc-white); text-decoration: none; transition: all .15s;
}
.pagination-btn:hover:not(.is-disabled):not(.is-active) { border-color: var(--fc-teal); color: var(--fc-teal); }
.pagination-btn.is-active { background: var(--fc-navy); color: #fff; border-color: var(--fc-navy); }
.pagination-btn.is-disabled { opacity: .4; cursor: default; }
.pagination-ellipsis { padding: 0 .25rem; color: var(--fc-gray-400); font-size: .8125rem; }

/* Row action buttons */
.row-actions { display: flex; align-items: center; gap: .25rem; white-space: nowrap; }
.row-actions form { display: inline; }

/* Category icons */
.category-emoji { margin-right: .25rem; }
.fa-solid.category-inline, .category-select-wrap .fa-solid { margin-right: .35rem; color: var(--fc-teal); }

/* Service FA icons */
.service-icon-fa {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px;
    background: color-mix(in srgb, var(--icon-color) 12%, white);
    color: var(--icon-color); font-size: 1rem;
    box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.custom-category-form { margin-bottom: .75rem; display: flex; flex-direction: column; gap: .5rem; padding: .75rem; border-radius: 10px; background: rgba(26, 188, 156, 0.08); border: 1px solid rgba(26, 188, 156, 0.22); }
.category-add-bar { margin-bottom: .5rem; }
.category-add-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .5rem .75rem;
    border-radius: 8px;
    border: 1px dashed rgba(26, 188, 156, 0.45);
    background: rgba(26, 188, 156, 0.1);
    color: var(--fc-teal);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.category-add-toggle:hover { background: rgba(26, 188, 156, 0.16); border-color: var(--fc-teal); }
.category-add-toggle.is-open { background: rgba(26, 188, 156, 0.18); border-style: solid; }

@media (max-width: 768px) {
    .header-user-name { display: none; }
    .app-header h1 { font-size: 1rem; }
}

body.theme-dark .app-header { background: rgba(30, 30, 36, .97); }
body.theme-dark .header-user-link:hover { background: #2a2a32; }
body.theme-dark .pagination-btn { background: #1e1e24; border-color: #3a3a44; color: #e5e7eb; }
body.theme-dark .pagination-btn.is-active { background: var(--fc-teal); border-color: var(--fc-teal); }

/* Page section tabs (Transactions / Recurring) */
.page-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--fc-gray-200);
    padding-bottom: 0;
}
.page-tab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem 1rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--fc-gray-600);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.page-tab:hover { color: var(--fc-teal); }
.page-tab.is-active {
    color: var(--fc-teal);
    border-bottom-color: var(--fc-teal);
}

/* Segmented choice (Budget / Goal modal) */
.choice-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    padding: .35rem;
    background: var(--fc-gray-100);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}
.choice-segment-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: .875rem .75rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--fc-gray-600);
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.choice-segment-btn i {
    font-size: 1.125rem;
    color: var(--fc-gray-500);
}
.choice-segment-btn:hover {
    background: var(--fc-white);
    color: var(--fc-gray-800);
}
.choice-segment-btn.is-active {
    background: var(--fc-white);
    border-color: var(--fc-teal);
    color: var(--fc-teal);
    box-shadow: 0 2px 8px rgba(26, 188, 156, .15);
}
.choice-segment-btn.is-active i { color: var(--fc-teal); }

.invoice-lines-table input.form-input { padding: .35rem .5rem; font-size: .8125rem; }
.invoice-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.invoice-page .table-wrap {
    flex: 1;
    min-height: 240px;
    overflow: auto;
}
.invoice-page .pagination-wrap { margin-top: auto; }
.invoice-totals-box { background: var(--fc-gray-50); border: 1px solid var(--fc-gray-200); border-radius: 12px; padding: 1rem; margin: 1rem 0; }
.invoice-totals-box > div { display: flex; justify-content: space-between; padding: .25rem 0; font-size: .875rem; }
.invoice-grand-total { border-top: 1px solid var(--fc-gray-200); margin-top: .5rem; padding-top: .5rem; font-size: 1rem; }
.invoice-form-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.invoice-actions-dropdown { position: relative; }
.invoice-menu { display: none; position: absolute; right: 0; top: 100%; z-index: 50; min-width: 180px; background: var(--fc-white); border: 1px solid var(--fc-gray-200); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .35rem 0; }
.invoice-menu.open { display: block; }
.invoice-menu a, .invoice-menu button, .invoice-menu form button { display: block; width: 100%; text-align: left; padding: .5rem 1rem; border: none; background: none; font-size: .8125rem; color: var(--fc-gray-800); cursor: pointer; text-decoration: none; }
.invoice-menu a:hover, .invoice-menu button:hover { background: var(--fc-gray-50); }
.modal-dialog-wide { max-width: 720px; }

/* Import / export action menu */
.action-menu-wrap { position: relative; }
.action-menu-panel {
    position: absolute;
    top: calc(100% + .35rem);
    right: 0;
    z-index: 60;
    min-width: 220px;
    background: var(--fc-white);
    border: 1px solid var(--fc-gray-200);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: .35rem 0;
}
html[dir="rtl"] .action-menu-panel { right: auto; left: 0; }
.action-menu-label {
    padding: .35rem 1rem .25rem;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fc-gray-500);
}
.action-menu-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    width: 100%;
    padding: .5rem 1rem;
    border: none;
    background: none;
    font-size: .8125rem;
    color: var(--fc-gray-800);
    cursor: pointer;
    text-decoration: none;
    text-align: start;
}
.action-menu-item:hover { background: var(--fc-gray-50); }
.action-menu-btn { font: inherit; }
.file-type-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.ad-banner { margin-bottom: 1rem; }
.ad-banner-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem 1rem; border: 1px dashed var(--fc-gray-300); border-radius: 12px; background: var(--fc-gray-50); }
.ad-slot { flex: 1; min-width: 240px; }
.ad-label { font-size: .6875rem; text-transform: uppercase; color: var(--fc-gray-500); font-weight: 700; }
.ad-placeholder { flex: 1; font-size: .875rem; }
.ad-unavailable { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.ad-unavailable .text-muted { font-size: .8125rem; }
.ad-unlock-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.ad-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ad-overlay-card { background: var(--fc-white); border-radius: 16px; padding: 2rem; max-width: 360px; width: 100%; text-align: center; }
.ad-countdown { font-size: 2rem; font-weight: 700; margin: 1rem 0; color: var(--fc-teal); }
html[dir="rtl"] .app-sidebar {
    left: auto;
    right: 0;
}
html[dir="rtl"] .app-main {
    margin-left: 0;
    margin-right: 260px;
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .app-header {
    direction: rtl;
}
html[dir="rtl"] .app-header-left,
html[dir="rtl"] .app-header-right {
    flex-direction: row-reverse;
}
html[dir="rtl"] .header-user-chip {
    flex-direction: row-reverse;
}
html[dir="rtl"] .app-nav-link {
    flex-direction: row-reverse;
    text-align: right;
}
html[dir="rtl"] .app-nav-section {
    text-align: right;
}
html[dir="rtl"] .app-nav-scroll {
    direction: rtl;
}
html[dir="rtl"] .app-nav-scroll > * {
    direction: rtl;
}
html[dir="rtl"] .app-content {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .card-header,
html[dir="rtl"] .form-label,
html[dir="rtl"] .table {
    text-align: right;
}
html[dir="rtl"] .auth-page {
    direction: rtl;
}
html[dir="rtl"] .auth-brand-content {
    text-align: right;
}
html[dir="rtl"] .auth-form-wrap {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .floating-ai {
    right: 1.5rem;
    left: auto;
}
html[dir="rtl"] .floating-ai-panel {
    right: 0;
    left: auto;
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .floating-ai-header,
html[dir="rtl"] .floating-ai-messages,
html[dir="rtl"] .floating-ai-input {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .floating-ai-header {
    flex-direction: row-reverse;
}
html[dir="rtl"] .floating-ai-input {
    flex-direction: row-reverse;
}
html[dir="rtl"] .guest-nav,
html[dir="rtl"] .guest-nav-menu,
html[dir="rtl"] .guest-footer-inner {
    direction: rtl;
}
@media (max-width: 768px) {
    html[dir="rtl"] .app-sidebar { transform: translateX(100%); }
    html[dir="rtl"] .app-sidebar.open { transform: translateX(0); }
    html[dir="rtl"] .app-main { margin-right: 0; }
}

.star-rating { display: flex; gap: .25rem; margin: .75rem 0; }
.star-btn { background: none; border: none; font-size: 1.75rem; color: var(--fc-gray-300); cursor: pointer; padding: 0 .125rem; line-height: 1; }
.star-btn.is-active, .star-btn:hover { color: #f59e0b; }
.donation-qr-img { max-width: 200px; border-radius: 12px; border: 1px solid var(--fc-gray-200); display: block; margin-top: .75rem; }
.donation-qr-placeholder { padding: 2rem; text-align: center; border: 1px dashed var(--fc-gray-300); border-radius: 12px; color: var(--fc-gray-500); font-size: .875rem; margin-top: .75rem; }

.social-links { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.social-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--fc-gray-100); border: 1px solid var(--fc-gray-200);
    transition: transform .15s ease, box-shadow .15s ease;
}
.social-link:hover { transform: translateY(-2px); box-shadow: var(--fc-shadow); }
.social-link img { width: 24px; height: 24px; object-fit: contain; display: block; }
.social-link-static { opacity: .85; cursor: default; }
.guest-footer-social { margin-top: .75rem; }
.guest-footer-brand { flex: 1; min-width: 220px; }
.settings-social-links { margin-top: 1rem; }
.landing-social-links { margin-top: 1rem; }
body.theme-dark .social-link { background: #2a2a32; border-color: #3a3a44; }
.ai-training-syntax code { display: block; padding: .75rem; background: var(--fc-gray-50); border-radius: 8px; font-size: .8125rem; }

/* Soon toast */
.soon-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 2000;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    padding: .875rem 1.25rem;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    text-align: center;
    min-width: 220px;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.soon-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.soon-toast-label { display: block; font-weight: 800; font-size: 1.125rem; color: #1abc9c; margin-bottom: .125rem; }
.soon-toast-text { display: block; font-size: .8125rem; color: #cbd5e1; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Admin panel */
body.admin-layout-root {
    --fc-admin-bg: color-mix(in srgb, var(--fc-sidebar-bg) 16%, #16161a);
    --fc-admin-surface: color-mix(in srgb, var(--fc-sidebar-bg) 10%, #1e1e24);
    --fc-admin-border: color-mix(in srgb, var(--fc-sidebar-bg) 12%, #2a2a32);
}
body.admin-layout-root.theme-light {
    --fc-admin-bg: color-mix(in srgb, var(--fc-sidebar-bg) 55%, #f4f4f5);
    --fc-admin-surface: color-mix(in srgb, var(--fc-sidebar-bg) 35%, #ffffff);
    --fc-admin-border: color-mix(in srgb, var(--fc-sidebar-bg) 20%, #e4e4e7);
}
body.admin-layout-root.theme-dark .app-main,
body.admin-layout-root.theme-dark .app-content {
    background: var(--fc-admin-bg) !important;
}
body.admin-layout-root.theme-dark .card,
body.admin-layout-root.theme-dark .app-header,
body.admin-layout-root.theme-dark .form-input,
body.admin-layout-root.theme-dark .form-textarea,
body.admin-layout-root.theme-dark .form-select {
    background: var(--fc-admin-surface) !important;
    border-color: var(--fc-admin-border) !important;
}
body.admin-layout-root.theme-dark .card-header { border-bottom-color: var(--fc-admin-border) !important; }
body.admin-layout-root.theme-dark .table td { border-bottom-color: var(--fc-admin-border) !important; }
body.admin-layout-root.theme-dark .table tr:hover td { background: var(--fc-admin-border) !important; }
body.admin-layout-root.theme-light .app-main,
body.admin-layout-root.theme-light .app-content {
    background: var(--fc-admin-bg) !important;
}
body.admin-layout-root.theme-light .card,
body.admin-layout-root.theme-light .app-header {
    background: var(--fc-admin-surface) !important;
    border-color: var(--fc-admin-border) !important;
}
body.admin-layout-root.theme-light .card-header { border-bottom-color: var(--fc-admin-border) !important; }
body.admin-layout-root .stat-value { color: var(--fc-chart-color); }
body.admin-layout-root .btn-primary {
    background: var(--fc-chart-color);
    border-color: var(--fc-chart-color);
    color: #fff;
}
body.admin-layout-root.theme-light .btn-primary { color: #fff; }
body.admin-layout-root .btn-primary:hover {
    filter: brightness(1.08);
    background: var(--fc-chart-color);
}
.admin-layout-root .app-sidebar-footer {
    background: transparent;
    border-top-color: color-mix(in srgb, var(--fc-sidebar-bg) 25%, transparent);
}
.admin-layout-root .app-sidebar.sidebar-light .app-sidebar-footer {
    border-top-color: #e2e8f0;
}
.admin-panel-label { color: var(--fc-gray-400); margin-top: .5rem; }
.admin-sidebar-profile {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin-bottom: .75rem;
    text-decoration: none;
    color: inherit;
}
.admin-sidebar-profile:hover .admin-sidebar-name { color: #fff; }
.admin-sidebar-avatar { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.admin-sidebar-name { font-size: .875rem; font-weight: 600; color: #e4e4e7; }
.admin-layout-root .app-sidebar.sidebar-light .admin-sidebar-name { color: #334155; }
.admin-layout-root .app-sidebar.sidebar-light .admin-sidebar-profile:hover .admin-sidebar-name { color: #0f172a; }
.admin-layout-root .app-sidebar.sidebar-light .admin-panel-label { color: #64748b; }
.admin-signout-btn {
    padding-left: 0 !important;
    color: var(--sidebar-logout-color, var(--fc-gray-400)) !important;
}
.admin-signout-btn:hover {
    color: var(--sidebar-logout-hover-color, #fff) !important;
    background: var(--sidebar-logout-hover-bg, #27272a) !important;
}
.admin-user-search-bar .form-input { margin: 0; }
.admin-user-search-mini { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-profile-avatar-wrap { display: flex; align-items: center; gap: 1rem; }
.admin-profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid var(--fc-gray-200);
}
html[dir="rtl"] .admin-layout-root .app-sidebar { left: auto; right: 0; }
html[dir="rtl"] .admin-layout-root .app-main { margin-left: 0; margin-right: 260px; direction: rtl; text-align: right; }
html[dir="rtl"] .admin-layout-root .app-nav-link { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .admin-layout-root .app-content,
html[dir="rtl"] .admin-layout-root .table,
html[dir="rtl"] .admin-layout-root .form-label { text-align: right; }
html[dir="rtl"] .admin-sidebar-profile { flex-direction: row-reverse; }

/* Auth back link */
.auth-form .auth-back-home {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1rem;
    font-size: .875rem;
    font-weight: 600;
    color: #0d9488;
    text-decoration: none;
}
.auth-form .auth-back-home:hover { color: #0f766e; }
.auth-back-home {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1rem;
    font-size: .875rem;
    color: var(--fc-gray-600);
    text-decoration: none;
}
.auth-back-home:hover { color: var(--fc-black); }

/* AI assistant suggestions + upload */
.floating-ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: 0 .75rem .5rem;
    max-height: 88px;
    overflow-y: auto;
}
.ai-suggestion-chip {
    border: 1px solid var(--fc-gray-200);
    background: var(--fc-gray-50);
    color: var(--fc-gray-800);
    border-radius: 999px;
    padding: .25rem .65rem;
    font-size: .75rem;
    cursor: pointer;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-suggestion-chip:hover { border-color: var(--fc-teal); color: var(--fc-teal); }
.ai-message.thinking { padding: .35rem 0; background: transparent; }
.ai-thinking-logo {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    animation: ai-thinking-pulse 1.25s ease-in-out infinite;
}
@keyframes ai-thinking-pulse {
    0%, 100% { opacity: .4; transform: scale(.9); }
    50% { opacity: 1; transform: scale(1.08); }
}
body.theme-dark .floating-ai-header { background: var(--fc-gray-900); border-bottom-color: var(--fc-gray-700); }
.floating-ai-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    flex-shrink: 0;
    color: var(--fc-gray-600);
    cursor: pointer;
    border-radius: 8px;
}
.floating-ai-upload:hover { background: var(--fc-gray-100); color: var(--fc-black); }

/* Admin sales filters */
.admin-sales-filters-body {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(200px, 1.4fr) auto;
    gap: 1rem;
    align-items: end;
    padding: 1rem 1.25rem;
}
.admin-sales-search-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.admin-sales-search-row .fa-magnifying-glass { color: var(--fc-gray-500); flex-shrink: 0; }
.admin-sales-search-row .form-input { flex: 1; min-width: 0; }
.admin-sales-filter-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}
@media (max-width: 1100px) {
    .admin-sales-filters-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-sales-filter-actions { grid-column: 1 / -1; }
    .admin-sales-search { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .admin-sales-filters-body { grid-template-columns: 1fr; }
}

/* Table action menus */
.table-actions-dropdown { position: relative; }
.col-actions { width: 1%; white-space: nowrap; text-align: right; }
.table-actions-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 50;
    min-width: 140px;
    background: var(--fc-white);
    border: 1px solid var(--fc-gray-200);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: .35rem 0;
}
.table-actions-menu.open { display: block; }
.table-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: .5rem 1rem;
    border: none;
    background: none;
    font-size: .8125rem;
    color: var(--fc-gray-800);
    cursor: pointer;
}
.table-menu-item:hover { background: var(--fc-gray-50); }
.table-menu-danger { color: #dc2626; }
.table .badge { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }

@media (max-width: 768px) {
    .settings-grid { grid-template-columns: 1fr; }
    .settings-grid > .card { margin-bottom: 0; }
    .filter-grid { grid-template-columns: 1fr; }
    .table th, .table td { padding: .55rem .5rem; font-size: .8125rem; }
    .floating-ai-panel { width: min(100vw - 1rem, 380px); right: .5rem; bottom: 4.5rem; }
    .auth-form-wrap { padding: 1.25rem; }
    .card-header { flex-wrap: wrap; gap: .5rem; }
}

@media (max-width: 480px) {
    .stat-label { font-size: .75rem; }
    .stat-value { font-size: 1.35rem; }
    .app-header h1 { font-size: .9375rem; }
}
