/* ==========================================================================
   GoDigital Hup — application styles
   Layered on Bootstrap 5. --brand is injected per white-label tenant.
   ========================================================================== */

:root {
    --brand: #0d6efd;
    --sidebar-w: 248px;
    --nav-h: 58px;
    --surface: #f5f7fb;
    --border: #e4e8f0;
    --ink: #1c2434;
    --ink-muted: #6b7488;

    /* --- Sidebar ---------------------------------------------------------
       Deliberately fixed rather than derived from --brand. A white-label tenant
       picks --brand for buttons and highlights, where it sits on white; reusing
       it as a large dark background would make a light brand colour unreadable
       and a bright one exhausting to look at all day. The tenant's colour still
       drives the active item, which is where it reads as identity. */
    --sidebar-bg: #131b26;
    --sidebar-ink: #c6cedb;
    /* Lightened until it clears WCAG AA (4.5:1) against the panel. The obvious
       muted grey measured 4.27:1 — close enough to look fine and fail anyone
       reading it on a laptop in daylight. */
    --sidebar-ink-dim: #8391a5;
    --sidebar-hover: rgba(255, 255, 255, .07);
    --sidebar-divider: rgba(255, 255, 255, .07);
}

body {
    background: var(--surface);
    color: var(--ink);
    font-size: .925rem;
}

/* --- Brand helpers ------------------------------------------------------ */
/*
 * Driven through Bootstrap's own --bs-btn-* variables rather than by setting
 * background/colour directly.
 *
 * The direct version had a bug worth remembering. It styled `.btn-brand` and
 * `.btn-brand:hover`, but the hover rule only set `filter` and `color` — it
 * never re-declared a background. Bootstrap's `.btn:hover` DOES:
 *
 *     .btn:hover { background-color: var(--bs-btn-hover-bg); ... }
 *
 * and on a `.btn` with no Bootstrap variant class that variable is
 * `transparent`. Both selectors have the same specificity (0,2,0), so the one
 * declaring the property won: on hover the fill disappeared and `color:#fff`
 * left white text on a white card. The button became invisible exactly when
 * the pointer was on it.
 *
 * Setting the variables fixes hover, active, focus and disabled at once, and
 * cannot drift out of step with Bootstrap's internals again.
 *
 * Every state stays var(--brand): the brand colour is injected per white-label
 * tenant, so a hard-coded darker shade would be wrong for every tenant but one.
 * The darkening is done with a filter, which works against any hue.
 */
.btn-brand {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);

    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);

    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand);
    --bs-btn-active-border-color: var(--brand);

    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--brand);
    --bs-btn-disabled-border-color: var(--brand);
}
.btn-brand:hover,
.btn-brand:focus-visible,
.btn-brand:active {
    filter: brightness(.92);
}
/* Bootstrap already dims a disabled button with opacity; darkening it too
   reads as "pressed" on a control that cannot be pressed. */
.btn-brand:disabled,
.btn-brand.disabled {
    filter: none;
}
.text-brand { color: var(--brand) !important; }

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: .95rem;
}
.brand-mark-lg {
    width: 52px; height: 52px;
    font-size: 1.6rem;
    background: var(--brand);
}

/* --- Top bar ------------------------------------------------------------ */
.app-navbar {
    height: var(--nav-h);
    background: var(--brand);
    color: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}
.app-navbar .navbar-brand,
.app-navbar .navbar-brand:hover { color: #fff; }

.wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(255, 255, 255, .17);
    color: #fff;
    padding: .32rem .7rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .875rem;
    white-space: nowrap;
}

.avatar {
    display: inline-grid;
    place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    font-size: .75rem;
    font-weight: 700;
}

/* --- Shell -------------------------------------------------------------- */
.app-shell { display: flex; min-height: calc(100vh - var(--nav-h)); }

.app-sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    border-right: 0;
    color: var(--sidebar-ink);

    /* !important is load-bearing here, not laziness.
       The panel carries Bootstrap's `.offcanvas-lg`, and above the lg
       breakpoint Bootstrap declares:
           .offcanvas-lg { background-color: transparent !important }
       to undo the offcanvas styling it applies on smaller screens. No amount of
       selector specificity beats an !important, so the only way to keep a
       background on desktop is to match it. Without this the panel is
       transparent from 992px up and the page surface shows through — which
       looks like "the colour did not apply". */
    background-color: var(--sidebar-bg) !important;

    /* The sidebar is the scroll container at EVERY breakpoint, not only on
       desktop. In offcanvas mode it is a fixed-height panel, and without this
       a menu taller than the screen simply could not be scrolled on a phone.
       It also gives the scroll-position restore one consistent element to
       address, rather than a different one per breakpoint. */
    overflow-y: auto;

    /* Reaching the end of the menu must not start scrolling the page behind
       it — that is how a tap-scroll on mobile ends up moving the wrong thing. */
    overscroll-behavior: contain;

    /* Position restoring must be instant. A smooth scroll here would animate
       the sidebar from the top down to the saved position on every page load,
       which is the visible jump this is meant to remove. */
    scroll-behavior: auto;
}

@media (min-width: 992px) {
    .app-sidebar {
        position: sticky;
        top: var(--nav-h);
        height: calc(100vh - var(--nav-h));
    }
}

.sidebar-nav { padding: .6rem .55rem 2rem; }

.sidebar-group {
    padding: 1.05rem .75rem .35rem;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sidebar-ink-dim);
}
/* No heading above the first group — it would sit tight under the navbar. */
.sidebar-group:first-child { padding-top: .35rem; }

/* --- Menu search --------------------------------------------------------- */
.sidebar-search {
    position: relative;
    padding: .7rem .8rem .2rem;
}
.sidebar-search i {
    position: absolute;
    left: 1.45rem;
    top: 50%;
    transform: translateY(-30%);
    font-size: .85rem;
    color: var(--sidebar-ink-dim);
    pointer-events: none;
}
.sidebar-search input {
    padding-left: 2rem;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
    color: #fff;
}
.sidebar-search input::placeholder { color: var(--sidebar-ink-dim); }
.sidebar-search input:focus {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
    box-shadow: none;
}
/* The browser's own clear affordance is dark-on-dark and invisible here. */
.sidebar-search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }

.sidebar-empty {
    padding: 1rem .9rem;
    margin: 0;
    font-size: .85rem;
    color: var(--sidebar-ink-dim);
}

/* --- Two-level menu ------------------------------------------------------ */
.sidebar-toggle {
    width: 100%;
    border: 0;
    background: none;
    text-align: left;
    font-family: inherit;
}
.sidebar-caret {
    margin-left: auto;
    font-size: .75rem !important;
    width: auto !important;
    flex: 0 0 auto !important;
    transition: transform .16s ease;
}
.sidebar-toggle.collapsed .sidebar-caret { transform: rotate(-90deg); }

/* --- Logout ---------------------------------------------------------------
   The last entry is a BUTTON in a form, because /logout is POST-only — a GET
   link there would answer 405. The browser-button resets that .sidebar-toggle
   carries are repeated here rather than shared, because this button is not a
   toggle and must not inherit the caret rules that come with that class. */
.sidebar-logout {
    margin: .35rem 0 0;
    padding-top: .35rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-logout .sidebar-link {
    width: 100%;
    border: 0;
    background: none;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}
/* Signing out is destructive enough to warn on hover, but not loud enough to
   sit in red all day next to the pages people actually want. */
.sidebar-logout .sidebar-link:hover,
.sidebar-logout .sidebar-link:focus-visible {
    background: rgba(220, 53, 69, .16);
    color: #ffb3ba;
}
.sidebar-logout .sidebar-link:hover i,
.sidebar-logout .sidebar-link:focus-visible i { color: #ff8f99; }

.sidebar-submenu {
    /* The rail lines the children up under their parent's icon, so the tree is
       readable without indenting so far that long labels wrap. */
    margin: 1px 0 .3rem 1.55rem;
    padding-left: .55rem;
    border-left: 1px solid rgba(255, 255, 255, .1);
}
.sidebar-link.sidebar-sub {
    padding: .45rem .6rem;
    font-size: .875rem;
    font-weight: 400;
    gap: 0;
}
.sidebar-link.sidebar-sub.active { font-weight: 500; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .62rem .75rem;
    margin-bottom: 1px;
    border-radius: 8px;
    color: var(--sidebar-ink);
    text-decoration: none;
    font-size: .935rem;
    font-weight: 500;
    line-height: 1.35;
    transition: background-color .12s ease, color .12s ease;
}
.sidebar-link i {
    font-size: 1.05rem;
    width: 1.35rem;
    flex: 0 0 1.35rem;
    text-align: center;
    color: var(--sidebar-ink-dim);
    transition: color .12s ease;
}
.sidebar-link span { min-width: 0; }

.sidebar-link:hover,
.sidebar-link:focus-visible {
    background: var(--sidebar-hover);
    color: #fff;
}
/* Icons keep their own colour on hover — brightened rather than washed to
   white, so the colour stays a reliable way to find an item by eye. */
.sidebar-link:hover i,
.sidebar-link:focus-visible i { filter: brightness(1.2); }

/* --- Icon colours -------------------------------------------------------
   Grouped by MEANING, not one hue per item. Fifty-nine unrelated colours
   would read as confetti; a handful of consistent families means the colour
   itself carries information — anything green moves money, anything amber is
   about people, anything rose wants attention.

   All are light and saturated enough to clear WCAG 1.4.11 (3:1 for non-text)
   against the panel. Verified, not eyeballed.
   ---------------------------------------------------------------------- */

/* Money: wallet, banking, pricing, anything with an amount attached. */
.sidebar-link .bi-bank,
.sidebar-link .bi-cash-stack,
.sidebar-link .bi-cash-coin,
.sidebar-link .bi-currency-rupee,
.sidebar-link .bi-credit-card,
.sidebar-link .bi-credit-card-2-front,
.sidebar-link .bi-list-columns,
.sidebar-link .bi-arrow-left-right,
.sidebar-link .bi-qr-code,
.sidebar-link .bi-receipt,
.sidebar-link .bi-percent,
.sidebar-link .bi-tags,
.sidebar-link .bi-safe,
.sidebar-link .bi-sliders,
.sidebar-link .bi-wallet2 { color: #34d399; }

/* People and hierarchy. */
.sidebar-link .bi-people,
.sidebar-link .bi-person-plus,
.sidebar-link .bi-person-badge,
.sidebar-link .bi-person-gear,
.sidebar-link .bi-person-check,
.sidebar-link .bi-diagram-3 { color: #fbbf24; }

/* Services the customer actually buys. */
.sidebar-link .bi-plus-square,
.sidebar-link .bi-card-text,
.sidebar-link .bi-card-checklist,
.sidebar-link .bi-grid-3x3-gap,
.sidebar-link .bi-card-heading { color: #a78bfa; }

/* Support and self-service. */
.sidebar-link .bi-life-preserver,
.sidebar-link .bi-headset,
.sidebar-link .bi-download,
.sidebar-link .bi-patch-check,
.sidebar-link .bi-chat-dots,
.sidebar-link .bi-inbox { color: #22d3ee; }

/* Overview, search and reporting. */
.sidebar-link .bi-speedometer2,
.sidebar-link .bi-graph-up,
.sidebar-link .bi-search,
.sidebar-link .bi-activity,
.sidebar-link .bi-journal-text,
.sidebar-link .bi-check2-square { color: #60a5fa; }

/* Things that want attention: alerts, faults, reversals. */
.sidebar-link .bi-bell,
.sidebar-link .bi-bug,
.sidebar-link .bi-shield-exclamation,
.sidebar-link .bi-megaphone,
.sidebar-link .bi-megaphone-fill,
.sidebar-link .bi-arrow-counterclockwise { color: #fb7185; }

/* Content, branding and company identity. */
.sidebar-link .bi-images,
.sidebar-link .bi-file-text,
.sidebar-link .bi-palette,
.sidebar-link .bi-building,
.sidebar-link .bi-journal-code,
.sidebar-link .bi-cloud-arrow-up { color: #f472b6; }

/* Infrastructure and configuration — deliberately the quietest family, so the
   operational plumbing does not compete with the day-to-day work above it. */
.sidebar-link .bi-gear,
.sidebar-link .bi-toggles,
.sidebar-link .bi-tools,
.sidebar-link .bi-hdd,
.sidebar-link .bi-hdd-stack,
.sidebar-link .bi-hdd-network,
.sidebar-link .bi-code-slash,
.sidebar-link .bi-archive,
.sidebar-link .bi-clock-history,
.sidebar-link .bi-envelope-gear,
.sidebar-link .bi-ui-checks-grid { color: #94a3b8; }

/* The active item is the one place the tenant's colour appears in the sidebar,
   which is enough to read as branding without colouring the whole panel. */
.sidebar-link.active {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}
.sidebar-link.active i { color: #fff; }
.sidebar-link.active:hover { background: var(--brand); filter: brightness(1.06); }

/* Keyboard focus must stay visible against the dark panel. */
.sidebar-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .55);
    outline-offset: -2px;
}

/* A thin, dark scrollbar — the default light one is jarring on this panel. */
.app-sidebar { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.app-sidebar::-webkit-scrollbar { width: 8px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14);
    border-radius: 8px;
}
.app-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .24); }

/* Offcanvas header, on tablet and mobile. */
.app-sidebar .offcanvas-header {
    border-bottom: 1px solid var(--sidebar-divider);
    color: #fff;
}
.app-sidebar .offcanvas-title { color: #fff; font-size: 1rem; }

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-main > .container-fluid { flex: 1 0 auto; }

.app-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: .85rem 0;
    color: var(--ink-muted);
}

/* --- Cards and tables --------------------------------------------------- */
.card {
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: .85rem 1.1rem;
    font-weight: 600;
}

.table { font-size: .875rem; }
.table > thead > tr > th {
    background: #fafbfd;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table > tbody > tr > td { vertical-align: middle; }

.table-sticky { max-height: 70vh; overflow: auto; }
.table-sticky thead th { position: sticky; top: 0; z-index: 2; }

.mono {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: .8rem;
}

/* Amount columns: tabular figures so digits line up down the column. */
.amount {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}
.amount-credit { color: #12805c; }
.amount-debit  { color: #b02a37; }

/* --- Stat tiles --------------------------------------------------------- */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    height: 100%;
}
.stat-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: .35rem;
}
.stat-value {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-meta { font-size: .78rem; color: var(--ink-muted); margin-top: .3rem; }

.stat-icon {
    display: inline-grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 12px;
    font-size: 1.15rem;
}
/* Coloured accent along the top edge, and a lift on the clickable cards. */
.stat-card { position: relative; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.stat-card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--accent, transparent);
}
.stat-accent-brand   { --accent: var(--brand); }
.stat-accent-info    { --accent: #0dcaf0; }
.stat-accent-warning { --accent: #ffc107; }
.stat-accent-success { --accent: #198754; }
a.stat-card:hover {
    box-shadow: 0 8px 20px rgba(16, 24, 40, .08);
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}

/* --- Dashboard ---------------------------------------------------------- */
.dash-hero {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
    border-radius: 16px;
    color: #fff;
    background:
        radial-gradient(600px 220px at 100% 0%, rgba(255, 255, 255, .16), transparent 70%),
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 92%, #000), var(--brand) 60%, color-mix(in srgb, var(--brand) 75%, #1c2434));
    box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 22%, transparent);
}
.dash-hero-greet { font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .8; }
.dash-hero h1 { font-size: 1.45rem; font-weight: 700; margin: .15rem 0 .5rem; color: #fff; }
.dash-hero-sub { display: flex; flex-wrap: wrap; gap: .4rem; }
.dash-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .76rem; font-weight: 500;
    padding: .25rem .6rem; border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
}
.dash-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.dash-period {
    display: inline-flex; padding: 3px; border-radius: 10px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
}
.dash-period button {
    border: 0; background: transparent; color: rgba(255, 255, 255, .85);
    font-size: .8rem; font-weight: 600; padding: .35rem .75rem; border-radius: 8px;
    transition: background .15s, color .15s;
}
.dash-period button:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.dash-period button.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.dash-hero .btn-light { color: var(--brand); border-color: #fff; }

.service-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem; padding: .9rem;
}
.service-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: .45rem;
    padding: .9rem; border-radius: 12px;
    border: 1px solid var(--border); background: #fff;
    text-decoration: none; color: var(--ink);
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.service-tile:hover {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
    box-shadow: 0 8px 20px rgba(16, 24, 40, .08);
    transform: translateY(-2px);
}
.service-tile-icon {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 11px; font-size: 1.15rem;
    color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, #fff);
}
.service-tile-name { font-size: .84rem; font-weight: 600; line-height: 1.25; }
.service-tile-meta { font-size: .72rem; color: #198754; display: inline-flex; align-items: center; gap: .3rem; }
.service-tile.is-off { opacity: .6; pointer-events: none; }
.service-tile.is-off .service-tile-meta { color: var(--ink-muted); }
.service-tile.is-off .service-tile-icon { color: var(--ink-muted); background: var(--surface); }

@media (max-width: 575.98px) {
    .dash-hero { padding: 1.1rem 1.1rem; }
    .dash-hero h1 { font-size: 1.25rem; }
    .service-grid { grid-template-columns: 1fr; }
}

/* --- Badges ------------------------------------------------------------- */
.badge {
    font-weight: 600;
    letter-spacing: .02em;
    padding: .34em .6em;
}

/* --- Auth ---------------------------------------------------------------
   Split screen: a brand panel on the left (hidden on small screens) and the
   form on the right. Everything on the brand panel is read from the company
   profile — colour, logo, tagline, background image, support contact — so a
   white-label tenant gets its own page without touching the template. */
.auth-body {
    min-height: 100vh;
    margin: 0;
    background: var(--surface);
}
.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* Brand panel */
.auth-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(160deg,
            color-mix(in srgb, var(--brand) 92%, #000) 0%,
            var(--brand) 55%,
            color-mix(in srgb, var(--brand) 70%, #1c2434) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
}
.auth-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: .22;
    mix-blend-mode: luminosity;
}
.auth-hero::before,
.auth-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    pointer-events: none;
}
.auth-hero::before { width: 520px; height: 520px; right: -180px; top: -200px; }
.auth-hero::after  { width: 380px; height: 380px; left: -160px; bottom: -180px; }
.auth-hero > * { position: relative; z-index: 1; }

.auth-hero-logo img {
    max-height: 64px; max-width: 220px;
    background: #fff; padding: .5rem .8rem; border-radius: 12px;
}
.auth-hero-logo .brand-mark-lg {
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
}
.auth-hero h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
    margin: 0 0 .75rem;
}
.auth-hero .lead-text {
    font-size: 1.02rem;
    color: rgba(255, 255, 255, .82);
    max-width: 30rem;
}
.auth-features {
    list-style: none; padding: 0; margin: 2rem 0 0;
    display: grid; gap: .8rem;
}
.auth-features li {
    display: flex; align-items: center; gap: .8rem;
    font-size: .95rem; color: rgba(255, 255, 255, .92);
}
.auth-features li i {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 1rem;
}
.auth-hero-foot {
    font-size: .85rem; color: rgba(255, 255, 255, .72);
}
.auth-hero-foot a { color: #fff; text-decoration: none; font-weight: 500; }
.auth-hero-foot a:hover { text-decoration: underline; }

/* Form panel */
.auth-pane {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 2.5rem 1.5rem;
    background: #fff;
}
.auth-wrap { width: 100%; max-width: 440px; }
.auth-card { background: transparent; }
.auth-brand { margin-bottom: 1.6rem; }
.auth-brand .auth-mobile-logo { display: none; }
.auth-brand h1 { font-weight: 700; letter-spacing: -.01em; }
.auth-brand .text-muted { font-size: .95rem; }

.auth-card .form-label { font-weight: 600; font-size: .86rem; color: var(--ink); }
.auth-card .input-group-text {
    background: #f8f9fc; border-color: var(--border); color: var(--ink-muted);
}
.auth-card .form-control { border-color: var(--border); }
.auth-card .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 18%, transparent);
}
.auth-card .form-control:focus + .btn,
.auth-card .input-group:focus-within .input-group-text {
    border-color: var(--brand);
}
.auth-card .btn-brand { padding: .75rem 1rem; font-weight: 600; border-radius: 10px; }
.auth-card .btn-brand.btn-lg { font-size: 1rem; }
.auth-card a { color: var(--brand); }
.auth-footnote {
    margin-top: 2rem; padding-top: 1.2rem;
    border-top: 1px solid var(--border);
    font-size: .8rem; color: var(--ink-muted); text-align: center;
}
.auth-footnote a { color: var(--ink-muted); text-decoration: none; }
.auth-footnote a:hover { color: var(--brand); }

/* Wider variant for the registration form (two-column rows). */
.auth-wrap-wide { max-width: 640px; }

/* Group heading inside a long form. */
.auth-section-title {
    display: flex; align-items: center; gap: .6rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ink-muted);
    margin: 1.4rem 0 .9rem;
}
.auth-section-title::after {
    content: ""; flex: 1; height: 1px; background: var(--border);
}
.auth-section-title:first-child { margin-top: 0; }

/* Success / confirmation state. */
.auth-success { text-align: center; padding: .5rem 0 1rem; }
.auth-success-icon {
    display: inline-grid; place-items: center;
    width: 72px; height: 72px; border-radius: 50%;
    margin-bottom: 1rem;
    background: color-mix(in srgb, var(--brand) 12%, #fff);
    color: var(--brand);
    font-size: 2rem;
}
.auth-success h5 { font-weight: 700; }
.auth-code-box {
    border: 1px dashed color-mix(in srgb, var(--brand) 45%, #fff);
    background: color-mix(in srgb, var(--brand) 6%, #fff);
    border-radius: 12px; padding: 1rem; text-align: center;
}
.auth-code-box .code {
    font-size: 1.5rem; font-weight: 700; letter-spacing: .08em;
    color: var(--brand); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 991.98px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-body {
        background:
            radial-gradient(900px 420px at 100% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent),
            var(--surface);
    }
    .auth-pane { padding: 1.5rem 1rem; background: transparent; min-height: 100vh; }
    .auth-card {
        background: #fff; border-radius: 16px; padding: 1.75rem 1.5rem;
        box-shadow: 0 10px 30px rgba(16, 24, 40, .08);
    }
    .auth-brand { text-align: center; }
    .auth-brand .auth-mobile-logo { display: block; margin-bottom: .75rem; }
    .auth-brand .auth-mobile-logo img { max-height: 56px; max-width: 200px; }
}

/* --- Utilities ---------------------------------------------------------- */
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--ink-muted); }
.empty-state i { font-size: 2.2rem; opacity: .45; display: block; margin-bottom: .6rem; }

.filter-bar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1.15rem;
}
.page-header h1 { font-size: 1.3rem; font-weight: 700; margin: 0; }
.page-header .subtitle { font-size: .82rem; color: var(--ink-muted); margin-top: .15rem; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
    position: relative;
    padding: 0 0 1.1rem 1.5rem;
    border-left: 2px solid var(--border);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
    content: '';
    position: absolute;
    left: -6px; top: 3px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--brand);
}

/* A visible reminder that this figure is authoritative money. */
.ledger-note {
    font-size: .78rem;
    color: var(--ink-muted);
    border-left: 3px solid var(--brand);
    padding-left: .7rem;
}

/* --- Breadcrumbs ---------------------------------------------------------
   Deliberately quiet: this is orientation, not navigation people hunt for. */
.app-breadcrumb { margin-bottom: .9rem; }
.app-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem .45rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .8rem;
    color: var(--ink-muted);
}
.app-breadcrumb li { display: flex; align-items: center; gap: .45rem; }
.app-breadcrumb li + li::before {
    content: "\203A";
    color: var(--ink-muted);
    opacity: .7;
}
.app-breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.app-breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.app-breadcrumb [aria-current="page"] span { color: var(--ink); font-weight: 500; }

/* ---------------------------------------------------------------------------
   Banner slider
   ---------------------------------------------------------------------------
   Every banner occupies the SAME fixed-height box whatever its own proportions,
   so the dashboard below it never moves as the slides change. `contain` rather
   than `cover` because these are artwork with text printed across them —
   cropping to fill the box would cut the message in half.

   The height is fluid between a floor and a ceiling: tall enough to read on a
   phone, never tall enough to push the wallet and stats below the fold, which
   is what a natural-height stack did.
--------------------------------------------------------------------------- */
.banner-slider { background: #0d1117; border-radius: .5rem; overflow: hidden; }

.banner-slider .banner-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: clamp(120px, 20vw, 260px);
}

.banner-slider .banner-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* The default controls vanish against a light banner; a scrim keeps them
   visible on artwork of any colour. */
.banner-slider .carousel-control-prev,
.banner-slider .carousel-control-next { width: 8%; opacity: .65; }
.banner-slider .carousel-control-prev:hover,
.banner-slider .carousel-control-next:hover { opacity: 1; }
.banner-slider .carousel-control-prev-icon,
.banner-slider .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, .45);
    border-radius: 50%;
    padding: .85rem;
    background-size: 45%;
}

.banner-slider .carousel-indicators { margin-bottom: .35rem; }
.banner-slider .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
}

@media print {
    .app-navbar, .app-sidebar, .app-footer, .filter-bar, .btn,
    .app-breadcrumb, .banner-slider { display: none !important; }
    .app-shell { display: block; }
    .card { border: none; box-shadow: none; }
}
