/* semnara — sistemul de design (07.10.2026)
 *
 * Un singur fișier, servit de pe același domeniu (CSP: style-src 'self').
 * Reguli:
 *  - culorile, spațierile și razele vin DOAR din variabilele de mai jos;
 *  - albastrul-cerneală e culoarea de acțiune, verdele înseamnă doar „semnat";
 *  - clasele din CONTRACT.md §3 (.container .stack .cluster .grid .card .btn …)
 *    sunt interfața comună pentru toate zonele: nu le redenumi;
 *  - fără style="" în pagini (CSP îl aruncă) și fără animații infinite.
 *
 * Contrastele (WCAG 2.1 AA) au fost măsurate pe --bg și --surface, în ambele
 * teme; valorile sunt trecute lângă fiecare culoare de text.
 */

/* ------------------------------------------------------------------ fonturi */
/* Geist (OFL 1.1) și Bricolage Grotesque (OFL 1.1), subset latin + latin-ext
   (ă â î ș ț și literele maghiare din nume). Licențele: /fonts/LICENSE-*.txt */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2713;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-017F, U+0218-021B;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 500 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2713;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 500 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-017F, U+0218-021B;
}
/* Rezerva cu metrici apropiate, ca textul să nu sară când vine fontul (CLS). */
@font-face { font-family: "Geist Rezerva"; src: local("Arial"), local("Helvetica"); size-adjust: 103%; ascent-override: 92%; descent-override: 24%; }

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light;

  /* suprafețe */
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F2F1EC;

  /* text */
  --ink: #0F1729;          /* 17,1:1 pe --bg */
  --muted: #4B5468;        /* 7,3:1 */
  --subtle: #5F6779;       /* 5,6:1 — doar text secundar */

  /* linii */
  --line: #E3E1DA;         /* doar separatoare decorative */
  --line-strong: #8A90A0;  /* margini de câmpuri și butoane: 3,2:1 (1.4.11) */

  /* acțiune */
  --brand: #2A3FD1;        /* 7,1:1 pe alb; text alb pe el 7,7:1 */
  --brand-hover: #2234B0;
  --brand-soft: #ECEEFD;
  --brand-ink: #1F2FA3;    /* text pe --brand-soft: 8,6:1 */
  --on-brand: #FFFFFF;

  /* stări */
  --signed: #0A6E43;       /* 5,9:1 */
  --signed-soft: #E2F4EA;
  --pending: #8F5200;      /* 5,6:1 */
  --pending-soft: #FCF0DA;
  --danger: #B42318;       /* 6,2:1 */
  --danger-soft: #FDECEA;

  /* marca (nu se folosesc ca text pe fundal deschis) */
  --mark-ink: #0F1729;
  --mark-green: #14B86A;
  --inima: #E5484D;

  /* tipografie */
  --font: "Geist", "Geist Rezerva", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-titlu: "Bricolage Grotesque", "Geist", "Geist Rezerva", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --t-display: clamp(2.25rem, 1.6rem + 3.2vw, 4rem);
  --t-h1: clamp(1.75rem, 1.45rem + 1.5vw, 2.5rem);
  --t-h2: clamp(1.625rem, 1.3rem + 1.6vw, 2.5rem);
  --t-h1-app: 1.75rem;
  --t-h3: 1.25rem;
  --t-lg: 1.125rem;
  --t-body: 1rem;
  --t-sm: .875rem;
  --t-xs: .8125rem;

  /* spațiere (bază 4px) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-24: 96px;
  --sectiune: clamp(64px, 40px + 6vw, 112px);
  --gutter: 16px;

  /* raze */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-full: 999px;

  /* umbre (în dark: margini și suprafețe mai deschise, nu umbre) */
  --sh-1: 0 1px 2px rgba(15,23,41,.06);
  --sh-2: 0 1px 2px rgba(15,23,41,.06), 0 4px 12px -2px rgba(15,23,41,.08);
  --sh-3: 0 2px 4px rgba(15,23,41,.06), 0 16px 40px -12px rgba(15,23,41,.18);

  /* mișcare */
  --ease: cubic-bezier(.2,.8,.2,1);
  --t-rapid: 120ms;
  --t-mediu: 200ms;

  --inel: 0 0 0 4px var(--brand-soft);
  --atingere: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0A0E18;
    --surface: #111726;
    --surface-2: #182036;
    --ink: #E9ECF3;          /* 16,3:1 */
    --muted: #A6AEC0;        /* 8,7:1 */
    --subtle: #8891A6;       /* 5,9:1 */
    --line: #242C42;
    --line-strong: #69728A;  /* 3,7:1 */
    --brand: #8FA0FF;        /* 7,9:1 pe --bg */
    --brand-hover: #A9B6FF;
    --brand-soft: #1A2148;
    --brand-ink: #B9C4FF;
    --on-brand: #0A0E18;
    --signed: #4FD596;
    --signed-soft: #0F2A1E;
    --pending: #F2C46D;
    --pending-soft: #2B2112;
    --danger: #FF8A80;
    --danger-soft: #2E1513;
    --sh-1: none; --sh-2: none; --sh-3: none;
  }
}

/* ------------------------------------------------------------------ bază */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--t-body); line-height: 1.6;
  font-feature-settings: "ss01" off;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg, video, canvas, iframe { max-width: 100%; }
img, svg { vertical-align: middle; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
h1, h2 { font-family: var(--font-titlu); font-weight: 700; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding-left: 1.25em; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); }
strong, b { font-weight: 600; }
small { font-size: var(--t-sm); }
code, kbd, samp { font-family: var(--font-mono); font-size: .9em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
dl { margin: 0; }
dd { margin: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
::selection { background: var(--brand-soft); color: var(--ink); }

/* Focus: mereu vizibil, la tastatură. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: var(--inel); border-radius: var(--r-sm); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* „Sari la conținut" — vizibil doar la focus */
.sari {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); font-weight: 600; text-decoration: none;
}
.sari:focus-visible { top: var(--s-3); color: var(--bg); }

/* ------------------------------------------------------------------ layout */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.container-ingust { max-width: 760px; }
.container-text { max-width: 65ch; }
@media (min-width: 640px) { :root { --gutter: 32px; } }

.stack { display: flex; flex-direction: column; gap: var(--stack, var(--s-4)); }
.stack > * { margin: 0; }
.stack-sm { --stack: var(--s-2); }
.stack-lg { --stack: var(--s-8); }
.stack-xl { --stack: var(--s-12); }

.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster, var(--s-3)); }
.cluster-sm { --cluster: var(--s-2); }
.cluster-intre { justify-content: space-between; }
.cluster-sus { align-items: flex-start; }

.grid { display: grid; gap: var(--grid-gap, var(--s-5)); grid-template-columns: repeat(auto-fit, minmax(min(var(--grid-min, 260px), 100%), 1fr)); }
.grid-2 { --grid-min: 340px; }
.grid-3 { --grid-min: 240px; }
.grid-4 { --grid-min: 200px; }

.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.lead { font-size: var(--t-lg); color: var(--muted); max-width: 60ch; }
.mono { font-family: var(--font-mono); }
.cifre-tab { font-variant-numeric: tabular-nums; }
.centrat { text-align: center; }
.fara-wrap { white-space: nowrap; }
.min0 { min-width: 0; }
/* Randul de ajutor de sub eticheta unui radio/checkbox, pe linia lui. */
.d-block { display: block; font-weight: 400; }
.flex1 { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0 !important; }
.ascuns-mobil { }
@media (max-width: 767px) { .ascuns-mobil { display: none !important; } }
@media (min-width: 768px) { .doar-mobil { display: none !important; } }

/* ------------------------------------------------------------------ iconițe */
.ic { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ card */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--sh-1);
}
@media (min-width: 768px) { .card { padding: var(--s-6); } }
.card-plat { box-shadow: none; }
.card-2 { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card-accent { border-color: var(--brand); box-shadow: var(--sh-2); }
.card-atentie { border-color: var(--danger); }
.card-proaspat { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.card > :first-child { margin-top: 0; }

/* ------------------------------------------------------------------ butoane */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--atingere); padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color var(--t-rapid) var(--ease), border-color var(--t-rapid) var(--ease), color var(--t-rapid) var(--ease), transform var(--t-rapid) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
/* Pe telefon, un buton cu text lung („Trimite-i linkul către documentul semnat") se
   rupe pe două rânduri în loc să iasă din card și să facă pagina mai lată decât ecranul. */
@media (max-width: 479px) { .btn { max-width: 100%; white-space: normal; padding-block: 6px; } }

.btn:hover { color: var(--btn-fg); background: var(--btn-bg-hover, var(--surface-2)); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { border-radius: var(--r-md); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-line: var(--brand); --btn-bg-hover: var(--brand-hover); }
.btn-primary:hover { border-color: var(--brand-hover); }
.btn-secondary { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-line: var(--line-strong); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--brand); --btn-line: transparent; --btn-bg-hover: var(--brand-soft); }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #FFFFFF; --btn-line: var(--danger); --btn-bg-hover: color-mix(in srgb, var(--danger) 88%, #000); }
@media (prefers-color-scheme: dark) { .btn-danger { --btn-fg: #1A0B0A; } }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 17px; }
.btn-sm { padding: 0 14px; font-size: 14px; }
@media (pointer: fine) { .btn-sm { min-height: 36px; } }
.btn-block { display: flex; width: 100%; white-space: normal; }
.btn .ic { width: 18px; height: 18px; }
.btn[aria-busy="true"]::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: roteste .7s linear infinite;
}
@keyframes roteste { to { transform: rotate(360deg); } }
form.inline { display: inline; margin: 0; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; min-height: var(--atingere); }

/* ------------------------------------------------------------------ formulare */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { display: block; font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.label .optional { font-weight: 400; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 16px; /* sub 16px, iOS face zoom */
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color var(--t-rapid) var(--ease), box-shadow var(--t-rapid) var(--ease);
}
.textarea { min-height: 120px; line-height: 1.5; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible,
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); border-radius: var(--r-md); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input[type="file"] { padding: 10px; min-height: 52px; font-size: 15px; }
.input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: 12px; padding: 8px 14px; min-height: 36px;
  border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); cursor: pointer;
}
.input::placeholder, .textarea::placeholder { color: var(--subtle); opacity: 1; }
.hint { font-size: var(--t-sm); color: var(--muted); }
.error { font-size: var(--t-sm); color: var(--danger); font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.error .ic { width: 16px; height: 16px; margin-top: 3px; }

/* Câmp cu buton în interior (arată parola) */
.camp-cu-buton { position: relative; }
.camp-cu-buton .input { padding-right: 56px; }
.camp-cu-buton .ochi {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: var(--atingere); height: var(--atingere); border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; border-radius: var(--r-md); cursor: pointer;
}
.ochi svg { width: 20px; height: 20px; }
.ochi .taiat { display: none; }
.ochi[aria-pressed="true"] .intreg { display: none; }
.ochi[aria-pressed="true"] .taiat { display: block; }
.ochi:hover { color: var(--ink); }

/* Checkbox: căsuța de 24px, zona de atingere de 44px prin etichetă. */
.checkbox { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--atingere); padding: 10px 0; cursor: pointer; line-height: 1.5; }
.checkbox input[type="checkbox"], .checkbox input[type="radio"] {
  width: 24px; height: 24px; margin: 0; flex: 0 0 auto; accent-color: var(--brand); cursor: pointer;
}
.checkbox > span, .checkbox > label { flex: 1; }
.checkbox label { cursor: pointer; }

/* Capcană pentru roboți: scoasă din ecran, nu ascunsă cu display. */
.capcana { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ alerte */
.alert {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4); border-radius: var(--r-md); border: 1px solid transparent;
  background: var(--surface-2); color: var(--ink); line-height: 1.5;
}
.alert > .ic { margin-top: 2px; }
.alert a { color: inherit; font-weight: 600; }
.alert-info { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.alert-ok { background: var(--signed-soft); color: var(--signed); border-color: color-mix(in srgb, var(--signed) 25%, transparent); }
.alert-warn { background: var(--pending-soft); color: var(--pending); border-color: color-mix(in srgb, var(--pending) 25%, transparent); }
.alert-err { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert strong { display: block; }

/* ------------------------------------------------------------------ pastile */
.badge {
  --b-bg: var(--surface-2); --b-fg: var(--muted); --b-dot: var(--line-strong);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 10px 3px 8px; border-radius: var(--r-full);
  background: var(--b-bg); color: var(--b-fg);
  font-size: var(--t-xs); font-weight: 600; line-height: 1.5;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--b-dot); flex: 0 0 auto; }
.badge-ok { --b-bg: var(--signed-soft); --b-fg: var(--signed); --b-dot: var(--signed); }
.badge-warn { --b-bg: var(--pending-soft); --b-fg: var(--pending); --b-dot: var(--pending); }
.badge-info { --b-bg: var(--brand-soft); --b-fg: var(--brand-ink); --b-dot: var(--brand); }
.badge-err { --b-bg: var(--danger-soft); --b-fg: var(--danger); --b-dot: var(--danger); }
.badge-simplu::before { display: none; }
.badge-simplu { padding-left: 10px; }

/* ------------------------------------------------------------------ tabele */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table-wrap:focus-visible { border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table th { font-size: var(--t-xs); font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actiuni-celula { text-align: right; white-space: nowrap; }

/* Tabel care pe telefon devine o listă de carduri (fără scroll orizontal).
   Fiecare <td> are data-eticheta. */
@media (max-width: 899px) {
  .table-carduri { border: 0; background: transparent; overflow: visible; }
  .table-carduri .table, .table-carduri tbody, .table-carduri tr, .table-carduri td { display: block; width: 100%; }
  .table-carduri thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-carduri tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); box-shadow: var(--sh-1);
  }
  .table-carduri tbody tr:hover { background: var(--surface); }
  .table-carduri td { border: 0; padding: 4px 0; }
  .table-carduri td[data-eticheta]:not(.td-principal):not(.actiuni-celula)::before {
    content: attr(data-eticheta) " · "; color: var(--muted); font-size: var(--t-xs);
  }
  .table-carduri .actiuni-celula { text-align: left; white-space: normal; padding-top: var(--s-3); }
  .table-carduri .actiuni-celula .cluster { justify-content: flex-start; }
}

/* ------------------------------------------------------------------ pași */
.steps { display: flex; gap: var(--s-2); list-style: none; padding: 0; margin: 0; counter-reset: pas; }
.step {
  flex: 1 1 0; display: flex; align-items: center; gap: var(--s-2); min-width: 0;
  font-size: var(--t-sm); color: var(--muted); counter-increment: pas;
  padding-top: var(--s-2); border-top: 3px solid var(--line);
}
.step::before {
  content: counter(pas); width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--muted);
}
.step-activ { color: var(--ink); font-weight: 600; border-top-color: var(--brand); }
.step-activ::before { background: var(--brand); color: var(--on-brand); }
.step-gata { color: var(--signed); border-top-color: var(--signed); }
.step-gata::before { content: "✓"; background: var(--signed-soft); color: var(--signed); }
.step-titlu { min-width: 0; overflow-wrap: break-word; }
/* Pe ecran îngust, patru etichete nu încap: rămân cercurile, iar pasul activ își arată numele. */
@media (max-width: 599px) {
  .step:not(.step-activ) { flex: 0 0 auto; }
  .step:not(.step-activ) .step-titlu {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .step:not(.step-activ)::before { margin-right: var(--s-2); }
}
/* De la 600px, eticheta nu se rupe în mijlocul cuvântului („Confirmare|a"): pasul ia
   cât îi trebuie celui mai lung cuvânt, iar rândurile se rup doar la spații. */
@media (min-width: 600px) {
  .step { flex: 1 1 auto; min-width: min-content; }
  .step-titlu { overflow-wrap: normal; }
}

/* ------------------------------------------------------------------ logo */
.logo { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; min-height: var(--atingere); }
.logo:hover { color: var(--ink); }
.logo svg { height: 28px; width: auto; }
.logo-semn svg { height: 32px; }
.logo-mic svg { height: 22px; }

/* ------------------------------------------------------------------ antetul site-ului */
.antet {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.antet-in { display: flex; align-items: center; gap: var(--s-4); min-height: 64px; }
.antet-nav { display: none; gap: var(--s-1); margin-left: var(--s-6); }
.antet-nav a {
  display: inline-flex; align-items: center; min-height: var(--atingere); padding: 0 var(--s-3);
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; border-radius: var(--r-md);
}
.antet-nav a:hover { color: var(--ink); background: var(--surface-2); }
.antet-actiuni { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.antet-actiuni .btn-ghost { display: none; }
@media (min-width: 1080px) {
  .antet-nav { display: flex; }
  .antet-actiuni .btn-ghost { display: inline-flex; }
}

/* Meniul de pe telefon: <details> funcționează și fără JavaScript. */
.meniu-mobil { position: static; }
.meniu-mobil > summary {
  list-style: none; width: var(--atingere); height: var(--atingere); display: grid; place-items: center;
  border-radius: var(--r-md); border: 1px solid var(--line-strong); cursor: pointer; color: var(--ink); background: var(--surface);
}
.meniu-mobil > summary::-webkit-details-marker { display: none; }
.meniu-mobil > summary .ic-inchide { display: none; }
.meniu-mobil[open] > summary .ic-deschide { display: none; }
.meniu-mobil[open] > summary .ic-inchide { display: block; }
.meniu-panou {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sh-3);
  padding: var(--s-2) var(--gutter) var(--s-5);
}
.meniu-panou a:not(.btn) {
  display: flex; align-items: center; min-height: 56px; padding: 0 var(--s-2);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px;
  border-bottom: 1px solid var(--line);
}
.meniu-panou .cluster { margin-top: var(--s-4); }
.meniu-panou .btn { flex: 1 1 140px; }
@media (min-width: 1080px) { .meniu-mobil { display: none; } }
.antet-nav a, .antet-actiuni .btn { white-space: nowrap; }

/* ------------------------------------------------------------------ secțiuni site */
.sectiune { padding-block: var(--sectiune); }
.sectiune-2 { background: var(--surface-2); }
.sectiune-cap { max-width: 720px; margin-bottom: var(--s-10); }
.sectiune-cap h2 + p { margin-top: var(--s-4); }
.supratitlu { display: inline-block; font-size: var(--t-sm); font-weight: 600; color: var(--brand); margin-bottom: var(--s-3); letter-spacing: 0; }

.erou { padding-block: clamp(40px, 24px + 5vw, 96px) clamp(48px, 32px + 4vw, 88px); }
.erou-grila { display: grid; gap: var(--s-12); align-items: center; }
@media (min-width: 960px) { .erou-grila { grid-template-columns: 1.1fr .9fr; gap: var(--s-16); } }
.erou h1 { font-size: var(--t-display); line-height: 1.04; letter-spacing: -.03em; max-width: 16ch; }
.erou .lead { margin-top: var(--s-5); font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); }
.erou .cluster { margin-top: var(--s-8); }
.erou-nota { margin-top: var(--s-4); font-size: var(--t-sm); color: var(--muted); }

/* demo de semnat din erou */
.demo { max-width: 380px; margin-inline: auto; width: 100%; }
.demo-ecran { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-3); overflow: hidden; }
.demo-bara { display: flex; align-items: center; gap: var(--s-2); padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: var(--t-xs); color: var(--muted); }
.demo-bara .lacat { width: 14px; height: 14px; }
.demo-corp { padding: var(--s-5); }
.demo-de-la { font-size: var(--t-xs); color: var(--muted); }
.demo-titlu { font-weight: 600; margin-top: 2px; }
.demo-rand { height: 8px; border-radius: 4px; background: var(--surface-2); margin-top: 10px; }
.demo-rand.scurt { width: 60%; }
.demo-semnatura { margin-top: var(--s-5); }
.demo-semnatura .label { font-weight: 500; color: var(--muted); font-size: var(--t-xs); margin-bottom: 6px; }
#panza {
  width: 100%; height: 120px; display: block; border-radius: var(--r-md);
  border: 1px dashed var(--line-strong); background: #FFFFFF; touch-action: none; cursor: crosshair;
}
.demo-actiuni { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.demo-actiuni .btn { flex: 1; }
.demo-gata { text-align: center; padding: var(--s-6) var(--s-2); }
.demo-gata .bifa { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto var(--s-3); display: grid; place-items: center; background: var(--signed-soft); color: var(--signed); }
.demo-gata .bifa svg { width: 28px; height: 28px; }
.demo-nota { text-align: center; color: var(--muted); font-size: var(--t-sm); margin-top: var(--s-3); }

/* macheta tabloului */
.tablou { margin-top: var(--s-12); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-2); overflow: hidden; }
.tablou-cap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: var(--t-sm); color: var(--muted); }
.tablou-cifre { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .tablou-cifre { grid-template-columns: repeat(4, 1fr); } }
.tablou-cifre > div { padding: var(--s-4) var(--s-5); background: var(--surface); }
.tablou-cifre b { display: block; font-family: var(--font-titlu); font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tablou-cifre span { font-size: var(--t-xs); color: var(--muted); }
.tablou-cifre .ok b { color: var(--signed); }
.tablou-rand { display: flex; align-items: center; gap: var(--s-3); padding: 12px 20px; border-top: 1px solid var(--line); }
.tablou-rand:first-child { border-top: 0; }
.tablou-rand .badge { margin-left: auto; }

.initiale {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  background: var(--brand-soft); color: var(--brand-ink);
}
.initiale-mare { width: 56px; height: 56px; font-size: 18px; }
.nume-rand { font-weight: 600; line-height: 1.3; }
.sub-rand { font-size: var(--t-xs); color: var(--muted); }

/* dovada */
.dovada { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.dovada-cifra b { display: block; font-family: var(--font-titlu); font-size: clamp(2.5rem, 2rem + 2.5vw, 3.75rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dovada-cifra span { display: block; margin-top: var(--s-2); color: var(--muted); max-width: 28ch; }

/* pași „cum funcționează" */
.pasi { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); counter-reset: pas; }
.pasi > li { counter-increment: pas; }
.pasi > li::before {
  content: counter(pas); display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md);
  background: var(--ink); color: var(--bg); font-weight: 700; margin-bottom: var(--s-4);
}
.pasi h3 { margin-bottom: var(--s-2); }
.pasi p { color: var(--muted); }

.punct-cheie { display: flex; gap: var(--s-3); align-items: flex-start; }
.punct-cheie .ic-cutie { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); flex: 0 0 auto; }
.punct-cheie h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.punct-cheie p { color: var(--muted); font-size: 15px; }

.bifate { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bifate li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.bifate li::before {
  content: ""; width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px;
  background: var(--signed);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.liniute { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.liniute li { padding-left: 20px; position: relative; }
.liniute li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }

/* simplă vs calificată */
.comparatie { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.comparatie .card h3 { margin: var(--s-3) 0 var(--s-3); }
.comparatie .card p + p { margin-top: var(--s-3); }
.comparatie .card p { color: var(--muted); }
.comparatie .card strong { color: var(--ink); }

/* ------------------------------------------------------------------ prețuri */
.perioada {
  display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--line); margin-bottom: var(--s-8);
}
.perioada input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.perioada label {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--atingere); padding: 0 18px;
  border-radius: var(--r-full); font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer;
}
.perioada label .economie { font-size: var(--t-xs); font-weight: 600; color: var(--signed); background: var(--signed-soft); padding: 2px 8px; border-radius: var(--r-full); }
.perioada input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); border: 1px solid var(--line); }
.perioada input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }

.planuri { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); }
@media (min-width: 768px) { .plan { padding: var(--s-8) var(--s-6); } }
.plan-evidentiat { border: 2px solid var(--brand); box-shadow: var(--sh-3); }
.plan-eticheta { position: absolute; top: -13px; left: var(--s-6); background: var(--brand); color: var(--on-brand); font-size: var(--t-xs); font-weight: 600; padding: 3px 10px; border-radius: var(--r-full); }
.plan h3 { font-family: var(--font-titlu); font-size: 1.375rem; font-weight: 700; }
.plan-pentru { color: var(--muted); font-size: 15px; min-height: 3em; }
.plan-pret { font-family: var(--font-titlu); font-size: 2.75rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-pret small { font-family: var(--font); font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-sub { font-size: var(--t-sm); color: var(--muted); min-height: 2.6em; }
.plan-sub { min-height: 3.2em; }
.plan .bifate { font-size: 15px; }
.plan-gratuit { background: var(--surface-2); border-style: dashed; border-color: var(--line-strong); }
/* comutatorul lunar/anual, fără JavaScript */
.preturi .p-anual { display: none; }
.preturi:has(#perioada-anual:checked) .p-anual { display: revert; }
.preturi:has(#perioada-anual:checked) .p-lunar { display: none; }
.preturi .btn.p-anual { display: none; }
.preturi:has(#perioada-anual:checked) .btn.p-anual { display: inline-flex; }
.la-masura { margin-top: var(--s-5); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-6); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.la-masura h3 { margin-bottom: 4px; }
.preturi-nota { margin-top: var(--s-6); color: var(--muted); font-size: var(--t-sm); max-width: 70ch; }

/* ------------------------------------------------------------------ întrebări */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 60px; padding: var(--s-3) 0; font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: 0 0 auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform var(--t-mediu) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details > div { padding: 0 0 var(--s-5); color: var(--muted); max-width: 65ch; }
.faq details > div p + p { margin-top: var(--s-3); }

/* CTA final */
.cta-final { background: var(--mark-ink); color: #E9ECF3; border-radius: var(--r-xl); padding: clamp(32px, 20px + 4vw, 64px); display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .cta-final { grid-template-columns: 1.4fr 1fr; align-items: center; } }
.cta-final h2 { color: #FFFFFF; }
.cta-final p { color: #B9C0D0; margin-top: var(--s-3); }
.cta-final .btn-primary { --btn-bg: #FFFFFF; --btn-fg: #0F1729; --btn-line: #FFFFFF; --btn-bg-hover: #E9ECF3; }
.cta-final .btn-secondary { --btn-bg: transparent; --btn-fg: #FFFFFF; --btn-line: #69728A; --btn-bg-hover: #182036; }
.cta-final :focus-visible { outline-color: #FFFFFF; }

/* ------------------------------------------------------------------ subsol */
.subsol { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: var(--t-sm); }
.subsol .logo { color: var(--ink); }
.subsol a { color: var(--muted); text-decoration: none; }
.subsol a:hover { color: var(--ink); text-decoration: underline; }
.subsol-grila { display: grid; gap: var(--s-8); padding-block: var(--s-12) var(--s-8); grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.subsol-grila h2 { font-family: var(--font); font-size: var(--t-sm); font-weight: 600; color: var(--ink); letter-spacing: 0; margin-bottom: var(--s-3); }
.subsol-grila ul { list-style: none; padding: 0; display: grid; gap: 2px; }
.subsol-grila li a { display: inline-flex; align-items: center; min-height: 32px; }
.subsol-marca p { margin-top: var(--s-3); max-width: 32ch; }
.subsol-firma { font-style: normal; line-height: 1.7; }
.subsol-jos { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; justify-content: space-between; padding-block: var(--s-5); border-top: 1px solid var(--line); }
.subsol-jos .cluster { --cluster: var(--s-1) var(--s-4); }
.subsol-jos a { display: inline-flex; align-items: center; min-height: var(--atingere); }
.subsol-scurt { margin-top: var(--s-12); background: transparent; }
.subsol-scurt .subsol-jos { border-top: 0; justify-content: center; text-align: center; }
.credit { display: inline-flex; align-items: center; gap: .3em; }
.credit .inima { width: 14px; height: 14px; fill: var(--inima); stroke: none; }

/* ------------------------------------------------------------------ aplicația (operator) */
.app { min-height: 100vh; min-height: 100dvh; }
@media (min-width: 960px) { .app { display: grid; grid-template-columns: 248px minmax(0, 1fr); } }

.app-lateral { display: none; }
@media (min-width: 960px) {
  .app-lateral {
    display: flex; flex-direction: column; gap: var(--s-5);
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
    padding: var(--s-5) var(--s-4); background: var(--surface); border-right: 1px solid var(--line);
  }
}
.app-org { padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); }
.app-org b { display: block; font-size: var(--t-sm); line-height: 1.35; }
.app-org span { font-size: var(--t-xs); color: var(--muted); }
.app-nav { display: grid; gap: 2px; }
.app-nav-titlu { font-size: var(--t-xs); font-weight: 600; color: var(--subtle); padding: var(--s-4) var(--s-3) var(--s-1); }
.app-nav a {
  display: flex; align-items: center; gap: var(--s-3); min-height: var(--atingere); padding: 0 var(--s-3);
  border-radius: var(--r-md); color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px;
}
.app-nav a:hover { background: var(--surface-2); color: var(--ink); }
.app-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.app-utilizator { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--line); display: grid; gap: var(--s-2); }
.app-utilizator .cine { font-size: var(--t-sm); line-height: 1.35; }
.app-utilizator .cine span { display: block; color: var(--muted); font-size: var(--t-xs); overflow-wrap: anywhere; }

.app-sus {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-3);
  min-height: 56px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.app-sus .titlu { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sus .org { font-size: var(--t-xs); color: var(--muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 960px) { .app-sus { display: none; } }

.app-principal { min-width: 0; display: flex; flex-direction: column; }
.app-continut { width: 100%; max-width: 1120px; margin: 0 auto; padding: var(--s-6) var(--gutter) var(--s-12); flex: 1; }
@media (min-width: 960px) { .app-continut { padding: var(--s-10) var(--s-10) var(--s-16); } }
@media (max-width: 959px) { .app-principal { padding-bottom: calc(68px + env(safe-area-inset-bottom)); } }

/* bara de jos, pe telefon */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 960px) { .tab-bar { display: none; } }
.tab-bar > a, .tab-bar > details > summary {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; cursor: pointer;
  list-style: none;
}
.tab-bar > details > summary::-webkit-details-marker { display: none; }
.tab-bar .ic { width: 22px; height: 22px; }
.tab-bar a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.tab-bar .tab-principal .ic-cerc { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); margin-top: -4px; }
.tab-bar .tab-principal .ic-cerc .ic { width: 20px; height: 20px; }
.tab-mai-mult { position: static; }
.tab-mai-mult[open] > summary { color: var(--ink); }
/* Foaia „Mai mult" (Echipa, Contul meu, Ieși din cont) se deschide peste bannerul de cookie
   (z-index 50), nu sub el: altfel, până la „Am înțeles", meniul era acoperit. */
.tab-bar:has(.tab-mai-mult[open]) { z-index: 60; }
.tab-foaie {
  position: fixed; left: var(--s-2); right: var(--s-2); bottom: calc(72px + env(safe-area-inset-bottom));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  padding: var(--s-2); display: grid; gap: 2px; z-index: 26;
}
.tab-foaie a, .tab-foaie button {
  display: flex; align-items: center; gap: var(--s-3); min-height: 52px; padding: 0 var(--s-4); width: 100%;
  border-radius: var(--r-md); border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left;
}
.tab-foaie a:hover, .tab-foaie button:hover { background: var(--surface-2); }
.tab-foaie .org { padding: var(--s-3) var(--s-4); font-size: var(--t-sm); color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: var(--s-1); }
.tab-foaie form { margin: 0; }

/* cap de pagină în aplicație */
.cap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); }
.cap h1 { font-size: var(--t-h1-app); letter-spacing: -.02em; }
.cap p { margin-top: var(--s-1); }
.inapoi { display: inline-flex; align-items: center; gap: 6px; min-height: var(--atingere); color: var(--muted); text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.inapoi:hover { color: var(--ink); }
.app-continut h2 { font-family: var(--font); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; margin: var(--s-10) 0 var(--s-3); }

/* cifrele din panou */
.cifre { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.cifra { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 2px; }
.cifra b { font-family: var(--font-titlu); font-size: 2rem; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cifra span { color: var(--muted); font-size: var(--t-sm); line-height: 1.4; }
.cifra a { font-size: var(--t-sm); font-weight: 500; margin-top: var(--s-1); min-height: 32px; display: inline-flex; align-items: center; }
.cifra-ok b { color: var(--signed); }
.progres { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; margin: var(--s-2) 0 2px; }
.progres > i { display: block; height: 100%; background: var(--signed); border-radius: var(--r-full); }
progress.progres { appearance: none; -webkit-appearance: none; width: 100%; border: 0; }
progress.progres::-webkit-progress-bar { background: var(--surface-2); border-radius: var(--r-full); }
progress.progres::-webkit-progress-value { background: var(--signed); border-radius: var(--r-full); }
progress.progres::-moz-progress-bar { background: var(--signed); border-radius: var(--r-full); }

/* căutare și filtre */
.cautare { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); }
.cautare .input { flex: 1 1 160px; min-width: 0; }
.filtre { display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-1); margin-bottom: var(--s-5); scrollbar-width: thin; }
.filtru {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; white-space: nowrap; flex: 0 0 auto;
  border-radius: var(--r-full); border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font-size: var(--t-sm); font-weight: 500; text-decoration: none;
}
.filtru:hover { color: var(--ink); background: var(--surface-2); }
.filtru b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.filtru[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filtru[aria-current="page"] b { color: inherit; opacity: .8; }

/* listă de date (cheie: valoare) */
.date-lista > div { display: flex; justify-content: space-between; gap: var(--s-5); padding: 10px 0; border-bottom: 1px solid var(--line); }
.date-lista > div:last-child { border-bottom: 0; }
.date-lista dt { color: var(--muted); font-size: var(--t-sm); flex: 0 0 auto; }
.date-lista dd { text-align: right; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* jurnal */
.jurnal { list-style: none; padding: 0; margin: 0; }
.jurnal li { display: flex; gap: var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--line); }
.jurnal li:last-child { border-bottom: 0; }
.jurnal .punct { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex: 0 0 auto; }
.jurnal .punct-ok { background: var(--signed); }
.jurnal .cand { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

/* linkul proaspăt emis */
.link-text {
  font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; word-break: break-all;
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
}

/* vizualizatorul PDF: pe ecrane mici, iframe-ul cu PDF nu merge (Android) */
.vizor { width: 100%; height: min(78vh, 860px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: none; }
.vizor-link { display: inline-flex; }
@media (min-width: 900px) { .vizor { display: block; } .vizor-link { display: none; } }

details.dezvaluie > summary { cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--atingere); font-weight: 600; color: var(--ink); }
details.dezvaluie > summary.mic { font-weight: 500; color: var(--muted); font-size: var(--t-sm); }

.gol { text-align: center; padding: var(--s-12) var(--s-5); }
.gol .ic-cutie { width: 56px; height: 56px; border-radius: var(--r-lg); margin: 0 auto var(--s-4); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.gol h2, .gol h3 { font-family: var(--font-titlu); font-size: 1.25rem; margin: 0 0 var(--s-2); }
.gol p { color: var(--muted); max-width: 46ch; margin-inline: auto; }
.gol .cluster { justify-content: center; margin-top: var(--s-5); }

/* paginare */
.paginare { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-6); font-size: var(--t-sm); color: var(--muted); }
.paginare .cluster { gap: var(--s-2); }

/* ------------------------------------------------------------------ intrare (login, cont) */
.intrare { min-height: 100vh; min-height: 100dvh; display: grid; }
@media (min-width: 960px) { .intrare { grid-template-columns: minmax(380px, 5fr) 7fr; } }
.vitrina {
  background: var(--mark-ink); color: #E9ECF3; padding: var(--s-5) var(--gutter);
  display: flex; flex-direction: column; gap: var(--s-4);
}
.vitrina .logo { color: #FFFFFF; }
.vitrina .slogan { font-family: var(--font-titlu); font-weight: 700; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.02em; color: #FFFFFF; }
.vitrina p { color: #B9C0D0; }
.vitrina .detalii { display: none; }
.vitrina ul { list-style: none; padding: 0; display: grid; gap: var(--s-3); color: #C9CFDC; font-size: var(--t-sm); }
.vitrina li { display: flex; gap: var(--s-3); align-items: center; }
.vitrina li .ic { color: var(--mark-green); }
.semnatura-anim { width: 100%; max-width: 320px; }
.semnatura-anim path { stroke: #8FE3B5; stroke-dasharray: 900; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .semnatura-anim path { stroke-dashoffset: 900; animation: scrie 2.2s var(--ease) .3s forwards; }
}
@keyframes scrie { to { stroke-dashoffset: 0; } }
.semnatura-anim line { stroke: #2C3650; }
.semnatura-anim text { fill: #8891A6; font-family: var(--font-mono); }
@media (min-width: 960px) {
  .vitrina { padding: var(--s-10) var(--s-12); gap: var(--s-8); justify-content: space-between; }
  .vitrina .slogan { font-size: clamp(2rem, 1.2rem + 1.6vw, 2.75rem); line-height: 1.08; max-width: 14ch; }
  .vitrina .detalii { display: grid; gap: var(--s-6); }
}
.zona { display: flex; flex-direction: column; align-items: center; padding: var(--s-8) var(--gutter) var(--s-6); }
@media (min-width: 960px) { .zona { justify-content: center; padding: var(--s-12) var(--s-10); } }
.cutie { width: 100%; max-width: 440px; }
.cutie h1 { font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); }
.cutie .lead { margin-top: var(--s-2); font-size: 1rem; }
.cutie form { margin-top: var(--s-8); }
.cutie form > .field + .field, .cutie form > .field + .checkbox { margin-top: var(--s-4); }
.cutie .btn-block { margin-top: var(--s-6); }
.cutie .josul { margin-top: var(--s-6); text-align: center; color: var(--muted); font-size: var(--t-sm); }
.zona .subsol-scurt { margin-top: auto; padding-top: var(--s-8); width: 100%; border-top: 0; }
.caps { display: none; color: var(--pending); font-size: var(--t-sm); font-weight: 600; }
.caps.se-vede { display: block; }

.putere { margin-top: var(--s-2); }
.putere .bare { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.putere .bare i { height: 4px; border-radius: 2px; background: var(--line); }
.putere[data-nivel="1"] .bare i:nth-child(-n+1) { background: var(--danger); }
.putere[data-nivel="2"] .bare i:nth-child(-n+2) { background: var(--pending); }
.putere[data-nivel="3"] .bare i:nth-child(-n+3) { background: var(--signed); }
.putere[data-nivel="4"] .bare i { background: var(--signed); }
.putere .vorbe { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: 6px; font-size: var(--t-sm); color: var(--muted); }
.putere[data-nivel="1"] .nota { color: var(--danger); }
.putere[data-nivel="2"] .nota { color: var(--pending); }
.putere[data-nivel="3"] .nota, .putere[data-nivel="4"] .nota { color: var(--signed); }
.potrivire { font-size: var(--t-sm); font-weight: 600; min-height: 1.5em; }
.potrivire[data-stare="da"] { color: var(--signed); }
.potrivire[data-stare="nu"] { color: var(--danger); }

/* ------------------------------------------------------------------ paginile de semnare (/d/…) */
.semn-antet { border-bottom: 1px solid var(--line); background: var(--surface); }
.semn-antet .container { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; max-width: 640px; }
.semn-antet .prin { margin-left: auto; font-size: var(--t-xs); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.semn-pagina { max-width: 640px; margin: 0 auto; padding: var(--s-6) var(--gutter) var(--s-10); }
.semn-pagina h1 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
.semn-de-la { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--t-sm); }
.semn-de-la .initiale { width: 32px; height: 32px; font-size: 12px; }
.pad {
  width: 100%; height: 200px; display: block; border-radius: var(--r-md);
  border: 1.5px dashed var(--line-strong); background: #FFFFFF; touch-action: none; cursor: crosshair;
}
.pad:focus-visible { border-style: solid; border-color: var(--brand); }
.semn-actiune { padding-bottom: env(safe-area-inset-bottom); }
.mesaj-final { text-align: center; }
.mesaj-final .bifa { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--s-4); background: var(--signed-soft); color: var(--signed); }
.mesaj-final .bifa svg { width: 32px; height: 32px; }

/* ------------------------------------------------------------------ compatibilitate
   Paginile legale vechi (seolegal le rescrie) folosesc .wrap/.ingust/.intro. */
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.ingust { max-width: 760px; }
main > section:not([class]) { padding-block: var(--s-12); }
main > section:not([class]) h2 { margin-bottom: var(--s-4); }
main > section:not([class]) h3 { margin: var(--s-8) 0 var(--s-2); }
.intro { color: var(--muted); max-width: 65ch; margin-bottom: var(--s-4); }

/* ------------------------------------------------------------------ mișcare redusă */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ tipărire */
@media print {
  .antet, .subsol, .app-lateral, .app-sus, .tab-bar, .btn, .sari { display: none !important; }
  body { background: #FFFFFF; color: #000000; }
}

/* sprite-ul de iconițe: prezent în pagină, dar nedesenat */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-continut > .alert { margin-bottom: var(--s-6); }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-5 { margin-bottom: var(--s-5); }
.h3-ca { font-family: var(--font); font-size: var(--t-h3); font-weight: 600; letter-spacing: -.01em; }
/* bara laterală vizuală pe toată înălțimea paginii, nu doar cât ecranul */
@media (min-width: 960px) { .app { background: linear-gradient(to right, var(--surface) 247px, var(--line) 247px 248px, transparent 248px); } .app-lateral { border-right: 0; background: transparent; } }
.actiuni-celula .cluster { justify-content: flex-end; flex-wrap: nowrap; }
a.nume-rand { color: var(--ink); text-decoration: none; }
a.nume-rand:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 899px) { .table-carduri .actiuni-celula .cluster { justify-content: flex-start; flex-wrap: wrap; } .table-carduri .actiuni-celula:empty, .table-carduri .actiuni-celula:not(:has(*)) { display: none; } }
/* semnul are fundal închis: pe fundal închis primește un contur discret */
.vitrina .logo svg > rect, .cta-final .logo svg > rect { stroke: rgba(255,255,255,.22); stroke-width: 2; }
@media (prefers-color-scheme: dark) { .logo svg > rect { stroke: rgba(255,255,255,.22); stroke-width: 2; } }
@media (min-width: 960px) { .zona .cutie { margin-block: auto; } .zona .subsol-scurt { margin-top: 0; } }
.td-principal .cluster { flex-wrap: nowrap; } .td-principal { min-width: 200px; }
@media (max-width: 899px) { .table-carduri td.num { text-align: left; } }
.stack > .badge, .stack > form.inline { align-self: flex-start; }
.card.stack { --stack: var(--s-5); }

/* ---------- Integrare (07.10.2026) ---------- */
/* Bannerul de cookie (zona seolegal, parti/cookie): fix jos, fara sa acopere
   bara de jos a aplicatiei pe telefon. */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 40rem; margin-inline: auto; }
.cookie-bar[hidden] { display: none; }
/* Paginile de semnare: bannerul stă în flux, deasupra subsolului, nu peste semnătură. */
.cookie-bar.cookie-bar-flux { position: static; margin: var(--s-6) auto 0; padding-inline: var(--gutter, 16px); }
@media (max-width: 959px) { body:has(.tab-bar) .cookie-bar { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: no-preference) { .cookie-bar { transition: opacity .2s; } }
/* „Pe scurt” de pe pagina principala (zona seolegal, parti/pe-scurt). */
.pe-scurt { padding-block: clamp(40px, 6vw, 72px); }
.pe-scurt dt { margin-bottom: 4px; }
.pe-scurt dd { margin: 0; color: var(--muted); }
/* Codul QR de pe ecranul de configurare MFA (zona nucleu). Fundal alb si in tema
   intunecata: aplicatiile de autentificare citesc mai sigur QR-ul inchis pe alb. */
.qr-mfa { width: 200px; max-width: 100%; margin: 12px 0; padding: 8px; background: #fff; border-radius: var(--r-lg); }
.qr-mfa svg { display: block; width: 100%; height: auto; }

/* ---------- Panoul de administrare (zona admin, 08.10.2026) ---------- */
/* Textul unui e-mail primit: input neîncredere, afișat escapat, ca text simplu. */
.text-mesaj { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--t-sm); line-height: 1.6; max-height: 70vh; overflow-y: auto; }
/* Numărul de lucruri noi lângă un link din meniul panoului. */
.app-nav a .badge { margin-left: auto; }
