/* ==========================================================================
   Primăria Eclipsed — sistem de teme
   --------------------------------------------------------------------------
   Două niveluri independente:
     A. html[data-mode="dark" | "light"]   → luminozitate și suprafețe
     B. body[data-theme="standard" | "christmas" | "halloween" | "easter" | "summer"]
                                            → accente, decorațiuni, atmosferă
   styles.css folosește doar variabilele definite aici; orice combinație A × B
   este un set complet de tokens. Zonele „mereu întunecate” (hero-ul cu fotografie,
   miniaturile temelor, jocul Grinch) primesc setul dark indiferent de mod.
   ========================================================================== */

:root { color-scheme: dark; }
html[data-mode="light"] { color-scheme: light; }

/* ---------- A. Mod: Dark (implicit) ---------- */
html:not([data-mode="light"]) body,
body :is(.hero, .theme-option, .grinch-heist) {
  --surface: #110a1d; --surface-2: #1c0f2b; --field: #08040e; --panel: #0d0818;
  --card-bg: linear-gradient(145deg, rgba(23,11,39,.94), rgba(9,6,16,.96));
  --glass: rgba(8,4,17,.88);
  --text: #f8f5ff; --text-2: #d9cfe3; --muted: #a99db5;
  --line: rgba(185,64,255,.32); --line-soft: #2d1b3d; --line-strong: #3e2851;
  --on-accent: #fff;
  --shadow-card: 0 12px 35px rgba(0,0,0,.3);
  --shadow-bar: 0 12px 45px rgba(0,0,0,.35);
  --shadow-pop: 0 18px 50px rgba(0,0,0,.55);
  --ok-bg: #123b2a; --ok-fg: #7cecb4; --ok-line: #227e62;
  --warn-bg: #44300d; --warn-fg: #ffd56a;
  --danger-bg: #45151b; --danger-fg: #ff8a94;
  /* sezon: Standard */
  --theme-accent: #9828f5; --theme-accent-2: #d04fff; --theme-highlight: #e0a0ff;
  --theme-border: rgba(172,72,255,.4); --theme-soft: rgba(157,36,255,.2);
  --theme-glow: rgba(139,29,255,.14); --theme-glow2: rgba(83,22,160,.11);
  --theme-surface: #170d24;
}
html:not([data-mode="light"]) body { --bg: #07050e; }

/* ---------- A. Mod: Light ---------- */
html[data-mode="light"] body {
  --bg: #f5f1fb;
  --surface: #ffffff; --surface-2: #efe7fa; --field: #ffffff; --panel: #ffffff;
  --card-bg: linear-gradient(145deg, #ffffff, #f6f0fd);
  --glass: rgba(255,255,255,.88);
  --text: #1d1330; --text-2: #43365a; --muted: #6b5f80;
  --line: rgba(124,46,201,.26); --line-soft: #e7ddf3; --line-strong: #cdbfe0;
  --on-accent: #fff;
  --shadow-card: 0 10px 30px rgba(61,28,99,.09), 0 1px 2px rgba(61,28,99,.06);
  --shadow-bar: 0 10px 34px rgba(61,28,99,.14);
  --shadow-pop: 0 20px 55px rgba(40,18,70,.24);
  --ok-bg: #dff6ea; --ok-fg: #0f6b45; --ok-line: #8fd3b4;
  --warn-bg: #fdf0cf; --warn-fg: #7a5200;
  --danger-bg: #fde3e5; --danger-fg: #b3202f;
  /* sezon: Standard */
  --theme-accent: #8422e0; --theme-accent-2: #b53cf0; --theme-highlight: #7a1fd1;
  --theme-border: rgba(132,34,224,.3); --theme-soft: rgba(132,34,224,.12);
  --theme-glow: rgba(139,29,255,.10); --theme-glow2: rgba(208,79,255,.08);
  --theme-surface: #f2eafb;
}

/* ---------- B. Sezon: Vară (apus de Los Santos) ---------- */
html:not([data-mode="light"]) body[data-theme="summer"],
body[data-theme="summer"] :is(.hero, .theme-option, .grinch-heist) {
  --surface: #170d17; --surface-2: #26131f; --field: #0b0609; --panel: #120a12;
  --card-bg: linear-gradient(145deg, rgba(40,16,30,.95), rgba(13,8,16,.97));
  --glass: rgba(14,7,14,.88);
  --text: #fff7f0; --text-2: #e6d3cb; --muted: #b9a39d;
  --line: rgba(255,140,80,.32); --line-soft: #33202a; --line-strong: #4f2f37;
  --theme-accent: #f0621f; --theme-accent-2: #e0357e; --theme-highlight: #ffc27a;
  --theme-border: rgba(255,140,80,.4); --theme-soft: rgba(255,122,61,.18);
  --theme-glow: rgba(255,122,61,.15); --theme-glow2: rgba(200,60,255,.12);
  --theme-surface: #1f0f18;
}
html:not([data-mode="light"]) body[data-theme="summer"] { --bg: #0c0710; }
html[data-mode="light"] body[data-theme="summer"] {
  --bg: #fff5e8;
  --surface: #ffffff; --surface-2: #fdebd8; --field: #ffffff; --panel: #fffaf3;
  --card-bg: linear-gradient(145deg, #ffffff, #fff2e1);
  --glass: rgba(255,250,242,.9);
  --text: #2a1410; --text-2: #54362c; --muted: #85685c;
  --line: rgba(232,89,26,.3); --line-soft: #f3e1cc; --line-strong: #e2c8ab;
  --theme-accent: #e8591a; --theme-accent-2: #dc2f7a; --theme-highlight: #b8430d;
  --theme-border: rgba(232,89,26,.36); --theme-soft: rgba(232,89,26,.13);
  --theme-glow: rgba(255,160,60,.2); --theme-glow2: rgba(220,47,122,.1);
  --theme-surface: #fdeede;
}

/* ---------- B. Sezon: Paște (pasteluri de primăvară) ---------- */
html:not([data-mode="light"]) body[data-theme="easter"],
body[data-theme="easter"] :is(.hero, .theme-option, .grinch-heist) {
  --surface: #17101c; --surface-2: #241a2b; --field: #0d0911; --panel: #130c18;
  --card-bg: linear-gradient(145deg, rgba(34,22,40,.95), rgba(14,10,18,.97));
  --glass: rgba(16,10,20,.88);
  --text: #fdf6fb; --text-2: #e3d5e2; --muted: #b3a3b5;
  --line: rgba(232,160,208,.32); --line-soft: #30223a; --line-strong: #47334f;
  --on-accent: #2a1430;
  --theme-accent: #e58cc9; --theme-accent-2: #7ccfa0; --theme-highlight: #f5c3e6;
  --theme-border: rgba(232,160,208,.4); --theme-soft: rgba(229,140,201,.16);
  --theme-glow: rgba(229,140,201,.14); --theme-glow2: rgba(124,207,160,.12);
  --theme-surface: #1d1423;
}
html:not([data-mode="light"]) body[data-theme="easter"] { --bg: #0d0812; }
html[data-mode="light"] body[data-theme="easter"] {
  --bg: #fcf5f9;
  --surface: #ffffff; --surface-2: #f8eaf3; --field: #ffffff; --panel: #ffffff;
  --card-bg: linear-gradient(145deg, #ffffff, #fbeff6);
  --glass: rgba(255,250,253,.9);
  --text: #2b1830; --text-2: #4d3852; --muted: #7a657e;
  --line: rgba(216,107,181,.32); --line-soft: #f1dfea; --line-strong: #dcc5d6;
  --on-accent: #2a1430;
  --theme-accent: #e07fc0; --theme-accent-2: #74cc9b; --theme-highlight: #a8327f;
  --theme-border: rgba(216,107,181,.4); --theme-soft: rgba(216,107,181,.14);
  --theme-glow: rgba(216,107,181,.16); --theme-glow2: rgba(95,191,140,.16);
  --theme-surface: #fbeef6;
}

/* ---------- B. Sezon: Halloween ---------- */
html:not([data-mode="light"]) body[data-theme="halloween"],
body[data-theme="halloween"] :is(.hero, .theme-option, .grinch-heist) {
  --surface: #140a12; --surface-2: #21101b; --field: #0a060b; --panel: #0d080e;
  --card-bg: linear-gradient(145deg, rgba(29,12,21,.96), rgba(8,5,10,.98));
  --glass: rgba(8,4,10,.94);
  --text: #f7ece6; --text-2: #dccbc6; --muted: #b3a2a6;
  --line: rgba(208,76,76,.36); --line-soft: #2e1a24; --line-strong: #4a2a36;
  --theme-accent: #f26b2a; --theme-accent-2: #8124ad; --theme-highlight: #ff9d57;
  --theme-border: rgba(208,76,76,.42); --theme-soft: rgba(246,92,45,.2);
  --theme-glow: rgba(120,24,44,.2); --theme-glow2: rgba(91,29,125,.17);
  --theme-surface: #160a12;
}
html:not([data-mode="light"]) body[data-theme="halloween"] { --bg: #08050a; }
html[data-mode="light"] body[data-theme="halloween"] {
  --bg: #f2eae1;
  --surface: #fbf6ef; --surface-2: #efe2d5; --field: #fffaf4; --panel: #fbf6ef;
  --card-bg: linear-gradient(145deg, #fdf8f1, #f2e6d9);
  --glass: rgba(250,244,236,.93);
  --text: #24121a; --text-2: #4a3038; --muted: #7a5f63;
  --line: rgba(160,50,40,.3); --line-soft: #e4d3c4; --line-strong: #cdb5a4;
  --theme-accent: #d4541a; --theme-accent-2: #6f1f96; --theme-highlight: #b0400f;
  --theme-border: rgba(160,50,40,.38); --theme-soft: rgba(212,84,26,.14);
  --theme-glow: rgba(212,84,26,.14); --theme-glow2: rgba(111,31,150,.1);
  --theme-surface: #f4e9dd;
}

/* ---------- B. Sezon: Crăciun ---------- */
html:not([data-mode="light"]) body[data-theme="christmas"],
body[data-theme="christmas"] :is(.hero, .theme-option, .grinch-heist) {
  --surface: #0f1b16; --surface-2: #172a22; --field: #08110d; --panel: #0d1813;
  --card-bg: linear-gradient(145deg, rgba(13,32,23,.94), rgba(15,17,24,.96));
  --glass: linear-gradient(105deg, rgba(8,22,16,.94), rgba(18,13,20,.93) 55%, rgba(39,13,21,.94));
  --text: #fff9ed; --text-2: #e4e2d2; --muted: #b3b9a8;
  --line: rgba(226,197,124,.36); --line-soft: #24352c; --line-strong: #3a4d40;
  --theme-accent: #c7364d; --theme-accent-2: #227c56; --theme-highlight: #f3d994;
  --theme-border: rgba(226,197,124,.48); --theme-soft: rgba(211,67,79,.2);
  --theme-glow: rgba(34,109,76,.19); --theme-glow2: rgba(173,35,56,.15);
  --theme-surface: #111d1a;
}
html:not([data-mode="light"]) body[data-theme="christmas"] { --bg: #07100d; }
html[data-mode="light"] body[data-theme="christmas"] {
  --bg: #f3f1ea;
  --surface: #fffdf8; --surface-2: #e9f0e8; --field: #ffffff; --panel: #fffdf8;
  --card-bg: linear-gradient(145deg, #ffffff, #f1f6ef);
  --glass: linear-gradient(105deg, rgba(240,248,242,.95), rgba(255,253,248,.94) 55%, rgba(253,240,240,.95));
  --text: #1c2a22; --text-2: #3d4b42; --muted: #66736a;
  --line: rgba(176,138,48,.4); --line-soft: #e1e5d8; --line-strong: #c6cdb9;
  --theme-accent: #c0283f; --theme-accent-2: #1f7a53; --theme-highlight: #8a5d00;
  --theme-border: rgba(176,138,48,.55); --theme-soft: rgba(192,40,63,.12);
  --theme-glow: rgba(34,139,91,.14); --theme-glow2: rgba(220,56,70,.1);
  --theme-surface: #eef4ec;
}

/* Crăciun „stricat” de Grinch — păstrează logica evenimentului, în ambele moduri */
html:not([data-mode="light"]) body[data-theme="christmas"][data-christmas-grinch="true"],
body[data-theme="christmas"][data-christmas-grinch="true"] :is(.hero, .theme-option, .grinch-heist) {
  --surface: #151010; --surface-2: #211516; --field: #100e0e; --panel: #151111;
  --card-bg: linear-gradient(145deg, #171313f5, #100d0df7);
  --glass: linear-gradient(100deg, #100d0df5, #1d1314f5);
  --text: #f0ddd0; --text-2: #d5c2b6; --muted: #a3938b;
  --line: rgba(158,62,57,.5); --line-soft: #3a2625; --line-strong: #75413d;
  --theme-accent: #bd4a48; --theme-accent-2: #709251; --theme-highlight: #d7a48d;
  --theme-border: rgba(158,62,57,.72); --theme-soft: rgba(189,74,72,.18);
  --theme-surface: #181312;
}
html:not([data-mode="light"]) body[data-theme="christmas"][data-christmas-grinch="true"] { --bg: #090909; }
html[data-mode="light"] body[data-theme="christmas"][data-christmas-grinch="true"] {
  --bg: #e8e4e0;
  --surface: #f4f1ee; --surface-2: #e4dcd6; --field: #faf8f6; --panel: #f4f1ee;
  --card-bg: linear-gradient(145deg, #f5f2ef, #e6dfda);
  --glass: linear-gradient(100deg, #f1edeaf5, #e7dedbf5);
  --text: #2b1d1b; --text-2: #4b3a37; --muted: #7b6964;
  --line: rgba(158,62,57,.4); --line-soft: #d8cdc7; --line-strong: #bda8a0;
  --theme-accent: #a53c3a; --theme-accent-2: #5d7a41; --theme-highlight: #8a3a2c;
  --theme-border: rgba(158,62,57,.55); --theme-soft: rgba(165,60,58,.14);
  --theme-surface: #ebe4df;
}

/* ==========================================================================
   Bază comună
   ========================================================================== */
body {
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  scrollbar-color: var(--line-strong) transparent;
  transition: background-color .35s ease, color .35s ease;
}
::selection { background: var(--theme-accent); color: #fff; }
:is(.hero, .theme-option, .grinch-heist) { color: var(--text); }

.primary, .hero .primary, .institution-switcher button.selected,
.avatar, .team-avatar { color: var(--on-accent); }

:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--theme-accent); outline-offset: 2px;
}

/* ---------- Bara de sus + comutatorul Light/Dark ---------- */
.topbar { box-shadow: var(--shadow-bar); transition: background .35s ease, border-color .35s ease; }
html[data-mode="light"] body[data-theme] .topbar { box-shadow: var(--shadow-bar); }
/* bara rămâne într-un singur rând și când meniul de administrare adaugă linkuri */
@media (min-width: 721px) {
  .topbar nav a { white-space: nowrap; }
  .topbar:has(.logged-user:not(.hidden)) { gap: 16px; }
  .topbar:has(.logged-user:not(.hidden)) :is(.brand, .account) { min-width: 0; flex: none; }
  .topbar:has(.logged-user:not(.hidden)) nav {
    flex: 1 1 auto; min-width: 0; justify-content: space-evenly; gap: 8px;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
}
@media (min-width: 721px) and (max-width: 1700px) {
  .topbar:has(.logged-user:not(.hidden)) nav a { font-size: 11px; letter-spacing: 0; }
  .logged-user > .role-label { display: none; }
  .logged-user > #userName { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quick-actions button { padding: 0 10px; }
}
nav a { transition: color .2s ease; }
nav a:hover { color: var(--theme-highlight); }
.account { gap: 10px; align-items: center; }
.login-btn, .logged-user { transition: border-color .2s ease, background .2s ease, color .2s ease; }

.mode-toggle {
  position: relative; flex: none; width: 48px; height: 48px; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--theme-border); border-radius: 13px;
  background: var(--theme-surface); color: var(--theme-highlight);
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.mode-toggle:hover { border-color: var(--theme-accent); transform: translateY(-1px); }
.mode-toggle svg {
  grid-area: 1 / 1; width: 20px; height: 20px;
  transition: opacity .3s ease, transform .45s cubic-bezier(.3,1.4,.5,1);
}
.mode-toggle .mode-icon-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
html[data-mode="light"] .mode-toggle .mode-icon-sun { opacity: 1; transform: none; }
html[data-mode="light"] .mode-toggle .mode-icon-moon { opacity: 0; transform: rotate(90deg) scale(.4); }

/* ---------- Tipografie instituțională ---------- */
:is(.team-heading, .location-heading, .contact-heading) h2 { position: relative; padding-bottom: 14px; letter-spacing: .01em; }
:is(.team-heading, .location-heading, .contact-heading) h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-2));
  box-shadow: 0 0 14px var(--theme-soft);
}
.eyebrow { color: var(--muted); }
.stats b { font-family: "Playfair Display", serif; font-size: 27px; line-height: 1.1; }
.stats span { color: var(--muted); letter-spacing: .09em; }
.card h3 { letter-spacing: .08em; }
.card p { color: var(--muted); }

/* ---------- Carduri ---------- */
.stats { box-shadow: var(--shadow-card); }
.card, .team-card, .department-card, .location-card, .admin-tool-card, .institution-module-card {
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
:is(.team-card, .location-card):hover { transform: translateY(-3px); border-color: var(--theme-accent); }
.card { box-shadow: var(--shadow-card); }
.location-card-image { background: var(--surface-2); }
.location-results-head { background: var(--surface); }
.contact-item, .doc, .ticket-preview-grid article, .ticket-preview-message { transition: border-color .2s ease; }
:is(.contact-item, .doc):hover { border-color: var(--theme-border); }
.list-row { transition: background .15s ease; }
.list-row:hover { background: color-mix(in srgb, var(--theme-accent) 6%, transparent); }
.status { border: 1px solid transparent; letter-spacing: .04em; }
.status.ok { border-color: var(--ok-line); }
.status.warn { border-color: color-mix(in srgb, var(--warn-fg) 35%, transparent); }
.status.danger { border-color: color-mix(in srgb, var(--danger-fg) 35%, transparent); }

/* ---------- Butoane ---------- */
.primary, .secondary, .location-back, .text-button {
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, background .2s ease;
}
.primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.primary:active, .secondary:active { transform: translateY(0); }
.text-button { color: var(--theme-highlight); }
.close, .drawer-head button { color: var(--text); border-radius: 8px; transition: color .2s ease; }
:is(.close, .drawer-head button):hover { color: var(--theme-highlight); }

/* ---------- Formulare ---------- */
.portal-form, .modal-box, .login-error-card { box-shadow: var(--shadow-card); }
.modal-box, .login-error-card { box-shadow: var(--shadow-pop); }
.drawer { box-shadow: var(--shadow-pop); }
:is(.portal-form, .modal, .company-edit-form) :is(input, select, textarea),
:is(.certificate-tools, .report-list-toolbar) :is(input, select), .institution-search, .ticket-status {
  background: var(--field); color: var(--text); border-color: var(--line-strong);
  transition: border-color .2s ease, box-shadow .2s ease;
}
:is(.portal-form, .modal, .company-edit-form, .certificate-tools, .report-list-toolbar) :is(input, select, textarea):focus,
.institution-search:focus {
  outline: 0; border-color: var(--theme-accent); box-shadow: 0 0 0 3px var(--theme-soft);
}
.location-search { background: var(--field); transition: border-color .2s ease, box-shadow .2s ease; }
.location-search:focus-within { outline: 0; border-color: var(--theme-accent); box-shadow: 0 0 0 3px var(--theme-soft); }
.location-search input { color: var(--text); }
:is(input, textarea)::placeholder { color: var(--muted); opacity: .8; }
.portal-form label, .modal label { color: var(--text-2); }

/* ---------- Tabele ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; font-size: 13px; }
th { padding: 12px 14px; text-align: left; background: var(--surface-2); color: var(--theme-highlight); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
td { padding: 12px 14px; border-top: 1px solid var(--line-soft); color: var(--text-2); }
tbody tr:hover td { background: color-mix(in srgb, var(--theme-accent) 6%, transparent); }

/* ---------- Notificări ---------- */
.toast {
  padding: 14px 18px 14px 50px; background: var(--panel); color: var(--text);
  border: 1px solid var(--theme-border); border-left: 4px solid var(--theme-accent);
  border-radius: 14px; box-shadow: var(--shadow-pop); line-height: 1.5;
  animation: toast-in .35s cubic-bezier(.2,.9,.3,1.2);
}
.toast::before {
  content: "i"; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--theme-soft); color: var(--theme-highlight);
  font: 800 12px/1 Georgia, serif;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.login-alert-list { color: var(--text-2); }
.notification-unread { border-left-color: var(--theme-accent) !important; }

/* ---------- Panoul de teme (administrare) ---------- */
.theme-options { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.theme-option { border-radius: 14px; }
.theme-option small { color: var(--theme-highlight); }
.theme-mode-hint {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 12px 14px;
  border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); font-size: 12px; line-height: 1.5;
}
.theme-mode-hint b { color: var(--text-2); }
.theme-mode-hint > span:first-child { flex: none; white-space: nowrap; color: var(--theme-highlight); }
.grinch-settings { border-color: var(--line-strong); background: var(--surface-2); }
.grinch-settings label { color: var(--text-2); }
.grinch-settings input { border-color: var(--line-strong); background: var(--field); color: var(--text); }
.grinch-settings small { color: var(--muted); }
@media (max-width: 1000px) { .theme-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-toggle { width: 42px; height: 42px; border-radius: 11px; }
  .account { gap: 7px; min-width: 0; max-width: 100%; }
  .logged-user { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .logged-user > .role-label { display: none; }
}

/* ---------- Mod Light: retușuri ---------- */
html[data-mode="light"] body::before {
  background: radial-gradient(circle at 72% 12%, var(--theme-glow), transparent 38%),
              radial-gradient(circle at 8% 78%, var(--theme-glow2), transparent 36%);
}
html[data-mode="light"] .card:hover,
html[data-mode="light"] .admin-tool-card:hover { box-shadow: 0 16px 40px var(--theme-soft); }
html[data-mode="light"] body[data-theme] :is(.modal-box, .drawer, .login-error-card) { box-shadow: var(--shadow-pop); }
html[data-mode="light"] body[data-theme="christmas"] h2 { text-shadow: none; }
html[data-mode="light"] body[data-theme="halloween"] :is(.stats, .card, .team-card, .department-card, .location-card, .activity-entry, .attendance-report, .admin-tool-card, .portal-form) {
  box-shadow: inset 0 0 36px #74182a0d, var(--shadow-card);
}
/* vigneta de Halloween nu trebuie să lase o muchie peste trecerea spre fundalul deschis */
html[data-mode="light"] body[data-theme="halloween"] .hero::before {
  -webkit-mask: linear-gradient(#000 55%, transparent 88%); mask: linear-gradient(#000 55%, transparent 88%);
}
html[data-mode="light"] .audit-entry pre { background: var(--surface-2); color: var(--text-2); }

/* ==========================================================================
   Strat ambiental sezonier (generat de syncSeasonAmbient în script.js)
   ========================================================================== */
.season-ambient { position: fixed; inset: 0; z-index: 15; overflow: hidden; pointer-events: none; }
.season-ambient i { position: absolute; display: block; will-change: transform, opacity; }

/* ---------- Standard: cerul Eclipsed, stele ca în emblemă ---------- */
body[data-theme="standard"] .season-ambient { z-index: 0; }
body[data-theme="standard"] .season-ambient i {
  left: var(--x); top: var(--y); width: 11px; height: 11px;
  background: #e9d2ff; filter: drop-shadow(0 0 6px #b84cff);
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  transform: scale(var(--s)); opacity: 0;
  animation: eclipsed-twinkle var(--dur) ease-in-out var(--delay) infinite;
}
html[data-mode="light"] body[data-theme="standard"] .season-ambient i { background: var(--theme-accent); filter: none; }
body[data-theme="standard"] .hero::before {
  content: ""; position: absolute; inset: 0 0 45%; z-index: 1; pointer-events: none;
  background:
    radial-gradient(circle at 12% 22%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 27% 9%, #e8c9ff 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 44% 17%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 58% 7%, #fff 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 71% 14%, #e8c9ff 0 1px, transparent 2px),
    radial-gradient(circle at 86% 6%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 93% 21%, #fff 0 1px, transparent 2px);
  animation: eclipsed-sky 6s ease-in-out infinite;
}
@keyframes eclipsed-twinkle { 0%, 100% { opacity: 0; transform: scale(calc(var(--s) * .5)) rotate(0); } 50% { opacity: .75; transform: scale(var(--s)) rotate(45deg); } }
@keyframes eclipsed-sky { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }

/* ---------- Vară: apus, raze de soare, licurici ---------- */
body[data-theme="summer"] .hero { isolation: isolate; overflow: hidden; }
body[data-theme="summer"] .hero::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  left: calc(82% - 340px); top: calc(29% - 340px); width: 680px; height: 680px; border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,214,140,.5) 0, rgba(255,150,70,.2) 16%, transparent 46%),
    repeating-conic-gradient(from 0deg, rgba(255,196,110,.2) 0 5deg, transparent 5deg 17deg);
  -webkit-mask: radial-gradient(circle, #000 0, #000 18%, transparent 68%);
          mask: radial-gradient(circle, #000 0, #000 18%, transparent 68%);
  mix-blend-mode: screen;
  animation: summer-rays 80s linear infinite;
}
body[data-theme="summer"] .hero h1 { text-shadow: 0 3px 25px #000, 0 0 34px rgba(255,140,70,.4); }
body[data-theme="summer"] .tagline { color: #ffc27a; text-shadow: 0 0 18px rgba(255,140,70,.35); }
body[data-theme="summer"] .topbar::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #ffb347 18%, #ff6a3d 45%, #e0357e 72%, #9b28ff 90%, transparent);
  box-shadow: 0 0 14px rgba(255,122,61,.55);
}
body[data-theme="summer"] .stats { border-top: 2px solid #ff8a4c; }
/* soare retro în dungi — ecou al lunii din emblema Eclipsed */
body[data-theme="summer"] :is(.team-card, .department-card, .admin-tool-card) { position: relative; overflow: hidden; }
body[data-theme="summer"] .card::before,
body[data-theme="summer"] :is(.team-card, .department-card, .admin-tool-card)::after {
  content: ""; position: absolute; z-index: 0; top: -52px; right: -40px; left: auto; bottom: auto;
  width: 128px; height: 128px; border-radius: 50%; pointer-events: none; filter: none; opacity: .5;
  background: linear-gradient(180deg, #ffd27a 0%, #ff8a3d 48%, #e0357e 100%);
  -webkit-mask: linear-gradient(#000 0 50%, transparent 50% 55%, #000 55% 64%, transparent 64% 70%, #000 70% 78%, transparent 78% 85%, #000 85% 91%, transparent 91% 96%, #000 96%);
          mask: linear-gradient(#000 0 50%, transparent 50% 55%, #000 55% 64%, transparent 64% 70%, #000 70% 78%, transparent 78% 85%, #000 85% 91%, transparent 91% 96%, #000 96%);
  transition: transform .5s ease, opacity .3s ease;
}
body[data-theme="summer"] .card:hover::before,
body[data-theme="summer"] :is(.team-card, .admin-tool-card):hover::after { transform: translateY(8px) scale(1.06); opacity: .75; }
html[data-mode="light"] body[data-theme="summer"] .card::before,
html[data-mode="light"] body[data-theme="summer"] :is(.team-card, .department-card, .admin-tool-card)::after { opacity: .62; }
body[data-theme="summer"] :is(.team-heading, .location-heading, .contact-heading) h2::after {
  width: 96px; background: linear-gradient(90deg, #ffb347, #ff6a3d 40%, #e0357e 75%, #9b28ff);
}
body[data-theme="summer"] .season-ambient i {
  left: var(--x); top: 104%; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle, #fff3c4 0, #ffb347 45%, transparent 72%);
  box-shadow: 0 0 12px 3px rgba(255,170,70,.55);
  animation: summer-firefly calc(var(--dur) * 1.6) ease-in-out var(--delay) infinite;
}
html[data-mode="light"] body[data-theme="summer"] .season-ambient i {
  background: radial-gradient(circle, #ffd98a 0, #ff8a3d 50%, transparent 74%); box-shadow: 0 0 10px 2px rgba(255,122,61,.4);
}
@keyframes summer-rays { to { transform: rotate(360deg); } }
@keyframes summer-firefly {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(var(--s)); }
  12% { opacity: .9; }
  50% { transform: translate3d(34px, -55vh, 0) scale(var(--s)); opacity: .55; }
  88% { opacity: .85; }
  100% { opacity: 0; transform: translate3d(-22px, -112vh, 0) scale(var(--s)); }
}

/* ---------- Paște: ghirlandă florală, ouă încondeiate, petale ---------- */
body[data-theme="easter"] {
  --egg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 52'%3E%3Cdefs%3E%3CclipPath id='e'%3E%3Cpath d='M20 1C9 1 2 18 2 31a18 19 0 0 0 36 0C38 18 31 1 20 1Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23e)'%3E%3Crect width='40' height='52' fill='%23f6b8dc'/%3E%3Cpath d='M0 19l5-5 5 5 5-5 5 5 5-5 5 5 5-5 5 5v7H0z' fill='%23fff3b0'/%3E%3Crect y='31' width='40' height='5' fill='%239fdcbb'/%3E%3Ccircle cx='10' cy='43' r='2.5' fill='%23c9a6f4'/%3E%3Ccircle cx='20' cy='45' r='2.5' fill='%23fff'/%3E%3Ccircle cx='30' cy='43' r='2.5' fill='%23c9a6f4'/%3E%3Ccircle cx='13' cy='9' r='1.8' fill='%23fff'/%3E%3Ccircle cx='24' cy='7' r='1.8' fill='%23c9a6f4'/%3E%3C/g%3E%3Cpath d='M20 1C9 1 2 18 2 31a18 19 0 0 0 36 0C38 18 31 1 20 1Z' fill='none' stroke='%23fff' stroke-opacity='.6' stroke-width='1.5'/%3E%3C/svg%3E");
  --garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cpath d='M0 6Q30 18 60 6T120 6' fill='none' stroke='%237fbf8e' stroke-width='1.6'/%3E%3Cellipse cx='14' cy='10' rx='5' ry='2' fill='%2387c796' transform='rotate(28 14 10)'/%3E%3Cellipse cx='47' cy='10' rx='5' ry='2' fill='%2387c796' transform='rotate(-28 47 10)'/%3E%3Cellipse cx='74' cy='3' rx='5' ry='2' fill='%2387c796' transform='rotate(-24 74 3)'/%3E%3Cellipse cx='106' cy='3' rx='5' ry='2' fill='%2387c796' transform='rotate(24 106 3)'/%3E%3Cg fill='%23f4a6d0'%3E%3Ccircle cx='30' cy='9' r='2.8'/%3E%3Ccircle cx='33.4' cy='11.6' r='2.8'/%3E%3Ccircle cx='32.1' cy='15.6' r='2.8'/%3E%3Ccircle cx='27.9' cy='15.6' r='2.8'/%3E%3Ccircle cx='26.6' cy='11.6' r='2.8'/%3E%3C/g%3E%3Ccircle cx='30' cy='12.8' r='2' fill='%23ffe07a'/%3E%3Cg fill='%23c9a6f4'%3E%3Ccircle cx='90' cy='-1.5' r='2.4'/%3E%3Ccircle cx='93' cy='.8' r='2.4'/%3E%3Ccircle cx='91.8' cy='4.2' r='2.4'/%3E%3Ccircle cx='88.2' cy='4.2' r='2.4'/%3E%3Ccircle cx='87' cy='.8' r='2.4'/%3E%3C/g%3E%3Ccircle cx='90' cy='1.8' r='1.7' fill='%23fff3b0'/%3E%3Ccircle cx='60' cy='6' r='1.8' fill='%239ad4ee'/%3E%3Ccircle cx='0' cy='6' r='1.8' fill='%23ffd0a8'/%3E%3Ccircle cx='120' cy='6' r='1.8' fill='%23ffd0a8'/%3E%3C/svg%3E");
}
body[data-theme="easter"] .topbar { overflow: visible; }
body[data-theme="easter"] .topbar::after {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -17px; height: 24px; pointer-events: none;
  background: var(--garland) center top / 120px 24px repeat-x;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.35));
}
html[data-mode="light"] body[data-theme="easter"] .topbar::after { filter: drop-shadow(0 2px 3px rgba(120,60,100,.22)); }
body[data-theme="easter"] .hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(ellipse at 88% 18%, rgba(255,214,170,.32), transparent 40%),
              radial-gradient(ellipse at 62% 82%, rgba(244,166,208,.2), transparent 38%),
              radial-gradient(ellipse at 30% 60%, rgba(159,220,187,.12), transparent 36%);
}
body[data-theme="easter"] .hero-content::after {
  content: ""; position: absolute; top: -66px; left: 2px; width: 124px; height: 54px; pointer-events: none;
  background: var(--egg) 0 100% / 36px 47px no-repeat, var(--egg) 44px 100% / 28px 36px no-repeat, var(--egg) 80px 100% / 33px 43px no-repeat;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.45));
  animation: easter-bob 5s ease-in-out infinite;
}
body[data-theme="easter"] .hero h1 { text-shadow: 0 3px 25px #000, 0 0 30px rgba(244,166,208,.4); }
body[data-theme="easter"] .tagline { color: #f9c8e6; }
body[data-theme="easter"] :is(.card, .team-card, .department-card, .admin-tool-card) { position: relative; overflow: hidden; }
body[data-theme="easter"] :is(.card, .team-card, .admin-tool-card)::after,
body[data-theme="easter"] .department-card::before {
  content: ""; position: absolute; z-index: 0; top: -10px; right: 18px; width: 34px; height: 44px; pointer-events: none;
  background: var(--egg) center / contain no-repeat; transform: rotate(14deg); opacity: .9;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.28));
  transition: transform .45s cubic-bezier(.3,1.5,.5,1);
}
body[data-theme="easter"] :is(.card, .team-card, .admin-tool-card):nth-child(4n+2)::after { filter: hue-rotate(70deg) drop-shadow(0 4px 6px rgba(0,0,0,.28)); transform: rotate(-10deg); }
body[data-theme="easter"] :is(.card, .team-card, .admin-tool-card):nth-child(4n+3)::after { filter: hue-rotate(150deg) drop-shadow(0 4px 6px rgba(0,0,0,.28)); }
body[data-theme="easter"] :is(.card, .team-card, .admin-tool-card):nth-child(4n)::after { filter: hue-rotate(-60deg) drop-shadow(0 4px 6px rgba(0,0,0,.28)); transform: rotate(-16deg); }
body[data-theme="easter"] :is(.card, .team-card, .admin-tool-card):hover::after { transform: translateY(7px) rotate(-6deg); }
body[data-theme="easter"] .card > span { z-index: 1; }
body[data-theme="easter"] :is(.card, .team-card, .department-card, .location-card, .admin-tool-card, .contact-card, .portal-form, .stats) { border-radius: 20px; }
body[data-theme="easter"] :is(.primary, .secondary, .location-back, .login-btn, .logged-user, .mode-toggle) { border-radius: 999px; }
body[data-theme="easter"] .logged-user { padding-right: 4px; }
body[data-theme="easter"] :is(.team-heading, .location-heading, .contact-heading) h2::after {
  width: 108px; height: 4px; box-shadow: none;
  background: linear-gradient(90deg, #f4a6d0 0 22%, transparent 22% 26%, #fff3b0 26% 48%, transparent 48% 52%, #9fdcbb 52% 74%, transparent 74% 78%, #c9a6f4 78%);
}
html[data-mode="light"] body[data-theme="easter"] :is(.team-heading, .location-heading, .contact-heading) h2::after {
  background: linear-gradient(90deg, #e07fc0 0 22%, transparent 22% 26%, #e8b93a 26% 48%, transparent 48% 52%, #5fbf8c 52% 74%, transparent 74% 78%, #a67be0 78%);
}
body[data-theme="easter"] .season-ambient i {
  left: var(--x); top: -6%; width: 13px; height: 10px; border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #ffe3f1, #f4a6d0); opacity: .85;
  animation: easter-petal calc(var(--dur) * 1.3) linear var(--delay) infinite;
}
body[data-theme="easter"] .season-ambient i:nth-child(3n) { background: linear-gradient(135deg, #fff, #f6d3e6); }
body[data-theme="easter"] .season-ambient i:nth-child(4n) { background: linear-gradient(135deg, #f3e6ff, #c9a6f4); }
html[data-mode="light"] body[data-theme="easter"] .season-ambient i { box-shadow: 0 1px 3px rgba(168,50,127,.25); }
@keyframes easter-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@keyframes easter-petal {
  0% { transform: translate3d(0, 0, 0) rotate(var(--r)) scale(var(--s)); }
  25% { transform: translate3d(38px, 28vh, 0) rotate(calc(var(--r) + 120deg)) scale(var(--s)); }
  50% { transform: translate3d(-18px, 56vh, 0) rotate(calc(var(--r) + 220deg)) scale(var(--s)); }
  75% { transform: translate3d(30px, 84vh, 0) rotate(calc(var(--r) + 330deg)) scale(var(--s)); }
  100% { transform: translate3d(0, 114vh, 0) rotate(calc(var(--r) + 460deg)) scale(var(--s)); }
}

/* ---------- Halloween: liliecii care traversează orașul ---------- */
body[data-theme="halloween"] .season-ambient i {
  left: -8%; top: calc(var(--y) * .6); width: 34px; height: 17px;
  background: #1a0a1f; filter: drop-shadow(0 0 7px #9e36cb);
  clip-path: polygon(50% 22%, 56% 4%, 59% 24%, 72% 10%, 100% 0, 92% 32%, 80% 34%, 74% 58%, 62% 52%, 50% 88%, 38% 52%, 26% 58%, 20% 34%, 8% 32%, 0 0, 28% 10%, 41% 24%, 44% 4%);
  animation: halloween-bat-cross calc(var(--dur) * 1.5) linear var(--delay) infinite, halloween-bat-flap .34s ease-in-out infinite alternate;
}
html[data-mode="light"] body[data-theme="halloween"] .season-ambient i { background: #2b1030; filter: drop-shadow(0 2px 3px rgba(60,10,40,.35)); }
@keyframes halloween-bat-cross {
  0% { transform: translate3d(0, 0, 0) scale(var(--s)); }
  30% { transform: translate3d(36vw, -5vh, 0) scale(var(--s)); }
  60% { transform: translate3d(72vw, 6vh, 0) scale(var(--s)); }
  100% { transform: translate3d(118vw, -3vh, 0) scale(var(--s)); }
}
@keyframes halloween-bat-flap { from { height: 17px; } to { height: 9px; } }

/* ---------- Crăciun: ninsoare lizibilă și în Light Mode ---------- */
html[data-mode="light"] body[data-theme="christmas"] .christmas-snow-cap { filter: drop-shadow(0 1px 2px rgba(60,90,120,.45)); }

@media (prefers-reduced-motion: reduce) {
  .season-ambient { display: none; }
  body[data-theme] .hero::before, body[data-theme="easter"] .hero-content::after, .toast { animation: none; }
  body, .mode-toggle svg { transition: none; }
}
@media (max-width: 720px) {
  body[data-theme="summer"] .hero::before { left: calc(78% - 230px); top: calc(26% - 230px); width: 460px; height: 460px; }
  body[data-theme="easter"] .topbar::after { bottom: -15px; height: 20px; background-size: 100px 20px; }
  body[data-theme="easter"] .hero-content::after { top: -58px; transform-origin: left bottom; scale: .85; }
}
