/* ============================================================================
 * Leja — premium theme layer (application-owned).
 * Extends Inspinia; never edit vendor files. Implements the official Leja brand
 * (Leja Indigo #4F46E5 primary, Tapa Gold #E0A33C accent, Space Grotesk +
 * Hanken Grotesk). Money/positive stays semantic green. Tabular figures.
 * ========================================================================== */

/* ---- Brand fonts (self-hosted, no CDN) ----------------------------------- */
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/hanken-grotesk-400.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/hanken-grotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/hanken-grotesk-600.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/hanken-grotesk-700.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/space-grotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/space-grotesk-600.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/space-grotesk-700.woff2') format('woff2'); }

/* ---- Leja brand palette -------------------------------------------------- */
:root {
    --leja-accent: #4F46E5;         /* Leja Indigo (primary) */
    --leja-accent-rgb: 79, 70, 229;
    --leja-iris: #6E62F0;           /* gradient top */
    --leja-deep: #3A33C9;           /* gradient base */
    --leja-gold: #E0A33C;           /* Tapa Gold (accent · value) */
    --leja-money: #0aa884;          /* positive / cash-in (semantic green) */
    --leja-ink: #15172B;            /* headings / dark surface */
    --leja-muted: #7b8794;
    --leja-surface: #ffffff;
    --leja-bg: #f4f6fb;
    --leja-cloud: #F7F8FC;          /* brand "Cloud" neutral */
    --leja-border: #e9edf3;
    --leja-radius: 14px;
    --leja-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
    --leja-shadow-md: 0 4px 12px rgba(16, 24, 40, .06), 0 2px 4px rgba(16, 24, 40, .04);
    --leja-shadow-lg: 0 18px 40px -12px rgba(16, 24, 40, .22);
}

/* Rebrand Inspinia + Bootstrap primary to Leja Indigo */
:root, [data-bs-theme="light"] {
    --ins-primary: #4F46E5;
    --ins-link-color: #4F46E5;
    --ins-link-hover-color: #3A33C9;
    --bs-primary: #4F46E5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: #4F46E5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #3A33C9;
}

body {
    background: var(--leja-bg);
    color: #3a4658;
    font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h1, h2, h3, h4, h5, h6, .brand-font, .navbar-brand {
    font-family: 'Space Grotesk', 'Hanken Grotesk', system-ui, sans-serif;
}

/* ---- Typography & figures ------------------------------------------------ */
h1, h2, h3, h4, h5, h6, .fw-bold { color: var(--leja-ink); letter-spacing: -.01em; }
.text-money, .stat-value { font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---- Cards: soft elevation + hover lift ---------------------------------- */
/* Tighter rhythm than Inspinia's stock 1.25rem — dense, ultra-premium fintech. */
.card {
    --ins-card-spacer-y: 1.05rem;
    --ins-card-spacer-x: 1.2rem;
    --ins-card-cap-padding-y: .8rem;
    --ins-card-cap-padding-x: 1.2rem;
    border: 1px solid var(--leja-border);
    border-radius: var(--leja-radius);
    box-shadow: var(--leja-shadow-sm);
    margin-bottom: 1rem;
    transition: box-shadow .2s ease, transform .2s ease;
}
.card .card-header { border-bottom: 1px solid var(--leja-border); font-weight: 600; }
/* Equal-height cards in a grid get spacing from the row, not their own margin. */
.row > [class*="col"] > .card.h-100 { margin-bottom: 0; }
/* Vertical gap between cards when a dashboard row wraps (tablet/mobile). */
.dash-row { row-gap: 1rem; }
.card.card-hover:hover { box-shadow: var(--leja-shadow-md); transform: translateY(-2px); }

/* ---- Breadcrumb ---------------------------------------------------------- */
.leja-breadcrumb { padding: .85rem 0 .15rem; }
.leja-breadcrumb .breadcrumb {
    display: inline-flex; align-items: center;
    margin: 0; padding: .34rem .8rem;
    font-size: .82rem; --bs-breadcrumb-divider: '›';
    background: var(--leja-cloud);
    border: 1px solid var(--leja-border);
    border-radius: 999px;
}
.leja-breadcrumb .breadcrumb-item a { color: var(--leja-muted); text-decoration: none; }
.leja-breadcrumb .breadcrumb-item a:hover { color: var(--leja-accent); }
.leja-breadcrumb .breadcrumb-item.active { color: var(--leja-ink); font-weight: 600; }
.leja-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #c2c9d4; }

/* ---- Page header --------------------------------------------------------- */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-header .page-title { margin: 0; font-size: 1.35rem; font-weight: 700; }
.page-header .page-sub { margin: .15rem 0 0; color: var(--leja-muted); font-size: .9rem; }

/* ---- KPI / stat cards ---------------------------------------------------- */
.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.stat-card .stat-label { color: var(--leja-muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { font-size: 1.55rem; font-weight: 700; color: var(--leja-ink); margin: .2rem 0 .1rem; line-height: 1.15; }
.stat-card .stat-meta { font-size: .78rem; color: var(--leja-muted); }
.stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; flex: 0 0 auto;
}
.stat-icon.is-primary { background: rgba(79,70,229,.12); color: var(--leja-accent); }
.stat-icon.is-emerald { background: rgba(10,207,151,.14); color: #0aa884; }
.stat-icon.is-amber   { background: rgba(248,172,89,.16); color: #e9930f; }
.stat-icon.is-rose    { background: rgba(237,85,101,.14); color: #ed5565; }
.stat-icon.is-indigo  { background: rgba(107,94,174,.14); color: #6b5eae; }
/* thin accent rule along the top of a stat card */
.stat-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--leja-accent), rgba(79,70,229,.25));
    opacity: .9;
}

/* trend chips */
.trend { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; }
.trend-up   { color: #0aa884; background: rgba(10,168,132,.1); }
.trend-down { color: #ed5565; background: rgba(237,85,101,.1); }
.trend-flat { color: var(--leja-muted); background: rgba(123,135,148,.1); }

/* ---- Buttons ------------------------------------------------------------- */
.btn { font-weight: 600; border-radius: 10px; }
.btn-primary {
    background: linear-gradient(135deg, var(--leja-accent), #3A33C9);
    border: none; box-shadow: 0 6px 16px -6px rgba(79,70,229,.55);
}
.btn-primary:hover, .btn-primary:focus { filter: brightness(1.04); box-shadow: 0 8px 20px -6px rgba(79,70,229,.6); }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; }
/* Soft/light quick-action button — premium, low-emphasis */
.btn-soft {
    background: #fff; color: var(--leja-ink);
    border: 1px solid var(--leja-border);
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.btn-soft:hover, .btn-soft:focus {
    background: rgba(79,70,229,.06); color: var(--leja-accent);
    border-color: rgba(79,70,229,.35);
}
.btn-soft i { color: var(--leja-accent); }
/* Quick-action cluster sizing */
.quick-actions .btn-sm { font-size: .8rem; padding: .34rem .7rem; border-radius: 9px; }

/* Document action toolbar (quote/invoice detail) */
.action-bar .btn-group .btn-soft { box-shadow: none; }
.action-bar .btn-group .btn-soft + .btn-soft { border-left-color: transparent; }
.action-bar .dropdown-menu { min-width: 13rem; padding: .35rem; border-color: var(--leja-border); border-radius: 12px; }
.action-bar .dropdown-menu form { margin: 0; }
.action-bar .dropdown-item { border-radius: 8px; padding: .5rem .6rem; font-size: .86rem; display: flex; align-items: center; }
.action-bar .dropdown-item:hover { background: var(--leja-cloud); }
.action-bar .dropdown-item.text-danger:hover { background: rgba(237,85,101,.08); }
.action-bar .dropdown-item.text-success:hover { background: rgba(10,168,132,.08); }

/* ---- Rich text (Trix) ---------------------------------------------------- */
.rich-text trix-editor {
    border: 1px solid var(--leja-border); border-radius: 0 0 10px 10px;
    padding: .65rem .8rem; background: #fff; font-size: .9rem; line-height: 1.55;
    color: #3a4658;
}
.rich-text trix-editor:focus { border-color: rgba(79,70,229,.45); box-shadow: 0 0 0 .2rem rgba(79,70,229,.12); outline: none; }
.rich-text trix-toolbar { margin-bottom: 0; }
.rich-text trix-toolbar .trix-button-row { background: var(--leja-cloud); border: 1px solid var(--leja-border); border-bottom: 0; border-radius: 10px 10px 0 0; padding: .25rem .4rem; }
.rich-text trix-toolbar .trix-button-group { border-color: var(--leja-border); margin-bottom: 0; }
.rich-text trix-toolbar .trix-button { border-bottom: 0; }
.rich-text trix-toolbar .trix-button.trix-active { background: rgba(79,70,229,.12); color: var(--leja-accent); }
/* No file attachments — we hide the tool and block drops in JS */
.rich-text trix-toolbar .trix-button-group--file-tools { display: none; }
.rich-text trix-content { font-size: .9rem; }
.rich-text trix-content h1 { font-size: 1.15rem; }
.rich-text trix-content ul, .rich-text trix-content ol { padding-left: 1.4rem; }
/* Rendered rich text on documents (show / public) */
.rt-content { text-align: justify; }
.rt-content ol, .rt-content ul { padding-left: 1.3rem; margin-bottom: .5rem; }
.rt-content li { margin-bottom: .2rem; }
.rt-content h1 { font-size: 1.02rem; font-weight: 700; margin: .55rem 0 .25rem; color: var(--leja-ink); }
.rt-content p { margin-bottom: .5rem; }
.rt-content p:last-child { margin-bottom: 0; }

/* ---- Activity bar (quote views / decision) ------------------------------- */
.activity-bar .act-chip { display: flex; align-items: center; gap: .55rem; }
.activity-bar .act-ico { width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; background: rgba(123,135,148,.12); color: var(--leja-muted); }
.activity-bar .act-ico.is-accent { background: rgba(79,70,229,.12); color: var(--leja-accent); }
.activity-bar .act-ico.is-on { background: rgba(10,168,132,.14); color: #0a8f6f; }
.activity-bar .act-ico.is-amber { background: rgba(224,163,60,.16); color: #c8862a; }
.activity-bar .act-ico.is-red { background: rgba(237,85,101,.14); color: #d83a4e; }
.activity-bar .act-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--leja-muted); font-weight: 700; }
.activity-bar .act-v { font-size: .85rem; font-weight: 600; color: var(--leja-ink); }

/* ---- Premium document (quote/invoice) — "Refined Classic" ---------------- */
.quote-doc .doc-name { font-family: 'Space Grotesk','Hanken Grotesk',sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--leja-ink); letter-spacing: -.01em; line-height: 1.15; }
.quote-doc .doc-tag { color: var(--leja-gold); font-weight: 700; font-size: .9rem; }
.quote-doc .doc-word { font-family: 'Space Grotesk','Hanken Grotesk',sans-serif; font-weight: 700; font-size: 1.7rem; letter-spacing: .14em; color: #C3C7DA; }
.quote-doc .doc-diamond { width: 8px; height: 8px; display: inline-block; transform: rotate(45deg); }
.quote-doc .doc-rule { margin: 1.2rem 0 1.5rem; }
.quote-doc .doc-rule .gold { width: 64px; height: 3px; background: var(--leja-gold); border-radius: 2px; }
.quote-doc .doc-rule .line { height: 1px; background: var(--leja-border); margin-top: 1px; }
.quote-doc .doc-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #AAB0C4; font-weight: 700; }
.quote-doc .doc-items { border: 1px solid var(--leja-border); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.quote-doc .doc-items thead th { background: var(--doc-accent, var(--leja-accent)); color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; padding: .65rem .8rem; border: 0; }
.quote-doc .doc-items tbody td { padding: .7rem .8rem; border-top: 0; border-bottom: 1px solid #F0F2F7; font-size: .9rem; vertical-align: top; }
.quote-doc .doc-items tbody tr:last-child td { border-bottom: 0; }
.quote-doc .doc-items tbody td.amt { font-weight: 700; color: var(--leja-ink); }
.quote-doc .doc-totalbox { display: flex; justify-content: space-between; align-items: center; border-radius: 10px; padding: .7rem 1rem; margin-top: .65rem; }
.quote-doc .doc-totalbox .lbl { font-weight: 700; }
.quote-doc .doc-totalbox .amt { font-weight: 700; font-size: 1.4rem; }
.quote-doc .text-justify { text-align: justify; }

/* ---- Badges / statuses --------------------------------------------------- */
.badge { font-weight: 600; letter-spacing: .2px; border-radius: 8px; padding: .35em .6em; }
.badge-status { border-radius: 999px; }
.badge-draft     { background-color: #eef1f5; color: #5b6776; }
.badge-sent      { background-color: #e3efff; color: #1567d3; }
.badge-paid      { background-color: #def4ec; color: #0a8f6f; }
.badge-partial   { background-color: #fff3d6; color: #b9770a; }
.badge-overdue   { background-color: #fde3e6; color: #d83a4e; }
.badge-cancelled { background-color: #eceef1; color: #7b8794; }

/* ---- Tables -------------------------------------------------------------- */
.table > thead th {
    text-transform: uppercase; font-size: .72rem; letter-spacing: .05em;
    color: var(--leja-muted); font-weight: 700; border-bottom: 1px solid var(--leja-border);
}
.table > tbody td { vertical-align: middle; border-color: #f0f2f6; }
.table-hover > tbody > tr:hover > * { background-color: rgba(79,70,229,.035); }

/* ---- DataTables 2.x (Bootstrap 5) controls polish ------------------------ */
/* Length "per page" selector: give the chevron room so it never sits on the number. */
div.dt-length, div.dt-search { display: flex; align-items: center; gap: .5rem; color: var(--leja-muted); font-size: .82rem; }
div.dt-length label, div.dt-search label { margin: 0; display: inline-flex; align-items: center; gap: .5rem; }
div.dt-length select.form-select {
    width: auto; min-width: 4.9rem;
    padding: .3rem 2rem .3rem .7rem;
    font-size: .82rem; border-radius: 9px;
    border-color: var(--leja-border);
}
div.dt-search input.form-control {
    width: auto; min-width: 13rem;
    padding: .38rem .8rem; font-size: .85rem; border-radius: 9px;
    border-color: var(--leja-border);
}
div.dt-length select.form-select:focus,
div.dt-search input.form-control:focus {
    border-color: rgba(79,70,229,.45); box-shadow: 0 0 0 .2rem rgba(79,70,229,.12);
}
/* Info + pagination */
div.dt-info { color: var(--leja-muted); font-size: .82rem; }
div.dt-paging .pagination { margin: 0; }
div.dt-paging .page-link { border: none; border-radius: 8px; margin: 0 1px; color: var(--leja-ink); font-size: .85rem; padding: .35rem .7rem; }
div.dt-paging .page-link:hover { background: rgba(79,70,229,.08); color: var(--leja-accent); }
div.dt-paging .page-item.active .page-link { background: var(--leja-accent); color: #fff; box-shadow: 0 4px 12px -4px rgba(79,70,229,.5); }
div.dt-paging .page-item.disabled .page-link { color: #c2c9d4; background: transparent; }

/* ---- Avatars ------------------------------------------------------------- */
.avatar-initial {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--leja-accent), #3A33C9);
}

/* ---- Sidebar polish (works with data-menu-color=gradient) ----------------- */
.sidenav-menu .side-nav-link { border-radius: 10px; margin: 1px .6rem; font-weight: 500; }
.sidenav-menu .side-nav-link.active { font-weight: 600; }
.sidenav-menu .side-nav-link .menu-icon { font-size: 1.15rem; }
.sidenav-menu .side-nav-title { letter-spacing: .12em; font-size: .68rem; opacity: .75; }
.sidenav-menu .side-nav-link .badge { font-size: .6rem; padding: .2em .4em; }

/* ---- Onboarding checklist ------------------------------------------------ */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px dashed var(--leja-border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .check {
    width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
    background: #eef1f5; color: #aeb6c2;
}
.checklist li.done .check { background: rgba(10,168,132,.14); color: #0aa884; }
.checklist li.done .ck-label { color: var(--leja-muted); text-decoration: line-through; }
.checklist .ck-label { font-weight: 500; }

/* ---- Empty states -------------------------------------------------------- */
.empty-state { text-align: center; padding: 1.6rem 1rem; color: var(--leja-muted); }
.empty-state .es-icon {
    width: 52px; height: 52px; border-radius: 14px; margin: 0 auto .65rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: 26px;
    background: rgba(79,70,229,.1); color: var(--leja-accent);
}

/* ---- Auth (premium two-panel) ------------------------------------------- */
.auth-split { min-height: 100vh; }
.auth-aside {
    position: relative; color: #fff; overflow: hidden;
    background: linear-gradient(150deg, var(--leja-iris) 0%, var(--leja-deep) 45%, var(--leja-ink) 100%);
}
.auth-aside::after {
    content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
    background-image: radial-gradient(var(--leja-gold) 1.2px, transparent 1.2px);
    background-size: 26px 26px;
}
.auth-aside .aside-inner { position: relative; z-index: 2; padding: 3rem; height: 100%; display: flex; flex-direction: column; }
.auth-aside .aside-brand { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; font-family: 'Space Grotesk', sans-serif; }
.auth-aside .aside-feature { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1.1rem; }
.auth-aside .aside-feature i { font-size: 1.25rem; color: var(--leja-gold); margin-top: .1rem; }
.auth-card-wrap { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; min-height: 100vh; }
.auth-card-wrap .auth-inner { width: 100%; max-width: 410px; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px; font-weight: 800; color: #fff; font-size: 1.3rem;
    background: linear-gradient(135deg, var(--leja-accent), #3A33C9);
    box-shadow: 0 8px 18px -6px rgba(79,70,229,.6);
}

/* form controls */
.form-control, .form-select { border-radius: 10px; border-color: #e3e8ef; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--leja-accent); box-shadow: 0 0 0 .2rem rgba(79,70,229,.15); }
.form-label { font-weight: 600; font-size: .85rem; color: #46505f; }

/* Select2 (Bootstrap-5 theme): the theme draws its chevron via background-image on
   .select2-selection--single, but this Select2 build renders .select2-selection__arrow
   as a SIBLING of __rendered (the theme's hide selector expects it nested), so the
   stray arrow flows below the box as a 2nd chevron. Hide it — keep the real one. */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow { display: none !important; }
/* Belt-and-braces: keep the enhanced native <select> fully out of layout. */
select.select2-hidden-accessible { display: none !important; }
/* Match the Select2 control height/radius to our other inputs. */
.select2-container--bootstrap-5 .select2-selection { border-radius: 10px; border-color: #e3e8ef; min-height: calc(1.5em + 1.1rem + 2px); }
.select2-container--bootstrap-5 .select2-selection--single { padding-top: .35rem; padding-bottom: .35rem; }

/* ---- Page loader --------------------------------------------------------- */
#leja-preloader {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    background: var(--leja-bg);
    transition: opacity .35s ease, visibility .35s ease;
}
#leja-preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.leja-spinner {
    width: 46px; height: 46px; border-radius: 50%;
    border: 3px solid rgba(79,70,229,.18); border-top-color: var(--leja-accent);
    animation: leja-spin .8s linear infinite;
}
.leja-preloader-brand { margin-top: 1rem; font-weight: 800; font-size: 1.1rem; color: var(--leja-ink); letter-spacing: -.02em; }
@keyframes leja-spin { to { transform: rotate(360deg); } }

/* slim top progress bar shown during navigation */
#leja-topbar-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    z-index: 2001; background: linear-gradient(90deg, var(--leja-accent), #6fe0c4);
    box-shadow: 0 0 8px rgba(79,70,229,.6); opacity: 0;
    transition: width .25s ease, opacity .25s ease;
}
#leja-topbar-progress.is-active { opacity: 1; }

/* button busy state already handled in JS via spinner-border */

/* ---- Misc ---------------------------------------------------------------- */
.text-money { text-align: right; white-space: nowrap; }
.app-topbar { backdrop-filter: saturate(1.1); }
.nav-tabs .nav-link { font-weight: 600; color: var(--leja-muted); border: none; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--leja-accent); border-bottom-color: var(--leja-accent); background: transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d4dae3; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c2cf; background-clip: content-box; }

/* ---- Leja brand: sidebar + login aside ----------------------------------- */
[data-menu-color="gradient"] .sidenav-menu,
.wrapper .sidenav-menu {
    background: linear-gradient(165deg, #2b2670 0%, #1b1942 55%, #15172B 100%) !important;
}
.sidenav-menu .side-nav-link.active {
    box-shadow: inset 3px 0 0 var(--leja-gold);
}
/* Logo lockup (mark + wordmark) */
.leja-logo { display: inline-flex; align-items: center; gap: .7rem; }
.leja-logo .leja-mark { width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; }
.leja-logo .leja-word { font-family: 'Space Grotesk','Hanken Grotesk',sans-serif; font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; line-height: 1; }

/* Sidebar bottom: tenant / workspace context card */
.wrapper .sidenav-menu { display: flex; flex-direction: column; }
.sidenav-menu .scrollbar { flex: 1 1 auto; min-height: 0; }
.sidenav-footer { flex: 0 0 auto; margin-top: auto; padding: .7rem .8rem; border-top: 1px solid rgba(255,255,255,.09); }
.sidenav-footer .ws-card { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 12px; background: rgba(255,255,255,.06); }
.sidenav-footer .ws-avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; background: linear-gradient(135deg, var(--leja-gold), #c8862a); }
.sidenav-footer .ws-text { min-width: 0; line-height: 1.32; }
.sidenav-footer .ws-title { display: flex; align-items: center; gap: .4rem; font-size: 11px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidenav-footer .ws-badge { flex: 0 0 auto; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--leja-gold); background: rgba(224,163,60,.16); padding: 1px 6px; border-radius: 999px; }
.sidenav-footer .ws-sub { display: block; font-size: 11px; color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Collapsed (condensed) sidebar: hide footer text, keep the avatar centred */
[data-sidenav-size="condensed"] .sidenav-footer { padding: .6rem; }
[data-sidenav-size="condensed"] .sidenav-footer .ws-card { justify-content: center; padding: .4rem; }
[data-sidenav-size="condensed"] .sidenav-footer .ws-text { display: none; }

/* ---- Login aside: Pacific brand art ------------------------------------- */
.auth-aside .aside-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.auth-aside .aside-art img { position: absolute; display: block; }
.auth-aside .aa-topo  { top: -50px; right: -80px; width: 360px; opacity: .12; }
.auth-aside .aa-arch  { top: 30%; right: -40px; width: 320px; opacity: .16; }
.auth-aside .aa-waves { bottom: 60px; left: -24px; width: 116%; opacity: .15; }
.auth-aside .aa-tapa  { bottom: 26px; left: 3rem; width: 250px; opacity: .6; }
.auth-aside .aa-palm  { bottom: 78px; right: 8%; width: 140px; opacity: .22; }

/* ---- Login art: silent ambient motion ----------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .auth-aside .aa-topo  { animation: leja-spin 110s linear infinite; transform-origin: center; }
    .auth-aside .aa-arch  { animation: leja-spin-rev 160s linear infinite; transform-origin: center; }
    .auth-aside .aa-palm  { animation: leja-sway 9s ease-in-out infinite; transform-origin: bottom center; }
    .auth-aside .aa-waves { animation: leja-drift 16s ease-in-out infinite; }
    .auth-aside .aa-tapa  { animation: leja-shimmer 7s ease-in-out infinite; }
}
@keyframes leja-spin-rev { to { transform: rotate(-360deg); } }
@keyframes leja-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes leja-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-20px); } }
@keyframes leja-shimmer { 0%, 100% { opacity: .6; } 50% { opacity: .32; } }

/* ============================================================================
 * Login v2 — card on light + diamond-watermark aside
 * ========================================================================== */
.auth-card-wrap { background: #eef1f6; }
.auth-inner { max-width: 440px; }
.auth-card-box {
    background: #fff; border-radius: 22px; padding: 2.5rem 2.25rem;
    box-shadow: 0 24px 60px -24px rgba(16,24,40,.28), 0 2px 8px rgba(16,24,40,.04);
    border: 1px solid #eef0f5;
}
@media (max-width: 575px) { .auth-card-box { padding: 1.75rem 1.4rem; } }

/* Inputs with leading icons + password toggle */
.auth-card-box .input-group-text { background: #fff; border-color: #e3e8ef; color: #98a2b3; }
.auth-card-box .input-group .form-control { border-left: 0; padding-left: .25rem; }
.auth-card-box .input-group:focus-within .input-group-text,
.auth-card-box .input-group:focus-within .form-control { border-color: var(--leja-accent); }
.auth-card-box .form-control:focus { box-shadow: none; }
.auth-card-box .input-group:focus-within { box-shadow: 0 0 0 .2rem rgba(var(--leja-accent-rgb), .15); border-radius: 10px; }
.js-toggle-pw { cursor: pointer; }
.js-toggle-pw:hover { color: var(--leja-accent) !important; }

/* Left aside: tiled diamond watermark replaces the old dot texture */
.auth-aside::after { display: none; }
.auth-aside .aside-grid {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .10;
    background: url('../brand/illustrations/diamond-tile.svg') repeat;
    background-size: 46px 46px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.35) 100%);
            mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.35) 100%);
}
.auth-aside .aside-inner { padding: 3.5rem; }
.auth-aside .aa-big   { top: 13%; right: -30px; width: 330px; opacity: .16; }
.auth-aside .aa-topo  { top: -60px; right: -90px; width: 340px; opacity: .10; }
.auth-aside .aa-waves { bottom: 56px; left: -24px; width: 120%; opacity: .14; }
.auth-aside .aa-tapa  { bottom: 30px; left: 2.5rem; width: 280px; opacity: .7; }

/* Feature rows with rounded icon chips */
.aside-feature { margin-top: 1.5rem; }
.aside-feature-icon {
    width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12); color: var(--leja-gold); font-size: 1.15rem;
}

@media (prefers-reduced-motion: no-preference) {
    .auth-aside .aa-big { animation: leja-spin-rev 220s linear infinite; transform-origin: center; }
}

/* ============================================================================
 * Login v3 — calmer aside: drop waves/gold chain, readable features, keywords
 * ========================================================================== */
.auth-aside .aa-waves, .auth-aside .aa-tapa { display: none; }   /* removed: didn't blend */
.auth-aside .aside-inner { justify-content: space-between; padding: 3.5rem; }
.auth-aside .aa-topo { top: -70px; right: -110px; width: 380px; opacity: .10; }
.auth-aside .aa-big  { top: 9%; right: 7%; width: 230px; opacity: .09; animation: none; } /* static = stays diamonds */

.aside-features { width: 100%; }
.aside-feature { margin-top: 1.4rem; align-items: center; }
.aside-feature .fw-semibold { font-size: 1.06rem; }
.aside-feature .text-white-50 { font-size: .92rem; line-height: 1.5; }

.aside-keywords { font-size: .82rem; letter-spacing: .01em; opacity: .8; line-height: 2; }

/* ---- Login aside: 'Single · Indigo' background (brand guideline 03) ------- */
.auth-aside { background: #4F46E5; }
.auth-aside .leja-mark { box-shadow: 0 8px 22px -8px rgba(13,11,34,.55); }
