/* ==========================================================================
   CRM leaduri · European Food Internațional (export) — sistem vizual v2 „mai colorat”
   Un singur fișier. Se poate lipi întreg în blocul <style> din șablonul de bază.
   Fără resurse externe. Fontul Inter (OFL) e livrat local în fonts/.
   Tema deschisă = :root. Tema întunecată = [data-theme="dark"] pe <html>.

   Paleta v2:
   – VERDE-PĂDURE (brand, spre turcoaz): derivat din verdele companiei #0B8843 / #63B24F
     (europeanfoodinternational.ro), împins spre albastru ca să nu se confunde cu „Aprobă”.
   – VERDE CLAR (Aprobă, pozitiv): #15803D, galben-verzui, folosit DOAR pentru aprobare și succes.
   – PETROL (structură): butonul principal, linkuri, etapele „în desfășurare”.
   – MIERE (cald): bulina, pagina curentă, etapele „așteaptă un om”, ciornele.
   – CORAI (cald): accente, atenționări, întârzieri.
   ========================================================================== */

@font-face {
  font-family: "Inter CRM";
  src: url("fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  /* latin, latin-ext (ș ț ă î â ő ű č ľ ž), chirilic (bg), grecesc */
}

:root {
  /* ---------- Brand: verde-pădure ---------- */
  --c-brand-ink: #0A5A45;      /* bara de sus (alb pe ea: 8,2:1) */
  --c-brand-ink-2: #0D6B53;    /* hover în bară */
  --c-brand-deep: #0F4D3D;     /* coada laterală, cuprins (text #E6F2EC: 8,5:1) */
  --c-brand-leaf: #63B24F;     /* verdele frunzei din logo: ilustrații, puncte, nu text */
  --c-brand-soft: #E3F1EA;     /* fundal selecție, banner */
  --c-brand-mist: #F0F7F3;

  /* ---------- Petrol: structură ---------- */
  --c-brand: #0E5A73;          /* buton principal (alb: 7,7:1) */
  --c-brand-hover: #0A4659;
  --c-link: #0E6680;           /* linkuri (6,5:1 pe alb, 6,1:1 pe fundalul cald) */
  --c-link-hover: #0A4659;
  --c-petrol-soft: #DDF0F6;

  /* ---------- Accente calde ---------- */
  --c-honey: #F2B33D;          /* indicator pagină curentă, forme decorative */
  --c-honey-soft: #FFF1C9;
  --c-honey-ink: #6B4500;
  --c-coral: #E8664A;          /* forme decorative, întârzieri */
  --c-coral-soft: #FFE4DA;
  --c-coral-ink: #9A3412;
  --c-brand-glint: var(--c-honey);

  /* ---------- Neutre (calde) ---------- */
  --c-bg: #FAF7F0;             /* fundal pagină: alb-crem */
  --c-surface: #FFFFFF;
  --c-surface-2: #FCFAF5;      /* antet tabel, zone secundare */
  --c-surface-3: #F4F0E6;      /* câmpuri doar-citire, traducere */
  --c-border: #E8E2D6;
  --c-border-strong: #C9C1B1;
  --c-text: #1C1F24;
  --c-text-2: #474C55;
  --c-text-3: #5E6472;         /* 5,9:1 pe alb, 5,5:1 pe fundal */
  --c-on-dark: #FFFFFF;
  --c-on-dark-2: #CFE8DC;

  /* ---------- Stări semantice ---------- */
  --c-ok: #15803D;             /* Aprobă (alb: 5,0:1), confirmare */
  --c-ok-hover: #166534;
  --c-ok-soft: #E4F6E3;
  --c-ok-border: #A8DBA8;
  --c-warn: #9A3412;           /* atenționare (corai închis) */
  --c-warn-strong: #EA6A2E;
  --c-warn-soft: #FFEDD5;
  --c-warn-border: #F9C59A;
  --c-danger: #B42318;
  --c-danger-hover: #8F1C13;
  --c-danger-soft: #FDECEA;
  --c-danger-border: #F0B4AE;
  --c-info: #0B4A5E;
  --c-info-soft: #DDF0F6;
  --c-info-border: #A9D6E5;

  /* ---------- Grupele de etape: pastile saturate + iconiță ---------- */
  /* în desfășurare: Lead nou, Verificat, Trimis, Ofertă trimisă — PETROL */
  --st-progress-fg: #0B4A5E;  --st-progress-bg: #D3ECF4;  --st-progress-dot: #1C7C9C;  --st-progress-bd: #A9D6E5;
  /* așteaptă un om: Email pregătit, Aprobat - de trimis — MIERE */
  --st-wait-fg: #6B4500;      --st-wait-bg: #FFE7A8;      --st-wait-dot: #D99100;      --st-wait-bd: #F5CF6B;
  /* pozitiv: A răspuns, Interesat, Client — VERDE CLAR */
  --st-pos-fg: #145A1F;       --st-pos-bg: #CDEFC8;       --st-pos-dot: #2E9A3E;       --st-pos-bd: #9ED69A;
  /* închis, stins: Pierdut, Invalid, Nu contacta — GRI */
  --st-closed-fg: #4B4F58;    --st-closed-bg: #E4E4E7;    --st-closed-dot: #8A8F99;    --st-closed-bd: #D0D1D6;

  /* ---------- Stările emailului (+ banda de pe marginea cardului) ---------- */
  --em-draft-fg: var(--st-wait-fg);   --em-draft-bg: var(--st-wait-bg);   --em-draft-bar: #E8A317;
  --em-approved-fg: #0B4A5E;          --em-approved-bg: #D3ECF4;          --em-approved-bar: #1C7C9C;
  --em-sent-fg: #145A1F;              --em-sent-bg: #CDEFC8;              --em-sent-bar: #2E9A3E;
  --em-rejected-fg: #9A3412;          --em-rejected-bg: #FFE4DA;          --em-rejected-bar: #E8664A;
  --em-cancelled-fg: #4B4F58;         --em-cancelled-bg: #E4E4E7;         --em-cancelled-bar: #A3A7B0;
  --em-error-fg: #FFFFFF;             --em-error-bg: #B42318;             --em-error-bar: #B42318;

  /* ---------- Autor în cronologie ---------- */
  --c-agent: #4B5563;          /* agenți AI: pătrat ardezie cu robot */
  --c-agent-bg: #E9ECF0;
  --c-human: #0E5A73;          /* oameni: cerc colorat cu inițiale (culoare pe persoană, vezi .av--*) */
  --c-human-bg: #DDF0F6;

  /* ---------- Focus ---------- */
  --c-focus: #0B63CE;
  --focus-ring: 0 0 0 2px var(--c-surface), 0 0 0 4px var(--c-focus);

  /* ---------- Tipografie ---------- */
  --font-sans: "Inter CRM", "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14px; --fs-md: 15px; --fs-lg: 16px; --fs-xl: 22px; --fs-2xl: 26px; --fs-kpi: 34px;
  --lh-tight: 1.2; --lh-base: 1.45; --lh-read: 1.6;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-heavy: 800;

  /* ---------- Spațieri (grilă de 4 px) ---------- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* ---------- Colțuri (puțin mai rotunde decât v1) ---------- */
  --r-sm: 5px; --r-md: 8px; --r-lg: 12px; --r-pill: 999px;

  /* ---------- Umbre (calde) ---------- */
  --sh-1: 0 1px 2px rgba(60, 45, 20, .06);
  --sh-2: 0 2px 6px rgba(60, 45, 20, .10), 0 1px 2px rgba(60, 45, 20, .06);
  --sh-3: 0 10px 28px rgba(40, 30, 10, .16);
  --sh-ok: 0 4px 12px rgba(21, 128, 61, .32);

  /* ---------- Mișcare ---------- */
  --t-fast: .12s ease; --t-med: .18s ease;

  /* ---------- Dimensiuni ---------- */
  --w-max: 1400px; --h-topbar: 54px; --h-control: 34px; --h-control-lg: 42px;

  color-scheme: light;
}

/* ---------- Tema întunecată (opțională) ---------- */
[data-theme="dark"] {
  --c-brand-ink: #083D30; --c-brand-ink-2: #0C5141; --c-brand-deep: #0A3328; --c-brand-soft: #123528; --c-brand-mist: #10261F;
  --c-brand: #7CC7DD; --c-brand-hover: #A5DAEA; --c-link: #7CC7DD; --c-link-hover: #A5DAEA; --c-petrol-soft: #10313C;
  --c-honey-soft: #3A2C0B; --c-honey-ink: #FFD27A; --c-coral-soft: #3D1E15; --c-coral-ink: #FFB49E;
  --c-bg: #121412; --c-surface: #1A1D1B; --c-surface-2: #1F2320; --c-surface-3: #242925;
  --c-border: #2F3530; --c-border-strong: #46504A;
  --c-text: #ECEEEA; --c-text-2: #BCC3BD; --c-text-3: #95A098;
  --c-ok: #6CCB76; --c-ok-hover: #8AD992; --c-ok-soft: #12301C; --c-ok-border: #24573A;
  --c-warn: #FFB27A; --c-warn-strong: #FF8A4C; --c-warn-soft: #36200F; --c-warn-border: #6A3A17;
  --c-danger: #F58A7E; --c-danger-hover: #F8A79E; --c-danger-soft: #3A1714; --c-danger-border: #6E2A24;
  --c-info: #9AD3E6; --c-info-soft: #10313C; --c-info-border: #1E5163;
  --st-progress-fg: #A8DCEC; --st-progress-bg: #123C4A; --st-progress-dot: #4FB3D3; --st-progress-bd: #1E5163;
  --st-wait-fg: #FFD98A;     --st-wait-bg: #43330B;     --st-wait-dot: #F2B33D;     --st-wait-bd: #6B5214;
  --st-pos-fg: #A6E3A0;      --st-pos-bg: #173C1C;      --st-pos-dot: #5CC066;      --st-pos-bd: #2A5E30;
  --st-closed-fg: #B4B8C0;   --st-closed-bg: #2A2D31;   --st-closed-dot: #6F747D;   --st-closed-bd: #3A3E44;
  --em-approved-fg: #A8DCEC; --em-approved-bg: #123C4A; --em-sent-fg: #A6E3A0; --em-sent-bg: #173C1C;
  --em-rejected-fg: #FFB49E; --em-rejected-bg: #3D1E15; --em-cancelled-fg: #B4B8C0; --em-cancelled-bg: #2A2D31;
  --c-agent: #B4BCC8; --c-agent-bg: #2A2F36; --c-human: #7CC7DD; --c-human-bg: #10313C;
  --c-focus: #8DC3EF;
  --sh-1: none; --sh-2: 0 1px 3px rgba(0,0,0,.5); --sh-3: 0 10px 28px rgba(0,0,0,.6); --sh-ok: 0 4px 12px rgba(0,0,0,.5);
  color-scheme: dark;
}
[data-theme="dark"] .btn--primary { --btn-fg: #0B1E26; }
[data-theme="dark"] .btn--ok { --btn-bg: #15803D; --btn-bg-h: #19924A; }
[data-theme="dark"] .queue__list a[aria-current="true"] { background: #3A2C0B; color: #FFE7A8; }

/* ==========================================================================
   Bază
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--c-bg); color: var(--c-text);
  font: var(--fw-regular) var(--fs-base)/var(--lh-base) var(--font-sans);
  font-feature-settings: "cv11" 1; /* variantă de cifre/litere Inter mai lizibilă */
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); font-weight: var(--fw-bold); letter-spacing: -0.015em; }
h1 { font-weight: var(--fw-heavy); letter-spacing: -0.025em; }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-base); }
p { margin: 0 0 var(--sp-2); }
a { color: var(--c-link); text-decoration: none; }
a:hover { color: var(--c-link-hover); text-decoration: underline; text-underline-offset: 2px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: var(--r-sm); }
.num, .tnum, table { font-variant-numeric: tabular-nums; }
.muted { color: var(--c-text-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 14px; height: 14px; vertical-align: -2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--c-surface); padding: 8px 12px; border-radius: var(--r-md); }
.skip:focus { left: 8px; }
hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--sp-4) 0; }
mark, .flag { background: #FFE2B8; color: inherit; padding: 0 2px; border-radius: 2px; box-shadow: inset 0 -2px 0 var(--c-warn-strong); }
[data-theme="dark"] mark, [data-theme="dark"] .flag { background: #5A3A12; }
kbd { font: 500 11px/1 var(--font-sans); border: 1px solid var(--c-border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: var(--c-surface); color: var(--c-text-2); }

/* ==========================================================================
   Bara de sus
   ========================================================================== */
.topbar { background: var(--c-brand-ink); color: var(--c-on-dark); position: sticky; top: 0; z-index: 20; }
.topbar__in { max-width: var(--w-max); margin: 0 auto; height: var(--h-topbar); display: flex; align-items: center; gap: var(--sp-6); padding: 0 var(--sp-6); }
.wordmark { display: flex; align-items: baseline; gap: 6px; color: var(--c-on-dark); white-space: nowrap; font-size: 15px; }
.wordmark:hover { text-decoration: none; }
.wordmark b { font-weight: var(--fw-bold); letter-spacing: -0.01em; }
.wordmark span { color: var(--c-on-dark-2); font-weight: var(--fw-medium); }
.wordmark i { font-style: normal; color: var(--c-brand-glint); font-weight: 700; }
.topbar :focus-visible { outline-color: #A8D99A; }
.nav { display: flex; align-items: stretch; gap: 2px; height: 100%; margin: 0; padding: 0; list-style: none; }
.nav a { display: flex; align-items: center; gap: 7px; height: 100%; padding: 0 12px; color: var(--c-on-dark-2); font-weight: var(--fw-medium); border-bottom: 2px solid transparent; border-top: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--c-on-dark); background: var(--c-brand-ink-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--c-on-dark); border-bottom: 3px solid var(--c-honey); background: rgba(255,255,255,.06); }
.nav__sep { width: 1px; background: rgba(255,255,255,.2); margin: 14px 6px; }
.nav__admin { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: #A9CFC0; align-self: center; padding: 0 4px 0 2px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--r-pill); background: #FFE9A8; color: #3D2E00; font-size: 11px; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.topbar__user { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--av, var(--c-human)); color: #fff; font-size: 11px; font-weight: var(--fw-bold); flex: none; }
.topbar .avatar { background: var(--c-honey); color: #3D2E00; }
.topbar__name { color: var(--c-on-dark); font-weight: var(--fw-medium); line-height: 1.15; }
.topbar__name small { display: block; color: #A9CFC0; font-size: 11px; font-weight: 400; }
.topbar__btn { background: transparent; color: var(--c-on-dark-2); border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-md); height: 30px; padding: 0 10px; font: inherit; font-size: var(--fs-sm); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.topbar__btn:hover { color: #fff; border-color: rgba(255,255,255,.45); }
.topbar__btn--icon { width: 30px; padding: 0; justify-content: center; }
.mnav { display: none; margin-left: auto; position: relative; }
.mnav > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.25); border-radius: var(--r-md); color: #fff; font-weight: var(--fw-medium); }
.mnav > summary::-webkit-details-marker { display: none; }
.mnav[open] > summary { background: var(--c-brand-ink-2); }
.mnav__panel { position: absolute; right: 0; top: 42px; width: min(300px, calc(100vw - 24px)); background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 6px; }
.mnav__panel a, .mnav__panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--r-md); color: var(--c-text); font: inherit; font-weight: var(--fw-medium); background: none; border: 0; text-align: left; }
.mnav__panel a[aria-current="page"] { background: var(--c-honey-soft); color: var(--c-text); box-shadow: inset 4px 0 0 var(--c-honey); }
.mnav__panel a:hover { background: var(--c-surface-2); text-decoration: none; }
.mnav__panel .badge { margin-left: auto; }
.mnav__label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-3); padding: 10px 12px 4px; }
.mnav__panel hr { margin: 6px 0; }

/* ==========================================================================
   Pagină
   ========================================================================== */
.page { max-width: var(--w-max); margin: 0 auto; padding: var(--sp-6); }
.page--narrow { max-width: 1120px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.page-head h1 .count { color: var(--c-text-3); font-weight: var(--fw-medium); }
.page-head__sub { color: var(--c-text-3); font-size: var(--fs-sm); margin-top: 4px; }
.crumbs { font-size: var(--fs-sm); color: var(--c-text-3); margin-bottom: 6px; }
.crumbs a { color: var(--c-text-2); }
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Card ---------- */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card__head { display: flex; align-items: center; gap: var(--sp-3); padding: 12px var(--sp-4); border-bottom: 1px solid var(--c-border); min-height: 48px; }
.card__head h2 { font-size: var(--fs-base); font-weight: var(--fw-semibold); }
.card__head .meta { margin-left: auto; color: var(--c-text-3); font-size: var(--fs-sm); }
.card__body { padding: var(--sp-4); }
.card__foot { padding: 12px var(--sp-4); border-top: 1px solid var(--c-border); background: var(--c-surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card--flush .card__body { padding: 0; }
.section-title { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-3); margin: 0 0 var(--sp-2); }

/* ==========================================================================
   Butoane
   ========================================================================== */
.btn {
  --btn-bg: var(--c-surface); --btn-bg-h: var(--c-surface-2); --btn-fg: var(--c-text); --btn-bd: var(--c-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h-control); padding: 0 14px; border-radius: var(--r-md);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font: var(--fw-medium) var(--fs-base)/1 var(--font-sans); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn:hover, .btn.is-hover { background: var(--btn-bg-h); text-decoration: none; }
.btn:focus-visible, .btn.is-focus { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled, .btn.is-disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn--primary { --btn-bg: var(--c-brand); --btn-bg-h: var(--c-brand-hover); --btn-fg: #fff; --btn-bd: transparent; font-weight: var(--fw-semibold); }
.btn--primary:hover, .btn--primary.is-hover { box-shadow: var(--sh-2); }
.btn--secondary { --btn-bg: var(--c-surface); --btn-bg-h: var(--c-surface-3); --btn-fg: var(--c-text); --btn-bd: var(--c-border-strong); }
.btn--ok { --btn-bg: var(--c-ok); --btn-bg-h: var(--c-ok-hover); --btn-fg: #fff; --btn-bd: transparent; font-weight: var(--fw-bold); box-shadow: 0 1px 0 rgba(0,0,0,.12), inset 0 -2px 0 rgba(0,0,0,.14); }
.btn--ok:hover, .btn--ok.is-hover { box-shadow: var(--sh-ok), inset 0 -2px 0 rgba(0,0,0,.14); transform: translateY(-1px); }
.btn--ok:hover .icon, .btn--ok.is-hover .icon { transform: scale(1.15); }
.btn .icon { transition: transform var(--t-fast); }
.btn--ok.btn--lg { min-width: 150px; height: 44px; font-size: 16px; }
.btn--danger { --btn-bg: var(--c-surface); --btn-bg-h: var(--c-danger-soft); --btn-fg: var(--c-danger); --btn-bd: var(--c-danger-border); }
.btn--danger:hover, .btn--danger.is-hover { --btn-bd: var(--c-danger); }
.btn--ghost { --btn-bg: transparent; --btn-bg-h: var(--c-surface-3); --btn-fg: var(--c-text-2); --btn-bd: transparent; }
.btn--lg { height: var(--h-control-lg); padding: 0 18px; font-size: var(--fs-md); }
.btn--sm { height: 28px; padding: 0 10px; font-size: var(--fs-sm); }
.btn--icon { width: var(--h-control); padding: 0; }
.btn--sm.btn--icon { width: 28px; }
.btn-group { display: inline-flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.btn-group--joined { gap: 0; }
.btn-group--joined .btn { border-radius: 0; margin-left: -1px; }
.btn-group--joined .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); margin-left: 0; }
.btn-group--joined .btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.btn-group--joined .btn:focus-visible { position: relative; z-index: 1; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--c-link); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* ==========================================================================
   Formulare
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-text); }
.field .hint { font-size: var(--fs-xs); color: var(--c-text-3); }
.field .err { font-size: var(--fs-xs); color: var(--c-danger); font-weight: var(--fw-medium); }
.input, .select, .textarea {
  width: 100%; min-height: var(--h-control); padding: 6px 10px; border-radius: var(--r-md);
  border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-text);
  font: var(--fs-base)/1.4 var(--font-sans);
}
.input::placeholder, .textarea::placeholder { color: #8A93A3; }
.input:hover, .select:hover, .textarea:hover { border-color: #9AA3B1; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible, .input.is-focus { outline: none; border-color: var(--c-focus); box-shadow: 0 0 0 3px rgba(11, 99, 206, .22); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--c-surface-3); color: var(--c-text-3); cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--c-danger); }
.input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgba(180, 35, 24, .2); }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.textarea { resize: vertical; line-height: var(--lh-read); }
.input--sm, .select--sm { min-height: 30px; font-size: var(--fs-sm); padding-top: 4px; padding-bottom: 4px; }
input[type="file"].input { padding: 5px; font-size: var(--fs-sm); }
input[type="file"].input::file-selector-button { font: inherit; border: 1px solid var(--c-border-strong); background: var(--c-surface-2); border-radius: var(--r-sm); padding: 3px 10px; margin-right: 10px; color: var(--c-text); cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--c-brand); margin: 0; }
.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1px solid var(--c-border-strong); border-radius: var(--r-md); padding: 2px; background: var(--c-surface-2); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 4px; font-weight: var(--fw-medium); color: var(--c-text-2); }
.seg input:checked + span { background: var(--c-surface); color: var(--c-text); box-shadow: var(--sh-2); }
.seg input:checked + span.on { color: var(--c-ok); }
.seg--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 100%; }
.seg--grid span { width: 100%; justify-content: center; }
.seg input:focus-visible + span { box-shadow: var(--focus-ring); }

/* details pliabile */
.fold { border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-surface); }
.fold + .fold { margin-top: var(--sp-2); }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: var(--fw-medium); border-radius: var(--r-md); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--c-text-3); border-bottom: 1.8px solid var(--c-text-3); transform: rotate(-45deg); transition: transform .12s; flex: none; margin: 0 3px 0 1px; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold > summary:hover { background: var(--c-surface-2); }
.fold > summary .meta { margin-left: auto; color: var(--c-text-3); font-size: var(--fs-sm); font-weight: 400; }
.fold__body { padding: 4px 12px 12px; }

/* ==========================================================================
   Eticheta de etapă (pastilă) — o clasă de grupă + numele etapei
   ========================================================================== */
.stage {
  --fg: var(--st-progress-fg); --bg: var(--st-progress-bg); --dot: var(--st-progress-dot); --bd: var(--st-progress-bd);
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px 0 4px;
  border-radius: var(--r-pill); background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap; line-height: 1;
}
.stage::before { content: ""; width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: var(--dot) var(--ico) center / 11px 11px no-repeat; }
.stage { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.stage--wait { --fg: var(--st-wait-fg); --bg: var(--st-wait-bg); --dot: var(--st-wait-dot); --bd: var(--st-wait-bd); }
.stage--wait { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4l2.5 2'/%3E%3C/svg%3E"); } /* ceas: „așteaptă un om” */
.stage--pos { --fg: var(--st-pos-fg); --bg: var(--st-pos-bg); --dot: var(--st-pos-dot); --bd: var(--st-pos-bd); }
.stage--pos { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); } /* bifă: „pozitiv” */
.stage--closed { --fg: var(--st-closed-fg); --bg: var(--st-closed-bg); --dot: var(--st-closed-dot); --bd: var(--st-closed-bd); }
.stage--closed { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E"); } /* liniuță: „închis” */
.stage--lg { height: 28px; font-size: var(--fs-sm); padding: 0 12px 0 5px; }
.stage--lg::before { width: 18px; height: 18px; background-size: 12px 12px; }

/* starea emailului */
.estate { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap; line-height: 1; }
.estate--draft { background: var(--em-draft-bg); color: var(--em-draft-fg); }
.estate--approved { background: var(--em-approved-bg); color: var(--em-approved-fg); }
.estate--sent { background: var(--em-sent-bg); color: var(--em-sent-fg); }
.estate--rejected { background: var(--em-rejected-bg); color: var(--em-rejected-fg); }
.estate--cancelled { background: var(--em-cancelled-bg); color: var(--em-cancelled-fg); text-decoration: line-through; text-decoration-thickness: 1px; }
.estate--error { background: var(--em-error-bg); color: var(--em-error-fg); }

/* țara */
.cc { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 18px; padding: 0 4px; border-radius: 3px; border: 1px solid var(--c-border-strong); color: var(--c-text-2); font-size: 10.5px; font-weight: var(--fw-bold); letter-spacing: .04em; background: var(--c-surface); }

/* etichetă motiv (în coadă) */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: var(--r-sm); font-size: 11px; font-weight: var(--fw-semibold); white-space: nowrap; background: var(--c-surface-3); color: var(--c-text-2); }
.tag--warn { background: var(--c-warn-soft); color: var(--c-warn); }
.tag--wait { background: var(--c-petrol-soft); color: var(--c-info); }
.tag--honey { background: var(--c-honey-soft); color: var(--c-honey-ink); }
.tag--agent { background: var(--c-agent-bg); color: var(--c-agent); }

/* ==========================================================================
   Mesaje
   ========================================================================== */
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-base); }
.msg .icon { margin-top: 2px; }
.msg p { margin: 0; }
.msg strong { font-weight: var(--fw-semibold); }
.msg--ok { background: var(--c-ok-soft); border-color: var(--c-ok-border); color: var(--c-ok); }
.msg--ok p { color: var(--c-text); }
.msg--warn { background: var(--c-warn-soft); border-color: var(--c-warn-border); color: var(--c-warn); border-left: 4px solid var(--c-warn-strong); }
.msg--warn p { color: var(--c-text); }
.msg--error { background: var(--c-danger-soft); border-color: var(--c-danger-border); color: var(--c-danger); border-left: 4px solid var(--c-danger); }
.msg--error p { color: var(--c-text); }
.msg--info { background: var(--c-info-soft); border-color: var(--c-info-border); color: var(--c-info); }
.msg--info p { color: var(--c-text); }
.msg__action { margin-left: auto; white-space: nowrap; font-weight: var(--fw-semibold); }

/* ==========================================================================
   Cifra mare
   ========================================================================== */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-3); }
.kpi { display: block; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 12px 16px 14px; color: var(--c-text); position: relative; box-shadow: var(--sh-1); }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-2); text-decoration: none; }
a.kpi::after { content: "→"; position: absolute; right: 14px; top: 11px; color: var(--c-text-3); font-size: 14px; }
a.kpi:hover::after { color: var(--c-link); }
.kpi__label { font-size: var(--fs-sm); color: var(--c-text-2); font-weight: var(--fw-medium); padding-right: 18px; }
.kpi__value { font-size: var(--fs-kpi); font-weight: var(--fw-heavy); letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: 20px; color: var(--c-text-3); font-weight: var(--fw-medium); }
.kpi__sub { font-size: var(--fs-xs); color: var(--c-text-3); margin-top: 2px; }
.kpi--wait { border-top: 3px solid var(--st-wait-dot); }
.kpi--pos { border-top: 3px solid var(--st-pos-dot); }
.kpi--progress { border-top: 3px solid var(--st-progress-dot); }
.kpi--warn { border-top: 3px solid var(--c-warn-strong); }

/* ==========================================================================
   Tabel
   ========================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th { text-align: left; font-weight: var(--fw-semibold); color: var(--c-text-3); font-size: var(--fs-xs); background: var(--c-surface-2); padding: 8px 12px; border-bottom: 1px solid var(--c-border); white-space: nowrap; position: sticky; top: 0; }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--c-surface-2); }
.table .r, .table th.r { text-align: right; }
.table .c { text-align: center; }
.table .sub { display: block; font-size: var(--fs-xs); color: var(--c-text-3); margin-top: 1px; }
.table a.strong { font-weight: var(--fw-semibold); color: var(--c-text); }
.table a.strong:hover { color: var(--c-link); }
.table td.mid { vertical-align: middle; }
.table .empty { color: #A0A8B5; }
.table tfoot td { font-weight: var(--fw-semibold); background: var(--c-surface-2); border-top: 1px solid var(--c-border-strong); border-bottom: 0; }
.table .grp td { background: var(--c-surface); padding-top: 10px; padding-bottom: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-3); font-weight: var(--fw-semibold); border-bottom: 0; }
.table .tot { font-weight: var(--fw-semibold); background: var(--c-surface-2); }
.table--matrix td, .table--matrix th { padding: 6px 12px; }
.table--matrix td.r a { display: inline-block; min-width: 36px; padding: 1px 4px; border-radius: 3px; color: var(--c-text); font-weight: var(--fw-medium); }
.table--matrix td.r a:hover { background: var(--c-brand-soft); color: var(--c-link); text-decoration: none; }
.table--matrix td.r a.hot { color: var(--st-wait-fg); font-weight: var(--fw-bold); }
.table--matrix td.r a.pos { color: var(--st-pos-fg); font-weight: var(--fw-bold); }

/* ==========================================================================
   Cronologie (agent vs om)
   ========================================================================== */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: repeating-linear-gradient(var(--c-border-strong) 0 4px, transparent 4px 8px); }
.tl { position: relative; padding: 0 0 14px 40px; }
.tl__who { position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: var(--fw-bold); border: 2px solid var(--c-surface); }
.tl--human .tl__who { border-radius: 50%; background: var(--av, var(--c-human)); color: #fff; }
[data-theme="dark"] .tl--human .tl__who { color: #0F141B; }
.tl--agent .tl__who { border-radius: 7px; background: var(--c-agent-bg); color: var(--c-agent); box-shadow: inset 0 0 0 1px var(--c-border-strong); }
.tl__meta { font-size: var(--fs-xs); color: var(--c-text-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 18px; padding-top: 1px; }
.tl__meta b { color: var(--c-text); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.tl--agent .tl__meta b { color: var(--c-text-2); font-weight: var(--fw-medium); }
.tl__text { margin-top: 2px; color: var(--c-text); }
.tl--agent .tl__text { color: var(--c-text-2); }
.tl--human .tl__text.boxed { background: var(--c-surface); box-shadow: inset 3px 0 0 var(--av, var(--c-human)); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 8px 10px; margin-top: 4px; }
.tl__quote { margin-top: 6px; border-left: 3px solid var(--st-pos-dot); background: var(--st-pos-bg); padding: 6px 10px; border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--c-text); }
.tl__quote .tr { display: block; color: var(--c-text-2); font-size: var(--fs-sm); margin-top: 3px; }
.tl--compact { padding-bottom: 8px; }
.tl-day { position: relative; padding: 4px 0 10px 40px; font-size: 11px; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-3); }

/* autor în listă (Ultimele activități) */
.who { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: var(--fs-xs); }
.who__i { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: var(--fw-bold); flex: none; }
.who--human .who__i { border-radius: 50%; background: var(--av, var(--c-human)); color: #fff; }
[data-theme="dark"] .who--human .who__i { color: #0F141B; }
.who--human { color: var(--c-text); font-weight: var(--fw-medium); }
.who--agent .who__i { border-radius: 4px; background: var(--c-agent-bg); color: var(--c-agent); box-shadow: inset 0 0 0 1px var(--c-border-strong); }
.who--agent { color: var(--c-text-3); }

/* ==========================================================================
   Cardul de email
   ========================================================================== */
.email { --bar: var(--em-draft-bar); background: var(--c-surface); border: 1px solid var(--c-border); border-left: 6px solid var(--bar); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.email--approved { --bar: var(--em-approved-bar); } .email--sent { --bar: var(--em-sent-bar); } .email--rejected { --bar: var(--em-rejected-bar); }
.email--cancelled { --bar: var(--em-cancelled-bar); } .email--error { --bar: var(--em-error-bar); }
.email__head { display: flex; gap: var(--sp-3); align-items: flex-start; padding: 12px var(--sp-4); }
.email__title { font-weight: var(--fw-semibold); }
.email__title .to { font-weight: var(--fw-regular); color: var(--c-text-2); }
.email__meta { font-size: var(--fs-xs); color: var(--c-text-3); margin-top: 2px; display: flex; gap: 0 10px; flex-wrap: wrap; }
.email__meta span + span::before { content: "·"; margin-right: 10px; color: #A0A8B5; }
.email__state { margin-left: auto; flex: none; }
.reason { margin: 0 var(--sp-4) var(--sp-3); padding: 9px 12px; border-radius: var(--r-md); background: var(--c-warn-soft); border: 1px solid var(--c-warn-border); border-left: 4px solid var(--c-warn-strong); font-size: var(--fs-base); }
.reason__label { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--c-warn); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.reason--trial { background: var(--c-petrol-soft); border-color: var(--c-info-border); border-left-color: var(--st-progress-dot); }
.reason--trial .reason__label { color: var(--c-info); }
.reason ul { margin: 4px 0 0; padding-left: 18px; }
.progress { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 6px; }
.progress i { width: 14px; height: 6px; border-radius: 2px; background: var(--c-info-border); }
.progress i.on { background: var(--st-progress-dot); }
.email__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--c-border); }
.email__col { padding: var(--sp-3) var(--sp-4) var(--sp-4); min-width: 0; }
.email__col + .email__col { border-left: 1px solid var(--c-border); background: var(--c-surface-2); border-top-right-radius: 0; }
.email__colhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 22px; }
.email__colhead h4 { font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-2); }
.email__colhead .lang { font-size: var(--fs-xs); color: var(--c-text-3); }
.email__subject { font-weight: var(--fw-semibold); }
.email__body { font-size: var(--fs-md); line-height: var(--lh-read); min-height: 380px; margin-top: 0; field-sizing: content; } /* field-sizing: Chrome/Edge 123+, crește cu textul; altfel rows= */
.email__subject.textarea { field-sizing: content; min-height: var(--h-control); resize: none; font-size: var(--fs-md); line-height: 1.45; }
.email__readonly { font-size: var(--fs-md); line-height: var(--lh-read); }
.email__readonly .subj { font-weight: var(--fw-semibold); padding: 6px 10px; min-height: var(--h-control); border: 1px solid transparent; }
.email__readonly .body { margin-top: 0; padding: 6px 10px; border: 1px solid transparent; white-space: pre-line; color: var(--c-text); }
.email__readonly .body p { margin: 0 0 1.6em; } /* = un rând gol din textarea, ca paragrafele să se alinieze */
.email__readonly .body p:last-child { margin-bottom: 0; }
.email__sent .body { white-space: pre-line; padding: 0; }
.email__actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: 12px var(--sp-4); border-top: 1px solid var(--c-border); background: var(--c-surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.email__actions .sep { width: 1px; align-self: stretch; background: var(--c-border); margin: 2px 4px; }
.manual { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: 10px var(--sp-4); background: var(--c-info-soft); border-top: 1px solid var(--c-info-border); }
.manual__label { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--c-info); text-transform: uppercase; letter-spacing: .05em; margin-right: 4px; }
/* variantă închisă: rând pliabil */
.email-row { --bar: var(--em-sent-bar); border: 1px solid var(--c-border); border-left: 6px solid var(--bar); border-radius: var(--r-lg); background: var(--c-surface); }
.email-row--muted { --bar: var(--em-cancelled-bar); }
.email-row.is-rejected { --bar: var(--em-rejected-bar); }
.email-row.is-approved { --bar: var(--em-approved-bar); }
.email-row > summary { list-style: none; display: grid; grid-template-columns: 16px auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px var(--sp-4); cursor: pointer; border-radius: var(--r-lg); }
.email-row > summary::-webkit-details-marker { display: none; }
.email-row > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--c-text-3); border-bottom: 1.8px solid var(--c-text-3); transform: rotate(-45deg); transition: transform .12s; justify-self: center; }
.email-row[open] > summary::before { transform: rotate(45deg); }
.email-row[open] > summary { border-bottom: 1px solid var(--c-border); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.email-row > summary:hover { background: var(--c-surface-2); }
.email-row__kind { font-weight: var(--fw-semibold); white-space: nowrap; font-size: var(--fs-sm); }
.email-row__subj { color: var(--c-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-row__end { display: flex; align-items: center; gap: 10px; color: var(--c-text-3); font-size: var(--fs-xs); white-space: nowrap; }
.email-row--muted .email-row__subj { color: var(--c-text-3); }

/* ==========================================================================
   De aprobat
   ========================================================================== */
.review-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.queue { position: sticky; top: calc(var(--h-topbar) + 16px); max-height: calc(100vh - var(--h-topbar) - 32px); display: flex; flex-direction: column; }
.queue__head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 8px; }
.queue__list { list-style: none; margin: 0; padding: 6px; overflow: auto; background: var(--c-brand-deep); border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.queue__list a { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 6px; padding: 7px 8px; border-radius: var(--r-md); color: #E6F2EC; font-size: var(--fs-sm); transition: background-color var(--t-fast); }
.queue__list a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.queue__list a[aria-current="true"] { background: #FFF6DC; color: var(--c-text); box-shadow: inset 4px 0 0 var(--c-honey); }
.queue__list a[aria-current="true"] .queue__meta, .queue__list a[aria-current="true"] .queue__n { color: var(--c-text-3); }
.queue__n { color: #A9CFC0; font-size: var(--fs-xs); text-align: right; padding-top: 1px; font-variant-numeric: tabular-nums; }
.queue__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-medium); }
.queue__meta { grid-column: 2; display: flex; gap: 6px; align-items: center; font-size: 11px; color: #A9CFC0; }
.queue__list li.done a { color: #A9CFC0; }
.queue__list li.done .queue__name { text-decoration: line-through; text-decoration-color: #A0A8B5; font-weight: 400; }
.queue__keys { font-size: var(--fs-xs); color: var(--c-text-3); padding: 8px 4px 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mqueue { display: none; }
.mqueue .queue__list { background: transparent; box-shadow: none; }
.mqueue .queue__list a { color: var(--c-text); }
.mqueue .queue__n, .mqueue .queue__meta { color: var(--c-text-3); }
.situation { margin-bottom: var(--sp-4); }
.toolbar { display: flex; align-items: flex-end; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.review { scroll-margin-top: calc(var(--h-topbar) + 12px); }
.review + .review { margin-top: var(--sp-6); }
.review__head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: 8px; flex-wrap: wrap; }
.review__n { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--c-honey-ink); background: var(--c-honey-soft); border: 1px solid #F5CF6B; border-radius: var(--r-md); padding: 2px 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.review__firm { font-size: 17px; font-weight: var(--fw-heavy); letter-spacing: -0.01em; }
.review__firm a { color: var(--c-text); }
.review__firm a:hover { color: var(--c-link); }
.review__where { color: var(--c-text-2); font-size: var(--fs-sm); display: inline-flex; gap: 6px; align-items: center; }
.review__nav { margin-left: auto; display: flex; gap: 4px; }
.review__profile { font-size: var(--fs-sm); color: var(--c-text-3); margin: -2px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.review__profile b { color: var(--c-text-2); font-weight: var(--fw-medium); }
.qrow { border: 1px solid var(--c-border); border-left: 6px solid var(--em-draft-bar); border-radius: var(--r-lg); background: var(--c-surface); transition: box-shadow var(--t-fast), transform var(--t-fast); scroll-margin-top: calc(var(--h-topbar) + 12px); }
.qrow + .qrow { margin-top: 6px; }
.qrow > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 58px minmax(150px, 260px) 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 14px; border-radius: var(--r-lg); font-size: var(--fs-sm); }
.qrow > summary::-webkit-details-marker { display: none; }
.qrow > summary:hover { background: var(--c-honey-soft); }
.qrow__firm { font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow__subj { color: var(--c-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow__open { font-size: var(--fs-xs); color: var(--c-link); font-weight: var(--fw-medium); white-space: nowrap; }
.qrow .review__n { text-align: center; }
.qrow__body { padding: 0 14px 14px; color: var(--c-text-3); font-size: var(--fs-sm); }
.handled { margin-top: var(--sp-8); }

/* ==========================================================================
   Tablou
   ========================================================================== */
.dash-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-4); align-items: start; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px var(--sp-4); border-bottom: 1px solid var(--c-border); font-size: var(--fs-sm); }
.todo li:last-child { border-bottom: 0; }
.todo .what { color: var(--c-text-2); grid-column: 1; font-size: var(--fs-xs); }
.todo .when { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-size: var(--fs-xs); color: var(--c-text-3); white-space: nowrap; align-self: center; }
.todo .when.late { color: var(--c-danger); font-weight: var(--fw-semibold); }
.todo .when.today { color: var(--c-warn); font-weight: var(--fw-semibold); }
.acts { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.acts td { padding: 7px 10px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.acts tr:last-child td { border-bottom: 0; }
.acts td:first-child { padding-left: var(--sp-4); width: 52px; color: var(--c-text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acts td:last-child { padding-right: var(--sp-4); width: 1%; text-align: right; }
.acts .mwho { display: none; margin-top: 3px; }
.acts .firm { font-weight: var(--fw-semibold); color: var(--c-text); white-space: nowrap; }
.acts .txt { color: var(--c-text-2); }
.acts tr.is-agent .txt { color: var(--c-text-3); }
.acts tr.is-human td { background: color-mix(in srgb, var(--c-honey-soft) 55%, transparent); }
.acts tr.is-human td:first-child { box-shadow: inset 3px 0 0 var(--c-honey); }
.legend { display: flex; gap: var(--sp-4); align-items: center; font-size: var(--fs-xs); color: var(--c-text-3); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ==========================================================================
   Firma
   ========================================================================== */
.firm-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-4); align-items: start; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-4); box-shadow: var(--sh-1); }
.firm-head h1 { font-size: var(--fs-2xl); display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.firm-head__alt { color: var(--c-text-3); font-size: var(--fs-sm); margin-top: 4px; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.firm-head__alt span { display: inline-flex; gap: 6px; align-items: center; }
.next { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r-md); background: var(--c-honey-soft); border: 1px solid #F5CF6B; font-size: var(--fs-sm); margin-top: var(--sp-3); width: fit-content; max-width: 100%; }
.next b { color: var(--c-honey-ink); font-weight: var(--fw-bold); white-space: nowrap; }
.firm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-4); align-items: start; }
.firm-aside { position: sticky; top: calc(var(--h-topbar) + 16px); }
.firm-aside .card + .card { margin-top: var(--sp-4); }
.dl { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: var(--fs-sm); }
.dl dt { color: var(--c-text-3); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dl-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sp-8); }
.profile { margin-top: var(--sp-4); padding: 12px 14px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-md); font-size: var(--fs-base); }
.profile__by { display: flex; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--c-text-3); margin-bottom: 4px; }
.verify { display: inline-flex; gap: 6px; align-items: center; color: var(--c-ok); font-weight: var(--fw-medium); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--c-border); margin-bottom: var(--sp-3); }
.tabs a { padding: 8px 12px; color: var(--c-text-2); font-weight: var(--fw-medium); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="true"] { color: var(--c-text); border-bottom-color: var(--c-honey); }
.tabs a .count { color: var(--c-text-3); font-weight: 400; margin-left: 4px; }

/* ==========================================================================
   Firme (lista)
   ========================================================================== */
.filters { display: grid; grid-template-columns: minmax(220px, 2.2fr) repeat(3, minmax(130px, 1fr)) auto; gap: var(--sp-3); align-items: end; padding: var(--sp-3) var(--sp-4); }
.filters .btn-group { padding-bottom: 0; }
.pager { display: flex; align-items: center; gap: var(--sp-3); justify-content: space-between; padding: 10px var(--sp-4); border-top: 1px solid var(--c-border); font-size: var(--fs-sm); color: var(--c-text-2); flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 var(--sp-4) var(--sp-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 4px 0 10px; border-radius: var(--r-pill); background: var(--c-surface-3); color: var(--c-text); border: 1px solid var(--c-border); font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.chip a { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; color: inherit; }
.chip a:hover { background: rgba(0,0,0,.08); text-decoration: none; }

/* ==========================================================================
   Setări
   ========================================================================== */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--sp-8); align-items: start; }
.toc { position: sticky; top: calc(var(--h-topbar) + 16px); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--c-border); }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 6px 12px; color: var(--c-text-2); font-size: var(--fs-sm); margin-left: -1px; border-left: 2px solid transparent; }
.toc a::before { content: counter(toc); color: var(--c-text-3); font-variant-numeric: tabular-nums; width: 12px; }
.toc a:hover { color: var(--c-text); text-decoration: none; background: var(--c-surface-3); }
.toc a[aria-current="true"] { color: var(--c-text); border-left-color: var(--c-honey); background: var(--c-honey-soft); font-weight: var(--fw-medium); }
.toc a .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--c-warn-strong); align-self: center; }
.set-card { scroll-margin-top: calc(var(--h-topbar) + 16px); }
.set-card + .set-card { margin-top: var(--sp-4); }
.set-card .card__head { flex-wrap: wrap; }
.set-card .card__head .n { width: 24px; height: 24px; border-radius: 6px; background: var(--c-brand-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.set-card .card__head p { flex-basis: 100%; margin: 2px 0 0 34px; font-size: var(--fs-sm); color: var(--c-text-3); }
.legal { margin-top: var(--sp-4); padding: 12px 14px; border-radius: var(--r-md); background: var(--c-warn-soft); border: 1px solid var(--c-warn-border); border-left: 4px solid var(--c-warn-strong); }
.legal h3 { color: var(--c-warn); display: flex; gap: 8px; align-items: center; font-size: var(--fs-base); margin-bottom: 4px; }
.legal ul { margin: 6px 0 0; padding-left: 18px; }
.legal li + li { margin-top: 2px; }
.savebar { margin-top: var(--sp-4); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 12px var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); box-shadow: var(--sh-1); }
.trial-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.trial-table th, .trial-table td { padding: 7px 10px; border-bottom: 1px solid var(--c-border); text-align: left; }
.trial-table th { color: var(--c-text-3); font-weight: var(--fw-medium); font-size: var(--fs-xs); }
.trial-table .r { text-align: right; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.pre { white-space: pre-wrap; background: var(--c-surface-3); border-radius: var(--r-md); padding: 10px 12px; font-size: var(--fs-sm); color: var(--c-text-2); max-height: 220px; overflow: auto; }

/* ==========================================================================
   Autentificare
   ========================================================================== */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--sp-6) var(--sp-4); background: var(--c-bg); }
.auth__box { width: 100%; max-width: 400px; }
.auth__brand { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-5); justify-content: center; }
.auth__mark { width: 34px; height: 34px; border-radius: 8px; background: var(--c-brand-ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; letter-spacing: -.02em; }
.auth__brand .wordmark { color: var(--c-text); font-size: 16px; }
.auth__brand .wordmark span { color: var(--c-text-2); }
.auth__brand .wordmark i { color: var(--c-honey); }
.auth .card__body { padding: var(--sp-6); }
.auth h1 { font-size: var(--fs-xl); margin-bottom: 4px; }
.auth form > * + * { margin-top: var(--sp-4); }
.auth__foot { text-align: center; color: var(--c-text-3); font-size: var(--fs-xs); margin-top: var(--sp-4); }

/* ==========================================================================
   Utilizatori
   ========================================================================== */
.pw-inline { display: flex; gap: 6px; min-width: 250px; }
.pw-inline .input { min-width: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-ok); }
.status--off { color: var(--c-text-3); }
.status--off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--st-closed-dot); }
.role { font-size: var(--fs-xs); font-weight: var(--fw-semibold); padding: 2px 7px; border-radius: var(--r-sm); background: var(--c-surface-3); color: var(--c-text-2); }
.role--admin { background: var(--c-brand-soft); color: var(--c-brand-ink); }
tr.is-off td { color: var(--c-text-3); }

/* ==========================================================================
   Componente (pagina de prezentare)
   ========================================================================== */
.spec { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-4) 0; border-top: 1px solid var(--c-border); }
.spec:first-of-type { border-top: 0; }
.spec__name { font-size: var(--fs-sm); color: var(--c-text-2); font-weight: var(--fw-medium); }
.spec__name code { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--c-text-3); margin-top: 2px; font-weight: 400; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
.sw { border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; background: var(--c-surface); font-size: var(--fs-xs); }
.sw i { display: block; height: 40px; }
.sw div { padding: 6px 8px; }
.sw code { font-family: var(--font-mono); color: var(--c-text-3); font-size: 11px; display: block; }
.state-grid { display: grid; grid-template-columns: repeat(4, max-content); gap: var(--sp-3) var(--sp-4); align-items: center; }
.state-grid .h { font-size: var(--fs-xs); color: var(--c-text-3); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1279px) {
  .review-layout { grid-template-columns: minmax(0, 1fr); }
  .queue { display: none; }
  .mqueue { display: block; margin-bottom: var(--sp-4); }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .nav__admin { display: none; }
  .topbar__name small { display: none; }
}
@media (max-width: 1080px) {
  .topbar__in > .nav, .topbar__user { display: none; }
  .mnav { display: block; }
  .dash-grid, .firm-layout { grid-template-columns: minmax(0, 1fr); }
  .firm-aside { position: static; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .search, .filters .btn-group { grid-column: 1 / -1; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 4px; border: 0; }
  .toc a { border: 1px solid var(--c-border); border-radius: var(--r-pill); padding: 4px 10px; margin: 0; background: var(--c-surface); }
  .toc a[aria-current="true"] { border-color: var(--c-brand-glint); }
}
@media (max-width: 760px) {
  .page { padding: var(--sp-4) var(--sp-3); }
  .topbar__in { padding: 0 var(--sp-3); gap: var(--sp-3); }
  .wordmark { font-size: 14px; }
  .email__cols { grid-template-columns: minmax(0, 1fr); }
  .email__col + .email__col { border-left: 0; border-top: 1px solid var(--c-border); }
  .email__body { min-height: 300px; }
  .email__head { flex-wrap: wrap; }
  .email__actions .sep { display: none; }
  .email__actions .spacer { flex-basis: 100%; height: 0; }
  .email__actions .btn--ok { flex: 1 1 100%; }
  .manual .btn { flex: 1 1 calc(50% - 8px); }
  .manual__label { flex-basis: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .kpis .kpi:first-child { grid-column: 1 / -1; }
  .kpi { padding: 10px 12px 12px; }
  .kpi__value { font-size: 26px; }
  .dl-cols { grid-template-columns: minmax(0, 1fr); row-gap: 7px; }
  .card__head { flex-wrap: wrap; row-gap: 2px; }
  .card__head .meta { margin-left: 0; flex-basis: 100%; }
  .dl { grid-template-columns: 108px minmax(0, 1fr); }
  .firm-head { grid-template-columns: minmax(0, 1fr); padding: var(--sp-4); }
  .firm-head h1 { font-size: var(--fs-xl); }
  .firm-head .btn-group { width: 100%; }
  .firm-head .btn-group .btn { flex: 1; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .form-grid--2, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .qrow > summary { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .qrow__subj, .qrow__open { display: none; }
  .qrow .tag { justify-self: end; }
  .review__nav { margin-left: 0; }
  .review__head .review__nav { order: 5; width: 100%; }
  .review__nav .btn { flex: 1; }
  .review__profile { white-space: normal; }
  .spec { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state-grid .btn { white-space: normal; height: auto; min-height: var(--h-control); padding-top: 6px; padding-bottom: 6px; }
  .savebar { flex-wrap: wrap; }
  .acts .firm { white-space: normal; }
  .acts .dwho { display: none; }
  .acts .mwho { display: block; }
  .msg { flex-wrap: wrap; }
  .msg p { flex: 1 1 calc(100% - 30px); }
  .msg__action { margin-left: 26px; }
  .acts td:first-child { width: 44px; padding-left: 12px; }
  .email-row > summary { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .email-row__subj { grid-column: 2 / -1; grid-row: 2; white-space: normal; }
  .email-row__kind { white-space: normal; grid-column: 2 / -1; }
  .email-row__end { grid-column: 2 / -1; grid-row: 3; white-space: normal; flex-wrap: wrap; gap: 4px 10px; }
  .page-head .btn-group { width: 100%; }
}
@media (max-width: 400px) {
  .topbar .wordmark span, .topbar .wordmark i { display: none; }
}
@media print { .topbar, .queue, .email__actions { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.table td a[href^="mailto:"] { color: var(--c-text-2); }
.table td a[href^="mailto:"]:hover { color: var(--c-link); }
.email__cols[style*="grid-template-columns:1fr"] .email__col > * { max-width: 78ch; }
.auth__brand .wordmark { white-space: normal; flex-wrap: wrap; justify-content: center; text-align: center; }


/* ==========================================================================
   v2 · personalitate: banner de pagină, plăci colorate, steaguri, avatare, stare goală
   ========================================================================== */
/* Antet de pagină: banner discret cu ilustrație geometrică (cercuri + frunze, ecou al logo-ului companiei) */
.page-head { position: relative; background: var(--c-brand-mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='96' viewBox='0 0 240 96'%3E%3Ccircle cx='168' cy='58' r='40' fill='%23F2B33D'/%3E%3Ccircle cx='214' cy='26' r='20' fill='%23E8664A'/%3E%3Ccircle cx='120' cy='22' r='9' fill='%231C7C9C'/%3E%3Cpath d='M150 86 C170 50 205 46 236 52 C214 80 184 92 150 86Z' fill='%230A5A45'/%3E%3Cpath d='M196 96 C200 74 216 62 240 60 L240 96Z' fill='%2363B24F'/%3E%3Cpath d='M154 84 C178 70 204 62 230 56' stroke='%23E3F1EA' stroke-width='2' fill='none'/%3E%3C/svg%3E") right 0 bottom 0 / 240px 96px no-repeat;
  border: 1px solid #CFE5D8; border-radius: var(--r-lg); padding: 16px 280px 16px 20px; min-height: 96px; align-items: center; overflow: hidden; }
.page-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c-brand-ink); }
.page-head h1 { font-size: var(--fs-xl); color: var(--c-brand-ink); }
.page-head h1 .count { color: var(--c-text-2); font-weight: var(--fw-semibold); }
.page-head__sub { color: var(--c-text-2); }
[data-theme="dark"] .page-head { background-color: var(--c-brand-mist); border-color: var(--c-border); }
[data-theme="dark"] .page-head h1 { color: var(--c-text); }
[data-theme="dark"] .page-head::before { background: var(--c-brand-leaf); }

/* Plăci colorate pentru cifrele mari */
.kpi { border: 0; overflow: hidden; padding: 14px 16px 16px; transition: transform var(--t-med), box-shadow var(--t-med); background: var(--tile-bg, var(--c-surface)); }
.kpi__art { position: absolute; right: -6px; bottom: -8px; width: 92px; height: 78px; pointer-events: none; }
.kpi__label, .kpi__value, .kpi__sub { position: relative; max-width: calc(100% - 64px); }
.kpi__label { font-weight: var(--fw-semibold); color: var(--c-text); }
.kpi__sub { color: var(--c-text-2); }
a.kpi::after { z-index: 1; top: 12px; color: var(--c-text-2); font-weight: 700; }
.kpi--wait { --tile-bg: var(--c-honey-soft); border-top: 0; }
.kpi--approved { --tile-bg: var(--c-petrol-soft); }
.kpi--progress { --tile-bg: var(--c-brand-soft); border-top: 0; }
.kpi--pos { --tile-bg: var(--c-ok-soft); border-top: 0; }
.kpi--warn { --tile-bg: var(--c-coral-soft); border-top: 0; }
.kpi__value small { color: var(--c-text-2); }

/* Steaguri inline (simplificate, SVG) */
.flag-i { width: 18px; height: 12px; border-radius: 2px; flex: none; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.14); }
.cc { gap: 5px; border: 0; background: transparent; padding: 0; min-width: 0; height: auto; color: var(--c-text-2); font-size: 11px; }
.th-flag { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.th-flag .flag-i { width: 20px; height: 13px; }

/* Avatare colorate pe persoană (inițiale albe, ≥ 5,2:1) */
.av--im { --av: #0E5A73; } .av--ap { --av: #C2410C; } .av--mt { --av: #8A5A00; }
.av--ed { --av: #6D28D9; } .av--gp { --av: #0A5A45; } .av--rc { --av: #4B5563; }

/* Antetul firmei: bandă sus în culoarea grupei de etapă */
.firm-head { border-top: 5px solid var(--st-pos-dot); }
.firm-head h1 { color: var(--c-text); font-weight: var(--fw-heavy); }

/* Coada laterală: titlu */
.queue__head .section-title { color: var(--c-brand-ink); }

/* Cuprins Setări pe bloc colorat */
.toc { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 12px 8px 12px 0; border-top: 5px solid var(--c-brand-ink); }

/* Stare goală */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 32px 16px; border: 2px dashed var(--c-border-strong); border-radius: var(--r-lg); background: var(--c-surface); }
.empty-state svg { width: 120px; height: 96px; margin-bottom: 6px; }
.empty-state h3 { font-size: var(--fs-lg); font-weight: var(--fw-heavy); }
.empty-state p { color: var(--c-text-2); max-width: 46ch; margin: 0 0 8px; }

/* Autentificare pe fundal de brand */
.auth { background: var(--c-brand-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='96' viewBox='0 0 240 96'%3E%3Ccircle cx='168' cy='58' r='40' fill='%23F2B33D'/%3E%3Ccircle cx='214' cy='26' r='20' fill='%23E8664A'/%3E%3Ccircle cx='120' cy='22' r='9' fill='%231C7C9C'/%3E%3Cpath d='M150 86 C170 50 205 46 236 52 C214 80 184 92 150 86Z' fill='%230A5A45'/%3E%3Cpath d='M196 96 C200 74 216 62 240 60 L240 96Z' fill='%2363B24F'/%3E%3Cpath d='M154 84 C178 70 204 62 230 56' stroke='%23E3F1EA' stroke-width='2' fill='none'/%3E%3C/svg%3E") right -20px bottom -10px / 480px 192px no-repeat; }
.auth__brand .wordmark { color: #fff; }
.auth__brand .wordmark span { color: #CFE8DC; }
.auth__foot { color: #CFE8DC; }
.auth .card { box-shadow: var(--sh-3); border: 0; }

/* Microinteracțiuni */
.card, .email, .email-row { transition: box-shadow var(--t-med); }
.qrow:hover { box-shadow: var(--sh-2); }
.table tbody tr td { transition: background-color var(--t-fast); }
.table tbody tr:hover td { background: var(--c-honey-soft); }
[data-theme="dark"] .table tbody tr:hover td { background: var(--c-surface-2); }
.todo li { transition: background-color var(--t-fast); }
.todo li:hover { background: var(--c-surface-2); }
.stage { transition: filter var(--t-fast); }
a:hover .stage { filter: saturate(1.2); }

@media (max-width: 760px) {
  .page-head { padding: 14px 16px 14px 18px; background-size: 150px 60px; background-position: right -18px top -12px; min-height: 0; }
  .page-head > div:first-child { padding-right: 96px; }
  .kpi__art { width: 58px; height: 50px; right: -4px; bottom: -6px; }
  .kpi__label { max-width: calc(100% - 16px); }
  .kpi__value, .kpi__sub { max-width: calc(100% - 46px); }
  .auth { background-size: 300px 120px; }
}
[data-theme="dark"] .queue__head .section-title { color: var(--c-text-3); }

/* ---------- Adăugat în CRM (nu e din designul v2): potențialul firmei, dat de agentul analist ---------- */
.pot { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-pill, 999px); font-size: 12px; font-weight: var(--fw-semibold); white-space: nowrap; border: 1px solid transparent; }
.pot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pot--mare { background: var(--st-pos-bg); color: var(--st-pos-fg); border-color: var(--st-pos-bd); }
.pot--mediu { background: var(--st-progress-bg); color: var(--st-progress-fg); border-color: var(--st-progress-bd); }
.pot--mic { background: var(--st-wait-bg); color: var(--st-wait-fg); border-color: var(--st-wait-bd); }
.pot--nepotrivit { background: var(--st-closed-bg); color: var(--st-closed-fg); border-color: var(--st-closed-bd); text-decoration: line-through; text-decoration-thickness: 1px; }
.pot--necunoscut { background: var(--c-surface-3); color: var(--c-text-3); }
.pot--nepotrivit::before { opacity: .5; }
