/* ============================================================
   Tema de Craciun (se activeaza din config.php -> 'craciun' => true)
   rosu + verde + auriu, ghirlanda de lumini, zapada pe carduri
   ============================================================ */
body.xmas {
  --bg:     #0a0e1a;
  --bg-2:   #0e1322;
  --card:   #141a2c;
  --card-2: #1a2136;
  --line:   #252f48;
  --text:   #eef2fb;
  --muted:  #93a0bd;
  --purple: #e23a4f;   /* accentul devine rosu de Craciun */
  --pink:   #ffcf5c;   /* link-urile devin aurii */
  --green:  #2fae66;
  --grad:   linear-gradient(135deg, #a8142c 0%, #d92b45 50%, #f05a4f 100%);
  background-image: radial-gradient(1100px 600px at 85% -10%, rgba(226, 58, 79, .16), transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, rgba(47, 174, 102, .13), transparent 60%);
}
:where(.xmas) a:hover { color: #ffe08f; }
:where(.xmas) .nav a.on { background: rgba(226, 58, 79, .16); }
:where(.xmas) .btn { box-shadow: 0 6px 20px rgba(226, 58, 79, .35); }
:where(.xmas) input:focus, :where(.xmas) select:focus { box-shadow: 0 0 0 3px rgba(226, 58, 79, .25); }
:where(.xmas) .tbl tbody tr:hover td { background: rgba(226, 58, 79, .07); }
:where(.xmas) .pill { background: rgba(226, 58, 79, .18); color: #ffb3bd; }
:where(.xmas) .pill.ok { background: rgba(62, 224, 138, .15); color: var(--ok); }
:where(.xmas) .pill.off { background: rgba(147, 160, 189, .15); color: var(--muted); }
:where(.xmas) .pill.bad { background: rgba(255, 90, 106, .15); color: var(--bad); }
:where(.xmas) .pill.gold { background: rgba(255, 200, 61, .16); color: var(--gold); }
:where(.xmas) .hero .pill { background: rgba(10, 14, 26, .35); color: #fff; }
:where(.xmas) .hero .pill.ok { color: #8bffbf; }
:where(.xmas) .brand-logo { filter: drop-shadow(0 4px 16px rgba(226, 58, 79, .45)); }
:where(.xmas) .brand.big .brand-logo { filter: drop-shadow(0 10px 34px rgba(226, 58, 79, .5)); }

/* ---------- banner cu fulgi ---------- */
:where(.xmas) .hero {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.18' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M30 20v24M19.6 26l20.8 12M19.6 38l20.8-12M27 22.5l3 2.5 3-2.5M27 41.5l3-2.5 3 2.5'/%3E%3Cpath d='M88 76v20M79.3 81l17.4 10M79.3 91l17.4-10M85.5 78l2.5 2 2.5-2M85.5 94l2.5-2 2.5 2'/%3E%3Cpath d='M98 14v10M93.7 16.5l8.6 5M93.7 21.5l8.6-5'/%3E%3Cpath d='M18 92v10M13.7 94.5l8.6 5M13.7 99.5l8.6-5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 120px 120px, var(--grad);
  box-shadow: 0 14px 40px rgba(226, 58, 79, .3);
}
:where(.xmas) .hero[style*="--fc"] {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.18' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M30 20v24M19.6 26l20.8 12M19.6 38l20.8-12M27 22.5l3 2.5 3-2.5M27 41.5l3-2.5 3 2.5'/%3E%3Cpath d='M88 76v20M79.3 81l17.4 10M79.3 91l17.4-10M85.5 78l2.5 2 2.5-2M85.5 94l2.5-2 2.5 2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 120px 120px,
              linear-gradient(135deg, var(--fc) -20%, #b51a33 60%, #f05a4f 120%);
}
:where(.xmas) .hero .btn { background: rgba(10, 14, 26, .35); }

/* ---------- bara de acadea la statistici ---------- */
:where(.xmas) .stat::before { width: 5px; background: repeating-linear-gradient(-45deg, #e23a4f 0 5px, #fff 5px 10px); }

/* ---------- zapada pe marginea de sus a cardurilor ---------- */
:where(.xmas) .card, :where(.xmas) .auth-card { position: relative; }
.xmas .card::before, .xmas .fcard::before, .xmas .stat::after, .xmas .auth-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 13px; pointer-events: none;
  border-radius: var(--radius) var(--radius) 0 0; opacity: .92;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0H120V5C113 5 111 11 105 11C99 11 99 6 91 6C85 6 84 13 77 13C71 13 70 7 62 7C55 7 55 10 48 10C41 10 40 5 33 5C26 5 26 12 19 12C12 12 11 5 0 5Z' fill='%23eef4ff'/%3E%3C/svg%3E") 0 0 / 120px 13px repeat-x;
}
.xmas .auth-card::before { border-radius: 20px 20px 0 0; height: 15px; background-size: 120px 15px; }
:where(.xmas) .card { padding-top: 24px; }

/* ---------- ghirlanda de lumini ---------- */
:where(.xmas) .main { position: relative; padding-top: 58px; }
.xmas-lights {
  position: absolute; top: 0; left: 0; right: 0; height: 40px; overflow: hidden; pointer-events: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: 56px; justify-content: start;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 22'%3E%3Cpath d='M0 2Q28 24 56 2' fill='none' stroke='%23415a46' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 56px 22px repeat-x;
}
.xmas-lights i {
  --c: #ff4d5e;
  justify-self: center; margin-top: 12px; width: 9px; height: 15px; position: relative;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c); box-shadow: 0 0 12px 3px var(--c);
  animation: xmas-blink 1.6s ease-in-out infinite alternate;
}
.xmas-lights i::before { content: ""; position: absolute; top: -3px; left: 2px; width: 5px; height: 4px; border-radius: 1px; background: #3a4a3c; }
.xmas-lights i:nth-child(4n+2) { --c: #ffd34d; animation-delay: -.8s; }
.xmas-lights i:nth-child(4n+3) { --c: #3ddc84; animation-delay: -.4s; }
.xmas-lights i:nth-child(4n+4) { --c: #4db8ff; animation-delay: -1.2s; }
@keyframes xmas-blink {
  from { opacity: 1; box-shadow: 0 0 12px 3px var(--c); }
  to   { opacity: .35; box-shadow: 0 0 2px 0 var(--c); }
}

/* ---------- cardul cu numaratoarea din meniu ---------- */
.xmas-card {
  margin-top: auto; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(226, 58, 79, .22), rgba(47, 174, 102, .2));
  border: 1px solid rgba(255, 207, 92, .28);
}
.xmas-card svg { width: 30px; height: 30px; flex: none; color: var(--pink); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.xmas-card b { display: block; font-size: 14px; }
.xmas-card span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.xmas-card + .me { margin-top: 0; }

/* ---------- login: urare + dealuri cu brazi ---------- */
.xmas-wish { color: var(--pink); font-weight: 700; text-align: center; }
.xmas .auth-card { z-index: 1; }
.xmas-ground { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 190px; z-index: 0; pointer-events: none; display: block; }

/* ---------- zapada care cade + butonul ei ---------- */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.snow-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 61; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: var(--card-2); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .15s, background .15s;
}
.snow-toggle:hover { transform: scale(1.06); background: var(--card); }
.snow-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.snow-toggle.off { color: var(--muted); }
.snow-toggle.off::after { content: ""; position: absolute; width: 26px; height: 2px; background: var(--muted); transform: rotate(-45deg); border-radius: 2px; }

@media (max-width: 860px) {
  :where(.xmas) .main { padding-top: 50px; }
  .xmas-card { display: none; }
  .xmas-ground { height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .xmas-lights i { animation: none; }
}
