/* app/assets/stylesheets/dashboard.css */

:root {
    /* Accent palette, every brand-colored surface derives from these seven
       variables, so [data-palette="…"] below can re-skin the whole app.
       --primary-rgb feeds rgba() tints, --primary-gradient-end the hero
       gradients, --primary-bright the accent text on dark backgrounds,
       --primary-deep/--primary-deeper the painted sidebar gradient. */
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --primary-rgb: 67, 97, 238;
    --primary-gradient-end: #8aa6ff;
    --primary-bright: #93a4ff;
    --primary-deep: #2d3ea8;
    --primary-deeper: #1e2b76;
    --success-color: #4cc9a4;
    --warning-color: #f9c74f;
    --danger-color: #f94144;
    --info-color: #3abff8;
    --light-color: #f8f9fa;
    --dark-color: #1e293b;
    --sidebar-width: 240px;
    --header-height: 64px;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);

    /* App chrome, shared by sidebar / header / footer for a single seamless look. */
    --app-bg: #f5f7fb;
    --app-panel: #ffffff;
    --app-border: #e9ecf2;
    --app-text: #1e293b;
    --app-text-muted: #64748b;
    /* Clearly below --app-text-muted, so a hint never reads as a typed value.
       Safe to go this light because every field here carries a real <label>. */
    --app-placeholder: #8d9ab1;
}

/* =========================================================
   Accent palettes  (header swatch picker → data-palette on <html>)
   Keys must match User::THEME_PALETTES. Default (no attribute) = Indigo.
   ========================================================= */

[data-palette="violet"] {
    --primary-color: #7c3aed;
    --secondary-color: #6d28d9;
    --primary-rgb: 124, 58, 237;
    --primary-gradient-end: #a78bfa;
    --primary-bright: #c4b5fd;
    --primary-deep: #5b21b6;
    --primary-deeper: #3c1580;
}

[data-palette="ocean"] {
    --primary-color: #0284c7;
    --secondary-color: #0369a1;
    --primary-rgb: 2, 132, 199;
    --primary-gradient-end: #38bdf8;
    --primary-bright: #7dd3fc;
    --primary-deep: #075985;
    --primary-deeper: #0a3652;
}

[data-palette="emerald"] {
    --primary-color: #059669;
    --secondary-color: #047857;
    --primary-rgb: 5, 150, 105;
    --primary-gradient-end: #34d399;
    --primary-bright: #6ee7b7;
    --primary-deep: #065f46;
    --primary-deeper: #033a2c;
}

[data-palette="sunset"] {
    --primary-color: #ea580c;
    --secondary-color: #c2410c;
    --primary-rgb: 234, 88, 12;
    --primary-gradient-end: #fb923c;
    --primary-bright: #fdba74;
    --primary-deep: #9a3412;
    --primary-deeper: #6c2610;
}

[data-palette="rose"] {
    --primary-color: #e11d48;
    --secondary-color: #be123c;
    --primary-rgb: 225, 29, 72;
    --primary-gradient-end: #fb7185;
    --primary-bright: #fda4af;
    --primary-deep: #9f1239;
    --primary-deeper: #6e0d29;
}

[data-palette="fuchsia"] {
    --primary-color: #c026d3;
    --secondary-color: #a21caf;
    --primary-rgb: 192, 38, 211;
    --primary-gradient-end: #e879f9;
    --primary-bright: #f0abfc;
    --primary-deep: #86198f;
    --primary-deeper: #5c1065;
}

[data-palette="teal"] {
    --primary-color: #0d9488;
    --secondary-color: #0f766e;
    --primary-rgb: 13, 148, 136;
    --primary-gradient-end: #2dd4bf;
    --primary-bright: #5eead4;
    --primary-deep: #115e59;
    --primary-deeper: #0a3f3b;
}

[data-palette="gold"] {
    --primary-color: #b45309;
    --secondary-color: #92400e;
    --primary-rgb: 180, 83, 9;
    --primary-gradient-end: #f59e0b;
    --primary-bright: #fcd34d;
    --primary-deep: #78350f;
    --primary-deeper: #532306;
}

[data-palette="graphite"] {
    --primary-color: #475569;
    --secondary-color: #334155;
    --primary-rgb: 71, 85, 105;
    --primary-gradient-end: #94a3b8;
    --primary-bright: #cbd5e1;
    --primary-deep: #1e293b;
    --primary-deeper: #0f172a;
}

/* Point Bootstrap's "primary" at the active palette so btn-primary, links,
   badges, checks and pagination follow the accent instead of stock #0d6efd. */
:root {
    --bs-primary: var(--primary-color);
    --bs-primary-rgb: var(--primary-rgb);
    --bs-link-color: var(--primary-color);
    --bs-link-color-rgb: var(--primary-rgb);
    --bs-link-hover-color: var(--secondary-color);
    --bs-link-hover-color-rgb: var(--primary-rgb);
}

.btn-primary {
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: var(--secondary-color);
    --bs-btn-hover-border-color: var(--secondary-color);
    --bs-btn-active-bg: var(--secondary-color);
    --bs-btn-active-border-color: var(--secondary-color);
    --bs-btn-disabled-bg: var(--primary-color);
    --bs-btn-disabled-border-color: var(--primary-color);
    --bs-btn-focus-shadow-rgb: var(--primary-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: var(--primary-color);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-active-bg: var(--primary-color);
    --bs-btn-active-border-color: var(--primary-color);
    --bs-btn-focus-shadow-rgb: var(--primary-rgb);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--primary-color);
}

.pagination {
    --bs-pagination-color: var(--primary-color);
    --bs-pagination-hover-color: var(--secondary-color);
    --bs-pagination-active-bg: var(--primary-color);
    --bs-pagination-active-border-color: var(--primary-color);
    --bs-pagination-focus-color: var(--secondary-color);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* =========================================================
   App shell  (body wrapper)
   ========================================================= */

.app-shell {
    display: flex;
    min-height: 100vh;
    height: 100vh;
    background-color: var(--app-bg);
    color: var(--app-text);
}

/* Opt-out for full-page scrolling content (the public landing page): the shell
   stops being a fixed-height flex frame and becomes an ordinary document flow. */
.app-shell--flow {
    display: block;
    height: auto;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;          /* prevents flex blow-out from wide content */
    height: 100vh;
}

.app-main__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Unauthenticated pages (Devise) */
.app-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    background-color: var(--app-bg);
}

.app-auth__inner { width: 100%; max-width: 420px; padding: 1.5rem; }

/* Auth screens (sign-in, forgot password, reset password), shared shell. */
.auth-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--app-bg) 0%, #eef2ff 100%);
}

[data-bs-theme="dark"] .auth-shell {
    background: linear-gradient(135deg, var(--app-bg) 0%, #1a2236 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 16px;
    padding: 2rem 1.75rem 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .auth-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.auth-card__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.auth-card__brand i { font-size: 1.25rem; }

.auth-card__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--app-text);
}

.auth-card__subtitle {
    margin: 0 0 1.5rem;
    color: var(--app-text-muted);
    font-size: 0.92rem;
}

.auth-form .form-control {
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border-color: var(--app-border);
}

.auth-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.auth-form .btn-primary {
    padding: 0.7rem;
    font-weight: 600;
    border-radius: 8px;
}

.auth-card__links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--app-border);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
}

.auth-link {
    color: var(--app-text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* =========================================================
   Top header  (lines up with sidebar brand row)
   ========================================================= */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--header-height);
    flex: 0 0 var(--header-height);
    padding: 0 1.5rem;
    background-color: var(--app-panel);
    border-bottom: 1px solid var(--app-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.app-header__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--app-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Global search box in the header. */
.app-header__search {
    position: relative;
    flex: 1 1 360px;
    max-width: 480px;
    margin: 0;
}

.app-header__search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.app-header__search-input {
    width: 100%;
    height: 38px;
    padding: 0 2.4rem 0 2.25rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.9rem;
    color: var(--app-text);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-header__search-input::placeholder {
    color: var(--app-text-muted);
}

.app-header__search-input:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.app-header__search-hint {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.05rem 0.4rem;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 4px;
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    pointer-events: none;
}

/* Live-search dropdown panel. */
.app-header__search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    min-width: 280px;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 1050;
}

@media (max-width: 767.98px) {
    .app-header__search-dropdown { left: auto; width: min(85vw, 360px); }
}

.app-header__search-dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.app-header__search-dropdown.is-loading::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: search-loading 1s linear infinite;
}

@keyframes search-loading {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

.search-dropdown__empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--app-text-muted);
    font-size: 0.88rem;
}

.search-dropdown__empty i { display: block; font-size: 1.5rem; margin-bottom: 0.35rem; }

.search-dropdown__inner { padding: 0.3rem; }

.search-dropdown__group + .search-dropdown__group {
    border-top: 1px solid var(--app-border);
    margin-top: 0.3rem;
    padding-top: 0.3rem;
}

.search-dropdown__group-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-text-muted);
}

.search-dropdown__group-title i { color: var(--primary-color); font-size: 0.85rem; }

/* Reuse .search-result base style for dropdown rows, just tighter and with
   a rounded corner so the highlight feels like a Cmd-K palette item. */
.app-header__search-dropdown .search-result {
    padding: 0.55rem 0.75rem;
    border-bottom: none;
    border-radius: 6px;
    gap: 0.75rem;
}

.app-header__search-dropdown .search-result.is-active,
.app-header__search-dropdown .search-result:hover {
    background-color: rgba(var(--primary-rgb), 0.08);
}

.app-header__search-dropdown .search-result__name { font-size: 0.88rem; }
.app-header__search-dropdown .search-result__meta { font-size: 0.74rem; }
.app-header__search-dropdown .search-result__side { font-size: 0.82rem; color: var(--app-text-muted); }

.search-dropdown__view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.3rem;
    padding: 0.55rem;
    border-top: 1px solid var(--app-border);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
}

.search-dropdown__view-all:hover {
    background-color: rgba(var(--primary-rgb), 0.06);
    color: var(--primary-color);
}

@media (max-width: 767.98px) {
    .app-header__search       { flex: 0 1 auto; max-width: none; }
    .app-header__search-input { width: 38px; padding: 0; cursor: pointer; }
    .app-header__search-input:focus { width: 220px; padding: 0 2.4rem 0 2.25rem; cursor: text; }
    .app-header__search-hint  { display: none; }
    /* Collapsed to 38px the field is an icon button, but it still painted its
       placeholder under the magnifier, which read as "Se". Hide the text until
       focus expands the field back to a real input. */
    .app-header__search-input::placeholder { color: transparent; }
    .app-header__search-input:focus::placeholder { color: var(--app-text-muted); }
}

/* Search results page */
.search-page {
    padding: 0.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-page__empty {
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--app-text-muted);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.search-page__empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.search-page__empty p { margin: 0; font-size: 0.95rem; }

.search-group {
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.search-group__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    background: #f8fafc;
}

.search-group__header i { color: var(--primary-color); font-size: 1rem; }

.search-group__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--app-text);
}

.search-group__count {
    margin-left: auto;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--app-text-muted);
}

.search-result {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    text-decoration: none;
    transition: background-color 0.12s ease;
}

.search-result:last-child { border-bottom: none; }
.search-result:hover { background-color: #f8fafc; }

.search-result__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.search-result__name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--app-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result__meta {
    font-size: 0.78rem;
    color: var(--app-text-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result__side {
    font-weight: 600;
    color: var(--app-text);
    font-size: 0.88rem;
    white-space: nowrap;
}

/* User pill in the header, avatar + name + role + caret. */
.app-header__user {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    background: transparent;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.app-header__user:hover,
.app-header__user[aria-expanded="true"] {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.app-header__user-avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-header__user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    min-width: 0;
    max-width: 160px;
    text-align: left;
}

.app-header__user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--app-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.app-header__user-role {
    font-size: 0.7rem;
    color: var(--app-text-muted);
    line-height: 1;
}

.app-header__user-caret {
    font-size: 0.7rem;
    color: var(--app-text-muted);
    transition: transform 0.15s ease;
}

/* Theme toggle button */
.app-header__theme-toggle {
    background: transparent;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.app-header__theme-toggle:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
    border-color: #cbd5e1;
}

/* Swap icons based on the current theme */
.app-header__theme-icon--dark { display: none; }
[data-bs-theme="dark"] .app-header__theme-icon--light { display: none; }
[data-bs-theme="dark"] .app-header__theme-icon--dark  { display: inline-block; }

/* Accent palette picker (header). Swatches show each palette's own gradient,
   so they are deliberately hardcoded, they must not follow the active accent. */
.palette-picker__menu {
    min-width: auto;
    padding: 10px 14px 12px;
    border: 1px solid var(--app-border);
    background: var(--app-panel);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.palette-picker__title {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-text-muted);
    margin-bottom: 9px;
}

.palette-picker__swatches {
    display: grid;
    grid-template-columns: repeat(5, 27px);
    gap: 9px;
}

.palette-picker__swatch {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.palette-picker__swatch i { opacity: 0; transition: opacity 0.12s ease; }
.palette-picker__swatch:hover { transform: scale(1.15); }
.palette-picker__swatch.is-active i { opacity: 1; }
.palette-picker__swatch.is-active {
    box-shadow: 0 0 0 2px var(--app-panel), 0 0 0 4px var(--app-text-muted);
}

/* Reset row, clears the applied color back to the built-in Indigo default.
   Functionally the same as the Indigo swatch, but reads as an explicit undo. */
.palette-picker__reset {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    margin-top: 11px;
    padding: 6px 9px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: transparent;
    color: var(--app-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.palette-picker__reset:hover {
    background-color: rgba(var(--primary-rgb), 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.palette-picker__reset-label { flex: 1; text-align: left; }

.palette-picker__reset-check { opacity: 0; transition: opacity 0.12s ease; }
.palette-picker__reset.is-active .palette-picker__reset-check { opacity: 1; color: var(--primary-color); }

.palette-picker__swatch--indigo   { background: linear-gradient(135deg, #4361ee, #8aa6ff); }
.palette-picker__swatch--violet   { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.palette-picker__swatch--ocean    { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.palette-picker__swatch--emerald  { background: linear-gradient(135deg, #059669, #34d399); }
.palette-picker__swatch--sunset   { background: linear-gradient(135deg, #ea580c, #fb923c); }
.palette-picker__swatch--rose     { background: linear-gradient(135deg, #e11d48, #fb7185); }
.palette-picker__swatch--fuchsia  { background: linear-gradient(135deg, #c026d3, #e879f9); }
.palette-picker__swatch--teal     { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.palette-picker__swatch--gold     { background: linear-gradient(135deg, #b45309, #f59e0b); }
.palette-picker__swatch--graphite { background: linear-gradient(135deg, #475569, #94a3b8); }

.app-header__user[aria-expanded="true"] .app-header__user-caret {
    transform: rotate(180deg);
}

/* Dropdown menu polish */
.app-header__menu {
    min-width: 220px;
    padding: 0.5rem;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.app-header__menu .dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.app-header__menu-header {
    padding: 0.4rem 0.75rem 0.6rem;
}

/* Hide name + role on small screens, keep just the avatar */
@media (max-width: 575.98px) {
    .app-header__user-meta,
    .app-header__user-caret { display: none; }
    .app-header__user { padding: 0.2rem; border: none; }
}

/* =========================================================
   Footer  (matches header border + bg for a continuous seam)
   ========================================================= */

.app-footer {
    background-color: var(--app-panel);
    border-top: 1px solid var(--app-border);
    padding: 0.75rem 1.5rem;
    flex: 0 0 auto;
}

.app-footer__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--app-text-muted);
    font-size: 0.85rem;
}

.app-footer__info { white-space: nowrap; }

/* Drop Reboot's ul margin so footer text aligns with the pagination buttons. */
.app-footer__inner .pagination { margin-bottom: 0; }

/* =========================================================
   Page chrome for index / edit / new pages
   .title-filter-bar = top bar (title + optional filter form)
   .content-area     = white card that wraps the page body
   Used by both the generic filter template (index pages) and edit views.
   ========================================================= */

.title-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0.5rem;
    flex-wrap: wrap;
}

.title-filter-bar .title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--app-text);
    margin: 0;
    white-space: nowrap;
}

/* Compact filter inputs (status/date/balance dropdowns in the filter bar). */
.title-filter-bar .filter-input {
    width: auto;
    min-width: 130px;
    max-width: 180px;
    margin-right: 0.5rem;
}

.title-filter-bar .filter-input--daterange {
    min-width: 230px;
    max-width: 260px;
}

.title-filter-bar .filter-input--daterange input { cursor: pointer; background-color: #fff; }
[data-bs-theme="dark"] .title-filter-bar .filter-input--daterange input { background-color: #0f172a; }

.title-filter-bar .custom-col {
    flex-wrap: wrap;
    gap: 0.4rem 0;
}

/* Order Book has three filter controls (status, reason, date range). The custom
   column normally shares the bar equally with the search box and buttons, which
   is too narrow for three controls and wraps the date range onto its own line.
   Give this column extra room (only when it holds the order filters) and keep
   the controls compact so all three sit on one line. */
.title-filter-bar .custom-col:has(.or-filters) {
    flex-grow: 3;
}
.title-filter-bar .or-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    width: 100%;
}
.title-filter-bar .or-filters .filter-input {
    min-width: 108px;
    max-width: 160px;
    margin-right: 0;
}
.title-filter-bar .or-filters .filter-input--daterange {
    min-width: 190px;
    max-width: 230px;
}

/* Products/Customers/Suppliers close the filter row with an Import CSV button,
   which does not fit in an equal third of the bar. Take the extra width from the
   button column instead, which only holds three icon buttons: the search box
   keeps exactly the third it always had, and nothing drops to a second line.
   Scoped to 992px up, where the bar really is one row: below that it wraps over
   several rows and a fixed one-third search column means nothing. */
@media (min-width: 992px) {
    .title-filter-bar:has(.filter-import) .patient-doc-col {
        flex: 0 0 33.3333%;
    }
    .title-filter-bar:has(.filter-import) .btn-col {
        flex: 0 0 auto;
        width: auto; /* .col sets width:100%, an auto basis would resolve to it */
    }
    .title-filter-bar .custom-col:has(.filter-import) {
        flex: 1 1 0%;
    }
}

/* On a phone the three filter columns kept sharing one row, so the search box
   was squeezed to a third of ~370px and its placeholder cut to "Name". Give
   each column its own row and let the controls use the width they now have. */
@media (max-width: 767.98px) {
    .title-filter-bar form > .col {
        flex: 0 0 100%;
        width: 100%;
    }
    .title-filter-bar .custom-col {
        gap: 0.5rem;
    }
    .title-filter-bar .custom-col .filter-input {
        flex: 1 1 140px;
        max-width: none;
        margin-right: 0;
    }
    .title-filter-bar .custom-col .filter-input--daterange {
        flex: 1 1 200px;
        min-width: 0;
        max-width: none;
    }
}

.content-area {
    margin: 1rem 1.5rem 1.5rem;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Narrow variant for settings-style pages (account, custom field edit, etc.) */
.content-area--narrow {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* User identity strip shown above the account form. */
.user-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--app-border);
    background: #f8fafc;
}

.user-identity__avatar {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-identity__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.user-identity__name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--app-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-identity__email {
    font-size: 0.85rem;
    color: var(--app-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-identity__role {
    flex: 0 0 auto;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--app-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-bs-theme="dark"] .user-identity { background: #131a2a; }

/* =========================================================
   Record detail pages (customer, supplier, product, user, category,
   activity log, stock movement). A label/value grid rendered by
   shared/_detail_rows, sitting inside the usual .content-area card.
   Two columns on a desktop, stacked on a phone, because a label above
   its value stays readable where a 120px label column does not.
   ========================================================= */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.detail-grid__row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--app-border);
    min-width: 0;
}

/* The grid fills row-major, so the odd cell in each pair keeps a divider
   between the columns; the last row's bottom border meets the card edge. */
.detail-grid__row:nth-child(odd) { border-right: 1px solid var(--app-border); }

.detail-grid dt {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-text-muted);
}

.detail-grid dd {
    margin: 0;
    color: var(--app-text);
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .detail-grid { grid-template-columns: minmax(0, 1fr); }
    .detail-grid__row:nth-child(odd) { border-right: 0; }
}

/* Summary tiles above the grid (balances, stock, lifetime totals). */
.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--app-border);
}

.detail-stats__item {
    flex: 1 1 180px;
    padding: 1rem 1.5rem;
    border-right: 1px solid var(--app-border);
    min-width: 0;
}

.detail-stats__item:last-child { border-right: 0; }

.detail-stats__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-text-muted);
}

.detail-stats__value {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--app-text);
    line-height: 1.3;
}

/* When the form's .modal-body / .modal-footer are rendered inline on a full
   edit page (outside an actual Bootstrap modal), normalize them so they read
   as a coherent form-card with a header section and an action footer. */
.content-area .modal-body {
    padding: 1.5rem;
    background: transparent;
}

.content-area .modal-footer {
    padding: 0.9rem 1.5rem;
    background: #fafbfc;
    border-top: 1px solid var(--app-border);
    border-radius: 0;
    gap: 0.5rem;
    margin: 0;
}

/* Tables shown inside a content-area should be flush against its edges. */
.content-area .table-responsive { margin: 0; }
.content-area > .table { margin: 0; }

/* Scrollable form modals. Bootstrap's modal-dialog-scrollable expects
   .modal-body as a flex child of .modal-content, but our form partials insert
   two plain wrappers in between (<div id="*_form_wrapper"><form>), that
   breaks the height chain, so the body never scrolls and a long form (a sale
   with many line items) grows past the viewport. Rebuild the chain through
   the wrappers; the footer with the submit button stays pinned. */
.modal-dialog-scrollable [id$="_form_wrapper"],
.modal-dialog-scrollable [id$="_form_wrapper"] > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-dialog-scrollable [id$="_form_wrapper"] .modal-body {
    overflow-y: auto;
    min-height: 0;
}

@media (max-width: 575.98px) {
    .title-filter-bar { padding: 1rem 1rem 0.25rem; }
    .content-area     { margin: 0.75rem; }
    .content-area .modal-body   { padding: 1rem; }
    .content-area .modal-footer { padding: 0.75rem 1rem; }
}

/* =========================================================
   Index-page tables  (resource listings)
   Any .table-responsive that sits directly under <main class="app-main__body">
   gets wrapped in a card with a polished header + flat rows. No stripes,
   the hover row is enough for scannability.
   ========================================================= */

.app-main__body > .table-responsive {
    margin: 0.5rem 1.5rem 1.5rem;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow-x: auto;
}

.app-main__body > .table-responsive > .table {
    margin: 0;
    font-size: 0.92rem;
    color: var(--app-text);
}

.app-main__body > .table-responsive > .table > thead > tr > th {
    background: #f8fafc;
    color: var(--app-text-muted);
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--app-border);
    border-top: 0;
    padding: 0.85rem 1rem;
    white-space: nowrap;
    --bs-table-bg: transparent;
}

.app-main__body > .table-responsive > .table > tbody > tr > td {
    padding: 0.8rem 1rem;
    border-color: var(--app-border);
    vertical-align: middle;
    --bs-table-bg: transparent;
}

/* Kill .table-striped's alternating shading inside the card, cleaner look. */
.app-main__body > .table-responsive > .table.table-striped > tbody > tr {
    --bs-table-striped-bg: transparent;
}

.app-main__body > .table-responsive > .table.table-hover > tbody > tr:hover > td {
    --bs-table-hover-bg: transparent;
    background-color: #f8fafc;
}

/* Compact action buttons / forms inside the last cell */
.app-main__body > .table-responsive .btn-sm {
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
}

.app-main__body > .table-responsive form {
    display: inline;
    margin: 0;
}

@media (max-width: 575.98px) {
    .app-main__body > .table-responsive { margin: 0.5rem 0.75rem 0.75rem; }
}

/* =========================================================
   Sidebar  (BEM-scoped, no leaks into Bootstrap .nav/.nav-link)
   ========================================================= */

.sidebar {
    /* Reuse the app chrome tokens so sidebar/header/footer share one palette.
       These are the ORIGINAL light-chrome values, the app's default look when
       no accent palette is chosen. Picking a palette adds data-palette on
       <html>, and the painted-sidebar overrides further down repaint the rail. */
    --side-bg: var(--app-panel);
    --side-border: var(--app-border);
    --side-text: #475569;
    --side-text-strong: #0f172a;
    --side-muted: #94a3b8;
    --side-hover-bg: #f1f5f9;
    --side-active-bg: rgba(var(--primary-rgb), 0.08);
    --side-active-text: var(--primary-color);
    --side-section-gap: 1.25rem;

    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: var(--side-bg);
    border-right: 1px solid var(--side-border);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.25s ease, flex-basis 0.25s ease, transform 0.25s ease;
}

.sidebar__brand,
.sidebar__link,
.sidebar__user,
.sidebar__footer {
    transition: padding 0.2s ease, gap 0.2s ease;
}

.sidebar::-webkit-scrollbar           { width: 6px; }
.sidebar::-webkit-scrollbar-track     { background: transparent; }
.sidebar::-webkit-scrollbar-thumb     { background-color: #cbd5e1; border-radius: 999px; }
.sidebar::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

/* ── Brand (height matches .app-header so seams form a clean cross) ── */
.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: var(--header-height);
    flex: 0 0 var(--header-height);
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--side-border);
    color: var(--side-text-strong);
    user-select: none;
}

/* Brand acts as a dashboard link, keep it visually identical to plain text. */
.sidebar__brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.sidebar__brand-link:hover {
    opacity: 0.85;
}

.sidebar__brand-icon {
    font-size: 1.4rem;
    color: var(--side-active-text);
}

.sidebar__brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

/* ── Nav body ── */
.sidebar__nav {
    flex: 1;
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar__section {
    padding: 0.4rem 0 0.6rem;
}

.sidebar__section + .sidebar__section {
    border-top: 1px solid var(--side-border);
    margin-top: 0.4rem;
    padding-top: 0.8rem;
}

.sidebar__section-title {
    display: block;
    padding: 0.25rem 1.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--side-muted);
}

/* ── Link ── */
.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1.25rem;
    margin: 0.1rem 0.6rem;
    border-radius: 8px;
    color: var(--side-text);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    position: relative;
}

.sidebar__link:hover {
    background-color: var(--side-hover-bg);
    color: var(--side-text-strong);
}

.sidebar__link:focus-visible {
    outline: 2px solid var(--side-active-text);
    outline-offset: 2px;
}

.sidebar__link-icon {
    font-size: 1.25rem;
    flex: 0 0 1.25rem;
    color: var(--side-muted);
    transition: color 0.15s ease;
}

.sidebar__link:hover .sidebar__link-icon { color: var(--side-active-text); }

/* A little colour: each nav section gets its own icon hue (aids scanning).
   Hover/active still shift to the accent, so it stays cohesive. */
.sidebar__section--platform   .sidebar__link-icon,
.sidebar__section--overview   .sidebar__link-icon { color: var(--primary-color); }
.sidebar__section--operations .sidebar__link-icon { color: #10b981; }
.sidebar__section--catalog    .sidebar__link-icon { color: #8b5cf6; }
.sidebar__section--insights   .sidebar__link-icon { color: #f59e0b; }
.sidebar__section--hr         .sidebar__link-icon { color: #ec4899; }
.sidebar__section--config     .sidebar__link-icon { color: #14b8a6; }

.sidebar__link-label {
    flex: 1;
    line-height: 1.2;
}

.sidebar__link--active,
.sidebar__link--active:hover {
    background-color: var(--side-active-bg);
    color: var(--side-active-text);
    font-weight: 600;
}

.sidebar__link--active .sidebar__link-icon { color: var(--side-active-text); }

.sidebar__link--active::before {
    content: "";
    position: absolute;
    left: -0.6rem;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background-color: var(--side-active-text);
}

/* ── Footer (user + logout) ── */
.sidebar__footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--side-border);
    background-color: #fafbfc;
}

.sidebar__user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.35rem 0.4rem;
    border-radius: 8px;
    color: var(--side-text-strong);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.sidebar__user:hover { background-color: var(--side-hover-bg); }

/* Org badge is informational, not a link, no hover/pointer. */
.sidebar__user--org { cursor: default; }
.sidebar__user--org:hover { background-color: transparent; }

.sidebar__user-avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar__user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.sidebar__user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--side-text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__user-role {
    font-size: 0.72rem;
    color: var(--side-muted);
}

.sidebar__logout {
    background: transparent;
    border: 1px solid var(--side-border);
    color: var(--side-text);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar__logout:hover {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

/* ButtonTo wraps in a <form>, reset its layout */
.sidebar__footer form { margin: 0; }

/* ── Painted sidebar (only when a custom accent palette is chosen) ──
   data-palette on <html> turns the rail into an accent-painted surface: a deep
   gradient of the palette with light text. No attribute = the original light
   chrome above stays untouched. The html[…] prefix outranks the
   [data-bs-theme="dark"] sidebar overrides, so a painted rail (already dark)
   looks identical in light and dark themes. */
html[data-palette] .sidebar {
    --side-bg: linear-gradient(180deg, var(--primary-deep) 0%, var(--primary-deeper) 100%);
    --side-border: rgba(255, 255, 255, 0.10);
    --side-text: rgba(255, 255, 255, 0.80);
    --side-text-strong: #ffffff;
    --side-muted: rgba(255, 255, 255, 0.48);
    --side-hover-bg: rgba(255, 255, 255, 0.09);
    --side-active-bg: rgba(255, 255, 255, 0.16);
    --side-active-text: #ffffff;
}

html[data-palette] .sidebar::-webkit-scrollbar-thumb       { background-color: rgba(255, 255, 255, 0.22); }
html[data-palette] .sidebar::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.38); }

html[data-palette] .sidebar__brand-icon { color: var(--primary-bright); }

/* Section icon hues brightened so they read on the painted surface. */
html[data-palette] .sidebar__section--platform   .sidebar__link-icon,
html[data-palette] .sidebar__section--overview   .sidebar__link-icon { color: var(--primary-bright); }
html[data-palette] .sidebar__section--operations .sidebar__link-icon { color: #6ee7b7; }
html[data-palette] .sidebar__section--catalog    .sidebar__link-icon { color: #c4b5fd; }
html[data-palette] .sidebar__section--insights   .sidebar__link-icon { color: #fcd34d; }
html[data-palette] .sidebar__section--hr         .sidebar__link-icon { color: #f9a8d4; }
html[data-palette] .sidebar__section--config     .sidebar__link-icon { color: #5eead4; }

html[data-palette] .sidebar__footer     { background-color: rgba(0, 0, 0, 0.18); }
html[data-palette] .sidebar__user:hover { background-color: var(--side-hover-bg); }

html[data-palette] .sidebar__logout:hover {
    background-color: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

/* ── Overlay (mobile only) ── */
.sidebar__overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 999;
}

.sidebar__overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Sidebar toggle (hamburger, in header) ── */
.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.15s ease;
}

.sidebar-toggle:hover { background-color: #f1f5f9; }

/* ── Sidebar collapse toggle (chevron in brand) ── */
.sidebar__collapse {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--side-muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.25s ease;
}

.sidebar__collapse:hover {
    background-color: var(--side-hover-bg);
    color: var(--side-text-strong);
}

/* ── Collapsed state (desktop only) ── */
@media (min-width: 992px) {
    .sidebar--collapsed {
        --sidebar-width: 72px;
        width: 72px;
        flex: 0 0 72px;
    }

    .sidebar--collapsed .sidebar__brand        { justify-content: center; padding: 1.25rem 0.5rem; }
    .sidebar--collapsed .sidebar__brand-text   { display: none; }

    /* Chevron flips to point right when collapsed */
    .sidebar--collapsed .sidebar__collapse     { margin-left: 0; transform: rotate(180deg); }

    .sidebar--collapsed .sidebar__section-title { display: none; }
    .sidebar--collapsed .sidebar__section + .sidebar__section {
        margin-top: 0.2rem;
        padding-top: 0.6rem;
    }

    .sidebar--collapsed .sidebar__link {
        justify-content: center;
        padding: 0.6rem 0;
        margin: 0.15rem 0.5rem;
    }
    .sidebar--collapsed .sidebar__link-label   { display: none; }
    .sidebar--collapsed .sidebar__link--active::before { left: -0.5rem; }

    .sidebar--collapsed .sidebar__footer       { padding: 0.6rem; justify-content: center; gap: 0.3rem; }
    .sidebar--collapsed .sidebar__user         { justify-content: center; padding: 0.25rem; }
    .sidebar--collapsed .sidebar__user-meta    { display: none; }
    .sidebar--collapsed .sidebar__logout       { width: 32px; height: 32px; }
}

/* ── Responsive (mobile drawer) ── */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    }
    .sidebar.is-open { transform: translateX(0); }

    .sidebar-toggle { display: inline-flex; }
}

/* =========================================================
   Dashboard page  (scoped under .dashboard-page to prevent leakage)
   Component-based BEM-ish classes. Bootstrap utilities used for spacing.
   ========================================================= */

.dashboard-page {
    --dash-gap: 1.25rem;
    --dash-surface: #ffffff;
    --dash-border: #eef0f4;
    --dash-text-muted: #64748b;
    --dash-text: #1e293b;
    --dash-radius: 12px;
    --dash-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);

    padding: 1.5rem;
    color: var(--dash-text);
}

@media (max-width: 575.98px) {
    .dashboard-page { padding: 1rem; }
}

/* ── Page header ── */
.dashboard-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.dashboard-page__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--dash-text);
}

.dashboard-page__subtitle {
    margin: 0.25rem 0 0;
    color: var(--dash-text-muted);
    font-size: 0.9rem;
}

.dashboard-page__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Privacy mode: blur sensitive money figures ── */
[data-sensitive] {
    transition: filter 0.18s ease;
}

.dashboard-page.privacy-on [data-sensitive] {
    filter: blur(9px);
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

/* ── KPI cards ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--dash-gap);
    margin-bottom: var(--dash-gap);
}

@media (max-width: 1199.98px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
    padding: 1.25rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Gradient accent strip across the top of each KPI card, in its semantic colour. */
.kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.kpi-card--primary::before { background: linear-gradient(90deg, var(--primary-color), var(--primary-gradient-end)); }
.kpi-card--success::before { background: linear-gradient(90deg, #16a34a, #4ade80); }
.kpi-card--warning::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.kpi-card--danger::before  { background: linear-gradient(90deg, #dc2626, #fb7185); }

/* Hover lift gets a glow tinted to match the card's accent. The doubled class
   keeps these ahead of the generic .kpi-card:hover rule below. */
.kpi-card.kpi-card--primary:hover { box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.18); }
.kpi-card.kpi-card--success:hover { box-shadow: 0 8px 22px rgba(22, 163, 74, 0.18); }
.kpi-card.kpi-card--warning:hover { box-shadow: 0 8px 22px rgba(217, 119, 6, 0.18); }
.kpi-card.kpi-card--danger:hover  { box-shadow: 0 8px 22px rgba(220, 38, 38, 0.18); }

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Clickable KPI cards: reset anchor styling (hover lift comes from .kpi-card). */
.kpi-card--link { text-decoration: none; color: inherit; cursor: pointer; }

.kpi-card__icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.kpi-card__body { min-width: 0; }

.kpi-card__label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dash-text-muted);
}

.kpi-card__value {
    margin: 0.15rem 0 0.1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dash-text);
    line-height: 1.2;
    word-break: break-word;
}

.kpi-card__meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--dash-text-muted);
}

/* KPI variants, accent the icon */
.kpi-card--primary .kpi-card__icon { background: rgba(var(--primary-rgb), 0.12); color: var(--primary-color); }
.kpi-card--success .kpi-card__icon { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.kpi-card--warning .kpi-card__icon { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.kpi-card--danger  .kpi-card__icon { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

/* ── Secondary metric strip ── */
.metric-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--dash-gap);
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
    padding: 1rem 1.25rem;
    margin-bottom: var(--dash-gap);
}

@media (max-width: 767.98px) {
    .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.metric-strip__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dash-text);
    padding: 0.5rem 0.65rem;
    border-radius: 12px;
    transition: background-color 0.18s ease, transform 0.18s ease;
}
.metric-strip__item:hover {
    background-color: rgba(var(--primary-rgb), 0.07);
    transform: translateY(-2px);
}

.metric-strip__item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    flex: 0 0 auto;
    transition: transform 0.18s ease;
}
.metric-strip__item:hover i { transform: scale(1.12); }

.metric-strip__value {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
}

.metric-strip__label {
    display: block;
    font-size: 0.8rem;
    color: var(--dash-text-muted);
}

/* ── Generic dashboard card ── */
.dashboard-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--dash-gap);
    margin-bottom: var(--dash-gap);
}

@media (max-width: 991.98px) {
    .dashboard-row { grid-template-columns: 1fr; }
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
    overflow: hidden;
}

.dashboard-card--span-2 { grid-column: span 2; }
.dashboard-card--span-3 { grid-column: span 3; }

@media (max-width: 991.98px) {
    .dashboard-card--span-2 { grid-column: span 1; }
    .dashboard-card--span-3 { grid-column: span 1; }
}

.dashboard-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--dash-border);
}

.dashboard-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dash-text);
}

.dashboard-card__subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--dash-text-muted);
}

.dashboard-card__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.dashboard-card__link:hover { text-decoration: underline; }

.dashboard-card__body { padding: 1.25rem; flex: 1; }
.dashboard-card__body--flush { padding: 0; }

/* ── Chart canvas ── */
.dashboard-page .chart-canvas {
    position: relative;
    width: 100%;
    height: 280px;
}

/* Taller variant for the donut so the slices + legend never clip. */
.dashboard-page .chart-canvas--tall {
    height: 340px;
}

/* ── Impersonation banner ── */
.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.5rem 1.25rem;
    background: #f59e0b;
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Managing-organization context uses indigo to distinguish it from the amber
   impersonation banner (you're yourself here, not signed in as someone else). */
.impersonation-banner--manage {
    background: #6366f1;
    color: #fff;
}

.impersonation-banner__exit {
    border: 1px solid rgba(31, 41, 55, 0.35);
    background: rgba(255, 255, 255, 0.85);
    color: #1f2937;
    border-radius: 6px;
    padding: 0.2rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.impersonation-banner__exit:hover {
    background: #fff;
}

/* ── Dashboard table ── */
.dashboard-table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.dashboard-table thead th {
    border-top: none;
    border-bottom: 1px solid var(--dash-border);
    color: var(--dash-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
}

.dashboard-table tbody td {
    border-top: 1px solid var(--dash-border);
    padding: 0.85rem 1.25rem;
    vertical-align: middle;
    color: var(--dash-text);
}

.dashboard-table tbody tr:hover {
    background-color: #f8fafc;
}

.dashboard-table__id {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.82rem;
    color: var(--dash-text-muted);
}

/* ── Status pill ── */
.status-pill {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.status-pill--paid           { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.status-pill--partially_paid { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.status-pill--pending        { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.status-pill--cancelled      { background: rgba(100, 116, 139, 0.14); color: #475569; }

/* ── Low stock list ── */
.low-stock-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.low-stock-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--dash-border);
}

.low-stock-list__item:last-child { border-bottom: none; }

.low-stock-list__info { min-width: 0; flex: 1; }

.low-stock-list__name {
    display: block;
    font-weight: 600;
    color: var(--dash-text);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.low-stock-list__meta {
    display: block;
    font-size: 0.75rem;
    color: var(--dash-text-muted);
    margin-top: 0.1rem;
}

.low-stock-list__stock {
    flex: 0 0 110px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.low-stock-list__bar {
    width: 100%;
    height: 6px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.low-stock-list__bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.low-stock-list__bar-fill--ok  { background: #16a34a; }
.low-stock-list__bar-fill--low { background: #d97706; }
.low-stock-list__bar-fill--out { background: #dc2626; }

.low-stock-list__count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dash-text-muted);
}

/* ── Empty state ── */
.dashboard-page .empty-state {
    margin: 0;
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--dash-text-muted);
    font-size: 0.9rem;
}

/* =========================================================
   Custom fields  (form section + admin page)
   ========================================================= */

.custom-fields-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--app-border);
}

.custom-fields-section__title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--app-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.85rem;
}

/* Generic form section header, used to group profile vs password fields, etc. */
.form-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--app-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed var(--app-border);
}

.form-section-hint {
    margin: -0.4rem 0 0.85rem;
    font-size: 0.8rem;
    color: var(--app-text-muted);
}

.cf-page {
    padding: 0.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cf-group {
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cf-group__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    background: #f8fafc;
}

.cf-group__title { margin: 0; font-size: 0.95rem; font-weight: 600; }

.cf-group__count {
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--app-text-muted);
}

.empty-state-card {
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--app-text-muted);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin: 1rem 1.5rem;
}

.empty-state-card i { font-size: 2rem; display: block; margin-bottom: 0.5rem; color: var(--primary-color); }
.empty-state-card h5 { font-size: 1.05rem; color: var(--app-text); margin: 0 0 0.35rem; }
.empty-state-card p  { margin: 0 0 1rem; font-size: 0.9rem; }

[data-bs-theme="dark"] .cf-group__header { background: #131a2a; }

/* =========================================================
   DARK THEME
   Activated by data-bs-theme="dark" on <html>. Bootstrap 5.3 picks this up
   for its own components (dropdowns, modals, form controls, buttons).
   The block below overrides our custom tokens and the few selectors that
   hardcode light surface colors.
   ========================================================= */

[data-bs-theme="dark"] {
    --app-bg:         #0b1220;
    --app-panel:      #1a2236;
    --app-border:     #2a3349;
    --app-text:       #e2e8f0;
    --app-text-muted: #94a3b8;
    --app-placeholder: #5d6b82;
}

/* Dashboard tokens, must override the light defaults declared directly
   on .dashboard-page, which would otherwise shadow the :root cascade. */
[data-bs-theme="dark"] .dashboard-page {
    --dash-surface:    var(--app-panel);
    --dash-border:     var(--app-border);
    --dash-text:       var(--app-text);
    --dash-text-muted: var(--app-text-muted);
    --dash-shadow:     0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Sidebar, default light-chrome look only. A painted rail (custom palette
   chosen) keeps its accent surface here too: the html[data-palette] rules
   outrank these by specificity. */
[data-bs-theme="dark"] .sidebar {
    --side-text:        #cbd5e1;
    --side-text-strong: #f1f5f9;
    --side-muted:       #6b7a93;
    --side-hover-bg:    #2a3349;
    --side-active-bg:   rgba(var(--primary-rgb), 0.20);
    --side-active-text: var(--primary-bright);
}

[data-bs-theme="dark"] .sidebar__footer { background-color: #131a2a; }
[data-bs-theme="dark"] .sidebar__user:hover { background-color: #2a3349; }
[data-bs-theme="dark"] .sidebar__logout:hover {
    background-color: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* Header */
[data-bs-theme="dark"] .app-header__user:hover,
[data-bs-theme="dark"] .app-header__user[aria-expanded="true"],
[data-bs-theme="dark"] .app-header__theme-toggle:hover,
[data-bs-theme="dark"] .sidebar-toggle:hover {
    background-color: #2a3349;
    border-color: #3d4863;
    color: var(--app-text);
}

[data-bs-theme="dark"] .app-header__search-input          { background: #0f172a; color: var(--app-text); }
[data-bs-theme="dark"] .app-header__search-input:focus    { background: var(--app-panel); }
[data-bs-theme="dark"] .app-header__search-input::placeholder { color: #6b7a93; }
[data-bs-theme="dark"] .app-header__search-hint           { background: var(--app-panel); }

/* Search dropdown */
[data-bs-theme="dark"] .app-header__search-dropdown {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .app-header__search-dropdown .search-result.is-active,
[data-bs-theme="dark"] .app-header__search-dropdown .search-result:hover,
[data-bs-theme="dark"] .search-dropdown__view-all:hover {
    background-color: rgba(var(--primary-rgb), 0.20);
}

[data-bs-theme="dark"] .search-group__header { background: #131a2a; }

/* Tables, header strip + hover row */
[data-bs-theme="dark"] .dashboard-table thead th,
[data-bs-theme="dark"] .app-main__body > .table-responsive > .table > thead > tr > th {
    background: #131a2a;
    color: var(--app-text-muted);
}

[data-bs-theme="dark"] .dashboard-table tbody tr:hover,
[data-bs-theme="dark"] .app-main__body > .table-responsive > .table.table-hover > tbody > tr:hover > td {
    background-color: #131a2a;
}

/* Edit-page form footer when rendered inline (not in a modal) */
[data-bs-theme="dark"] .content-area .modal-footer { background: #131a2a; }

/* Search results page (group cards) */
[data-bs-theme="dark"] .search-page__empty,
[data-bs-theme="dark"] .search-group { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

/* Low-stock bar background */
[data-bs-theme="dark"] .low-stock-list__bar { background: #2a3349; }

/* KPI icon tints, bump opacity for dark bg legibility */
[data-bs-theme="dark"] .kpi-card--primary .kpi-card__icon { background: rgba(var(--primary-rgb), 0.22); color: var(--primary-bright); }
[data-bs-theme="dark"] .kpi-card--success .kpi-card__icon { background: rgba(34, 197, 94, 0.22); color: #4ade80; }
[data-bs-theme="dark"] .kpi-card--warning .kpi-card__icon { background: rgba(245, 158, 11, 0.22); color: #fbbf24; }
[data-bs-theme="dark"] .kpi-card--danger  .kpi-card__icon { background: rgba(239, 68, 68, 0.22); color: #f87171; }

/* Status pills, lighter text for contrast */
[data-bs-theme="dark"] .status-pill--paid           { background: rgba(34, 197, 94, 0.22);  color: #4ade80; }
[data-bs-theme="dark"] .status-pill--partially_paid { background: rgba(245, 158, 11, 0.22); color: #fbbf24; }
[data-bs-theme="dark"] .status-pill--pending        { background: rgba(239, 68, 68, 0.22);  color: #f87171; }
[data-bs-theme="dark"] .status-pill--cancelled      { background: rgba(100, 116, 139, 0.25); color: #cbd5e1; }

/* Card shadows look harsh on dark, soften them */
[data-bs-theme="dark"] .kpi-card,
[data-bs-theme="dark"] .metric-strip,
[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .content-area,
[data-bs-theme="dark"] .app-main__body > .table-responsive,
[data-bs-theme="dark"] .search-group,
[data-bs-theme="dark"] .search-page__empty {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Make sure links inside cards remain readable on dark */
[data-bs-theme="dark"] .text-primary { color: var(--primary-bright) !important; }

/* Dropdown menu polish in dark (Bootstrap handles base, we polish edges) */
[data-bs-theme="dark"] .app-header__menu {
    border-color: var(--app-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Select2 (bootstrap-5 theme), the widget's own CSS hardcodes light colors,
   so it doesn't react to data-bs-theme. The theme's selectors are quite
   specific (and load after this file), so each override below matches the
   theme's selector exactly and prefixes [data-bs-theme="dark"] to win on
   specificity. */
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
    background-color: var(--app-panel);
    border-color: var(--app-border);
    color: var(--app-text);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    color: var(--app-text);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__placeholder {
    color: var(--app-text-muted);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #2a3349;
    border-color: var(--app-border);
    color: var(--app-text);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
    color: var(--app-text);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted {
    background-color: #2a3349;
    color: var(--app-text);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected {
    background-color: rgba(var(--primary-rgb), 0.35);
    color: #ffffff;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-search__field {
    background-color: #0f172a;
    color: var(--app-text);
    border-color: var(--app-border);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-search__field::placeholder {
    color: #6b7a93;
}

/* ════════════════════════════════════════════════════════════════════════
   Reports module, futuristic-minimalist cards
   ════════════════════════════════════════════════════════════════════════ */
.page-header { margin-bottom: 1.75rem; }
.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--app-text);
    margin-bottom: 0.25rem;
}
.page-subtitle { color: var(--app-text-muted); margin: 0; }

.card.report-card {
    position: relative;
    height: 100%;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: var(--app-panel);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.report-card .card-body { padding: 1.5rem; }

/* Ambient corner glow that fades in on hover, the "futuristic" accent. */
.report-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(130% 90% at 100% 0%, rgba(var(--primary-rgb), 0.10), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.report-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary-rgb), 0.45);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}
.report-card:hover::after { opacity: 1; }

/* Icon tile, gradient fill, one hue per report category. */
.report-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.5rem;
    margin-bottom: 1.1rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), rgba(var(--primary-rgb), 0.04));
    color: var(--primary-color);
}
.report-card .card-body.d-flex .report-icon { margin-bottom: 0; }

.icon-profit    { background: linear-gradient(135deg, rgba(16, 163, 74, 0.18),  rgba(16, 163, 74, 0.04));  color: #16a34a; }
.icon-sales     { background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18),  rgba(var(--primary-rgb), 0.04));  color: var(--primary-color); }
.icon-inventory { background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0.04)); color: #8b5cf6; }
.icon-customer  { background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.04)); color: #0ea5e9; }
.icon-category  { background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(236, 72, 153, 0.04)); color: #ec4899; }
.icon-stock     { background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.04)); color: #f59e0b; }
.icon-payment   { background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(20, 184, 166, 0.04)); color: #14b8a6; }

.report-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--app-text);
    margin-bottom: 0.4rem;
}
.report-description {
    font-size: 0.875rem;
    color: var(--app-text-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}
/* Keep grid cards aligned regardless of description length. */
.row .report-card .report-description { min-height: 2.7em; }

.report-actions { display: flex; gap: 0.5rem; }
.btn.btn-report {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn.btn-view {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}
.btn.btn-view:hover {
    color: #fff;
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.32);
    transform: translateY(-1px);
}
.btn.btn-export {
    background: transparent;
    color: var(--app-text-muted);
    border: 1px solid var(--app-border);
}
.btn.btn-export:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Featured Master Report, gradient-tinted, slightly elevated. */
.card.report-card.border-primary {
    border-color: rgba(var(--primary-rgb), 0.4) !important;
    background: linear-gradient(120deg, rgba(var(--primary-rgb), 0.06), var(--app-panel) 55%);
}


/* =========================================================
   Sign-in page  (devise/sessions/new)
   Split shell: an "Aurora" brand panel, deep indigo with three drifting
   hue blobs (the brand gradient, animated) and a looping "ledger ticker"
   of the event types the app records, beside a quiet, focused form side.
   Display face: Sora (loaded from the view); everything else Inter.
   ========================================================= */

.signin {
    --si-ink: #0a102b;
    --si-ink-2: #101740;
    --si-text-on-ink: rgba(255, 255, 255, 0.92);
    --si-muted-on-ink: rgba(255, 255, 255, 0.74);

    display: grid;
    grid-template-columns: 1.1fr 1fr;
    width: 100%;
    min-height: 100vh;
}

/* ── Brand panel ── */
.signin__panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--si-ink) 20%, var(--si-ink-2) 100%);
    color: var(--si-text-on-ink);
    display: flex;
}

.signin__aurora { position: absolute; inset: 0; }

/* Contrast floor. Without this the aurora's bright middle sits directly behind
   the chart and the readings, and low-opacity white on it is unreadable. */
.signin__panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(180deg, rgba(10, 16, 43, 0.4) 0%, rgba(10, 16, 43, 0.12) 45%, rgba(10, 16, 43, 0.45) 100%),
        radial-gradient(115% 78% at 20% 52%, rgba(10, 16, 43, 0.42), transparent 72%);
}

.signin__blob {
    position: absolute;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    will-change: transform;
}

.signin__blob--indigo { background: #4361ee; top: -18%; left: -12%; animation: si-drift-a 26s ease-in-out infinite alternate; }
.signin__blob--violet { background: #7c3aed; bottom: -24%; left: 22%;  animation: si-drift-b 34s ease-in-out infinite alternate; }
.signin__blob--cyan   { background: #22d3ee; top: 8%;   right: -20%; opacity: 0.32; animation: si-drift-c 42s ease-in-out infinite alternate; }

@keyframes si-drift-a { to { transform: translate(10%, 14%) scale(1.15); } }
@keyframes si-drift-b { to { transform: translate(-8%, -12%) scale(0.9); } }
@keyframes si-drift-c { to { transform: translate(-14%, 10%) scale(1.2); } }

/* Sticky so the wordmark and the line stay framed while a tall form (sign-up)
   scrolls beside them, instead of drifting to the bottom of a very tall panel.
   On the one-viewport pages this changes nothing. */
.signin__panel-inner::-webkit-scrollbar { display: none; }

.signin__panel-inner {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.1rem;
    height: 100vh;
    /* The hook, the visual and the note together can outgrow a short laptop
       viewport; let the panel scroll rather than clip its own content. */
    overflow-y: auto;
    scrollbar-width: none;
    padding: 3.25rem 4.5rem;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

/* ── Auth panel heroes ──
   Three pages, three different jobs. The landing hero streams live entries;
   sign-in (.hero-week) reads a week back to you; sign-up (.iso) builds a stack
   as the form is answered. None of them repeats another. */

/* Sign-in: the shape of a week, then what it means, read one line at a time. */
.hero-week {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    width: 100%;
    max-width: 340px;
}

.hero-week__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Says plainly that these are not the viewer's numbers. */
.hero-week__tag {
    padding: 0.14rem 0.45rem;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

.hero-week__chart {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    height: 124px;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-week__col {
    position: relative;
    flex: 1 1 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

/* Bars grow from the axis once, left to right, then hold. */
.hero-week__bar {
    display: block;
    width: 100%;
    height: var(--h, 50%);
    border-radius: 4px 4px 2px 2px;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.24));
    transform-origin: bottom;
    animation: hero-week-grow 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: calc(0.3s + var(--i, 0) * 0.07s);
    transition: background-image 0.5s ease, box-shadow 0.5s ease, opacity 0.5s ease;
}

@keyframes hero-week-grow {
    from { transform: scaleY(0); opacity: 0; }
    to   { transform: scaleY(1); opacity: 1; }
}

/* Resting state: the week's best day stays gently lit. */
.hero-week__col.is-peak .hero-week__bar {
    background-image: linear-gradient(180deg, #a5b4fc, #6366f1);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

/* While a reading names particular days, those days take the light and the
   rest step back, so the chart is visibly answering the sentence. */
.hero-week.is-reading .hero-week__bar { opacity: 0.5; }

.hero-week.is-reading .hero-week__col.is-lit .hero-week__bar {
    opacity: 1;
    background-image: linear-gradient(180deg, #a5b4fc, #6366f1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.hero-week__day {
    position: absolute;
    bottom: -1.25rem;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.68rem;
    font-weight: 600;
    transition: color 0.4s ease;
}

.hero-week__col.is-peak .hero-week__day { color: rgba(255, 255, 255, 0.8); }
.hero-week.is-reading .hero-week__day { color: rgba(255, 255, 255, 0.4); }
.hero-week.is-reading .hero-week__col.is-lit .hero-week__day { color: rgba(255, 255, 255, 0.95); }

/* One reading at a time, stacked so the panel never jumps as they swap. */
.hero-week__reads {
    position: relative;
    min-height: 3.1rem;
}

.hero-week__read {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1rem 1fr;
    gap: 0.6rem;
    align-items: start;
    margin: 0;
    color: var(--si-muted-on-ink);
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.hero-week__read.is-active { opacity: 1; transform: none; }

.hero-week__read i { color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; line-height: 1.45; }

.hero-week__dots { display: flex; gap: 0.3rem; }

.hero-week__dot {
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.28);
    transition: background-color 0.4s ease, width 0.4s ease;
}

.hero-week__dot.is-active { width: 22px; background-color: rgba(255, 255, 255, 0.85); }

/* Sign-up: an isometric stack that assembles itself, then breathes.
   Two nested groups per cube on purpose: the outer one runs the one-time drop,
   the inner one the endless float, so the two transforms never fight. */
.iso {
    width: 100%;
    max-width: 300px;
}

.iso__svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Drop in from above, back of the stack first. */
.iso__cube {
    animation: iso-drop 0.62s cubic-bezier(0.34, 1.4, 0.5, 1) backwards;
    animation-delay: calc(0.35s + var(--i, 0) * 0.075s);
}

@keyframes iso-drop {
    from { opacity: 0; transform: translateY(-34px); }
    to   { opacity: 1; transform: none; }
}

/* Then a slow ripple travels through the stack, so it is never quite static. */
.iso__cube-inner {
    animation: iso-float 3.6s ease-in-out infinite;
    animation-delay: calc(1s + var(--i, 0) * 0.12s);
}

@keyframes iso-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-2.5px); }
}

/* Unbuilt: a wireframe ghost, so the shape of what you are making is already
   there before you have typed a word. */
.iso__face {
    stroke: rgba(255, 255, 255, 0.34);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    transition: fill 0.55s ease, stroke 0.55s ease, stroke-dasharray 0.55s ease;
}

.iso__face--top   { fill: rgba(255, 255, 255, 0.07); }
.iso__face--left  { fill: rgba(255, 255, 255, 0.03); }
.iso__face--right { fill: rgba(255, 255, 255, 0.05); }

/* Built: solid, lit, and unmistakably a box. Three tones give the cube its
   form, brightest on top where the light falls. */
.iso__cube.is-filled .iso__face {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-dasharray: none;
}

.iso__cube.is-filled .iso__face--top   { fill: #a5b4fc; }
.iso__cube.is-filled .iso__face--right { fill: #6366f1; }
.iso__cube.is-filled .iso__face--left  { fill: #4338ca; }

/* Brand at the top, this block in the middle, the closing note at the bottom:
   three children for the panel's space-between to spread. */
.signin__panel-mid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* The hook. Sized well under the landing headline on purpose: this page's job
   is the form beside it, not the pitch. */
.signin__panel-hook {
    margin: 0;
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.45rem, 2.1vw, 1.85rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--si-text-on-ink);
}

.signin__panel-sub {
    margin: 0 0 1.1rem;
    max-width: 34ch;
    color: var(--si-muted-on-ink);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* The panel's closing words. Quiet on purpose: it sits well below the hook. */
.signin__panel-note {
    margin: 0;
    max-width: 22ch;
    color: var(--si-muted-on-ink);
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.signin__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
}

.signin__brand i { font-size: 1.5rem; color: #8aa6ff; }



/* ── Ledger ticker (the signature) ── */



@keyframes si-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
    50%      { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); }
}

/* Window clips the loop; fade masks soften both edges. */



/* The list is rendered twice; scrolling exactly half loops seamlessly. */


.tick {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Direction is color: green in, rose out, same convention as the app. */
.tick--in  { background: rgba(52, 211, 153, 0.18);  color: #6ee7b7; }
.tick--out { background: rgba(251, 113, 133, 0.18); color: #fda4af; }
.tick--pay { background: rgba(34, 211, 238, 0.16);  color: #67e8f9; }
.tick--low { background: rgba(251, 191, 36, 0.16);  color: #fcd34d; }
.tick--new { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }

/* ── Form side ── */
.signin__side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: var(--app-bg);
}

.signin__form-wrap { width: 100%; max-width: 400px; }

.signin__brand--mobile { display: none; color: var(--primary-color); }
.signin__brand--mobile i { color: var(--primary-color); }

.signin__title {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.65rem;
    letter-spacing: -0.01em;
    color: var(--app-text);
    margin: 0 0 0.3rem;
}

.signin__subtitle {
    color: var(--app-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.signin .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--app-text);
}

/* Field label on the left, its helper link on the right, both sitting on the
   same baseline just above the input. */
.signin__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.signin__label-row .form-label { margin-bottom: 0.5rem; }

.signin__forgot {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--app-text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.signin__forgot:hover,
.signin__forgot:focus-visible {
    color: var(--primary-color);
    text-decoration: underline;
}

.signin .form-control {
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    color: var(--app-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Without this the auth fields inherit Bootstrap's placeholder colour, which is
   close enough to entered text that people read the hint as a filled value and
   tab past it. */
.signin .form-control::placeholder,
.signin .form-control::-webkit-input-placeholder {
    color: var(--app-placeholder);
    opacity: 1; /* Firefox dims placeholders by default; the colour above is the control */
}

/* A select showing its blank option is a placeholder too, even though it is
   really a selected <option>. :has is already required by allow_browser. */
.signin .form-select:has(option[value=""]:checked) { color: var(--app-placeholder); }
.signin .form-select option { color: var(--app-text); }

.signin .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14);
}

.signin__password { position: relative; }

.signin__password .form-control { padding-right: 2.8rem; }

.signin__password-toggle {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--app-text-muted);
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.signin__password-toggle:hover { color: var(--primary-color); background: rgba(var(--primary-rgb), 0.08); }

.signin__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
}

.auth-flash {
    overflow: hidden;
    max-height: 6rem;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin-bottom 0.4s ease,
        padding-top 0.4s ease, padding-bottom 0.4s ease;
}

.auth-flash--hide {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.signin__row .form-check { margin: 0; }
.signin__row .form-check-label { font-size: 0.88rem; color: var(--app-text-muted); }

.signin__links .auth-link {
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.signin__submit {
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.signin__submit i { transition: transform 0.18s ease; }

.signin__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.32);
}

.signin__submit:hover i { transform: translateX(3px); }

/* ── Entrance: staggered fade-up, once, on load ── */
.signin .reveal {
    opacity: 0;
    animation: si-reveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes si-reveal {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* =========================================================
   Landing page  (home#index, the public "/")
   Ink hero carrying the same drifting aurora as the sign-in panel, then a light
   body whose spine is a hairline "ledger line": entries hang off a rule, because
   that is what this product is, an append-only line of entries. No cards.
   Display face: Sora; body Inter. Hero and closing band stay ink in both themes,
   the body follows the --app-* tokens.
   ========================================================= */

.lp {
    --lp-ink: #0a102b;
    --lp-ink-2: #101740;
    --lp-on-ink: rgba(255, 255, 255, 0.94);
    --lp-on-ink-muted: rgba(255, 255, 255, 0.74);
    --lp-rule: var(--app-border);

    font-family: 'Inter', system-ui, sans-serif;
    color: var(--app-text);
    background: var(--app-bg);
}

/* ── Hero ── */
.lp-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--lp-ink) 20%, var(--lp-ink-2) 100%);
    color: var(--lp-on-ink);
}

.lp-hero__aurora { position: absolute; inset: 0; }

/* Same contrast floor as the auth panel: the aurora is at its brightest exactly
   where the lede and the ledger sit. */
.lp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(180deg, rgba(10, 16, 43, 0.38) 0%, rgba(10, 16, 43, 0.1) 40%, rgba(10, 16, 43, 0.38) 100%);
}

.lp-nav { position: absolute; top: 0; left: 0; right: 0; }

.lp-hero__aurora {
    position: absolute;
    inset: -10% 0;
    /* Drifts slower than the page: depth without moving the blobs themselves,
       whose own keyframes own their transform. */
    transform: translate3d(0, calc(var(--p, 0) * 8vh), 0);
    will-change: transform;
}

}

.lp-hero__aurora .signin__blob { opacity: 0.34; }
.lp-hero__aurora .signin__blob--cyan { opacity: 0.2; }

.lp-nav {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0;
}

.lp-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.lp-nav__link {
    color: var(--lp-on-ink-muted);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.lp-nav__link:hover { color: var(--lp-on-ink); }

.lp-nav__actions {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
}

/* The banner's sign-up door. Outlined rather than filled, so it sits below the
   hero's own button in weight but above the plain "Sign in" link. */
.lp-nav__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 1rem;
    color: var(--lp-on-ink);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lp-nav__cta:hover {
    color: var(--lp-on-ink);
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.55);
}

.lp-hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 3.5rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 5.5rem;
}

.lp-hero__title {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(2.7rem, 6.4vw, 4.7rem);
    line-height: 0.96;
    letter-spacing: -0.035em;
    margin: 0 0 1.15rem;
}

.lp-hero__lede {
    max-width: 34ch;
    margin: 0 0 2rem;
    color: var(--lp-on-ink-muted);
    font-size: clamp(1.02rem, 1.4vw, 1.16rem);
    line-height: 1.6;
}

.lp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* The Google button is a fixed brand asset and brings its own white ground; it
   ships as a d-grid form, so cap it here rather than let it span the column. */
.lp-hero__actions form { display: block !important; width: auto; }
.lp-hero__actions .google-btn { width: auto; padding-inline: 1.35rem; }

.lp-hero__actions--center { justify-content: center; }

/* Primary CTA when the Google button isn't available; carries the brand gradient
   so the sign-up door still reads as the primary one. */
.lp-btn-solid {
    padding: 0.7rem 1.35rem;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    background-image: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: 0;
    border-radius: 10px;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.lp-btn-solid:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }

.lp-btn-ghost {
    padding: 0.7rem 1.35rem;
    color: var(--lp-on-ink);
    font-size: 0.95rem;
    font-weight: 600;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.lp-btn-ghost:hover {
    color: var(--lp-on-ink);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

.lp-hero__fine {
    max-width: 42ch;
    margin: 1.35rem 0 0;
    color: var(--lp-on-ink-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ── The hero's ledger: the one bold element on the page ── */
.lp-ledger {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 1.1rem 1.25rem 1.35rem;
    backdrop-filter: blur(6px);
}

.lp-ledger__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.lp-ledger__pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.lp-ledger__list { list-style: none; margin: 0; padding: 0; }

.lp-ledger__row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0;
    font-size: 0.86rem;
}

.lp-ledger__row + .lp-ledger__row { border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* The loop window. A mask fades both ends so rows arrive and leave rather than
   being clipped, which is what makes it read as a continuous ledger. */
.lp-ledger__window {
    position: relative;
    height: 15.5rem;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}

/* The list holds two identical copies, so -50% lands on the same frame it
   started from and the loop has no seam. */
.lp-ledger__list {
    animation: lp-ledger-loop 26s linear infinite;
    will-change: transform;
}

@keyframes lp-ledger-loop {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
}

/* Reading a row shouldn't be a race. */
.lp-ledger:hover .lp-ledger__list,
.lp-ledger:focus-within .lp-ledger__list { animation-play-state: paused; }

.lp-ledger__time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
}

.lp-ledger__text {
    color: var(--lp-on-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-ledger__amount {
    color: var(--lp-on-ink-muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── Body ── */
.lp-body {
    max-width: 820px;
    margin: 0 auto;
    padding: 5rem 1.5rem 1rem;
}

.lp-section + .lp-section { margin-top: 4.5rem; }

.lp-section__title {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    letter-spacing: -0.025em;
    margin: 0 0 2.25rem;
}

/* The ledger line. Entries hang off a single hairline rule; the tick on the rule
   carries the same hue language as the ledger tags above. */
.lp-entries,
.lp-steps {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2rem;
    border-left: 1px solid var(--lp-rule);
}

.lp-entry,
.lp-step { position: relative; }

.lp-entry + .lp-entry,
.lp-step + .lp-step { margin-top: 2.5rem; }

.lp-entry::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: -2.34rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--lp-tick, var(--primary-color));
    box-shadow: 0 0 0 4px var(--app-bg);
}

.lp-entry--in  { --lp-tick: #10b981; }
.lp-entry--pay { --lp-tick: #06b6d4; }
.lp-entry--new { --lp-tick: #7c3aed; }
.lp-entry--low { --lp-tick: #f59e0b; }

.lp-entry__title,
.lp-step__title {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.08rem;
    letter-spacing: -0.015em;
    margin: 0 0 0.5rem;
}

.lp-entry__text,
.lp-step__text {
    max-width: 58ch;
    margin: 0;
    color: var(--app-text-muted);
    font-size: 0.97rem;
    line-height: 1.68;
}

.lp-step__num {
    position: absolute;
    top: 0;
    left: -2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background-color: var(--app-bg);
    border: 1px solid var(--lp-rule);
    color: var(--app-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ── Closing band ── */
.lp-close {
    position: relative;
    overflow: hidden;
    margin-top: 5.5rem;
    background: linear-gradient(160deg, var(--lp-ink) 20%, var(--lp-ink-2) 100%);
    color: var(--lp-on-ink);
}

.lp-close__inner {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem;
    text-align: center;
}

.lp-close__title {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    letter-spacing: -0.03em;
    margin: 0 0 1.75rem;
}

.lp-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 2.5rem;
    color: var(--app-text-muted);
    font-size: 0.85rem;
}

.lp-foot__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 600;
    color: var(--app-text);
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .lp-hero__inner {
        grid-template-columns: 1fr;
        gap: 2.75rem;
        padding-block: 3.5rem 4rem;
    }
    .lp-hero__lede { max-width: 46ch; }
}

@media (max-width: 575.98px) {
    .lp-nav { padding-inline: 1.25rem; }
    .lp-nav__actions { gap: 0.7rem; }
    .lp-nav__cta { padding: 0.38rem 0.8rem; font-size: 0.83rem; }
    .lp-ledger__row { grid-template-columns: auto auto minmax(0, 1fr); }
    .lp-ledger__amount { display: none; }
    .lp-entries, .lp-steps { padding-left: 1.5rem; }
    .lp-entry::before { left: -1.84rem; }
    .lp-step__num { position: static; margin-bottom: 0.55rem; }
    /* Stack the two CTAs as equal full-width blocks rather than one wide button
       beside a small one. */
    .lp-hero__actions { flex-direction: column; align-items: stretch; }
    .lp-hero__actions form,
    .lp-hero__actions .google-btn,
    .lp-hero__actions .lp-btn-solid,
    .lp-hero__actions .lp-btn-ghost { width: 100%; }
}

/* ── Quality floor ── */
.lp a:focus-visible,
.lp button:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .lp .signin__blob { animation: none; }
    .lp-ledger__list { animation: none; }
    .lp-ledger__window { height: auto; -webkit-mask-image: none; mask-image: none; }
    /* Without the loop only the first pass should be in the DOM's way. */
    .lp-ledger__row:nth-child(n + 7) { display: none; }
    .lp-btn-solid { transition: none; }
    .lp-btn-solid:hover { transform: none; }
    .lp-nav__cta { transition: none; }
}

/* ── Sign-up flow (public /signup, /signup/details, /signup/pending) ──
   Rides on the .signin two-pane shell; everything here is the extra furniture
   the sign-in page doesn't need. */

/* Google auth button, shared by sign-in and sign-up. Google's brand guidance:
   white ground, neutral border, the multi-colour mark at its own colours. */
.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3c4043;
    background-color: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 10px;
    transition: box-shadow 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.google-btn:hover {
    color: #3c4043;
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.24);
    transform: translateY(-1px);
}

.google-btn__mark { flex: 0 0 auto; }

/* The mark must keep its own colours, so the button stays light in dark mode
   and only its surroundings change. */
[data-bs-theme="dark"] .google-btn {
    color: #e8eaed;
    background-color: #1f2430;
    border-color: #3c4149;
}

[data-bs-theme="dark"] .google-btn:hover { background-color: #262c3a; }

/* "or" rule between the Google button and the password form. */
.signin__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.1rem 0;
    color: var(--app-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.signin__divider::before,
.signin__divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background-color: var(--app-border);
}

.signin__fineprint {
    margin-top: 1.1rem;
    color: var(--app-text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.signin__fineprint--center { text-align: center; }

/* Numbered "what happens next" list on the sign-up landing and pending pages. */
.signup-steps {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.signup-steps li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--app-text-muted);
    font-size: 0.88rem;
}

.signup-steps li > span {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--app-border);
    color: var(--app-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.signup-steps li.is-done { color: var(--app-text); }
.signup-steps li.is-done > span { background-color: #16a34a; color: #ffffff; }
.signup-steps li.is-current { color: var(--app-text); font-weight: 600; }

.signup-steps li.is-current > span {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* The verified Google identity, shown read-only above the details form. */
.signup-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.7rem 0.9rem;
    background-color: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 10px;
}

.signup-identity__avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.signup-identity__avatar--blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--app-border);
    color: var(--app-text-muted);
}

.signup-identity__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.signup-identity__text strong {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signup-identity__text small {
    color: var(--app-text-muted);
    font-size: 0.75rem;
}

.signup-identity__check {
    margin-left: auto;
    color: #16a34a;
}

/* The sign-up form is taller than one viewport: top-align it and give it a little
   more width than the sign-in card, so the paired fields don't crush. */
.signin__side--form {
    align-items: flex-start;
    padding-block: 3rem;
}

.signin__form-wrap--wide { max-width: 460px; }

/* Separates "who you are" from "what the business is". */
.signup-rule {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid var(--app-border);
    opacity: 1;
}

.signin .form-text {
    color: var(--app-text-muted);
    font-size: 0.78rem;
}

/* Big status glyph on the "awaiting approval" page. */
.signup-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1.1rem;
    border-radius: 50%;
    background-image: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(6, 182, 212, 0.14));
    color: var(--primary-color);
    font-size: 1.6rem;
}

/* ── Responsive: panel becomes a compact band; ticker goes with it ── */
@media (max-width: 899.98px) {
    .signin { grid-template-columns: 1fr; }
    .signin__panel { display: none; }
    .signin__brand--mobile { display: inline-flex; margin-bottom: 1.5rem; font-size: 1.3rem; }
    .signin__side { min-height: 100vh; }
    .signup-steps { margin-top: 1.1rem; }
}

/* ── Quality floor ── */
.signin a:focus-visible,
.signin button:focus-visible,
.signin input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .signin__blob { animation: none; }
    .hero-week__bar { animation: none; transition: none; }
    .hero-week__read { transition: none; }
    .hero-week__dot { transition: none; }
    .iso__cube, .iso__cube-inner { animation: none; }
    .iso__face { transition: none; }
    .signin .reveal { animation: none; opacity: 1; }
    .signin__submit,
    .signin__submit i { transition: none; }
    .google-btn { transition: none; }
    .google-btn:hover { transform: none; }
}

/* ── Snow bear (sign-in mascot) ──
   Paws are drawn at the eye-covering position in the SVG; at rest they're
   translated down out of the circular badge. .bear--hiding raises them fully
   (password focused), .bear--peek half-raises them (password shown). */
.bear {
    width: 116px;
    height: 116px;
    margin: 0 0 1.25rem;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(160deg, #e6ecff 0%, #dbe7ff 55%, #d3f1fa 100%);
    border: 1px solid var(--app-border);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.14);
}

[data-bs-theme="dark"] .bear {
    background: linear-gradient(160deg, #232e55 0%, #1c2749 55%, #173a4b 100%);
}

.bear svg { display: block; width: 100%; height: 100%; }

.bear__paws {
    transform: translateY(125px);
    transition: transform 0.42s cubic-bezier(0.3, 1.35, 0.4, 1);
    will-change: transform;
}

.bear--hiding .bear__paws { transform: translateY(0); }
.bear--peek   .bear__paws { transform: translateY(42px); }

/* Head ducks a touch while covering, sells the "not looking!" gesture. */
.bear__face { transition: transform 0.42s cubic-bezier(0.3, 1.35, 0.4, 1); }
.bear--hiding .bear__face { transform: translateY(5px); }

/* Pupils get a soft transition when following the email text. */
.bear__eyes { transition: transform 0.18s ease-out; }

@media (prefers-reduced-motion: reduce) {
    .bear__paws, .bear__face, .bear__eyes { transition: none; }
}

/* ── Platform action queue ─────────────────────────────────────────────────
   The super_admin's "needs your attention" list on /platform. Rows are whole
   links (the whole row is the target, not just the title) and carry a severity
   stripe on the leading edge so the ordering reads at a glance. Uses the same
   --dash-* tokens as the KPI cards so it sits in the same visual system. */
.platform-tasks__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--dash-border);
}

.platform-tasks__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dash-text);
}

.platform-tasks__item + .platform-tasks__item {
    border-top: 1px solid var(--dash-border);
}

/* Severity stripe. Colours match the badge tone used on each row. */
.platform-tasks__item {
    border-left: 3px solid transparent;
}
.platform-tasks__item--critical { border-left-color: #dc2626; }
.platform-tasks__item--warning  { border-left-color: #d97706; }
.platform-tasks__item--info     { border-left-color: var(--dash-border); }

.platform-tasks__link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.15rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}
.platform-tasks__link:hover,
.platform-tasks__link:focus-visible {
    background: rgba(var(--primary-rgb), 0.05);
    color: inherit;
}

.platform-tasks__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
    font-size: 1rem;
}

.platform-tasks__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1 1 auto;
}

.platform-tasks__item-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--dash-text);
}

.platform-tasks__detail {
    font-size: 0.82rem;
    color: var(--dash-text-muted);
}

.platform-tasks__count { flex: 0 0 auto; }

.platform-tasks__chevron {
    flex: 0 0 auto;
    color: var(--dash-text-muted);
    font-size: 0.85rem;
}

@media (max-width: 575.98px) {
    .platform-tasks__detail { display: none; }
}

/* ── Header notification bell ──────────────────────────────────────────────
   Platform owner's notification dropdown. Shares the PlatformTasks feed with
   the /platform action queue, and reuses .app-header__theme-toggle for the
   button so it sits flush with the palette and theme controls beside it. */
.notif { position: relative; }

.notif__button { position: relative; }

/* Count pill overlapping the bell, the way a mail/app badge sits. */
.notif__badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid var(--app-panel);
}
/* Nothing blocking outstanding, routine work only, so drop the alarm colour. */
.notif__badge--muted { background: var(--app-text-muted); }

.notif__menu {
    width: min(94vw, 400px);
    padding: 0;
    border: 1px solid var(--app-border);
    background: var(--app-panel);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.notif__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--app-border);
}

.notif__title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-text-muted);
}

.notif__head-link {
    font-size: 0.78rem;
    text-decoration: none;
}

/* Long queues scroll inside the dropdown rather than running off-screen. */
.notif__list {
    max-height: min(60vh, 420px);
    overflow-y: auto;
}

.notif__list > li + li { border-top: 1px solid var(--app-border); }

.notif__item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    text-decoration: none;
    color: inherit;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease;
}
.notif__item:hover,
.notif__item:focus-visible {
    background: rgba(var(--primary-rgb), 0.06);
    color: inherit;
}
.notif__item--critical { border-left-color: #dc2626; }
.notif__item--warning  { border-left-color: #d97706; }

.notif__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
    font-size: 0.9rem;
}

.notif__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1 1 auto;
}

.notif__item-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Detail is supporting text, clamp it so one long org list can't make a row
   tower over the others. */
.notif__detail {
    font-size: 0.76rem;
    color: var(--app-text-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif__count { flex: 0 0 auto; align-self: center; }

.notif__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 1.6rem 1rem;
    text-align: center;
    color: var(--app-text-muted);
}
.notif__empty i { font-size: 1.5rem; color: #16a34a; }
.notif__empty span { font-size: 0.88rem; font-weight: 600; color: var(--app-text); }
.notif__empty small { font-size: 0.76rem; }
