/* ZiSenină – stiluri publice. Fără framework. Temă zi/noapte prin variabile CSS. */
:root {
  --bg: #F5F8FA; --paper: #FFFFFF; --ink: #172B3A; --muted: #56677A; --line: #E1E9EC; --line-strong: #CFDCE2;
  --accent: #0F766E; --accent-ink: #FFFFFF; --accent-soft: #E7F2EE; --accent-text: #0B5F58;
  --link: #0B5F58; --focus: #1D4ED8;
  --legal-bg: #FFE4E6; --legal-ink: #9C3045; --legal-dot: #D9465F;
  --weekend-bg: #EDF2F6; --weekend-ink: #3B5265;
  --rel-bg: #F3E8FF; --rel-ink: #6E3B97;
  --bridge-bg: #F7F0D8; --bridge-ink: #6B5314;
  --recovery-bg: #E0EEFF; --recovery-ink: #1E4E8C;
  --idea: #C2410C; --sel: #1D4ED8; --sel-bg: rgba(29, 78, 216, .13);
  --warn-bg: #FFF7ED; --warn-line: #F59E0B; --ok-bg: #ECFDF5;
  --radius: 16px; --pad: clamp(16px, 2.6vw, 32px); --gap: clamp(14px, 1.8vw, 24px);
  --shadow: 0 1px 2px rgba(23, 54, 70, .04), 0 8px 24px rgba(23, 54, 70, .05);
  --shadow-hover: 0 2px 4px rgba(23, 54, 70, .06), 0 14px 32px rgba(23, 54, 70, .10);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --t: 160ms; --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F172A; --paper: #162236; --ink: #E8F0F5; --muted: #A3B3C3; --line: #24344B; --line-strong: #31445F;
  --accent: #5EEAD4; --accent-ink: #062925; --accent-soft: #123A36; --accent-text: #5EEAD4;
  --link: #6EE7D5; --focus: #93C5FD;
  --legal-bg: #4C2230; --legal-ink: #FFD9DE; --legal-dot: #FB7185;
  --weekend-bg: #1F2D44; --weekend-ink: #C8D6E3;
  --rel-bg: #35234A; --rel-ink: #EBD9FF;
  --bridge-bg: #3D3313; --bridge-ink: #F7E7B0;
  --recovery-bg: #17304F; --recovery-ink: #CFE3FF;
  --idea: #FDBA74; --sel: #93C5FD; --sel-bg: rgba(147, 197, 253, .18);
  --warn-bg: #3A2A12; --warn-line: #F59E0B; --ok-bg: #12372B;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .18);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, .3), 0 16px 34px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.prose a, .notice a, .small a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .2em; }
.prose a:hover, .notice a:hover, .small a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 1.3em 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); margin-top: 0; font-weight: 750; letter-spacing: -.03em; }
h2 { font-size: clamp(1.3rem, 1.05rem + .8vw, 1.65rem); font-weight: 720; }
h3, .h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: .6em 0; }
img, svg { max-width: 100%; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--paper); padding: 10px 14px; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 70ch; margin: .4em 0 0; }
.lead strong { color: var(--ink); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); font-weight: 750; margin: 0 0 .5em; }
.h1-sub { display: block; font-size: .45em; font-weight: 550; color: var(--muted); letter-spacing: 0; margin-top: .25em; }
.accent { color: var(--accent); }
.print-watermark, .print-only { display: none; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }
@media (min-width: 2200px) { .wrap { max-width: 1760px; } }

/* ---------- Antet ---------- */
.site-header { background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; align-items: center; gap: 10px 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); margin-right: auto; min-height: 44px; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-tile { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); transition: transform var(--t) var(--ease); flex: none; }
.brand:hover .brand-tile { transform: rotate(-6deg) scale(1.05); }
.logo-symbol { color: var(--ink); width: 30px; height: 30px; }
.logo-page { fill: var(--accent); }
.logo-fold { fill: var(--legal-dot); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.22rem; letter-spacing: -.02em; }
.brand-tagline { font-size: .74rem; color: var(--muted); letter-spacing: .05em; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--ink); font-weight: 560; font-size: .94rem; transition: background var(--t), color var(--t); }
.main-nav a:hover { background: var(--accent-soft); color: var(--accent-text); text-decoration: none; }
.main-nav a[aria-current] { color: var(--accent-text); background: var(--accent-soft); font-weight: 700; }
.nav-years { padding: 3px !important; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.nav-years a { min-height: 34px; padding: 0 9px; font-variant-numeric: tabular-nums; font-size: .9rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 44px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; transition: background var(--t), border-color var(--t), transform var(--t) var(--ease), color var(--t); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0); }
.theme-toggle { border-radius: 999px; padding: 0; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
.theme-toggle:hover svg { animation: spin-in .5s var(--ease); }
.nav-toggle { display: none; }
@media (max-width: 1239px) {
  .main-nav { order: 5; flex-basis: 100%; padding-bottom: 12px; }
  html.js .nav-toggle { display: inline-flex; }
  html.js .main-nav:not(.open) { display: none; }
  html.js .main-nav.open { animation: fade-down .2s var(--ease); }
}

.breadcrumbs { padding-top: 14px; font-size: .85rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 7px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); }

/* ---------- Pagina ---------- */
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--gap) * 1.4); padding-top: 18px; padding-bottom: 56px; }
@media (min-width: 1100px) { .page { grid-template-columns: minmax(0, 1fr) clamp(280px, 22vw, 330px); align-items: start; } }
.main { min-width: 0; container-type: inline-size; container-name: main; }
.main:focus { outline: none; }
.sidebar { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 2vw, 22px); box-shadow: var(--shadow); }
.page-head { margin-bottom: 18px; }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.head-row h1 { margin: 0; }
.prose-page { max-width: 1000px; }
.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.5em; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: .2em 1em; color: var(--muted); }
section { margin-bottom: 30px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.section-head h2 { margin: 0; }
.section-head .eyebrow { margin-bottom: 2px; font-size: .7rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Butoane și formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 650; font-size: .95rem; cursor: pointer; transition: background var(--t), border-color var(--t), transform var(--t) var(--ease), box-shadow var(--t), color var(--t); }
.btn:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.07); }
.btn .i { transition: transform var(--t) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-small { min-height: 40px; padding: 6px 13px; font-size: .9rem; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--accent-text); font-weight: 650; }
.btn-link:hover .i { transform: translateX(3px); }
.btn-link .i { transition: transform var(--t) var(--ease); width: 18px; height: 18px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px; min-height: 44px; padding: 8px 11px; max-width: 100%; transition: border-color var(--t), box-shadow var(--t); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); outline: none; }
textarea { width: 100%; }
label { display: inline-flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 550; min-height: 44px; cursor: pointer; }
label.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); margin: 0; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); align-items: end; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid label input, .form-grid label select { width: 100%; }
.hp { position: absolute; left: -9999px; }
kbd { font: .82em ui-monospace, monospace; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--paper); }
.notice { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--paper); padding: 11px 16px; border-radius: 12px; max-width: 90ch; margin: 0 0 12px; }
.notice-warn { border-left-color: var(--warn-line); background: var(--warn-bg); }
.notice-ok { border-left-color: var(--accent); background: var(--ok-bg); }

/* Comutatoare (switch) accesibile, bazate pe checkbox */
.switch { display: inline-flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: .93rem; white-space: nowrap; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; min-height: 0; border-radius: 999px; background: var(--line-strong); border: 0; padding: 0; margin: 0; position: relative; cursor: pointer; transition: background var(--t); flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--t) var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: none; }

/* ---------- Hero (prima pagină) ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: center; padding: 14px 0 28px; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 40px; } }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.3rem); line-height: 1.06; margin: 0; letter-spacing: -.045em; }
.hero .lead { margin-top: 14px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin-top: 20px; }
.next-card { position: relative; overflow: hidden; }
.next-card::after { content: ""; position: absolute; right: -50px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 176, 58, .35), transparent 70%); animation: glow 6s ease-in-out infinite alternate; pointer-events: none; }
.next-card .eyebrow { color: var(--muted); }
.next-big { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.next-day { font-size: 3.5rem; font-weight: 800; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.next-meta { display: flex; flex-direction: column; line-height: 1.35; }
.next-meta strong { font-size: 1.05rem; }
.next-meta span { color: var(--muted); font-size: .9rem; }
.next-name { border-top: 1px solid var(--line); padding-top: 12px; }
.next-name a { font-weight: 750; font-size: 1.06rem; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.next-name a .i { color: var(--accent-text); transition: transform var(--t) var(--ease); }
.next-name a:hover { text-decoration: none; color: var(--accent-text); }
.next-name a:hover .i { transform: translateX(3px); }
.countdown { color: var(--accent-text); font-weight: 700; font-size: .9rem; margin: 2px 0 0; }

/* ---------- Cifre-cheie ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; margin: 0 0 20px; }
.stat { display: flex; align-items: center; gap: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 15px; box-shadow: var(--shadow); transition: transform var(--t) var(--ease), box-shadow var(--t); }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.stat:nth-child(2) .stat-icon { background: var(--legal-bg); color: var(--legal-ink); }
.stat:nth-child(3) .stat-icon { background: var(--weekend-bg); color: var(--weekend-ink); }
.stat:nth-child(4) .stat-icon { background: var(--bridge-bg); color: var(--bridge-ink); }
.stat-v { font-size: 1.6rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; display: block; }
.stat-l { font-size: .84rem; color: var(--muted); line-height: 1.3; display: block; margin-top: 3px; }

/* ---------- Bara de unelte a calendarului ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 8px 4px 16px; box-shadow: var(--shadow); margin-bottom: 10px; }
.toolbar form.tb-form { display: contents; }
.toolbar select { min-height: 40px; padding: 6px 10px; }
.toolbar .spacer { flex: 1 1 auto; }
.toolbar .actions { gap: 6px; padding: 4px 0; }
.toolbar .icon-btn { min-height: 40px; min-width: 40px; }
.tb-period { flex-basis: 100%; margin: 0; }
.tb-period > summary { list-style: none; cursor: pointer; }
.tb-period > summary::-webkit-details-marker { display: none; }
.period-panel { display: grid; gap: 10px; border-top: 1px solid var(--line); padding: 12px 0 10px; animation: fade-down .2s var(--ease); }
.period-panel .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.period-help { margin: 0; font-size: .84rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .84rem; color: var(--muted); margin: 0 2px 12px; align-items: center; }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid transparent; flex: none; }
.dot-legal { background: var(--legal-dot); }
.dot-weekend { background: var(--weekend-bg); border-color: var(--line-strong); }
.dot-rel { background: var(--rel-ink); opacity: .75; border-radius: 50%; }
.dot-bridge { background: #D4A72C; transform: rotate(45deg) scale(.85); border-radius: 2px; }
.dot-recovery { background: var(--recovery-ink); border-radius: 0; }
.dot-today { border: 2px solid var(--accent); border-radius: 50%; }
.dot-idea { border: 2px dashed var(--idea); }
.dot-sel { background: var(--sel-bg); border: 2px solid var(--sel); }
.cal-page:not(.show-rel) .rel-only { display: none; }
.cal-page:not(.show-ideas) .idea-only { display: none; }

/* ---------- Grila lunilor: 1 telefon, 2 tabletă, 3 uzual, 4 foarte lat ---------- */
.months-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@container main (min-width: 540px) { .months-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container main (min-width: 860px) { .months-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container main (min-width: 1240px) { .months-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.months-grid.single { grid-template-columns: minmax(0, 680px) !important; }
.month { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px 10px; margin: 0; box-shadow: var(--shadow); transition: box-shadow var(--t), border-color var(--t); }
.month:hover { box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 4px 6px; }
.month-title { margin: 0; font-size: 1.12rem; font-weight: 750; }
.month-title a { color: var(--ink); }
.month-title a:hover { color: var(--accent-text); text-decoration: none; }
.month-year { color: var(--muted); font-weight: 500; }
.month-count { font-size: .8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.month-count .i { width: 14px; height: 14px; transition: transform var(--t) var(--ease); }
a.month-count:hover { color: var(--accent-text); text-decoration: none; }
a.month-count:hover .i { transform: translateX(2px); }
.cal-grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.cal-grid th { font-size: .74rem; color: var(--muted); font-weight: 700; padding: 2px 0 4px; }
.cal-grid th.wkend { color: var(--legal-ink); }
.cal-grid td { padding: 0; }
.day { position: relative; width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: .98rem; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background var(--t), box-shadow var(--t), transform var(--t) var(--ease), border-color var(--t); }
.day:hover { border-color: var(--line-strong); transform: scale(1.07); z-index: 1; position: relative; }
.is-weekend .day { background: var(--weekend-bg); color: var(--weekend-ink); }
.is-legal .day { background: var(--legal-bg); color: var(--legal-ink); font-weight: 750; }
.is-bridge .day { background: var(--bridge-bg); color: var(--bridge-ink); font-weight: 700; }
.is-recovery .day { background: var(--recovery-bg); color: var(--recovery-ink); }
.show-rel .is-religious:not(.is-legal) .day { background: var(--rel-bg); color: var(--rel-ink); }
.is-today .day { box-shadow: inset 0 0 0 2px var(--accent); font-weight: 800; }
.show-ideas .is-idea .day { outline: 2px dashed var(--idea); outline-offset: -3px; }
.day.is-selected { box-shadow: inset 0 0 0 2px var(--sel); background-image: linear-gradient(var(--sel-bg), var(--sel-bg)); animation: pop .18s var(--ease); }
.marks { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; gap: 3px; line-height: 1; pointer-events: none; }
.mk { width: 5px; height: 5px; border-radius: 50%; display: block; }
.mk-legal { background: var(--legal-dot); }
.mk-bridge { background: #D4A72C; border-radius: 1px; transform: rotate(45deg); }
.mk-recovery { background: var(--recovery-ink); border-radius: 0; }
.mk-rel { background: var(--rel-ink); opacity: .8; }
.cal-page:not(.show-rel) .mk-rel { display: none; }
.empty { background: transparent; }

/* Bara selecției: apare doar când există zile selectate */
.sel-float { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 160%); z-index: 45; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 7px 6px 18px; box-shadow: 0 12px 40px rgba(15, 23, 42, .22); transition: transform .28s var(--ease); max-width: calc(100vw - 24px); }
.sel-float.on { transform: translate(-50%, 0); }
.sel-float .sel-info { margin: 0; font-weight: 700; font-size: .95rem; }
.sel-float .btn { min-height: 40px; border-radius: 999px; }

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.events-table, .rates { width: 100%; border-collapse: collapse; }
.events-table caption { text-align: left; font-weight: 700; padding: 12px 14px 4px; }
.events-table th, .events-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.events-table tr:last-child td { border-bottom: 0; }
.events-table tbody tr { transition: background var(--t); }
.events-table tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
.events-table thead th { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.events-table td.date-cell { overflow-wrap: normal; white-space: nowrap; }
.events-table td a { font-weight: 650; }
.date-cell .d { display: block; font-weight: 700; }
.date-cell .wd { display: block; color: var(--muted); font-size: .88em; }
p.date-cell .d, dd.date-cell .d { display: inline; }
p.date-cell .wd, dd.date-cell .wd { display: inline; margin-left: .35em; }
.sug-range .d, .upcoming .d { font-weight: 700; }
.sug-range .wd, .upcoming .wd { color: var(--muted); margin-left: .3em; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge-legal { background: var(--legal-bg); color: var(--legal-ink); }
.badge-religious { background: var(--rel-bg); color: var(--rel-ink); }
.badge-punte, .badge-zi_suplimentara { background: var(--bridge-bg); color: var(--bridge-ink); }
.badge-recuperare { background: var(--recovery-bg); color: var(--recovery-ink); }
.badge-weekend { background: var(--weekend-bg); color: var(--weekend-ink); }
.badge-workday { background: var(--accent-soft); color: var(--accent-text); }
.cal-page:not(.show-rel) tr.rel-only { display: none; }
tr.consumes td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; margin: 14px 0; }
.totals div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.totals dt { font-size: .84rem; color: var(--muted); }
.totals dd { margin: 0; font-size: 1.45rem; font-weight: 800; }
.totals .hl { border-color: var(--accent); background: var(--accent-soft); }
.facts { display: grid; gap: 6px 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .facts { grid-template-columns: max-content minmax(0, 1fr); } .facts div { display: contents; } }
.facts dt { font-weight: 700; }
.facts dd { margin: 0 0 6px; }

/* ---------- Liste, carduri, chips ---------- */
.year-nav, .year-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: .92rem; transition: border-color var(--t), background var(--t), transform var(--t) var(--ease), color var(--t); }
.chip:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; transform: translateY(-1px); }
.chip-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.chip .i { width: 16px; height: 16px; }
.upcoming, .holiday-list, .sug-list, .tool-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.upcoming p, .holiday-list p, .sug p { margin: .3em 0; }
.holiday-list .card, .tool-grid .card, .upcoming .card, .sug-list .card { transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); }
.holiday-list .card:hover, .tool-grid .card:hover, .upcoming .card:hover, .sug-list .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.holiday-list h2 { margin: 0 0 .3em; }
.tool-grid h3 { margin: 8px 0 4px; }
.tool-grid h3 a { color: var(--ink); }
.tool-grid h3 a:hover { color: var(--accent-text); }
.link-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.link-columns { columns: 15rem auto; padding-left: 1.1em; }
.sitemap-cols { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.date-list { columns: 14rem auto; }

/* ---------- Sidebar ---------- */
.side-card h2, .side-title { margin: 0 0 .5em; font-size: 1.08rem; }
.side-card p { margin: .35em 0; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.share-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; padding: 0; transition: transform var(--t) var(--ease), background var(--t), color var(--t), border-color var(--t); }
.share-btn:hover { transform: translateY(-2px) scale(1.06); text-decoration: none; color: #fff; border-color: transparent; }
.share-fb:hover { background: #1877F2; }
.share-wa:hover { background: #128C4B; }
.share-tg:hover { background: #1D82B8; }
.share-native:hover, .share-copy:hover { background: var(--accent); color: var(--accent-ink); }
.share-status { min-height: 1.2em; margin: 8px 0 0; }
.rates { font-size: .93rem; }
.rates th, .rates td { padding: 8px 2px; border-bottom: 1px solid var(--line); text-align: right; }
.rates tr:last-child th, .rates tr:last-child td { border-bottom: 0; }
.rates th:first-child { text-align: left; }
.rates thead th { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rates .cur { font-weight: 750; }
.rates .cur-name { display: block; font-size: .76rem; color: var(--muted); font-weight: 400; }
.rates .val { font-weight: 750; font-variant-numeric: tabular-nums; }
.delta { font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: #B91C1C; } .delta.down { color: #047857; }
:root[data-theme="dark"] .delta.up { color: #FCA5A5; } :root[data-theme="dark"] .delta.down { color: #6EE7B7; }
.promo-card { background: linear-gradient(160deg, #134E4A, #0F766E); color: #F0FDFA; border: 0; overflow: hidden; position: relative; }
.promo-card .eyebrow { color: #99F6E4; }
.promo-card h2 { color: #fff; font-size: 1.28rem; margin: .1em 0 .4em; }
.promo-card p { color: #CCFBF1; font-size: .92rem; }
.promo-card .btn { background: #fff; color: #0F4F4A; border-color: #fff; width: 100%; margin-top: 8px; box-shadow: none; }
.promo-card .btn:hover { color: #0F4F4A; }
.promo-art { display: block; width: 130px; height: 76px; margin: 0 auto 10px; }
.promo-art .sun { animation: float 4s ease-in-out infinite alternate; }
.quote-card blockquote { margin: 0; }
.quote-card .qmark { color: var(--accent); width: 26px; height: 26px; }
.quote-card blockquote p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; margin: 6px 0 10px; }
.quote-card footer { font-size: .88rem; font-weight: 650; }
.quote-card footer cite { font-weight: 400; color: var(--muted); }
.ad-slot { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 8px; overflow: hidden; }
.ad-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.ad-slot ins { display: block; width: 100%; }

/* ---------- Subsol ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 24px 40px; padding-top: 34px; padding-bottom: 24px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.footer-grid .brand { margin: 0; }
.footer-about { font-size: .9rem; color: var(--muted); max-width: 32ch; margin: 12px 0 0; line-height: 1.6; }
.footer-col strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink); margin-bottom: 6px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a, .footer-col button { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); background: none; border: 0; padding: 0; font: inherit; font-size: .92rem; cursor: pointer; transition: color var(--t), transform var(--t) var(--ease); }
.footer-col a:hover, .footer-col button:hover { color: var(--accent-text); text-decoration: none; transform: translateX(2px); }
.footer-bottom { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-top: 14px; padding-bottom: 18px; font-size: .84rem; color: var(--muted); }

/* ---------- Modal și consimțământ ---------- */
.modal { border: 0; padding: 0; background: transparent; width: min(760px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); color: var(--ink); }
.modal[open] { animation: modal-in .22s var(--ease); }
.modal::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
.modal-inner { background: var(--paper); border-radius: 18px; border: 1px solid var(--line); display: flex; flex-direction: column; max-height: calc(100dvh - 16px); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-head h2:focus { outline: none; }
.modal-body { overflow-y: auto; padding: 16px 18px 20px; overscroll-behavior: contain; }
.modal-body .result { border: 0; box-shadow: none; padding: 0; }
.consent { position: fixed; inset: auto 0 0 0; z-index: 60; padding: 12px; animation: fade-up .3s var(--ease); }
.consent-box { max-width: 760px; margin: 0 auto; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.consent-box h2 { margin-top: 0; font-size: 1.12rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.consent-actions .btn { flex: 1 1 160px; }

/* ---------- Animații discrete (respectă prefers-reduced-motion) ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes spin-in { from { transform: rotate(-70deg); } to { transform: rotate(0); } }
@keyframes glow { from { opacity: .55; transform: scale(.92); } to { opacity: 1; transform: scale(1.06); } }
@keyframes float { from { transform: translateY(2px); } to { transform: translateY(-3px); } }
html.js .reveal { opacity: 0; }
html.js .reveal.is-in { animation: fade-up .5s var(--ease) forwards; }
html.js .months-grid > .reveal.is-in:nth-child(3n+2) { animation-delay: 50ms; }
html.js .months-grid > .reveal.is-in:nth-child(3n) { animation-delay: 100ms; }
.hero h1, .hero .lead, .hero-cta, .page-head h1, .page-head .lead { animation: fade-up .5s var(--ease) both; }
.hero .lead, .page-head .lead { animation-delay: 60ms; }
.hero-cta { animation-delay: 120ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; }
}
@media (max-width: 420px) {
  .brand-tagline { display: none; }
  .cal-grid { border-spacing: 2px; }
  .month { padding: 10px 8px 8px; }
  .events-table th, .events-table td { padding: 9px 8px; }
  .next-day { font-size: 3rem; }
}

/* Pagina lunii: grila alături de cifre */
.month-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 26px; align-items: start; }
@container main (min-width: 760px) { .month-layout { grid-template-columns: minmax(0, 620px) minmax(0, 1fr); } }
.month-layout .totals { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.small-dd { font-size: 1.05rem !important; }

/* Ajustări */
h2.eyebrow, h3.eyebrow { font-size: .75rem; margin: 0 0 .5em; letter-spacing: .12em; }
.sidebar > section, .sidebar > .ad-slot { margin: 0; }
.share-status { min-height: 0; margin: 0; }
.share-status:not(:empty) { margin-top: 8px; }
.hero .next-card { margin: 0; }
.quote-card .qmark { display: block; margin-bottom: 4px; }

/* Telefon: cifre-cheie 2×2 și bară de unelte compactă, ca grila să apară repede */
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .stat { padding: 9px 11px; gap: 9px; }
  .stat-icon { width: 30px; height: 30px; border-radius: 9px; }
  .stat-icon .i { width: 17px; height: 17px; }
  .stat-v { font-size: 1.3rem; }
  .stat-l { font-size: .76rem; }
  .page-head { margin-bottom: 12px; }
  .page-head .lead { font-size: .98rem; }
  .head-row .year-nav { margin: 4px 0 0; }
  .toolbar { padding: 2px 6px 2px 12px; gap: 0 14px; }
  .toolbar .switch { font-size: .88rem; min-height: 42px; }
  .toolbar .tb-select select { min-height: 38px; }
  .legend { font-size: .8rem; gap: 2px 12px; }
  .hero { padding-bottom: 16px; }
}
.lbl-short { display: none; }
@media (max-width: 640px) {
  .lbl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lbl-short { display: inline; }
  .toolbar .tb-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .toolbar .spacer { display: none; }
  .toolbar .actions { margin-left: auto; }
}

/* Pagina unei sărbători: date și bază legală alăturate */
.holiday-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 26px; align-items: start; }
@container main (min-width: 820px) { .holiday-top { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.holiday-top section { margin: 0; }
.card > h2:first-child, .card > .h3:first-child { margin-top: 0; }
.date-tiles { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.date-tile { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); transition: border-color var(--t), transform var(--t) var(--ease); }
.date-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.dt-year { font-size: .8rem; font-weight: 750; color: var(--accent-text); letter-spacing: .04em; }
.dt-date .d { font-weight: 750; }
.dt-date .wd { color: var(--muted); font-size: .9em; }
.dt-alt, .dt-note { font-size: .78rem; color: var(--muted); }
.facts-tight { gap: 4px 14px; font-size: .94rem; }
.facts-tight dd { margin-bottom: 4px; }
.prose-page { max-width: none; }
.prose-page > .prose { max-width: 78ch; }

/* Apariție în primul ecran: animație CSS scurtă, fără a aștepta JavaScript (nu întârzie LCP) */
.fade-in { animation: fade-up .45s var(--ease) both; }
.months-grid > .fade-in:nth-child(4n+2) { animation-delay: 40ms; }
.months-grid > .fade-in:nth-child(4n+3) { animation-delay: 80ms; }
.months-grid > .fade-in:nth-child(4n) { animation-delay: 120ms; }
.sidebar > .fade-in:nth-child(2) { animation-delay: 80ms; }
.sidebar > .fade-in:nth-child(3) { animation-delay: 140ms; }
.sidebar > .fade-in:nth-child(n+4) { animation-delay: 200ms; }

/* ---------- Selector de dată (datepicker.js) ---------- */
.dp { display: block; position: relative; }
.dp-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 550; text-align: left; cursor: pointer; transition: border-color var(--t), box-shadow var(--t); }
.dp-field:hover { border-color: var(--accent); }
.dp-field[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.dp-field.is-empty .dp-value { color: var(--muted); font-weight: 450; }
.dp-field .i { color: var(--accent-text); width: 18px; height: 18px; }
.dp-pop { position: fixed; z-index: 80; width: 300px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 16px; padding: 12px; box-shadow: 0 18px 50px rgba(15, 23, 42, .22); animation: fade-down .16s var(--ease); color: var(--ink); }
.dp-pop.dp-sheet { position: fixed; left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; animation: fade-up .2s var(--ease); }
.dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dp-selects { display: flex; gap: 6px; flex: 1; }
.dp-selects select { flex: 1; min-height: 36px; padding: 4px 8px; font-size: .92rem; font-weight: 650; border-radius: 9px; }
.dp-nav { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: background var(--t), border-color var(--t); }
.dp-nav:hover { border-color: var(--accent); color: var(--accent-text); }
.dp-grid { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.dp-grid th { font-size: .72rem; color: var(--muted); font-weight: 700; padding: 2px 0 4px; }
.dp-grid th.we { color: var(--legal-ink); }
.dp-grid td { padding: 0; }
.dp-day { width: 100%; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: .9rem; font-variant-numeric: tabular-nums; cursor: pointer; position: relative; transition: background var(--t), transform var(--t) var(--ease); }
.dp-day:hover:not([disabled]) { background: var(--accent-soft); color: var(--accent-text); }
.dp-day.we { background: var(--weekend-bg); color: var(--weekend-ink); }
.dp-day.hol { background: var(--legal-bg); color: var(--legal-ink); font-weight: 700; }
.dp-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.dp-day.in-range { background: color-mix(in srgb, var(--accent) 16%, var(--paper)); color: var(--ink); border-radius: 4px; }
.dp-day.sel, .dp-day.edge { background: var(--accent); color: var(--accent-ink); font-weight: 750; border-radius: 8px; }
.dp-day[disabled] { opacity: .3; cursor: not-allowed; }
.dp-day:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.dp-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-link { background: none; border: 0; padding: 6px 4px; color: var(--accent-text); font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; border-radius: 6px; }
.dp-link:hover { text-decoration: underline; }

/* Modal editabil: lunile selecției */
.mx-tools { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); align-items: end; }
.mx-tools label { min-width: 0; }
.mx-help { margin: 8px 0 10px; }
.mx-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mx-nav .icon-btn { min-width: 40px; min-height: 40px; font-size: 1.3rem; }
.mx-count { font-weight: 700; font-size: .95rem; }
.mx-months { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-bottom: 14px; }
.mx-month { border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--bg); }
.mx-title { margin: 0 4px 6px; font-weight: 750; }
.mx-grid .day { height: 36px; font-size: .92rem; }
.mx-result { border-top: 1px solid var(--line); padding-top: 12px; }
.form-grid label.check input { width: 20px; }
.spacer-16 { height: 16px; }

/* Zile instituționale (MApN, MAI, IGSU, ANP): doar marcaj, nu colorează ziua pentru toți */
.mk-inst { background: transparent; box-shadow: inset 0 0 0 1.5px #0F766E; }
:root[data-theme="dark"] .mk-inst { box-shadow: inset 0 0 0 1.5px #5EEAD4; }
.dot-inst { background: transparent !important; box-shadow: inset 0 0 0 2px #0F766E; border-radius: 50%; }
:root[data-theme="dark"] .dot-inst { box-shadow: inset 0 0 0 2px #5EEAD4; }
.mx-grid .is-inst .day { box-shadow: inset 0 -3px 0 #14B8A6; }

/* ---------- Runda 4: conținutul ocupă toată coloana principală (fără coloană îngustă la stânga) ---------- */
.prose, .prose-page, .prose-page > .prose, .notice, .lead { max-width: none; }
.holiday-top > :only-child { grid-column: 1 / -1; }
.prose table { width: 100%; }

/* Cifre-cheie cu explicație la hover / focus / atingere */
.stats { list-style: none; padding: 0; }
.stat { position: relative; cursor: help; padding-right: 30px; }
.stat:hover, .stat:focus, .stat:focus-within { z-index: 6; }
.stat:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.stat-info { position: absolute; top: 8px; right: 9px; display: flex; color: var(--muted); opacity: .6; transition: opacity var(--t), color var(--t); }
.stat-info .i { width: 15px; height: 15px; }
.stat:hover .stat-info, .stat:focus .stat-info { opacity: 1; color: var(--accent-text); }
.stat .tip { position: absolute; left: 6px; right: 6px; top: calc(100% + 9px); z-index: 30; background: var(--ink); color: var(--paper); font-size: .82rem; font-weight: 500; line-height: 1.45; padding: 9px 12px; border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .25); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity var(--t), transform var(--t) var(--ease), visibility var(--t); pointer-events: none; }
.stat .tip::before { content: ""; position: absolute; top: -5px; left: 24px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.stat:hover .tip, .stat:focus .tip, .stat:focus-within .tip { opacity: 1; visibility: visible; transform: none; }

/* Distribuire pe X */
.share-x:hover { background: #0F1419; }
:root[data-theme="dark"] .share-x:hover { background: #E7E9EA; color: #0F1419; }

/* ---------- Modalul de analiză: lat, calendar în stânga, rezultat în dreapta ---------- */
.modal.modal-wide { width: min(1320px, calc(100vw - 24px)); }
.modal-wide .modal-body { padding: 18px 22px 24px; }
.mx { display: grid; gap: 18px 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1080px) {
  .modal-wide .mx { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: start; }
  .modal-wide .mx-left { position: sticky; top: 0; }
  .modal-wide .mx-result { border-top: 0; padding-top: 0; border-left: 1px solid var(--line); padding-left: 28px; min-height: 100%; }
}
.mx-tools .btn { min-height: 44px; }
.mx-months { margin-bottom: 0; }
.res-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 14px 18px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); margin: 0 0 12px; }
.res-big { display: flex; align-items: center; gap: 12px; margin: 0; }
.res-n { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.res-u { font-weight: 750; line-height: 1.2; max-width: 8.5em; }
.res-sum { margin: 0; flex: 1 1 260px; font-size: .93rem; }
.res-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.pill-s { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--muted); }
.res-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); gap: 8px; margin: 0 0 16px; }
.res-tiles div { border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: 12px; padding: 9px 12px; background: var(--paper); }
.res-tiles dt { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.res-tiles dd { margin: 3px 0 0; font-size: 1.4rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.res-tiles .rt-legal { border-top-color: var(--legal-dot); }
.res-tiles .rt-weekend { border-top-color: var(--weekend-ink); }
.res-tiles .rt-bridge { border-top-color: #D4A72C; }
.res-tiles .rt-recovery { border-top-color: var(--recovery-ink); }
.res-h3 { font-size: 1rem; margin: 4px 0 8px; }
.res-dates { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr)); gap: 6px; }
.res-dates li { border: 1px solid var(--line); border-left: 3px solid var(--sel); border-radius: 9px; padding: 6px 10px; font-size: .88rem; background: var(--paper); line-height: 1.3; }
.rd-wd { display: block; font-size: .74rem; color: var(--muted); }
.rd-d { font-weight: 700; }
.day-detail { margin: 0 0 12px; }
.day-detail > summary { cursor: pointer; font-weight: 700; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); transition: border-color var(--t); }
.day-detail > summary:hover { border-color: var(--accent); }
.day-detail[open] > summary { margin-bottom: 8px; }
.day-detail > summary:focus-visible { outline-offset: 1px; }
.res .notice { margin: 10px 0; }
.res-note { margin: 8px 0 0; }
.result.res > :last-child { margin-bottom: 0; }

/* Căsuțe de bifat uniforme (public + admin), vizibile în ambele teme */
label.check input[type="checkbox"], .chip-check input[type="checkbox"], .clear-secret input[type="checkbox"], input[type="checkbox"].cbx {
  appearance: none; -webkit-appearance: none; width: 18px !important; height: 18px !important; min-height: 0; margin: 0; padding: 0; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--paper); display: inline-grid; place-content: center; cursor: pointer;
  transition: background var(--t), border-color var(--t);
}
label.check input[type="checkbox"]:hover, .chip-check input[type="checkbox"]:hover, .clear-secret input[type="checkbox"]:hover { border-color: var(--accent); }
label.check input[type="checkbox"]:checked, .chip-check input[type="checkbox"]:checked, .clear-secret input[type="checkbox"]:checked, input[type="checkbox"].cbx:checked { background: var(--accent); border-color: var(--accent); }
label.check input[type="checkbox"]:checked::after, .chip-check input[type="checkbox"]:checked::after, .clear-secret input[type="checkbox"]:checked::after, input[type="checkbox"].cbx:checked::after {
  content: ""; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg);
}
label.check input[type="checkbox"]:focus-visible, .chip-check input[type="checkbox"]:focus-visible, .clear-secret input[type="checkbox"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: none; }
.ad-slot.ad-html { min-height: 0; }
.ad-frame { display: block; width: 100%; border: 0; background: transparent; }
.mx-leave { color: var(--accent-text); white-space: nowrap; }
@media (max-width: 640px) {
  .modal-wide .modal-body { padding: 14px 14px 18px; }
  .mx-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mx-tools label:nth-child(3), .mx-tools .btn { grid-column: 1 / -1; }
  .mx-tools .dp-field { padding: 8px 9px; font-size: .9rem; }
  .res-n { font-size: 2.4rem; }
}
.dp-value { white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Planificator de concediu ---------- */
.planner-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.planner-form:has(.strategy-select option[value="vacanta"]:not(:checked)) .only-long { display: none; }
.plan-list { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.plan-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 6px 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background var(--t); }
.plan-item:last-child { border-bottom: 0; }
.plan-item:hover { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.pi-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-size: .9rem; }
.plan-item.is-long .pi-num { background: var(--accent); color: var(--accent-ink); }
.pi-main p { margin: 0; }
.pi-leave { font-size: .88rem; color: var(--muted); margin-top: 2px !important; }
.pi-score { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.pi-off { font-weight: 800; color: var(--accent-text); white-space: nowrap; }
.pi-cost { font-size: .8rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .plan-item { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .pi-link { grid-column: 2 / -1; justify-self: start; }
}
.year-strip { display: grid; gap: 4px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.ys-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; align-items: center; }
.ys-m { font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.ys-days { display: grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap: 2px; }
.year-strip i { display: block; height: 14px; border-radius: 3px; background: var(--paper); border: 1px solid var(--line); }
.year-strip i.ys-x { background: transparent; border-color: transparent; }
.year-strip i.ys-we { background: var(--weekend-bg); border-color: transparent; }
.year-strip i.ys-legal { background: var(--legal-bg); border-color: var(--legal-dot); }
.year-strip i.ys-off { background: color-mix(in srgb, var(--accent) 35%, var(--paper)); border-color: transparent; }
.year-strip i.ys-holiday { background: var(--legal-dot); border-color: transparent; }
.year-strip i.ys-leave { background: var(--accent); border-color: transparent; }
.ys-legend { margin: 8px 0 0; }
.ys-legend i { width: 14px; height: 12px; display: inline-block; }
.btn-row-pub { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
@media (max-width: 520px) { .year-strip i { height: 10px; border-radius: 2px; } .ys-days { gap: 1px; } .year-strip { padding: 10px; } }

/* ---------- Widget: pagina de documentare ---------- */
.widget-layout { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); margin-bottom: var(--gap); align-items: start; }
@container main (min-width: 760px) { .widget-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
.widget-layout .card { margin: 0; }
.widget-preview { display: flex; flex-direction: column; align-items: center; background: var(--bg); }
.widget-frame { border: 0; max-width: 100%; display: block; }
.code-box { white-space: pre-wrap; word-break: break-all; font: .84rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; }
.copy-status:empty { display: none; }

/* ---------- Planificare în echipă ---------- */
.team-intro { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@container main (min-width: 820px) { .team-intro { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.team-intro .card { margin: 0; }
.team-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.team-points li { display: flex; gap: 12px; align-items: flex-start; }
.team-points .i { color: var(--accent-text); margin-top: 2px; }
.team .card { margin-bottom: var(--gap); }
.share-links { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.share-link .lbl { display: block; font-size: .84rem; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: .86rem; font-family: ui-monospace, Consolas, monospace; }
.team-add { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.team-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.team-cal-head h2 { margin: 0; font-size: 1.15rem; }
.team-cal-head .icon-btn { font-size: 1.3rem; }
.team-scroll { box-shadow: none; }
.team-grid { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 760px; font-size: .78rem; table-layout: fixed; }
.team-grid th, .team-grid td { padding: 0; text-align: center; }
.team-grid thead th { font-weight: 700; color: var(--muted); padding: 2px 0 4px; font-variant-numeric: tabular-nums; }
.team-grid thead th span { display: block; font-size: .66rem; font-weight: 600; text-transform: uppercase; }
.team-grid thead th.tt { color: var(--accent-text); }
.team-grid .tg-name { width: 140px; text-align: left; padding: 0 8px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .86rem; color: var(--ink); }
.team-grid tbody td { height: 26px; border-radius: 5px; background: var(--bg); }
.team-grid tbody td.tw, .team-grid tfoot td.tw { background: var(--weekend-bg); }
.team-grid tbody td.tl { background: var(--legal-bg); }
.team-grid tbody td.on { opacity: 1; }
.team-grid tfoot td { height: 22px; font-weight: 750; color: var(--muted); font-variant-numeric: tabular-nums; }
.team-grid tfoot td.many { background: #F59E0B; color: #1F1300; border-radius: 5px; }
.team-many-dot { background: #F59E0B; }
.tc { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.tc-0 { background: #3B82F6; } .tc-1 { background: #A855F7; } .tc-2 { background: #14B8A6; } .tc-3 { background: #F97316; } .tc-4 { background: #EC4899; }
.tc-5 { background: #22C55E; } .tc-6 { background: #EAB308; } .tc-7 { background: #6366F1; } .tc-8 { background: #EF4444; } .tc-9 { background: #64748B; }
.team-grid tbody td.on.tc-0 { background: #3B82F6; } .team-grid tbody td.on.tc-1 { background: #A855F7; } .team-grid tbody td.on.tc-2 { background: #14B8A6; } .team-grid tbody td.on.tc-3 { background: #F97316; } .team-grid tbody td.on.tc-4 { background: #EC4899; }
.team-grid tbody td.on.tc-5 { background: #22C55E; } .team-grid tbody td.on.tc-6 { background: #EAB308; } .team-grid tbody td.on.tc-7 { background: #6366F1; } .team-grid tbody td.on.tc-8 { background: #EF4444; } .team-grid tbody td.on.tc-9 { background: #64748B; }
.team-list { margin: 0; }
.team-list .li-title { font-weight: 700; display: inline-flex; align-items: center; }
.team-settings > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; min-height: 32px; }
.team-settings[open] > summary { margin-bottom: 14px; }
.team-destroy { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.team-destroy p { margin: 0; }
.btn-danger { color: #B91C1C; border-color: #FECACA; }
.btn-danger:hover { background: #FEF2F2; border-color: #DC2626; color: #991B1B; }
:root[data-theme="dark"] .btn-danger { color: #FCA5A5; border-color: #7F1D1D; }
:root[data-theme="dark"] .btn-danger:hover { background: #3B1414; color: #FECACA; }
/* Listă uniformă (folosită și în admin): conținut la stânga, acțiuni la dreapta */
.adm-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.adm-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background var(--t); }
.adm-list > li:last-child { border-bottom: 0; }
.adm-list > li:hover { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.li-main { min-width: 0; }
.li-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .84rem; color: var(--muted); margin-top: 4px; }
.li-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.li-actions form { margin: 0; }
@media (max-width: 640px) { .adm-list > li { grid-template-columns: minmax(0, 1fr); } .li-actions { justify-content: flex-start; } }

/* ---------- Vacanțe școlare ---------- */
.school .card { margin-bottom: var(--gap); }
.school-next { margin-bottom: var(--gap); }
.school-county { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.school-county label { flex: 1 1 260px; }
.school-county select { width: 100%; }
.school-county-res { flex-basis: 100%; margin: 4px 0 0; }
.school-periods { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.sp { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.sp:last-child { border-bottom: 0; }
.sp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); }
.sp-vacanta .sp-dot { background: var(--accent); }
.sp-mobila .sp-dot { background: transparent; box-shadow: inset 0 0 0 3px var(--accent); }
.sp-name { font-weight: 700; }
.sp-modul .sp-name { font-weight: 600; color: var(--muted); }
.sp-dates { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.sp-vacanta .sp-dates { font-weight: 700; color: var(--accent-text); }
.sp-note { grid-column: 2 / -1; font-size: .82rem; color: var(--muted); }
@media (max-width: 560px) { .sp { grid-template-columns: 14px minmax(0, 1fr); } .sp-dates { grid-column: 2; text-align: left; } }
.year-strip i.ys-mob { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, var(--paper)) 0 3px, var(--paper) 3px 6px); border-color: transparent; }
.mob-weeks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.mob-week { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg); }
.mob-week p { margin: 0; }
.mob-dates { font-weight: 800; color: var(--accent-text); margin-bottom: 4px !important; }
.mob-unconf .mob-dates { color: var(--muted); }
.school-notes { padding-left: 20px; display: grid; gap: 6px; }

/* Notificări (aplicația instalabilă) */
.push-card .side-title { display: flex; align-items: center; gap: 8px; }
.push-card .side-title .i { color: var(--accent-text); width: 18px; height: 18px; }
.push-card .push-opt { min-height: 36px; font-weight: 500; }
.push-btn { width: 100%; margin-top: 4px; }
.push-status:empty { display: none; }
.push-status { margin: 8px 0 0; }
/* Echipa: zilele libere din interiorul unui concediu sunt mai deschise (nu se numără) */
.team-grid tbody td.on.tw, .team-grid tbody td.on.tl { opacity: .45; }
.planner-form .btn { white-space: nowrap; }
.res-u { max-width: 11em; }
@media (min-width: 901px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 24px 32px; } }
.table-wrap, .adm-table-wrap, .modal-body { position: relative; }

/* Modal: sărbătorile lunilor afișate, sub calendar */
.mx-events { margin-top: 14px; }
.ev-card { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 12px 14px; }
.ev-title { margin: 0 0 10px; font-size: .95rem; }
.ev-empty { margin: 0; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ev { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px 7px 7px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); }
.ev-legal { border-left-color: var(--legal-dot); }
.ev-punte, .ev-zi_suplimentara { border-left-color: #D4A72C; }
.ev-recuperare { border-left-color: var(--recovery-ink); }
.ev-religious { border-left-color: var(--rel-ink); }
.ev-inst { border-left-color: #14B8A6; }
.ev.is-sel { box-shadow: 0 0 0 2px var(--sel); }
.ev-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 42px; border-radius: 9px; background: var(--legal-bg); color: var(--legal-ink); line-height: 1; }
.ev-punte .ev-date, .ev-zi_suplimentara .ev-date { background: var(--bridge-bg); color: var(--bridge-ink); }
.ev-recuperare .ev-date { background: var(--recovery-bg); color: var(--recovery-ink); }
.ev-religious .ev-date { background: var(--rel-bg); color: var(--rel-ink); }
.ev-inst .ev-date { background: var(--accent-soft); color: var(--accent-text); }
.ev-date b { font-size: 1.1rem; }
.ev-date small { font-size: .66rem; text-transform: uppercase; margin-top: 2px; }
.ev-main { display: flex; flex-direction: column; min-width: 0; }
.ev-main a { font-weight: 700; color: var(--ink); }
.ev-main a:hover { color: var(--accent-text); }
.ev-meta { font-size: .8rem; color: var(--muted); }
.ev-tag { font-size: .72rem; font-weight: 700; color: var(--sel); white-space: nowrap; }
.events-table tr.is-free td { color: var(--muted); }
.events-table th.num, .events-table td.num { text-align: right; white-space: nowrap; }

/* Vacanțe școlare: rezumat + județ într-un singur card */
.school-top { display: grid; gap: 16px 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@container main (min-width: 760px) { .school-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.st-next { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); height: 100%; }
.st-n { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.st-txt { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.st-txt span { font-size: .86rem; color: var(--muted); }
.st-county label { display: flex; flex-direction: column; gap: 6px; }
.st-row { display: flex; gap: 8px; }
.st-row select { flex: 1; min-width: 0; }
.st-res { margin: 10px 0 0; font-size: .92rem; }
html.js .st-county .btn { display: none; }
.team-view { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.seg-pub { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; }
.seg-pub a { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-size: .88rem; font-weight: 650; }
.seg-pub a:hover { color: var(--ink); text-decoration: none; }
.seg-pub a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.tg-caption { caption-side: top; text-align: left; font-weight: 750; padding: 4px 8px 6px; }
.team-cal > .team-scroll .tg-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.team-year { display: grid; gap: 14px; }

/* ---------- Liste derulante stilizate (select.js) ---------- */
.zs-sel { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
label .zs-sel, .field .zs-sel, .form-grid .zs-sel, .st-row .zs-sel, .mx-tools .zs-sel { display: block; width: 100%; }
.st-row .zs-sel { flex: 1; min-width: 0; }
.zs-sel-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.zs-sel-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 550; text-align: left; cursor: pointer; transition: border-color var(--t), box-shadow var(--t); }
.zs-sel-btn:hover { border-color: var(--accent); }
.zs-sel-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.zs-sel-btn:disabled { opacity: .55; cursor: not-allowed; }
.zs-sel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.zs-sel-chev { width: 18px; height: 18px; color: var(--accent-text); flex: none; transition: transform var(--t) var(--ease); }
.zs-sel-btn[aria-expanded="true"] .zs-sel-chev { transform: rotate(180deg); }
.toolbar .zs-sel-btn { min-height: 40px; padding: 6px 10px; min-width: 150px; }
.zs-sel-pop { position: fixed; z-index: 85; max-width: min(420px, calc(100vw - 16px)); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px; box-shadow: 0 18px 50px rgba(15, 23, 42, .22); animation: fade-down .14s var(--ease); color: var(--ink); display: flex; flex-direction: column; }
.zs-sel-pop.zs-sheet { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; max-width: none; min-width: 0 !important; animation: fade-up .2s var(--ease); max-height: 70vh; }
.zs-sel-search { padding: 4px 4px 6px; }
.zs-sel-search input { width: 100%; min-height: 38px; font-size: .92rem; }
.zs-sel-list { max-height: min(340px, 60vh); overflow-y: auto; overscroll-behavior: contain; outline: none; display: grid; gap: 1px; }
.zs-sel-pop.zs-sheet .zs-sel-list { max-height: 60vh; }
.zs-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: .95rem; line-height: 1.3; }
.zs-opt.is-act { background: var(--accent-soft); color: var(--accent-text); }
.zs-opt.is-sel { font-weight: 700; }
.zs-opt.is-dis { opacity: .45; cursor: not-allowed; }
.zs-opt-check { width: 16px; height: 16px; color: var(--accent-text); visibility: hidden; flex: none; }
.zs-opt.is-sel .zs-opt-check { visibility: visible; }
.zs-opt-group { padding: 8px 12px 4px; font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.zs-opt[hidden] { display: none; }
/* Fără JavaScript: selectul nativ primește aceeași formă și o săgeată proprie */
select:not(.zs-sel-native):not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F766E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
:root[data-theme="dark"] select:not(.zs-sel-native):not([multiple]) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235EEAD4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
select option { background: var(--paper); color: var(--ink); }

/* ---------- Logo animat: un avion de hârtie decolează din calendar, la câteva secunde ---------- */
.logo-symbol { overflow: visible; }
.logo-plane, .logo-trail { opacity: 0; }
.lp-body { fill: #F5B03A; }
.lp-fold { stroke: rgba(255, 255, 255, .85); }
.logo-trail { stroke: #F5B03A; stroke-dasharray: 100; stroke-dashoffset: 100; }
.lp-body { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.site-header .logo-plane { transform-box: fill-box; transform-origin: center; animation: logo-fly 9s cubic-bezier(.45, .05, .35, 1) 2.5s infinite; }
.site-header .logo-trail { animation: logo-trail 9s ease-out 2.5s infinite; }
.site-header .brand-tile { animation: logo-hop 9s var(--ease) 2.5s infinite; }
.site-header .brand:hover .logo-plane, .site-header .brand:hover .logo-trail, .site-header .brand:hover .brand-tile { animation-play-state: paused; }
@keyframes logo-fly {
  0%, 62% { opacity: 0; transform: translate(17px, 22px) rotate(-20deg) scale(.35); }
  66% { opacity: 1; transform: translate(18px, 20px) rotate(-24deg) scale(.7); }
  78% { opacity: 1; transform: translate(27px, 9px) rotate(-36deg) scale(1.15); }
  90% { opacity: 1; transform: translate(40px, -3px) rotate(-42deg) scale(1.25); }
  100% { opacity: 0; transform: translate(53px, -14px) rotate(-46deg) scale(1); }
}
@keyframes logo-trail {
  0%, 64% { opacity: 0; stroke-dashoffset: 100; }
  68% { opacity: .55; }
  94% { opacity: .45; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}
@keyframes logo-hop {
  0%, 60%, 74%, 100% { transform: none; }
  64% { transform: translateY(1px) scale(.97); }
  68% { transform: translateY(-3px) rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) { .site-header .logo-plane, .site-header .logo-trail, .site-header .brand-tile { animation: none !important; } }
@media print { .logo-plane, .logo-trail { display: none; } }
.h1-kicker { display: flex; margin: 0 0 .7em; letter-spacing: .12em; }
.answer-lead { font-size: 1.12rem; color: var(--ink); font-weight: 600; margin-top: .3em; }
/* Întrebări frecvente (generate din date) */
.faq-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.faq-item h3 { margin: 0 0 6px; font-size: 1rem; }
.faq-item p { margin: 0; color: var(--muted); font-size: .94rem; }

/* =====================================================================
   Telefon și tabletă: antet compact, meniu, selecție, modal (runda 8)
   ===================================================================== */
/* Calendarul nu declanșează selecția de text / meniul de context la apăsare lungă */
.months-grid, .cal-grid, .mx-cal, .mx-grid, .dp-grid, .team-grid { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.day, .dp-day, .zs-opt, .btn, .icon-btn, .chip { -webkit-tap-highlight-color: transparent; }
.nav-toggle { width: 44px; padding: 0; }
.nav-toggle .i { width: 22px; height: 22px; }

@media (max-width: 1239px) {
  .header-inner { min-height: 60px; gap: 8px 10px; }
  .main-nav { gap: 10px; padding-bottom: 14px; }
  .main-nav .nav-years { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .main-nav .nav-years::-webkit-scrollbar { display: none; }
  .main-nav .nav-years li { flex: 1 0 auto; }
  .main-nav .nav-years a { justify-content: center; width: 100%; padding: 0 8px; }
  .main-nav .nav-sections { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
  .main-nav .nav-sections a { min-height: 44px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .main-nav .nav-years .ny-far { display: none; } /* pe telefon: anul curent + următorii 3 + arhiva */
  .main-nav .nav-sections { grid-template-columns: 1fr 1fr; }
  .brand-tile { width: 38px; height: 38px; border-radius: 11px; }
  .logo-symbol { width: 27px; height: 27px; }
  .brand-name { font-size: 1.12rem; }
  .icon-btn { min-width: 42px; min-height: 42px; }
}

/* Butoane pe telefon: lățime și înălțime consecvente */
@media (max-width: 640px) {
  .hero-cta { display: grid; grid-template-columns: 1fr; gap: 6px; justify-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-cta .btn-link { justify-content: center; }
  .head-row { align-items: flex-start; }
  .year-nav { gap: 6px; }
  .year-nav .chip { min-height: 38px; padding: 0 12px; font-size: .88rem; }
  .form-grid { gap: 12px; }
  .form-grid > .btn, .form-grid > button { width: 100%; }
  .btn-row-pub .btn, .team-view .btn { flex: 1 1 auto; }
  .section-head { align-items: flex-start; }
  .card { padding: 14px; }
  h1 { font-size: clamp(1.6rem, 1.2rem + 3vw, 2.1rem); }
}

/* Bara selecției: pe telefon ocupă lățimea ecranului, pe un singur rând */
@media (max-width: 640px) {
  .sel-float { left: 10px; right: 10px; bottom: 10px; transform: translateY(170%); max-width: none; border-radius: 16px; flex-wrap: nowrap; justify-content: flex-end; padding: 8px 8px 8px 14px; gap: 6px; }
  .sel-float.on { transform: none; }
  .sel-float .sel-info { flex: 1 1 auto; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sel-float .btn { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: .9rem; flex: none; }
}

/* Modalul de analiză pe telefon: ecran complet, rezultatul imediat sub calendar */
@media (max-width: 640px) {
  .modal.modal-wide { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .modal-wide .modal-inner { border-radius: 0; border: 0; height: 100dvh; max-height: 100dvh; }
  .modal-wide .modal-head { padding: 10px 14px; position: sticky; top: 0; background: var(--paper); z-index: 2; }
  .modal-wide .modal-head h2 { font-size: 1.05rem; }
  .modal-wide .modal-body { padding: 12px 12px 20px; }
  .modal-wide .mx { display: flex; flex-direction: column; gap: 14px; }
  .modal-wide .mx-left { display: contents; }
  .modal-wide .mx-tools { order: 1; gap: 8px; }
  .modal-wide .mx-help { display: none; }
  .modal-wide .mx-cal { order: 2; }
  .modal-wide .mx-result { order: 3; border-top: 0; padding-top: 0; }
  .modal-wide .mx-events { order: 4; margin-top: 0; }
  .modal-wide .mx-month { padding: 8px 6px; }
  .modal-wide .mx-grid .day { height: 38px; font-size: .95rem; }
  .res-hero { padding: 12px 14px; gap: 6px 14px; }
  .res-n { font-size: 2.3rem; }
  .res-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .res-tiles div { padding: 8px 9px; }
  .res-tiles dt { font-size: .72rem; }
  .res-tiles dd { font-size: 1.2rem; }
  .res-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev { grid-template-columns: 40px minmax(0, 1fr); }
  .ev-tag { grid-column: 2; }
  .day-detail > summary { padding: 8px 12px; }
}
@media (max-width: 640px) {
  .toolbar { gap: 4px 8px; padding: 6px 8px 6px 12px; }
  .toolbar .tb-form { display: flex; flex-wrap: wrap; gap: 0 14px; flex-basis: 100%; }
  .toolbar .tb-select { flex: 1 1 110px; min-width: 0; display: block; }
  .toolbar .tb-select .zs-sel, .toolbar .tb-select .zs-sel-btn { width: 100%; min-width: 0; }
  .toolbar .actions { margin-left: 0; flex: none; gap: 4px; }
  .toolbar .icon-btn { min-width: 38px; min-height: 38px; padding: 0 8px; }
  .legend { gap: 2px 10px; }
}
.sel-float .notice { flex-basis: 100%; order: 5; margin: 2px 0 0; padding: 6px 10px; font-size: .8rem; border-radius: 10px; text-align: left; }
@media (max-width: 640px) {
  .sel-float { flex-wrap: wrap; }
  .sel-float .sel-info { min-width: 0; flex: 1 1 0; }
}
@media (max-width: 640px) {
  .month-head { align-items: center; }
  .month-title a, a.month-count { display: inline-flex; align-items: center; min-height: 40px; }
  .month-count { padding-left: 8px; }
}
@media (max-width: 640px) {
  .planner-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planner-form > label:nth-of-type(3), .planner-form > label:nth-of-type(4), .planner-form > .only-long, .planner-form > .btn { grid-column: 1 / -1; }
  .team-add { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-add > label:first-of-type, .team-add > label:last-of-type, .team-add > .btn { grid-column: 1 / -1; }
}
