/* ProfitShare design system — forest emerald + gold. Loaded after bootstrap.min.css. */

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --forest-950: #05241c;
    --forest-900: #08342a;
    --forest-800: #0b4636;
    --emerald-700: #0c6b4e;
    --emerald-600: #0f7f5b;
    --emerald-500: #17996f;
    --emerald-300: #6fcfa9;
    --emerald-100: #d7efe4;
    --emerald-50: #eef8f3;
    --gold-700: #8a6a1f;
    --gold-600: #a9842f;
    --gold-500: #c9a24a;
    --gold-400: #d9b96c;
    --gold-200: #efdfb5;
    --gold-50: #fbf6e9;

    --ink: #10231c;
    --ink-2: #3d5249;
    --muted: #63756c;
    --line: #e2e8e3;
    --line-soft: #eef2ee;
    --bg: #f3f6f2;
    --card: #ffffff;

    --red: #c2413a;
    --red-50: #fdf0ef;
    --amber: #a86400;
    --amber-50: #fff4dc;
    --purple: #6d4bb5;
    --purple-50: #f2eefb;
    --grey-50: #eef1ef;

    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(16, 35, 28, .05);
    --shadow: 0 1px 2px rgba(16, 35, 28, .04), 0 8px 24px -12px rgba(16, 35, 28, .12);
    --sidebar-w: 264px;
    --topbar-h: 64px;
    --tabbar-h: 64px;

    --bs-body-font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, 'Noto Sans', sans-serif;
    --bs-body-font-size: .9375rem;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--line);
    --bs-link-color: var(--emerald-700);
    --bs-link-color-rgb: 12, 107, 78;
    --bs-link-hover-color: var(--forest-800);
    --bs-link-hover-color-rgb: 11, 70, 54;
    --bs-border-radius: 10px;
    --bs-primary: var(--emerald-600);
    --bs-primary-rgb: 15, 127, 91;
}

html { height: 100%; }

body {
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'tnum' 1;
}

h1, h2, h3, h4 { letter-spacing: -.015em; font-weight: 700; }

::selection { background: var(--gold-200); }

:focus-visible { outline: 3px solid rgba(201, 162, 74, .6); outline-offset: 2px; }

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.22em;
}

/* ── Buttons & forms ─────────────────────────────────────────── */

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-y: .6rem;
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
}

.btn-sm { min-height: 36px; --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .8rem; }

.btn-primary {
    --bs-btn-bg: var(--emerald-600);
    --bs-btn-border-color: var(--emerald-600);
    --bs-btn-hover-bg: var(--emerald-700);
    --bs-btn-hover-border-color: var(--emerald-700);
    --bs-btn-active-bg: var(--forest-800);
    --bs-btn-active-border-color: var(--forest-800);
    --bs-btn-disabled-bg: var(--emerald-600);
    --bs-btn-disabled-border-color: var(--emerald-600);
    box-shadow: 0 6px 16px -8px rgba(15, 127, 91, .7);
}

.btn-gold {
    --bs-btn-color: var(--forest-950);
    --bs-btn-hover-color: var(--forest-950);
    --bs-btn-active-color: var(--forest-950);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-border-color: transparent;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    box-shadow: 0 8px 18px -10px rgba(201, 162, 74, .9);
}

.btn-gold:hover { filter: brightness(1.05); }

.btn-light {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-bg: var(--emerald-50);
    --bs-btn-hover-border-color: var(--emerald-100);
    --bs-btn-color: var(--ink);
}

.form-label { font-weight: 600; font-size: .875rem; margin-bottom: .4rem; }

.form-control, .form-select {
    min-height: 46px;
    border-color: var(--line);
    border-radius: 10px;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(23, 153, 111, .15);
}

.field-error { color: var(--red); font-size: .85rem; font-weight: 500; margin-top: .35rem; }

.form-alert {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    background: var(--red-50);
    color: #8f2a25;
    border: 1px solid #f4cfcc;
    border-radius: 10px;
    padding: .75rem .9rem;
    font-weight: 500;
    font-size: .9rem;
}

.form-alert:empty, .form-alert.validation-summary-valid { display: none; }
.form-alert ul { margin: 0; padding: 0; list-style: none; }

.input-with-action { position: relative; }
.input-with-action .form-control { padding-right: 3rem; }

.input-with-action button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
}

.input-with-action button:hover, .input-with-action button[aria-pressed="true"] { background: var(--emerald-50); color: var(--emerald-700); }

/* ── App shell ───────────────────────────────────────────────── */

.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }

.sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    color: #cfe3d9;
    background:
        radial-gradient(90% 40% at 0% 0%, rgba(201, 162, 74, .16), transparent 70%),
        linear-gradient(180deg, var(--forest-900), var(--forest-950));
    z-index: 1040;
}

.brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; line-height: 1.1; }
.brand-name span { color: var(--gold-400); }
.brand-org { font-size: .72rem; color: #8fb3a3; font-weight: 500; }

.sidebar-cta { padding: .25rem 1rem 1rem; }
.sidebar-cta .btn { width: 100%; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 .75rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }

.nav-title { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6f9685; padding: 1rem .75rem .4rem; }

.nav-item-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 42px;
    padding: .5rem .75rem;
    margin-bottom: 2px;
    border-radius: 10px;
    color: #cfe3d9;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.nav-item-link .icon { opacity: .8; }
.nav-item-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.nav-item-link.active {
    background: linear-gradient(90deg, rgba(201, 162, 74, .22), rgba(201, 162, 74, .06));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--gold-400);
}

.nav-item-link.active .icon { color: var(--gold-400); opacity: 1; }

.nav-count {
    margin-left: auto;
    min-width: 22px;
    padding: 0 .4rem;
    border-radius: 99px;
    background: var(--gold-400);
    color: var(--forest-950);
    font-size: .72rem;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
}

.nav-soon { margin-left: auto; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6f9685; }

.sidebar-user { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-top: 1px solid rgba(255, 255, 255, .08); }

.avatar {
    width: 38px;
    height: 38px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--forest-950);
    font-weight: 800;
    font-size: .8rem;
}

.sidebar-user-name { color: #fff; font-weight: 700; font-size: .875rem; line-height: 1.2; }
.sidebar-user-role { font-size: .72rem; color: #8fb3a3; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .6rem 2rem;
    background: rgba(243, 246, 242, .86);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-title { min-width: 0; margin-right: auto; }
.topbar-title h1 { font-size: 1.25rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { margin: 0; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
    width: 44px;
    height: 44px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
}

.biz-switch { position: relative; display: flex; align-items: center; }
.biz-switch > .icon { position: absolute; left: .8rem; color: var(--emerald-700); pointer-events: none; }

.biz-switch select {
    min-height: 44px;
    max-width: 240px;
    padding-left: 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: .9rem;
    background-color: #fff;
}

.user-menu > button { border: 0; background: transparent; padding: 0; border-radius: 50%; }
.dropdown-menu { border-color: var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .4rem; min-width: 220px; }
.dropdown-item { display: flex; align-items: center; gap: .6rem; border-radius: 8px; padding: .55rem .7rem; font-weight: 600; font-size: .9rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--emerald-50); color: var(--forest-800); }
.dropdown-item:active { background: var(--emerald-100); color: var(--forest-900); }

.content { flex: 1; padding: 1.5rem 2rem 3rem; width: 100%; max-width: 1480px; }

.sidebar-overlay { display: none; }
.tabbar { display: none; }

@media (max-width: 991.98px) {
    .shell { grid-template-columns: minmax(0, 1fr); }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 300px);
        transform: translateX(-102%);
        transition: transform .25s ease;
    }

    .nav-open .sidebar { transform: none; box-shadow: 12px 0 40px rgba(0, 0, 0, .35); }
    .nav-open .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 1035; background: rgba(5, 36, 28, .5); border: 0; }

    .topbar { padding: .5rem 1rem; gap: .6rem; }
    .topbar-title h1 { font-size: 1.1rem; }
    .biz-switch select { max-width: 46vw; font-size: .85rem; }
    .content { padding: 1rem 1rem calc(var(--tabbar-h) + 2rem); }

    .tabbar {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 1030;
        height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 -8px 24px -16px rgba(16, 35, 28, .3);
    }

    .tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        min-height: 48px;
        justify-content: center;
        border: 0;
        background: none;
        color: var(--muted);
        font-size: .68rem;
        font-weight: 700;
        text-decoration: none;
    }

    .tab .icon { width: 22px; height: 22px; }
    .tab.active { color: var(--emerald-700); }

    .tab-add span {
        width: 52px;
        height: 52px;
        margin-top: -22px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
        color: var(--forest-950);
        box-shadow: 0 10px 20px -8px rgba(201, 162, 74, .9), 0 0 0 5px #fff;
    }

    .tab-add .icon { width: 26px; height: 26px; stroke-width: 2.25; }
}

@media (min-width: 992px) {
    .only-mobile { display: none !important; }
}

/* ── Cards ───────────────────────────────────────────────────── */

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem .9rem; }
.panel-head h2 { font-size: 1rem; margin: 0; }
.panel-head p { margin: 0; font-size: .8rem; color: var(--muted); }
.panel-head .ms-auto { flex: none; }
.panel-body { padding: 0 1.25rem 1.25rem; }
.panel-link { font-weight: 700; font-size: .85rem; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; }

/* ── Money ───────────────────────────────────────────────────── */

.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.money-cur { opacity: .6; font-weight: 500; }
.money-dec { opacity: .55; font-size: .8em; }
.money.neg { color: var(--red); }
.num { text-align: right; }

/* ── Period chips ────────────────────────────────────────────── */

.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 1rem;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: #fff;
    color: var(--ink-2);
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.chip:hover { border-color: var(--emerald-500); color: var(--forest-800); }
.chip.active { background: var(--forest-900); border-color: var(--forest-900); color: #fff; }

.range-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-top: .9rem; }
.range-form[hidden] { display: none; }
.range-form label { font-size: .75rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: .2rem; }
.range-form .form-control { min-width: 160px; }

.range-note { font-size: .82rem; color: var(--muted); margin: .75rem 0 0; }
.range-note strong { color: var(--ink); }

/* ── Dashboard: hero + KPI tiles ─────────────────────────────── */

.hero {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.6rem 1.6rem 1.4rem;
    border-radius: var(--radius-lg);
    color: #e6f2ec;
    background:
        radial-gradient(70% 90% at 100% 0%, rgba(201, 162, 74, .34), transparent 60%),
        radial-gradient(60% 80% at 0% 100%, rgba(23, 153, 111, .35), transparent 60%),
        linear-gradient(135deg, var(--forest-900), var(--forest-950));
    box-shadow: 0 24px 40px -28px rgba(5, 36, 28, .9);
    overflow: hidden;
}

.hero-label { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-200); }
.hero-figure { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: .5rem 0 .2rem; color: #fff; }
.hero-figure .money.neg { color: #ffb4ae; }
.hero-sub { font-size: .85rem; color: #a9c9bb; margin: 0; }

.split { margin-top: auto; padding-top: 1.5rem; }
.split-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .12); gap: 3px; }
.split-bar i { display: block; min-width: 4px; border-radius: 99px; }
.split-owner { background: var(--emerald-300); }
.split-partners { background: var(--gold-400); }

.split-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .9rem; }
.split-legend dt { display: flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 600; color: #a9c9bb; }
.split-legend dt i { width: 10px; height: 10px; border-radius: 3px; }
.split-legend dd { margin: .15rem 0 0; font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.split-legend dd small { font-size: .75rem; font-weight: 600; color: #a9c9bb; margin-left: .3rem; }
.split-legend .money.neg { color: #ffb4ae; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; height: 100%; }

.kpi {
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.15rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.kpi-top { display: flex; align-items: center; gap: .6rem; }
.kpi-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--emerald-50); color: var(--emerald-700); flex: none; }
.kpi-icon.out { background: var(--red-50); color: var(--red); }
.kpi-icon.gold { background: var(--gold-50); color: var(--gold-700); }
.kpi-icon.amber { background: var(--amber-50); color: var(--amber); }
.kpi-label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.kpi-value { font-size: clamp(1.15rem, .9rem + 1vw, 1.6rem); font-weight: 800; letter-spacing: -.02em; margin: .7rem 0 .15rem; overflow: hidden; text-overflow: ellipsis; }
.kpi-note { font-size: .78rem; color: var(--muted); margin: 0; }
.kpi-count { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; margin: .5rem 0 0; }

@media (max-width: 575.98px) {
    .kpi { padding: .9rem; }
    .kpi-icon { width: 32px; height: 32px; }
}

/* ── Tables ──────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

.table-ps { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: .9rem; }

/* Approve/Reject must stay reachable without discovering the horizontal scroll (the table needs ~1280px). */
.table-ps.sticky-actions thead th:last-child,
.table-ps.sticky-actions tbody td:last-child {
    position: sticky;
    right: 0;
    background: var(--surface, #fff);
    box-shadow: -8px 0 8px -8px rgba(8, 52, 42, .18);
}
.table-ps.sticky-actions thead th:last-child { background: var(--grey-50, #f4f6f5); }

.table-ps thead th {
    padding: .65rem 1rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    background: #f8faf8;
    border-block: 1px solid var(--line);
    white-space: nowrap;
}

.table-ps tbody th, .table-ps td { padding: .85rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table-ps tr > :first-child { padding-left: 1.25rem; }
.table-ps tr > :last-child { padding-right: 1.25rem; }
.table-ps tbody tr:last-child > * { border-bottom: 0; }
.table-ps tbody tr:hover > * { background: #fafcfa; }
.table-ps tfoot td { padding: .95rem 1rem; font-weight: 800; background: var(--emerald-50); border-top: 2px solid var(--emerald-100); }
.table-ps tfoot tr td:first-child { border-bottom-left-radius: var(--radius-lg); }
.table-ps tfoot tr td:last-child { border-bottom-right-radius: var(--radius-lg); }
.table-ps .strong { font-weight: 800; }

.biz { display: flex; align-items: center; gap: .75rem; min-width: 170px; }
.biz-code { flex: none; padding: .25rem .5rem; border-radius: 8px; background: var(--forest-900); color: var(--gold-200); font-size: .7rem; font-weight: 800; letter-spacing: .05em; }
.biz-name { font-weight: 700; line-height: 1.2; }
.biz-sector { font-size: .78rem; color: var(--muted); }

.ref { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.sub { font-size: .78rem; color: var(--muted); }
.truncate { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.type { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .82rem; }
.type-income { color: var(--emerald-700); }
.type-expense { color: var(--red); }

/* ── Status badges (always with text) ────────────────────────── */

.status { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .65rem; border-radius: 99px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-draft { background: var(--grey-50); color: #55655d; }
.status-submitted { background: var(--amber-50); color: var(--amber); }
.status-approved { background: var(--emerald-50); color: var(--emerald-700); }
.status-rejected { background: var(--red-50); color: var(--red); }
.status-reversed { background: var(--purple-50); color: var(--purple); }
.reversed-amount { text-decoration: line-through; color: var(--purple); }

/* ── Lists inside panels ─────────────────────────────────────── */

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line-soft); }
.rank-list li:first-child { border-top: 0; }
.rank-list .avatar { width: 34px; height: 34px; font-size: .72rem; background: var(--emerald-50); color: var(--emerald-700); }
.rank-list .name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .money { margin-left: auto; font-weight: 800; }

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--gold-50), #fff);
    border: 1px solid var(--gold-200);
    color: var(--ink);
    text-decoration: none;
}

.action-card:hover { border-color: var(--gold-500); color: var(--ink); }
.action-card .big { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--gold-700); }
.action-card .label { font-weight: 800; }
.action-card .icon { margin-left: auto; color: var(--gold-700); }

.empty { padding: 2rem 1.25rem; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: .2rem; }

.chart-box { position: relative; height: 300px; }

.switch { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 700; color: var(--ink-2); min-height: 44px; cursor: pointer; }
.switch input { width: 2.4em; height: 1.3em; margin: 0; cursor: pointer; }
.form-check-input:checked { background-color: var(--emerald-600); border-color: var(--emerald-600); }

/* ── Toasts ──────────────────────────────────────────────────── */

.toast-stack { position: fixed; top: 1rem; right: 1rem; z-index: 1090; display: grid; gap: .5rem; }
.toast { border: 0; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; }
.toast-success { background: var(--forest-900); color: #fff; }
.toast-error { background: var(--red); color: #fff; }
.toast .toast-body { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; }

/* ── Auth pages ──────────────────────────────────────────────── */

.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }

.auth-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
    color: #e6f2ec;
    background:
        radial-gradient(60% 50% at 90% 10%, rgba(201, 162, 74, .38), transparent 65%),
        radial-gradient(70% 60% at 0% 100%, rgba(23, 153, 111, .4), transparent 60%),
        linear-gradient(150deg, var(--forest-900), var(--forest-950));
    overflow: hidden;
}

.auth-art .brand { padding: 0; }
.auth-art h2 { font-size: clamp(2rem, 1rem + 2.6vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; max-width: 12ch; margin: 0 0 1rem; }
.auth-art h2 em { font-style: normal; color: var(--gold-400); }
.auth-art p { max-width: 38ch; color: #a9c9bb; margin: 0; }

.auth-demo { max-width: 420px; padding: 1.25rem; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(6px); }
.auth-demo .split { padding-top: 1rem; }
.auth-demo small { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--gold-200); }
.auth-demo .hero-figure { font-size: 2rem; }

.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.75rem; margin: 0 0 .3rem; }
.auth-card .lead { font-size: .95rem; color: var(--muted); margin-bottom: 1.75rem; }
.auth-card .btn { width: 100%; min-height: 50px; font-size: 1rem; }
.auth-foot { margin-top: 1.5rem; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.auth-mobile-brand { display: none; }

@media (max-width: 899.98px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-art { display: none; }
    .auth-form { align-items: flex-start; padding-top: 3rem; }
    .auth-mobile-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 2rem; font-weight: 800; font-size: 1.2rem; color: var(--forest-900); }
    .auth-mobile-brand img { width: 40px; height: 40px; }
    .auth-mobile-brand span { color: var(--gold-600); }
}

.bare { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.bare-card { width: 100%; max-width: 460px; padding: 2rem; text-align: center; }
.bare-card .code { font-size: 3.5rem; font-weight: 800; letter-spacing: -.04em; color: var(--gold-600); line-height: 1; }
.bare-card h1 { font-size: 1.4rem; margin: .75rem 0 .4rem; }
.bare-card p { color: var(--muted); }

.form-panel { max-width: 520px; padding: 1.5rem; }

.soon { max-width: 560px; margin: 8vh auto 0; text-align: center; padding: 2.5rem 1.5rem; }
.soon-icon { width: 64px; height: 64px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 20px; background: var(--gold-50); color: var(--gold-700); }
.soon-icon .icon { width: 30px; height: 30px; }
.soon h2 { font-size: 1.4rem; }
.soon p { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}

.min-w-0 { min-width: 0; }

@media (max-width: 575.98px) {
    .hero { padding: 1.25rem; }
    .split-legend { gap: .75rem; }
    .split-legend dd { font-size: 1.05rem; }
    .split-legend dd small { display: block; margin: 0; }
}

/* Inputs are white on white cards (Bootstrap would tint them with the page background). */
.form-control, .form-select { background-color: #fff; }
