@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500;1,9..144,600&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════════════════════
   BONO · Design System — v6.0 cleanup
   Changelog față de v5:
   - Tipografie: scala v3 (semantică) și v4 (numerică) unificate
     pe un singur selector. Ambele clase funcționează.
   - Alias-uri eliminate din :root (--c-bg, --c-bg-card, --c-bg-deep,
     --c-surface, --c-night, --c-paper). Componentele folosesc acum
     direct numele canonice: --c-bej-0, --c-bej-1, --c-white, --c-dark.
   - Token nou --c-dark-mid (#4A4448) pentru gradient avatar.
   - Hard-code fixes: card-hairline border, vox-fab radius,
     t20 strong color.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ─── Brand ─── */
  --c-pink:        #EE4379;
  --c-pink-deep:   #C9255B;
  --c-pink-tint:   #FDE7F0;
  --c-pink-ultra:  rgba(238, 67, 121, 0.06);

  /* ─── Accent — interactive states (checked, active, focus, selected) ─── */
  /* Schimbă doar aici dacă brandul evoluează sau vrei o temă nouă */
  --c-accent:       var(--c-pink);
  --c-accent-deep:  var(--c-pink-deep);
  --c-accent-tint:  var(--c-pink-tint);
  --c-accent-ultra: var(--c-pink-ultra);

  /* ─── Surfaces — LOCKED (4 surfaces) ─── */
  --c-white:       #FFFFFF;       /* lifted: KPI, table card, inputs */
  --c-bej-0:       #FBFAF7;       /* page bg — unic peste tot */
  --c-bej-1:       #EFEBE4;       /* tonal: sidebar, action cards, thead */
  --c-dark:        #110D10;       /* dark surface + ink */
  --c-dark-mid:    #4A4448;       /* dark raised — folosit în avatar gradient */

  /* ─── Text ─── */
  --c-ink:         #110D10;       /* primary text pe light */
  --c-fog:         #7A7570;       /* labels, meta secundar */
  --c-mist:        #ABA59E;       /* placeholder, muted */

  /* ─── Lines ─── */
  --c-rule-card:   rgba(17, 13, 16, 0.12);   /* border CARD/KPI/INPUT */
  --c-rule:        rgba(17, 13, 16, 0.10);   /* hairline secundar */
  --c-rule-soft:   rgba(17, 13, 16, 0.06);   /* divider intern */
  --c-rule-solid:  #DDD6C9;                  /* fallback solid (peste imagini/gradient) */
  --c-rule-soft-solid: #EAE3D5;

  /* ─── Status ─── */
  --c-success:     #1F7A4D;
  --c-success-bg:  #ECF7F1;
  --c-warn:        #B8580A;
  --c-warn-bg:     #FBF1E2;
  --c-error:       #B91C1C;
  --c-error-bg:    #FCEAEA;
  --c-ai:          #A8336E;
  --c-ai-bg:       #F4E4EE;
  --c-ai-grad:     linear-gradient(135deg, #EE4379 0%, #7B2A6E 100%);
  --c-read:        #5C6BC0;   /* periwinkle indigo — status "citit / văzut" */
  --c-read-bg:     #ECEFFE;   /* tint — fundal status citit */

  /* ─── Radii ─── */
  --r-xs:          6px;
  --r-sm:          10px;
  --r-md:          14px;   /* carduri inline, hairline */
  --r-lg:          20px;   /* butoane lg, vox-fab, modal */
  --r-xl:          24px;   /* carduri content, KPI hero */
  --r-pill:        9999px; /* butoane, badges, tabs, nav */

  /* ─── Spacing ─── */
  --sp-4:          4px;
  --sp-8:          8px;
  --sp-12:         12px;
  --sp-16:         16px;
  --sp-24:         24px;
  --sp-28:         28px;
  --sp-40:         40px;
  --sp-56:         56px;
  --sp-92:         92px;

  /* ─── Shadows ─── */
  --sh-sm:      0 1px 3px rgba(17,13,16,0.06), 0 1px 2px rgba(17,13,16,0.04);
  --sh-md:      0 4px 14px rgba(17,13,16,0.10);
  --sh-pink:    0 6px 16px rgba(238,67,121,0.30);
  --sh-popover: 0 12px 32px rgba(17,13,16,0.12);

  /* ─── Grid · dot pattern ─── */
  --grid-color:  rgba(17, 13, 16, 0.15);
  --grid-size:   32px;
  --grid-radius: 1px;
  --grid-edge:   1.5px;

  /* ─── Document & overlay (Signer) ─── */
  --c-pdf-hl:    rgba(238, 67, 121, 0.10);  /* highlight în corpul PDF, pink @ 10% */
  --c-backdrop:  rgba(17, 13, 16, 0.35);    /* dim pe modal/sheet, ink @ 35% */

  /* ─── Tipografie · accent optic Fraunces ───
     Fraunces se randează optic mai mic decât Inter la aceeași dimensiune.
     Compensăm cu o creștere relativă, constantă procentual pe toată scala
     (nu px fix — lovește inegal titlurile mici).
     Ancoră 28px: la 28px accentul crește exact cu 2px → 2/28 = 0.07143em.
     Aplicat ÎN AMBELE blocuri `.t60 em, .t-display em, ...` ȘI `.t-em` — cele
     două trebuie să rămână sincronizate, altfel `<em>` simplu și `.t-em` diverg.
     GOTCHA: NU înregistra acest token cu @property { syntax:'<length>' }.
     Token simplu = substituție textuală, `em` se rezolvă la font-size-ul
     părintelui (heading). Cu @property + <length>, `em` se rezolvă la `:root`
     (16px), valoarea îngheață în px și pierzi relativitatea. */
  --t-em-bump:   0.07143em;
}

/* ═══ Reset ═══ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--c-bej-0);
  color: var(--c-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
em { font-style: italic; }
img, svg { display: block; max-width: 100%; }

/* ═══ Focus & Accessibility ═══ */

/* 1. Reset global — scoate outline-ul urât de browser, dar DOAR la click (nu tastatură) */
*:focus { outline: none; }

/* 2. Outline vizibil la navigare cu tastatura (`:focus-visible` e filtrat de browser automat) */
*:focus-visible {
  outline: 2px solid var(--c-fog);
  outline-offset: 3px;
  border-radius: var(--r-sm); /* urmează forma aproximativă a elementului */
}

/* 3. Override per componentă — fiecare are border-radius și context diferit */

/* Butoane pill/lg — outline urmează raza lor */
.btn:focus-visible { border-radius: var(--r-pill); outline-offset: 3px; }
.btn.lg:focus-visible { border-radius: var(--r-xl); }

/* Input și Select — înlocuit cu box-shadow (fog, nu accent) */
/* :focus-visible moștenit din *:focus-visible dar outline-ul e anulat de box-shadow */
.input:focus-visible,
.select:focus-visible { outline: none; /* box-shadow fog deja aplicat pe :focus */ }

/* Switch — element mic, spațiu suplimentar */
.switch:focus-visible { outline-offset: 4px; border-radius: var(--r-pill); }

/* Tabs button — context dens */
.tabs button:focus-visible { outline-offset: 2px; border-radius: var(--r-pill); }

/* Modal close — buton circular */
.modal-close:focus-visible { outline-offset: 2px; border-radius: 50%; }

/* Vox FAB */
.vox-fab:focus-visible { outline-offset: 3px; border-radius: var(--r-lg); }

/* 4. Dark surface variant — outline roz dispare pe fonduri închise */
.sec-dark *:focus-visible,
.card.dark *:focus-visible,
.kpi.dark *:focus-visible,
.vox-fab:focus-visible { outline-color: #fff; }

/* 5. Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Dot grid ─── */
.has-grid { position: relative; isolation: isolate; }
.has-grid::before {
  content: ''; position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: radial-gradient(
    circle,
    var(--grid-color) var(--grid-radius),
    transparent var(--grid-edge)
  );
  background-size: var(--grid-size) var(--grid-size);
}
.has-grid > * { position: relative; z-index: 1; }

/* ─── Section utilities ─── */
/* Toate transparente — grid-ul vine de pe body.has-grid */
.sec-page,
.sec-app,
.sec-mkt,
.sec-mkt-grid { background-color: transparent; }
.sec-tonal    { background-color: var(--c-bej-1); }
.sec-dark     { background-color: var(--c-dark); color: #fff; }

/* Sec-dark text mapping (sec. 6.3) — heading alb, em pink, eyebrow/body muted alb */
.sec-dark .t-h1,
.sec-dark .t-h2,
.sec-dark .t-h3,
.sec-dark .t60,
.sec-dark .t48,
.sec-dark .t40,
.sec-dark .t32,
.sec-dark .t28        { color: #fff; }
.sec-dark .t-h1 em,
.sec-dark .t60 em,
.sec-dark .t48 em,
.sec-dark .t40 em     { color: var(--c-pink); }
.sec-dark .t-eyebrow,
.sec-dark .t12        { color: rgba(255,255,255,0.50); }
.sec-dark .t-lead,
.sec-dark .t-body,
.sec-dark .t24,
.sec-dark .t16,
.sec-dark .t14,
.sec-dark p           { color: rgba(255,255,255,0.65); }

/* ─── Card primitives ─── */
/* White pe bej-0 — cu border hairline */
.card-hairline {
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-md);
}
/* Bej-1 pe bej-0 — fără border */
.card-tonal {
  background: var(--c-bej-1);
  border: none;
  border-radius: var(--r-md);
}

/* ═══════════════════════════════════════════════════════════════
   TIPOGRAFIE
   Două clase pe același stil: numerică (t60, t48...) și semantică
   (t-display, t-h1...). Ambele funcționează — folosește ce e mai clar
   în context. Semantic e recomandat pentru cod nou.
   ═══════════════════════════════════════════════════════════════ */

/* ── Display / Hero ── */
.t60, .t-display {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(36px, 5.5vw, 60px);
  letter-spacing: -0.04em; line-height: 1.10;
  color: var(--c-ink); margin: 0;
}
.t60.tight, .t-display.tight { line-height: 1.05; }

/* ── H1 ── */
.t48, .t-h1 {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(32px, 4.5vw, 48px);
  letter-spacing: -0.03em; line-height: 1.08;
  color: var(--c-ink); margin: 0;
}

/* ── H2 ── */
.t40, .t-h2 {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(28px, 3.8vw, 40px);
  letter-spacing: -0.03em; line-height: 1.15;
  color: var(--c-ink); margin: 0;
}

/* ── H3 ── */
.t32, .t-h3 {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(24px, 3.2vw, 32px);
  letter-spacing: -0.02em; line-height: 1.19;
  color: var(--c-ink); margin: 0;
}

/* ── H4 ── */
.t28 {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(22px, 2.8vw, 28px);
  letter-spacing: -0.02em; line-height: 1.21;
  color: var(--c-ink); margin: 0;
}

/* ── Fraunces em — accent italic în heading-uri ──
   Compensare optică Fraunces vs Inter: +7.14% via --t-em-bump (ancoră 28px).
   ATENȚIE: blocul ăsta și .t-em trebuie să rămână sincronizate. */
.t60 em, .t-display em,
.t48 em, .t-h1 em,
.t40 em, .t-h2 em,
.t32 em, .t-h3 em,
.t28 em {
  font-family: 'Fraunces', serif;
  font-style: italic; font-weight: 600;
  font-size: calc(1em + var(--t-em-bump));
  color: var(--c-pink); letter-spacing: inherit;
}

/* ── Lead ── */
.t24, .t-lead {
  font-family: 'Inter', sans-serif; font-weight: 400;
  font-size: 24px; line-height: 30px; letter-spacing: -0.01em;
  color: var(--c-ink); margin: 0;
}
.t24 strong, .t-lead strong { color: var(--c-ink); font-weight: 600; }

/* ── Editorial body — Source Serif 4, exclusiv blog ── */
.t20, .t-edit {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px; font-weight: 400; line-height: 32px; letter-spacing: 0;
  color: var(--c-ink); margin: 0;
}
.t20 strong, .t-edit strong { color: var(--c-ink); font-weight: 600; }

/* ── Subhead ── */
.t18 {
  font-family: 'Inter', sans-serif; font-weight: 600;
  font-size: 18px; line-height: 24px; letter-spacing: -0.01em;
  color: var(--c-ink); margin: 0;
}

/* ── Body UI ── */
.t16, .t-body {
  font-family: 'Inter', sans-serif; font-weight: 400;
  font-size: 16px; line-height: 24px; letter-spacing: 0;
  color: var(--c-ink); margin: 0;
}
.t16 strong, .t-body strong { color: var(--c-ink); font-weight: 600; }

/* ── UI label ── */
.t14, .t-meta {
  font-family: 'Inter', sans-serif; font-weight: 500;
  font-size: 14px; line-height: 20px; letter-spacing: 0;
  color: var(--c-fog); margin: 0;
}

/* ── Control label & description ── */
/* Folosite pentru etichetele controalelor omoloage: checkbox, radio, switch. */
.t15, .t-ctrl {
  font-family: 'Inter', sans-serif; font-weight: 400;
  font-size: 15px; line-height: 22px; letter-spacing: 0;
  color: var(--c-ink); margin: 0;
}
.t13, .t-ctrl-desc {
  font-family: 'Inter', sans-serif; font-weight: 400;
  font-size: 13px; line-height: 18px; letter-spacing: 0;
  color: var(--c-fog); margin: 0;
}

/* ── Eyebrow / caption ── */
.t12, .t-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600;
  line-height: 16px; letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-fog); margin: 0;
}
.t12 .dot, .t-eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c-pink); }
.t12.brand, .t-eyebrow.brand { color: var(--c-pink-deep); }

/* ── Mono ── */
.t-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; color: var(--c-ink);
}

/* ── Cifre financiare ── */
.tn40 {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(28px, 3.5vw, 40px); line-height: 1;
  letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  color: var(--c-ink);
}
.tn28 {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(22px, 2.5vw, 28px); line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  color: var(--c-ink);
}
.t-suffix-lg { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 400; line-height: 1; color: var(--c-mist); }
.t-suffix-md { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 400; line-height: 1; color: var(--c-mist); }
.t-num-inline { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }

/* ── Speciale ── */
.t-badge {
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 600;
  line-height: 1; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.t-actor {
  font-family: 'Fraunces', serif; font-style: italic;
  font-weight: 500; font-size: 13px;
  line-height: 1; letter-spacing: -0.01em;
  color: var(--c-pink);
}

/* ── T-em — accent Fraunces în heading-uri ──────────────────────
   EXCLUSIV pentru cuvinte cu încărcătură emoțională / temporală /
   acțiune pe heading-uri din scala T60–T28. Niciodată inline cu
   `font-family: 'Fraunces'` — folosește `<em class="t-em">cuvânt</em>`.
   Letter-spacing inherit de la heading.
   Compensare optică Fraunces vs Inter: font-size = 1em + 0.07143em
   (+7.14%, ancoră 28px) prin --t-em-bump. Trebuie să rămână sincronizat
   cu blocul `.t60 em, .t-display em, ...` de mai sus. */
.t-em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 600;
  font-size: calc(1em + var(--t-em-bump));
  color: var(--c-pink);
  letter-spacing: inherit;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .t24, .t-lead { font-size: 20px; line-height: 26px; }
  .t20, .t-edit { font-size: 18px; line-height: 30px; }
  .t18           { font-size: 16px; line-height: 22px; }
}

/* ═══ Buttons ═══ */
.btn {
  height: 40px; padding: 0 24px;
  border-radius: var(--r-lg);
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: all 140ms;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: var(--c-accent); color: #fff; }
.btn.primary:hover:not(:disabled) {
  background: var(--c-accent-deep);
  transform: translateY(-1px);
  box-shadow: var(--sh-pink);
}
.btn.secondary { background: var(--c-bej-1); color: var(--c-ink); }
.btn.secondary:hover:not(:disabled) { filter: brightness(0.97); }
.btn.ghost { background: transparent; color: var(--c-fog); }
.btn.ghost:hover:not(:disabled) { color: var(--c-ink); background: var(--c-bej-1); }
.btn.dark { background: var(--c-dark); color: #fff; }
.btn.dark:hover:not(:disabled) { background: #1F1B17; transform: translateY(-1px); }
.btn.outline { background: transparent; color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-rule); }
.btn.outline:hover:not(:disabled) { background: var(--c-bej-1); }
.btn.outline-pink { background: var(--c-white); color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-pink); }
.btn.outline-pink:hover:not(:disabled) { background: var(--c-pink); color: #fff; }
.btn.danger { background: var(--c-error); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #9D1818; }

/* Utility: buton full-width — pentru CTA în card, formular cu un singur câmp, modal submit */
.btn.full { width: 100%; justify-content: center; }

.btn.lg { height: 44px; padding: 0 32px; font-size: 16px; border-radius: var(--r-xl); }
.btn.sm { height: 30px; padding: 0 18px; font-size: 13px; border-radius: var(--r-pill); }
.btn.xs { height: 26px; padding: 0 14px; font-size: 12px; border-radius: var(--r-pill); }
.btn.icon-only { padding: 0; aspect-ratio: 1; }

/* ═══ Inputs ═══ */
.input {
  height: 40px; padding: 0 16px;
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-lg);
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 400; line-height: 20px;
  color: var(--c-ink); width: 100%;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
}
.input::placeholder { color: var(--c-mist); }
.input:focus, .input.is-focused {
  outline: none;
  /* Refinement v6.0: focus halo neutru (fog) în loc de pink — pattern consistent
     pe toate controalele form (input, select, cur-select). Spec sec. 7.2 pomenește
     pink, dar implementarea folosește fog pentru subtilitate și a evita prea mult
     accent în formulare cu multe câmpuri. */
  border-color: var(--c-fog);
  background: var(--c-white);
  box-shadow: 0 0 0 3px rgba(122,117,112,0.14);
}
.input.lg { height: 44px; padding: 0 20px; font-size: 16px; }
.input.tonal { background: var(--c-bej-1); }
.input.error { border-color: var(--c-error); background: var(--c-error-bg); }
.input.success { border-color: var(--c-success); }
.input:disabled { background: var(--c-bej-1); color: var(--c-mist); cursor: not-allowed; }

/* ═══ Select ═══ */
.select {
  height: 40px; padding: 0 36px 0 16px;
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-lg);
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 400; line-height: 20px;
  color: var(--c-ink); width: 100%;
  cursor: pointer;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
  /* ascunde săgeata nativă */
  appearance: none; -webkit-appearance: none;
  /* săgeată custom SVG inline */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%237A7570' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select:focus,
.select.is-focused {
  outline: none;
  border-color: var(--c-fog);
  background-color: var(--c-white);
  box-shadow: 0 0 0 3px rgba(122,117,112,0.14);
}
.select.lg { height: 44px; padding: 0 40px 0 20px; font-size: 16px; }
.select.tonal { background-color: var(--c-bej-1); }
.select.error { border-color: var(--c-error); background-color: var(--c-error-bg); }
.select.success { border-color: var(--c-success); }
.select:disabled { background-color: var(--c-bej-1); color: var(--c-mist); cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500; line-height: 16px;
  letter-spacing: 0.04em; color: var(--c-fog);
  padding-left: 16px;
}
.field-help {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 400; line-height: 16px;
  color: var(--c-fog); padding-left: 16px;
}
.field-help.error   { color: var(--c-error); }
.field-help.success { color: var(--c-success); }

/* Search input */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap .search-ic {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--c-fog); pointer-events: none; width: 16px; height: 16px;
}
.search-wrap .input { padding-left: 40px; }
.search-wrap .kbd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--c-fog);
  padding: 3px 7px; border-radius: var(--r-xs);
  background: var(--c-white); border: 1px solid var(--c-rule);
  pointer-events: none;
}

/* ═══ Badges ═══ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--r-pill);
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
.badge.success { background: var(--c-success-bg); color: var(--c-success); }
.badge.warn    { background: var(--c-warn-bg);    color: var(--c-warn); }
.badge.error   { background: var(--c-error-bg);   color: var(--c-error); }
.badge.ai      { background: var(--c-ai-bg);      color: var(--c-ai); }
.badge.pink    { background: var(--c-pink-tint);  color: var(--c-pink-deep); }
.badge.neutral { background: var(--c-bej-1);      color: var(--c-fog); }
.badge.dark    { background: var(--c-dark);        color: #fff; }

.badge.filled.success { background: var(--c-success); color: #fff; }
.badge.filled.warn    { background: var(--c-warn);    color: #fff; }
.badge.filled.error   { background: var(--c-error);   color: #fff; }
.badge.filled.ai      { background: var(--c-ai-grad); color: #fff; }
.badge.filled.pink    { background: var(--c-pink);    color: #fff; }
.badge.filled.neutral { background: var(--c-ink);     color: #fff; }

.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge.sm { padding: 1px 7px; font-size: 11px; } /* compact — în tabs, nav, contexte dense */

/* AI inline tags */
.ai-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--c-pink-tint); color: var(--c-pink-deep);
  padding: 3px 8px; border-radius: var(--r-pill);
}
.ai-feed {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--c-fog);
  padding: 5px 11px; background: var(--c-bej-1);
  border-radius: var(--r-pill);
}
.ai-feed strong { color: var(--c-pink); font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; }

/* ═══ Cards ═══ */
/* Card content — white cu border, radius xl (24px) */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-xl);
  padding: 24px;
}
.card.tonal { background: var(--c-bej-1); border: none; }
.card.dark  {
  background: var(--c-dark);
  border-color: rgba(255,255,255,0.05); color: #fff;
}
.card.dark .t-h2, .card.dark .t-h3,
.card.dark .t48,  .card.dark .t32  { color: #fff; }
.card.dark .t-body, .card.dark .t16 { color: rgba(255,255,255,0.65); }
.card.feat {
  border-color: color-mix(in oklab, var(--c-pink) 30%, var(--c-rule));
  box-shadow: 0 24px 60px -20px rgba(238,67,121,0.20);
}
.card.lg { padding: 32px; }
.card.sm { padding: 18px; }

/* Card cu CTA — flex-column + buton la baza, full-width
   Pattern din references (.price în landing, .da-act.tva-due în Dublin):
   .card.cta > .btn:last-child se lipește de bază cu margin-top:auto. */
.card.cta { display: flex; flex-direction: column; }
.card.cta > .btn:last-child,
.card.cta > .btn.full { margin-top: auto; }

/* KPI card — white cu border, radius lg (20px) */
.kpi {
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  position: relative;
}
.kpi .label {
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--c-fog); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.kpi .label .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c-mist); }
.kpi.income .label .dot  { background: var(--c-pink); }
.kpi.expense .label .dot { background: var(--c-ink); }
.kpi.profit .label .dot  { background: var(--c-success); }
.kpi.due .label .dot     { background: var(--c-pink); }
.kpi .value {
  font-family: 'Inter', sans-serif; font-weight: 600;
  font-size: 32px; letter-spacing: -0.035em; line-height: 1;
  color: var(--c-ink); font-variant-numeric: tabular-nums;
}
.kpi .value .unit { font-size: 14px; color: var(--c-mist); margin-left: 4px; font-weight: 400; letter-spacing: 0; }
.kpi .delta {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.kpi .delta.up      { color: var(--c-success); }
.kpi .delta.down    { color: var(--c-warn); }
.kpi .delta.neutral { color: var(--c-fog); }
.kpi.dark {
  background: var(--c-dark); color: #fff;
  border-color: var(--c-dark);
}
.kpi.dark .label        { color: rgba(255,255,255,0.55); }
.kpi.dark .value        { color: #fff; }
.kpi.dark .value .unit  { color: rgba(255,255,255,0.50); }
.kpi.dark .delta.neutral { color: rgba(255,255,255,0.65); }

/* ═══ Review card ═══ */
/* Card cu header (titlu + acțiune) + rânduri label muted ↔ valoare tabular.
   Pattern dovedit în proto-autoangajare (pas 3 Review). Modificările sunt
   colapsabile în .card-edit (toggle prin attr `hidden` sau JS). */
.card-hd {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 8px;
}
.card-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--c-rule-soft);
}
.card-row:last-child { border-bottom: none; }
.card-val {
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.card-edit {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--c-rule-soft);
}
.card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ═══ Tabs / Segmented ═══ */
.tabs {
  display: inline-flex; padding: 3px;
  background: var(--c-bej-1);
  border-radius: var(--r-pill);
}
.tabs button {
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 500;
  background: transparent; border: none; cursor: pointer;
  height: 34px; padding: 0 16px; border-radius: var(--r-pill);
  color: var(--c-fog); transition: all 140ms;
  letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 6px;
}
.tabs button:hover { color: var(--c-ink); }
.tabs button.active {
  background: var(--c-white); color: var(--c-ink);
  box-shadow: 0 1px 2px rgba(17,13,16,0.06);
}

/* tab-icon — SVG la stânga labelului; moștenește culoarea butonului */
.tabs button .tab-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; flex-shrink: 0;
  color: inherit; transition: color 140ms;
}
.tabs button .tab-icon svg { display: block; }

/* badge în tabs — folosește .badge.sm.neutral / .badge.sm.pink */
.tabs button .badge { font-variant-numeric: tabular-nums; transition: background 140ms, color 140ms; }

/* dark variant */
.tabs.dark { background: var(--c-dark); }
.tabs.dark button       { color: rgba(255,255,255,0.55); }
.tabs.dark button:hover { color: #fff; }
.tabs.dark button.active { background: var(--c-accent); color: #fff; box-shadow: none; }
.tabs.dark button .badge { background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.55); }
.tabs.dark button.active .badge { background: rgba(255,255,255,0.20); color: #fff; }

/* tab panels — ascunse implicit, vizibile când [aria-selected="true"] */
[role="tabpanel"]         { display: none; }
[role="tabpanel"].active  { display: block; }
[role="tabpanel"]:focus-visible { outline: 2px solid var(--c-fog); outline-offset: 3px; border-radius: var(--r-sm); }

/* ═══ Toggle / Switch ═══ */
.switch {
  width: 36px; height: 20px;
  background: var(--c-bej-1); border-radius: var(--r-pill);
  position: relative; cursor: pointer;
  transition: background 140ms; border: none; padding: 0;
}
.switch::after {
  content: ''; position: absolute;
  top: 2px; left: 2px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%;
  box-shadow: var(--sh-sm); transition: transform 160ms;
}
.switch.on { background: var(--c-accent); }
.switch.on::after { transform: translateX(16px); }

/* ═══ Alerts / Callouts ═══ */
.alert {
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.5;
}
.alert .ic { flex-shrink: 0; margin-top: 1px; }
.alert .alert-body { flex: 1; min-width: 0; }
.alert.info    { background: var(--c-bej-1); color: var(--c-ink); }
.alert.success { background: var(--c-success-bg); color: var(--c-success); }
.alert.warn    { background: var(--c-warn-bg);    color: var(--c-warn); }
.alert.error   { background: var(--c-error-bg);   color: var(--c-error); }
.alert.brand   {
  background: var(--c-white); color: var(--c-fog);
  border: 1px solid var(--c-rule);
  border-left: 3px solid var(--c-pink);
  padding: 13px 15px 13px 13px;
}
.alert.brand strong { color: var(--c-pink-deep); }
.alert.brand .ic    { color: var(--c-pink-deep); }
.alert strong { color: inherit; font-weight: 600; }
.alert a { color: inherit; text-decoration: underline; opacity: 0.85; }
.alert a:hover { opacity: 1; }

/* Dismiss button — ghost xs / xs icon-only, moștenește culoarea variantei */
.alert > .btn.ghost,
.banner > .btn.ghost {
  color: inherit; opacity: 0.6;
  align-self: flex-start; flex-shrink: 0;
}
.alert > .btn.ghost:hover:not(:disabled),
.banner > .btn.ghost:hover:not(:disabled) {
  opacity: 1; color: inherit;
  background: color-mix(in oklab, currentColor 10%, transparent);
}

/* Floating — toast injectat prin JS, bottom-right, cu shadow + slide-in */
.alert.floating {
  position: fixed; right: 24px; bottom: 24px;
  z-index: 100; max-width: 420px;
  box-shadow: 0 12px 32px rgba(20,16,12,0.14), 0 2px 8px rgba(20,16,12,0.06);
  animation: alert-floating-in 220ms cubic-bezier(0.16,1,0.3,1);
}
.alert.floating.info,
.alert.floating.success,
.alert.floating.warn,
.alert.floating.error,
.alert.floating.brand { /* păstrează fundalul variantei */ }
@keyframes alert-floating-in {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@media (max-width: 640px) {
  .alert.floating { left: 16px; right: 16px; max-width: none; }
}

/* ═══ Insight / promise card ═══ */
.insight {
  background: var(--c-pink-ultra);
  border: 1px solid color-mix(in oklab, var(--c-pink) 18%, var(--c-rule));
  border-radius: var(--r-xl); padding: 28px;
}
.insight .lb {
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--c-pink-deep); margin-bottom: 10px;
}
.insight .h {
  font-family: 'Inter', sans-serif; font-weight: 600;
  font-size: 22px; letter-spacing: -0.022em; line-height: 1.25;
  color: var(--c-ink); margin: 0 0 12px;
}
.insight .h em { font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; color: var(--c-pink); }
.insight .p {
  font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.6;
  color: var(--c-fog); margin: 0 0 18px;
}
.insight .sig {
  display: flex; align-items: center; gap: 12px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in oklab, var(--c-pink) 14%, transparent);
}
.insight .sig .nm { font-size: 14px; color: var(--c-ink); font-weight: 500; }
.insight .sig .rl { font-size: 12px; color: var(--c-fog); }

/* ═══ Live dot pulse ═══ */
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 0 0 rgba(31, 122, 77, 0.5);
  animation: pulse-dot 2.4s ease-in-out infinite;
  display: inline-block;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0   rgba(31, 122, 77, 0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(31, 122, 77, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(31, 122, 77, 0);    }
}

/* ═══ Vox FAB ═══ */
.vox-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  background: var(--c-dark); color: #fff;
  border: none; border-radius: var(--r-lg);
  padding: 12px 18px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  box-shadow: 0 12px 32px -10px rgba(17,13,16,0.35);
  cursor: pointer; transition: transform 140ms;
  font-family: 'Inter', sans-serif;
}
.vox-fab:hover { transform: translateY(-2px); }
.vox-fab span:first-child { font-size: 14px; font-weight: 500; }
.vox-fab em { font-family: 'Fraunces', serif; font-style: italic; color: var(--c-pink); font-weight: 500; }
.vox-fab .meta { font-size: 11px; color: rgba(255,255,255,0.55); letter-spacing: 0.04em; }

/* ═══ Avatars ═══ */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-pink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}
.avatar.lg       { width: 44px; height: 44px; font-size: 13px; }
.avatar.sm       { width: 28px; height: 28px; font-size: 10px; }
.avatar.dark   { background: var(--c-dark); }
.avatar.tinted { background: var(--c-pink-tint); color: var(--c-pink-deep); }

/* ═══ Tables ═══ */
.tbl { width: 100%; border-collapse: collapse; font-family: 'Inter', sans-serif; }
.tbl thead th {
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--c-fog); text-align: left;
  padding: 10px 22px; background: var(--c-bej-1);
  border-bottom: 1px solid var(--c-rule-soft);
}
.tbl thead th.right { text-align: right; }
.tbl tbody td {
  padding: 14px 22px; font-size: 14px; color: var(--c-ink);
  border-bottom: 1px solid var(--c-rule-soft);
  font-variant-numeric: tabular-nums; letter-spacing: -0.003em;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--c-bej-1); }
.tbl .right  { text-align: right; }
.tbl .name   { color: var(--c-ink); font-weight: 500; }
.tbl .amount { color: var(--c-ink); font-weight: 500; }
.tbl .date   { color: var(--c-fog); font-size: 13px; }

/* ═══ Topnav v3 — dark pill bottom-center ═══ */
.v3-topnav {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 95;
  display: flex; gap: 1px;
  background: var(--c-dark); border-radius: var(--r-pill); padding: 3px;
  box-shadow: 0 8px 24px rgba(17,13,16,0.22);
}
.v3-topnav a {
  width: 32px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; color: rgba(255,255,255,0.55);
  border-radius: var(--r-pill); transition: color 140ms, background 140ms;
}
.v3-topnav a:hover  { color: #fff; }
.v3-topnav a.active { background: var(--c-accent); color: #fff; }
.v3-topnav .sep { font-size: 9px; color: var(--c-dark-mid); padding: 0 4px; align-self: center; letter-spacing: 0.10em; }

/* ═══ Modal ═══ */
/*
  Structură HTML:
  <div class="modal-backdrop" onclick="if(event.target===this)closeModal()">
    <div class="modal">
      <button class="modal-close" aria-label="Închide"><!-- SVG X --></button>
      <div class="t-eyebrow"><span class="dot"></span>Label</div>
      <h2 class="t-h2">Titlu <em>modal</em></h2>
      <p class="t-meta" style="margin:8px 0 24px">Descriere opțională.</p>
      <!-- conținut: .field + .input din DS -->
      <button class="btn primary lg" style="width:100%;margin-top:22px">Acțiune</button>
    </div>
  </div>

  JS minimal:
  backdrop.classList.toggle('open')
  document.body.style.overflow = open ? 'hidden' : ''
  document.addEventListener('keydown', e => { if(e.key==='Escape') closeModal() })
*/
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(17,13,16,0.25);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 32px;
  animation: modal-fade 180ms ease-out;
}
.modal-backdrop.open { display: flex; }

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--c-bej-1);
  border-radius: var(--r-xl);
  padding: 32px 36px 28px;
  width: 100%; max-width: 480px;
  outline: 1px solid var(--c-white); outline-offset: 16px;
  position: relative;
  animation: modal-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal.sm { max-width: 360px; }
.modal.lg { max-width: 640px; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-rule-soft); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-fog); transition: all 140ms;
}
.modal-close:hover { background: var(--c-rule-card); color: var(--c-ink); }

/* ═══ Utilities ═══ */
.stack-xs > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-8); }
.stack    > * + * { margin-top: var(--sp-16); }
.stack-lg > * + * { margin-top: var(--sp-24); }
.stack-xl > * + * { margin-top: var(--sp-40); }

.row    { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.sm { gap: 6px; }
.row.lg { gap: 16px; }

.divider        { height: 1px; background: var(--c-rule-soft); border: none; margin: 20px 0; }
.divider.strong { background: var(--c-rule); }

/* ─── Responsive ─── */
@media (max-width: 1024px) { .v3-topnav { bottom: 12px; } }

/* ═══ Checkbox & Radio ═══ */

/* Grup vertical */
.check-group, .radio-group {
  display: flex; flex-direction: column; gap: 10px;
}
/* Grup orizontal compact */
.check-group.row, .radio-group.row {
  flex-direction: row; flex-wrap: wrap; gap: 16px;
}

/* Item wrapper — label clickabil */
.check-item, .radio-item {
  display: inline-flex; align-items: flex-start; gap: 10px;
  cursor: pointer; user-select: none;
}
.check-item input, .radio-item input {
  flex-shrink: 0; margin: 2px 0 0; /* aliniere cu prima linie de text */
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--c-white);
  border: 1.5px solid var(--c-rule-card);
  cursor: pointer;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
  position: relative;
}
.check-item input[type="checkbox"] { border-radius: var(--r-xs); }
.radio-item  input[type="radio"]   { border-radius: 50%; }

/* Hover */
.check-item input:not(:checked):not(:disabled):hover,
.radio-item  input:not(:checked):not(:disabled):hover {
  border-color: var(--c-fog);
  background: var(--c-bej-0);
}

/* Checked */
.check-item input[type="checkbox"]:checked,
.radio-item  input[type="radio"]:checked {
  background: var(--c-accent);
  border-color: var(--c-accent);
}

/* Checkmark SVG inline via pseudo */
.check-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4.5 9L7.5 12L13.5 6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Radio dot */
.radio-item input[type="radio"]:checked::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
}

/* Focus */
.check-item input:focus-visible,
.radio-item  input:focus-visible {
  outline: 2px solid var(--c-fog);
  outline-offset: 3px;
}

/* Disabled */
.check-item input:disabled,
.radio-item  input:disabled {
  background: var(--c-bej-1);
  border-color: var(--c-rule);
  cursor: not-allowed;
}
.check-item input:disabled:checked,
.radio-item  input:disabled:checked {
  background: var(--c-mist);
  border-color: var(--c-mist);
}
.check-item:has(input:disabled),
.radio-item:has(input:disabled) { cursor: not-allowed; }

/* Error */
.check-item input.error,
.radio-item  input.error {
  border-color: var(--c-error);
  background: var(--c-error-bg);
}

/* Label text — pe scala .t-ctrl (15/22) + .t-ctrl-desc (13/18),
   comună cu switch-ul, pentru aspect sincron între controale omoloage. */
.check-label, .radio-label {
  font-family: 'Inter', sans-serif; font-weight: 400;
  font-size: 15px; line-height: 22px;
  color: var(--c-ink);
}
.check-label .sublabel,
.radio-label .sublabel {
  display: block; font-weight: 400;
  font-size: 13px; line-height: 18px;
  color: var(--c-fog); margin-top: 2px;
}

/* Indeterminate (checkbox only) */
.check-item input[type="checkbox"]:indeterminate {
  background: var(--c-accent); border-color: var(--c-accent);
}
.check-item input[type="checkbox"]:indeterminate::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 9px; height: 2px;
  background: #fff; border-radius: 1px;
  background-image: none;
}

/* Card variant — întreg item-ul e clickabil, chenar accent când e selectat */
.check-item.card,
.radio-item.card {
  display: flex; width: 100%;
  padding: 14px 16px; align-items: center;
  border: 1.5px solid var(--c-rule-card);
  border-radius: var(--r-lg);
  background: var(--c-white);
  transition: border-color 140ms, background 140ms;
}
.check-item.card:not(:has(input:disabled)):hover,
.radio-item.card:not(:has(input:disabled)):hover {
  border-color: var(--c-fog);
}
.check-item.card:has(input:checked),
.radio-item.card:has(input:checked) {
  border-color: var(--c-accent);
  background: var(--c-accent-ultra);
}
.check-item.card:has(input:disabled),
.radio-item.card:has(input:disabled) {
  background: var(--c-bej-1);
  border-color: var(--c-rule);
}

/* ═══ Banner ═══ */

/* Inline banner — full-width alert cu action și dismiss.
   Folosește aceleași sub-elemente ca .alert (.alert-body, .btn.ghost.xs) */
.banner {
  width: 100%;
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.5;
}
.banner .ic { flex-shrink: 0; margin-top: 1px; }
.banner-body {
  flex: 1; min-width: 0;
  display: flex; align-items: flex-start; gap: 10px;
}
.banner-text { flex: 1; min-width: 0; }
.banner .banner-actions {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
}
.banner .banner-actions .btn { flex-shrink: 0; }
.banner strong { color: inherit; font-weight: 600; }
.banner a { color: inherit; text-decoration: underline; opacity: 0.85; }
.banner a:hover { opacity: 1; }

.banner-dismiss {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: var(--r-xs);
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: currentColor; opacity: 0.55;
  margin-top: -1px; margin-right: -4px;
  transition: opacity 120ms, background 120ms;
}
.banner-dismiss:hover { opacity: 1; background: rgba(17, 13, 16, 0.06); }

/* Culori — aceleași variante ca .alert */
.banner.info    { background: var(--c-bej-1);        color: var(--c-ink); }
.banner.success { background: var(--c-success-bg);   color: var(--c-success); }
.banner.warn    { background: var(--c-warn-bg);       color: var(--c-warn); }
.banner.error   { background: var(--c-error-bg);      color: var(--c-error); }
.banner.brand   {
  background: var(--c-white);
  color: var(--c-fog);
  border: 1px solid var(--c-rule);
  border-left: 3px solid var(--c-pink);
  padding: 13px 15px 13px 13px;
}
.banner.brand strong { color: var(--c-pink-deep); }
.banner.brand .ic    { color: var(--c-pink-deep); }

/* Page banner — fixat sus, full-width, fără border-radius */
.page-banner {
  position: relative; width: 100%;
  padding: 12px 48px 12px 20px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  line-height: 1.4; text-align: center;
}
.page-banner .page-banner-dismiss {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: var(--r-xs);
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: currentColor; opacity: 0.55; transition: opacity 120ms;
}
.page-banner .page-banner-dismiss:hover { opacity: 1; }
.page-banner strong { color: inherit; font-weight: 700; }
.page-banner a { text-decoration: underline; opacity: 0.8; }
.page-banner a:hover { opacity: 1; }

.page-banner.info    { background: var(--c-bej-1);        color: var(--c-ink); }
.page-banner.success { background: var(--c-success-bg);   color: var(--c-success); }
.page-banner.warn    { background: var(--c-warn-bg);       color: var(--c-warn); }
.page-banner.error   { background: var(--c-error-bg);      color: var(--c-error); }
.page-banner.brand   { background: var(--c-pink-tint);     color: var(--c-pink-deep); }
.page-banner.dark    { background: var(--c-dark);          color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   Stepper — proces liniar compact, inline cu header.
   3-5 pași maxim, label scurt, conector dotted între pași.
   Stări: .done (check, pink-deep) → .active (chevron, ink, bold)
   → upcoming (chevron, mist, default).
   Conectorul .done are linia pink; cel default e rule-neutral.
   ═══════════════════════════════════════════════════════════════ */
.stepper {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Inter', sans-serif;
}
.stepper-step {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none; padding: 0;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--c-mist); cursor: pointer;
  transition: color 140ms;
}
.stepper-step:hover:not(:disabled) { color: var(--c-fog); }
.stepper-step:disabled { cursor: not-allowed; }
.stepper-step > svg { flex-shrink: 0; }
.stepper-step.done   { color: var(--c-fog); }
.stepper-step.done > svg { color: var(--c-success); }
.stepper-step.done:hover { color: var(--c-ink); }
.stepper-step.active { color: var(--c-pink-deep); font-weight: 600; }
.stepper-step.active:hover { color: var(--c-pink-deep); }

.stepper-line {
  width: 34px; height: 0; flex-shrink: 0;
  border-top: 2px dotted var(--c-fog);
}
.stepper-line.done { border-top-color: var(--c-fog); }

/* ─── Mobile variant — colapsează la trigger + dropdown
   Trigger-ul nu are chrome propriu — trăiește într-un container dedicat
   (page header) și-i moștenește suprafața. ─── */
.stepper.mobile { position: relative; display: inline-block; }
.stepper-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: none; padding: 0;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--c-pink-deep);
  cursor: pointer;
}
.stepper-trigger > svg { flex-shrink: 0; }
.stepper-trigger .stepper-count {
  font-weight: 500; color: var(--c-fog);
  font-variant-numeric: tabular-nums;
  padding-left: 8px;
  border-left: 1px solid var(--c-rule);
  margin-left: 2px;
}
.stepper-trigger .chev {
  color: var(--c-fog); transition: transform 160ms;
}
.stepper.mobile.open .stepper-trigger .chev { transform: rotate(180deg); }

.stepper-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-md);
  padding: 6px; min-width: 200px;
  box-shadow: var(--sh-popover);
  display: none; flex-direction: column; gap: 2px;
}
.stepper.mobile.open .stepper-menu { display: flex; }
.stepper-menu .stepper-step {
  padding: 8px 10px; width: 100%;
  justify-content: flex-start;
  border-radius: var(--r-xs);
  transition: background 120ms;
}
.stepper-menu .stepper-step:hover:not(:disabled) { background: var(--c-bej-0); }
.stepper-menu .stepper-step.active { background: var(--c-pink-tint); }

/* ═══════════════════════════════════════════════════════════════
   App Footer — bară fixă jos pentru app-shell paginat
   Conține rândul de navigare (back ghost + primary CTA) și un
   text de ajutor opțional care apare doar la scroll (.is-scrolled).
   Pereche cu app-top — împreună formează shell-ul standard pentru
   flow-uri secvențiale (signing, onboarding, autoangajare).
   ═══════════════════════════════════════════════════════════════ */
.app-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 30;
  background: var(--c-white);
  border-top: 1px solid var(--c-rule-soft);
}
.app-footer[hidden] { display: none; }
.app-footer-in {
  width: 100%; max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px 14px;
  display: flex; flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}
/* Variantă pentru pagini cu conținut wider (ex: signer cu signer-layout 1096).
   Consumatorul măsoară conținutul cu getBoundingClientRect, setează --app-foot-w
   pe :root și aplică .matches-content pe footer. Footer-ul renunță la padding-ul
   orizontal ca butoanele să fie flush cu marginile conținutului. */
.app-footer.matches-content .app-footer-in {
  max-width: var(--app-foot-w, 640px);
  padding-left: 0; padding-right: 0;
}
.app-foot-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
/* Rezervă spațiu pentru back-button pe primul pas (visibility, nu display) */
.app-foot-nav .invisible { visibility: hidden; }
/* Text ajutor — ascuns by default, revealed pe .is-scrolled */
.app-foot-help {
  text-align: center;
  font-size: 13px; color: var(--c-fog);
  max-height: 0; opacity: 0; margin: 0;
  overflow: hidden; pointer-events: none;
  transition: max-height 180ms ease, opacity 180ms ease, margin-top 180ms ease;
}
.app-foot-help a { color: var(--c-pink-deep); text-decoration: underline; }
.app-footer.is-scrolled .app-foot-help {
  max-height: 48px; opacity: 1; margin-top: 4px;
  pointer-events: auto;
}
@media (min-width: 768px) {
  .app-footer-in { padding: 12px 20px 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   FLOW CHROME — SHELL MOBIL CANONIC · MOBILE ONLY (<768px)
   ──────────────────────────────────────────────────────────────
   ⚠️  EXCLUSIV PE MOBIL. Pe desktop folosește .app-footer.
       Nu importa .flow-chrome (sau orice clasă .flow-*) într-o
       pagină desktop — regula e bidirecțională, fără excepție.
       Vezi SKILL.md → „Hard rules → DON'T" și
       docs/navigation.md → „Flow chrome".
   ──────────────────────────────────────────────────────────────
   Shell-ul canonic pentru ORICE ecran de mobil în aplicație
   (setări, detalii, formular, wizard, onboarding, declarații).
   Header bar (back stânga · titlu opțional centru · meniu opțional
   dreapta) + footer bar (un singur CTA primar) ca overlay-uri peste
   conținut scrollabil. Două bottom-sheets opționale: meniul general
   și lista de pași (doar în wizards multi-step).
   Tratament canonic: veil + blur (bej-0 cu backdrop-filter), pe
   care conținutul îl traversează gradual mascat.
   Pereche desktop: .app-footer (flow-uri multi-page desktop).
   Consumatorul aduce conținutul propriu per ecran și starea
   (step / open-sheets) — DS oferă doar layout-ul, tratamentul
   și stilurile sheet-urilor.
   ═══════════════════════════════════════════════════════════════ */

.flow-chrome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--c-bej-0);
  height: 100%;
}

/* Conținut scrollabil — sub overlay-uri, mask fade pe ambele capete
   ca să se estompeze pe sub header/footer (specific tratamentului 1). */
.flow-chrome-scroll {
  position: absolute; inset: 0;
  z-index: 1;
  overflow-y: auto; overflow-x: hidden;
  padding-top: 128px;
  padding-bottom: 108px;
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0, transparent 58px, #000 124px,
    #000 calc(100% - 104px), transparent calc(100% - 54px), transparent 100%);
          mask-image: linear-gradient(to bottom,
    transparent 0, transparent 58px, #000 124px,
    #000 calc(100% - 104px), transparent calc(100% - 54px), transparent 100%);
}

/* Bar overlay — header sus, footer jos */
.flow-bar {
  position: absolute; left: 0; right: 0;
  z-index: 3;
}
.flow-bar.top    { top: 0; }
.flow-bar.bottom { bottom: 0; }

/* Voalul — gradient bej-0 + backdrop-blur, mascat să se estompeze
   spre conținut. Top și bottom oglindesc gradient + mask. */
.flow-bar-veil {
  position: absolute; inset: 0;
  pointer-events: none;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.flow-bar.top .flow-bar-veil {
  background: linear-gradient(180deg,
    rgba(251,250,247,0.85) 0%, rgba(251,250,247,0.85) 46%, rgba(251,250,247,0) 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 46%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 46%, transparent 100%);
}
.flow-bar.bottom .flow-bar-veil {
  background: linear-gradient(0deg,
    rgba(251,250,247,0.85) 0%, rgba(251,250,247,0.85) 46%, rgba(251,250,247,0) 100%);
  -webkit-mask-image: linear-gradient(0deg, #000 46%, transparent 100%);
          mask-image: linear-gradient(0deg, #000 46%, transparent 100%);
}
/* Fallback fără backdrop-filter — voalul singur la 90% e încă citibil
   (background bej la 90% peste content); nu mai are blur dar nu se sparge */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .flow-bar-veil { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .flow-bar-veil { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .flow-bar.top .flow-bar-veil {
    background: linear-gradient(180deg,
      var(--c-bej-0) 0%, var(--c-bej-0) 46%, rgba(251,250,247,0) 100%);
  }
  .flow-bar.bottom .flow-bar-veil {
    background: linear-gradient(0deg,
      var(--c-bej-0) 0%, var(--c-bej-0) 46%, rgba(251,250,247,0) 100%);
  }
}

/* Rândul de header — 3 zone (back · titlu · meniu) */
.flow-header {
  position: relative;
  display: flex; align-items: center;
  padding: 2px 14px 12px;
}
.flow-header-left,
.flow-header-right { flex: 1; display: flex; }
.flow-header-left  { justify-content: flex-start; }
.flow-header-right { justify-content: flex-end; }
.flow-header-center { flex: 0 0 auto; }

/* Buton chrome pill — back & meniu. Fundal solid (bej-1) ca să rămână
   opac peste voal și peste conținut scrollat — niciodată translucent. */
.flow-bar-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-bej-1);
  color: var(--c-ink);
  border: none; cursor: pointer;
  transition: background .15s;
}
.flow-bar-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--c-bej-1), var(--c-ink) 8%);
}
.flow-bar-btn:disabled,
.flow-bar-btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

/* Titlu pas — buton transparent cu chevron, deschide steps sheet */
.flow-step-title {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--c-ink);
}

/* Rândul de footer — un singur CTA full-width */
.flow-footer {
  position: relative;
  padding: 12px 18px 16px;
}
.flow-footer > .btn { width: 100%; }

/* ── Sheets — scrim + sheet bottom, animate in ── */
.flow-sheet-scrim {
  position: absolute; inset: 0; z-index: 40;
  background: var(--c-backdrop);
  display: flex; flex-direction: column; justify-content: flex-end;
  animation: flowScrimIn .15s ease;
}
.flow-sheet-scrim[hidden] { display: none !important; }

.flow-sheet {
  background: var(--c-white);
  margin: 12px;
  border-radius: var(--r-xl);
  padding: 10px 18px 16px;
  animation: flowSheetUp .22s cubic-bezier(.2,.8,.2,1);
}
.flow-sheet.steps { padding: 10px 16px 14px; }

.flow-sheet-handle {
  width: 38px; height: 4px;
  background: var(--c-rule-card);
  border-radius: 2px;
  margin: 8px auto 6px;
}
.flow-sheet.steps .flow-sheet-handle { margin-bottom: 12px; }

/* Menu sheet — rânduri cu icon + label, divider între ele */
.flow-menu-row {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 6px;
  background: transparent; border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--c-ink);
  text-align: left;
  border-bottom: 1px solid var(--c-rule-soft);
}
.flow-menu-row:last-child { border-bottom: none; }
.flow-menu-row .flow-menu-ic { color: var(--c-fog); display: flex; flex-shrink: 0; }
.flow-menu-row.danger { color: var(--c-error); }
.flow-menu-row.danger .flow-menu-ic { color: var(--c-error); }
/* Spațiu între blocul de rânduri și un rând danger izolat */
.flow-menu-gap { height: 4px; }

/* Steps sheet — eyebrow + listă pași cu chip + label */
.flow-steps-label {
  padding: 0 6px 10px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--c-fog);
}
.flow-step-item {
  width: 100%;
  display: flex; align-items: center; gap: 13px;
  padding: 11px 8px;
  background: transparent; border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.flow-step-item.is-current { background: var(--c-pink-tint); }

.flow-step-chip {
  width: 24px; height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--c-bej-1);
  color: var(--c-fog);
}
.flow-step-item.is-done    .flow-step-chip,
.flow-step-item.is-current .flow-step-chip {
  background: var(--c-pink);
  color: #fff;
}

.flow-step-text {
  font-size: 15px; font-weight: 500;
  color: var(--c-fog);
}
.flow-step-item.is-done    .flow-step-text { color: var(--c-ink); }
.flow-step-item.is-current .flow-step-text { color: var(--c-pink-deep); font-weight: 600; }

@keyframes flowScrimIn {
  from { opacity: 0 } to { opacity: 1 }
}
@keyframes flowSheetUp {
  from { transform: translateY(20px); opacity: 0 }
  to   { transform: translateY(0);    opacity: 1 }
}
@media (prefers-reduced-motion: reduce) {
  .flow-sheet-scrim,
  .flow-sheet { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   MONEY INPUT — sumă hero (Inter 700 48px tabular) + selector monedă
   Organism custom adăugat în v6.1. Folosit pe facturare și
   ecrane cu input mare de sumă (one-field-per-screen).
   ═══════════════════════════════════════════════════════════════ */

/* Container row — input + selector aliniate */
.amount-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding-left: 16px;
}

/* Valoarea — extensie hero a familiei .tn (Inter 700 tabular) */
.amount-value {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 48px; line-height: 1; letter-spacing: -0.04em;
  color: var(--c-ink); font-variant-numeric: tabular-nums;
  white-space: nowrap; flex-shrink: 0;
  outline: none;
}
.amount-value .amount-dec { font-size: 0.44em; font-weight: 700; color: var(--c-mist); }
.amount-value.placeholder { color: var(--c-mist); }

/* Caret pentru starea activă — neutru, niciodată brand */
.amount-value.is-active { position: relative; }
.amount-value.is-active::after {
  content: ''; display: inline-block; width: 2px; height: 0.82em;
  margin-left: 4px; background: var(--c-ink); vertical-align: -0.04em;
  animation: amt-caret 1s step-end infinite;
}
@keyframes amt-caret { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

/* Stare eroare pe valoare */
.amount-field.is-error .amount-value,
.amount-field.is-error .amount-value .amount-dec { color: var(--c-error); }

/* Selector monedă — trigger pill cu drapel + cod + chevron */
.cur-select { position: relative; display: inline-flex; flex-shrink: 0; }
.cur-select-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px;
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-lg);
  font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 600;
  color: var(--c-ink); line-height: 1; cursor: pointer;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
}
.cur-select-trigger:hover { border-color: var(--c-fog); }
.cur-select-trigger:focus-visible,
.cur-select.open .cur-select-trigger {
  outline: none; border-color: var(--c-fog);
  box-shadow: 0 0 0 3px rgba(122, 117, 112, 0.14);
}
.cur-select-trigger .cur-code { display: inline-block; min-width: 36px; text-align: center; }
.cur-select-trigger .chev { color: var(--c-fog); transition: transform 160ms; flex-shrink: 0; }
.cur-select.open .cur-select-trigger .chev { transform: rotate(180deg); }
.cur-select-trigger.error {
  border-color: var(--c-error); background: var(--c-error-bg);
}
.cur-select-trigger.is-disabled {
  background: var(--c-bej-1); color: var(--c-mist);
  cursor: not-allowed; pointer-events: none;
}
.cur-select-trigger.is-disabled .chev { opacity: 0; }
.cur-select-trigger.static { cursor: default; }
.cur-select-trigger.static:hover { border-color: var(--c-rule-card); }

/* Drapelul — 20×20 circular */
.cur-flag {
  width: 20px; height: 20px; border-radius: 50%;
  overflow: hidden; display: inline-block; flex-shrink: 0;
}
.cur-flag svg { display: block; width: 100%; height: 100%; }

/* Dropdown menu — popover inline, NU modal */
.cur-select-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-lg);
  padding: 6px; min-width: 210px;
  box-shadow: var(--sh-popover);
  display: flex; flex-direction: column; gap: 2px;
}
.currency-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-md); cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 500;
  color: var(--c-ink);
  transition: background 120ms;
}
.currency-option:hover { background: var(--c-bej-0); }
.currency-option.selected { background: var(--c-bej-1); }
.currency-option .name { flex: 1; }
.currency-option .radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--c-rule-card); flex-shrink: 0; position: relative;
}
.currency-option.selected .radio { border-color: var(--c-accent); }
.currency-option.selected .radio::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--c-accent);
}

/* ═══════════════════════════════════════════════════════════════
   Signer — ecran de citire/semnare documente (Rex QES/SES)
   Six pieces: doc-list, doc-bar + pdf-switch, pdf-page (mobile/desktop),
   html-doc-view, doc-sheet, signer-layout (sidebar + doc column).

   Sub-14px fonts on .pdf-* and .doc-item.compact .doc-item-num are
   document-essential (Times typography for "official document feel"
   and 22×22 sidebar bubble). Whitelisted in the 14px-baseline rule.
   ═══════════════════════════════════════════════════════════════ */

/* — Doc list — */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; text-align: left; font-family: inherit; width: 100%;
}
.doc-item:hover { border-color: var(--c-fog); }
.doc-item-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.doc-item-num.unread  { background: var(--c-white); border: 1px solid var(--c-rule-card); color: var(--c-fog); }
.doc-item-num.read    { background: var(--c-read-bg); color: var(--c-read); }
.doc-item-num.current { background: var(--c-white); border: 1.5px solid var(--c-pink); color: var(--c-pink-deep); }
.doc-item-num.signed  { background: var(--c-success-bg); color: var(--c-success); }
.doc-item-body { flex: 1; min-width: 0; }
.doc-item-name {
  font-size: 14px; font-weight: 500; color: var(--c-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-item-meta { font-size: 14px; color: var(--c-fog); margin-top: 2px; }
.doc-item-meta.current { color: var(--c-pink-deep); }
.doc-item.current { background: var(--c-pink-tint); border-color: var(--c-pink); }
/* Compact density — for desktop sidebar */
.doc-item.compact {
  padding: 8px 10px; border-radius: var(--r-sm);
  background: transparent; border-color: transparent;
  gap: 10px; margin-bottom: 2px;
}
.doc-item.compact:hover { background: var(--c-bej-0); border-color: transparent; }
.doc-item.compact.current { background: var(--c-pink-tint); border-color: var(--c-pink); }
.doc-item.compact .doc-item-num { width: 22px; height: 22px; font-size: 10px; }
.doc-item.compact .doc-item-name { font-size: 14px; }
.doc-item.compact .doc-item-meta { font-size: 14px; }

/* — Doc bar + PDF switch — */
.doc-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px 8px 16px;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-rule-soft);
  flex-shrink: 0;
}
.doc-bar.desktop { padding: 10px 20px 10px 28px; }
.doc-bar-title {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: none; padding: 8px 4px;
  font-family: inherit; cursor: pointer; min-height: 44px;
  font-size: 16px; font-weight: 600; color: var(--c-ink);
  text-align: left;
}
.doc-bar-title.static { cursor: default; }
.doc-bar-title .doc-bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.doc-bar-title .doc-bar-chevron { flex-shrink: 0; color: var(--c-fog); transition: transform 140ms; }
.doc-bar-title:hover { color: var(--c-ink); }
.doc-bar-title:hover .doc-bar-chevron { color: var(--c-ink); }
.pdf-switch {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: none; padding: 10px 8px;
  font-family: inherit; cursor: pointer;
  min-height: 44px; min-width: 44px;
  font-size: 16px; font-weight: 500; color: var(--c-fog);
  flex-shrink: 0;
}
.pdf-switch .pdf-switch-label { user-select: none; }
.pdf-switch.on { color: var(--c-ink); }
.pdf-switch .switch { pointer-events: none; }

/* — PDF viewer — */
.pdf-page {
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  padding: 24px 18px;
  font-family: 'Times New Roman', serif;
  font-size: 10px; line-height: 1.55;
  color: var(--c-ink);
}
.pdf-page.desktop {
  width: 100%; max-width: 800px;
  padding: 56px 72px;
  font-size: 14px; line-height: 1.6;
  border-radius: var(--r-xl);
}
.pdf-page.desktop + .pdf-page.desktop { margin-top: 14px; }
.pdf-subtitle {
  text-align: center;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-fog);
  margin: 0 0 14px;
}
.pdf-page.desktop .pdf-subtitle { font-size: 12px; margin-bottom: 24px; }
.pdf-section { font-size: 10px; font-weight: 700; margin: 12px 0 4px; }
.pdf-page.desktop .pdf-section { font-size: 13px; margin: 18px 0 8px; }
.pdf-p { margin: 0 0 8px; text-align: justify; }
.pdf-page.desktop .pdf-p { margin: 0 0 12px; }
.pdf-hl { background: var(--c-pdf-hl); padding: 0 2px; }
.pdf-foot {
  text-align: center;
  font-size: 10px;
  color: var(--c-fog);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 18px; padding-top: 12px;
  border-top: 1px solid var(--c-rule-soft);
}
.pdf-page-sep {
  margin: 40px -72px;
  border-top: 2px solid var(--c-rule-card);
  border-bottom: 2px solid var(--c-rule-card);
  height: 18px;
  background: var(--c-bej-1);
}
.pdf-stack { display: flex; flex-direction: column; gap: 12px; }

/* — HTML doc view (mobile alternative) — */
.html-doc-eyebrow {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-fog);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.html-doc-eyebrow::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-pink);
}
.html-doc-intro { font-size: 14px; color: var(--c-ink); line-height: 1.65; margin: 0 0 18px; }
.html-doc-section {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--c-fog);
  margin: 18px 0 6px;
  padding-top: 12px;
  border-top: 1px solid var(--c-rule-soft);
}
.html-doc-section:first-of-type { border-top: none; padding-top: 0; margin-top: 16px; }
.html-doc-p { font-size: 14px; color: var(--c-ink); line-height: 1.65; margin: 0 0 14px; }
.html-doc-hl {
  background: var(--c-pink-tint);
  color: var(--c-pink-deep);
  padding: 1px 5px;
  border-radius: var(--r-xs);
  font-weight: 500;
}
.html-doc-meta {
  margin-top: 18px; padding-top: 12px;
  border-top: 1px solid var(--c-rule-soft);
  font-size: 14px; color: var(--c-fog);
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
}

/* — Doc sheet (bottom modal mobile) — */
.doc-sheet-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: var(--c-backdrop);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.doc-sheet-backdrop[hidden] { display: none !important; }
.doc-sheet {
  background: var(--c-bej-0);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px 18px 24px;
  max-height: 80%;
  display: flex; flex-direction: column;
}
.doc-sheet-handle {
  width: 40px; height: 4px;
  background: var(--c-rule-card);
  border-radius: 2px;
  margin: 8px auto 14px;
}
.doc-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.doc-sheet-title { font-size: 18px; font-weight: 600; color: var(--c-ink); }
.doc-sheet-list { overflow-y: auto; flex: 1; }
.doc-sheet-close {
  background: transparent; border: none; padding: 8px;
  color: var(--c-fog); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* — Signer layout (desktop composition) — */
.signer-layout {
  max-width: 1096px;
  margin: 0 auto;
  width: 100%;
  display: flex; gap: var(--sp-16);
  align-items: flex-start;
  padding: 24px 0 40px;
}
.signer-sidebar {
  width: 280px;
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-xl);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  align-self: flex-start;
  overflow: hidden;
}
.signer-sidebar.sticky { position: sticky; top: 24px; }
.signer-sidebar-header { padding: 18px 18px 14px; border-bottom: 1px solid var(--c-rule-soft); }
.signer-sidebar-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; color: var(--c-ink); }
.signer-sidebar-list { flex: 1; overflow-y: auto; padding: 10px; }
.signer-doc { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.signer-doc-bar {
  width: 100%; max-width: 800px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.signer-doc-title {
  font-size: 16px; font-weight: 600; color: var(--c-ink);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   Sidebar — componentă canonică
   Folosită ca chrome pe paginile DS și ca product sidebar pe Dublin.
   Tipografie aliniată la scala: .t12 (group labels) / .t14 (links).

   Variante:
   - .sidebar             — default 240px full (DS docs, Dublin full mode)
   - .sidebar.icon-only   — 64px icon-only (Dublin compact mode)

   Sub-elemente:
   - .sidebar-brand       — logo top + separator (non-clickabil)
   - .sidebar-grp         — eyebrow descriptor opțional, non-actionable (.t12)
   - .sidebar-section     — wrapper colapsabil (data-state open|closed)
   - .sidebar-trigger     — categorie-părinte expandabilă (.t14 + icon + caret)
   - .sidebar-section-list— lista de copii (.t14 inset, fără icon)
   - .sidebar a           — nav link (.t14 style) — suportă <svg> icon
   - .sidebar-footer      — footer optional (links secundare; icon-only → icon-buttons)

   Layout host:
   - .ds-shell wrap-uiește sidebar + main pe paginile DS docs.
   ═══════════════════════════════════════════════════════════════ */

.ds-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--c-bej-1);
  border-right: 1px solid var(--c-rule-soft);
  padding: 20px 12px 24px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0;
}

.sidebar-brand {
  display: block;
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--c-rule-soft);
  margin-bottom: 8px;
}
.sidebar-brand img { height: 22px; width: auto; display: block; }

/* Group label — .t12 styling */
.sidebar-grp {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--c-fog);
  padding: 0 8px; margin: 18px 0 6px;
  display: flex; align-items: center; gap: 6px;
}
/* Nav link — .t14 styling, cu icon support */
.sidebar a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--c-fog);
  border-radius: var(--r-sm);
  transition: background 120ms, color 120ms;
  text-decoration: none;
}
.sidebar a:hover { background: var(--c-rule-soft); color: var(--c-ink); }
.sidebar a.active { background: var(--c-pink-tint); color: var(--c-pink-deep); }
.sidebar a svg { flex-shrink: 0; opacity: 0.6; }
.sidebar a.active svg { opacity: 1; }

/* Footer — .t14 weight 400 + color mist pentru distincție */
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--c-rule-soft);
}
.sidebar-footer a {
  font-size: 14px; font-weight: 400;
  color: var(--c-mist);
  padding: 5px 10px;
  border-radius: var(--r-xs);
}
.sidebar-footer a:hover { color: var(--c-ink); background: transparent; }

/* Icon-only variant — 64px, doar iconuri, fără labels */
.sidebar.icon-only {
  width: 64px;
  padding: 16px 8px;
  align-items: center;
}
.sidebar.icon-only .sidebar-grp { display: none; }
.sidebar.icon-only .sidebar-brand {
  padding: 0 0 16px; margin-bottom: 12px;
  border-bottom: 1px solid var(--c-rule-soft);
  width: 100%; display: flex; justify-content: center;
}
.sidebar.icon-only .sidebar-brand img { height: 28px; }
.sidebar.icon-only a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  font-size: 0; /* hide text label */
}
.sidebar.icon-only a svg { opacity: 1; }

/* ───────────────────────────────────────────────────────────────
   Secțiuni colapsabile (model shadcn) — opt-in prin .sidebar-section.
   Categoria-părinte e un <button class="sidebar-trigger"> cu stil nav-link
   .t14 + icon + caret; lista de copii animă pe grid-template-rows (0fr↔1fr).
   Starea trăiește pe wrapper: data-state="open" | "closed".

   Convenții:
   - Icon DOAR pe categoria-părinte (.sidebar-trigger), nu pe copii.
   - Copiii (.sidebar-section-list a) = .t14 cu inset (aliniat sub label-ul părinte).
   - .sidebar-grp = eyebrow descriptor opțional, non-actionable.
   ─────────────────────────────────────────────────────────────── */
.sidebar-section { display: flex; flex-direction: column; }
.sidebar-section.is-end {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--c-rule-soft);
}

.sidebar-trigger {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--c-fog);
  background: none; border: 0;
  border-radius: var(--r-sm);
  cursor: pointer; text-align: left;
  -webkit-appearance: none; appearance: none;
  transition: background 120ms, color 120ms;
}
.sidebar-trigger:hover { background: var(--c-rule-soft); color: var(--c-ink); }
.sidebar-trigger:focus-visible { outline: 2px solid var(--c-pink); outline-offset: 1px; }
.sidebar-trigger svg:not(.sidebar-grp-caret) { flex-shrink: 0; opacity: 0.6; }

.sidebar-grp-caret {
  margin-left: auto; flex-shrink: 0;
  opacity: 0.5;
  transition: transform 200ms ease, opacity 120ms;
}
.sidebar-trigger:hover .sidebar-grp-caret { opacity: 0.85; }
.sidebar-section[data-state="closed"] .sidebar-grp-caret { transform: rotate(-90deg); }

.sidebar-section-list {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-section[data-state="closed"] .sidebar-section-list { grid-template-rows: 0fr; }
.sidebar-section-list > div {
  min-height: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sidebar-section-list a { padding-left: 34px; }

/* Icon-only: trigger devine icon-button; caret + copii ascunși */
.sidebar.icon-only .sidebar-grp-caret { display: none; }
.sidebar.icon-only .sidebar-section-list { display: none; }
.sidebar.icon-only .sidebar-trigger {
  width: 40px; height: 40px;
  justify-content: center;
  padding: 0; font-size: 0;
}
.sidebar.icon-only .sidebar-trigger svg:not(.sidebar-grp-caret) { opacity: 1; }

/* Footer în icon-only — link-urile devin icon-buttons 40×40 (icon obligatoriu în markup). */
.sidebar.icon-only .sidebar-footer {
  width: 100%; margin-top: auto;
  padding-top: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.sidebar.icon-only .sidebar-footer a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; font-size: 0;
}
.sidebar.icon-only .sidebar-footer a svg { opacity: 0.6; }

@media (prefers-reduced-motion: reduce) {
  .sidebar-section-list, .sidebar-grp-caret { transition: none; }
}

.ds-main {
  padding: 48px 56px 120px;
  max-width: 920px;
}
.ds-page-hd {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--c-rule-soft);
}
