/* ══════════════════════════════════════════════════════════════════
   TABLA INTERACTIVĂ — UI școlar (non-editor)
   Versiune: "Classroom-grade polish" — adaptat pentru lucru la tablă
   interactivă cu elevii care ies în fața tablei.

   Principii cheie:
   ──────────────────────────────────────────────────────────────────
   • Touch targets 56-64px pentru acțiuni primare (nu 32-40px)
   • Zero interacțiuni hover-only (revealed pe :hover nu funcționează
     pe touch — toate acțiunile rămân vizibile permanent)
   • Tipografie mai mare (17px bază, scale-up pe ecrane >1920px)
   • Contrast WCAG AA+ (text-muted bumped de la #64748b → #475569)
   • Device-aware: @media (pointer: coarse) mărește totul pe touch
   • Tokens semantici — utility classes pentru eliminarea stilurilor
     inline care existau în fiecare view (peste 150 de locuri)
   • Compatibilitate 100% cu clasele existente (alias-uri pentru
     variabilele vechi, --muted include fix-ul bug-ului anterior)
   ══════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS — palette „kids book illustration"
   ════════════════════════════════════════════════════════════════
   Rebrand 2026 spre estetică ilustrativă playful:
   • Background peach (#fff5ed) în loc de slate
   • Accent galben sun (#fcd34d) pentru active states
   • Primary turcoaz/teal (#14b8a6) pentru CTA-uri
   • Border negru gros (#1c1917) pentru emphasis (cards, buttons, chips)
   • Text negru închis în loc de slate-900
   • Toate componentele adoptă automat noua paletă prin override la
     variabilele existente — fără rewrite al fiecărui selector.
   ════════════════════════════════════════════════════════════════ */
:root {
  /* ─── Brand primary: rose (CTA-uri, butoane primary, accenturi cheie) ─── */
  --color-primary:          #14b8a6;        /* teal 500 — CTA principal turcoaz mai închis */
  --color-primary-strong:   #0f766e;        /* teal 700 — text on light */
  --color-primary-tint:     #99f6e4;        /* teal 200 — hover bg subtle */
  --color-primary-soft:     #f0fdfa;        /* teal 50  — bg foarte deschis */

  /* ─── Accent: galben sun (active states, highlights) ─── */
  --color-accent:           #fcd34d;        /* amber 300 — pill activ galben */
  --color-accent-strong:    #92400e;        /* amber 800 — text on yellow */
  --color-accent-soft:      #fef3c7;        /* amber 100 */

  /* ─── Success/danger/warning — păstrate ca semantic colors ─── */
  --color-success:          #10b981;        /* emerald 500 — chip „gratis" */
  --color-success-strong:   #047857;        /* emerald 700 */
  --color-success-soft:     #d1fae5;        /* emerald 100 */
  --color-danger:           #e11d48;        /* rose 600 — distinct de primary */
  --color-danger-strong:    #9f1239;
  --color-danger-soft:      #ffe4e6;
  --color-warning:           #f59e0b;
  --color-warning-strong:   #92400e;
  --color-warning-soft:     #fef3c7;

  /* Culori pe materii — lăsăm violet/blue/etc. pt. distinctivitate vizuală
     (chips dot color-coded continuă să funcționeze) */
  --color-subject-math:     #2563eb;
  --color-subject-reading:  #7c3aed;
  --color-subject-writing:  #db2777;
  --color-subject-science:  #059669;

  /* ─── Text — negru închis (stone) în loc de slate ─── */
  --color-text:             #1c1917;        /* stone 900 — text dominant */
  --color-text-muted:       #44403c;        /* stone 700 */
  --color-text-faded:       #78716c;        /* stone 500 */
  --color-text-invert:      #ffffff;
  --color-text-strong:      #0c0a09;        /* stone 950 — emphasis */

  /* ─── Surfaces — white page, peach as accent on cards ─── */
  --color-bg:               #ffffff;        /* alb pur — fundal pagină */
  --color-surface:          #ffffff;        /* alb — cards default */
  --color-surface-2:        #fff7ed;        /* peach light — cards de accent */
  --color-surface-peach:    #fff5ed;        /* peach mai distinct — toolbar, panels */
  --color-surface-hover:    #fed7aa40;      /* peach hover tint (orange-200/25%) */

  /* ─── Borders ─── */
  /*
   * IMPORTANT decizie de design:
   * - --color-border: rămâne subtle (stone 200) pentru separatorii interni
   *   ai componentelor existente (între rânduri tabel, separatori în
   *   user-menu, etc.) ca să nu scoatem chenare negre groase peste tot.
   * - --color-border-bold: NOUĂ — folosită explicit pe pills, butoane,
   *   cards principale care vor estetica „illustrated" cu contur negru.
   * Componentele rebrandate (pills nav, butoane, cards) referențiază
   * --color-border-bold; restul rămân nealterate.
   */
  --color-border:           #e7e5e4;        /* stone 200 — separator subtle */
  --color-border-soft:      #f5f5f4;        /* stone 100 */
  --color-border-strong:    #d6d3d1;        /* stone 300 */
  --color-border-bold:      #1c1917;        /* stone 900 — contur ilustrativ */
  --color-overlay:          rgba(28, 25, 23, 0.55);

  /* ─── Border widths — groase, ilustrative ─── */
  --border-thick:           2px;             /* border standard pe pills/cards */
  --border-thicker:         2px;             /* emphasis pe butoane primary */

  /* ─── Touch targets — păstrate ─── */
  --tap-xs:  36px;
  --tap-sm:  44px;
  --tap-md:  52px;
  --tap-lg:  60px;
  --tap-xl:  72px;

  /* ─── Spacing — păstrat ─── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ─── Colțuri rotunjite ─── */
  --radius-xs:    6px;
  --radius-sm:    10px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --radius-full:  9999px;

  /* ─── Tipografie ─── */
  --font-sans: 'Nunito', ui-rounded, -apple-system, BlinkMacSystemFont,
               'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;

  --text-xs:    13px;     /* metadata — bumped de la 11-12px */
  --text-sm:    14px;     /* form labels, badge */
  --text-base:  16px;     /* body default — bumped de la 15px */
  --text-md:    17px;     /* content comfortable */
  --text-lg:    19px;
  --text-xl:    22px;
  --text-2xl:   26px;
  --text-3xl:   32px;
  --text-4xl:   42px;
  --text-hero:  clamp(32px, 5vw, 56px);

  --leading-tight:  1.15;
  --leading-snug:   1.35;
  --leading-base:   1.55;
  --leading-relaxed: 1.7;

  /* ─── Umbre ─── */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
  --shadow-sm: 0 2px 6px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 14px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.12), 0 4px 8px rgba(15,23,42,.06);
  --shadow-xl: 0 24px 48px -12px rgba(15,23,42,.2), 0 8px 16px rgba(15,23,42,.08);
  --shadow-focus: 0 0 0 4px rgba(79, 70, 229, 0.22);

  /* ─── Gradienturi ─── */
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --gradient-accent:  linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-warm:    linear-gradient(135deg, #eef2ff 0%, #fef3c7 55%, #d1fae5 100%);
  --gradient-surface: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);

  /* ─── Tranziții ─── */
  --duration-fast:  150ms;
  --duration:       220ms;
  --duration-slow:  320ms;
  --ease-out:       cubic-bezier(.2,.7,.3,1);
  --ease-spring:    cubic-bezier(.34,1.56,.64,1);

  /* ─── Z-index stack ─── */
  --z-sticky:   50;
  --z-overlay:  100;
  --z-modal:    200;
  --z-toast:    300;
}

/* ═══ ALIAS-URI BACKWARDS-COMPAT ═══
   Păstrăm variabilele vechi ca să nu rupem nimic în codul existent
   și reparăm bug-ul --muted (care nu era definit nicăieri).              */
:root {
  --primary:        var(--color-primary);
  --primary-dark:   var(--color-primary-strong);
  --primary-soft:   var(--color-primary-tint);
  --primary-50:     var(--color-primary-soft);
  --accent:         var(--color-accent);
  --accent-soft:    var(--color-accent-soft);
  --success:        var(--color-success);
  --success-soft:   var(--color-success-soft);
  --danger:         var(--color-danger);
  --danger-soft:    var(--color-danger-soft);
  --warning:        var(--color-warning);
  --warning-soft:   var(--color-warning-soft);
  --math:           var(--color-subject-math);
  --reading:        var(--color-subject-reading);
  --writing:        var(--color-subject-writing);

  --text:           var(--color-text);
  --text-muted:     var(--color-text-muted);
  --text-light:     var(--color-text-faded);
  --muted:          var(--color-text-muted);      /* FIX BUG: nu exista înainte */
  --bg:             var(--color-bg);
  --surface:        var(--color-surface);
  --border:         var(--color-border);
  --border-strong:  var(--color-border-strong);

  --r-xs:   var(--radius-xs);
  --r-sm:   var(--radius-sm);
  --r-md:   var(--radius-md);
  --r-lg:   var(--radius-lg);
  --r-xl:   var(--radius-xl);
  --r-full: var(--radius-full);

  --sh-xs:    var(--shadow-xs);
  --sh-sm:    var(--shadow-sm);
  --sh-md:    var(--shadow-md);
  --sh-lg:    var(--shadow-lg);
  --sh-hover: var(--shadow-lg);

  --gr-primary: var(--gradient-primary);
  --gr-accent:  var(--gradient-accent);
  --gr-hero:    var(--gradient-warm);
  --gr-card:    var(--gradient-surface);

  --font:       var(--font-sans);
  --dur-fast:   var(--duration-fast);
  --dur:        var(--duration);
  --ease:       var(--ease-spring);
}

/* ═══ DEVICE-AWARE SCALING ═══
   Pe smart boards mari (>=1920px) mărim text-ul și touch targets.
   Pe touch primary devices, forțăm butoane mai mari.                 */

@media (min-width: 1920px) {
  :root {
    --text-xs:    14px;
    --text-sm:    15px;
    --text-base:  18px;
    --text-md:    19px;
    --text-lg:    22px;
    --text-xl:    26px;
    --text-2xl:   30px;
    --text-3xl:   38px;
    --text-4xl:   52px;
  }
}

@media (pointer: coarse) {
  :root {
    --tap-xs: 44px;
    --tap-sm: 48px;
    --tap-md: 56px;
    --tap-lg: 64px;
    --tap-xl: 76px;
  }
}

/* ════════════════════════════════════════════════════════════════
   2. RESET + BASE
   ════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  font: var(--text-base)/var(--leading-base) var(--font-sans);
  color: var(--color-text);
  /* Fundal peach foarte deschis cu pattern decorativ subtil de papetărie școlară.
     Layered background:
     - Pattern SVG (caiet, riglă, stele, balon, inimi) — tile 600×600 repeat
     - Peach foarte light (#fff8f1) — la fund, dă tonalitatea generală
     Editorul (board.php) folosește body.editor-body care override acest stil. */
  background-color: #fff8f1;
  background-image: url("../assets/illustrations/bg-pattern.svg");
  background-repeat: repeat;
  background-size: 800px 800px;
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
p { text-wrap: pretty; }

a {
  color: var(--color-primary-strong);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--duration-fast);
}
a:hover { color: var(--color-primary); }

img, svg, video { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ════════════════════════════════════════════════════════════════
   3. UTILITY CLASSES
   Pentru eliminarea stilurilor inline din view-uri.
   ════════════════════════════════════════════════════════════════ */

/* ─── Text ─── */
.u-muted         { color: var(--color-text-muted) !important; }
.u-faded         { color: var(--color-text-faded) !important; }
.u-text          { color: var(--color-text) !important; }
.u-text-xs       { font-size: var(--text-xs); }
.u-text-sm       { font-size: var(--text-sm); }
.u-text-lg       { font-size: var(--text-lg); }
.u-nowrap        { white-space: nowrap; }
.u-truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-center        { text-align: center; }
.u-right         { text-align: right; }
.u-mono          { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.u-tabular       { font-variant-numeric: tabular-nums; }
.u-fw-600        { font-weight: 600; }
.u-fw-700        { font-weight: 700; }
.u-fw-800        { font-weight: 800; }

/* ─── Layout primitive ─── */
.u-stack         { display: flex; flex-direction: column; }
.u-stack > * + * { margin-top: var(--space-3); }
.u-stack-2 > * + * { margin-top: var(--space-2); }
.u-stack-4 > * + * { margin-top: var(--space-4); }
.u-cluster       { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.u-cluster-end   { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.u-mt-0          { margin-top: 0 !important; }
.u-mt-1          { margin-top: var(--space-1); }
.u-mt-2          { margin-top: var(--space-2); }
.u-mt-4          { margin-top: var(--space-4); }
.u-mb-0          { margin-bottom: 0 !important; }
.u-mb-2          { margin-bottom: var(--space-2); }
.u-mb-4          { margin-bottom: var(--space-4); }

.u-hide          { display: none !important; }
.u-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── Status dots (colorate pentru rows status) ─── */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
}
.status-dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}
.status-dot--ok     { color: var(--color-success); }
.status-dot--warn   { color: var(--color-warning); }
.status-dot--err    { color: var(--color-danger); }
.status-dot--muted  { color: var(--color-text-faded); }

/* ════════════════════════════════════════════════════════════════
   4. TOPBAR + USER MENU
   ════════════════════════════════════════════════════════════════ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-6);
  /* Alb solid → contrast clar față de peach-ul paginii (--color-bg #fff5ed).
     Topbar-ul devine un „strat plutitor" distinct, nu se topește în background. */
  background: var(--color-surface);
  /* Border bottom subtle stone + shadow stratificat pentru depth */
  border-bottom: 1.5px solid var(--color-border);
  box-shadow:
    0 1px 0 rgba(28, 25, 23, 0.04),
    0 4px 16px -8px rgba(28, 25, 23, 0.10),
    0 12px 32px -16px rgba(251, 113, 133, 0.12);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  min-height: var(--tap-sm);
}
.brand:hover { text-decoration: none; }
.brand:hover .brand__text-bold { color: var(--color-text); }
.brand:hover .brand__text-script { color: #ec4899; }

/* Container SVG neutru — nu mai aplicăm gradient/background, SVG-ul ilustrat
   are culorile sale fixe inline (negru cadru, roșu scribble, albastru, accente).
   Brand-ul are identitate vizuală fixă, nu se adaptează la theme. */
.brand__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand__icon svg { display: block; }

/* Text dual-style: „Tabla" sans-serif bold negru + „Interactivă" handwritten roz */
.brand__text {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}
.brand__text-bold {
  font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--color-text);
  letter-spacing: -0.01em;
  transition: color var(--duration-fast);
}
.brand__text-script {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 28px;
  color: #14b8a6; /* teal-500, matching scribble-ul din SVG */
  letter-spacing: 0.005em;
  transition: color var(--duration-fast);
  /* Aliniere optică — Caveat are baseline diferit de Nunito, ridicăm puțin */
  position: relative;
  top: 1px;
}

/* Pe ecrane înguste, ascund text-ul pentru a economisi spațiu — păstrez
   doar SVG-ul ilustrat ca recognition mark. */
@media (max-width: 540px) {
  .brand__text { display: none; }
  .brand__icon { width: 40px; height: 40px; }
  .brand__icon svg { width: 40px; height: 40px; }
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--color-surface);
  border-radius: 28px;
  /* Capsule cu border negru gros — estetică ilustrativă */
  border: var(--border-thick) solid var(--color-border-bold);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset,
              0 3px 0 -1px var(--color-border-bold),
              0 8px 16px -8px rgba(28, 25, 23, 0.20);
  font-size: var(--text-sm);
  box-sizing: border-box;
}
.topnav *, .topnav *::before, .topnav *::after { box-sizing: border-box; }

/* Link-uri navigare „Lecțiile mele" — pill cu active state galben */
.topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger) {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger):hover {
  background: var(--color-surface-hover);
  color: var(--color-text-strong);
  text-decoration: none;
}
.topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent);
}
/* Active state — pill GALBEN cu border negru gros (estetică ilustrativă) */
.topnav > a.is-active {
  background: var(--color-accent);
  color: var(--color-text-strong);
  font-weight: 600;
  border: var(--border-thick) solid var(--color-border-bold);
  padding: 7px 14px; /* ajustăm pt. compensa border-ul */
}

/* ─── Admin pill — verde mentă cu border negru ─── */
.topnav__admin-link {
  appearance: none;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 18px;
  background: var(--color-success-soft);
  color: #1c1917;  /* stone-900 — text negru pentru contrast maxim pe bg verde-pal */
  border: var(--border-thick) solid var(--color-border-bold);
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;  /* bold mai pronunțat pentru lizibilitate */
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.topnav__admin-link:hover {
  background: color-mix(in srgb, var(--color-success-soft) 70%, var(--color-success) 18%);
  color: #1c1917;
  text-decoration: none;
}
.topnav__admin-link:active { transform: translateY(1px); }
.topnav__admin-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-success);
}
.topnav__admin-link svg { color: var(--color-success-strong); flex-shrink: 0; }  /* iconul rămâne verde — accent vizual */

/* ─── User menu ─── */
.user-menu { position: relative; }
.user-menu__trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 0;
  background: transparent;
  border-radius: 18px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background-color 0.15s ease;
}
.user-menu__trigger:hover {
  background: var(--color-surface-hover);
}
.user-menu__trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent);
}
.user-menu.is-open .user-menu__trigger {
  background: var(--color-surface-hover);
}
/* Avatar gradient orange-rose — matching estetica ilustrativă */
.user-menu__avatar {
  width: 32px; height: 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fdba74, #fb7185);
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.user-menu__name {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--color-text-strong);
  line-height: 1;
}
.user-menu__trigger > svg {
  color: var(--color-text-faded);
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease, color 0.15s ease;
}
.user-menu.is-open .user-menu__trigger > svg {
  transform: rotate(180deg);
  color: var(--color-text);
}
.user-menu__panel {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
              0 12px 32px -12px rgba(15, 23, 42, 0.18);
  outline: 1px solid var(--color-border);
  outline-offset: -1px;
  z-index: var(--z-overlay);
  /* Stare implicită: ascuns; folosim opacity+transform în loc de display:none
     pentru animația smooth la deschidere */
  display: block;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.user-menu.is-open .user-menu__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.user-menu__header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}
.user-menu__email {
  font-size: 12px;
  color: var(--color-text-muted);
  word-break: break-all;
  font-weight: 500;
  line-height: 1.3;
}
.user-menu__plan {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  border-radius: var(--radius-full);
}
.user-menu__plan--premium {
  background: var(--color-accent-soft);
  color: var(--color-warning-strong);
}
.user-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.user-menu__item:hover {
  background: var(--color-surface-hover);
  text-decoration: none;
  color: var(--color-text-strong);
}
.user-menu__item svg {
  color: var(--color-text-faded);
  flex-shrink: 0;
  transition: color 0.12s ease;
}
.user-menu__item:hover svg {
  color: var(--color-text-strong);
}
.user-menu__item--danger { color: var(--color-danger); }
.user-menu__item--danger:hover {
  background: var(--color-danger-soft);
  color: var(--color-danger-strong);
}
.user-menu__item--danger svg { color: var(--color-danger); }
.user-menu__item--danger:hover svg { color: var(--color-danger-strong); }
.user-menu__badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--color-accent-soft);
  color: var(--color-warning-strong);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

/* ════════════════════════════════════════════════════════════════
   5. BUTTONS — school-grade touch targets
   ════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 var(--space-5);
  min-height: var(--tap-md);                   /* 52px baseline (60-64 pe touch) */
  border: 0;
  border-radius: var(--radius-md);
  font: 700 var(--text-sm) var(--font-sans);
  cursor: pointer;
  transition: transform var(--duration-fast),
              box-shadow var(--duration-fast),
              background var(--duration-fast),
              color var(--duration-fast),
              border-color var(--duration-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* Primary — cu "depth shadow" Duolingo-style */
.btn-primary {
  background: var(--color-primary);
  color: white;
  border: var(--border-thick) solid var(--color-border-bold);
  box-shadow: 0 2px 0 var(--color-border-bold), 0 6px 12px -4px rgba(28, 25, 23, 0.20);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--color-primary) 88%, var(--color-text-strong) 8%);
  box-shadow: 0 3px 0 var(--color-border-bold), 0 8px 16px -4px rgba(28, 25, 23, 0.25);
  color: white; text-decoration: none;
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--color-border-bold);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-text-strong);
  border: var(--border-thick) solid var(--color-border-bold);
  box-shadow: 0 2px 0 var(--color-border-bold), 0 6px 12px -4px rgba(28, 25, 23, 0.20);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 0 var(--color-border-bold), 0 8px 16px -4px rgba(28, 25, 23, 0.25);
  color: var(--color-text-strong); text-decoration: none;
}

.btn-ghost {
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--border-thick) solid var(--color-border-bold);
}
.btn-ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-strong);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
  border: var(--border-thick) solid var(--color-border-bold);
  box-shadow: 0 2px 0 var(--color-border-bold), 0 6px 12px -4px rgba(28, 25, 23, 0.20);
}
.btn-danger:hover {
  background: var(--color-danger-strong);
  transform: translateY(-1px);
  color: white; text-decoration: none;
}

.btn-google {
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  font-weight: 700;
}
.btn-google:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
  text-decoration: none;
}

.btn-block { width: 100%; }
.btn-sm    { min-height: var(--tap-xs); padding: 0 14px; font-size: var(--text-xs); }
.btn-lg    { min-height: var(--tap-lg); padding: 0 var(--space-8); font-size: var(--text-md); }

/* "Continuă ultima lecție" — acum un primary-style, nu ghost */
.btn-continue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--space-5);
  min-height: var(--tap-md);
  background: var(--color-primary-soft);
  border: 1.5px solid var(--color-primary-tint);
  border-radius: var(--radius-md);
  color: var(--color-primary-strong);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all var(--duration-fast);
}
.btn-continue:hover {
  background: var(--color-primary-tint);
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.btn-continue svg { transition: transform var(--duration-fast); }
.btn-continue:hover svg { transform: translateX(3px); }

/* Buton Icon-only — pt. close, delete, etc. */
.btn-icon {
  width: var(--tap-sm);
  height: var(--tap-sm);
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.btn-icon:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
  background: var(--color-surface-hover);
}
.btn-icon--danger { color: var(--color-danger); }
.btn-icon--danger:hover {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
  color: var(--color-danger-strong);
}

/* ════════════════════════════════════════════════════════════════
   6. FORM CONTROLS — 52-56px input-uri
   ════════════════════════════════════════════════════════════════ */

.field {
  margin-bottom: var(--space-4);
}
.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
  letter-spacing: .01em;
}
.field input,
.field select,
.field textarea,
.form-input {
  width: 100%;
  min-height: var(--tap-md);
  padding: 12px 16px;
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 14px;
  font: var(--text-md) var(--font-sans);
  background: var(--color-surface);
  color: var(--color-text);
  transition: box-shadow var(--duration-fast);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus,
.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent);
}
.field input::placeholder,
.form-input::placeholder {
  color: var(--color-text-faded);
}
.field input[type="number"] { font-variant-numeric: tabular-nums; }

select.form-input,
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 6 6 11 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 var(--space-4);
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox-row label {
  margin: 0;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--space-6) 0;
  color: var(--color-text-faded);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ─── Form row (folosit în modal) ─── */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-lbl {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}
.form-opt {
  font-size: var(--text-xs);
  color: var(--color-text-faded);
  font-weight: 500;
  margin-left: 4px;
}
.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faded);
  margin-top: 2px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
@media (max-width: 520px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ─── Drop zone pentru upload ─── */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--space-8) var(--space-4);
  min-height: 140px;
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-fast);
}
.dropzone:hover,
.dropzone--active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-primary);
  margin-bottom: 4px;
  box-shadow: var(--shadow-sm);
}
.dropzone__label {
  font-size: var(--text-sm);
  font-weight: 700;
}
.dropzone__label strong { color: var(--color-primary-strong); }
.dropzone__hint {
  font-size: var(--text-xs);
  color: var(--color-text-faded);
  font-weight: 500;
}
.dropzone--has-file {
  border-style: solid;
  border-color: var(--color-success);
  background: var(--color-success-soft);
  color: var(--color-success-strong);
}
.dropzone--has-file .dropzone__icon {
  background: var(--color-success-soft);
  color: var(--color-success-strong);
}
.dropzone__filename {
  font-size: var(--text-sm);
  font-weight: 700;
  color: inherit;
  display: none;
  word-break: break-all;
  max-width: 100%;
}
.dropzone--has-file .dropzone__filename { display: block; }
/* Când avem fișier, ascundem hint-ul redundant */
.dropzone--has-file .dropzone__hint { display: none; }

/* ════════════════════════════════════════════════════════════════
   7. FLASH + TOAST
   ════════════════════════════════════════════════════════════════ */

.flash {
  max-width: 920px;
  margin: var(--space-4) auto 0;
  padding: var(--space-4) var(--space-5);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 14px;
  font-size: var(--text-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: flashIn 280ms var(--ease-out);
  box-shadow: 0 2px 0 var(--color-border-bold);
}
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.flash--success { background: var(--color-success-soft); color: var(--color-success-strong); }
.flash--error   { background: var(--color-danger-soft);  color: var(--color-danger-strong); }
.flash--info    { background: var(--color-surface-peach); color: var(--color-primary-strong); }
.flash svg      { flex-shrink: 0; }

.flash__close {
  margin-left: auto;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  opacity: .65;
  transition: all var(--duration-fast);
  min-width: var(--tap-sm);
  min-height: var(--tap-sm);
  display: grid;
  place-items: center;
}
.flash__close:hover { opacity: 1; background: rgba(0,0,0,.05); }

/* ════════════════════════════════════════════════════════════════
   8. MODAL (replace window.confirm + forms ca "Lecție nouă")
   ════════════════════════════════════════════════════════════════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  animation: fadeIn 180ms var(--ease-out);
}
.modal-backdrop.is-open { display: flex; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  background: #fff;
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 18px;
  box-shadow: 0 3px 0 var(--color-border-bold), 0 12px 24px -8px rgba(28, 25, 23, 0.30);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  animation: modalIn 220ms var(--ease-out);
}
.modal--sm { max-width: 420px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__head {
  padding: var(--space-5) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.modal__head h2 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -.01em;
}
.modal__close {
  background: none;
  border: 0;
  color: var(--color-text-faded);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  min-width: var(--tap-sm);
  min-height: var(--tap-sm);
  display: grid;
  place-items: center;
  transition: all var(--duration-fast);
  font-size: 24px;
  line-height: 1;
}
.modal__close:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.modal__body {
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.modal__foot {
  padding: var(--space-4) var(--space-6) var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.modal__foot .btn { min-width: 120px; }

/* Variantă "confirm" — icon mare + mesaj */
.modal--confirm .modal__body {
  text-align: center;
  padding-top: var(--space-8);
}
.modal__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-4);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-danger-soft);
  color: var(--color-danger);
}
.modal--info .modal__icon { background: var(--color-primary-soft); color: var(--color-primary); }
.modal__title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}
.modal__text {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  margin: 0;
  line-height: var(--leading-snug);
}

/* ════════════════════════════════════════════════════════════════
   9. LAYOUT GENERAL
   ════════════════════════════════════════════════════════════════ */

.main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.footer {
  /* un singur rând centrat (se rupe pe ecrane înguste), spațiere verticală mică */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px 14px;
  text-align: center;
  padding: 10px var(--space-5);
  color: var(--color-text-faded);
  font-size: var(--text-sm);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  font-weight: 500;
}
.footer__credit a { color: inherit; font-weight: 700; text-decoration: none; }
.footer__credit a:hover { color: var(--color-text-strong, #1e293b); text-decoration: underline; }
.footer__main { /* wrapper pentru copyright-ul principal */ }
.footer__license {
  margin-top: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted, #94a3b8);
  font-weight: 400;
  opacity: 0.85;
}
.footer__license .license-stamp strong { font-weight: 700; color: var(--color-text-faded); }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.page-header h1 {
  margin: 0;
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--color-text);
}
.page-header .page-header__sub {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}
.page-header__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: var(--text-sm);
}
.page-header__back:hover { color: var(--color-primary-strong); }

/* ════════════════════════════════════════════════════════════════
   10. HOME — landing page
   ════════════════════════════════════════════════════════════════ */

.hero {
  text-align: center;
  padding: var(--space-16) var(--space-5) var(--space-12);
  background: var(--gradient-warm);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-10);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(79,70,229,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(245,158,11,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-strong);
  margin-bottom: var(--space-5);
  border: 1.5px solid rgba(79,70,229,.22);
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: var(--text-hero);
  line-height: 1.1;
  margin: 0 0 var(--space-5);
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--color-text);
  position: relative;
  z-index: 1;
}
.hero h1 .accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero p {
  font-size: var(--text-lg);
  line-height: var(--leading-base);
  max-width: 680px;
  margin: 0 auto var(--space-8);
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
}
.hero-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero-actions .btn {
  min-height: var(--tap-lg);
  padding: 0 var(--space-8);
  font-size: var(--text-md);
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-10);
}
.feature {
  background: var(--color-surface);
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  transition: all var(--duration);
  position: relative;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}
.feature__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
}
.feature__icon svg { width: 28px; height: 28px; }
.feature:nth-child(1) .feature__icon { background: var(--color-primary-soft); color: var(--color-primary-strong); }
.feature:nth-child(2) .feature__icon { background: var(--color-accent-soft);  color: var(--color-warning-strong); }
.feature:nth-child(3) .feature__icon { background: #fce7f3;                   color: #9f1239; }
.feature:nth-child(4) .feature__icon { background: var(--color-success-soft); color: var(--color-success-strong); }
.feature h3 {
  margin: 0 0 8px;
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
}
.feature p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════════
   11. AUTH (login + register)
   ════════════════════════════════════════════════════════════════ */

.auth-card {
  max-width: 460px;
  margin: var(--space-10) auto;
  padding: var(--space-10) var(--space-8) var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 1px solid var(--color-border);
}
.auth-card__icon {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  color: white;
  z-index: 1;
}
.auth-card h1 {
  text-align: center;
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--color-text);
}
.auth-card .subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: 0 0 var(--space-8);
  font-weight: 500;
}
.auth-card .btn-block {
  min-height: var(--tap-lg);
  font-size: var(--text-md);
}
.auth-footer-link {
  text-align: center;
  margin: var(--space-6) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ─── Plan teaser (register + login) ─── */
.plan-teaser {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--color-primary-soft) 0%, var(--color-surface) 100%);
  border: 1.5px solid var(--color-primary-tint);
  border-radius: var(--radius-md);
}
.plan-teaser__head { margin-bottom: var(--space-3); }
.plan-teaser__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--color-success-soft);
  color: var(--color-success-strong);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.plan-teaser__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-teaser__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 600;
}
.plan-teaser__list li svg {
  flex-shrink: 0;
  color: var(--color-success);
}
.plan-teaser__upgrade {
  margin: 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-primary-tint);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-base);
  font-weight: 500;
}
.plan-teaser__upgrade b { color: var(--color-primary-strong); }

/* Varianta compactă (login) */
.plan-teaser--compact {
  padding: var(--space-3) var(--space-4);
}
.plan-teaser--compact p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-base);
  font-weight: 500;
}
.plan-teaser--compact b { color: var(--color-text); }
.plan-teaser--compact a {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
  color: var(--color-primary-strong);
}

/* ─── Plan banner (dashboard) — dismissible ─── */
.plan-banner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--color-surface-peach) 0%, var(--color-accent-soft) 100%);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 16px;
  margin: var(--space-4) 0 var(--space-6);
  box-shadow: 0 2px 0 var(--color-border-bold);
  animation: planBannerIn 320ms var(--ease-out);
}
@keyframes planBannerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.plan-banner__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--color-warning);
  box-shadow: var(--shadow-sm);
}
.plan-banner__body { flex: 1; min-width: 0; }
.plan-banner__title {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 2px;
  letter-spacing: -.01em;
}
.plan-banner__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--leading-snug);
  font-weight: 500;
}
.plan-banner__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.plan-banner__close {
  background: rgba(255,255,255,.6);
  border: 0;
  color: var(--color-text-muted);
  cursor: pointer;
  width: var(--tap-sm);
  height: var(--tap-sm);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  transition: all var(--duration-fast);
}
.plan-banner__close:hover {
  background: #fff;
  color: var(--color-text);
}
@media (max-width: 640px) {
  .plan-banner {
    flex-direction: column;
    text-align: center;
    align-items: stretch;
  }
  .plan-banner__icon { margin: 0 auto; }
  .plan-banner__actions { justify-content: center; }
}

/* ════════════════════════════════════════════════════════════════
   12. DASHBOARD
   ════════════════════════════════════════════════════════════════ */

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-6) 0 var(--space-6);
  margin-bottom: var(--space-6);
}
.dash-header__titles {
  position: relative;
  padding-left: var(--space-5);
}
.dash-header__titles::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 5px;
  border-radius: 4px;
  background: var(--gradient-primary);
}
.dash-header__titles h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 6px;
  color: var(--color-text);
  line-height: 1.1;
}
.dash-header__sub {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 600;
}
.dash-header__actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}
/* Pe mobile, butoanele din header iau toată lățimea */
@media (max-width: 560px) {
  .dash-header__actions { width: 100%; }
  .dash-header__actions > * { flex: 1; justify-content: center; }
}

/* ─── Filtre ─── */
.dash-filters {
  display: flex;
  gap: var(--space-4);
  align-items: flex-end;
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
}
.dash-filters__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  flex: 1;
}
.dash-filters__lbl {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  color: var(--color-text-muted);
}
.dash-filters__select {
  padding: 10px 36px 10px 14px;
  min-height: var(--tap-sm);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 6 6 11 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  appearance: none;
}
.dash-filters__select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}
.dash-filters__clear {
  min-height: var(--tap-sm);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--color-primary-strong);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: underline;
}

/* ─── Lessons grid + cards ─── */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}
@media (min-width: 1920px) {
  .lessons-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}
.lesson-card {
  position: relative;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--duration), transform var(--duration), border-color var(--duration);
  box-shadow: var(--shadow-xs);
}
.lesson-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: .6;
  transition: opacity var(--duration);
  z-index: 1;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.lesson-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--color-border-strong);
}
.lesson-card:hover::before { opacity: 1; }

.lesson-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  min-height: var(--tap-xl);             /* asigură card tap-friendly în întregime */
}
.lesson-card__preview {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, var(--color-surface-2) 0%, var(--color-surface) 100%);
  border-bottom: 1px solid var(--color-border);
  display: grid; place-items: center;
  overflow: hidden;
}
.lesson-card__preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.lesson-card__preview-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--color-text-faded);
}
.lesson-card__preview-empty::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--color-border-strong) 1px, transparent 0);
  background-size: 18px 18px;
  opacity: .4;
  pointer-events: none;
}
.lesson-card__preview-empty svg {
  position: relative;
  z-index: 1;
  width: 48px; height: 48px;
  padding: 14px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.lesson-card__body { padding: var(--space-5) var(--space-5) var(--space-5); }
.lesson-card__title {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 10px;
  line-height: 1.3;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lesson-card__title--default {
  color: var(--color-text-faded);
  font-weight: 600;
  font-style: italic;
}
.lesson-card__ruling {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 4px 10px;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  width: fit-content;
}
.lesson-card__ruling svg { opacity: .75; flex-shrink: 0; }

/* Modificatori pe tip de liniatură — culori subtile care ajută scanarea
   vizuală a listei de lecții. Pe o listă de 20+ recunoști rapid "cardurile
   albastre = matematică". Saturare scăzută ca să nu concureze cu conținutul. */
.lesson-card__ruling--math {
  background: #dbeafe;
  color: #1e40af;
}
.lesson-card__ruling--line {
  background: #ede9fe;
  color: #5b21b6;
}
.lesson-card__ruling--calligraphy {
  background: #fce7f3;
  color: #9d174d;
}
.lesson-card__ruling--tipI,
.lesson-card__ruling--tipII {
  background: var(--color-success-soft);
  color: var(--color-success-strong);
}
.lesson-card__ruling--dictando {
  background: var(--color-accent-soft);
  color: var(--color-warning-strong);
}
.lesson-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tag--subject { background: #ede9fe; color: #6d28d9; }
.tag--grade   { background: #dbeafe; color: #1e40af; }
.lesson-card__meta {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-faded);
  font-weight: 600;
}

/* Delete button — MEREU VIZIBIL (fix bug principal: opacity:0 hover-only)
   Default: gri discret. Hover/focus: roșu. Reduce zgomotul vizual pe
   liste cu multe carduri fără să piardă descoperabilitatea. */
.lesson-card__delete {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: var(--tap-sm);
  height: var(--tap-sm);
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(6px);
  color: var(--color-text-faded);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
  box-shadow: var(--shadow-xs);
  transition: all var(--duration-fast);
}
.lesson-card__delete:hover,
.lesson-card__delete:focus-visible {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}
.lesson-card__delete:focus-visible {
  outline: 3px solid var(--color-danger);
  outline-offset: 2px;
}

/* ─── Empty states ─── */
.empty {
  text-align: center;
  padding: var(--space-16) var(--space-5);
  background: var(--color-surface);
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-xl);
}
.empty__icon {
  margin: 0 auto var(--space-4);
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: grid;
  place-items: center;
}
.empty__icon svg { width: 40px; height: 40px; }
.empty h2 {
  margin: 0 0 8px;
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
}
.empty p {
  margin: 0 auto var(--space-6);
  max-width: 480px;
  color: var(--color-text-muted);
  font-size: var(--text-md);
  line-height: var(--leading-base);
}
.empty .btn { min-height: var(--tap-lg); padding: 0 var(--space-8); font-size: var(--text-md); }
.empty--no-results {
  padding: var(--space-10) var(--space-5);
}
.empty--no-results h2 { font-size: var(--text-lg); color: var(--color-text-muted); }
.empty--no-results p { font-size: var(--text-sm); margin-bottom: 0; }

/* ════════════════════════════════════════════════════════════════
   13. CREDITE — cards + timeline
   ════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   GENERIC STATS CARDS — folosite în admin_boards, admin_plans, etc.
   (Denumire istorică ".credits-card", NU specific paginii credits)
   ════════════════════════════════════════════════════════════════ */

.credits-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-5);
}
.credits-card {
  position: relative;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.credits-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
}
.credits-card--plan::before { background: var(--gradient-accent); }
.credits-card--plan {
  background: linear-gradient(135deg, var(--color-primary-soft) 0%, var(--color-surface) 100%);
}
.credits-card__label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--space-2);
}
.credits-card__val {
  font-size: var(--text-2xl);
  font-weight: 900;
  line-height: 1.05;
  color: var(--color-text);
  letter-spacing: -.025em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.credits-card__val span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-faded);
  letter-spacing: 0;
}
.credits-card__sub {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
  font-weight: 500;
  line-height: 1.4;
}
.credits-card__cta {
  margin-top: var(--space-3);
}

/* ════════════════════════════════════════════════════════════════
   CREDITS PAGE — redesign modern: hero, KPI strip, timeline, assets
   ════════════════════════════════════════════════════════════════ */

/* ═══ HERO ═══ */
.credits-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  align-items: stretch;
}
@media (max-width: 900px) {
  .credits-hero { grid-template-columns: 1fr; }
}

/* Card balance — gradient indigo, compact, Duolingo depth */
.credits-hero__balance {
  position: relative;
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #7c3aed 100%);
  color: white;
  border: 2px solid #1c1917;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 #1c1917, 0 6px 12px -4px rgba(28,25,23,0.20);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}
/* Glow decorativ (mai subtil, colț dreapta) */
.credits-hero__balance-glow {
  position: absolute;
  top: -50px; right: -50px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}
.credits-hero__balance-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,0.75);
  position: relative;
}
.credits-hero__balance-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 0;
  position: relative;
}
.credits-hero__number {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: white;
}
.credits-hero__unit {
  font-size: var(--text-sm);
  font-weight: 600;
  opacity: 0.72;
}
.credits-hero__balance-ron {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  margin-top: 6px;
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
}
.credits-hero__balance-ron b {
  font-weight: 800;
  font-size: var(--text-md);
}
.credits-hero__balance-rate {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.65;
}
.credits-hero__cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  margin-top: var(--space-4);
  background: white;
  color: #4338ca;
  border: 2px solid #1c1917;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 3px 0 #1c1917, 0 5px 10px -3px rgba(28,25,23,0.18);
  position: relative;
}
.credits-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #1c1917, 0 7px 14px -3px rgba(28,25,23,0.25);
  text-decoration: none;
  color: #4338ca;
}
.credits-hero__cta:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #1c1917;
}

/* Card plan — mai polished, aceeași înălțime cu balance, Duolingo depth */
.credits-hero__plan {
  position: relative;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 2px solid #1c1917;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 #1c1917, 0 6px 12px -4px rgba(28,25,23,0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}
.credits-hero__plan--premium {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.credits-hero__plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #f1f5f9;
  border: 2px solid #1c1917;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  width: max-content;
  text-transform: uppercase;
  align-self: flex-start;
}
.credits-hero__plan--premium .credits-hero__plan-badge {
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  box-shadow: 0 2px 0 #1c1917;
}
.credits-hero__plan-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}
.credits-hero__plan-expires,
.credits-hero__plan-desc {
  color: var(--color-text);
  font-size: var(--text-sm);
  margin: 4px 0 0;
  line-height: 1.45;
  font-weight: 500;
}
.credits-hero__plan-expires b { font-weight: 800; }
.credits-hero__plan-days {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
.credits-hero__upgrade {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  margin-top: var(--space-4);
  background: var(--gradient-primary, linear-gradient(135deg, #4f46e5 0%, #6366f1 100%));
  color: white;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all .15s ease;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.30);
}
.credits-hero__upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.40);
}

/* ═══ KPI strip ═══ */
.credits-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.credits-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 2px solid #1c1917;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 #1c1917, 0 6px 12px -4px rgba(28,25,23,0.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.credits-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1c1917, 0 8px 16px -4px rgba(28,25,23,0.18);
}
.credits-stat__icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.credits-stat__icon--topup  { background: #dcfce7; color: #16a34a; }
.credits-stat__icon--spent  { background: #fee2e2; color: #dc2626; }
.credits-stat__icon--assets { background: #e0e7ff; color: #4f46e5; }
.credits-stat__icon--grant  { background: #fef3c7; color: #b45309; }
.credits-stat__val {
  font-size: var(--text-2xl);
  font-weight: 900;
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.credits-stat__lbl {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 3px;
  letter-spacing: .02em;
}

/* ═══ Main grid ═══ */
.credits-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
@media (max-width: 900px) {
  .credits-grid { grid-template-columns: 1fr; }
}

.credits-panel {
  background: var(--color-surface);
  border: 2px solid #1c1917;
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-5) var(--space-4);
  box-shadow: 0 4px 0 #1c1917, 0 6px 12px -4px rgba(28,25,23,0.12);
}
.credits-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid #1c1917;
}
.credits-panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-md);
  font-weight: 800;
  margin: 0;
  color: var(--color-text);
  letter-spacing: -.005em;
}
.credits-panel__title svg {
  color: var(--color-primary, #4f46e5);
  flex-shrink: 0;
}
.credits-panel__count {
  padding: 3px 10px;
  background: var(--color-primary-soft, #e0e7ff);
  color: var(--color-primary-strong, #4338ca);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ═══ Empty state ═══ */
.credits-empty {
  text-align: center;
  padding: var(--space-7) var(--space-4);
  color: var(--color-text-muted);
}
.credits-empty svg {
  color: var(--color-border);
  margin-bottom: var(--space-3);
}
.credits-empty p {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ═══ TIMELINE — tranzacții ═══ */
.credits-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.credits-timeline__item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--color-border);
  align-items: start;
}
.credits-timeline__item:last-child { border-bottom: 0; }
.credits-timeline__icon {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.credits-timeline__icon.is-topup       { background: #dcfce7; color: #16a34a; }
.credits-timeline__icon.is-purchase    { background: #fef3c7; color: #b45309; }
.credits-timeline__icon.is-refund      { background: #dbeafe; color: #2563eb; }
.credits-timeline__icon.is-grant       { background: #fce7f3; color: #be185d; }
.credits-timeline__icon.is-planupgrade { background: #e0e7ff; color: #4f46e5; }
.credits-timeline__icon.is-adminadjust { background: #f1f5f9; color: #475569; }
.credits-timeline__body { min-width: 0; }
.credits-timeline__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}
.credits-timeline__note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.credits-timeline__date {
  font-size: var(--text-xs);
  color: var(--color-text-faded, #94a3b8);
  margin-top: 4px;
  font-weight: 500;
}
.credits-timeline__delta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
}
.credits-timeline__delta-val {
  font-size: var(--text-md);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.credits-timeline__delta.is-plus  .credits-timeline__delta-val { color: #16a34a; }
.credits-timeline__delta.is-minus .credits-timeline__delta-val { color: #dc2626; }
.credits-timeline__delta.is-zero  .credits-timeline__delta-val { color: var(--color-text-faded, #94a3b8); }
.credits-timeline__balance {
  font-size: var(--text-xs);
  color: var(--color-text-faded, #94a3b8);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ═══ Assets cards ═══ */
.credits-assets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.credits-asset {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: 10px;
  background: var(--color-surface);
  border: 2px solid #1c1917;
  border-radius: var(--radius-md);
  transition: transform .15s ease, box-shadow .15s ease;
}
.credits-asset:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #1c1917, 0 5px 10px -3px rgba(28,25,23,0.12);
}
.credits-asset__thumb {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  background: white;
  border: 2px solid #1c1917;
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 6px;
}
.credits-asset__thumb svg {
  width: 100%; height: 100%;
  object-fit: contain;
}
.credits-asset__body { min-width: 0; }
.credits-asset__name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.credits-asset__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.credits-asset__cat {
  padding: 1px 8px;
  background: var(--color-primary-soft, #e0e7ff);
  color: var(--color-primary-strong, #4338ca);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.credits-asset__dot { color: var(--color-text-faded, #94a3b8); }
.credits-asset__price { flex-shrink: 0; }
.credits-asset__price-val {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  border: 1px solid #fcd34d;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.credits-asset__price-gift {
  display: inline-block;
  padding: 4px 10px;
  background: #fce7f3;
  color: #be185d;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  border: 1px solid #f9a8d4;
}

/* Responsive — mobile */
@media (max-width: 640px) {
  .credits-hero__balance { padding: var(--space-5) var(--space-5); }
  .credits-hero__number { font-size: 3.2rem; }
  .credits-panel { padding: var(--space-4) var(--space-3) var(--space-3); }
  .credits-timeline__item { grid-template-columns: 32px 1fr auto; }
  .credits-timeline__icon { width: 32px; height: 32px; }
  .credits-timeline__icon svg { width: 15px; height: 15px; }
  .credits-asset { grid-template-columns: 44px 1fr auto; }
  .credits-asset__thumb { width: 44px; height: 44px; padding: 4px; }
}

/* ════════════════════════════════════════════════════════════════
   14. ADMIN — subnav, quick links, panels, tables, KPIs
   ════════════════════════════════════════════════════════════════ */

/* Subnav ─ pill tabs */
.admin-subnav {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  margin: var(--space-2) 0 var(--space-5);
  flex-wrap: wrap;
}
.admin-subnav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: var(--tap-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.admin-subnav__link:hover {
  background: var(--color-border);
  color: var(--color-text);
  text-decoration: none;
}
.admin-subnav__link.is-active {
  background: #fff;
  color: var(--color-primary-strong);
  box-shadow: var(--shadow-sm);
}
.admin-subnav__link svg { opacity: .85; flex-shrink: 0; }

/* Quick links */
.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.admin-quick-link {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--duration-fast);
  min-height: 76px;
}
.admin-quick-link:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
}
.admin-quick-link--active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}
.admin-quick-link__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.admin-quick-link--active .admin-quick-link__icon {
  background: #fff;
}
.admin-quick-link__text h4 {
  margin: 0 0 3px;
  font-size: var(--text-md);
  font-weight: 800;
}
.admin-quick-link__text p {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Admin panels */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) 1fr;
  gap: var(--space-6);
}
@media (max-width: 960px) {
  .admin-grid { grid-template-columns: 1fr; }
}
.admin-panel {
  background: var(--color-surface-2);
  border-radius: 16px;
  padding: var(--space-4);
  border: var(--border-thick) solid var(--color-border-bold);
  box-shadow: 0 2px 0 var(--color-border-bold);
}
.admin-panel h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--color-text-strong);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-panel h2::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}
.admin-panel h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-text);
}
.admin-panel--money { background: linear-gradient(180deg, #fefce8 0%, var(--color-surface) 40%); border-color: var(--color-accent-soft); }
.admin-panel--danger { border-color: var(--color-danger-soft); background: linear-gradient(180deg, #fef2f2 0%, var(--color-surface) 50%); }
.admin-panel--danger h2 { color: var(--color-danger-strong); }
.admin-panel--danger h2::before { background: var(--color-danger); }
.admin-panel__sep {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-5) calc(var(--space-6) * -1);
  border: 0;
}
.admin-panel__note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
  line-height: var(--leading-snug);
}

/* ─── Toggle monetizare (admin control pe /credits) ─── */
.mon-toggle {
  margin-bottom: var(--space-5);
  background: linear-gradient(180deg, #f5f3ff 0%, var(--color-surface) 55%);
  border: 1.5px solid #ddd6fe;
}
.mon-toggle__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.mon-toggle__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.mon-toggle__title svg { color: #7c3aed; flex-shrink: 0; }
.mon-toggle__status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.mon-toggle__status--on  { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.mon-toggle__status--off { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.mon-toggle__desc {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}
.mon-toggle__desc b { color: var(--color-text); }
.mon-toggle__desc code {
  background: var(--color-border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}
.mon-toggle__form {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.mon-toggle__note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.mon-toggle__note code {
  background: var(--color-border);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.92em;
}

/* ─── Batch upload — pagina drop zone ─── */
.batch-upload__convention {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}
.batch-upload__convention h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.batch-upload__convention p { margin: 0 0 var(--space-2); font-size: var(--text-sm); }
.batch-upload__convention code {
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.92em;
}
.batch-upload__ref { margin-top: var(--space-3); }
.batch-upload__ref summary {
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-primary);
  padding: var(--space-2) 0;
}
.batch-upload__ref-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: #fff;
  border-radius: 6px;
}
.batch-upload__ref-body ul { margin: var(--space-2) 0 0; padding-left: var(--space-5); font-size: var(--text-sm); }
.batch-upload__ref-body li { margin-bottom: 4px; }

.batch-upload__drop {
  display: block;
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  background: #fafbff;
  padding: var(--space-6);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.batch-upload__drop:hover,
.batch-upload__drop--hover {
  border-color: var(--color-primary);
  background: #f0f4ff;
}
.batch-upload__input { display: none; }
.batch-upload__drop-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
}
.batch-upload__drop-body svg { color: var(--color-primary); }
.batch-upload__drop-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.batch-upload__drop-text b {
  font-size: var(--text-lg);
  color: var(--color-text);
}
.batch-upload__drop-text span { font-size: var(--text-sm); }

.batch-upload__list {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.batch-upload__list-head {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.batch-upload__list ul { margin: 0; padding: 0; list-style: none; max-height: 240px; overflow-y: auto; }
.batch-upload__list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: var(--text-sm);
  font-family: ui-monospace, monospace;
}
.batch-upload__list li:nth-child(odd) { background: #f8fafc; }
.batch-upload__li--bad { color: var(--color-danger); }
.batch-upload__li-err { color: var(--color-danger); font-weight: 600; font-size: var(--text-xs); }
.batch-upload__li-size { color: var(--color-text-muted); font-size: var(--text-xs); }

.batch-upload__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
.batch-upload__hint { font-size: var(--text-xs); }

/* ─── Batch preview — grid editabil ─── */
.batch-errors { margin-bottom: var(--space-5); }
.batch-errors__list {
  margin: var(--space-3) 0 0;
  padding-left: var(--space-5);
  font-size: var(--text-sm);
  max-height: 200px;
  overflow-y: auto;
}
.batch-errors__list li { margin-bottom: 4px; }
.batch-errors__list code { background: #fff; padding: 1px 6px; border-radius: 3px; }

.batch-preview__head { margin-bottom: var(--space-4); }
.batch-preview__head h2 { margin: 0 0 var(--space-1); }

.batch-preview__bulk {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-3);
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 6px;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}
.batch-preview__bulk-label { font-weight: 700; color: #713f12; }
.batch-preview__bulk-chk input { margin-right: 4px; }

.batch-preview__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: var(--space-4);
}
.batch-preview__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.batch-preview__table th,
.batch-preview__table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
}
.batch-preview__table thead th {
  background: #f8fafc;
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.batch-preview__table tbody tr:hover { background: #fafbff; }

.batch-preview__thumb-cell { width: 64px; }
.batch-preview__thumb {
  width: 48px;
  height: 48px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.batch-preview__thumb svg { max-width: 40px; max-height: 40px; }

.batch-preview__input,
.batch-preview__select,
.batch-preview__price {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: var(--text-sm);
  font-family: inherit;
  background: #fff;
}
.batch-preview__input:focus,
.batch-preview__select:focus,
.batch-preview__price:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 0;
  border-color: var(--color-primary);
}
.batch-preview__input--mono {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
.batch-preview__price {
  width: 90px;
  text-align: right;
}
.batch-preview__price:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
.batch-preview__premium-cell { text-align: center; width: 80px; }
.batch-preview__premium { width: 18px; height: 18px; cursor: pointer; }

.batch-preview__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.batch-preview__sep {
  flex: 1;
  min-width: var(--space-4);
}

/* ─── Admin Boards page — toolbar + cards grid ─── */
.boards-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.boards-toolbar__group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.boards-toolbar__label {
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.boards-toolbar__search {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex: 1;
  min-width: 300px;
  flex-wrap: wrap;
}
.boards-toolbar__search input[type="search"] {
  flex: 1;
  min-width: 240px;
  min-height: var(--tap-md);
  padding: 0 var(--space-4);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--color-surface);
}
.boards-toolbar__search input[type="search"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}

/* Segmented control inline (group-by) — stil pill links */
.segmented--inline {
  display: inline-flex;
  padding: 4px;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  gap: 2px;
  flex-wrap: wrap;
}
.segmented--inline a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: var(--tap-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.segmented--inline a:hover {
  background: var(--color-border);
  color: var(--color-text);
  text-decoration: none;
}
.segmented--inline a.is-active {
  background: var(--color-surface);
  color: var(--color-primary-strong);
  box-shadow: var(--shadow-sm);
}
.segmented--inline svg { flex-shrink: 0; opacity: .8; }

/* Grid + cards pentru board-uri admin */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  padding: var(--space-4);
}
@media (min-width: 1920px) {
  .boards-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

.admin-board-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--duration);
}
.admin-board-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.admin-board-card__preview {
  display: block;
  position: relative;
  height: 140px;
  background: linear-gradient(135deg, var(--color-surface-2) 0%, var(--color-surface) 100%);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.admin-board-card__preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.admin-board-card__preview-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--color-text-faded);
}
.admin-board-card__preview-empty::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--color-border-strong) 1px, transparent 0);
  background-size: 16px 16px;
  opacity: .35;
}
.admin-board-card__preview-empty svg {
  position: relative; z-index: 1;
  padding: 12px;
  background: rgba(255,255,255,.85);
  border-radius: var(--radius-md);
}

.admin-board-card__body {
  padding: var(--space-3) var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.admin-board-card__title {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.admin-board-card__title a {
  color: var(--color-text);
  text-decoration: none;
}
.admin-board-card__title a:hover { color: var(--color-primary-strong); }

.admin-board-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Creator info block — distinct visual zone */
.admin-board-card__creator {
  padding: var(--space-3);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary-tint);
}
.admin-board-card__creator-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  margin-bottom: 2px;
}

.admin-board-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-faded);
  font-weight: 600;
  margin-top: auto;
}

.admin-board-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
}
.admin-board-card__actions .btn-sm {
  flex: 1;
  min-width: 0;
}

/* Banner admin viewing — plasat în editor.css prin append (pentru /board/*),
   dar aici marcăm și stiluri specifice pentru topbar-ul paginii principale */
.admin-viewing-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(90deg, var(--color-warning-soft) 0%, var(--color-accent-soft) 100%);
  border-bottom: 2px solid var(--color-warning);
  color: var(--color-warning-strong);
  font-size: var(--text-sm);
  font-weight: 600;
  flex-wrap: wrap;
}
.admin-viewing-banner svg { flex-shrink: 0; color: var(--color-warning); }
.admin-viewing-banner b { color: var(--color-text); }
.admin-viewing-banner__back {
  margin-left: auto;
  padding: 6px 12px;
  background: rgba(255,255,255,.6);
  border-radius: var(--radius-sm);
  color: var(--color-warning-strong);
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration-fast);
}
.admin-viewing-banner__back:hover {
  background: #fff;
  color: var(--color-warning-strong);
}

/* ─── Plans comparison (admin_plans.php) ─── */
.plans-category {
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-5);
}
.plans-category:first-child {
  padding-top: 0;
  border-top: 0;
  margin-top: 0;
}
.plans-category__head {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--space-3);
  margin-bottom: var(--space-4);
  align-items: center;
}
.plans-category__icon {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
}
.plans-category__icon svg { width: 24px; height: 24px; }
.plans-category__name {
  grid-column: 2;
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
}
.plans-category__desc {
  grid-column: 2;
  margin: 2px 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: var(--leading-snug);
}

.plans-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
}
.plans-table th {
  text-align: left;
  padding: 10px var(--space-3);
  background: var(--color-surface-2);
  font-weight: 800;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-border);
}
.plans-table th.u-center { text-align: center; }
.plans-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.plans-table tr:last-child td { border-bottom: 0; }
.plans-table tbody tr:hover td { background: var(--color-primary-soft); }

/* Coloane cu check/X */
.plans-table td:nth-child(2),
.plans-table td:nth-child(3) {
  width: 100px;
}
.plans-check {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.plans-check--yes {
  background: var(--color-success-soft);
  color: var(--color-success);
}
.plans-check--no {
  background: var(--color-surface-2);
  color: var(--color-text-faded);
}

/* Pe mobile (table-cards), coloanele Free/Premium apar ca label → valoare */
@media (max-width: 760px) {
  .plans-table td:nth-child(2),
  .plans-table td:nth-child(3) { width: auto; }
}

/* ─── Asset groups (colapsibile pe categorie) ───
   Folosim <details>/<summary> nativ: zero JS, accesibil built-in,
   Ctrl+F browser-ul modern expandează automat grupele cu match. */
.asset-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.asset-group {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.asset-group:hover { border-color: var(--color-border-strong); }
.asset-group[open] {
  border-color: var(--color-primary-tint);
  box-shadow: var(--shadow-xs);
}

.asset-group__summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  min-height: var(--tap-md);
  cursor: pointer;
  list-style: none;                       /* ascunde markerul nativ */
  user-select: none;
  -webkit-user-select: none;
  transition: background var(--duration-fast);
}
.asset-group__summary::-webkit-details-marker { display: none; }
.asset-group__summary::marker { content: ''; }
.asset-group__summary:hover {
  background: var(--color-surface-hover);
}
.asset-group[open] > .asset-group__summary {
  background: var(--color-primary-soft);
  border-bottom: 1px solid var(--color-primary-tint);
}
.asset-group__summary:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: -3px;
}

.asset-group__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.asset-group[open] > .asset-group__summary .asset-group__icon {
  background: #fff;
}
.asset-group__icon svg { width: 22px; height: 22px; }

.asset-group__name {
  font-weight: 800;
  font-size: var(--text-md);
  color: var(--color-text);
  letter-spacing: -.01em;
}

.asset-group__count {
  padding: 3px 12px;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.asset-group[open] > .asset-group__summary .asset-group__count {
  background: #fff;
}

.asset-group__chevron {
  margin-left: auto;
  color: var(--color-text-muted);
  transition: transform var(--duration) var(--ease-out);
  flex-shrink: 0;
}
.asset-group[open] > .asset-group__summary .asset-group__chevron {
  transform: rotate(180deg);
}

.asset-group__body {
  padding: 0;
  animation: assetGroupIn 220ms var(--ease-out);
}
@keyframes assetGroupIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Tabela din interiorul unei grupe — fără rounded corners duble și
   fără background pe th (avem deja background pe summary) */
.asset-group__body .assets-table th {
  background: var(--color-surface-2);
}
.asset-group__body .assets-table tr:last-child td {
  border-bottom: 0;
}

/* KPI tiles */
.user-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-5);
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--duration-fast);
  min-height: 92px;
  cursor: pointer;
}
.kpi:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.kpi.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: var(--shadow-focus);
}
.kpi__val {
  font-size: var(--text-3xl);
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-text);
  letter-spacing: -.02em;
}
.kpi__lbl {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.kpi--ok    .kpi__val { color: var(--color-success); }
.kpi--prem  .kpi__val { color: var(--color-warning-strong); }
.kpi--warn  .kpi__val { color: var(--color-warning); }
.kpi--err   .kpi__val { color: var(--color-danger); }
.kpi--muted .kpi__val { color: var(--color-text-faded); }

/* Search bar */
.user-search {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.user-search input[type="search"] {
  flex: 1;
  min-width: 240px;
  max-width: 480px;
  min-height: var(--tap-md);
  padding: 0 var(--space-4);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--color-surface);
  transition: all var(--duration-fast);
}
.user-search input[type="search"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}

/* ─── TABELE RESPONSIVE ─── */
.table-wrap { overflow-x: auto; }
.assets-table, .users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
}
.assets-table th, .users-table th {
  text-align: left;
  padding: 12px var(--space-3);
  background: var(--color-surface-2);
  font-weight: 800;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-border);
  white-space: nowrap;
}
.assets-table td, .users-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.assets-table tr:last-child td, .users-table tr:last-child td { border-bottom: 0; }
.assets-table tr:hover td, .users-table tr:hover td { background: var(--color-primary-soft); }

.users-table__user-name { font-weight: 700; color: var(--color-text); font-size: var(--text-sm); }
.users-table__user-email { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 500; margin-top: 2px; }
.users-table__google-badge { color: #1967d2; font-weight: 800; font-size: var(--text-xs); }
.users-table__credits--active { color: var(--color-success); }
.users-table__credits--zero  { color: var(--color-text-faded); }
.users-table__days-left--expired { color: var(--color-danger); font-weight: 700; }
.users-table__days-left--warn    { color: var(--color-warning); font-weight: 700; }
.users-table__days-left--ok      { color: var(--color-text-muted); font-weight: 600; }

/* ─── Card-list mode pentru ecrane mici / touch — toate tabelele cu .table-cards ─── */
@media (max-width: 760px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr {
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-xs);
  }
  .table-cards td {
    padding: 6px 0;
    border-bottom: 1px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
  }
  .table-cards td:last-child { border-bottom: 0; }
  .table-cards td::before {
    content: attr(data-label);
    flex: 0 0 40%;
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
  }
  .table-cards td[data-label="#"] { display: none; }
  .table-cards td[data-label=""] { justify-content: flex-end; }
  .table-cards td[data-label=""]::before { display: none; }
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  white-space: nowrap;
}
.badge-prem  { background: var(--color-accent-soft);  color: var(--color-warning-strong); }
.badge-free  { background: var(--color-success-soft); color: var(--color-success-strong); }
.badge-admin { background: #fef3c7;                   color: var(--color-warning-strong); }
.badge-user  { background: var(--color-primary-tint); color: var(--color-primary-strong); }
.badge-category {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* User edit — 2 col grid + info list */
.user-edit-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(340px, 460px);
  gap: var(--space-5);
}
@media (max-width: 960px) {
  .user-edit-grid { grid-template-columns: 1fr; }
}
.info-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--color-text-muted); font-weight: 600; }
.info-row b { color: var(--color-text); font-weight: 800; }

/* Credits log mini-stat (în admin_credits_log header) */
.mini-stat {
  text-align: right;
}
.mini-stat__lbl {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
.mini-stat__val {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-success);
}
.mini-stat__val--zero { color: var(--color-text-faded); }

/* Delta values în tabele credits */
.delta--plus  { color: var(--color-success); font-weight: 800; }
.delta--minus { color: var(--color-danger);  font-weight: 800; }
.delta--zero  { color: var(--color-text-faded); }

/* ════════════════════════════════════════════════════════════════
   15. ERROR PAGE
   ════════════════════════════════════════════════════════════════ */
.error-page {
  text-align: center;
  padding: var(--space-16) var(--space-5);
  max-width: 520px;
  margin: 0 auto;
}
.error-page__illustration {
  width: 160px;
  height: 160px;
  margin: 0 auto var(--space-5);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.error-page__illustration svg { width: 88px; height: 88px; }
.error-page__code {
  font-size: var(--text-4xl);
  font-weight: 900;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0 0 var(--space-2);
  letter-spacing: -.03em;
}
.error-page h1 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
}
.error-page p {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-6);
  font-size: var(--text-md);
  line-height: var(--leading-base);
}
.error-page .btn { min-height: var(--tap-lg); font-size: var(--text-md); padding: 0 var(--space-8); }

/* ════════════════════════════════════════════════════════════════
   16. RESPONSIVE TWEAKS
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 680px) {
  .main { padding: var(--space-5) var(--space-4); }
  .topbar { padding: 10px var(--space-4); flex-wrap: wrap; gap: var(--space-2); }
  .topnav { gap: 4px; flex-wrap: wrap; }
  .topnav > a:not(.btn) { padding: 8px 12px; }
  .user-menu__name { display: none; }
  .hero { padding: var(--space-10) var(--space-4) var(--space-8); }
  .auth-card {
    margin: var(--space-6) auto;
    padding: var(--space-8) var(--space-5) var(--space-6);
  }
  .dash-header { padding: var(--space-4) 0 var(--space-4); }
  .dash-header__titles h1 { font-size: var(--text-2xl); }
  .credits-card__val { font-size: var(--text-3xl); }
  .page-header h1 { font-size: var(--text-2xl); }
  .admin-panel { padding: var(--space-4); }
  .modal__body, .modal__head, .modal__foot { padding-left: var(--space-4); padding-right: var(--space-4); }
}

@media (max-width: 400px) {
  .hero-actions .btn,
  .auth-card .btn-block {
    width: 100%;
  }
  .topnav__admin-link span { display: none; }       /* doar iconul pe foarte mic */
}

/* Print */
@media print {
  .topbar, .footer, .flash, .lesson-card__delete, .user-menu { display: none; }
}

/* High-contrast preference */
@media (prefers-contrast: more) {
  :root {
    --color-border:        #94a3b8;
    --color-border-strong: #475569;
    --color-text-muted:    #1e293b;
    --color-text-faded:    #334155;
  }
  .btn-ghost { border-width: 2px; }
  .field input, .field select, .field textarea, .form-input { border-width: 2px; }
}

/* ════════════════════════════════════════════════════════════════════════
   DASHBOARD 2026 REDESIGN
   ────────────────────────────────────────────────────────────────────────
   Filozofia: profesorul deschide app-ul, ajunge la o lecție în maxim 1 click.
   Informația e scanabilă (color-coded materii), acțiunile sunt evidente
   (CTA primary mare, search vizibil, „continuă" ca card distinct).
   Stilurile vechi (`.dash-header*`, `.lessons-grid`, `.lesson-card*`,
   `.plan-banner*`, `.btn-continue`, `.dash-filters*`) RĂMÂN intacte pentru
   a nu sparge alte vederi (admin_users folosește .dash-header__actions).
   ════════════════════════════════════════════════════════════════════════ */

/* ─── Color map per materie ────────────────────────────────────────────
   18 materii din taxonomy, fiecare cu un dot color distinct dar armonios
   (HSL aproximativ uniformă: saturation 70%, lightness 50%). Folosim
   același set și pentru chip-urile din toolbar și pentru dot-urile din
   carduri. La nevoie se pot ajusta individual. */
:root {
  --subj-romana:     #7c3aed;  /* violet 600 */
  --subj-matematica: #2563eb;  /* blue 600 */
  --subj-stiinte:    #0d9488;  /* teal 600 */
  --subj-geografie:  #059669;  /* emerald 600 */
  --subj-istorie:    #b45309;  /* amber 700 */
  --subj-biologie:   #16a34a;  /* green 600 */
  --subj-fizica:     #4f46e5;  /* indigo 600 */
  --subj-chimie:     #ea580c;  /* orange 600 */
  --subj-engleza:    #dc2626;  /* red 600 */
  --subj-franceza:   #db2777;  /* pink 600 */
  --subj-muzica:     #9333ea;  /* purple 600 */
  --subj-arte:       #c026d3;  /* fuchsia 600 */
  --subj-sport:      #65a30d;  /* lime 600 */
  --subj-religie:    #475569;  /* slate 600 */
  --subj-tic:        #0891b2;  /* cyan 600 */
  --subj-civica:     #0284c7;  /* sky 600 */
  --subj-dezvoltare: #e11d48;  /* rose 600 */
  --subj-altele:     #71717a;  /* zinc 500 */
}

/* Helper: pentru orice element cu data-subject="X", culoarea iese din
   --subj-X via custom property pe element (set prin selectoare specifice
   mai jos pentru chip-uri și dot-uri). */

/* ════════════════════════════════════════════════════════════════════
   HERO COMPACT
   ════════════════════════════════════════════════════════════════════ */
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.dash-hero__greeting {
  flex: 1 1 auto;
  min-width: 0;
}

.dash-hero__title {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  color: var(--color-text-strong);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  text-shadow:
    0 0 8px rgba(255, 248, 241, 0.95),
    0 0 16px rgba(255, 248, 241, 0.85);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

/* Numele user-ului — Caveat handwritten roz (matching brand „Interactivă") */
.dash-hero__name {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.4em;
  color: var(--color-primary);
  background: none;
  -webkit-text-fill-color: var(--color-primary);
  letter-spacing: 0.005em;
  line-height: 0.8;
  position: relative;
  top: 2px;
}

/* Sub-text inline cu titlul, mai mic, despărțit prin punct subtil */
.dash-hero__sub {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
  font-weight: 500;
  display: inline;
}
.dash-hero__sub::before {
  content: "·";
  margin-right: 8px;
  color: var(--color-border-strong);
}
/* Numărul în Caveat turcoaz — accent vizual playful, consistent cu .dash-hero__name
   ("admin") și .brand__text-script ("Interactivă"). Doar numărul e accent, "lecții"
   rămâne text normal pentru lizibilitate. */
.dash-hero__sub strong {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.6em;
  color: var(--color-primary);
  -webkit-text-fill-color: var(--color-primary);
  letter-spacing: 0.005em;
  line-height: 0.8;
  position: relative;
  top: 3px;
  margin-right: 2px;
}
.dash-hero__filter-note {
  color: var(--color-primary);
  font-weight: 600;
}

.dash-hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Search input — pill cu lupă inline */
.dash-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--color-surface);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: var(--radius-full);
  padding: 0 var(--space-3) 0 var(--space-4);
  height: var(--tap-md);
  min-width: 240px;
  transition: box-shadow var(--duration-fast);
}
.dash-search:focus-within {
  box-shadow: 0 0 0 3px var(--color-accent), 0 2px 0 var(--color-border-bold);
}
.dash-search__icon {
  flex-shrink: 0;
  color: var(--color-text-faded);
  margin-right: var(--space-2);
}
.dash-search__input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: var(--text-base);
  color: var(--color-text);
  min-width: 0;
  padding: 0;
  height: 100%;
}
.dash-search__input::placeholder {
  color: var(--color-text-faded);
}
.dash-search__input::-webkit-search-cancel-button {
  display: none;
}
.dash-search__clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
  margin-left: var(--space-2);
}
.dash-search__clear:hover {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.dash-hero__cta {
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════
   CONTINUE CARD — card mare orizontal pt. ultima lecție
   ════════════════════════════════════════════════════════════════════ */
.continue-card {
  --accent: var(--color-primary);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 12px 8px 18px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  overflow: hidden;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
}
.continue-card::before {
  /* Bară accent la stânga (3px) — culoarea materiei sau primary */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.continue-card:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, white);
}
.continue-card:focus-visible {
  outline: 0;
  box-shadow: var(--shadow-focus);
}

/* Color override pe materie (matching cu --subj-*) */
.continue-card[data-subject="romana"]     { --accent: var(--subj-romana); }
.continue-card[data-subject="matematica"] { --accent: var(--subj-matematica); }
.continue-card[data-subject="stiinte"]    { --accent: var(--subj-stiinte); }
.continue-card[data-subject="geografie"]  { --accent: var(--subj-geografie); }
.continue-card[data-subject="istorie"]    { --accent: var(--subj-istorie); }
.continue-card[data-subject="biologie"]   { --accent: var(--subj-biologie); }
.continue-card[data-subject="fizica"]     { --accent: var(--subj-fizica); }
.continue-card[data-subject="chimie"]     { --accent: var(--subj-chimie); }
.continue-card[data-subject="engleza"]    { --accent: var(--subj-engleza); }
.continue-card[data-subject="franceza"]   { --accent: var(--subj-franceza); }
.continue-card[data-subject="muzica"]     { --accent: var(--subj-muzica); }
.continue-card[data-subject="arte"]       { --accent: var(--subj-arte); }
.continue-card[data-subject="sport"]      { --accent: var(--subj-sport); }
.continue-card[data-subject="religie"]    { --accent: var(--subj-religie); }
.continue-card[data-subject="tic"]        { --accent: var(--subj-tic); }
.continue-card[data-subject="civica"]     { --accent: var(--subj-civica); }
.continue-card[data-subject="dezvoltare"] { --accent: var(--subj-dezvoltare); }
.continue-card[data-subject="altele"]     { --accent: var(--subj-altele); }

.continue-card__preview {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}
.continue-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.continue-card__preview-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--color-text-faded);
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.continue-card__preview-empty svg { width: 20px; height: 20px; }

.continue-card__body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
  flex: 1;
}

/* Eyebrow inline cu titlul ca o pre-etichetă mică */
.continue-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  padding: 2px 7px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.continue-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.continue-card__title--default {
  color: var(--color-text-muted);
  font-style: italic;
  font-weight: 600;
}

.continue-card__meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-2);
  flex-shrink: 0;
}

.continue-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.continue-card__chip--subject {
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
}
.continue-card__chip--grade {
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
}
.continue-card__chip--ruling {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}
.continue-card__time {
  font-size: 11.5px;
  color: var(--color-text-faded);
  margin-left: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Action button — minim icon arrow, fără text — banda întreagă e clickable */
.continue-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--accent);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: background var(--duration-fast), transform var(--duration-fast);
}
/* Ascundem textul „Deschide" — banda întreagă cliccabilă transmite acțiunea */
.continue-card__action span { display: none; }
.continue-card__action svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.continue-card:hover .continue-card__action {
  background: var(--accent);
  color: white;
  transform: translateX(2px);
}

/* ════════════════════════════════════════════════════════════════════
   TOOLBAR FILTRARE & SORTARE
   ════════════════════════════════════════════════════════════════════ */
.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
}

.dash-toolbar__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
}
.dash-toolbar__group--sort {
  flex: 0 0 auto;
}

.dash-toolbar__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faded);
}

/* Container chip-uri scrollabil orizontal pe mobil */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Chip generic — pill mic, click = navigare/toggle */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border-bold);
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast), transform var(--duration-fast);
  white-space: nowrap;
  font-family: inherit;
}
.chip:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-strong);
}
/* Active state — pill GALBEN cu border negru (consistent cu nav topbar) */
.chip.is-active {
  background: var(--color-accent);
  color: var(--color-text-strong);
  border-color: var(--color-border-bold);
  font-weight: 600;
}
.chip.is-active:hover {
  background: color-mix(in srgb, var(--color-accent) 80%, var(--color-text-strong) 8%);
  color: var(--color-text-strong);
}
.chip:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--color-accent);
}

/* Dot color-coded pe chip-urile materie */
.chip__dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  background: var(--color-text-faded);
  box-shadow: 0 0 0 1.5px white inset, 0 0 0 0.5px rgba(0,0,0,0.06);
}
.chip--subject[data-subject="romana"]     .chip__dot { background: var(--subj-romana); }
.chip--subject[data-subject="matematica"] .chip__dot { background: var(--subj-matematica); }
.chip--subject[data-subject="stiinte"]    .chip__dot { background: var(--subj-stiinte); }
.chip--subject[data-subject="geografie"]  .chip__dot { background: var(--subj-geografie); }
.chip--subject[data-subject="istorie"]    .chip__dot { background: var(--subj-istorie); }
.chip--subject[data-subject="biologie"]   .chip__dot { background: var(--subj-biologie); }
.chip--subject[data-subject="fizica"]     .chip__dot { background: var(--subj-fizica); }
.chip--subject[data-subject="chimie"]     .chip__dot { background: var(--subj-chimie); }
.chip--subject[data-subject="engleza"]    .chip__dot { background: var(--subj-engleza); }
.chip--subject[data-subject="franceza"]   .chip__dot { background: var(--subj-franceza); }
.chip--subject[data-subject="muzica"]     .chip__dot { background: var(--subj-muzica); }
.chip--subject[data-subject="arte"]       .chip__dot { background: var(--subj-arte); }
.chip--subject[data-subject="sport"]      .chip__dot { background: var(--subj-sport); }
.chip--subject[data-subject="religie"]    .chip__dot { background: var(--subj-religie); }
.chip--subject[data-subject="tic"]        .chip__dot { background: var(--subj-tic); }
.chip--subject[data-subject="civica"]     .chip__dot { background: var(--subj-civica); }
.chip--subject[data-subject="dezvoltare"] .chip__dot { background: var(--subj-dezvoltare); }
.chip--subject[data-subject="altele"]     .chip__dot { background: var(--subj-altele); }

/* Sort chips — au svg + label, fără background colorat când inactiv */
.chip--sort svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.chip--sort.is-active svg { opacity: 1; }

.dash-toolbar__clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-end;
  padding: 6px 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-danger);
  background: var(--color-danger-soft);
  border-radius: var(--radius-full);
  text-decoration: none;
  margin-left: auto;
  transition: background var(--duration-fast);
}
.dash-toolbar__clear:hover {
  background: color-mix(in srgb, var(--color-danger-soft) 70%, var(--color-danger) 20%);
}

/* ════════════════════════════════════════════════════════════════════
   GRID CARDURI LECȚII — design nou (.card-lesson)
   ════════════════════════════════════════════════════════════════════ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.card-lesson {
  --accent: var(--color-text-faded);
  position: relative;
  background: var(--color-surface-2);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 16px;
  overflow: hidden;
  /* Drop shadow „flat" ilustrativ */
  box-shadow: 0 2px 0 var(--color-border-bold);
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}
.card-lesson:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 0 var(--color-border-bold), 0 8px 16px -4px rgba(28, 25, 23, 0.18);
}

/* Color override pe materie (matching cu --subj-*) */
.card-lesson[data-subject="romana"]     { --accent: var(--subj-romana); }
.card-lesson[data-subject="matematica"] { --accent: var(--subj-matematica); }
.card-lesson[data-subject="stiinte"]    { --accent: var(--subj-stiinte); }
.card-lesson[data-subject="geografie"]  { --accent: var(--subj-geografie); }
.card-lesson[data-subject="istorie"]    { --accent: var(--subj-istorie); }
.card-lesson[data-subject="biologie"]   { --accent: var(--subj-biologie); }
.card-lesson[data-subject="fizica"]     { --accent: var(--subj-fizica); }
.card-lesson[data-subject="chimie"]     { --accent: var(--subj-chimie); }
.card-lesson[data-subject="engleza"]    { --accent: var(--subj-engleza); }
.card-lesson[data-subject="franceza"]   { --accent: var(--subj-franceza); }
.card-lesson[data-subject="muzica"]     { --accent: var(--subj-muzica); }
.card-lesson[data-subject="arte"]       { --accent: var(--subj-arte); }
.card-lesson[data-subject="sport"]      { --accent: var(--subj-sport); }
.card-lesson[data-subject="religie"]    { --accent: var(--subj-religie); }
.card-lesson[data-subject="tic"]        { --accent: var(--subj-tic); }
.card-lesson[data-subject="civica"]     { --accent: var(--subj-civica); }
.card-lesson[data-subject="dezvoltare"] { --accent: var(--subj-dezvoltare); }
.card-lesson[data-subject="altele"]     { --accent: var(--subj-altele); }

.card-lesson__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  height: 100%;
}

.card-lesson__preview {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-surface-2);
  border-bottom: 1.5px solid var(--color-border);
  overflow: hidden;
}
.card-lesson__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-lesson__preview-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--color-text-faded);
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.card-lesson__preview-empty svg { width: 36px; height: 36px; }

/* Dot materie color-coded în colțul preview-ului — semnal vizual rapid */
.card-lesson__subject-dot {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--accent);
  box-shadow: 0 0 0 2.5px white, 0 1px 3px rgba(0,0,0,0.18);
  z-index: 1;
}

.card-lesson__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.card-lesson__title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-lesson__title--default {
  color: var(--color-text-faded);
  font-style: italic;
  font-weight: 600;
}

.card-lesson__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.card-lesson__chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.card-lesson__chip--subject {
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
}
.card-lesson__chip--grade {
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
}

.card-lesson__footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
  flex-wrap: wrap;
}

.card-lesson__ruling {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  /* Trunchiere pentru ruling-uri lungi */
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-lesson__ruling svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.card-lesson__time {
  font-size: var(--text-xs);
  color: var(--color-text-faded);
  margin-left: auto;
  white-space: nowrap;
}

/* Delete button — mereu vizibil dar discret (opacity .65, hover full) */
.card-lesson__delete-form {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  margin: 0;
}
.card-lesson__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-danger);
  cursor: pointer;
  opacity: 0.65;
  transition: opacity var(--duration-fast), background var(--duration-fast), transform var(--duration-fast);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
}
.card-lesson:hover .card-lesson__delete,
.card-lesson__delete:focus-visible {
  opacity: 1;
}
.card-lesson__delete:hover {
  background: var(--color-danger);
  color: white;
  transform: scale(1.08);
}

/* Search empty state — apare când searchul nu match-uie nimic */
.dash-search-empty {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.link-button:hover { color: var(--color-primary-strong); }

/* ════════════════════════════════════════════════════════════════════
   MODAL CREATE — input mare + collapsible details
   ════════════════════════════════════════════════════════════════════ */
.form-input--lg {
  font-size: var(--text-lg);
  padding: var(--space-3) var(--space-4);
  height: var(--tap-md);
}

.form-collapsible {
  margin-top: var(--space-2);
}
.form-collapsible__summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 12px;
  margin-left: -12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast), color var(--duration-fast);
  user-select: none;
}
.form-collapsible__summary::-webkit-details-marker {
  display: none;
}
.form-collapsible__summary:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.form-collapsible__summary svg {
  transition: transform var(--duration-fast);
}
.form-collapsible[open] .form-collapsible__summary svg {
  transform: rotate(180deg);
}
.form-collapsible__body {
  padding-top: var(--space-3);
  animation: collapsibleOpen var(--duration) ease-out;
}
@keyframes collapsibleOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE — mobile first adjustments
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .dash-hero {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
  .dash-hero__actions {
    width: 100%;
    flex-direction: row;
    align-items: stretch;
  }
  .dash-search {
    flex: 1;
    min-width: 0;
  }
  .dash-hero__cta {
    flex-shrink: 0;
    justify-content: center;
  }

  /* Continue card slim — pe mobil păstrăm flex row dar permitem chips meta wrap */
  .continue-card {
    flex-wrap: wrap;
    padding: 8px 10px 8px 14px;
  }
  .continue-card__body {
    flex: 1 1 100%;
    order: 2;
  }
  .continue-card__preview { order: 1; }
  .continue-card__action  { order: 3; margin-left: auto; }

  /* Toolbar: filter groups stacked, scroll horizontal pe chip rows */
  .dash-toolbar {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .dash-toolbar__group {
    width: 100%;
  }
  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px; /* spațiu pt. shadow chip-uri active */
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .dash-toolbar__clear {
    margin-left: 0;
    align-self: stretch;
    justify-content: center;
  }

  /* Grid: carduri ceva mai mici pt. mobile */
  .dash-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-3);
  }
}

@media (max-width: 480px) {
  /* Pe ecrane foarte mici, 2 carduri pe rând */
  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-lesson__body {
    padding: var(--space-3);
  }
  .card-lesson__title {
    font-size: var(--text-sm);
  }
}

/* ════════════════════════════════════════════════════════════════════
   REDUCED MOTION — respectăm preferința user-ului
   ════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .continue-card,
  .card-lesson,
  .chip,
  .dash-search,
  .dash-search__clear,
  .card-lesson__delete,
  .form-collapsible__body,
  .form-collapsible__summary svg,
  .continue-card__action {
    transition: none !important;
    animation: none !important;
  }
  .continue-card:hover,
  .card-lesson:hover {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   ADMIN 2026 REDESIGN — topbar compact + bibliotecă
   ────────────────────────────────────────────────────────────────────────
   Înlocuiește cele 5 carduri quick-nav cu o bară orizontală de tab-uri și
   redesigneazã pagina Bibliotecă (admin.php). Stilurile vechi rămân pentru
   restul paginilor admin care vor fi migrate în Faza 2.
   ════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════
   ADMIN TOPBAR — bară de tab-uri compactă (înlocuieste quick-nav)
   ════════════════════════════════════════════════════════════════════ */
.admin-tabs {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1.5px solid var(--color-border);
}
.admin-tabs__inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.admin-tabs__inner::-webkit-scrollbar { display: none; }

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid transparent;
  /* Background semi-transparent care se topește în peach-ul paginii.
     Maschează pattern-ul sub text fără să fie vizibil ca dreptunghi colorat —
     pattern-ul rămâne perceptibil pe margini, dar textul iese clar. */
  background: rgba(255, 248, 241, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 18px;
  transition: color var(--duration-fast), background var(--duration-fast), border-color var(--duration-fast);
  cursor: pointer;
  font-family: inherit;
}
.admin-tab:hover {
  color: var(--color-text-strong);
  background: var(--color-surface-hover);
}
/* Active state — pill ROZ cu border negru (mockup style) */
.admin-tab.is-active {
  color: var(--color-primary-strong);
  background: var(--color-primary-tint);
  border-color: var(--color-border-bold);
  font-weight: 600;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.admin-tab svg { flex-shrink: 0; width: 15px; height: 15px; }
.admin-tab:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--color-accent);
}

/* ════════════════════════════════════════════════════════════════════
   ADMIN HERO — titlu + KPI inline + acțiuni
   ════════════════════════════════════════════════════════════════════ */
.admin-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.admin-hero__titles { flex: 1 1 auto; min-width: 0; }

.admin-hero__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--color-text-strong);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
  /* Halou alb subtle — protejează textul de pattern-ul de fundal fără
     a desena un dreptunghi colorat. text-shadow blur 8px alb 80% creează
     un „glow" peste care literele rămân perfect lizibile. */
  text-shadow:
    0 0 8px rgba(255, 248, 241, 0.95),
    0 0 16px rgba(255, 248, 241, 0.85);
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}
/* Suffix script roz (ex. „tecă!" în „Biblio*tecă!*") — opțional, vezi PHP */
.admin-hero__title-script {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.15em;
  color: var(--color-primary);
  letter-spacing: 0.005em;
  line-height: 0.85;
  position: relative;
  top: 2px;
}

.admin-hero__sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  text-shadow: 0 0 6px rgba(255, 248, 241, 0.9);
}
.admin-hero__sub strong {
  color: var(--color-text-strong);
  font-weight: 700;
}

/* KPI inline pills în hero — peach/yellow/etc cu border negru subtle */
.kpi-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border-bold);
  font-size: var(--text-xs);
  font-weight: 700;
}
.kpi-inline--free { background: var(--color-success-soft); color: var(--color-success-strong); }
.kpi-inline--prem { background: var(--color-accent-soft);  color: var(--color-accent-strong); }

.admin-hero__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════════════
   ADMIN TOOLBAR — search + filter chips
   ════════════════════════════════════════════════════════════════════ */
.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface-peach);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 18px;
  margin-bottom: var(--space-4);
  box-shadow: 0 2px 0 var(--color-border-bold);
}

.admin-toolbar__search {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 var(--space-2) 0 var(--space-3);
}
.admin-toolbar__search .dash-search__input {
  font-size: var(--text-sm);
}

.admin-toolbar__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Label + chip compact pe toolbar admin (override la rules generale) */
.admin-toolbar .dash-toolbar__label {
  font-size: 10.5px;
}
.admin-toolbar .chip {
  padding: 4px 9px;
  font-size: 12.5px;
  gap: 4px;
}
.admin-toolbar .chip svg { width: 13px; height: 13px; }
.admin-toolbar .chip__count {
  min-width: 16px;
  height: 15px;
  font-size: 10.5px;
  padding: 0 4px;
  margin-left: 2px;
}

/* Chip cu count badge — pastilă neagră solidă cu text alb (matching mockup) */
.chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-border-bold);
  color: white;
  border-radius: var(--radius-full);
  margin-left: 4px;
}
.chip.is-active .chip__count {
  background: var(--color-border-bold);
  color: white;
}

/* Chip cu SVG inline (pentru filter categorie) */
.chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════════
   GRID ASSET-URI — carduri cu preview SVG
   ════════════════════════════════════════════════════════════════════ */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.asset-card {
  position: relative;
  background: var(--color-surface-2);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Drop shadow „flat" tip ilustrativ — offset 4px fără blur pentru efect playful */
  box-shadow: 0 2px 0 var(--color-border-bold);
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}
/* FIX: atributul HTML `hidden` are display:none doar implicit, prin user-agent
   stylesheet. Cum .asset-card setează `display: flex` explicit, atributul `hidden`
   nu mai are efect — bug-ul: filter-ele JS (search, categorie, tip) puneau
   card-urile în hidden=true, dar continuau să fie vizibile. Override-ul aici
   garantează că `[hidden]` ascunde corect indiferent de display-ul de pe regula
   de bază. */
.asset-card[hidden] { display: none; }
.asset-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 0 var(--color-border-bold), 0 8px 16px -4px rgba(28, 25, 23, 0.20);
}

.asset-card[data-type="premium"] {
  background: linear-gradient(180deg, var(--color-accent-soft) 0%, var(--color-surface-2) 60%);
}
.asset-card[data-type="premium"]:hover {
  border-color: var(--color-accent);
}

.asset-card__preview {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  padding: var(--space-2);
  overflow: hidden;
}

.asset-card__svg-wrap {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--color-text);
  padding: 6px;
  box-sizing: border-box;
}
/* SVG-urile au viewBox setat dar SUNT FĂRĂ atribute width/height intrinseci.
   Setarea explicită CSS width/height la valori fixe (70%) producea aspect
   ratio greșit pe riglete verticale (rigletă 10 are viewBox 125×1316 = 1:10.5)
   → conținutul ieșea din container și era clipat de overflow:hidden.
   Soluție: max-width/max-height: 100% lasă browser-ul să respecte
   preserveAspectRatio (default meet) → orice viewBox încape complet în
   wrapper-ul cu padding 6px breathing room. */
.asset-card__svg-wrap svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.asset-card__icon-fallback {
  display: grid;
  place-items: center;
  color: var(--color-text-faded);
  width: 36px;
  height: 36px;
}
.asset-card__icon-fallback svg {
  width: 36px;
  height: 36px;
}
.asset-card__icon-fallback--pdf {
  color: var(--color-danger);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  gap: 1px;
}
.asset-card__icon-fallback--pdf svg { color: var(--color-danger); width: 26px; height: 26px; }

.asset-card__badge {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  z-index: 1;
}
.asset-card__badge--prem {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.4);
}

.asset-card__body {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.asset-card__name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.asset-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  color: var(--color-text-faded);
}
.asset-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.asset-card__cat svg { width: 10px; height: 10px; flex-shrink: 0; opacity: 0.7; }
.asset-card__id {
  flex-shrink: 0;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.asset-card__tags {
  font-size: 10.5px;
  color: var(--color-text-faded);
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Delete button — discret, full opacity la hover */
.asset-card__delete-form {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  margin: 0;
}
.asset-card__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-danger);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--duration-fast), background var(--duration-fast), transform var(--duration-fast);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
}
.asset-card:hover .asset-card__delete,
.asset-card__delete:focus-visible {
  opacity: 1;
}
.asset-card__delete:hover {
  background: var(--color-danger);
  color: white;
  transform: scale(1.08);
}

/* Pe touch devices, delete-ul rămâne mereu vizibil cu opacity discretă */
@media (hover: none) {
  .asset-card__delete { opacity: 0.7; }
}

/* Empty results pentru search/filter cu zero match */
.admin-empty-results {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

/* Modal medium — un pic mai larg decât sm pentru form-urile cu grid 2-coloane */
.modal--md { max-width: 560px; }

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .admin-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-hero__actions {
    width: 100%;
  }
  .admin-hero__actions .btn {
    flex: 1;
    justify-content: center;
  }

  .admin-toolbar {
    padding: var(--space-2);
  }

  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 6px;
  }
  .asset-card__name { font-size: 11.5px; }
}

@media (max-width: 480px) {
  /* 3 carduri/rând pe mobil mic — mai dens decât 2, încă citibil */
  .asset-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .admin-tab,
  .asset-card,
  .asset-card__delete {
    transition: none !important;
  }
  .asset-card:hover {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   CHIP VARIANTS — colored accents pentru status filtru (admin_users)
   Folosite pentru chips care reprezintă stări (activ, premium, expirat)
   ────────────────────────────────────────────────────────────────────────
   Active state preserves the regular .is-active behavior (purple primary).
   Variants doar adaugă subtle background tint când nu sunt active. */
.chip--ok    { background: var(--color-success-soft); color: var(--color-success-strong); }
.chip--prem  { background: var(--color-accent-soft);  color: var(--color-accent-strong); }
.chip--warn  { background: #fed7aa;                    color: var(--color-warning-strong); }
.chip--err   { background: var(--color-danger-soft);  color: var(--color-danger-strong); }
.chip--muted { background: var(--color-surface-2);    color: var(--color-text-faded); }

.chip--ok:hover    { background: color-mix(in srgb, var(--color-success-soft) 70%, var(--color-success) 18%); color: var(--color-success-strong); }
.chip--prem:hover  { background: color-mix(in srgb, var(--color-accent-soft) 70%, var(--color-accent) 18%);   color: var(--color-accent-strong); }
.chip--warn:hover  { background: #fdba74; color: var(--color-warning-strong); }
.chip--err:hover   { background: color-mix(in srgb, var(--color-danger-soft) 70%, var(--color-danger) 18%);   color: var(--color-danger-strong); }
.chip--muted:hover { background: var(--color-border); color: var(--color-text); }

/* Active variant preserves color identity but increases contrast */
.chip--ok.is-active    { background: var(--color-success);  color: white; border-color: var(--color-success); }
.chip--prem.is-active  { background: var(--color-accent);   color: white; border-color: var(--color-accent); }
.chip--warn.is-active  { background: var(--color-warning);  color: white; border-color: var(--color-warning); }
.chip--err.is-active   { background: var(--color-danger);   color: white; border-color: var(--color-danger); }
.chip--muted.is-active { background: var(--color-text-muted); color: white; border-color: var(--color-text-muted); }

/* Count badge inside colored chip — use translucent white when chip is active */
.chip--ok.is-active .chip__count,
.chip--prem.is-active .chip__count,
.chip--warn.is-active .chip__count,
.chip--err.is-active .chip__count,
.chip--muted.is-active .chip__count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* ════════════════════════════════════════════════════════════════════════
   DASHBOARD TOOLBAR COMPACT — 2 dropdowns + 3 sort pills într-un singur rând
   ────────────────────────────────────────────────────────────────────────
   Înlocuiește banda de chips (18+11) cu select-uri native styled. Reducere
   ~60% din înălțimea verticală a toolbar-ului pe lecții cu mulți useri.
   ════════════════════════════════════════════════════════════════════════ */
.dash-toolbar--compact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--color-surface-peach);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 18px;
  /* Shadow stratificat (peach + drop shadow negru subtil) */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 3px 0 -1px var(--color-border-bold),
    0 8px 16px -8px rgba(28, 25, 23, 0.15);
  /* Default: cards view (16px = match gap-ul .dash-grid). Pentru compact view
     vezi regula `:has()` de mai jos — 6px = match gap-ul .dash-grid[data-view="compact"]. */
  margin-bottom: var(--space-4);
}
/* Sincronizez margin-bottom toolbar cu gap-ul real din .dash-grid pe modul activ.
   `:has()` browser support: Chrome 105+, Safari 15.4+, Firefox 121+. Re-evaluare
   automată când JS schimbă atributul data-view → tranziție live, fără flash. */
.dash-toolbar--compact:has(~ .dash-grid[data-view="compact"]) {
  margin-bottom: 6px;
}

.dash-toolbar__filters {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

/* Select pill — wrapper inline-flex care găzduiește label, dot opțional,
   <select> nativ (cu appearance:none ca să-i scoatem chevron-ul nativ) și
   chevron-ul nostru. Folosim native pentru: keyboard nav, search-by-typing,
   UX mobile nativ (picker iOS / wheel Android) — semnificativ mai bun decât
   un combobox custom. */
.dash-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 10px;
  height: 32px;
  min-width: 130px;
  background: var(--color-surface-2);
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}
.dash-select:hover {
  background: var(--color-surface-hover);
}
.dash-select:focus-within {
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}

.dash-select__label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-faded);
  flex-shrink: 0;
  pointer-events: none;
  padding-right: 4px;
  border-right: 1px solid var(--color-border);
  margin-right: 2px;
  line-height: 1;
}

/* Dot color-coded pentru select-ul materie — vizibil doar când e selectată */
.dash-select__dot {
  display: none;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px white inset, 0 0 0 0.5px rgba(0,0,0,0.06);
  pointer-events: none;
}

/* Color tokens per materie */
.dash-select[data-subject="romana"]     { --sel-accent: var(--subj-romana); }
.dash-select[data-subject="matematica"] { --sel-accent: var(--subj-matematica); }
.dash-select[data-subject="stiinte"]    { --sel-accent: var(--subj-stiinte); }
.dash-select[data-subject="geografie"]  { --sel-accent: var(--subj-geografie); }
.dash-select[data-subject="istorie"]    { --sel-accent: var(--subj-istorie); }
.dash-select[data-subject="biologie"]   { --sel-accent: var(--subj-biologie); }
.dash-select[data-subject="fizica"]     { --sel-accent: var(--subj-fizica); }
.dash-select[data-subject="chimie"]     { --sel-accent: var(--subj-chimie); }
.dash-select[data-subject="engleza"]    { --sel-accent: var(--subj-engleza); }
.dash-select[data-subject="franceza"]   { --sel-accent: var(--subj-franceza); }
.dash-select[data-subject="muzica"]     { --sel-accent: var(--subj-muzica); }
.dash-select[data-subject="arte"]       { --sel-accent: var(--subj-arte); }
.dash-select[data-subject="sport"]      { --sel-accent: var(--subj-sport); }
.dash-select[data-subject="religie"]    { --sel-accent: var(--subj-religie); }
.dash-select[data-subject="tic"]        { --sel-accent: var(--subj-tic); }
.dash-select[data-subject="civica"]     { --sel-accent: var(--subj-civica); }
.dash-select[data-subject="dezvoltare"] { --sel-accent: var(--subj-dezvoltare); }
.dash-select[data-subject="altele"]     { --sel-accent: var(--subj-altele); }

.dash-select[data-subject]:not([data-subject=""]) .dash-select__dot {
  display: inline-block;
  background: var(--sel-accent);
}
.dash-select[data-subject]:not([data-subject=""]) {
  background: color-mix(in srgb, var(--sel-accent) 10%, white);
}
.dash-select[data-subject]:not([data-subject=""]) .dash-select__input {
  color: var(--sel-accent);
  font-weight: 700;
}

/* Native <select> styled fără chevron (folosim chevron-ul nostru SVG mai jos).
   Padding-right mai mare ca să nu se suprapună textul peste chevron. */
.dash-select__input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  padding: 0 22px 0 0;
  height: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  text-indent: 0;
}
.dash-select__input:focus { outline: none; }
.dash-select__input::-ms-expand { display: none; }
.dash-select__input option {
  color: var(--color-text);
  background: white;
  font-weight: 500;
}

/* Chevron poziționat absolut pe colțul drept */
.dash-select__chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--color-text-faded);
  flex-shrink: 0;
}

/* Sort pills într-un toolbar compact — împinse spre dreapta cu margin-left auto */
.dash-toolbar--compact .chip-row--sort {
  margin-left: auto;
  gap: 4px;
}
.dash-toolbar--compact .chip--sort {
  padding: 4px 10px;
  font-size: 12.5px;
  height: 30px;
}

.dash-toolbar--compact .dash-toolbar__clear {
  padding: 4px 10px;
  font-size: 12.5px;
  height: 30px;
}

/* Mobile — stacked, dar încă compact */
@media (max-width: 760px) {
  .dash-toolbar--compact {
    padding: var(--space-2);
  }
  .dash-toolbar__filters {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .dash-select {
    width: 100%;
    height: 40px;
  }
  .dash-select__input { width: 100%; }
  .dash-toolbar--compact .chip-row--sort {
    margin-left: 0;
    width: 100%;
  }
  .dash-toolbar--compact .chip--sort {
    flex: 1;
    justify-content: center;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   VIEW TOGGLE — comutator între cards (preview mare) și compact (listă densă)
   ────────────────────────────────────────────────────────────────────────
   Plasat lângă sort pills în toolbar. Density mode-ul e o preferință a
   utilizatorului, salvată în localStorage de JS și aplicată instant la
   următorul load. Inspirație: Gmail (Comfortable / Compact / Spacious),
   GitHub (icons-grid vs. listă), Drive (grilă vs. listă).
   ════════════════════════════════════════════════════════════════════════ */
.view-toggle {
  display: inline-flex;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 0;
  flex-shrink: 0;
}
.view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: background var(--duration-fast), color var(--duration-fast);
}
.view-toggle__btn:hover {
  color: var(--color-text);
}
.view-toggle__btn.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.view-toggle__btn svg { flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════════════
   COMPACT VIEW — listă densă cu thumbnail mic la stânga
   ────────────────────────────────────────────────────────────────────────
   Activat prin atributul data-view="compact" pe .dash-grid. Cardurile
   devin rânduri orizontale. ~50px height fiecare = 5x densitate față de
   modul cards (cards ~280px height în viewport-ul curent).
   ════════════════════════════════════════════════════════════════════════ */
.dash-grid[data-view="compact"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* 2 coloane fix; minmax(0,1fr) previne overflow text long */
  gap: 6px 10px;  /* vertical 6px (densitate), horizontal 10px (separare clară între coloane) */
}
@media (max-width: 700px) {
  .dash-grid[data-view="compact"] { grid-template-columns: 1fr; }  /* mobile: 1 coloană */
}

/* Cardul în mod compact se transformă într-un rând orizontal */
.dash-grid[data-view="compact"] .card-lesson {
  background: var(--color-surface-2);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 0 var(--color-border-bold);
  transition: box-shadow var(--duration-fast), transform var(--duration-fast);
}
.dash-grid[data-view="compact"] .card-lesson:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--color-border-bold), 0 6px 12px -4px rgba(28, 25, 23, 0.15);
}

.dash-grid[data-view="compact"] .card-lesson__link {
  flex-direction: row;
  align-items: center;
  height: 56px;
  padding: 0;
}

/* Preview thumbnail mic la stânga — pătrat 56×56 */
.dash-grid[data-view="compact"] .card-lesson__preview {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-bottom: 0;
  border-right: 1.5px solid var(--color-border);
}
.dash-grid[data-view="compact"] .card-lesson__preview-empty svg {
  width: 22px;
  height: 22px;
}
.dash-grid[data-view="compact"] .card-lesson__subject-dot {
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 1.5px white, 0 1px 2px rgba(0,0,0,0.18);
}

/* Body — title + chips inline, footer la dreapta */
.dash-grid[data-view="compact"] .card-lesson__body {
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  flex: 1;
  min-width: 0;
}

.dash-grid[data-view="compact"] .card-lesson__title {
  font-size: 14px;
  -webkit-line-clamp: 1;       /* o singură linie, ellipsis */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  margin: 0;
}

/* Chips inline dispar la dimensiune mică, păstrăm doar materie ca dot indirect */
.dash-grid[data-view="compact"] .card-lesson__chips {
  flex-shrink: 0;
  flex-wrap: nowrap;
  display: none; /* default ascuns — apare doar pe ecrane mari */
}
@media (min-width: 1100px) {
  .dash-grid[data-view="compact"] .card-lesson__chips {
    display: flex;
  }
}

/* Footer compact — fără border dashed, ruling+timp în linie */
.dash-grid[data-view="compact"] .card-lesson__footer {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
  flex-shrink: 0;
  gap: var(--space-3);
  width: auto;
}
.dash-grid[data-view="compact"] .card-lesson__ruling {
  max-width: 200px;
  font-size: 11.5px;
}
.dash-grid[data-view="compact"] .card-lesson__time {
  font-size: 11.5px;
  margin-left: 0;
  min-width: 90px;
  text-align: right;
}
@media (max-width: 760px) {
  /* Pe mobil, ruling-ul dispare ca să rămână loc pentru titlu + dată */
  .dash-grid[data-view="compact"] .card-lesson__ruling {
    display: none;
  }
}

/* Delete în compact view: la dreapta, mereu vizibil cu opacity 0.5 */
.dash-grid[data-view="compact"] .card-lesson__delete-form {
  position: relative;
  top: auto;
  right: auto;
  margin-right: var(--space-2);
  flex-shrink: 0;
}
.dash-grid[data-view="compact"] .card-lesson__delete {
  width: 28px;
  height: 28px;
  opacity: 0.4;
  background: transparent;
  box-shadow: none;
}
.dash-grid[data-view="compact"] .card-lesson:hover .card-lesson__delete {
  opacity: 1;
  background: var(--color-danger-soft);
}

/* În compact view, card-link include și form-ul delete în același rând,
   deci form-ul trebuie scos din interiorul card-link. Refacem layout-ul:
   card devine flex container (.card-lesson devine row), nu doar .card-lesson__link. */
.dash-grid[data-view="compact"] .card-lesson {
  display: flex;
  align-items: stretch;
}
.dash-grid[data-view="compact"] .card-lesson__link {
  flex: 1;
  min-width: 0;
}
.dash-grid[data-view="compact"] .card-lesson__delete-form {
  display: flex;
  align-items: center;
  border-left: 1px dashed var(--color-border);
  padding: 0 var(--space-2);
}

/* Mobile compact view — păstrăm layout dar mai mic */
@media (max-width: 480px) {
  .dash-grid[data-view="compact"] .card-lesson__link {
    height: 48px;
  }
  .dash-grid[data-view="compact"] .card-lesson__preview {
    width: 48px;
    height: 48px;
  }
  .dash-grid[data-view="compact"] .card-lesson__title {
    font-size: 13px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   COMBOBOX CUSTOM — listbox dropdown 100% controlat (înlocuiește <select>)
   ────────────────────────────────────────────────────────────────────────
   Pattern: progressive enhancement. <select> nativ rămâne în DOM ca fallback
   no-JS. JS-ul îl ascunde și interacțiunile vin via .combobox__trigger +
   .combobox__panel. Implementare cu ARIA listbox pattern (combobox+listbox).

   Avantaj față de <select> nativ: control total (typography, spacing, hover,
   color-coded dots), aspect identic pe toate browsere, can include rich
   content (dot-uri color, iconițe, etc.).

   Trade-off: pe mobil pierdem picker-ul iOS/Android nativ. Listbox-ul nostru
   e tot accesibil prin keyboard (arrow keys, type-to-search, Enter, Escape).
   ════════════════════════════════════════════════════════════════════════ */

/* Container — moștenește layout-ul .dash-select existent (pill rotund cu
   label + dot + chevron). Adăugăm doar ce e specific combobox-ului. */
.combobox {
  /* Override la cursor: trigger-ul e button real, nu label */
  cursor: default;
}

/* Native <select> ascuns când JS e disponibil (păstrăm valoarea formularului) */
.combobox__native[hidden] {
  display: none !important;
}

/* Trigger — butonul vizibil care arată valoarea curentă */
.combobox__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  padding: 0 4px 0 0;
  height: 100%;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.combobox__trigger:focus { outline: none; }
.combobox__value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  min-width: 0;
}

/* Combobox cu materie selectată — text colorat pe combobox-ul activ */
.combobox[data-subject]:not([data-subject=""]) .combobox__trigger {
  color: var(--sel-accent);
  font-weight: 700;
}

/* Chevron rotat când e deschis */
.combobox.is-open .dash-select__chevron {
  transform: rotate(180deg);
  transition: transform var(--duration-fast);
}
.dash-select__chevron {
  transition: transform var(--duration-fast);
}

/* Panel listbox — poziționat absolut sub combobox */
.combobox__panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  max-width: 280px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  margin: 0;
  list-style: none;
  z-index: var(--z-popover, 50);
  /* Animație subtilă la deschidere */
  animation: comboboxOpen 120ms ease-out;
}
@keyframes comboboxOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.combobox__panel[hidden] {
  display: none !important;
}

/* Custom scrollbar mai subtil — listele lungi (18 materii) au scroll */
.combobox__panel::-webkit-scrollbar { width: 8px; }
.combobox__panel::-webkit-scrollbar-track { background: transparent; }
.combobox__panel::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 4px;
}

/* Opțiuni listbox */
.combobox__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.combobox__option:hover,
.combobox__option.is-active {
  background: var(--color-surface-hover);
}
.combobox__option.is-selected {
  background: var(--color-accent-soft);
  color: var(--color-text-strong);
  font-weight: 700;
}
.combobox__option.is-selected.is-active,
.combobox__option.is-selected:hover {
  background: color-mix(in srgb, var(--color-accent-soft) 60%, var(--color-accent) 25%);
}

.combobox__option-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combobox__option-check {
  flex-shrink: 0;
  color: var(--color-primary);
}

/* Dot color-coded pe opțiunile materie (re-folosim --subj-* tokens) */
.combobox__option-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  background: var(--color-text-faded);
  box-shadow: 0 0 0 1.5px white inset, 0 0 0 0.5px rgba(0,0,0,0.06);
}
.combobox__option--subject[data-subject="romana"]     .combobox__option-dot { background: var(--subj-romana); }
.combobox__option--subject[data-subject="matematica"] .combobox__option-dot { background: var(--subj-matematica); }
.combobox__option--subject[data-subject="stiinte"]    .combobox__option-dot { background: var(--subj-stiinte); }
.combobox__option--subject[data-subject="geografie"]  .combobox__option-dot { background: var(--subj-geografie); }
.combobox__option--subject[data-subject="istorie"]    .combobox__option-dot { background: var(--subj-istorie); }
.combobox__option--subject[data-subject="biologie"]   .combobox__option-dot { background: var(--subj-biologie); }
.combobox__option--subject[data-subject="fizica"]     .combobox__option-dot { background: var(--subj-fizica); }
.combobox__option--subject[data-subject="chimie"]     .combobox__option-dot { background: var(--subj-chimie); }
.combobox__option--subject[data-subject="engleza"]    .combobox__option-dot { background: var(--subj-engleza); }
.combobox__option--subject[data-subject="franceza"]   .combobox__option-dot { background: var(--subj-franceza); }
.combobox__option--subject[data-subject="muzica"]     .combobox__option-dot { background: var(--subj-muzica); }
.combobox__option--subject[data-subject="arte"]       .combobox__option-dot { background: var(--subj-arte); }
.combobox__option--subject[data-subject="sport"]      .combobox__option-dot { background: var(--subj-sport); }
.combobox__option--subject[data-subject="religie"]    .combobox__option-dot { background: var(--subj-religie); }
.combobox__option--subject[data-subject="tic"]        .combobox__option-dot { background: var(--subj-tic); }
.combobox__option--subject[data-subject="civica"]     .combobox__option-dot { background: var(--subj-civica); }
.combobox__option--subject[data-subject="dezvoltare"] .combobox__option-dot { background: var(--subj-dezvoltare); }
.combobox__option--subject[data-subject="altele"]     .combobox__option-dot { background: var(--subj-altele); }

/* Type-to-search hint vizual (opțional, micul indicator când utilizatorul tastează) */
.combobox__panel.is-typing::before {
  content: "🔎 " attr(data-typing);
  display: block;
  padding: 6px 10px 4px;
  font-size: 11px;
  color: var(--color-text-faded);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

/* Reduced motion — disable animation */
@media (prefers-reduced-motion: reduce) {
  .combobox__panel { animation: none; }
  .dash-select__chevron { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   CONTINUE BANNER — gradient violet, distinct vizual de cardurile lecții
   ────────────────────────────────────────────────────────────────────────
   Înlocuiește .continue-card (slim white/flat) care arăta identic cu
   cardurile lecții din modul compact, ducând la confuzie vizuală.
   Designul nou: bandă gradient violet (matching brand primary) cu text alb,
   identitate vizuală complet diferită — imposibil de confundat cu un card
   neutru de listă.
   ────────────────────────────────────────────────────────────────────────
   Layout: [icon] [eyebrow + title] [chips meta + time] [CTA pill]
   pe 1 rând horizontal, 64px height total.
   ════════════════════════════════════════════════════════════════════════ */
.continue-banner {
  --accent: var(--color-primary);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 10px 12px 18px;
  background: linear-gradient(135deg, #fff5ed 0%, #fed7aa 60%, #fdba74 100%);
  color: var(--color-text-strong);
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: 18px;
  text-decoration: none;
  margin-bottom: var(--space-4);
  overflow: hidden;
  /* Drop shadow ilustrativ — flat 4px offset */
  box-shadow: 0 2px 0 var(--color-border-bold), 0 6px 12px -4px rgba(28, 25, 23, 0.18);
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}
.continue-banner::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.30) 0%, transparent 60%);
  pointer-events: none;
  border-radius: 50%;
}
.continue-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 0 var(--color-border-bold), 0 8px 16px -4px rgba(28, 25, 23, 0.22);
}
.continue-banner:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--color-accent), 0 2px 0 var(--color-border-bold);
}

/* Icon play — rotund, fundal alb cu border negru */
.continue-banner__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: white;
  color: var(--color-primary);
  border: var(--border-thick) solid var(--color-border-bold);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Body — eyebrow + title pe 2 rânduri compacte */
.continue-banner__body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.continue-banner__eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary-strong);
  line-height: 1;
  margin-bottom: 3px;
}

.continue-banner__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-strong);
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-banner__title--default {
  font-style: italic;
  font-weight: 600;
  color: var(--color-text-muted);
}

.continue-banner__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Chips meta — alb cu border negru pe banner peach */
.continue-banner__chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: white;
  color: var(--color-text-strong);
  border: 1.5px solid var(--color-border-bold);
  white-space: nowrap;
}

.continue-banner__time {
  font-size: 11.5px;
  color: var(--color-text-muted);
  white-space: nowrap;
  margin-left: 6px;
}

/* CTA pill rose cu border negru — emphasis maxim */
.continue-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--color-primary);
  color: white;
  border: var(--border-thick) solid var(--color-border-bold);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform var(--duration-fast), background var(--duration-fast);
}
.continue-banner:hover .continue-banner__cta {
  transform: translateX(2px);
  background: color-mix(in srgb, var(--color-primary) 88%, var(--color-text-strong) 8%);
}
.continue-banner__cta svg { flex-shrink: 0; }

/* Mobile — meta dispare, cta rămâne; layout strâns dar lizibil */
@media (max-width: 760px) {
  .continue-banner {
    padding: 10px 8px 10px 12px;
    gap: var(--space-2);
  }
  .continue-banner__meta {
    display: none;
  }
  .continue-banner__icon {
    width: 36px;
    height: 36px;
  }
  .continue-banner__title {
    font-size: 14px;
  }
  .continue-banner__cta {
    padding: 6px 10px;
    font-size: 12px;
  }
  .continue-banner__cta span { display: none; }
}

@media (max-width: 480px) {
  /* Pe ecrane foarte mici, eyebrow-ul devine ascuns ca să încapă titlul */
  .continue-banner__eyebrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .continue-banner,
  .continue-banner__cta {
    transition: none !important;
  }
  .continue-banner:hover {
    transform: none;
  }
  .continue-banner:hover .continue-banner__cta {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════════════════
   ANTET „TABLA DE CLASĂ" (30.09.2026) — ardezie verde cu desene discrete
   de cretă, raft de lemn dedesubt cu bucăți de cretă; meniul stă pe o
   capsulă albă ca să rămână lizibil. Suprascrie .topbar de mai sus.
   ════════════════════════════════════════════════════════════════════ */
.topbar {
  --hdr-chalk: #f7f5ec;
  padding-bottom: calc(var(--space-3) + 10px);   /* loc pentru raftul de lemn */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='76' fill='none' stroke='white' stroke-opacity='.13' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 22h12M30 16v12'/%3E%3Cpath d='M72 58l12-22 12 22z'/%3E%3Cpath d='M150 12l3.5 7.5 8 1-6 5.5 1.6 8-7.1-4-7.1 4 1.6-8-6-5.5 8-1z'/%3E%3Cpath d='M204 50h15M204 57h15'/%3E%3Ccircle cx='268' cy='26' r='9'/%3E%3Cpath d='M300 58q6-8 12 0t12 0 12 0'/%3E%3Cpath d='M372 27l6 6 12-12'/%3E%3Cpath d='M412 50l10 10M422 50l-10 10'/%3E%3C/svg%3E") 0 2px / 440px 76px repeat-x,
    radial-gradient(120% 200% at 18% 0%, rgba(255, 255, 255, .11), transparent 58%),
    radial-gradient(70% 160% at 100% 100%, rgba(0, 0, 0, .22), transparent 60%),
    linear-gradient(#2f644b, #285741);
  border-bottom: 0;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, .28),
    0 10px 18px -12px rgba(60, 38, 16, .55);
}
/* Raftul de lemn */
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: linear-gradient(#b98650, #9a6a3a 55%, #8a5c30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 2px 0 #6d4724;
  pointer-events: none;
}
/* Bucățile de cretă de pe raft */
.topbar::before {
  content: "";
  position: absolute;
  left: 72px;                /* în stânga, sub „Tabla Interactivă” (cerut de proprietar) */
  bottom: 9px;
  width: 92px;
  height: 6px;
  background:
    linear-gradient(90deg,
      #fbfaf3 0 24px, transparent 24px 36px,
      #fde68a 36px 56px, transparent 56px 70px,
      #f9a8d4 70px 92px);
  border-radius: 3px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35));
  pointer-events: none;
}
/* Logo + nume scrise cu cretă */
.topbar .brand__icon svg line { stroke: #d9b27c; }        /* picioarele tablei — lemn */
.topbar .brand__text-bold,
.topbar .brand:hover .brand__text-bold {
  color: var(--hdr-chalk);
  text-shadow: 0 0 1px rgba(255, 255, 255, .4);
}
.topbar .brand__text-script,
.topbar .brand:hover .brand__text-script {
  color: #fde68a;
  text-shadow: 0 0 1px rgba(253, 230, 138, .45);
}
.topbar .brand:hover .brand__text-script { color: #fcd34d; }
/* Meniul: fără capsulă — fiecare buton e propria pastilă, direct pe tablă */
.topbar .topnav {
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.topbar .topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger),
.topbar .topnav__admin-link,
.topbar .user-menu__trigger {
  border: 2px solid var(--color-border-bold);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--color-border-bold);
}
.topbar .topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger) { padding: 7px 16px; background: #fff; }
.topbar .topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger):hover { background: #fef9c3; }
.topbar .topnav > a.is-active:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger) { background: var(--color-accent); }
.topbar .user-menu__trigger { padding: 3px 12px 3px 3px; background: #fff; }
.topbar .user-menu__trigger:hover,
.topbar .user-menu.is-open .user-menu__trigger { background: #fef9c3; }
@media (max-width: 680px) {
  .topbar { padding-bottom: calc(10px + 10px); }
  .topbar::before { left: 16px; }
}
@media print {
  .topbar::before, .topbar::after { display: none; }
}

.topbar{--k-ink:#1f2a44;--k-ink-soft:#4b5878;--k-yellow:#facc15;--k-orange:#fb923c;--k-red:#ef4444;--k-font:"Baloo 2","Nunito",system-ui,sans-serif}.topbar .topnav{font-family:var(--k-font);color:var(--k-ink);gap:10px;padding:0;background:transparent;border:0;box-shadow:none}.topbar .topnav > a:not(.btn){font-weight:700;color:var(--k-ink)}.topbar .topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger){font-family:var(--k-font);font-size:15px;font-weight:700;color:var(--k-ink);padding:7px 16px;background:#fff;border:2px solid var(--k-ink);border-radius:999px;box-shadow:0 2px 0 var(--k-ink)}.topbar .topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger):hover{background:#fef9c3;color:var(--k-ink)}.topbar .topnav > a:not(.btn):not(.topnav__admin-link):not(.user-menu__trigger).is-active{background:var(--k-yellow);border-color:var(--k-ink);box-shadow:0 2px 0 var(--k-ink)}.topbar .topnav .topnav__admin-link{font-family:var(--k-font);font-size:15px;font-weight:700;color:var(--k-ink);padding:7px 16px;background:#dcfce7;border:2px solid var(--k-ink);border-radius:999px;box-shadow:0 2px 0 var(--k-ink);transition:transform .12s ease,box-shadow .12s ease,background-color .12s ease}.topbar .topnav .topnav__admin-link:hover{background:#bbf7d0;color:var(--k-ink);transform:translateY(-1px);box-shadow:0 3px 0 var(--k-ink)}.topbar .topnav .topnav__admin-link:active{transform:translateY(1px);box-shadow:0 1px 0 var(--k-ink)}.topbar .topnav .topnav__admin-link svg{color:#15803d}.topbar .user-menu__trigger{background:#fff;padding:3px 12px 3px 3px;border:2px solid var(--k-ink);border-radius:999px;box-shadow:0 2px 0 var(--k-ink);color:var(--k-ink);transition:transform .12s ease,box-shadow .12s ease,background-color .12s ease}.topbar .user-menu__trigger:hover,.topbar .user-menu.is-open .user-menu__trigger{background:#fef9c3}.topbar .user-menu__trigger:hover{transform:translateY(-1px);box-shadow:0 3px 0 var(--k-ink)}.topbar .user-menu__avatar{width:30px;height:30px;border-radius:50%;background:var(--k-orange);color:var(--k-ink);border:2px solid var(--k-ink);font-family:var(--k-font);font-size:14px;font-weight:800}.topbar .user-menu__name{font-family:var(--k-font);font-size:15px;font-weight:700;color:var(--k-ink)}.topbar .user-menu__panel{background:#fffdf5;border:2px solid var(--k-ink);outline:0;border-radius:16px;box-shadow:0 2px 0 var(--k-ink)}.topbar .user-menu__email{font-family:var(--k-font);color:var(--k-ink-soft)}.topbar .user-menu__item{font-family:var(--k-font);font-weight:700;color:var(--k-ink);border-radius:10px}.topbar .user-menu__item:hover{background:#fef9c3;color:var(--k-ink)}.topbar .user-menu__item--danger{color:var(--k-red)}.topbar .user-menu__item--danger:hover{background:#fee2e2;color:#b91c1c}