/* ==========================================================================
   FreshImpact – core.css
   Tokens, reset, bază și componente comune tuturor zonelor (butoane, badge-uri,
   formulare, carduri, alerte, statusuri, tab-uri, tabele, dialoguri, timeline,
   pași, meniuri etc.). Se încarcă înaintea front.css / panou.css / picker.css.
   Lista claselor și regulile de folosire: docs/CSS.md

   Culorile vin din setări (culoare primară + secundară). În PHP se injectează
   --brand și --accent pe :root; toate nuanțele se calculează din ele.
     --brand  = identitatea (verde FreshImpact): header, bannere, stări active, linkuri
     --accent = acțiunile (coral FreshImpact): butoane principale, coș, reduceri, prețuri promo
   Breakpoints: 640 / 768 / 1024 / 1280 (min-width).
   ========================================================================== */

:root {
  /* Brand – verde FreshImpact (#089a6b) */
  --brand: #089a6b;
  --brand-contrast: #fff;
  --brand-hover: color-mix(in srgb, var(--brand) 88%, #000);
  --brand-active: color-mix(in srgb, var(--brand) 76%, #000);
  --brand-ink: color-mix(in srgb, var(--brand) 78%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-soft-2: color-mix(in srgb, var(--brand) 16%, #fff);
  --brand-border: color-mix(in srgb, var(--brand) 32%, #fff);

  /* Accent – coral FreshImpact (#eb473f); #d63a31 păstrează contrast AA cu text alb */
  --accent: #d63a31;
  --accent-bright: #eb473f;
  --accent-contrast: #fff;
  --accent-hover: color-mix(in srgb, var(--accent) 86%, #000);
  --accent-ink: color-mix(in srgb, var(--accent) 88%, #000);
  --accent-soft: #fdeceb;
  --accent-soft-2: color-mix(in srgb, var(--accent) 16%, #fff);

  /* Neutre */
  --bg: #f3f4f6;
  --surface: #fff;
  --surface-2: #f7f8f9;
  --surface-3: #eef0f3;
  --line: #e6e8ec;
  --line-strong: #d3d7de;
  --ink: #161922;
  --ink-2: #394049;
  --muted: #5d6470;
  --subtle: #8b919c;

  /* Semantice */
  --success: #11805a;
  --success-soft: #e6f4ee;
  --warning: #a95a06;
  --warning-soft: #fff3e2;
  --danger: #bf1f2a;
  --danger-soft: #fdecec;
  --info: #1b5fc4;
  --info-soft: #e9f0fc;
  --promo: #ffd23f;
  --promo-ink: #1a1500;

  /* Statusuri comandă (badge .status). „Gata de ridicare” folosește --brand-ink. */
  --st-noua: #1b5fc4;
  --st-noua-soft: #e9f0fc;
  --st-acceptata: #6a3fc1;
  --st-acceptata-soft: #f1ebfc;
  --st-pregatire: #7a5200;
  --st-pregatire-soft: #fff1c7;
  --st-pregatire-dot: #e0a000;
  --st-ridicata: #1f5a5a;
  --st-ridicata-soft: #e2eeee;
  --st-anulata: #5d6470;
  --st-anulata-soft: #eef0f3;
  --st-neridicata: #97461b;
  --st-neridicata-soft: #fbe9dd;

  /* Tipografie */
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: clamp(20px, 1.2vw + 14px, 26px);
  --fs-2xl: clamp(26px, 2.2vw + 14px, 40px);
  /* Minimul pentru câmpurile de formular; pe ecrane tactile e 16px, altfel iOS mărește pagina la focus */
  --fs-input-min: 0px;

  /* Formă */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.06);
  --shadow: 0 1px 3px rgb(16 24 40 / 0.05), 0 8px 24px rgb(16 24 40 / 0.07);
  --shadow-lg: 0 16px 48px rgb(16 24 40 / 0.16);

  /* Layout */
  --container: 1320px;
  --gutter: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}
@media (pointer: coarse) {
  :root { --fs-input-min: 16px; }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }
ul[class],
ol[class] { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, #fff);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.tabular { font-variant-numeric: tabular-nums; }
.text-muted { color: var(--muted); }

/* ---------- Iconițe (SVG inline, stil Lucide) ---------- */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--xs { width: 14px; height: 14px; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 28px; height: 28px; }

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn--soft:hover { background: var(--accent); color: var(--accent-contrast); }

.btn--brand { background: var(--brand-ink); color: var(--brand-contrast); }
.btn--brand:hover { background: var(--brand-active); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2a2e36; }

.btn--outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); }

.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: #f1f1f1; }

.btn--ghost { color: var(--ink); }
.btn--ghost:hover { background: var(--surface-3); }

.btn--on-brand {
  border-color: color-mix(in srgb, var(--brand-contrast) 45%, transparent);
  color: var(--brand-contrast);
}
.btn--on-brand:hover { background: color-mix(in srgb, var(--brand-contrast) 12%, transparent); }

.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-sm); }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: var(--fs-md); }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
.btn--icon.btn--sm { width: 36px; }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Badge-uri ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.badge--discount { background: var(--accent); color: var(--accent-contrast); }
.badge--brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge--promo { background: var(--promo); color: var(--promo-ink); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--neutral { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.badge--count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-contrast);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subtle);
  flex: none;
}
.dot--open {
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

/* ---------- Chips ---------- */
.chips {
  display: flex;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.chip:hover { border-color: var(--ink-2); }
.chip__count { color: var(--muted); font-weight: 600; }
.chip--active,
.chip[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.chip--active .chip__count,
.chip[aria-current="page"] .chip__count { color: rgb(255 255 255 / 0.7); }

/* ---------- Formulare ---------- */
.input,
.select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: max(var(--fs-base), var(--fs-input-min));
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft-2);
}
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23394049' stroke-width='2' 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 12px center;
  background-size: 18px;
  cursor: pointer;
}
.select--sm { height: 38px; font-size: max(14px, var(--fs-input-min)); font-weight: 600; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  accent-color: var(--brand);
  cursor: pointer;
}
.check__count { margin-left: auto; color: var(--subtle); font-size: var(--fs-sm); }

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.switch input {
  appearance: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease);
}
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Stepper cantitate ---------- */
.qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-contrast);
}
.qty__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.qty__btn:hover { background: rgb(0 0 0 / 0.12); }
.qty__input {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: max(var(--fs-base), var(--fs-input-min));
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty__input:focus-visible { outline-color: #fff; outline-offset: -3px; }

/* ---------- Preț ---------- */
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  font-variant-numeric: tabular-nums;
}
.price__now {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.price__now small { font-size: 13px; font-weight: 700; }
.price__now--promo { color: var(--accent); }
.price__old {
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: line-through;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.breadcrumbs li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- Secțiuni ---------- */
.section { padding-block: 28px; }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section__head > :first-child { min-width: 0; }
.section__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section__sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.section__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 800;
}
.section__link:hover { text-decoration: underline; }

@media (min-width: 1024px) {
  .section { padding-block: 36px; }
  .section__head { margin-bottom: 20px; }
}

/* ==========================================================================
   Componente comune pentru toate zonele (front, panou, picker)
   Exemple și markup: docs/CSS.md
   ========================================================================== */

/* ---------- Tipografie și layout utilitar ---------- */
.heading {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.heading--1 { font-size: var(--fs-2xl); letter-spacing: -0.03em; line-height: 1.1; }
.heading--2 { font-size: var(--fs-xl); }
.heading--3 { font-size: var(--fs-lg); letter-spacing: -0.01em; line-height: 1.3; }
.heading--4 { font-size: var(--fs-md); letter-spacing: -0.01em; line-height: 1.35; }

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.lead { font-size: var(--fs-md); color: var(--ink-2); }
.text-sm { font-size: 14px; }
.text-xs { font-size: var(--fs-sm); }
.text-strong { font-weight: 800; }
.text-right { text-align: right; }
.mono { font-family: var(--font-mono); font-variant-ligatures: none; }

.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.stack--xs { gap: 6px; }
.stack--sm { gap: 10px; }
.stack--lg { gap: 24px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cluster--sm { gap: 6px; }
.cluster--between { justify-content: space-between; }
.cluster--end { justify-content: flex-end; }

/* Link în text */
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover { text-decoration-thickness: 2px; }
.link--muted { color: var(--ink-2); font-weight: 600; }

/* Butoane suplimentare */
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 86%, #000); }
.btn--danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn--danger-soft:hover { background: var(--danger); color: #fff; }
.btn.is-copied { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }

/* Badge-uri suplimentare */
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- Tag (etichetă mică, neutră) ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tag--outline { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tag--mono { font-family: var(--font-mono); font-weight: 600; font-variant-ligatures: none; }

/* ---------- Status comandă ---------- */
.status {
  --st-bg: var(--surface-3);
  --st-ink: var(--ink-2);
  --st-dot: currentColor;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px 0 9px;
  border-radius: var(--radius-pill);
  background: var(--st-bg);
  color: var(--st-ink);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--st-dot);
}
.status--noua { --st-bg: var(--st-noua-soft); --st-ink: var(--st-noua); }
.status--acceptata { --st-bg: var(--st-acceptata-soft); --st-ink: var(--st-acceptata); }
.status--in-pregatire { --st-bg: var(--st-pregatire-soft); --st-ink: var(--st-pregatire); --st-dot: var(--st-pregatire-dot); }
.status--pregatita {
  --st-bg: var(--brand-ink);
  --st-ink: var(--brand-contrast);
  --st-dot: var(--brand-contrast);
  box-shadow: 0 0 0 3px var(--brand-soft-2);
}
.status--pregatita::before { box-shadow: 0 0 0 3px rgb(255 255 255 / 0.3); }
.status--ridicata { --st-bg: var(--st-ridicata-soft); --st-ink: var(--st-ridicata); }
.status--respinsa { --st-bg: var(--danger-soft); --st-ink: var(--danger); }
.status--anulata { --st-bg: var(--st-anulata-soft); --st-ink: var(--st-anulata); --st-dot: var(--subtle); }
.status--neridicata { --st-bg: var(--st-neridicata-soft); --st-ink: var(--st-neridicata); }
.status--lg { height: 34px; gap: 8px; padding: 0 15px 0 13px; font-size: 14px; }

/* ---------- Formulare: câmpuri ---------- */
.field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.field__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.field__label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.field__req { color: var(--danger); font-weight: 800; }
.field__optional { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.field__help { font-size: var(--fs-sm); color: var(--muted); }
.field__error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--danger);
}
.field__error .icon { margin-top: 1px; }

.textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: max(var(--fs-base), var(--fs-input-min));
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.textarea::placeholder { color: var(--muted); opacity: 1; }
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft-2);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background-color: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}
.input[readonly],
.textarea[readonly] { background-color: var(--surface-2); }

.field--error .input,
.field--error .select,
.field--error .textarea,
.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] { border-color: var(--danger); }
.field--error .input:focus,
.field--error .select:focus,
.field--error .textarea:focus,
.input[aria-invalid="true"]:focus,
.select[aria-invalid="true"]:focus,
.textarea[aria-invalid="true"]:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, #fff);
}

/* Input cu iconiță, sufix text sau buton (ex. arată parola) */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.input-group > .input { flex: 1; min-width: 0; }
.input-group__icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}
.input-group__addon {
  position: absolute;
  right: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}
.input-group__btn {
  position: absolute;
  right: 4px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
}
.input-group__btn:hover { background: var(--surface-3); color: var(--ink); }
.input-group--icon > .input { padding-left: 44px; }
.input-group--addon > .input { padding-right: 52px; }
.input-group--btn > .input { padding-right: 48px; }

/* Grilă de formular: 1 coloană pe mobil, 2 de la 640px */
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.form-grid__full { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Fieldset (legend = titlu de grup) */
.fieldset {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.fieldset__legend {
  float: left;
  width: 100%;
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.fieldset__desc { margin-top: -8px; font-size: 14px; color: var(--muted); }
.fieldset--card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
@media (min-width: 768px) {
  .fieldset--card { padding: 24px; }
}

/* Opțiuni tip card (radio / checkbox cu titlu și descriere) */
.choices { display: grid; gap: 10px; }
@media (min-width: 640px) {
  .choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.choice:hover { border-color: var(--ink-2); }
.choice__input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--brand);
  cursor: pointer;
}
.choice__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--ink-2);
}
.choice__body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.choice__title { font-size: var(--fs-base); font-weight: 800; line-height: 1.35; }
.choice__desc { font-size: var(--fs-sm); color: var(--muted); }
.choice__aside { flex: none; font-size: 14px; font-weight: 800; color: var(--ink); }
.choice:has(.choice__input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.choice:has(.choice__input:checked) .choice__icon { background: var(--brand-soft-2); color: var(--brand-ink); }
.choice:has(.choice__input:checked) .choice__aside { color: var(--brand-ink); }
.choice:has(.choice__input:disabled) { opacity: 0.55; cursor: not-allowed; }

/* Chip-uri radio (ex. intervale de ridicare) */
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chip { position: relative; display: inline-flex; }
.choice-chip__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice-chip__input:disabled { cursor: not-allowed; }
.choice-chip__box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 6px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.choice-chip__meta { font-size: 11px; font-weight: 700; color: var(--muted); }
.choice-chip:hover .choice-chip__box { border-color: var(--ink-2); }
.choice-chip__input:checked + .choice-chip__box {
  border-color: var(--brand-ink);
  background: var(--brand-ink);
  color: var(--brand-contrast);
}
.choice-chip__input:checked + .choice-chip__box .choice-chip__meta { color: rgb(255 255 255 / 0.85); }
.choice-chip__input:focus-visible + .choice-chip__box {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, #fff);
  outline-offset: 2px;
}
.choice-chip__input:disabled + .choice-chip__box {
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
}
.choice-chip__input:disabled + .choice-chip__box .choice-chip__label { text-decoration: line-through; }
.choice-chip:hover .choice-chip__input:disabled + .choice-chip__box { border-color: var(--line-strong); }

/* Zonă de încărcare fișiere */
.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.dropzone:hover,
.dropzone--active { border-color: var(--brand); background: var(--brand-soft); }
.dropzone:focus-within {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, #fff);
  outline-offset: 2px;
}
.dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}
.dropzone__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--brand-ink);
  box-shadow: var(--shadow-sm);
}
.dropzone__title { font-weight: 800; }
.dropzone__help { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Card ---------- */
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.card--flat { border-color: transparent; }
.card--raised { border-color: transparent; box-shadow: var(--shadow); }
.card--link { transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.card--link:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-2px); }
.card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.card__header > :first-child { min-width: 0; }
.card__title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; }
.card__sub { margin-top: 2px; font-size: var(--fs-sm); color: var(--muted); }
.card__body { flex: 1; min-width: 0; padding: 18px; }
.card__body--flush { padding: 0; }
.card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) {
  .card__header { padding: 18px 24px; }
  .card__body { padding: 22px 24px; }
  .card__body--flush { padding: 0; }
  .card__footer { padding: 16px 24px; }
}
.card--pad-lg .card__body { padding: 24px 20px; }
@media (min-width: 768px) {
  .card--pad-lg .card__body { padding: 32px; }
}

/* ---------- Alertă ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--alert-line, var(--line));
  border-radius: var(--radius);
  background: var(--alert-bg, var(--surface-2));
  color: var(--ink);
  font-size: 14px;
}
.alert__icon { flex: none; margin-top: 1px; color: var(--alert-ink, var(--ink-2)); }
.alert__content { display: grid; gap: 3px; flex: 1; min-width: 0; }
.alert__title { font-size: var(--fs-base); font-weight: 800; line-height: 1.35; }
.alert__text { color: var(--ink-2); }
.alert__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.alert--info { --alert-bg: var(--info-soft); --alert-line: color-mix(in srgb, var(--info) 22%, #fff); --alert-ink: var(--info); }
.alert--success { --alert-bg: var(--success-soft); --alert-line: color-mix(in srgb, var(--success) 24%, #fff); --alert-ink: var(--success); }
.alert--warning { --alert-bg: var(--warning-soft); --alert-line: color-mix(in srgb, var(--warning) 26%, #fff); --alert-ink: var(--warning); }
.alert--danger { --alert-bg: var(--danger-soft); --alert-line: color-mix(in srgb, var(--danger) 22%, #fff); --alert-ink: var(--danger); }

/* ---------- Tab-uri ---------- */
.tabs { min-width: 0; }
.tabs__list {
  position: relative;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 46px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.tabs__tab:hover { color: var(--ink); }
.tabs__tab::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.tabs__tab[aria-selected="true"],
.tabs__tab[aria-current="page"] { color: var(--ink); }
.tabs__tab[aria-selected="true"]::after,
.tabs__tab[aria-current="page"]::after { background: var(--brand); }
.tabs__tab:focus-visible { outline-offset: -3px; }
.tabs__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.tabs__tab[aria-selected="true"] .tabs__count,
.tabs__tab[aria-current="page"] .tabs__count { background: var(--brand-soft-2); color: var(--brand-ink); }
.tabs__panel { padding-top: 20px; }
.tabs__panel:focus-visible { outline-offset: 4px; }

/* ---------- Tabel ---------- */
.table-wrap {
  position: relative; /* ține în interior textul .visually-hidden (altfel creează scroll orizontal pe pagină) */
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table-wrap--flush { border: 0; border-radius: 0; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table--wide { min-width: 760px; }
.table th,
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.table thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table tbody th { font-weight: 700; }
.table tbody tr { transition: background-color 0.15s var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tfoot th,
.table tfoot td {
  border-top: 1px solid var(--line-strong);
  border-bottom: 0;
  background: var(--surface-2);
  font-weight: 800;
}
.table .table__num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.table .table__actions { text-align: right; white-space: nowrap; }
.table__actions > * + * { margin-left: 6px; }
.table .table__check { width: 44px; padding-right: 0; }
.table__primary { font-weight: 800; color: var(--ink); white-space: nowrap; }
a.table__primary:hover { color: var(--brand-ink); text-decoration: underline; }
.table .table__nowrap { white-space: nowrap; }
.table__muted { display: block; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.table__product {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.table__row--selected { background: var(--brand-soft); }
.table__row--muted > * { color: var(--muted); }
.table__row--muted .thumb img { opacity: 0.45; filter: grayscale(1); }
.table--compact th,
.table--compact td { padding: 8px 12px; }

/* ---------- Dialog (<dialog> nativ) ---------- */
.dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialog-in 0.18s var(--ease);
}
.dialog::backdrop { background: rgb(12 14 18 / 0.55); }
.dialog--sm { width: min(420px, calc(100vw - 32px)); }
.dialog--lg { width: min(720px, calc(100vw - 32px)); }
.dialog--inline {
  position: static;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  margin: 0;
  box-shadow: var(--shadow);
  animation: none;
}
.dialog__form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.dialog__title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; }
.dialog__sub { margin-top: 2px; font-size: var(--fs-sm); color: var(--muted); }
.dialog__close { margin: -6px -8px 0 0; }
.dialog__body {
  display: grid;
  gap: 16px;
  flex: 1;
  min-height: 0;
  padding: 18px 20px;
  overflow-y: auto;
}
.dialog__footer {
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
@media (max-width: 479.98px) {
  .dialog__footer > .btn { flex: 1 1 auto; }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
}

/* ---------- Timeline (vertical) ---------- */
.timeline { display: grid; }
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 22px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  top: 32px;
  bottom: 4px;
  left: 13px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.timeline__item:last-child::before { display: none; }
.timeline__item--done::before { background: var(--brand); }
.timeline__marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-contrast);
}
.timeline__item--done .timeline__marker { border-color: var(--brand); background: var(--brand); }
.timeline__item--current .timeline__marker {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft-2);
}
.timeline__item--current .timeline__marker::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}
.timeline__item--failed .timeline__marker { border-color: var(--danger); background: var(--danger); color: #fff; }
.timeline__content { min-width: 0; padding-top: 3px; }
.timeline__label { font-weight: 800; line-height: 1.35; }
.timeline__item--current .timeline__label { color: var(--brand-ink); }
.timeline__item--pending .timeline__label { color: var(--muted); font-weight: 700; }
.timeline__item--failed .timeline__label { color: var(--danger); }
.timeline__time {
  margin-top: 2px;
  font-size: var(--fs-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline__note {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.timeline--compact .timeline__item { padding-bottom: 14px; }

/* ---------- Pași (checkout) ---------- */
.steps {
  display: flex;
  align-items: center;
  gap: 8px;
}
.steps__item {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.steps__item:last-child { flex: none; }
.steps__item:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}
.steps__item--done:not(:last-child)::after { background: var(--brand); }
.steps__link { display: flex; align-items: center; gap: 8px; min-width: 0; }
.steps__link:hover .steps__label { text-decoration: underline; }
.steps__num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.steps__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps__item--done { color: var(--ink-2); }
.steps__item--done .steps__num { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.steps__item--current { color: var(--ink); font-weight: 800; }
.steps__item--current .steps__num {
  border-color: var(--brand-ink);
  background: var(--brand-ink);
  color: var(--brand-contrast);
  box-shadow: 0 0 0 4px var(--brand-soft-2);
}
@media (max-width: 479.98px) {
  /* Pe telefon doar pasul curent are etichetă; primește lățimea necesară ca să nu fie tăiat */
  .steps__item--current { flex: 1 0 auto; }
  .steps__item:not(.steps__item--current) .steps__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Listă cheie / valoare ---------- */
.kv { display: grid; }
.kv__row {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
  gap: 4px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.kv__row:last-child { border-bottom: 0; }
.kv__key { color: var(--muted); font-weight: 600; }
.kv__value {
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.kv--stacked .kv__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.kv--compact .kv__row { padding: 5px 0; border-bottom: 0; }
@media (min-width: 768px) {
  .kv--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .kv--2col .kv__row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}

/* ---------- Stare goală ---------- */
.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
}
.empty-state__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.empty-state__title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.empty-state__text { max-width: 46ch; color: var(--muted); }
.empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.empty-state--neutral .empty-state__icon { background: var(--surface-3); color: var(--ink-2); }
.empty-state--danger .empty-state__icon { background: var(--danger-soft); color: var(--danger); }

/* ---------- Avatar și persoană ---------- */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-soft-2);
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.avatar--xl { width: 72px; height: 72px; font-size: 22px; }
.avatar--accent { background: var(--accent-soft); color: var(--accent-ink); }
.avatar--neutral { background: var(--surface-3); color: var(--ink-2); }
.avatar--ink { background: var(--ink); color: #fff; }

.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person__text { display: grid; min-width: 0; line-height: 1.3; }
.person__name { overflow: hidden; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.person__meta { overflow: hidden; font-size: var(--fs-sm); color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Progres (<progress>) ---------- */
.progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--brand);
  -webkit-appearance: none;
  appearance: none;
}
.progress::-webkit-progress-bar { border-radius: inherit; background: var(--surface-3); }
.progress::-webkit-progress-value { border-radius: inherit; background: var(--brand); transition: width 0.3s var(--ease); }
.progress::-moz-progress-bar { border-radius: inherit; background: var(--brand); }
.progress--accent { color: var(--accent); }
.progress--accent::-webkit-progress-value { background: var(--accent); }
.progress--accent::-moz-progress-bar { background: var(--accent); }
.progress--lg { height: 12px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- Miniatură produs ---------- */
.thumb {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  overflow: hidden;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb--sm { width: 40px; height: 40px; padding: 3px; border-radius: 10px; }
.thumb--lg { width: 72px; height: 72px; padding: 6px; border-radius: 14px; }
.thumb--muted img { opacity: 0.45; filter: grayscale(1); }

/* ---------- Paginare ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.pagination__info { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pagination__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagination__link {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pagination__link:hover { border-color: var(--ink-2); color: var(--ink); }
.pagination__link[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.pagination__link[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.pagination__gap { min-width: 24px; color: var(--muted); text-align: center; }

/* ---------- Meniu dropdown (<details>) ---------- */
.menu { position: relative; display: inline-block; }
.menu__trigger { list-style: none; cursor: pointer; }
.menu__trigger::-webkit-details-marker { display: none; }
.menu__trigger::marker { content: ""; }
.menu[open] > .menu__trigger { background: var(--surface-3); }
.menu__chevron { transition: transform 0.15s var(--ease); }
.menu[open] .menu__chevron { transform: rotate(180deg); }
.menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  display: grid;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.menu--start .menu__panel { right: auto; left: 0; }
.menu__label {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.menu__item .icon { color: var(--muted); }
.menu__item:hover,
.menu__item:focus-visible { background: var(--surface-3); }
.menu__item--danger,
.menu__item--danger .icon { color: var(--danger); }
.menu__item--danger:hover { background: var(--danger-soft); }
.menu__sep { height: 1px; margin: 6px 4px; border: 0; background: var(--line); }

/* ---------- Separator ---------- */
.divider { height: 1px; margin: 20px 0; border: 0; background: var(--line); }
.divider--tight { margin: 12px 0; }
.divider--text {
  display: flex;
  align-items: center;
  gap: 12px;
  height: auto;
  background: none;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.divider--text::before,
.divider--text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Indicator „live” (tracking în timp real) ---------- */
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
}
.live__dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
}
.live__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand);
  animation: live-pulse 1.8s var(--ease) infinite;
}
.live--paused .live__dot { background: var(--subtle); }
.live--paused .live__dot::after { display: none; }
@keyframes live-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  80%,
  100% { transform: scale(2.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .live__dot::after { animation: none; opacity: 0; }
  .live__dot { box-shadow: 0 0 0 4px var(--brand-soft-2); }
}

/* ---------- Câmp de copiat (parolă comandă, link unic) ---------- */
.copy-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.copy-field__value {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-ligatures: none;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.copy-field__btn { flex: none; }
.copy-field--lg .copy-field__value { font-size: 20px; letter-spacing: 0.04em; }
.copy-field--truncate .copy-field__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Statistici (panou) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 1024px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
.stat {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.stat__label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.stat__value {
  font-size: clamp(22px, 1.2vw + 16px, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat__meta { font-size: var(--fs-sm); color: var(--muted); }
.stat__delta { font-weight: 800; }
.stat__delta--up { color: var(--success); }
.stat__delta--down { color: var(--danger); }

/* ---------- Antet de pagină (titlu + acțiuni) ---------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 20px;
}
.page-head__main { display: grid; gap: 4px; min-width: 0; }
.page-head__title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.page-head__sub { margin-top: 2px; font-size: 14px; color: var(--muted); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Variantă de machetă (stări alternative) ---------- */
.mockup-variant {
  position: relative;
  margin-block: 32px;
  padding: 48px 16px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-3) 45%, transparent);
}
.mockup-variant__caption {
  position: absolute;
  top: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 28px);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .mockup-variant { padding: 52px 24px 24px; }
}
