/* ==========================================================================
   Huce Business – design system
   Tokens first; everything else uses them so light and dark stay in step.
   ========================================================================== */

:root {
    --bg: #f4f5fa;
    --bg-grad: radial-gradient(1200px 600px at 100% -10%, #eceaff 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #e8f4ff 0%, transparent 55%);
    --surface: #ffffff;
    --surface-2: #f8f9fc;
    --surface-3: #f1f3f8;
    --border: #e6e8f0;
    --border-strong: #d5d9e4;
    --text: #0e1326;
    --text-2: #474e66;
    --muted: #868ca3;
    --brand: #4f46e5;
    --brand-2: #8b5cf6;
    --brand-ink: #3730a3;
    --brand-soft: #eef0ff;
    --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #c026d3 120%);
    --pos: #059669;
    --pos-soft: #e6f7f0;
    --warn: #c2620a;
    --warn-soft: #fff4e2;
    --neg: #dc2f2f;
    --neg-soft: #fdecec;
    --info-soft: #eaf2ff;
    --info: #2563eb;
    --side: #0b1022;
    --side-2: #151c38;
    --side-text: #aab1d6;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
    --shadow-md: 0 6px 20px -6px rgba(16, 24, 40, .10), 0 2px 6px -2px rgba(16, 24, 40, .05);
    --shadow-lg: 0 24px 56px -16px rgba(16, 24, 40, .25);
    --ring: 0 0 0 4px rgba(79, 70, 229, .16);
    --radius: 16px;
    --radius-sm: 10px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #090d1a;
        --bg-grad: radial-gradient(1000px 600px at 100% -10%, rgba(99, 82, 255, .16) 0%, transparent 60%), radial-gradient(800px 500px at -10% 110%, rgba(37, 99, 235, .10) 0%, transparent 55%);
        --surface: #111729;
        --surface-2: #151c31;
        --surface-3: #1b2340;
        --border: #222b47;
        --border-strong: #2e395c;
        --text: #e9ecf7;
        --text-2: #b2b8d0;
        --muted: #7b83a3;
        --brand: #7c74ff;
        --brand-ink: #b9b4ff;
        --brand-soft: rgba(124, 116, 255, .14);
        --pos: #34d399; --pos-soft: rgba(52, 211, 153, .12);
        --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
        --neg: #f87171; --neg-soft: rgba(248, 113, 113, .12);
        --info: #60a5fa; --info-soft: rgba(96, 165, 250, .12);
        --side: #070a15;
        --side-2: #121935;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .5);
        --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #090d1a;
    --bg-grad: radial-gradient(1000px 600px at 100% -10%, rgba(99, 82, 255, .16) 0%, transparent 60%), radial-gradient(800px 500px at -10% 110%, rgba(37, 99, 235, .10) 0%, transparent 55%);
    --surface: #111729;
    --surface-2: #151c31;
    --surface-3: #1b2340;
    --border: #222b47;
    --border-strong: #2e395c;
    --text: #e9ecf7;
    --text-2: #b2b8d0;
    --muted: #7b83a3;
    --brand: #7c74ff;
    --brand-ink: #b9b4ff;
    --brand-soft: rgba(124, 116, 255, .14);
    --pos: #34d399; --pos-soft: rgba(52, 211, 153, .12);
    --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
    --neg: #f87171; --neg-soft: rgba(248, 113, 113, .12);
    --info: #60a5fa; --info-soft: rgba(96, 165, 250, .12);
    --side: #070a15;
    --side-2: #121935;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: "SF Pro Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; line-height: 1.5; color: var(--text);
    background: var(--bg); background-image: var(--bg-grad); background-attachment: fixed;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -0.025em; font-weight: 700; }
h2 { font-size: 15px; margin: 0; letter-spacing: -0.01em; font-weight: 650; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
h1:focus { outline: none; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
::selection { background: rgba(79, 70, 229, .2); }
.num, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
    background: linear-gradient(180deg, var(--side) 0%, #0d1330 100%); color: var(--side-text);
    padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, .04);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 17px; letter-spacing: -0.02em; text-decoration: none !important; padding: 0 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-weight: 750; }
.brand-text small { font-size: 11px; color: var(--side-text); letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
    background: var(--grad); color: #fff; font-weight: 800; font-size: 18px;
    box-shadow: 0 6px 18px -4px rgba(124, 58, 237, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #5d6694; padding: 0 12px; margin: 6px 0 4px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
    position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
    color: var(--side-text); font-weight: 550; text-decoration: none !important;
    transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.sidebar nav a .icon { opacity: .8; transition: transform .25s var(--spring); }
.sidebar nav a:hover { background: var(--side-2); color: #fff; }
.sidebar nav a:hover .icon { transform: scale(1.12); }
.sidebar nav a.active { color: #fff; background: linear-gradient(90deg, rgba(124, 116, 255, .22), rgba(124, 116, 255, .06)); }
.sidebar nav a.active::before {
    content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
    background: var(--grad); animation: grow-y .35s var(--spring);
}
.sidebar nav a.active .icon { opacity: 1; color: #c4bfff; }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #f59e0b; color: #1d1300; text-align: center; animation: pop .4s var(--spring); }
.nav-badge.red { background: #ef4444; color: #fff; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-chip .who b { color: #fff; font-size: 13px; }
.user-chip .who a { color: var(--side-text); font-size: 12px; }
.user-chip .theme-toggle { margin-left: auto; }
.theme-toggle { background: rgba(255, 255, 255, .06); border: 0; color: var(--side-text); width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .3s var(--spring); }
.theme-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: rotate(-20deg); }

.content { min-width: 0; padding: 22px 36px 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.crumbs { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.topbar-actions { display: flex; gap: 8px; }
/* Opacity only: a transform here would become the containing block for the fixed drawers/modals inside pages. */
.page { max-width: 1360px; margin: 0 auto; animation: page-in .4s var(--ease); }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.back:hover { color: var(--text); text-decoration: none; }
.back .icon { transition: transform .2s var(--ease); }
.back:hover .icon { transform: translateX(-3px); }

/* ---------- Cards ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 16px 20px 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-head .hint { color: var(--muted); font-size: 12.5px; }
.card.lift { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
a.card { display: block; color: inherit; text-decoration: none !important; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.stack-gap { display: flex; flex-direction: column; gap: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.sticky { position: sticky; top: 20px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Hero card (moms, bank) */
.hero {
    position: relative; overflow: hidden; color: #fff; border: 0;
    background: var(--grad);
    box-shadow: 0 18px 40px -18px rgba(91, 33, 182, .55);
}
.hero::after {
    content: ""; position: absolute; inset: -40% -20% auto auto; width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); animation: float 9s ease-in-out infinite;
}
a.card.hero, .card.hero { color: #fff; }
.hero .muted, .hero .hint { color: rgba(255, 255, 255, .78); }
.hero a { color: #fff; }
.hero-dark { background: linear-gradient(140deg, #0f172a 0%, #1e1b4b 60%, #312e81 120%); box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .6); }
.hero-green { background: linear-gradient(140deg, #047857 0%, #059669 50%, #10b981 120%); box-shadow: 0 18px 40px -18px rgba(5, 150, 105, .5); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 550; }
.kpi-value { font-size: 27px; font-weight: 720; letter-spacing: -0.03em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; color: var(--muted); font-weight: 550; margin-left: 2px; }
.kpi-foot { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.chip-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.chip-icon.green { background: var(--pos-soft); color: var(--pos); }
.chip-icon.red { background: var(--neg-soft); color: var(--neg); }
.chip-icon.amber { background: var(--warn-soft); color: var(--warn); }
.spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 46px; opacity: .9; }
.spark path.line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.4s .2s var(--ease) forwards; }
.spark path.area { fill: url(#spark-grad); opacity: 0; animation: fade-in .8s .9s forwards; }

.big { font-size: 34px; font-weight: 760; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big small { font-size: 15px; font-weight: 600; opacity: .7; margin-left: 4px; }

/* ---------- Buttons ---------- */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 15px; border-radius: 11px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); font: inherit; font-weight: 620; font-size: 13.5px;
    cursor: pointer; white-space: nowrap; text-decoration: none !important; user-select: none;
    box-shadow: var(--shadow-sm);
    transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: var(--muted); box-shadow: var(--shadow-md); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--grad); background-size: 140% 140%; color: #fff; border-color: transparent; box-shadow: 0 8px 20px -8px rgba(91, 33, 182, .6), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-primary:hover { background-position: 100% 0; border-color: transparent; box-shadow: 0 12px 26px -10px rgba(91, 33, 182, .7); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); box-shadow: none; border-color: transparent; }
.btn-danger { color: var(--neg); }
.btn-danger:hover { background: var(--neg-soft); border-color: var(--neg); }
.btn-solid-danger { background: var(--neg); color: #fff; border-color: transparent; }
.btn-white { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); box-shadow: none; backdrop-filter: blur(6px); }
.btn-white:hover { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .5); }
.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn .spinner { width: 15px; height: 15px; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font: inherit; font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; transition: background .15s, color .15s, transform .15s; }
.icon-btn:hover { background: var(--neg-soft); color: var(--neg); }
.icon-btn:active { transform: scale(.9); }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* ---------- Forms ---------- */
label { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
label > input, label > select, label > textarea, label > .swatches, label > .color-row { display: block; margin-top: 6px; }
label > .swatches { display: flex; }
label .hint-text { margin-left: 4px; }
.form-grid > .link, .form-grid > button { justify-self: start; }
input, select, textarea {
    font: inherit; font-weight: 450; color: var(--text); padding: 9px 12px; width: 100%;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .2s var(--ease), background .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea { resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
input[type=color] { width: 46px; height: 40px; padding: 3px; cursor: pointer; }
input[type=date] { min-height: 40px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23868ca3' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
label.check { display: flex; flex-direction: row; align-items: center; gap: 10px; font-weight: 550; color: var(--text); cursor: pointer; }
label.check > input { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.hint-text { font-size: 12px; color: var(--muted); font-weight: 450; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 38px; }
.search { width: 300px; max-width: 100%; }

/* Drop zone around InputFile */
.dropzone { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-weight: 500; transition: border-color .2s, background .2s; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .chip-icon { flex: none; }
.dropzone b { color: var(--text); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table.compact td { padding: 8px 14px; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.clickable { cursor: pointer; transition: background .15s; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table tr.clickable td:first-child { position: relative; }
.table tr.clickable:hover td:first-child::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.table tr.selected td { background: var(--brand-soft); }
.table tr.struck td { color: var(--muted); }
.table tr.struck .strike { text-decoration: line-through; }
.table tr.head td { font-weight: 700; padding-top: 18px; border-bottom: 0; color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.table tr.sum td { font-weight: 700; border-top: 1px solid var(--border-strong); }
.table tr.total td { font-size: 16px; border-top: 2px solid var(--text); }
.table tr.entry-start td { border-top: 1px solid var(--border-strong); }
.table .cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .cell-main > div { min-width: 0; }
.table .cell-main b { display: block; font-weight: 620; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; color: var(--muted); padding: 44px 16px !important; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; color: var(--muted); text-align: center; }
.empty-state .empty-art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); animation: bob 3s ease-in-out infinite; }
.empty-state b { color: var(--text); font-size: 15px; }

/* Line editor */
.lines th { padding: 10px 8px; }
.lines td { padding: 8px 6px; vertical-align: top; border-bottom: 1px dashed var(--border); }
.lines input, .lines select, .lines textarea { padding: 7px 9px; font-size: 13.5px; }
.lines textarea { min-height: 38px; field-sizing: content; resize: none; }
.lines .line-total { padding-top: 16px; font-weight: 650; }
.lines tr { animation: row-in .35s var(--ease) both; }
.w-qty { width: 82px; } .w-unit { width: 86px; } .w-price { width: 116px; } .w-disc { width: 78px; } .w-vat { width: 96px; } .w-total { width: 116px; } .w-x { width: 40px; }

/* ---------- Tabs ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.segmented { display: inline-flex; gap: 2px; padding: 4px; border-radius: 13px; background: var(--surface-3); border: 1px solid var(--border); flex-wrap: wrap; }
.segmented button { position: relative; border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font: inherit; font-weight: 620; font-size: 13px; color: var(--muted); cursor: pointer; transition: color .2s, background .25s var(--ease), box-shadow .25s; display: inline-flex; align-items: center; gap: 6px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.segmented .count { font-size: 11px; background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; transition: background .2s; }
.segmented button.active .count { background: var(--brand-soft); color: var(--brand); }

/* ---------- Badges, pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-lg { font-size: 13px; padding: 6px 14px 6px 11px; }
.badge-grey { background: var(--surface-3); color: var(--text-2); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-red { background: var(--neg-soft); color: var(--neg); }
.badge-red::before { animation: pulse-dot 1.6s ease-in-out infinite; }
.badge-green { background: var(--pos-soft); color: var(--pos); }
.badge-blue { background: var(--brand-soft); color: var(--brand); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 2px 9px; }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-neg { background: var(--neg-soft); color: var(--neg); }
.pill-pos { background: var(--pos-soft); color: var(--pos); }
.hero .pill { background: rgba(255, 255, 255, .18); color: #fff; }
.seen { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--pos); font-weight: 600; margin-left: 6px; }
.sent { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-left: 6px; }

/* Avatar */
.avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.avatar.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 17px; }

/* ---------- Alerts & toasts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; font-size: 13.5px; animation: slide-down .3s var(--ease); }
.alert .icon { flex: none; margin-top: 1px; }
.alert-error { background: var(--neg-soft); color: var(--neg); }
.alert-ok { background: var(--pos-soft); color: var(--pos); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--info-soft); color: var(--info); }
.hero .alert { background: rgba(255, 255, 255, .16); color: #fff; }

.toasts { position: fixed; right: 22px; top: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px;
    padding: 12px 14px 12px 12px; border-radius: 14px; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-weight: 550;
    animation: toast-in .45s var(--spring) both; position: relative; overflow: hidden;
}
.toast.leaving { animation: toast-out .3s var(--ease) both; }
.toast .t-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast.ok .t-icon { background: var(--pos-soft); color: var(--pos); }
.toast.err .t-icon { background: var(--neg-soft); color: var(--neg); }
.toast .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad); animation: shrink linear forwards; }
.toast.err .bar { background: var(--neg); }

/* ---------- Modal & drawer ---------- */
.backdrop { position: fixed; inset: 0; z-index: 1500; background: rgba(8, 11, 24, .45); backdrop-filter: blur(4px); animation: fade-in .2s ease both; }
.modal { position: fixed; z-index: 1501; left: 50%; top: 50%; width: min(440px, calc(100vw - 32px)); transform: translate(-50%, -50%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-lg); animation: modal-in .35s var(--spring) both; }
.modal h2 { font-size: 18px; margin-bottom: 6px; }
.modal p { color: var(--text-2); margin: 0 0 20px; }
.modal .modal-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.modal .modal-icon.danger { background: var(--neg-soft); color: var(--neg); }
.modal .row-actions { justify-content: flex-end; margin-top: 0; }
.drawer { position: fixed; z-index: 1501; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: drawer-in .4s var(--ease) both; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px; }
.drawer-body > * { animation: rise .45s var(--ease) both; }
.drawer-foot { display: flex; gap: 8px; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }
.drawer-foot .grow { display: flex; gap: 8px; }
.close-btn { background: var(--surface-3); border: 0; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; color: var(--text-2); display: grid; place-items: center; transition: transform .25s var(--spring), background .2s; }
.close-btn:hover { transform: rotate(90deg); background: var(--border); }

/* ---------- Skeleton ---------- */
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 40%, var(--surface-3) 80%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton-line { height: 14px; margin: 10px 0; }
.skeleton-block { height: 120px; }

/* ---------- Totals & definition lists ---------- */
.totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 4px 0 10px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; }
.totals .total { color: var(--text); font-weight: 760; font-size: 19px; padding-top: 10px; border-top: 1px solid var(--border); letter-spacing: -0.02em; }
.hero .totals dt { color: rgba(255, 255, 255, .75); }
.hero .totals .total { color: #fff; border-color: rgba(255, 255, 255, .25); }

/* ---------- Invoice view ---------- */
.pdf-frame { position: relative; background: var(--surface-3); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pdf-frame iframe { width: 100%; height: calc(100vh - 150px); min-height: 760px; border: 0; display: block; animation: fade-in .6s .15s both; }
.timeline { list-style: none; margin: 4px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline li { position: relative; display: flex; gap: 12px; padding: 7px 0; color: var(--muted); animation: rise .4s var(--ease) both; }
.timeline li:nth-child(2) { animation-delay: .06s; } .timeline li:nth-child(3) { animation-delay: .12s; } .timeline li:nth-child(4) { animation-delay: .18s; } .timeline li:nth-child(5) { animation-delay: .24s; }
.timeline .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-strong); z-index: 1; flex: none; }
.timeline li.done { color: var(--text); }
.timeline li.done .dot { background: var(--pos); border-color: var(--pos); color: #fff; animation: pop .45s var(--spring) both; }
.timeline li.warn .dot { background: var(--neg); border-color: var(--neg); color: #fff; }
.timeline .when { display: block; font-size: 12px; color: var(--muted); }
.timeline b { font-weight: 620; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .bar-rev { fill: url(#bar-grad); }
.chart .bar-exp { fill: #f3a68d; }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: grow-y .8s var(--ease) both; transition: opacity .2s; }
.chart:hover .bar { opacity: .45; }
.chart .grp:hover .bar { opacity: 1; }
.chart text { font-size: 9px; fill: var(--muted); font-family: inherit; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.chart .grp .hit { fill: transparent; }
.chart .tip { opacity: 0; transition: opacity .15s; pointer-events: none; }
.chart .grp:hover .tip { opacity: 1; }
.chart .tip rect { fill: var(--text); }
.chart .tip text { fill: var(--surface); font-size: 9.5px; font-weight: 600; }
.legend { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-rev { background: var(--grad); } .sw-exp { background: #f3a68d; }

/* Countdown ring */
.ring { position: relative; width: 96px; height: 96px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: rgba(255, 255, 255, .2); }
.ring .arc { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); animation: ring-in 1.4s var(--ease) both; }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.ring .ring-label b { font-size: 24px; font-weight: 760; display: block; }
.ring .ring-label small { font-size: 10.5px; opacity: .8; letter-spacing: .06em; text-transform: uppercase; }

/* Progress */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; border-radius: inherit; background: var(--grad); transform-origin: left; animation: grow-x 1s var(--ease) both; }
.hero .progress { background: rgba(255, 255, 255, .2); }
.hero .progress > div { background: #fff; }

/* Bank card */
.bank-card { position: relative; border-radius: 20px; padding: 22px; color: #fff; overflow: hidden; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, #111827 0%, #1e3a8a 70%, #4f46e5 130%); box-shadow: 0 20px 40px -18px rgba(30, 58, 138, .7); }
.bank-card::before { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%); animation: float 10s ease-in-out infinite; }
.bank-card .bank-name { font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; justify-content: space-between; }
.bank-card .acct { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; opacity: .85; font-size: 14px; }
.bank-card .big { color: #fff; }
.bank-card .muted { color: rgba(255, 255, 255, .7); }
.tx-dir { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tx-dir.in { background: var(--pos-soft); color: var(--pos); }
.tx-dir.out { background: var(--surface-3); color: var(--text-2); }
.match-panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; animation: slide-down .3s var(--ease); display: flex; flex-direction: column; gap: 10px; }
.suggestion { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; text-align: left; font: inherit; color: inherit; width: 100%; }
.suggestion:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.suggestion.best { border-color: var(--brand); background: var(--brand-soft); }
.book-direct { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.book-direct input { grid-column: span 2; }

/* VAT */
.period-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 18px; }
.period { position: relative; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; animation: rise .4s var(--ease) both; }
.period:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.period.selected { border-color: var(--brand); box-shadow: var(--ring); }
.period .p-label { font-weight: 700; }
.period .p-amt { font-size: 18px; font-weight: 720; letter-spacing: -0.02em; margin: 6px 0; font-variant-numeric: tabular-nums; }
.period .p-dead { font-size: 12px; color: var(--muted); }
.vat-form td:first-child { color: var(--text-2); }
.vat-form .rub { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); font-size: 11px; font-weight: 700; color: var(--text-2); margin-right: 8px; }
.steps { list-style: none; padding: 0; margin: 4px 0 16px; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; }

/* Product grid */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile { text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; display: flex; flex-direction: column; gap: 6px; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.tile .price { font-size: 22px; font-weight: 740; letter-spacing: -0.02em; margin-top: auto; }
.tile .price small { font-size: 12px; color: var(--muted); font-weight: 550; }
.tile.add { align-items: center; justify-content: center; border-style: dashed; color: var(--muted); min-height: 150px; background: transparent; box-shadow: none; }
.tile.add:hover { color: var(--brand); }

/* Settings */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 20px; }
.subnav button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 11px; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; }
.subnav button:hover { background: var(--surface-3); color: var(--text); }
.subnav button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; transition: transform .2s var(--spring); }
.swatch:hover { transform: scale(1.12); }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.logo-preview { max-height: 52px; max-width: 220px; border-radius: 8px; background: #fff; padding: 6px; border: 1px solid var(--border); }

/* Activity */
.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.activity li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity li:last-child { border-bottom: 0; }
.activity .a-dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.activity .a-when { font-size: 12px; color: var(--muted); }

/* Misc text */
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.pre { white-space: pre-wrap; }
.ellipsis { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strong { font-weight: 650; }

/* Stagger: children rise one after another */
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; } .stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .10s; } .stagger > *:nth-child(4) { animation-delay: .14s; }
.stagger > *:nth-child(5) { animation-delay: .18s; } .stagger > *:nth-child(6) { animation-delay: .22s; }
.stagger > *:nth-child(7) { animation-delay: .26s; } .stagger > *:nth-child(8) { animation-delay: .30s; }
.stagger > *:nth-child(n+9) { animation-delay: .34s; }
tbody.stagger > tr { animation: row-in .4s var(--ease) both; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: #0b1022; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .7; }
.login-art .b1 { width: 420px; height: 420px; background: #6d28d9; left: -80px; top: -60px; animation: drift 14s ease-in-out infinite; }
.login-art .b2 { width: 360px; height: 360px; background: #2563eb; right: -60px; bottom: 40px; animation: drift 17s ease-in-out infinite reverse; }
.login-art .b3 { width: 260px; height: 260px; background: #db2777; left: 40%; top: 45%; animation: drift 20s ease-in-out infinite; opacity: .45; }
.login-art > * { position: relative; }
.login-art h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.035em; font-weight: 760; max-width: 460px; }
.login-art p { color: #c3c8e6; max-width: 420px; font-size: 15px; }
.login-art .feature-list { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.login-art .feature-list span { display: flex; gap: 10px; align-items: center; color: #dfe2f5; }
.login-art .feature-list .icon { color: #a5b4fc; }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 16px; animation: rise .6s var(--ease) both; }
.login-card h1 { font-size: 28px; }
.login-card .sub { color: var(--muted); margin: -8px 0 6px; }
.shake { animation: shake .45s var(--ease); }

#blazor-error-ui { background: var(--warn-soft); color: var(--warn); bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .7rem 1.25rem; position: fixed; width: 100%; z-index: 3000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---------- Keyframes ---------- */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes row-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-24px, 18px); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(60px, 40px) scale(1.1); } 66% { transform: translate(-40px, 30px) scale(.95); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px) scale(.97); } }
@keyframes shrink { from { width: 100%; } to { width: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring-in { from { stroke-dashoffset: var(--circ); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
    .settings { grid-template-columns: 1fr; }
    .subnav { flex-direction: row; flex-wrap: wrap; position: static; }
}
@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: sticky; top: 0; z-index: 100; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; overflow-x: auto; }
    .sidebar .nav-label, .sidebar .brand-text small, .sidebar-foot .who { display: none; }
    .sidebar nav { flex-direction: row; }
    .sidebar nav a { padding: 8px 10px; }
    .sidebar nav a span.lbl { display: none; }
    .sidebar nav a.active::before { display: none; }
    .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; }
    .user-chip { padding: 4px; background: none; border: 0; }
    .content { padding: 16px; }
    .grid-2, .grid-3, .form-grid, .form-grid.three { grid-template-columns: 1fr; }
    .kpis, .kpis[style] { grid-template-columns: 1fr 1fr !important; gap: 10px; }
    .kpi { padding: 14px; }
    .kpi-value { font-size: 19px; }
    .kpi .chip-icon { width: 28px; height: 28px; }
    .spark { display: none; }
    .topbar { display: none; }
    .page-head h1 { font-size: 22px; }
    .span-2, .span-3 { grid-column: span 1; }
    .login { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .table th, .table td { padding: 10px 12px; }
}
