﻿/* ============================================================================
   Poseo — sistemul de design web „Tejghea” (redesign 2026-09-02, spec §1–§2).
   Suprafață albă mată, obiecte conturate în cerneală, albastru = acțiune, lime doar pentru TOTAL,
   alamă doar pe marcă, fără umbre în afara .pop, selectat = umplere de cerneală.
   Peretele public și al portalului e bleumarin, cu linia grea de 2 px sub antetele de tabel.
   Tipografia web din 1.0.141: Inter pentru text, interfață și cifre (--font-text), Archivo la lățime
   naturală pentru titluri și wordmark (--font-display). Aplicația Avalonia își păstrează fonturile ei.

   STRATURI (în ordine — nu le amesteca):
     1. TOKENI      — o singură listă, light ȘI dark prin light-dark() (fără copii ținute
                      în sincron manual); tema explicită (data-theme) sau cea de sistem
                      schimbă DOAR color-scheme.
     2. BAZĂ        — @font-face, reset, tipografie (scala §1.3.1), linkuri, .container,
                      .num, .muted, .prose, .sr-only, sprite
     3. COMPONENTE  — butoane, câmpuri, cipuri, segment, badge-uri, panouri, KPI, tabel
                      (+ listă pe mobil din același markup), pager, toolbar, mesaje,
                      stare goală, antet de pagină, formulare, cod de afișat, notă cookie
     4. SHELL       — headerul public, shell-ul de aplicație (perete + bară + pagină +
                      subsol), banda de mediu, drawer-ul mobil, singura umbră (.pop)

   Reguli: zero hex în straturile 2–4 (numai var()); text-transform: uppercase e INTERZIS;
   box-shadow doar pe .pop; clasele vechi (cta-inline, dash-table, auth-ok, …) rămân
   definite ca ALIASURI până ce paginile migrează (W1–W7). Clasele `st-*`, `sem-*` și
   id-urile din ComenziLive sunt API-ul JS-ului (wwwroot/js/comenzi-live.js).
   Foile per familie de pagini: public.css, cont.css, portal.css, gestiune.css,
   gestiune-formulare.css, admin.css (linkate din App.razor cu ?v=).
   ========================================================================== */

/* ============================================================
   1. TOKENI
   ============================================================ */

/* Fiecare token poartă AMBELE valori: light-dark(light, dark). Ce comută tema e doar
   color-scheme (mai jos) — deci o singură listă, nu două copii. Sursa: spec §1.1. */
:root {
    color-scheme: light;

    /* suprafețe, linii, cerneală */
    --ground:      light-dark(#FFFFFF, #101214);   /* pagina (teren) */
    --mist:        light-dark(#F2F6FC, #161B21);   /* ceața aplicației: secțiuni alternate și platoul capturilor */
    --surface:     light-dark(#FFFFFF, #1E2327);   /* panou, card, tabel */
    --surface-2:   light-dark(#FAFBFC, #252B30);   /* hover de rând */
    --elevated:    light-dark(#FFFFFF, #2A3036);   /* dropdown, dialog */
    --inset:       light-dark(#EAF1FC, #1B2430);   /* chip, hover ghost, pistă */
    --shot-bg:     #FFFFFF;                         /* capturile luminoase își păstrează rama albă în ambele teme */
    --line:        light-dark(#E2E8EE, #353C44);   /* hairline */
    --line-2:      light-dark(#C6D0DA, #4A525B);   /* contur tare (separator, mostră) */
    /* Conturul câmpurilor de formular: ≥3:1 pe suprafață și pe teren, în ambele teme (WCAG 1.4.11; --line-2 dădea
       1,56:1 / 2,0:1 — auditul 2026-11-13, design-public-desktop-11). --line-2 rămâne pentru separatoare. */
    --field-line:  light-dark(#8292A0, #6B7580);
    --rule:        light-dark(#121212, #EDF1F5);   /* linia grea de tabel (2 px) */
    --ink:         light-dark(#121212, #EDF1F5);
    --ink-2:       light-dark(#34424D, #BCC6CF);
    --ink-3:       light-dark(#5A6B77, #8C98A3);
    --placeholder: light-dark(#6F8288, #7C8893);   /* ≥3:1 pe suprafață în ambele teme (A23) */
    --ink-inv:     light-dark(#FFFFFF, #08191B);

    /* perete, marcă */
    --wall: #152337;
    --wall-text: #DCE6F3;
    --wall-muted: #9DB0C9;
    --wall-heading: #FFFFFF;
    --wall-hover: rgba(255, 255, 255, .08);
    --wall-line: rgba(255, 255, 255, .12);
    --wall-active-bar: light-dark(transparent, #82B1FF);
    --wall-focus: #82B1FF;
    --brass: #C9A24B;                               /* DOAR punctul din „Poseo.” și inelul mărcii */

    /* acțiune: albastrul aplicației */
    --action:       light-dark(#356FD1, #82B1FF);
    --action-hover: light-dark(#2B5FB8, #A3C5FF);
    --action-edge:  light-dark(#214D99, #82B1FF);
    --on-action:    light-dark(#FFFFFF, #0B1626);
    --action-text:  light-dark(#214D87, #B4D0FF);
    --action-tint:  light-dark(#EAF1FC, #1B3355);
    /* Aliasurile istorice mută și portalul pe albastru, fără rescrierea foilor lui. */
    --teal: var(--action);
    --on-teal: var(--on-action);
    --teal-hover: var(--action-hover);
    --teal-pressed: var(--action-edge);
    --teal-tint: var(--action-tint);
    --teal-text: var(--action-text);
    --focus:        light-dark(rgba(53, 111, 209, .35), rgba(130, 177, 255, .45));
    --focus-ring:   light-dark(#356FD1, #82B1FF);
    --icon-accent:  light-dark(#356FD1, #82B1FF);

    /* stări */
    --ok:          light-dark(#0C7C45, #2FBE7A);
    --ok-text:     light-dark(#006400, #2FBE7A);
    --ok-tint:     light-dark(#E4F6EC, #0E3322);
    --warn:        light-dark(#B8761A, #E0A032);
    --warn-text:   light-dark(#7D4E00, #E0A032);
    --warn-tint:   light-dark(#FBF1DF, #33260E);
    --danger:      light-dark(#D11F33, #F0566A);
    --danger-text: light-dark(#B0182A, #F0566A);
    --danger-tint: light-dark(#FCE8EA, #3A1218);
    --on-danger:   light-dark(#FFFFFF, #101214);
    --danger-on-wall: #F0566A;                      /* roșul lizibil pe peretele #053238 (insigna Stripe pe mobil) */
    --violet:      light-dark(#7A4DD1, #A98AE6);
    --violet-tint: light-dark(#F1E9FC, #241640);

    /* stările mesei (inele) */
    --ring-seated: light-dark(#0E7C86, #2DB7C4);
    --ring-fired:  light-dark(#D98A1F, #E8A23A);
    --ring-urgent: light-dark(#D11F33, #F0566A);
    --ring-pay:    light-dark(#7A4DD1, #A98AE6);

    /* ancora SmartSell: TOTAL / Numerar — lime cu text negru, pe ambele teme */
    --total: #B5E8A1;
    --total-text: #0B1A07;
    --total-edge: #121212;

    /* geometrie */
    --r: 8px;          /* apăsabil, câmp */
    --r-lg: 14px;      /* panou, card */
    --r-chip: 6px;     /* chip de stare */
    --side-w: 236px;
    --top-h: 56px;
    --maxw: 1200px;    /* public */
    --gutter: clamp(16px, 4vw, 32px);   /* marginea orizontală a containerului public */
    --auth-w: 460px;       /* cardul de autentificare (login, resetare, 2FA…) */
    --auth-w-wide: 920px;  /* cardul lat (Creează cont: „Firma” și „Contul tău” pe două coloane) */
    /* (fără --page-w: portalul e full-width fluid din 2026-10 — lățimile de lizibilitate rămân locale: .prose, .es-text, .hub-desc) */

    /* tipografie (1.0.140, spec 2026-11-27-web-tipografie-design.md): două familii self-hostate, fără lățire */
    --font-text: "Inter", "Segoe UI", system-ui, sans-serif;                   /* text, interfață, tabele, cifre */
    --font-display: "Archivo", "Inter", "Segoe UI", system-ui, sans-serif;     /* titluri, wordmark */
    --font: var(--font-text);   /* alias istoric: zecile de `font: 600 14px/1 var(--font)` din foi rămân valabile */
    --fs-xs: 12.5px;    /* note, meta, subsol */
    --fs-sm: 13.5px;    /* tabel, etichete secundare */
    --fs-base: 17px;    /* corpul paginilor publice */
    --fs-app: 14.5px;   /* corpul shell-ului de aplicație (portal, admin): dens */
    --fs-lg: 19px;      /* .lede */
    --fs-xl: 22px;      /* .prose h2, .h1 pe telefon */
    --fs-2xl: 28px;     /* .h1, titlurile de pagină */
    --fs-3xl: clamp(28px, 3.3vw, 42px);   /* .d2 */
    --fs-4xl: clamp(38px, 5.2vw, 64px);   /* .d1 */
    --lh-tight: 1.14;   /* titlurile mari: la 1.08 virgula lui ș/ț atingea rândul următor (review vizual 1.0.140, #53); pe Archivo 800 se atinge și la 1.06 (proba 1.0.141) */
    --lh-snug: 1.25;    /* titlurile mici, etichete pe două rânduri */
    --lh-base: 1.55;    /* textul curgător */

    /* aliasuri istorice ale tokenilor (valabile o versiune — nu le folosi în cod nou) */
    --bg: var(--ground);
    --subtle: var(--inset);
    --hairline: var(--line);
    --strong: var(--line-2);
    --text: var(--ink);
    --text-2: var(--ink-2);
    --text-3: var(--ink-3);
    --text-inv: var(--ink-inv);
    --accent: var(--teal);
    --accent-hover: var(--teal-hover);
    --accent-pressed: var(--teal-pressed);
    --accent-subtle: var(--teal-tint);
    --accent-text: var(--teal-text);
    --ok-subtle: var(--ok-tint);
    --warn-subtle: var(--warn-tint);
    --danger-subtle: var(--danger-tint);
    --violet-subtle: var(--violet-tint);
    --r-sm: var(--r-chip);
    --r-md: var(--r);
    --r-panel: var(--r-lg);   /* folosit de blocurile de comenzi (public.css, download.css); era nedefinit ⇒ colțuri drepte */
}
/* Alegerea explicită (localStorage → data-theme) bate preferința de sistem. */
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { color-scheme: dark; }
}

/* ============================================================
   2. BAZĂ
   ============================================================ */

/* Fonturile web, self-hostate (CSP: font-src 'self'), variabile pe greutate, câte două subseturi cu unicode-range.
   Diacriticele RO: â/î în latin, ă și ș/ț cu VIRGULĂ dedesubt (U+0218–U+021B, glife distincte de sedilă) în latin-ext
   (verificate pe fișiere de Site/SiteFontFilesTests). Fișierele se servesc imutabil un an: un font nou = alt nume. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/inter-var-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/inter-var-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("/fonts/archivo-var-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("/fonts/archivo-var-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }

/* scroll-padding-top: o ancoră (#oferta, #lege…) aterizează SUB antetul lipit de 64 px, nu acoperită de el
   (auditul 2026-11-13, a11y-perf-lighthouse-06, design-public-mobile-08). */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font: 400 var(--fs-base)/var(--lh-base) var(--font-text);
    font-optical-sizing: auto;   /* Inter are axa opsz: la mărimi mari își strânge singur spațierea */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--teal-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.site-footer :focus-visible, .side :focus-visible, .env-banner :focus-visible { outline-color: var(--wall-focus); }
/* Linkurile din textul curgător al paginilor publice (și din nota de cookie-uri) se subliniază: culoarea singură nu
   e un semnal (WCAG 1.4.1, Lighthouse „link-in-text-block”; auditul 2026-11-13, a11y-perf-lighthouse-04 și
   design-public-mobile-21). Navigația, subsolul, butoanele și cipurile rămân fără. Portalul (main.page) nu e atins. */
main:not(.page) :where(p, li, dd, td, figcaption) a:not(.btn):not(.chip):not([class*="cta"]) {
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;
}
.skip-link {
    position: fixed; left: 16px; top: 8px; z-index: 100; transform: translateY(-160%);
    padding: 10px 14px; background: var(--surface); color: var(--ink); border: 2px solid var(--teal); border-radius: var(--r);
    font-weight: 700;
}
.skip-link:focus { transform: none; }

h1, h2, h3, h4 { color: var(--ink); line-height: var(--lh-snug); }
/* Titlurile de secțiune și de pagină vorbesc cu vocea de firmă; h3/h4 (titluri de card, de listă) rămân pe Inter. */
h1, h2 { font-family: var(--font-display); }
/* Spațierea discretă dintre cuvinte pe titlurile și legendele paginilor de aplicație. */
h1, h2, .h1, .h2, fieldset.form-section > legend { word-spacing: .05em; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
/* viewport-fit=cover (App.razor): pe telefoanele cu decupaj ținute orizontal, marginea nu coboară sub zona sigură. */
.container { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }

/* Cifre tabulare pe ORICE valoare numerică aliniată în coloană; sumele nu se rup (A20). */
.num, .tnum, .kpi-value, .amount, .pos-line b { font-variant-numeric: tabular-nums; }
.num { white-space: nowrap; }

.muted { color: var(--ink-3); }
.small { font-size: var(--fs-xs); }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Formele care nu se rup („dintr-un”, „S.R.L.”, o dată) și marcajul „nu e inclus” al tabelelor de pachete: o linie scurtă
   gri desenată din CSS, în locul liniuței lungi din text (markup: <span class="tf-none" aria-hidden="true"></span> + textul
   sr-only; review vizual 1.0.140). */
.nowrap { white-space: nowrap; }
.tf-none { display: inline-block; width: 12px; height: 2px; border-radius: 1px; background: var(--ink-3); vertical-align: middle; }

/* Archivo greu și strâns pe titluri, la lățime naturală. Cifrele rămân pe Inter, tabulare. */
.d1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.022em; word-spacing: normal; line-height: var(--lh-tight); font-size: var(--fs-4xl); margin: 0; }
.d2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; word-spacing: normal; line-height: var(--lh-tight); font-size: var(--fs-3xl); margin: 0; }
.h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; font-size: var(--fs-2xl); margin: 0; }
.h2 { font-weight: 700; font-size: 16px; line-height: var(--lh-snug); margin: 0; }
.kpi-n { font-family: var(--font-text); font-weight: 700; letter-spacing: -.02em; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.wordmark .dot { color: var(--brass); }
.lede { font-size: var(--fs-lg); line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 34em; text-wrap: pretty; }
/* Fără cuvânt văduv pe ultimul rând al titlurilor (auditul 2026-11-13, design-public-mobile-17, design-lead-07);
   browserele fără suport ignoră regula. */
.d1, .d2, .h1, .prose h2 { text-wrap: balance; }
@media (max-width: 720px) {
    .h1 { font-size: 24px; }
    .lede { font-size: 17px; }
}
/* Eticheta de secțiune de deasupra titlurilor NU se mai folosește; dacă totuși apare în markup vechi,
   e un rând mut în sentence case — niciodată majuscule cu tracking. */
.eyebrow { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin: 0 0 4px; }

/* Text lung (legal, explicații): 70 ch. */
.prose { max-width: 70ch; }
.prose > h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; font-size: var(--fs-2xl); margin: 0 0 12px; }
.prose h2 { font-size: var(--fs-xl); letter-spacing: -.01em; margin: 32px 0 10px; }
.prose h3 { font-size: 17px; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--ink-2); line-height: var(--lh-base); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose code, .dl-note code, .legal-table code, code.enroll-code {
    font-family: ui-monospace, Consolas, "Cascadia Mono", monospace; font-size: .92em;
    background: var(--inset); padding: 1px 6px; border-radius: 4px;
}
/* Unde un cod lung trebuie totuși rupt (comenzile pe telefon), fiecare bucată își păstrează padding-ul și colțurile; în
   tabele, un identificator scurt („linux-arm64”) trece întreg pe rândul următor în loc să se rupă la cratimă, iar o
   comandă lungă se rupe în interiorul cutiei ei (review vizual 1.0.140, #25). */
.prose code { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.legal-table code { display: inline-block; max-width: 100%; vertical-align: baseline; }

/* Iconițe din sprite (<Icon>): monolinie, currentColor. */
svg.i { stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }

/* ============================================================
   3. COMPONENTE
   ============================================================ */

/* ---- 3.1 Butoane -------------------------------------------------------- */
/* .btn + variantă; aliasurile vechi împart aceeași rețetă până migrează paginile. */
.btn, .cta-inline, .cta-ghost, .cta-danger, .dl-btn, .auth-submit, .orders-filter-btn,
.cookie-note button, .plan .cta, .auth-secondary, .logout-btn, .owners-reset-btn, .auth-demo-btn,
button.danger, a.danger, .theme-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px; border-radius: var(--r);
    font: 600 15.5px/1 var(--font); border: 1.5px solid transparent;
    cursor: pointer; white-space: nowrap; text-decoration: none; max-width: 100%;
    background: transparent; color: var(--ink);
    transition: background .12s, border-color .12s, color .12s;
}
.btn:hover, .cta-inline:hover, .cta-ghost:hover, .cta-danger:hover, .dl-btn:hover, .auth-submit:hover,
.orders-filter-btn:hover, .plan .cta:hover, .auth-secondary:hover, .logout-btn:hover, .auth-demo-btn:hover,
button.danger:hover, a.danger:hover { text-decoration: none; }

/* Primar — albastru, cu culoarea textului din tokenul temei. */
.btn.primary, .cta-inline, .dl-btn, .auth-submit, .orders-filter-btn, .cookie-note button, .plan.featured .cta {
    background: var(--teal); color: var(--on-teal); border-color: var(--action-edge);
}
.btn.primary:hover, .cta-inline:hover, .dl-btn:hover, .auth-submit:hover, .orders-filter-btn:hover,
.cookie-note button:hover, .plan.featured .cta:hover { background: var(--teal-hover); border-color: var(--teal-hover); color: var(--on-teal); }
.btn.primary:active, .cta-inline:active, .dl-btn:active, .auth-submit:active { background: var(--teal-pressed); border-color: var(--teal-pressed); }

/* Secundar — alb, contur 1,5 px cerneală (ecoul butonului SmartSell alb/negru). */
.btn.secondary, .cta-ghost, .auth-secondary, .plan .cta {
    background: var(--surface); color: var(--ink); border-color: var(--ink);
}
.btn.secondary:hover, .cta-ghost:hover, .auth-secondary:hover, .plan .cta:hover { background: var(--inset); color: var(--ink); }
.btn.secondary:active, .cta-ghost:active, .auth-secondary:active { background: var(--inset); border-color: var(--teal); }

/* Ghost — text secundar, fără contur. */
.btn.ghost, .logout-btn, .owners-reset-btn, .auth-demo-btn { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn.ghost:hover, .logout-btn:hover, .owners-reset-btn:hover, .auth-demo-btn:hover { background: var(--inset); color: var(--ink); }

/* Pericol — conturat; umplere roșie DOAR la hover. Apare numai în pasul armat (DeleteConfirm). */
.btn.danger, button.danger, a.danger, .cta-danger { background: var(--surface); color: var(--danger-text); border-color: var(--danger); }
.btn.danger:hover, button.danger:hover, a.danger:hover, .cta-danger:hover { background: var(--danger); color: var(--on-danger); border-color: var(--danger); }

/* Șterge nearmat: link mut care se înroșește la hover. */
a.danger-subtle, button.danger-subtle, button.link-danger {
    display: inline-flex; align-items: center; background: none; border: 0; padding: 0;
    color: var(--ink-3); font: 500 13.5px var(--font); cursor: pointer; text-decoration: none;
}
a.danger-subtle:hover, button.danger-subtle:hover, button.link-danger:hover { color: var(--danger-text); text-decoration: underline; text-underline-offset: 3px; }

.btn.sm, .cta-inline.sm, .cta-ghost.sm, .owners-reset-btn, button.danger, a.danger { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 54px; padding: 0 24px; font-size: 17px; }
.btn.icon, .theme-toggle { width: 40px; padding: 0; color: var(--ink-2); border-color: transparent; }
.btn.icon:hover, .theme-toggle:hover { background: var(--inset); color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"], .auth-submit:disabled, .cta-inline[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn .i { margin-left: -2px; }
/* align-items: center: un ghost de 40 px lângă butoane .lg de 48 px rămânea lipit sus (review vizual 1.0.140, #21). */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
/* Pe telefon, rândurile de butoane ale paginilor publice devin o coloană de butoane egale, pe toată lățimea, iar o
   etichetă lungă se rupe pe două rânduri în loc să iasă din ecran (auditul 2026-11-13: a11y-perf-lighthouse-01,
   design-public-mobile-01/02, design-lead-08 — „Programează demonstrația de 30 de minute” lățea /takeaway la 368 px).
   Ghost-ul rămâne un link de text aliniat cu coloana. Barele de acțiuni ale portalului (main.page) nu sunt atinse. */
@media (max-width: 560px) {
    main:not(.page) .cta-row { flex-direction: column; align-items: stretch; gap: 10px; }
    main:not(.page) .cta-row > .btn { width: 100%; white-space: normal; height: auto; min-height: 48px; padding-block: 10px; line-height: 1.25; text-align: center; }
    main:not(.page) .cta-row > .btn.ghost { min-height: 44px; padding-inline: 0; color: var(--teal-text); text-decoration: underline; text-underline-offset: 3px; }
}
/* Comutatorul de temă: soarele pe tema deschisă, luna pe cea închisă. */
.theme-toggle .i + .i { display: none; }
:root[data-theme="dark"] .theme-toggle .i:first-child { display: none; }
:root[data-theme="dark"] .theme-toggle .i + .i { display: inline; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .i:first-child { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .i + .i { display: inline; }
}

/* ---- 3.2 Câmpuri ----------------------------------------------------------- */
/* O singură rețetă de control (40 px; 44 la ≤720 și în cardul de autentificare), cu specificitate 0
   (:where) ca orice componentă s-o poată suprascrie. */
:where(input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="hidden"], [type="range"], [type="submit"], [type="button"], [type="reset"])),
:where(select), :where(textarea) {
    height: 40px; border: 1px solid var(--field-line); border-radius: var(--r);
    padding: 0 12px; font: 400 15px var(--font); background: var(--surface); color: var(--ink);
    max-width: 100%; margin: 0;
}
:where(textarea) { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: 3px solid var(--focus); outline-offset: 0; }
input:disabled, select:disabled, textarea:disabled { background: var(--inset); color: var(--ink-3); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); flex: none; }
/* Selectul: aceeași cutie + chevron desenat din două gradiente în currentColor (fără hex, urmează tema). */
select {
    appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select.select, .select { font-weight: 500; }
select[multiple] { background-image: none; height: auto; padding: 8px 12px; }
input[list] { cursor: text; }
input[type="search"] { -webkit-appearance: none; }

/* <Field>: eticheta 13/600 DEASUPRA (sentence case), ajutorul sub control, eroarea sub ajutor. */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--danger-text); }
.field input:not([type="checkbox"]):not([type="color"]), .field select, .field textarea { width: 100%; }
.field .help { margin: 0; font-size: 12.5px; color: var(--ink-3); }
/* Un număr de 1–3 cifre nu are nevoie de un câmp de 1.100 px (auditul 2026-11-13, design-admin-07). */
.field input[type="number"] { max-width: 12rem; }
.field .field-error { margin: 0; font-size: 13px; font-weight: 500; color: var(--danger-text); }
/* Câmp bifă: controlul stânga, eticheta + ajutorul pe verticală în dreapta — sentence case (A4). */
.field.check { flex-direction: row; align-items: flex-start; gap: 10px; padding-top: 4px; }
.field.check input[type="checkbox"] { margin-top: 2px; }
.field.check > label.check-text { display: flex; flex-direction: column; gap: 3px; text-transform: none; letter-spacing: normal; font-weight: 500; font-size: 14.5px; color: var(--ink); }
/* Eticheta care e o PROPOZIȚIE cu linkuri (consimțământul la Termeni, clauzele exprese) nu are copii <span>: ca flex
   în coloană, fiecare nod de text și fiecare link stătea pe rândul lui („…și accept” / „Termenii” / „, versiunea 8.”).
   Curge ca text obișnuit (auditul 2026-11-13, design-portal-02, design-public-mobile-11). */
.field.check > label.check-text:not(:has(> span)) { display: block; line-height: 1.5; }
.field.check .help { font-weight: 400; font-size: 13px; color: var(--ink-3); }
.field.check .field-error { font-size: 13px; }

/* Câmpul de culoare (<ColorField>, A21): mostră 32 + selector nativ fără chenar + hex. */
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field .swatch { width: 32px; height: 32px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--inset); flex: none; }
.color-field input[type="color"] { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; flex: none; }
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line-2); border-radius: var(--r); }
.color-field input[type="color"]::-moz-color-swatch { border: 1px solid var(--line-2); border-radius: var(--r); }
.color-field input[type="text"] { width: 120px; font-variant-numeric: tabular-nums; }

/* Formulare vechi (auth/admin) — aceeași rețetă de etichetă. */
.auth-form, .admin-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label, .admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.auth-form input, .auth-form select, .admin-form input:not([type="checkbox"]), .admin-form select, .admin-form textarea { width: 100%; }
/* display: flex explicit: un <label class="check"> din afara .admin-form/.auth-form rămânea inline, cu bifa lipită de
   text (alergenii din fișa produsului; auditul 2026-11-13, design-portal-05). */
.admin-form label.check, .auth-form label.auth-check, label.check {
    display: flex; flex-direction: row; align-items: center; gap: 10px; font-weight: 500; font-size: 14.5px; color: var(--ink);
}
.admin-form label.check input, .auth-form label.auth-check input[type="checkbox"] { width: 18px; }
.auth-secondary { align-self: flex-start; }

/* ---- 3.3 Cip de filtru + segment ------------------------------------------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
    border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink);
    font: 500 13px var(--font); text-decoration: none; white-space: nowrap;
}
.chip .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--dot, var(--line-2)); }
.chip .n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink); text-decoration: none; }
.chip.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chip.on .n { color: var(--ground); opacity: .7; }

.seg, .range-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); padding: 3px; gap: 2px; }
.seg > a, .seg > button, .range-switch a {
    height: 32px; padding: 0 14px; display: inline-flex; align-items: center; border: 0; background: transparent;
    border-radius: 6px; color: var(--ink-2); font: 500 13.5px var(--font); text-decoration: none; cursor: pointer;
}
.seg > a:hover, .range-switch a:hover { color: var(--ink); text-decoration: none; }
.seg > a.on, .seg > button.on, .range-switch a.range-on { background: var(--ink); color: var(--ground); }

/* ---- 3.4 Badge de stare (o singură geometrie) ------------------------------ */
/* Punct 8 px + text 13/500, fără fundal, fără pastilă. Aliasuri: .sem (C#), .live-status.st-* (JS),
   .dev-state, .efact-badge, .int-badge, .badge, .sec-state, .dash-demo-badge. */
.badge-state, .sem, .live-status, .efact-badge, .dev-state, .int-badge, .badge, .sec-state, .dash-demo-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500;
    color: var(--ink-2); white-space: nowrap; line-height: 1.3; vertical-align: middle;
}
.badge-state::before, .sem::before, .live-status::before, .efact-badge::before, .dev-state::before, .int-badge::before,
.badge::before, .sec-state::before, .dash-demo-badge::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none;
}
.badge-state.on::before, .sem-verde::before, .st-platit::before, .efact-badge.ok::before, .dev-state.online::before,
.int-badge.ok::before, .live-badge-ok::before, .sec-state.on::before { background: var(--ok); }
.badge-state.warn::before, .sem-galben::before, .st-la-foc::before, .efact-badge.pending::before, .dev-state.warn::before,
.int-badge.soon::before, .badge.warn::before, .dash-demo-badge::before { background: var(--warn); }
.sem-rosu::before, .st-anulat::before, .efact-badge.bad::before, .dev-state.err::before { background: var(--danger); }
.st-la-plata::before { background: var(--violet); }
.st-trimis::before, .st-in-asteptare::before, .int-badge.acct::before, .badge::before { background: var(--teal); }
.st-deschis::before, .st-parcat::before, .int-badge.ask::before { background: var(--ink-3); }
.badge-state.off, .dev-state.offline, .sec-state.off, .int-badge.ask { color: var(--ink-3); }
.badge-state.on, .sem-verde, .st-platit, .efact-badge.ok, .dev-state.online, .int-badge.ok { color: var(--ink); }
.sem-rosu, .st-anulat, .efact-badge.bad, .dev-state.err { color: var(--danger-text); }
/* Stare închisă, fără acțiune (ex. transmitere retrasă la anularea facturii): punct și text estompate. */
.sem-gri::before { background: var(--ink-3); }
.sem-gri { color: var(--ink-3); }

/* ---- 3.5 Panou ------------------------------------------------------------- */
.panel, .card, .fb-detail, .live-waiter.card, .bo-panel, .auth-card, .code-display, .empty-state, .dash-empty, .list-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.panel { padding: 18px 20px; min-width: 0; }
.panel > h2, .card > h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.panel > .ph { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.card { padding: 20px 22px; margin-top: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
/* Suprafața de tabel a unei liste: tabelul stă lipit de marginile panoului. */
.panel.bo-panel, .bo-panel { padding: 0; overflow-x: auto; }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.dash-grid > *, .panel, fieldset { min-width: 0; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }

/* ---- 3.6 Banda KPI --------------------------------------------------------- */
/* Celule despărțite de hairline într-un singur panou; markup-ul păstrează label → value (contract),
   vizual cifra e ÎNTÂI (column-reverse). */
.kpis {
    display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.kpi { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 20px 22px 18px; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; }
/* `.panel.kpis` (Prezentarea FiscalBridge): banda își desenează singură chenarul și celulele — fără padding-ul
   panoului, care punea celulele într-o ramă (design-admin-05a). */
.panel.kpis { padding: 0; }
.kpi-label { font-size: 13px; color: var(--ink-2); }
.kpi-value {
    font-family: var(--font-text); font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--ink);
    font-size: clamp(22px, 5vw, 34px); white-space: nowrap;
}
.kpi-unit { font-weight: 500; font-size: 14px; letter-spacing: 0; color: var(--ink-3); margin-left: 4px; }
.kpi-delta { font-size: 12.5px; color: var(--ink-3); }
.kpi-delta.ok { color: var(--ok-text); }
.kpi-delta.danger { color: var(--danger-text); }
/* Banda cu mai mult de 4 indicatori trece pe rândul următor: fiecare rând își redesenează filetele (prima celulă fără
   filet stânga, rândurile 2+ cu filet sus) — auditul 2026-11-13, design-admin-05. */
@media (min-width: 761px) {
    .kpis > .kpi:nth-child(4n + 1) { border-left: 0; }
    .kpis > .kpi:nth-child(n + 5) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .kpi:nth-child(odd) { border-left: 0; }
    .kpi:nth-child(n + 3) { border-top: 1px solid var(--line); }
    /* Un număr impar de indicatori: ultimul ia tot rândul, fără celulă goală (design-portal-11). */
    .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---- 3.7 Tabel ------------------------------------------------------------- */
.table, .dash-table, .legal-table, .clients-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .dash-table th, .legal-table th, .clients-table th {
    text-align: left; font-weight: 600; font-size: var(--fs-xs); color: var(--ink-2);
    padding: 10px 14px; border-bottom: 2px solid var(--rule); white-space: nowrap; vertical-align: bottom;
}
.table td, .dash-table td, .legal-table td, .clients-table td {
    padding: 6px 14px; height: 44px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink);
}
.table tbody tr:last-child td, .dash-table tbody tr:last-child td, .legal-table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td, .dash-table tbody tr:hover td { background: var(--surface-2); }
.table th.num, .dash-table th.num { text-align: right; }
.table td.num, .dash-table td.num { text-align: right; font-weight: 500; }
.table td.muted, .dash-table td.muted { color: var(--ink-3); }
/* Coloana „Nr.” (GW2): 40 px, mut, hairline la dreapta. */
.table .nr, .dash-table .nr { width: 40px; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; border-right: 1px solid var(--line); padding-right: 10px; }
/* Totaluri: riglă dublă (GW2). */
.table tfoot td, .dash-table tfoot td { font-weight: 600; border-top: 3px double var(--line-2); border-bottom: 0; }
.table tr.armed td, .dash-table tr.armed td { background: var(--danger-tint); }
.table tr.line-voided td, .line-voided td { color: var(--ink-3); text-decoration: line-through; }
/* Numele produsului: bară de culoare 4×22 (din ColorHex, prin style — dată, nu stil) + nume 600. */
.prod, .prod-cell { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.prod-cell strong, .prod-cell a, .prod a, .table td strong { font-weight: 600; color: var(--ink); }
.prod-swatch { width: 4px; height: 22px; border-radius: 2px; flex: none; display: inline-block; vertical-align: middle; background: var(--sw, var(--line-2)); }
.prod-thumb { width: 32px; height: 32px; border-radius: var(--r-chip); object-fit: cover; border: 1px solid var(--line); background: var(--inset); flex: none; }
/* Controalele din celule (editare inline) stau la înălțimea rândului. */
.table input, .dash-table input, .table select, .dash-table select { height: 34px; font-size: 14px; }
.table input:not(.cell-qty):not(.cell-money):not([type="checkbox"]), .dash-table input:not(.cell-qty):not(.cell-money):not([type="checkbox"]) { width: 100%; }
.table form, .dash-table form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
/* Acțiunile unui rând (Editează + Șterge) stau împreună, la dreapta. */
.bo-actions { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; }
.bo-actions form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
td.bo-actions, .table td:last-child .bo-actions { justify-content: flex-end; width: 100%; }
/* Header de coloană sortabil (componenta SortHeader.razor, #1081): linkul arată exact ca textul de
   header din care a crescut — fără underline, fără teal (teal = acțiune, nu stare); sortarea curentă
   se citește din cerneală plină + săgeata din `.sort-ind`. Slotul indicatorului e rezervat mereu
   (1ch), ca coloanele să nu sară când se schimbă sortarea. La ≤720 px thead-ul dispare odată cu
   foldul tabel→listă (`.table:has(td[data-col])`), deci niciun stil suplimentar nu e necesar acolo. */
.table th a.sort-link, .dash-table th a.sort-link {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--ink-2); font-weight: inherit; text-decoration: none; white-space: nowrap;
}
.table th a.sort-link:hover, .dash-table th a.sort-link:hover { color: var(--ink); text-decoration: none; }
.table th a.sort-link:focus-visible, .dash-table th a.sort-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 2px; }
.table th a.sort-link[aria-sort="ascending"], .table th a.sort-link[aria-sort="descending"],
.dash-table th a.sort-link[aria-sort="ascending"], .dash-table th a.sort-link[aria-sort="descending"] { color: var(--ink); }
a.sort-link .sort-ind { display: inline-block; width: 1ch; font-size: 11px; line-height: 1; color: var(--ink-3); }
a.sort-link[aria-sort="ascending"] .sort-ind::after { content: "↑"; color: var(--ink); }
a.sort-link[aria-sort="descending"] .sort-ind::after { content: "↓"; color: var(--ink); }
/* Pe coloanele numerice slotul săgeții trece ÎNAINTEA etichetei: eticheta se termină pe aceeași verticală cu cifrele
   (review vizual 1.0.140, #36). */
.table th.num a.sort-link, .dash-table th.num a.sort-link { flex-direction: row-reverse; }
/* Pe paginile publice (corp de 16 px) tabelele de text urcă o treaptă: 14 px în celule, 13 px în antete. Portalul
   (main.page) rămâne dens. */
main:not(.page) :is(.table, .legal-table) { font-size: 14px; }
main:not(.page) :is(.table, .legal-table) th { font-size: 13px; }
/* Tabelele late derulează în containerul lor; prima coloană rămâne lipită pe mobil. */
.table-scroll { overflow-x: auto; margin: 0; max-width: 100%; }
.table-scroll > .table, .table-scroll > .dash-table, .table-scroll > .legal-table { min-width: 560px; }
/* Tabletă (721–1024 px): lângă sidebar-ul de 236 px pagina are ~490–790 px, iar lățimea minimă de 560 px scotea
   coloana „Total” din panou, fără niciun semn că tabelul derulează. Listele cu data-col se strâng în lățimea
   paginii, cu antetele rupte pe două rânduri (design-portal-09). */
@media (min-width: 721px) and (max-width: 1024px) {
    .page .table-scroll > .table:has(td[data-col]), .page .table-scroll > .dash-table:has(td[data-col]) { min-width: 0; }
    .page .table:has(td[data-col]) th { white-space: normal; }
    .page .table:has(td[data-col]) :is(th, td) { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 720px) {
    .table-scroll th:first-child, .table-scroll td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
    /* Un tabel care s-a pliat în listă nu mai derulează: prima celulă nu mai e lipită și nu mai poartă fundalul
       suprafeței (dreptunghi alb pe benzile gri; auditul 2026-11-13, design-public-mobile-06). */
    .table-scroll > .table:has(td[data-col]) :is(th, td):first-child,
    .table-scroll > table.stack-mobile :is(th, td):first-child { position: static; background: transparent; z-index: auto; }
    /* Panourile cu tabele derulează în interior (documentul nu devine mai lat decât ecranul, A5/A6);
       un tabel FĂRĂ data-col păstrează lățimea coloanelor și derulează, în loc să se strivească. */
    .panel { overflow-x: auto; }
    .bo-panel > .table:not(:has(td[data-col])), .bo-panel > .dash-table:not(:has(td[data-col])) { min-width: 640px; }
    .bo-panel > .table:not(:has(td[data-col])) th:first-child, .bo-panel > .table:not(:has(td[data-col])) td:first-child,
    .bo-panel > .dash-table:not(:has(td[data-col])) th:first-child, .bo-panel > .dash-table:not(:has(td[data-col])) td:first-child {
        position: sticky; left: 0; background: var(--surface); z-index: 1;
    }
}

/* Tabel → listă pe mobil DIN ACELAȘI MARKUP (A6, GW6): `td[data-col]`. Rândul devine un container
   flex cu împachetare — numele stânga (prod), suma dreapta (pret/total/suma), o ruptură de linie
   (`tr::after`, 100 %), apoi meta ca text mut cu eticheta din data-label, starea la capătul liniei de
   meta, acțiunile pe un rând propriu de 40 px. Rețeta e cea dovedită pe listele portalului
   (portal.css `.table.stack-meta`); vechea grilă 1fr auto așeza TOATE celulele de meta în ACEEAȘI
   celulă (`grid-column: 1; grid-row: 2`), deci de la a doua meta se scriau una peste alta — vizibil pe
   fișa de ofertă și pe tabelul legii de pe /start, la 390 px (review 2026-09-05). Meta curg pe linia
   lor despărțite de `gap`, fără virgulă: într-un rând flex virgula ar ateriza după gol sau la început de
   linie (foaia de cont își pune singură virgula pe listele ei inline).
   Fără data-col ⇒ fallback .table-scroll / derulare în .bo-panel. */
@media (max-width: 720px) {
    .table:has(td[data-col]) thead, .dash-table:has(td[data-col]) thead { display: none; }
    .table:has(td[data-col]), .dash-table:has(td[data-col]) { display: block; }
    .table:has(td[data-col]) tbody, .dash-table:has(td[data-col]) tbody { display: block; }
    .table:has(td[data-col]) tr, .dash-table:has(td[data-col]) tr {
        display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
        padding: 12px 14px; border-bottom: 1px solid var(--line);
    }
    .table:has(td[data-col]) td, .dash-table:has(td[data-col]) td { display: block; padding: 0; height: auto; border: 0; min-width: 0; }
    .table:has(td[data-col]) tbody tr:hover td { background: transparent; }
    /* O celulă goală fără data-col (de obicei în subsolul de totaluri) nu are ce arăta, dar lua un gap de 10 px și împingea
       „Total” spre dreapta (review vizual 1.0.140, #39). */
    .table:has(td[data-col]) td:not([data-col]):empty, .dash-table:has(td[data-col]) td:not([data-col]):empty { display: none; }
    /* Ordinea vizuală: nume (1), sumă (2), ruptura de linie (3), meta (4), stare (5), acțiuni (6). */
    td[data-col] { order: 4; }
    td[data-col="prod"] { order: 1; flex: 1 1 0; min-width: 0; font-size: 15px; font-weight: 600; }
    td[data-col="pret"], td[data-col="total"], td[data-col="suma"] { order: 2; flex: 0 0 auto; text-align: right; font-size: 15px; font-weight: 600; white-space: nowrap; }
    .table:has(td[data-col]) tr::after, .dash-table:has(td[data-col]) tr::after { content: ""; order: 3; flex: 0 0 100%; height: 0; }
    td[data-col]:not([data-col="prod"]):not([data-col="pret"]):not([data-col="total"]):not([data-col="suma"]):not([data-col="stare"]):not([data-col="act"]) {
        display: inline; font-size: 12.5px; color: var(--ink-3);
    }
    td[data-col]:not([data-col="prod"]):not([data-col="pret"]):not([data-col="total"]):not([data-col="suma"]):not([data-col="stare"]):not([data-col="act"])::before { content: attr(data-label) " "; }
    td[data-col="stare"] { order: 5; flex: 0 0 auto; }
    td[data-col="act"] { order: 6; flex: 1 0 100%; display: flex; align-items: center; gap: 12px; min-height: 40px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
    td[data-col="act"] .bo-actions { width: auto; }
    td[data-col="act"] a.danger-subtle { padding: 10px 0; }
    .table tr.armed:has(td[data-col]) { background: var(--danger-tint); }

    /* `.table.stack-lines` — lista de PROZĂ (fișa de ofertă, tabelul obligațiilor legale): fiecare meta pe
       linia ei, cu „Etichetă: ” în față, la 13,5 px pe cerneala a doua. Propozițiile întregi nu curg una
       după alta ca metadatele scurte ale unei liste de casă; iar un tabel care devine listă nu are nevoie
       de lățimea minimă de derulare a învelișului. */
    .table.stack-lines:has(td[data-col]) tr { gap: 6px 10px; }
    .table.stack-lines:has(td[data-col]) td[data-col]:not([data-col="prod"]):not([data-col="pret"]):not([data-col="total"]):not([data-col="suma"]):not([data-col="stare"]):not([data-col="act"]) {
        flex: 1 0 100%; display: block; font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
        text-align: left; white-space: normal; /* și celulele `.num` (sume) curg ca text, cu eticheta lor, de la stânga */
    }
    .table.stack-lines:has(td[data-col]) td[data-col]:not([data-col="prod"]):not([data-col="pret"]):not([data-col="total"]):not([data-col="suma"]):not([data-col="stare"]):not([data-col="act"])::before { content: attr(data-label) ": "; color: var(--ink-3); }
    .table-scroll > .table.stack-lines:has(td[data-col]) { min-width: 0; }

    /* `table.stack-mobile` — tiparul GENERIC pentru tabelele de text (legale, cookie-uri, subprocesatori, comparații):
       fiecare rând devine un card, fiecare celulă un rând „Etichetă: valoare” din `td[data-label]`; prima celulă
       (de obicei `th scope=row` sau `td` fără etichetă) e titlul cardului. Nu cere data-col și nu depinde de
       ordinea vizuală a listelor de casă de mai sus (auditul 2026-11-13, design-public-mobile-04). */
    table.stack-mobile, table.stack-mobile tbody, table.stack-mobile td, table.stack-mobile tbody th { display: block; }
    table.stack-mobile thead { display: none; }
    table.stack-mobile tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
    table.stack-mobile tr:last-child { border-bottom: 0; }
    table.stack-mobile :is(td, th) { height: auto; padding: 2px 0; border: 0; text-align: left; white-space: normal; }
    table.stack-mobile tbody tr:hover td { background: transparent; }
    table.stack-mobile tr > :is(td, th):first-child { font-weight: 600; color: var(--ink); font-size: 14.5px; padding-bottom: 4px; }
    table.stack-mobile td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-3); font-weight: 500; }
    table.stack-mobile td[data-label=""]::before { content: none; }
    table.stack-mobile td:empty { display: none; }
    .table-scroll > table.stack-mobile, .prose .table-scroll > table.stack-mobile { min-width: 0; }
    /* Auditul 1.0.138 (VIS-01): o listă cu data-col dintr-un document legal se strânge și ea în lățimea ecranului — selectorul
       (0,5,1) bate lățimea minimă de 640 px a tabelelor legale din public.css (0,4,0), oricare ar fi ordinea foilor. */
    .prose.legal .table-scroll > .table:has(td[data-col]) { min-width: 0; }
}

/* ---- 3.8 Pager ------------------------------------------------------------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px 0; margin: 0; font-size: 13.5px; color: var(--ink-2); }
.pager .pages { display: inline-flex; align-items: center; gap: 4px; }
.pager .pages a, .pager .pages span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px;
    border-radius: var(--r); color: var(--ink); font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums;
}
.pager .pages a:hover { background: var(--inset); text-decoration: none; }
/* Specificitatea urcă peste `.pager .pages span` (0,2,1): altfel cifra paginii curente avea culoarea fundalului
   (pătrat plin, fără număr), iar chevronul dezactivat și „…” nu erau estompate (review vizual 1.0.140, #9, #30). */
.pager .pages .pager-cur { background: var(--ink); color: var(--ground); }
.pager .pages .pager-gap, .pager .pages .pager-disabled { color: var(--ink-3); }
.pager .pager-total { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.orders-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.pager-info { font-size: 13px; color: var(--ink-3); }
.pager-link { font-weight: 500; font-size: 14px; color: var(--ink-2); }
.pager-link:hover { color: var(--ink); }

/* ---- 3.9 Toolbar de filtre ------------------------------------------------- */
/* TOATE controalele 40 px pe aceeași linie (A25). Markup-ul vechi (.orders-filter cu etichete) se
   aliniază la bază; cel nou (.toolbar) n-are etichete (intră în placeholder/prefix). */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { width: 340px; max-width: 100%; }
/* O bară cu DOAR căutarea (fără date, locație sau stare) are loc: textul indicativ lung nu se mai taie. Barele cu filtre
   rămân la 340 px, ca „Caută”/„Filtrează” să nu treacă pe rândul următor (review vizual 1.0.140, #44). */
@media (min-width: 721px) {
    .toolbar:not(:has(> :is(select, label.input:not(.search)))) .search { width: 400px; }
}
.toolbar .grow { flex: 1; }
/* „Caută” .sm de 32 px lângă câmpuri de 40 px rupea regula A25 (auditul 2026-11-13, design-portal-10, design-admin-14). */
.toolbar .btn.sm { height: 40px; padding: 0 14px; font-size: 14px; }
.input { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink-3); }
.input:focus-within { border-color: var(--teal); outline: 3px solid var(--focus); }
.input input { border: 0; outline: 0; background: transparent; height: auto; padding: 0; width: 100%; color: var(--ink); }
.input input:focus { outline: 0; }
/* Selectul dintr-un `.input` (filtrele NIR/Stoc/admin) e dezbrăcat ca și inputul: cutia o desenează
   label-ul, deci fără al doilea border, fără a doua înălțime de 40 px înăuntru și fără al doilea inel
   de focus (inelul rămâne cel al `.input:focus-within`). `background-color` (NU `background`
   scurt) păstrează chevronul-gradient al rețetei de bază; poziția lui se reancorează pentru noul
   padding dreapta de 22 px. width:100% + min-width:0: umple spațiul rămas după prefix și se poate
   strânge sub cea mai lungă opțiune (nu mai iese din chenar la 390 px). */
.input select {
    border: 0; outline: 0; height: auto; margin: 0; padding: 0 22px 0 0; width: 100%; min-width: 0;
    background-color: transparent; background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
    color: var(--ink);
}
.input select:focus { outline: 0; }
.orders-filter { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.orders-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.orders-filter input, .orders-filter select { font-size: 14px; }
.orders-filter .filter-check, .filter-check { flex-direction: row; align-items: center; gap: 8px; height: 40px; font-size: 14px; color: var(--ink-2); }
.legend-note { font-size: 13px; margin: 12px 0; line-height: 1.7; color: var(--ink-2); }

/* ---- 3.10 Mesaje ------------------------------------------------------------ */
/* UN singur sistem: bară cu punct colorat la stânga, fundal tint, contur hairline. Aliasuri:
   .auth-ok → ok, .auth-error → error, .panel-note (+.ok/.danger) → info/ok/error, .live-banner → warn. */
.msg, .auth-ok, .auth-error, .panel-note, .live-banner {
    position: relative; display: block; margin: 0 0 16px; padding: 11px 14px 11px 32px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--inset); color: var(--ink); font-size: 14px; line-height: 1.45;
}
.msg::before, .auth-ok::before, .auth-error::before, .panel-note::before, .live-banner::before {
    content: ""; position: absolute; left: 14px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3);
}
.msg.ok, .auth-ok, .panel-note.ok { background: var(--ok-tint); }
.msg.ok::before, .auth-ok::before, .panel-note.ok::before { background: var(--ok); }
.msg.error, .auth-error, .panel-note.danger { background: var(--danger-tint); }
.msg.error::before, .auth-error::before, .panel-note.danger::before { background: var(--danger); }
.msg.warn, .live-banner { background: var(--warn-tint); }
.msg.warn::before, .live-banner::before { background: var(--warn); }
.msg.info, .panel-note { background: var(--teal-tint); }
.msg.info::before, .panel-note::before { background: var(--teal); }
.panel-note.ok::before { background: var(--ok); }
.panel-note.danger::before { background: var(--danger); }
.msg p:first-child, .auth-ok p:first-child, .auth-error p:first-child, .panel-note p:first-child { margin-top: 0; }
.msg p:last-child, .auth-ok p:last-child, .auth-error p:last-child, .panel-note p:last-child { margin-bottom: 0; }
.msg a, .auth-error a, .live-banner a { font-weight: 600; }
div.panel.panel-note { padding: 11px 14px 11px 32px; }
/* Pe paginile publice un mesaj nu se întinde pe 150 de caractere pe rând (design-public-desktop-09). */
main:not(.page) .msg { max-width: 82ch; }
/* Un mesaj imediat sub un buton nu se lipește de el (e-Factura: „Facturi primite (SPV)”; review vizual 1.0.140, #41). */
.btn + .msg { margin-top: 12px; }

/* ---- 3.11 Stare goală (GW9, A26) ------------------------------------------- */
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 28px; text-align: left; }
.empty-state .es-icon { color: var(--teal); line-height: 0; margin-bottom: 6px; }
.empty-state .es-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.empty-state .es-text { margin: 0; font-size: 14.5px; color: var(--ink-2); max-width: 56ch; }
.empty-state .es-action { margin-top: 12px; }
/* .dash-empty = varianta „doar text” (o randează și comenzi-live.js — nu o șterge). */
.dash-empty { padding: 28px; color: var(--ink-2); font-size: 14.5px; }
@keyframes soft-fade { from { opacity: .45; } to { opacity: 1; } }
.soft-refreshed { animation: soft-fade .3s ease; }

/* ---- 3.12 Antetul de pagină ------------------------------------------------ */
/* <BoHead> (.bo-head = .page-head): h1 în vocea de firmă + subtitlu cu cifre reale; acțiunea primară la
   dreapta. .dash-head (paginile vechi de portal) primește aceeași ramă. */
.page-head, .bo-head, .dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.bo-head .bo-title { min-width: 0; }
.bo-head h1, .dash-head h1, .page-head h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; font-size: 26px; margin: 0; }
.bo-head .bo-sub, .dash-head .dash-period, .page-head .sub { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.bo-head .bo-actions, .page-head .actions, .dash-head .fb-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-head .eyebrow { margin-bottom: 2px; }
.dash-head .dash-demo-badge, .dash-head .scope-badge { margin-left: 8px; vertical-align: middle; font-size: 13px; }
.scope-badge { display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
@media (max-width: 720px) {
    .bo-head h1, .dash-head h1, .page-head h1 { font-size: 22px; }
    .bo-head .bo-actions, .page-head .actions { width: 100%; }
    .bo-head .bo-actions > .btn.primary, .bo-head .bo-actions > .cta-inline { width: 100%; }
}

/* ---- 3.13 Formulare (fieldset.form-section) -------------------------------- */
/* Fieldset fără chenar: riglă de 2 px cerneală sus, legenda (16/700) stă pe riglă. */
fieldset.form-section { border: 0; border-top: 2px solid var(--rule); padding: 16px 0 6px; margin: 0 0 22px; min-width: 0; }
fieldset.form-section > legend { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--ink); padding: 0 10px 0 0; margin: 0 0 12px; }
fieldset.form-section > .form-section-note, .form-section-note { margin: 0 0 14px; font-size: 13px; color: var(--ink-3); }
fieldset.form-section > .form-section-note ~ .form-section-note { margin-top: 12px; }
/* Câmpurile puse direct în fieldset (fără .form-grid) se lipeau unul de altul: același ritm de 16 px ca grila
   (auditul 2026-11-13, design-admin-07). */
fieldset.form-section > :is(.field, .form-grid, .check-list, p) + :is(.field, .form-grid, .check-list, p) { margin-top: 16px; }
/* Bifele puse direct în fieldset (Meniu kiosk: „Alergeni declarați”, „Vizibil la kiosk”, „Picant”) primesc același ritm;
   două bife la rând stau ceva mai strâns. Nota de sub un formular de creare nu se mai lipește de butonul lui
   (review vizual 1.0.140, #10, #13). */
fieldset.form-section > :is(.field, .form-grid, .check-list, p, label.check) + label.check,
fieldset.form-section > label.check + :is(.field, .form-grid, .check-list, p) { margin-top: 16px; }
fieldset.form-section > label.check + label.check { margin-top: 10px; }
fieldset.form-section > form + .form-section-note { margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
@media (max-width: 899px) { .form-grid { grid-template-columns: 1fr; } }
/* În panoul lateral al paginilor publice (.split — „Cere ofertă”, demonstrația) grila urmează lățimea PANOULUI, nu a
   ecranului: o coloană în panoul de 440 px de pe desktop (placeholderele nu se mai taie), două la 768, unde panoul
   are 720 px (auditul 2026-11-13, design-public-desktop-08, design-lead-11). */
.split > .panel { container-type: inline-size; }
.split .form-grid { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 560px) { .split .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid-gap { margin-top: 16px; }
.inline-create { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; }
.inline-create input[type="text"] { max-width: 24rem; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 10px 22px; }
.check-list .field.check { padding-top: 0; }
.check-group { margin: 0 0 16px; }
.check-group:last-child { margin-bottom: 0; }
.check-group > h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.is-hidden { display: none !important; }
.extcode-row { display: grid; grid-template-columns: 180px 1fr; gap: 10px; }
@media (max-width: 560px) { .extcode-row { grid-template-columns: 1fr; } }
.color-preview { width: 24px; height: 24px; border-radius: var(--r-chip); flex: none; border: 1px solid var(--line); display: inline-block; vertical-align: middle; }
.color-dot { display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: middle; border: 1px solid var(--line); }
.cell-qty { width: 7rem; }
.cell-money { width: 8rem; }
/* Bara de acțiuni a formularului: STATICĂ implicit (A3); lipită de fundul ecranului DOAR pe ecrane
   suficient de mari și DOAR pe formularele lungi (≥2 secțiuni — fișe, NIR nou), cu loc rezervat sub
   formular. Pe un formular scurt aflat sub fald, sticky îl împingea peste primele câmpuri. */
.form-actions {
    position: static; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 0 0; margin-top: 8px; border-top: 1px solid var(--line); background: var(--ground);
}
.form-actions .end { margin-left: auto; }
/* Într-un `.panel` bara stă pe suprafața panoului, nu pe fundalul paginii — altfel apare ca o cutie gri
   lipită de buton (formularele publice „Cere ofertă” și „Nu mă mai contactați”). */
.panel .form-actions { background: var(--surface); }
@media (min-width: 760px) and (min-height: 700px) {
    form:has(fieldset.form-section ~ fieldset.form-section) > .form-actions { position: sticky; bottom: 0; z-index: 6; padding-bottom: 14px; }
    form:has(fieldset.form-section ~ fieldset.form-section):has(> .form-actions) { padding-bottom: 72px; }
}

/* ---- 3.14 Cod de afișat + pași --------------------------------------------- */
.code-display { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; }
.code-display .cd-label { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.code-display .cd-code { font-family: var(--font-text); font-weight: 700; letter-spacing: .04em; font-size: clamp(32px, 6vw, 44px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.code-display .cd-hint { font-size: 13px; color: var(--ink-3); }
code.enroll-code { font-weight: 700; font-size: 24px; font-family: var(--font-text); background: none; padding: 0; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
/* minmax(0, 1fr) + min-width: 0: un <pre> lung dintr-un pas derulează în el, nu lățește lista și pagina
   (auditul 2026-11-13, design-public-mobile-03 — /ajutor/instalare-linux ajungea la 643 px). 78ch: rânduri de
   citit și pe desktopul lat (design-public-desktop-09). */
.step-list { list-style: none; counter-reset: step; margin: 16px 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 78ch; }
.step-list li { position: relative; min-width: 0; padding: 2px 0 2px 38px; counter-increment: step; color: var(--ink-2); font-size: 14.5px; }
.step-list li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; background: var(--ink); color: var(--ground); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
/* În textul lung (.prose, ghidurile de ajutor), padding-ul listelor (0,1,1) decala bulinele cu 22 px, marginea de 6 px se
   aduna peste gap, iar pașii ieșeau mai mici decât nota de sub ei (review vizual 1.0.140, #20). */
.prose .step-list { padding-left: 0; }
.prose .step-list > li { margin: 0; font-size: 15.5px; line-height: var(--lh-base); }

/* ---- 3.15 Nota de cookie-uri ----------------------------------------------- */
.cookie-note {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    max-width: var(--maxw); margin: 0 auto; padding: 14px 18px;
    background: var(--elevated); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 14px; color: var(--ink-2);
}
.cookie-note[hidden] { display: none; }
.cookie-note a { color: var(--teal-text); text-decoration: underline; text-underline-offset: .18em; }
/* Pe telefon nota e o bară compactă (avea 193 px, un sfert din ecran): textul se strânge lângă buton. Cât sertarul
   de navigație e deschis, nota nu se mai suprapune peste el (auditul 2026-11-13, a11y-perf-lighthouse-09,
   design-public-mobile-07/19). Textul și temeiul (Legea 506/2004 art. 4) rămân neschimbate. */
@media (max-width: 560px) {
    .cookie-note { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; gap: 10px; flex-wrap: nowrap; align-items: flex-end; font-size: 13px; line-height: 1.4; }
    .cookie-note > span { flex: 1 1 auto; min-width: 0; }
}
body:has(.site-header.nav-open) .cookie-note { display: none; }
/* Bara de gesturi a telefoanelor fără buton (viewport-fit=cover): nota stă deasupra ei. */
.cookie-note { margin-bottom: env(safe-area-inset-bottom); }

/* ============================================================
   4. SHELL
   ============================================================ */

/* Singura umbră din sistem: straturile flotante (dropdown, drawer, nota de cookie-uri). */
.pop { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }

/* ---- 4.1 Headerul public (MainLayout + anonimul din PortalLayout) ----------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ground); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.site-header .brand { min-height: 44px; }
.brand img.mark { width: 32px; height: 32px; object-fit: contain; border-radius: 7px; }
.brand .dot { color: var(--brass); }
.brand-sub { display: none; }
.site-header .nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; margin-left: 12px; }
.site-header .nav > a { color: var(--ink); font: 500 15px/1 var(--font-text); white-space: nowrap; padding: 10px; border-radius: var(--r); }
.site-header .nav > a:hover { background: var(--inset); color: var(--ink); text-decoration: none; }
.site-header .nav > a.on, .site-header .nav > a.nav-active { background: var(--inset); color: var(--ink); }
.site-header .nav-end { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.site-header .nav > .nav-end { margin-left: auto; }
.site-header .nav-sep { flex: none; width: 1px; height: 20px; background: var(--line-2); margin: 0 6px; }
.site-header .nav-group, .site-header .nav-sub { display: none; }
.lang { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.lang a { padding: 8px 10px; font: 600 13px/1 var(--font-text); color: var(--ink); text-decoration: none; }
.lang a:hover { text-decoration: none; background: var(--inset); }
.lang a.on { background: var(--ink); color: var(--ground); }
.nav-check { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger {
    display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin: 0;
    border: 0; border-radius: var(--r); background: transparent; font: inherit; cursor: pointer; color: var(--ink-2); flex: none;
}
.nav-burger:hover { background: var(--inset); color: var(--ink); }
.nav-check:focus-visible + .nav-burger, .nav-check:focus-visible ~ .top .nav-burger { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 1180px) {
    .site-header .container { gap: 12px; }
    .js .site-header .nav-burger { display: flex; margin-left: auto; }
    .site-header .nav {
        display: flex; position: absolute; left: 0; right: 0; top: 100%; margin-left: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--elevated); border-bottom: 1px solid var(--line); padding: 8px 16px 14px;
    }
    .site-header .nav { max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain; }
    .js .site-header .nav { display: none; }
    .js .site-header.nav-open .nav { display: flex; }
    .site-header .nav > a { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
    .site-header .nav > a.on { border-bottom-color: var(--line); font-weight: 600; }
    .site-header .nav-end { flex-wrap: wrap; }
    .site-header .nav > .nav-end { margin: 12px 0 0; }
    .site-header .nav > .nav-end .btn { flex: 1; }
    .site-header .nav-sep { display: none; }
}

@media (min-width: 1181px) {
    .site-header .container { gap: 12px; }
    .site-header .nav { gap: 0; margin-left: 0; }
    .site-header .nav > a { padding-inline: 6px; font-size: 14px; }
    .site-header .nav-sep { margin-inline: 4px; }
    .site-header .nav-end { gap: 4px; }
    .site-header .nav-end > .btn { padding-inline: 12px; font-size: 14px; }
    .site-header .nav-end > .theme-toggle { width: 36px; padding-inline: 0; }
}
.nav-cta { display: none; }
@media (min-width: 721px) and (max-width: 1180px) {
    .js .site-header .nav-cta { display: inline-flex; margin-left: auto; }
    .js .site-header .nav-cta + .nav-burger { margin-left: 0; }
    .js .site-header .nav-cta ~ .nav .nav-end .btn.primary { display: none; }
}
@media (max-width: 640px) {
    .site-header .container { gap: 8px; }
    .site-header .brand { gap: 8px; }
    .site-header .wordmark { font-size: 22px; }
    .site-header .nav-end { gap: 6px; }
    .site-header .nav-end .btn.ghost, .site-header .nav-end .theme-toggle { display: none; }
    .site-header .nav-end .btn.primary { height: 44px; padding: 0 12px; font-size: 14px; }
    .site-header .lang a { padding-inline: 8px; }
    .js .site-header .nav-burger { width: 40px; margin-left: 0; }
}

/* ---- 4.2 Shell-ul de aplicație (PortalLayout autentificat) ------------------ */
/* Shell-ul de aplicație rămâne dens: corpul la 14,5 px / 1,5 (paginile publice au 16 / 1,6). */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; position: relative; font-size: var(--fs-app); line-height: 1.5; }
/* Peretele continuă pe toată înălțimea paginii și sub sidebar-ul sticky (care are înălțimea ecranului). */
.shell::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--side-w); background: var(--wall); }
.side {
    background: var(--wall); color: var(--wall-text); display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; z-index: 30;
}
.side .brand { height: 64px; padding: 0 18px; border-bottom: 1px solid var(--wall-line); flex: none; color: var(--wall-text); }
.side .brand .wordmark { color: var(--wall-text); }
.side .brand img.mark { width: 26px; height: 26px; }
.side .nav { display: flex; flex-direction: column; gap: 1px; padding: 10px 0 4px 12px; }
.side .cap { color: var(--wall-muted); font-size: 12px; font-weight: 500; padding: 12px 10px 3px; }
.side .nav a, .side .nav-more-panel a, .side .nav-more > summary {
    display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 10px 0 9px;
    color: var(--wall-text); border-radius: 8px 0 0 8px; font-size: 14px; font-weight: 500; text-decoration: none;
    border-left: 3px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side .nav a:hover, .side .nav-more-panel a:hover, .side .nav-more > summary:hover { background: var(--wall-hover); color: var(--wall-text); text-decoration: none; }
.side .nav a.sub { padding-left: 21px; font-weight: 400; height: 27px; font-size: 13.5px; }
/* Itemul activ: tab tăiat din hârtia conținutului; noaptea, bara de 3 px de pe perete (GW8). */
.side .nav a.on, .side .nav a.nav-active, .side .nav-more-panel a.on {
    background: var(--ground); color: var(--ink); font-weight: 600; border-left-color: var(--wall-active-bar);
}
.side .nav a.nav-active:not(.on) { font-weight: 600; }
.side .nav a:focus-visible, .side .nav-more > summary:focus-visible, .side .brand:focus-visible { outline: 2px solid var(--wall-focus); outline-offset: -2px; }
.side .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex: none; }
.side .nav-more { margin: 4px 0 12px 12px; }
.side .nav-more > summary { list-style: none; cursor: pointer; user-select: none; color: var(--wall-muted); }
.side .nav-more > summary::-webkit-details-marker { display: none; }
.side .nav-more > summary::after {
    content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg); margin: -3px 6px 0 0; transition: transform .12s;
}
.side .nav-more[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.side .nav-more-panel { display: flex; flex-direction: column; gap: 1px; padding-top: 2px; }
.side .nav-more-panel a { padding-left: 21px; height: 27px; font-size: 13.5px; font-weight: 400; }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; position: relative; }
.top {
    display: flex; align-items: center; gap: 14px; height: var(--top-h); padding: 0 28px;
    background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 10;
}
.top .brand-m { display: none; }
.top .firm { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; min-width: 0; }
.top .firm .scope-badge { font-size: 14px; }
/* Cu >1 locații, eticheta stă pentru cititorul de ecran; comutatorul o înlocuiește vizual. */
.top .firm:has(.scope-switch) .scope-badge { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.top .grow { flex: 1; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-text);
    display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 var(--font); flex: none;
}
.avatar.sq { width: 24px; height: 24px; border-radius: 5px; font-size: 10px; }
.sync { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.sync .dot.ok { background: var(--teal); }
.sync .dot.warn { background: var(--warn); }
.sync .dot.off { background: var(--line-2); }
.top .who { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.logout-form { display: inline; margin: 0; }
.scope-switch { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.scope-switch select { height: 36px; max-width: 240px; font-size: 14px; font-weight: 500; color: var(--ink); text-overflow: ellipsis; }
.top .sem { font-weight: 600; }
/* Între 721 și 1180 px bara stă lângă sidebar-ul de 236 px: locația, starea flotei, numele contului și „Ieși” nu
   încăpeau și se scriau unele peste altele (auditul 2026-11-13, design-portal-03). Locația se taie cu „…”, starea
   rămâne doar ca punct (textul ei, în title și pentru cititorul de ecran), numele contului doar ca monogramă. */
@media (min-width: 721px) and (max-width: 1180px) {
    .top { gap: 10px; padding: 0 16px; }
    .top .firm { flex: 1 1 auto; overflow: hidden; }
    .top .firm .scope-badge { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .top .grow { display: none; }
    .top .sync .sync-text, .top .who .who-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

/* Pagina + adaptarea învelișurilor vechi (section.dash > .container) la ramă. */
/* FULL-WIDTH fluid (2026-10, #1081): fără max-width — pe desktop lat conținutul umple rama, nu mai
   stă într-o coloană lipită de stânga. Gutterul orizontal crește cu ecranul (20 → 48 px); lățimile
   de lizibilitate rămân LOCALE (.prose 70ch, .es-text 56ch, .hub-desc 62ch, carduri 440 px). */
.page { padding: 26px clamp(20px, 3vw, 48px) 40px; width: 100%; flex: 1; }
.page .container { max-width: none; margin: 0; padding: 0; }
.page .dash, .page .section { padding: 0; }
.page .auth-section { min-height: 0; padding: 0; display: block; }
.page .prose { max-width: 70ch; }

/* Subsolul compact al portalului: un rând — identitatea (Legea 365/2002) + linkurile legale. */
.page-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap;
    padding: 18px clamp(20px, 3vw, 48px) 26px; font-size: 12.5px; color: var(--ink-3);
}
.page-foot .foot-links { display: flex; gap: 6px 16px; flex-wrap: wrap; }
.page-foot .foot-links a { color: var(--ink-2); }
.page-foot .foot-links a:hover { color: var(--ink); }

/* O singură intrare: copiii paginii urcă 6 px cu fade, eșalonat (max. 6). */
@media (prefers-reduced-motion: no-preference) {
    @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
    .page > * { animation: rise .24s ease both; }
    .page > :nth-child(2) { animation-delay: .04s; }
    .page > :nth-child(3) { animation-delay: .08s; }
    .page > :nth-child(4) { animation-delay: .12s; }
    .page > :nth-child(5) { animation-delay: .16s; }
    .page > :nth-child(n + 6) { animation-delay: .2s; }
}

/* ---- 4.3 Subsolul public (perete) -------------------------------------------- */
/* Fără margine sus: ultima secțiune are deja 64 px de padding, iar marginea arăta fundalul paginii ca o bandă gri
   (neagră în dark) deasupra subsolului (auditul 2026-11-13, design-public-mobile-12, design-public-desktop-04,
   design-lead-01). Paginile de autentificare își au aerul în .auth (cont.css). */
.site-footer { margin-top: 0; background: var(--wall); color: var(--wall-muted); border-top: 1px solid var(--wall-line); font-size: 14.5px; line-height: 1.5; }
.site-footer .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 36px; }
.site-footer .foot-brand p { margin: 10px 0 0; color: var(--wall-muted); max-width: 26em; }
.site-footer .brand, .site-footer .wordmark { color: var(--wall-heading); }
.site-footer .foot-col { display: flex; flex-direction: column; gap: 8px; align-content: start; }
.site-footer .foot-col .cap, .site-footer .foot-col b { color: var(--wall-heading); font-size: var(--fs-xs); font-weight: 600; margin-bottom: 2px; }
.site-footer .foot-col a { color: var(--wall-text); }
.site-footer .foot-col a:hover { color: var(--wall-heading); }
/* Filetul de deasupra rândului de identificare are lățimea textului, nu a containerului cu padding (design-public-desktop-16). */
.site-footer .foot-id-row {
    display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 28px; font-size: 12.5px; color: var(--wall-muted);
    background: linear-gradient(var(--wall-line), var(--wall-line)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.site-footer .foot-id-row .foot-id { max-width: 80ch; }
@media (max-width: 900px) { .site-footer .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
    .site-footer .foot-grid { grid-template-columns: 1fr; gap: 22px; }
    /* Listele lungi de linkuri (Produs, Legal) pe două coloane: subsolul scade la jumătate, linkurile își păstrează
       ținta de 44 px și ordinea (de la stânga la dreapta, apoi în jos). Contactul (e-mailul) rămâne pe o coloană
       (review vizual 1.0.140, #52). */
    .site-footer nav.foot-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; align-items: center; }
    .site-footer nav.foot-col .cap { grid-column: 1 / -1; }
}
/* Ținte tactile de 44 px pe telefon: linkurile subsolului aveau 21 px pe un pas de 29 px (a11y-perf-lighthouse-10,
   design-public-mobile-15). */
@media (max-width: 720px) {
    .site-footer .foot-col { gap: 0; }
    .site-footer .foot-col a { display: flex; align-items: center; min-height: 44px; }
    .brand { min-height: 44px; }
}
/* Aliasuri istorice ale subsolului vechi (markup dispărut; clasele rămân definite). */
.legal-links { display: flex; gap: 8px 22px; flex-wrap: wrap; }
.legal-identity { font-size: 12.5px; }

/* ---- 4.4 Banda de mediu (doar pe TEST — SiteEnvironment.Badge) ------------- */
.env-banner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px;
    background: var(--warn-tint); border-bottom: 2px solid var(--warn); font-size: 13px; color: var(--ink);
    position: relative; z-index: 50;
}
.env-banner .sem { font-weight: 600; color: var(--warn-text); }
.env-banner-text { flex: 1 1 320px; min-width: 0; }

/* ---- 4.5 Mobil (≤720): drawer + bara de sus pe perete ------------------------ */
@media (max-width: 720px) {
    .shell { display: block; }
    .shell::before { display: none; }
    .side {
        position: fixed; top: 0; left: 0; bottom: 0; width: 280px; height: auto; z-index: 40;
        transform: translateX(-100%); transition: transform .2s ease;
    }
    .nav-check:checked ~ .side { transform: none; }
    .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 39; opacity: 0; pointer-events: none; transition: opacity .2s; }
    .nav-check:checked ~ .scrim { opacity: 1; pointer-events: auto; }
    .top {
        position: sticky; top: 0; z-index: 30; height: auto; min-height: var(--top-h); padding: 8px 12px 0; gap: 8px; flex-wrap: wrap;
        background: var(--wall); color: var(--wall-text); border-bottom: 0;
    }
    .top .nav-burger { display: flex; color: var(--wall-text); order: 0; }
    .top .nav-burger:hover { background: var(--wall-hover); color: var(--wall-text); }
    .top .brand-m { display: inline-flex; order: 1; gap: 8px; }
    .top .brand-m .wordmark { color: var(--wall-text); font-size: 20px; }
    .top .grow { order: 2; }
    .top .theme-toggle { order: 3; color: var(--wall-text); }
    .top .theme-toggle:hover { background: var(--wall-hover); color: var(--wall-text); }
    .top .who { order: 4; }
    .top .who .who-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .top .logout-form { order: 5; }
    .top .logout-btn { color: var(--wall-text); }
    .top .logout-btn:hover { background: var(--wall-hover); color: var(--wall-text); }
    .top .sem { order: 2; }
    .top .sync { display: none; }
    /* Banda de context (firma + locația) sub bară, pe hârtie. */
    .top .firm {
        order: 10; flex: 1 1 100%; height: 40px; margin: 8px -12px 0; padding: 0 12px;
        background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line);
    }
    .page { padding: 18px 14px 32px; }
    .page-foot { padding: 14px 14px 22px; }
    /* Insigna Stripe (LIVE/SANDBOX/OPRIT) pe perete: cerneala temei deschise avea 1,4–2:1 (design-admin-01). */
    .top .sem, .top .sem-verde, .top .sem-galben { color: var(--wall-text); }
    .top .sem-rosu { color: var(--danger-on-wall); }
    /* Adminul n-are banda firmei: fără avatar, burgerul, marca, insigna, tema și „Ieși” încap pe un rând (design-admin-13). */
    .top:not(:has(.firm)) { padding-bottom: 8px; }
    .top:not(:has(.firm)) .who { display: none; }
    .top:not(:has(.firm)) .sem { font-size: 12px; }
    .top:not(:has(.firm)) .brand-m .wordmark { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    /* Sertarul: linkuri de 44 px (erau 27–30 px), paginarea și cipurile de 40 px (design-portal-12, design-admin-12). */
    .side .nav a, .side .nav-more-panel a, .side .nav-more > summary { height: 44px; font-size: 15px; }
    .side .nav a.sub, .side .nav-more-panel a { height: 40px; font-size: 14.5px; }
    .pager .pages a, .pager .pages span { min-width: 40px; height: 40px; }
    .chip { min-height: 40px; }
    /* Comutatoarele segmentate (Lunar/Anual, intervalele rapoartelor): 40 px pe telefon (design-public-mobile-20). */
    .seg > a, .seg > button, .range-switch a { height: 40px; }
    /* Ținte tactile ≥44 px. */
    :where(input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="hidden"], [type="range"], [type="submit"], [type="button"], [type="reset"])),
    :where(select) { height: 44px; }
    /* 16 px în câmpuri pe telefon: sub 16 px, Safari pe iOS mărește pagina la fiecare atingere a unui câmp. */
    :where(input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="hidden"], [type="range"])), :where(select), :where(textarea) { font-size: 16px; }
    .btn, .cta-inline, .cta-ghost, .auth-submit, .orders-filter-btn { min-height: 44px; }
    .btn.sm, .cta-inline.sm, .cta-ghost.sm { min-height: 40px; }
    /* Căutarea și „Caută” pe același rând; butonul nu mai rămâne singur pe un rând (design-portal-10). */
    .toolbar .search { flex: 1 1 12rem; width: auto; min-width: 0; }
    .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
}

/* Facturare 1.0.99: totalul confirmării și etichetele mobile fără separator orfan. */
.table tfoot td { border-top:3px double var(--rule);font-weight:600; }
@media(max-width:720px){
    .table.stack-lines:has(td[data-col]) td[data-col]:not([data-col="prod"]):not([data-col="pret"]):not([data-col="total"]):not([data-col="suma"]):not([data-col="stare"]):not([data-col="act"]):not([data-label])::before { content:none; }
}

.billing-band{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.billing-band p{margin:0;flex:1 1 240px}
.billing-band a{flex-shrink:0}

.billing-profile-body { max-width: 850px; }
.billing-profile-form { display: grid; gap: 24px; }
.billing-profile-form fieldset { min-width: 0; }
.billing-profile-form .cui-row { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.plan-consent { margin-bottom: 16px; }
/* Formularul de consimțământ dinaintea plății e un .bo-panel (padding 0, pentru tabele): bifele atingeau chenarul
   (auditul 2026-11-13, design-portal-02). */
.panel.bo-panel.plan-consent { padding: 18px 20px; }
/* `.bo-panel>.h3` (admin.css) adaugă 20 px peste padding-ul panoului: titlul ieșea decalat față de bife (#40). */
.panel.bo-panel.plan-consent > .h3 { padding: 0; }
.checkout-consent { margin: 12px 0; }
.checkout-consent label { line-height: 1.55; }

.fb-subscription { margin-top: 24px; }

.billing-profile, .fb-subscription { padding: 24px; }
/* Cardul FiscalBridge din Abonament e și .bo-panel (padding 0, pentru tabele), care bătea regula de mai sus: titlul
   stătea lipit de chenar, iar paragrafele primeau padding-ul de 20 px al lui `.bo-panel>p` (review vizual 1.0.140, #33). */
.panel.bo-panel.fb-subscription { padding: 18px 20px; }
.panel.bo-panel.fb-subscription > p { margin: 0 0 12px; padding: 0; }
.panel.bo-panel.fb-subscription > p:last-child { margin-bottom: 0; }
.billing-profile-form { gap: 8px; }
.billing-profile-form fieldset { display: grid; gap: 16px; margin-bottom: 12px; }
.billing-profile-form .field-hint { margin: 0; font-size: 13px; color: var(--ink-3); }
.billing-profile-form .form-actions { position: static !important; }
.billing-profile-form:has(> .form-actions) { padding-bottom: 0 !important; }
@media(max-width:720px) {
    .billing-profile, .fb-subscription { padding: 18px; }
    .panel.bo-panel.fb-subscription { padding: 18px; }
    .billing-profile-form .cui-row > * { width: 100%; }
}
