/* ===================================================================
   PRIMĂRIA COMUNEI BĂLȚEȘTI — Design System
   ===================================================================
   1.  Tokens              6.  Formulare & filtre
   2.  Bază & tipografie   7.  Tabele & liste de documente
   3.  Layout              8.  Suprapuneri (modal, palette, toast)
   4.  Navigație           9.  Conținut redactat (prose)
   5.  Componente         10.  Subsol & utilitare
   =================================================================== */

/* ============================== 1. TOKENS ========================= */

:root {
  /* --- Brand: albastru civic --- */
  --brand-50:  #eef4ff;
  --brand-100: #dce7fb;
  --brand-200: #bbcff6;
  --brand-300: #8faeec;
  --brand-400: #5c85de;
  --brand-500: #2f62c9;
  --brand-600: #1f4cab;
  --brand-700: #183c85;
  --brand-800: #142f63;
  --brand-900: #0f2246;
  --brand-950: #0a1730;

  /* --- Accent: auriu instituțional --- */
  --gold-50:  #fdf8ec;
  --gold-100: #faeecd;
  --gold-300: #eccb72;
  --gold-500: #d9a521;
  --gold-600: #b9860f;
  --gold-700: #8f660c;

  /* --- Neutre --- */
  --n-0:   #ffffff;
  --n-25:  #fcfcfd;
  --n-50:  #f7f8fa;
  --n-100: #eff1f5;
  --n-200: #e3e6ed;
  --n-300: #ccd2dd;
  --n-400: #9aa3b5;
  --n-500: #6b7488;
  --n-600: #505869;
  --n-700: #3c4353;
  --n-800: #272d3a;
  --n-900: #171c26;
  --n-950: #0d1117;

  /* --- Semantice --- */
  --ok-50: #ecfdf4;   --ok-500: #0f9d58;  --ok-700: #077843;
  --warn-50: #fff8eb; --warn-500: #d98b0b; --warn-700: #9a6208;
  --err-50: #fef2f2;  --err-500: #dc3546;  --err-700: #a8202f;
  --info-50: #eff6ff; --info-500: #2f62c9; --info-700: #183c85;

  /* --- Roluri (tema luminoasă) --- */
  --bg:            var(--n-50);
  --bg-subtle:     var(--n-100);
  --surface:       var(--n-0);
  --surface-2:     var(--n-25);
  --surface-inset: var(--n-50);
  --border:        var(--n-200);
  --border-strong: var(--n-300);
  --text:          var(--n-900);
  --text-soft:     var(--n-600);
  --text-muted:    var(--n-500);
  --text-invert:   var(--n-0);
  --accent:        var(--brand-600);
  --accent-hover:  var(--brand-700);
  --accent-soft:   var(--brand-50);
  --accent-text:   var(--brand-700);
  --ring:          color-mix(in srgb, var(--brand-500) 42%, transparent);
  --header-bg:     rgba(255, 255, 255, 0.82);
  --deep:          var(--brand-900);
  --deep-2:        var(--brand-950);

  /* --- Spațiere (bază 4px) --- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 48px; --s-10: 64px;
  --s-11: 80px; --s-12: 104px;

  /* --- Rază --- */
  --r-xs: 5px; --r-sm: 7px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;

  /* --- Umbre (stratificate, discrete) --- */
  --sh-xs: 0 1px 2px rgba(15, 34, 70, 0.05);
  --sh-sm: 0 1px 2px rgba(15, 34, 70, 0.06), 0 2px 6px rgba(15, 34, 70, 0.05);
  --sh-md: 0 2px 4px rgba(15, 34, 70, 0.05), 0 8px 20px rgba(15, 34, 70, 0.07);
  --sh-lg: 0 4px 8px rgba(15, 34, 70, 0.06), 0 18px 44px rgba(15, 34, 70, 0.12);
  --sh-xl: 0 8px 16px rgba(15, 34, 70, 0.08), 0 32px 72px rgba(15, 34, 70, 0.18);

  /* --- Tipografie --- */
  --font-ui:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-prose: var(--font-ui);   /* o singură familie pe tot site-ul */
  --font-mono:  ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;

  --t-xs:   12px;  --t-sm:  13px;  --t-base: 14px; --t-md: 15px;
  --t-lg:   17px;  --t-xl:  20px;  --t-2xl: 24px;  --t-3xl: 30px;
  --t-4xl:  38px;  --t-5xl: 48px;

  /* --- Mișcare --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 320ms; --dur-4: 480ms;

  /* --- Straturi --- */
  --z-header: 100; --z-drawer: 200; --z-overlay: 300; --z-toast: 400;

  /* --- Layout --- */
  --wrap: 1240px;
  --wrap-narrow: 820px;
  --header-h: 68px;
}

/* --- Tema întunecată --- */
:root[data-theme="dark"] {
  --bg:            var(--n-950);
  --bg-subtle:     #0f1620;
  --surface:       #131a25;
  --surface-2:     #172030;
  --surface-inset: #0f1620;
  --border:        #26303f;
  --border-strong: #35415380;
  --text:          #e8ebf1;
  --text-soft:     #a9b2c2;
  --text-muted:    #818b9d;
  --text-invert:   var(--n-950);
  --accent:        var(--brand-400);
  --accent-hover:  var(--brand-300);
  --accent-soft:   #16233c;
  --accent-text:   var(--brand-300);
  --header-bg:     rgba(19, 26, 37, 0.84);
  --deep:          #0c1420;
  --deep-2:        #080e17;

  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3);
  --sh-md: 0 2px 4px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.4);
  --sh-lg: 0 4px 8px rgba(0, 0, 0, 0.4), 0 18px 44px rgba(0, 0, 0, 0.5);
  --sh-xl: 0 8px 16px rgba(0, 0, 0, 0.45), 0 32px 72px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* ====================== 2. BAZĂ & TIPOGRAFIE ====================== */

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

/* componentele folosesc display:flex/grid, care ar învinge regula implicită
   [hidden]{display:none} a browserului — filtrarea listelor depinde de asta */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--t-base);
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.018em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--t-4xl); letter-spacing: -0.028em; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

p { margin: 0 0 var(--s-4); }

a { color: var(--accent-text); text-decoration: none; transition: color var(--dur-1) ease; }
a:hover { color: var(--accent-hover); }

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

hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-7) 0; }

code, kbd { font-family: var(--font-mono); font-size: 0.92em; }

::selection { background: var(--brand-200); color: var(--brand-900); }
:root[data-theme="dark"] ::selection { background: var(--brand-700); color: #fff; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

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

.skip-link {
  position: fixed; top: var(--s-3); left: var(--s-3);
  z-index: 500;
  padding: var(--s-3) var(--s-5);
  background: var(--accent); color: #fff;
  border-radius: var(--r-md);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--dur-2) var(--ease);
}
.skip-link:focus { transform: none; color: #fff; }

/* ============================ 3. LAYOUT =========================== */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
.wrap-narrow { max-width: var(--wrap-narrow); }

.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; gap: var(--s-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }

.section { padding-block: var(--s-10); }
.section-tight { padding-block: var(--s-8); }

.section-head { margin-bottom: var(--s-6); }
.section-head h2 { font-size: var(--t-2xl); }
.section-head p { color: var(--text-soft); margin: var(--s-2) 0 0; max-width: 62ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-xs); font-weight: 650;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px;
  background: var(--gold-500); border-radius: 2px;
}

/* =========================== 4. NAVIGAȚIE ========================= */

/* --- Bara utilitară --- */
.topbar {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--t-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 38px; }
.topbar-list { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.topbar-item { display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap; }
.topbar-item i { color: var(--gold-300); font-size: 12px; }
.topbar a { color: rgba(255, 255, 255, 0.82); }
.topbar a:hover { color: var(--gold-300); }
.topbar-sep { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.16); }

/* --- Antet --- */
.header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-2) ease, border-color var(--dur-2) ease;
}
.header.is-stuck { box-shadow: var(--sh-sm); }
.header .wrap { display: flex; align-items: center; gap: var(--s-4); min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: var(--s-3); flex-shrink: 0; }
.brand:hover { color: inherit; }
.brand-mark {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: var(--r-md);
  background: linear-gradient(145deg, var(--brand-600), var(--brand-800));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px; letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--sh-sm);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-sub {
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
}
.brand-name { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; color: var(--text); }

/* --- Meniu principal --- */
.nav { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }

.nav-item { position: relative; }
.nav-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  background: none; border: 0; border-radius: var(--r-md);
  font: inherit; font-weight: 550; color: var(--text-soft);
  cursor: pointer;
  transition: background var(--dur-1) ease, color var(--dur-1) ease;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--bg-subtle); color: var(--text); }
.nav-btn .chev { font-size: 10px; opacity: 0.55; transition: transform var(--dur-2) var(--ease); }
.nav-item.is-open .nav-btn { background: var(--accent-soft); color: var(--accent-text); }
.nav-item.is-open .chev { transform: rotate(180deg); }
.nav-btn[aria-current="page"], .nav-btn.is-active { color: var(--accent-text); }

/* --- Mega-meniu --- */
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: max-content; min-width: 520px; max-width: min(760px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  padding: var(--s-5);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--s-5);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility var(--dur-2);
}
.nav-item.is-open .mega {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-aside {
  background: linear-gradient(160deg, var(--accent-soft), transparent 70%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.mega-aside i { font-size: 20px; color: var(--accent); }
.mega-aside strong { font-size: var(--t-md); }
.mega-aside p { margin: 0; font-size: var(--t-sm); color: var(--text-soft); line-height: 1.5; }

.mega-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.mega-col h4 {
  font-size: var(--t-xs); font-weight: 650; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: var(--s-2);
}
.mega-link {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-2);
  margin-inline: calc(var(--s-2) * -1);
  border-radius: var(--r-sm);
  color: var(--text); font-size: var(--t-base); font-weight: 500;
  transition: background var(--dur-1) ease, color var(--dur-1) ease;
}
.mega-link i { font-size: 14px; color: var(--text-muted); transition: color var(--dur-1) ease; width: 16px; text-align: center; flex-shrink: 0; }
.mega-link:hover { background: var(--bg-subtle); color: var(--accent-text); }
.mega-link:hover i { color: var(--accent); }

/* --- Acțiuni antet --- */
.header-actions { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer; font-size: 15px;
  transition: all var(--dur-1) ease;
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--text); border-color: var(--border-strong); }

.search-trigger {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface-inset); color: var(--text-muted);
  font: inherit; font-size: var(--t-sm); cursor: pointer;
  transition: all var(--dur-1) ease;
  min-width: 190px;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-soft); background: var(--surface); }
.search-trigger .kbd { margin-left: auto; }

.kbd {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 6px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xs); border-bottom-width: 2px;
}

/* --- Meniu mobil --- */
.nav-toggle { display: none; }

.drawer {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  visibility: hidden;
  overflow: hidden;
}
.drawer.is-open { visibility: visible; }
.drawer-scrim {
  position: absolute; inset: 0;
  background: rgba(10, 23, 48, 0.5);
  opacity: 0; transition: opacity var(--dur-3) var(--ease);
  backdrop-filter: blur(2px);
}
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; inset-block: 0; right: 0;
  width: min(400px, 88vw);
  background: var(--surface);
  box-shadow: var(--sh-xl);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease);
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-body { overflow-y: auto; padding: var(--s-4) var(--s-5) var(--s-8); flex: 1 1 auto; }
.drawer-foot { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); display: grid; gap: var(--s-2); }

.acc-group + .acc-group { border-top: 1px solid var(--border); }
.acc-btn {
  width: 100%; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) 0;
  background: none; border: 0; font: inherit; font-weight: 600; font-size: var(--t-md);
  color: var(--text); cursor: pointer; text-align: left;
}
.acc-btn i.lead { color: var(--accent); font-size: 16px; }
.acc-btn .chev { margin-left: auto; font-size: 11px; color: var(--text-muted); transition: transform var(--dur-2) var(--ease); }
.acc-group.is-open .acc-btn .chev { transform: rotate(180deg); }
.acc-panel { display: none; padding-bottom: var(--s-4); }
.acc-group.is-open .acc-panel { display: block; }
.acc-panel h4 {
  font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted); margin: var(--s-3) 0 var(--s-1);
}
.acc-link {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm); color: var(--text-soft); font-size: var(--t-base);
}
.acc-link i { font-size: 13px; color: var(--text-muted); width: 16px; }
.acc-link:hover { background: var(--bg-subtle); color: var(--accent-text); }

/* --- Breadcrumb --- */
.crumbs {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--s-2);
  font-size: var(--t-sm); color: var(--text-muted);
  list-style: none; padding: 0; margin: 0;
}
.crumbs li { display: inline-flex; align-items: center; gap: var(--s-2); }
.crumbs li + li::before { content: "/"; color: var(--border-strong); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--accent-text); }
.crumbs [aria-current] { color: var(--text-soft); font-weight: 550; }

/* ========================= 5. COMPONENTE ========================== */

/* --- Butoane --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 38px; padding: 0 var(--s-4);
  border: 1px solid transparent; border-radius: var(--r-md);
  font: inherit; font-size: var(--t-base); font-weight: 600;
  line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background var(--dur-1) ease, border-color var(--dur-1) ease,
              color var(--dur-1) ease, box-shadow var(--dur-1) ease, transform var(--dur-1) ease;
}
.btn:active { transform: translateY(0.5px); }
.btn i { font-size: 15px; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; pointer-events: none; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--sh-xs); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: var(--sh-sm); }
:root[data-theme="dark"] .btn-primary { color: var(--brand-950); }
:root[data-theme="dark"] .btn-primary:hover { color: var(--brand-950); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--sh-xs); }
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--n-400); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }

.btn-gold { background: var(--gold-500); color: var(--brand-950); }
.btn-gold:hover { background: var(--gold-300); color: var(--brand-950); }

.btn-danger { background: var(--err-500); color: #fff; }
.btn-danger:hover { background: var(--err-700); color: #fff; }

.btn-sm { height: 32px; padding: 0 var(--s-3); font-size: var(--t-sm); }
.btn-lg { height: 46px; padding: 0 var(--s-6); font-size: var(--t-md); border-radius: var(--r-lg); }
.btn-icon { width: 38px; padding: 0; }
.btn-block { width: 100%; }

.btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin 0.6s linear infinite;
}
.btn-secondary.is-loading::after { border-color: var(--border); border-top-color: var(--accent); }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Carduri --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), border-color var(--dur-2) ease;
}
.card-pad { padding: var(--s-5); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: var(--t-md); font-weight: 650; }
.card-body { padding: var(--s-5); }
.card-foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); background: var(--surface-inset); border-radius: 0 0 var(--r-lg) var(--r-lg); }

.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--border-strong); }

/* --- Card de serviciu --- */
.svc {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-5);
  position: relative; overflow: hidden;
}
.svc::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold-500));
  opacity: 0; transition: opacity var(--dur-2) ease;
}
.svc:hover::after { opacity: 1; }
.svc-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: grid; place-items: center; font-size: 18px;
  background: var(--accent-soft); color: var(--accent);
  transition: background var(--dur-2) ease, color var(--dur-2) ease;
}
.svc:hover .svc-icon { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .svc:hover .svc-icon { color: var(--brand-950); }
.svc h3 { font-size: var(--t-md); font-weight: 650; }
.svc p { margin: 0; font-size: var(--t-sm); color: var(--text-soft); line-height: 1.55; }
.svc-more { margin-top: auto; font-size: var(--t-sm); font-weight: 600; color: var(--accent-text); display: inline-flex; align-items: center; gap: var(--s-2); }
.svc-more i { transition: transform var(--dur-2) var(--ease); }
.svc:hover .svc-more i { transform: translateX(3px); }

/* --- Statistici --- */
.stat { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); }
.stat-label { font-size: var(--t-xs); font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.stat-value { font-size: var(--t-3xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: var(--t-sm); color: var(--text-soft); }
.stat-icon {
  position: absolute; right: var(--s-4); top: var(--s-4);
  font-size: 18px; color: var(--accent); opacity: 0.35;
}
.stat { position: relative; }

/* --- Badge --- */
.badge {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: var(--t-xs); font-weight: 650; line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-neutral { background: var(--bg-subtle); color: var(--text-soft); border-color: var(--border); }
.badge-brand   { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.badge-gold    { background: var(--gold-50); color: var(--gold-700); border-color: color-mix(in srgb, var(--gold-500) 30%, transparent); }
.badge-ok      { background: var(--ok-50); color: var(--ok-700); border-color: color-mix(in srgb, var(--ok-500) 26%, transparent); }
.badge-warn    { background: var(--warn-50); color: var(--warn-700); border-color: color-mix(in srgb, var(--warn-500) 30%, transparent); }
.badge-err     { background: var(--err-50); color: var(--err-700); border-color: color-mix(in srgb, var(--err-500) 26%, transparent); }
:root[data-theme="dark"] .badge-ok   { background: #0e2a1c; }
:root[data-theme="dark"] .badge-warn { background: #2c2006; }
:root[data-theme="dark"] .badge-err  { background: #2d1315; }
:root[data-theme="dark"] .badge-gold { background: #2a2109; color: var(--gold-300); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* --- Antet de pagină --- */
.page-head {
  background:
    radial-gradient(1000px 340px at 88% -10%, color-mix(in srgb, var(--brand-600) 55%, transparent), transparent 70%),
    linear-gradient(180deg, var(--deep), var(--deep-2));
  color: #fff;
  padding-block: var(--s-6) var(--s-9);
  position: relative; overflow: hidden;
}
.page-head::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  opacity: 0.7;
}
.page-head .crumbs, .page-head .crumbs a { color: rgba(255, 255, 255, 0.6); }
.page-head .crumbs a:hover { color: var(--gold-300); }
.page-head .crumbs li + li::before { color: rgba(255, 255, 255, 0.3); }
.page-head .crumbs [aria-current] { color: rgba(255, 255, 255, 0.9); }
.page-head h1 { color: #fff; margin-top: var(--s-5); }
.page-head .lead {
  margin: var(--s-3) 0 0; max-width: 66ch;
  color: rgba(255, 255, 255, 0.72); font-size: var(--t-md);
}
.page-head-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.page-head .badge-neutral {
  background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.16);
}
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; }

/* --- Panou plutitor peste antet --- */
.pull-up { margin-top: calc(var(--s-8) * -1); position: relative; z-index: 1; }

/* --- Stare goală --- */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--s-3); padding: var(--s-10) var(--s-5);
  color: var(--text-soft);
}
.empty-icon {
  width: 52px; height: 52px; border-radius: var(--r-lg);
  display: grid; place-items: center; font-size: 22px;
  background: var(--bg-subtle); color: var(--text-muted);
}
.empty h3 { font-size: var(--t-md); color: var(--text); }
.empty p { margin: 0; font-size: var(--t-base); max-width: 44ch; }

/* --- Alertă --- */
.alert {
  display: flex; gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--border); border-left-width: 3px;
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--t-base);
}
.alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert p:last-child { margin-bottom: 0; }
.alert-info { border-left-color: var(--info-500); background: var(--info-50); }
.alert-ok   { border-left-color: var(--ok-500);   background: var(--ok-50); }
.alert-warn { border-left-color: var(--warn-500); background: var(--warn-50); }
.alert-err  { border-left-color: var(--err-500);  background: var(--err-50); }
.alert-info i { color: var(--info-500); } .alert-ok i { color: var(--ok-500); }
.alert-warn i { color: var(--warn-500); } .alert-err i { color: var(--err-500); }
:root[data-theme="dark"] .alert-info { background: #101d33; }
:root[data-theme="dark"] .alert-ok   { background: #0e2a1c; }
:root[data-theme="dark"] .alert-warn { background: #2c2006; }
:root[data-theme="dark"] .alert-err  { background: #2d1315; }

/* --- Schelet de încărcare --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border) 37%, var(--bg-subtle) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ====================== 6. FORMULARE & FILTRE ===================== */

.field { display: flex; flex-direction: column; gap: var(--s-2); }
.label { font-size: var(--t-sm); font-weight: 600; color: var(--text); }
.label .req { color: var(--err-500); }
.hint { font-size: var(--t-sm); color: var(--text-muted); }
.error-text { font-size: var(--t-sm); color: var(--err-700); display: flex; align-items: center; gap: var(--s-1); }

.input, .select, .textarea {
  width: 100%; min-height: 38px;
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font: inherit; font-size: var(--t-base); color: var(--text);
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease, background var(--dur-1) ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.input[aria-invalid="true"], .is-invalid { border-color: var(--err-500); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--err-500) 30%, transparent); }
.input:disabled, .select:disabled { background: var(--bg-subtle); color: var(--text-muted); cursor: not-allowed; }

.select {
  appearance: none;
  padding-right: var(--s-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%236b7488'%3E%3Cpath d='M3.2 5.6 8 10.4l4.8-4.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s-3) center;
  cursor: pointer;
}

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-left: var(--s-8); }
.input-group > i {
  position: absolute; left: var(--s-3);
  color: var(--text-muted); font-size: 14px; pointer-events: none;
}
.input-group .clear {
  position: absolute; right: var(--s-2);
  border: 0; background: none; color: var(--text-muted);
  cursor: pointer; padding: var(--s-1); border-radius: var(--r-xs);
  display: none;
}
.input-group.has-value .clear { display: grid; place-items: center; }
.input-group .clear:hover { color: var(--text); background: var(--bg-subtle); }

/* --- Comutator --- */
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
.switch span {
  position: absolute; inset: 0; border-radius: var(--r-full);
  background: var(--n-300); transition: background var(--dur-2) ease; pointer-events: none;
}
.switch span::before {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--sh-sm);
  transition: transform var(--dur-2) var(--ease);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }

/* --- Filtre / chips --- */
.filters {
  display: flex; align-items: center; gap: var(--s-3);
  flex-wrap: wrap;
}
.filters .grow { min-width: 220px; }

.chips { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 32px; padding: 0 var(--s-3);
  border: 1px solid var(--border-strong); border-radius: var(--r-full);
  background: var(--surface); color: var(--text-soft);
  font: inherit; font-size: var(--t-sm); font-weight: 550;
  cursor: pointer; white-space: nowrap;
  transition: all var(--dur-1) ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
:root[data-theme="dark"] .chip[aria-pressed="true"] { color: var(--brand-950); }
.chip .count {
  font-size: 11px; font-weight: 650;
  padding: 1px 6px; border-radius: var(--r-full);
  background: var(--bg-subtle); color: var(--text-muted);
}
.chip[aria-pressed="true"] .count { background: rgba(255, 255, 255, 0.22); color: inherit; }

/* --- Comutator de vizualizare --- */
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-inset); border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.segmented button {
  height: 30px; padding: 0 var(--s-3);
  border: 0; border-radius: var(--r-sm); background: none;
  font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--text-muted);
  cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2);
  transition: all var(--dur-1) ease;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] {
  background: var(--surface); color: var(--accent-text); box-shadow: var(--sh-xs);
}

/* ================ 7. TABELE & LISTE DE DOCUMENTE ================== */

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-base); }
.table th {
  text-align: left; font-weight: 650; font-size: var(--t-xs);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-inset);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.table td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background var(--dur-1) ease; }
.table tbody tr:hover { background: var(--surface-inset); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Listă de documente --- */
.doc-list { display: flex; flex-direction: column; }

.doc {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  color: inherit;
  transition: background var(--dur-1) ease;
  position: relative;
}
.doc:last-child { border-bottom: 0; }
.doc:hover { background: var(--surface-inset); color: inherit; }
.doc:hover .doc-name { color: var(--accent-text); }

.doc-ico {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
  background: var(--bg-subtle); color: var(--text-muted);
  border: 1px solid var(--border);
}
.doc-ico[data-ext="pdf"]  { background: var(--err-50);  color: var(--err-700);  border-color: color-mix(in srgb, var(--err-500) 20%, transparent); }
.doc-ico[data-ext="doc"]  { background: var(--info-50); color: var(--info-700); border-color: color-mix(in srgb, var(--info-500) 20%, transparent); }
.doc-ico[data-ext="xls"]  { background: var(--ok-50);   color: var(--ok-700);   border-color: color-mix(in srgb, var(--ok-500) 20%, transparent); }
.doc-ico[data-ext="img"]  { background: var(--gold-50); color: var(--gold-700); border-color: color-mix(in srgb, var(--gold-500) 24%, transparent); }
:root[data-theme="dark"] .doc-ico[data-ext="pdf"] { background: #2d1315; }
:root[data-theme="dark"] .doc-ico[data-ext="doc"] { background: #101d33; }
:root[data-theme="dark"] .doc-ico[data-ext="xls"] { background: #0e2a1c; }
:root[data-theme="dark"] .doc-ico[data-ext="img"] { background: #2a2109; color: var(--gold-300); }

.doc-main { flex: 1 1 auto; min-width: 0; }
.doc-name {
  font-weight: 550; font-size: var(--t-md); color: var(--text);
  transition: color var(--dur-1) ease;
  display: block;
  overflow-wrap: anywhere;
}
.doc-meta {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  margin-top: 2px; font-size: var(--t-sm); color: var(--text-muted);
}
.doc-meta span { display: inline-flex; align-items: center; gap: var(--s-1); }
.doc-actions { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }
.doc-open {
  opacity: 0; transform: translateX(-4px);
  transition: opacity var(--dur-2) ease, transform var(--dur-2) var(--ease);
}
.doc:hover .doc-open, .doc:focus-within .doc-open { opacity: 1; transform: none; }
@media (hover: none) { .doc-open { opacity: 1; transform: none; } }

mark.hit { background: var(--gold-100); color: inherit; border-radius: 3px; padding: 0 2px; }
:root[data-theme="dark"] mark.hit { background: var(--gold-700); color: #fff; }

/* --- Grup pe ani --- */
.year-group + .year-group { margin-top: var(--s-3); }
.year-head {
  width: 100%;
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg);
  font: inherit; cursor: pointer; text-align: left;
  transition: all var(--dur-1) ease;
}
.year-head:hover { border-color: var(--border-strong); background: var(--surface-inset); }
.year-group.is-open .year-head { border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom-color: transparent; }
.year-num { font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.year-head .chev { margin-left: auto; color: var(--text-muted); transition: transform var(--dur-2) var(--ease); }
.year-group.is-open .year-head .chev { transform: rotate(180deg); }
.year-panel {
  display: none;
  border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.year-group.is-open .year-panel { display: block; animation: slide-down var(--dur-3) var(--ease); }
@keyframes slide-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* --- Paginare --- */
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s-2); flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 var(--s-2);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--text-soft);
  font-size: var(--t-sm); font-weight: 600;
  transition: all var(--dur-1) ease;
}
.pager a:hover { border-color: var(--accent); color: var(--accent-text); }
.pager [aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* =================== 8. SUPRAPUNERI ============================== */

.overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: none; align-items: flex-start; justify-content: center;
  padding: var(--s-6) var(--s-4);
}
.overlay.is-open { display: flex; }
.overlay-scrim {
  position: absolute; inset: 0;
  background: rgba(10, 23, 48, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fade var(--dur-2) ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }

/* --- Modal --- */
.modal {
  position: relative; width: 100%; max-width: 560px;
  margin-top: 8vh;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--sh-xl);
  animation: rise var(--dur-3) var(--ease);
  display: flex; flex-direction: column; max-height: 80vh;
}
.modal-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-5); border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: var(--t-lg); flex: 1 1 auto; }
.modal-body { padding: var(--s-5); overflow-y: auto; }
.modal-foot { display: flex; gap: var(--s-2); justify-content: flex-end; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); background: var(--surface-inset); border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* --- Paletă de comandă --- */
.palette {
  position: relative; width: 100%; max-width: 640px;
  margin-top: 10vh;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--sh-xl);
  animation: rise var(--dur-3) var(--ease);
  display: flex; flex-direction: column; overflow: hidden;
  max-height: min(560px, 74vh);
}
.palette-input {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.palette-input i { color: var(--text-muted); font-size: 17px; }
.palette-input input {
  flex: 1 1 auto; border: 0; background: none; outline: none;
  font: inherit; font-size: var(--t-lg); color: var(--text);
}
.palette-input input::placeholder { color: var(--text-muted); }
.palette-results { overflow-y: auto; padding: var(--s-2); flex: 1 1 auto; }
.palette-group-label {
  font-size: var(--t-xs); font-weight: 650; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-muted);
  padding: var(--s-3) var(--s-3) var(--s-1);
}
.palette-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  color: var(--text); cursor: pointer;
}
.palette-item i { color: var(--text-muted); font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.palette-item .pi-main { flex: 1 1 auto; min-width: 0; }
.palette-item .pi-title { font-weight: 550; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .pi-sub { font-size: var(--t-sm); color: var(--text-muted); }
.palette-item.is-active, .palette-item:hover { background: var(--accent-soft); color: var(--accent-text); }
.palette-item.is-active i, .palette-item:hover i { color: var(--accent); }
.palette-foot {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border);
  background: var(--surface-inset); font-size: var(--t-xs); color: var(--text-muted);
}

/* --- Notificări --- */
.toasts {
  position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--s-2);
  max-width: min(380px, calc(100vw - var(--s-8)));
}
.toast {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  animation: toast-in var(--dur-3) var(--ease);
  font-size: var(--t-base);
}
.toast.is-out { animation: toast-out var(--dur-2) ease forwards; }
.toast i { font-size: 16px; margin-top: 1px; }
.toast-ok   { border-left-color: var(--ok-500); }   .toast-ok i   { color: var(--ok-500); }
.toast-err  { border-left-color: var(--err-500); }  .toast-err i  { color: var(--err-500); }
.toast-warn { border-left-color: var(--warn-500); } .toast-warn i { color: var(--warn-500); }
.toast-info i { color: var(--info-500); }
.toast strong { display: block; font-weight: 650; }
.toast p { margin: 2px 0 0; color: var(--text-soft); font-size: var(--t-sm); }
.toast button { margin-left: auto; border: 0; background: none; color: var(--text-muted); cursor: pointer; padding: 0 2px; }
@keyframes toast-in  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ==================== 9. CONȚINUT REDACTAT ======================= */

.prose {
  font-family: var(--font-prose);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text);
}
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.05em; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-ui);
  margin: 1.9em 0 0.6em;
  letter-spacing: -0.02em;
}
.prose h2 { font-size: var(--t-xl); }
.prose h3 { font-size: var(--t-lg); }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { margin: 0 0 1.05em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose strong, .prose b { font-weight: 650; }
.prose hr { margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: var(--t-base); margin-bottom: 1.4em; }
.prose th, .prose td { border: 1px solid var(--border); padding: var(--s-2) var(--s-3); text-align: left; }
.prose th { background: var(--surface-inset); font-weight: 650; }
.prose img { border-radius: var(--r-md); margin: 1.2em 0; box-shadow: var(--sh-sm); }
.prose blockquote {
  margin: 1.4em 0; padding: var(--s-2) var(--s-5);
  border-left: 3px solid var(--gold-500);
  color: var(--text-soft); font-style: italic;
}
/* moștenirea marcajului vechi: <font color> din textele de lege */
.prose font[style], .prose font[color] {
  color: var(--text-soft) !important;
  font-style: normal;
  display: block;
  margin: 0.5em 0 1em;
  padding-left: var(--s-4);
  border-left: 2px solid var(--border);
  font-size: 0.96em;
}
.prose .list-group { display: block; }

/* --- Cuprins lateral --- */
.toc {
  position: sticky; top: calc(var(--header-h) + var(--s-5));
  font-size: var(--t-base);
}
.toc h4 {
  font-size: var(--t-xs); font-weight: 650; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--s-3);
}
.toc a {
  display: block; padding: var(--s-2) var(--s-3);
  border-left: 2px solid var(--border);
  color: var(--text-soft); font-size: var(--t-sm);
  transition: all var(--dur-1) ease;
}
.toc a:hover { border-left-color: var(--accent); color: var(--accent-text); background: var(--surface-inset); }
.toc a.is-active { border-left-color: var(--accent); color: var(--accent-text); font-weight: 600; }

/* ==================== 10. SUBSOL & UTILITARE ===================== */

.footer {
  margin-top: var(--s-11);
  background: var(--deep);
  color: rgba(255, 255, 255, 0.66);
  font-size: var(--t-base);
  border-top: 3px solid var(--gold-500);
}
.footer-main { padding-block: var(--s-10) var(--s-8); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--s-8); }
.footer h4 {
  color: #fff; font-size: var(--t-sm); font-weight: 650;
  letter-spacing: 0.07em; text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.footer a { color: rgba(255, 255, 255, 0.66); }
.footer a:hover { color: var(--gold-300); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.footer-links a { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-base); }
.footer-brand { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.footer-brand .brand-name, .footer-brand .brand-sub { color: #fff; }
.footer-brand .brand-sub { color: rgba(255, 255, 255, 0.5); }
.footer-contact { display: grid; gap: var(--s-3); }
.footer-contact div { display: flex; gap: var(--s-3); align-items: flex-start; }
.footer-contact i { color: var(--gold-300); font-size: 14px; margin-top: 3px; flex-shrink: 0; }
.footer-social { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.footer-social a {
  width: 36px; height: 36px; border-radius: var(--r-md);
  display: grid; place-items: center; font-size: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--dur-2) ease;
}
.footer-social a:hover { background: var(--gold-500); color: var(--brand-950); border-color: var(--gold-500); }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: var(--s-5);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
  font-size: var(--t-sm); color: rgba(255, 255, 255, 0.45);
}
.footer-legal-links { display: flex; gap: var(--s-5); flex-wrap: wrap; }

.to-top {
  position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: 90;
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--surface); color: var(--text-soft);
  border: 1px solid var(--border); box-shadow: var(--sh-md);
  cursor: pointer; font-size: 17px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--dur-3) var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent-text); border-color: var(--accent); }

/* --- Utilitare --- */
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.small { font-size: var(--t-sm); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.hide { display: none !important; }

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity var(--dur-4) var(--ease), transform var(--dur-4) var(--ease); }

/* ========================= RESPONSIVE ============================ */

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-7); }
  .search-trigger { min-width: 0; }
  .search-trigger span, .search-trigger .kbd { display: none; }
  .search-trigger { width: 36px; justify-content: center; padding: 0; }
}

@media (max-width: 980px) {
  .nav { display: none; }
  .nav-toggle { display: grid; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --t-4xl: 32px; --t-3xl: 26px; }
}

@media (max-width: 760px) {
  :root { --t-4xl: 27px; --t-3xl: 23px; --t-2xl: 20px; }
  .wrap { padding-inline: var(--s-4); }
  .section { padding-block: var(--s-8); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .topbar { display: none; }
  .page-head { padding-block: var(--s-5) var(--s-7); }
  .page-head-row { gap: var(--s-4); }
  .doc { gap: var(--s-3); padding: var(--s-3); }
  .doc-ico { width: 32px; height: 32px; font-size: 13px; }
  .doc-name { font-size: var(--t-base); }
  .modal, .palette { margin-top: var(--s-4); max-height: calc(100vh - var(--s-10)); }
  .toasts { left: var(--s-4); right: var(--s-4); bottom: var(--s-4); max-width: none; }
  .prose { font-size: 16px; }
  .filters .grow { min-width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; justify-content: center; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .topbar, .header, .drawer, .footer, .to-top, .overlay, .toasts, .filters, .doc-actions { display: none !important; }
  body { background: #fff; }
  .page-head { background: none; color: #000; padding-block: 0 var(--s-4); }
  .page-head h1, .page-head .lead { color: #000; }
  .card { border-color: #ccc; box-shadow: none; }
}

/* ===================================================================
   PAGINA PRINCIPALĂ
   =================================================================== */

.hero {
  position: relative;
  padding-block: var(--s-10) 0;
  background:
    radial-gradient(900px 420px at 12% 0%, var(--accent-soft), transparent 62%),
    radial-gradient(700px 360px at 92% 8%, var(--gold-50), transparent 58%);
}
:root[data-theme="dark"] .hero {
  background:
    radial-gradient(900px 420px at 12% 0%, #16233c, transparent 62%),
    radial-gradient(700px 360px at 92% 8%, #1d1a10, transparent 58%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: var(--s-9);
  align-items: start;
  padding-bottom: var(--s-4);
}

.hero-copy h1 { margin-top: var(--s-4); font-size: clamp(30px, 4.2vw, 50px); }
.hero-copy h1 .hl {
  background: linear-gradient(100deg, var(--accent), var(--gold-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  margin-top: var(--s-4);
  font-size: var(--t-lg);
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 56ch;
}

.hero-search {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; max-width: 560px; height: 54px;
  margin-top: var(--s-6); padding: 0 var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  font: inherit; font-size: var(--t-md); color: var(--text-muted);
  cursor: pointer; text-align: left;
  transition: all var(--dur-2) var(--ease);
}
.hero-search:hover { border-color: var(--accent); box-shadow: var(--sh-md); transform: translateY(-1px); }
.hero-search > i:first-child { font-size: 18px; color: var(--accent); }
.hero-search .kbd { margin-left: auto; }

.hero-cta { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-5); }

.hero-trust {
  list-style: none; padding: 0;
  margin: var(--s-6) 0 0;
  display: flex; gap: var(--s-6); flex-wrap: wrap;
  font-size: var(--t-sm); color: var(--text-muted);
}
.hero-trust li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-trust i { color: var(--ok-500); font-size: 14px; }
.hero-trust a { display: inline-flex; align-items: center; gap: var(--s-2); color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.hero-trust a:hover { color: var(--text); }

.hero-panel { box-shadow: var(--sh-lg); }
.hero-panel .card-head h3 { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-panel .card-head i { color: var(--gold-600); }
.hero-panel-list { padding: var(--s-2); }

.qlink {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  color: var(--text);
  transition: background var(--dur-1) ease;
}
.qlink:hover { background: var(--surface-inset); color: var(--text); }
.qlink strong { display: block; font-size: var(--t-base); font-weight: 600; }
.qlink .small { display: block; line-height: 1.4; }
.qlink > i:last-child { color: var(--text-muted); font-size: 14px; }
.qlink:hover > i:last-child { color: var(--accent); }
.qlink-ico {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--r-md);
  display: grid; place-items: center; font-size: 16px;
  background: var(--accent-soft); color: var(--accent);
}

.statband {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s-1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transform: translateY(50%);
  position: relative; z-index: 2;
}
.statband-item {
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-1);
  border-right: 1px solid var(--border);
}
.statband-item:last-child { border-right: 0; }
.statband-value { font-size: var(--t-3xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.statband-label { font-size: var(--t-sm); color: var(--text-muted); }

/* compensăm suprapunerea benzii de statistici */
.hero + .section { padding-top: calc(var(--s-10) + 48px); }

.linkrow {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  margin-inline: calc(var(--s-3) * -1);
  border-radius: var(--r-md);
  color: var(--text); font-weight: 500;
  transition: background var(--dur-1) ease, color var(--dur-1) ease;
}
.linkrow:hover { background: var(--surface-inset); color: var(--accent-text); }
.linkrow > i:first-child { color: var(--accent); font-size: 15px; width: 18px; text-align: center; }
.linkrow > i:last-child { color: var(--text-muted); font-size: 12px; }

.contact-card h3 { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-md); }
.contact-card h3 i { color: var(--accent); }

.about {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.about-copy { padding: var(--s-9); }
/* Harta județului (836×1006 px) umple toată coloana din dreapta a cardului, până la margini.
   Fără decupare (contain): fundalul hărții e alb, deci și coloana e albă și nu se vede
   unde se termină imaginea. Click → mărime completă. */
.about { align-items: center; }
.about-media {
  align-self: stretch;
  display: flex; align-items: center;
  background: #fff;
  border-left: 1px solid var(--border);
}
.about-map { position: relative; width: 100%; margin: 0; }
.about-map a { display: block; cursor: zoom-in; }
.about-map img { display: block; width: 100%; height: auto; }
.about-map figcaption {
  position: absolute; left: 50%; bottom: var(--s-4); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(17,24,39,.82); color: #fff;
  font-size: var(--t-xs);
  pointer-events: none;
  opacity: 0; transition: opacity .15s ease;
}
.about-map:hover figcaption,
.about-map:focus-within figcaption { opacity: 1; }
@media (hover: none) {
  .about-map figcaption {
    position: static; transform: none; opacity: 1;
    display: flex; justify-content: center;
    border-radius: 0; background: var(--bg-subtle); color: var(--text-muted);
  }
}
.about-facts {
  display: flex; gap: var(--s-8); flex-wrap: wrap;
  margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}
.about-facts div { display: flex; flex-direction: column; }
.about-facts strong { font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.02em; }
.about-facts span { font-size: var(--t-sm); color: var(--text-muted); }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero-panel { max-width: 520px; }
    .about { grid-template-columns: 1fr; }
  .about-copy { padding: var(--s-7); }
  .about-media { order: -1; border-left: 0; border-bottom: 1px solid var(--border); }
}

@media (max-width: 860px) {
  .statband { grid-template-columns: repeat(2, 1fr); transform: none; margin-top: var(--s-2); }
  .statband-item:nth-child(2) { border-right: 0; }
  .statband-item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .hero + .section { padding-top: var(--s-9); }
  .hero { padding-block: var(--s-8) var(--s-6); }
}

@media (max-width: 760px) {
  .hero-grid { padding-bottom: var(--s-6); }
  .hero-cta .btn { width: 100%; }
  .hero-search { height: 48px; }
  .hero-search span:not(.kbd) { font-size: var(--t-base); }
  .about-facts { gap: var(--s-5); }
}

/* --- Bară de ajutor la finalul paginilor interioare --- */
.helpbar {
  display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap;
  background: linear-gradient(120deg, var(--accent-soft), transparent 62%);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
}
.helpbar h3 { font-size: var(--t-md); display: inline-flex; align-items: center; gap: var(--s-2); }
.helpbar h3 i { color: var(--accent); }
.helpbar p { max-width: 62ch; margin-top: var(--s-2); }
@media (max-width: 760px) { .helpbar .btn { width: 100%; } .helpbar .row { width: 100%; } }

/* --- Pagini juridice: date de identificare + cuprins în pagină --- */
.page-facts {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  font-family: var(--font-ui); font-size: var(--t-sm); color: var(--text-muted);
  padding-bottom: var(--s-5); margin-bottom: var(--s-6);
  border-bottom: 1px solid var(--border);
}
.page-facts i { color: var(--gold-600); margin-right: var(--s-1); }
.page-facts strong { color: var(--text); }

.inline-toc {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-bottom: var(--s-7);
  font-family: var(--font-ui);
}
.inline-toc h3 { font-size: var(--t-sm); text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin: 0 0 var(--s-3); }
.inline-toc ol { columns: 2; column-gap: var(--s-8); margin: 0; padding-left: var(--s-5); font-size: var(--t-base); }
.inline-toc li { margin-bottom: var(--s-1); break-inside: avoid; }
.inline-toc a { text-decoration: none; }
.inline-toc a:hover { text-decoration: underline; }
@media (max-width: 760px) { .inline-toc ol { columns: 1; } }

.prose .helpbar { font-family: var(--font-ui); font-size: var(--t-base); padding: var(--s-5); border-radius: var(--r-lg); border: 1px solid var(--border); margin: var(--s-7) 0; }
.prose .alert { font-family: var(--font-ui); font-size: var(--t-base); }
.prose .table-wrap { margin: var(--s-4) 0 var(--s-7); border: 1px solid var(--border); }
.prose .table-wrap table { margin: 0; }
.prose code { background: var(--surface-inset); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 1px 5px; font-size: 0.85em; }

/* --- Corecții pentru ecrane mici --- */
@media (max-width: 760px) {
  /* butonul „Servicii online” apare în sertar; în antet ar depăși lățimea */
  .header-actions > .btn-primary { display: none; }
  .brand-name { font-size: var(--t-md); }
  .brand-mark { width: 34px; height: 34px; }
  .hero-trust { gap: var(--s-2) var(--s-4); font-size: var(--t-xs); }
}

/* --- Structuri de pagină cu coloană laterală --- */
.grid-sidebar { grid-template-columns: 1.55fr 1fr; align-items: start; }
.grid-toc     { grid-template-columns: 220px 1fr; gap: var(--s-8); align-items: start; }

@media (max-width: 1100px) {
  .grid-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-toc { grid-template-columns: 1fr; gap: var(--s-5); }
  .toc { position: static; }
  .toc a { border-left: 0; border-top: 1px solid var(--border); padding: var(--s-2) 0; }
  .toc a.is-active, .toc a:hover { border-left: 0; border-top-color: var(--accent); background: none; }
}

/* Ultimele intrări din meniu se aliniază la dreapta, ca panoul să nu iasă
   din ecran pe laptopuri de 1024–1100 px. */
@media (min-width: 981px) {
  .nav-item:nth-last-child(-n+2) .mega {
    left: auto; right: 0;
    transform: translateY(-6px);
  }
  .nav-item:nth-last-child(-n+2).is-open .mega { transform: none; }
  .mega { max-width: min(760px, calc(100vw - 32px)); }
}

/* Copiii de grid/flex primesc implicit min-width:auto, ceea ce permite unui
   tabel lat să lățească toată pagina. Le lăsăm să se micșoreze. */
.grid > *, .grid-toc > *, .grid-sidebar > * { min-width: 0; }
.prose .table-wrap { max-width: 100%; }
.prose table { table-layout: auto; }

/* ===================================================================
   LIZIBILITATE: o singură familie de fonturi, o lățime de citire
   confortabilă și o fișă de date aliniată pe două coloane.
   =================================================================== */

.prose {
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: -0.003em;
}

/* Cardul de conținut are aceeași lățime ca celelalte carduri din pagină
   (lista de documente, bara de ajutor). Aerul vine din marginile interioare. */
article.prose.card-body { padding: var(--s-8); }
@media (max-width: 760px) { article.prose.card-body { padding: var(--s-5); } }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: var(--t-xl); margin: 2.1em 0 0.7em; }
.prose h3 { font-size: var(--t-lg); margin: 1.7em 0 0.5em; }

/* Textele preluate din paginile vechi folosesc <br> în loc de paragrafe;
   le dăm un pic de aer, altfel rândurile se lipesc. */
.prose br { line-height: 2.1; }

/* Citatele din acte normative, marcate în vechiul site cu <font color>.
   Se disting prin bara laterală, nu printr-un alt font sau corp de literă. */
.prose font[style], .prose font[color] {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  padding-left: var(--s-5);
  border-left: 2px solid var(--gold-500);
  margin: 1em 0 1.4em;
}

/* --- Fișă de date (persoane) --- */
.datasheet {
  margin: 0 0 var(--s-6);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-inset);
  font-size: var(--t-md);
}
.ds-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-5);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.ds-row:last-child { border-bottom: 0; }
.datasheet dt {
  margin: 0;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  line-height: 1.6;
}
.datasheet dd {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.datasheet dd a { font-weight: 550; text-decoration: none; }
.datasheet dd a:hover { text-decoration: underline; }
.datasheet dd br { line-height: inherit; }
.datasheet dd br + * , .datasheet dd br { margin-top: var(--s-1); }

/* prima linie — numele — iese în evidență */
.ds-row:first-child dd { font-size: var(--t-lg); font-weight: 650; letter-spacing: -0.015em; }

@media (max-width: 700px) {
  .ds-row { grid-template-columns: 1fr; gap: var(--s-1); padding: var(--s-4); }
  .datasheet dt { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; }
}

/* ===================================================================
   Etichete de fișier și documente indisponibile
   =================================================================== */

/* Eticheta are cel mult 3–4 caractere; o strângem ca să nu iasă din casetă */
.doc-ico {
  font-size: 11px;
  letter-spacing: -0.02em;
  padding: 0 2px;
  overflow: hidden;
}
.doc-ico i { font-size: 16px; letter-spacing: normal; }

.doc-ico[data-ext="file"]    { background: var(--bg-subtle); color: var(--text-muted); }
.doc-ico[data-ext="missing"] {
  background: var(--warn-50);
  color: var(--warn-700);
  border-color: color-mix(in srgb, var(--warn-500) 30%, transparent);
}
:root[data-theme="dark"] .doc-ico[data-ext="missing"] { background: #2c2006; }

/* Rândul unui document al cărui fișier nu mai există pe server */
.doc.is-unavailable .doc-name { color: var(--text-soft); }
.doc.is-unavailable:hover .doc-name { color: var(--text-soft); }
.doc.is-unavailable { background: color-mix(in srgb, var(--warn-500) 4%, transparent); }
.doc.is-unavailable:hover { background: color-mix(in srgb, var(--warn-500) 8%, transparent); }
.doc.is-unavailable .doc-actions .badge { opacity: 1; transform: none; }

/* Uniformitate tipografică în tot textul redacțional */
.prose, .prose p, .prose li, .prose td, .prose div, .prose span {
  font-family: var(--font-ui);
}
.prose b, .prose strong { font-weight: 650; }
.prose [style*="font-family"], .prose [face] { font-family: var(--font-ui) !important; }
.prose [style*="font-size"] { font-size: inherit !important; }

/* Documentele indisponibile nu sunt linkuri — nu răspund la clic */
.doc.is-unavailable { cursor: default; text-decoration: none; }
.doc.is-unavailable:hover .doc-name { text-decoration: none; }

/* --- Elemente dezactivate temporar (vezi DISABLED_PAGES în includes/config.php) ---
   Rămân în pagină ca să se vadă că serviciul există, dar estompate și fără acțiune. */
[data-disabled] {
  filter: blur(1.6px);
  opacity: .5;
  pointer-events: none;
  cursor: not-allowed;
  user-select: none;
}
