/* ==========================================================================
   Monitora – sistem de design accesibil (WCAG 2.2 AA)
   Text de bază 17px, controale de 48px, contrast ≥ 4,5:1 pentru text și ≥ 3:1 pentru contururi.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --s-0: #ffffff; --s-25: #fbfcfd; --s-50: #f8fafc; --s-100: #f1f5f9; --s-150: #eaeff5; --s-200: #e2e8f0;
  --s-300: #cbd5e1; --s-400: #94a3b8; --s-500: #5b6b80; --s-600: #475569; --s-700: #334155;
  --s-800: #1e293b; --s-900: #0f172a;
  --field-line: #6b7a90;            /* contur câmpuri: 4,4:1 pe alb */
  --navy: #0b1220; --navy-line: rgba(255, 255, 255, .09);
  --c-50: #ecfeff; --c-100: #cffafe; --c-500: #06b6d4; --c-600: #0891b2; --c-700: #0e7490; --c-800: #155e75;
  --ok: #047857; --ok-bg: #ecfdf5; --ok-line: #6ee7b7; --ok-solid: #10b981;
  --warn: #92400e; --warn-bg: #fffbeb; --warn-line: #fcd34d; --warn-solid: #f59e0b;
  --err: #b91c1c; --err-bg: #fef2f2; --err-line: #fca5a5; --err-solid: #ef4444;
  --info: #075985; --info-bg: #f0f9ff; --info-line: #7dd3fc;
  --line: var(--s-200); --muted: var(--s-500); --blue: var(--c-700); --text: var(--s-800);
  --r-sm: 8px; --r-md: 10px; --r-lg: 12px;
  --sh-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-md: 0 4px 12px -2px rgba(15, 23, 42, .08), 0 2px 4px -2px rgba(15, 23, 42, .05);
  --sh-lg: 0 20px 40px -12px rgba(15, 23, 42, .25), 0 0 0 1px rgba(15, 23, 42, .05);
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--c-700);
  --t: 140ms cubic-bezier(.2, .6, .2, 1);
  --sidebar: 268px; --topbar: 64px; --ctl: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--s-50); color: var(--s-800);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--c-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--t); }
a:hover { color: var(--c-800); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c-700); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--s-900); margin: 0; letter-spacing: -.012em; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.25; margin-bottom: 6px; }
h2 { font-size: 20px; font-weight: 650; margin: 30px 0 12px; line-height: 1.35; }
h3 { font-size: 18px; font-weight: 650; }
p { margin: 0 0 14px; }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.num, .stat, .kpi-value, table td.n { font-variant-numeric: tabular-nums; }
.muted { color: var(--s-500); }
.small { font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 100; background: var(--s-900); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 650; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ==========================================================================
   Structura: bară laterală + antet
   ========================================================================== */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40; background: var(--navy); color: #c3cddc;
  display: flex; flex-direction: column; border-right: 1px solid #060b16;
}
.sb-brand { display: flex; align-items: center; gap: 12px; height: var(--topbar); padding: 0 20px; color: #fff; font-weight: 700; font-size: 19px; border-bottom: 1px solid var(--navy-line); text-decoration: none; }
.sb-brand:hover { color: #fff; }
.sb-brand img { border-radius: 8px; }
.sb-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sb-section { font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #9aa8bf; padding: 16px 12px 6px; }
.sb-section:first-child { padding-top: 4px; }
.sb-link {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; margin: 2px 0;
  color: #dbe3ee; border-radius: var(--r-sm); font-weight: 550; font-size: 16.5px; text-decoration: none;
  transition: background var(--t), color var(--t);
}
.sb-link .icon { color: #9aa8bf; }
.sb-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-link[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
.sb-link[aria-current="page"] .icon { color: #67e8f9; }
.sb-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 3px; background: var(--c-500); }
.sb-link:focus-visible { outline-color: #67e8f9; }
.sb-count { margin-left: auto; min-width: 26px; padding: 0 7px; border-radius: 6px; font-size: 14px; font-weight: 650; line-height: 24px; text-align: center; background: rgba(255, 255, 255, .12); color: #fff; font-variant-numeric: tabular-nums; }
.sb-count.hot { background: #0e7490; }
.sb-close { display: none !important; margin: 12px 12px 0; }
.sb-note { color: #dbe3ee; padding: 8px 12px; margin: 0; font-size: 16px; }
.sb-foot { border-top: 1px solid var(--navy-line); padding: 10px 12px 14px; }
.sb-foot form { margin: 0; }
.sb-foot button.sb-link { width: 100%; border: 0; background: none; font: inherit; font-weight: 550; font-size: 16.5px; cursor: pointer; text-align: left; }

.main { margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 32px;
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--s-200);
}
.topbar .where { font-weight: 650; color: var(--s-900); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.topbar .who { display: flex; align-items: center; gap: 10px; color: var(--s-700); font-size: 16px; }
.topbar .who .n { font-weight: 600; color: var(--s-900); }
.topbar form { margin: 0; }
.nav-toggle { display: none !important; }
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 36px 8px; flex: 1; }
footer.foot { max-width: 1280px; width: 100%; margin: 28px auto 0; padding: 20px 36px 30px; color: var(--s-500); font-size: 15px; }
footer.foot a { color: var(--s-600); }
footer.foot strong { color: var(--s-700); font-weight: 650; }
.nav-backdrop { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .sub { color: var(--s-600); margin: 0; font-size: 18px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 14px; text-decoration: none; min-height: 44px; }
.back:hover { text-decoration: underline; }
.lead { font-size: 18px; color: var(--s-700); max-width: 760px; }

/* ==========================================================================
   Butoane (48px, mereu cu text)
   ========================================================================== */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: var(--ctl); padding: 0 22px;
  border-radius: var(--r-sm); border: 2px solid var(--s-900); background: var(--s-900); color: #fff;
  font: inherit; font-size: 17px; font-weight: 650; cursor: pointer; text-decoration: none; line-height: 1.2; text-align: center;
  transition: background var(--t), border-color var(--t), box-shadow var(--t), transform var(--t), color var(--t);
}
.btn:hover { background: var(--s-700); border-color: var(--s-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn.primary { background: var(--c-700); border-color: var(--c-700); }
.btn.primary:hover { background: var(--c-800); border-color: var(--c-800); }
.btn.sec, .btn.secondary { background: #fff; color: var(--s-900); border-color: var(--field-line); }
.btn.sec:hover, .btn.secondary:hover { background: var(--s-100); color: var(--s-900); border-color: var(--s-700); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--s-700); }
.btn.ghost:hover { background: var(--s-100); color: var(--s-900); }
.btn.danger { background: #fff; color: var(--err); border-color: var(--err); }
.btn.danger:hover { background: var(--err-bg); color: #991b1b; border-color: #991b1b; }
.btn.danger.solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger.solid:hover { background: #991b1b; border-color: #991b1b; }
.btn.small, .btn.sm { min-height: 42px; padding: 0 16px; font-size: 16px; gap: 7px; }
.btn.big { min-height: 56px; padding: 0 28px; font-size: 18px; }
.btn.block { width: 100%; }
.btn.icon-only { width: var(--ctl); padding: 0; }
.btn.link { background: none; border: 0; color: var(--c-700); padding: 0; min-height: 0; text-decoration: underline; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ==========================================================================
   Carduri, panouri, KPI
   ========================================================================== */
.card, .panel { background: #fff; border: 1px solid var(--s-200); border-radius: var(--r-md); box-shadow: var(--sh-xs); padding: 24px; margin-bottom: 22px; }
.panel { padding: 0; display: flex; flex-direction: column; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--s-150); }
.panel-h h2, .panel-h h3 { margin: 0; font-size: 18px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.panel-h h2 .icon, .panel-h h3 .icon { color: var(--s-500); }
.panel-h .link { font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.panel-b { padding: 20px 22px; flex: 1; }
.panel-b.flush { padding: 0; }
.panel-f { padding: 14px 22px; border-top: 1px solid var(--s-150); font-size: 16px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); margin-bottom: 22px; }
.grid > .card { margin: 0; }
.dash { display: grid; gap: 22px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.dash > * { margin: 0; min-width: 0; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

.kpis { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); margin-bottom: 22px; }
.kpi { position: relative; display: block; min-width: 0; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--s-200); border-radius: var(--r-md); padding: 18px 20px; color: inherit; box-shadow: var(--sh-xs); text-decoration: none; transition: border-color var(--t), box-shadow var(--t); }
a.kpi:hover { border-color: var(--s-400); box-shadow: var(--sh-md); color: inherit; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--s-600); font-size: 16px; font-weight: 600; }
.kpi-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--s-100); color: var(--s-600); }
.kpi-ic.ok { background: var(--ok-bg); color: var(--ok); } .kpi-ic.warn { background: var(--warn-bg); color: var(--warn); }
.kpi-ic.err { background: var(--err-bg); color: var(--err); } .kpi-ic.cyan { background: var(--c-50); color: var(--c-700); }
.kpi-value { font-size: 32px; font-weight: 700; color: var(--s-900); letter-spacing: -.02em; line-height: 1.15; margin-top: 10px; }
.kpi-foot { margin-top: 6px; font-size: 15px; color: var(--s-600); }
.stat { font-size: 28px; font-weight: 700; color: var(--s-900); }

.progress { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--s-150); gap: 2px; }
.progress > span { display: block; height: 100%; transition: width 400ms ease; }
.progress .ok { background: var(--ok-solid); } .progress .warn { background: var(--warn-solid); }
.progress .err { background: var(--err-solid); } .progress .cyan { background: var(--c-600); } .progress .neutral { background: var(--s-400); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 16px; color: var(--s-700); }
.legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.legend b { color: var(--s-900); font-weight: 700; margin-left: 4px; font-variant-numeric: tabular-nums; }
.dot.ok { background: var(--ok-solid); } .dot.warn { background: var(--warn-solid); } .dot.err { background: var(--err-solid); }
.dot.cyan { background: var(--c-600); } .dot.neutral { background: var(--s-400); }
.big-pct { font-size: 34px; font-weight: 700; color: var(--s-900); font-variant-numeric: tabular-nums; }
.metric-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.divider { height: 1px; background: var(--s-150); margin: 20px 0; }

/* ==========================================================================
   Insigne și statusuri explicate
   ========================================================================== */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 11px; border-radius: 8px; font-size: 15px; font-weight: 650; white-space: nowrap; border: 1px solid var(--s-300); background: var(--s-50); color: var(--s-700); }
.badge .icon { width: 15px; height: 15px; vertical-align: 0; }
.badge.ok, .badge.success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.badge.warn, .badge.warning { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.badge.err, .badge.danger { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.badge.info { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.badge.cyan { background: var(--c-50); border-color: #67e8f9; color: var(--c-800); }
.explain { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.explain > div { flex: 1; min-width: 220px; color: var(--s-700); padding-top: 2px; }
.explain-ce { color: var(--s-900); }
.explain-faceti { color: var(--s-700); }

.ce-inseamna { margin-top: 8px; }
.ce-inseamna > summary { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; cursor: pointer; color: var(--c-700); font-weight: 600; font-size: 16px; list-style: none; border-radius: 6px; }
.ce-inseamna > summary::-webkit-details-marker { display: none; }
.ce-inseamna > summary:hover { text-decoration: underline; }
.ce-inseamna[open] > summary { color: var(--c-800); }
.ce-inseamna p { margin: 6px 0 4px; padding: 12px 14px; background: var(--info-bg); border: 1px solid var(--info-line); border-radius: var(--r-sm); color: #0c3b5c; font-size: 16px; }

/* ==========================================================================
   Tabele
   ========================================================================== */
.table-wrap { overflow-x: auto; position: relative; }  /* relative: textele ascunse pentru cititoare de ecran rămân în tabel */
.table-wrap:focus-visible { outline: 3px solid var(--c-700); outline-offset: 2px; }
iframe:focus, iframe:focus-visible, iframe.are-focus { outline: 3px solid var(--c-700); outline-offset: 3px; }
.card.table-wrap, .panel .table-wrap { padding: 0; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--s-150); vertical-align: middle; }
th { font-size: 15px; font-weight: 650; color: var(--s-700); background: var(--s-50); border-bottom: 1px solid var(--s-200); white-space: nowrap; }
thead th:first-child { border-top-left-radius: var(--r-md); } thead th:last-child { border-top-right-radius: var(--r-md); }
tbody tr { transition: background var(--t); }
tbody tr:hover { background: var(--s-25); }
tbody tr:last-child td { border-bottom: 0; }
td.actions, th.actions { text-align: right; white-space: nowrap; }
.cell-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-person .t { min-width: 0; line-height: 1.35; }
.cell-person .t .s { color: var(--s-600); font-size: 15px; }
.cell-person a, .row-link { color: var(--s-900); font-weight: 650; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: var(--s-100); color: var(--s-700); border: 1px solid var(--s-300); }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }

/* ==========================================================================
   Formulare
   ========================================================================== */
.field { margin-bottom: 22px; }
.field label, .field legend { display: block; font-size: 17px; font-weight: 650; color: var(--s-900); margin-bottom: 8px; }
.req { font-weight: 500; color: var(--s-600); font-size: 15px; margin-left: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%; min-height: var(--ctl); padding: 0 14px; border: 2px solid var(--field-line); border-radius: var(--r-sm);
  background: #fff; color: var(--s-900); font: inherit; font-size: 17px; transition: border-color var(--t), box-shadow var(--t);
}
textarea { min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 44px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
input:hover, select:hover, textarea:hover { border-color: var(--s-700); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-700) !important; box-shadow: 0 0 0 4px rgba(14, 116, 144, .25) !important; }
input::placeholder, textarea::placeholder { color: #6b7a90; }
input[disabled], input[readonly] { background: var(--s-100); color: var(--s-700); border-style: dashed; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); background: #fffafa; }
input[type=checkbox], input[type=radio] { accent-color: var(--c-700); width: 22px; height: 22px; vertical-align: -5px; margin: 0; }
.field > div > label { font-weight: 500; display: flex; align-items: center; gap: 10px; margin: 6px 0; min-height: 40px; }
.helptext { color: var(--s-600); font-size: 16px; margin-top: 8px; }
.helptext ul { margin: 4px 0 0; padding-left: 22px; }
.errorlist { list-style: none; margin: 8px 0 0; padding: 0; color: var(--err); font-size: 16px; font-weight: 600; }
.errorlist li::before { content: "⚠ "; }
.errorlist.nonfield, .form-error { background: var(--err-bg); border: 2px solid var(--err-line); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 18px; color: var(--err); font-weight: 600; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.form-narrow { max-width: 620px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.inline-form .field { margin: 0; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; padding: 16px 18px; }
.filters .field { margin: 0; min-width: 180px; }
.pw { display: flex; gap: 8px; } .pw input { flex: 1; } .pw .btn { flex: none; }
.caps { display: none; margin-top: 8px; color: var(--warn); font-weight: 600; font-size: 16px; }
.caps.on { display: block; }

/* lista de reguli pentru parolă, bifată pe măsură ce scrieți */
.rules { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.rules li { display: flex; gap: 10px; align-items: center; color: var(--s-700); font-size: 16px; }
.rules li .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--s-400); display: grid; place-items: center; flex: none; font-size: 13px; color: transparent; }
.rules li.ok { color: var(--ok); }
.rules li.ok .mark { background: var(--ok); border-color: var(--ok); color: #fff; }

/* alegerea fișierului – buton mare, în română */
.filepick:has(input:focus-visible) label.btn { box-shadow: var(--focus); }
.filepick { position: relative; border: 2px dashed var(--field-line); border-radius: var(--r-md); padding: 22px; background: var(--s-25); text-align: center; transition: border-color var(--t), background var(--t); }
.filepick.drag { border-color: var(--c-700); background: var(--c-50); }
.filepick .fp-hint { color: var(--s-600); margin: 10px 0 0; font-size: 16px; }
.js .filepick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filepick input[type=file] { font-size: 16px; }
.filepick .fp-chosen { display: none; text-align: left; margin-top: 16px; padding: 14px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--s-200); align-items: center; gap: 14px; }
.filepick .fp-chosen.on { display: flex; }
.filepick .fp-thumb { width: 64px; height: 64px; flex: none; border-radius: 8px; background: var(--s-100); display: grid; place-items: center; overflow: hidden; color: var(--s-600); }
.filepick .fp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.filepick .fp-name { font-weight: 650; color: var(--s-900); word-break: break-all; }
.filepick .fp-meta { color: var(--s-600); font-size: 15px; }
.filepick .fp-err { display: none; margin-top: 12px; text-align: left; }
.filepick .fp-err.on { display: block; }

/* ==========================================================================
   Mesaje în pagină, ferestre modale
   ========================================================================== */
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--info-bg); border: 1px solid var(--info-line); color: #0c3b5c; border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 20px; }
.notice .icon { color: var(--info); margin-top: 3px; flex: none; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); color: #713f12; } .notice.warn .icon { color: var(--warn); }
.notice.err { background: var(--err-bg); border-color: var(--err-line); color: #7f1d1d; } .notice.err .icon { color: var(--err); }
.notice.ok { background: var(--ok-bg); border-color: var(--ok-line); color: #064e3b; } .notice.ok .icon { color: var(--ok); }

.alerts { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); border: 2px solid; font-size: 17px; font-weight: 550; animation: alert-in 220ms ease; }
.alert .icon { margin-top: 3px; flex: none; }
.alert .txt { flex: 1; }
.alert.success { background: var(--ok-bg); border-color: var(--ok-line); color: #064e3b; }
.alert.error { background: var(--err-bg); border-color: var(--err-line); color: #7f1d1d; }
.alert.info, .alert.warning { background: var(--info-bg); border-color: var(--info-line); color: #0c3b5c; }
.alert-close { border: 0; background: none; cursor: pointer; color: inherit; font: inherit; font-size: 15px; font-weight: 650; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px; border-radius: 6px; text-decoration: underline; }
.alert-close:hover { background: rgba(0, 0, 0, .05); }
@keyframes alert-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: var(--sh-lg); width: min(520px, calc(100vw - 32px)); color: var(--s-800); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .55); }
dialog.modal[open] { animation: modal-in 180ms cubic-bezier(.2, .7, .2, 1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-b { padding: 26px 26px 8px; display: flex; gap: 16px; }
.modal-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--warn-bg); color: var(--warn); }
.modal-b h2 { margin: 4px 0 8px; font-size: 21px; }
.modal-b p { color: var(--s-700); margin: 0; font-size: 17px; }
.modal-f { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 22px 26px 24px; }

/* ==========================================================================
   Liste, pași, cronologie, stări goale
   ========================================================================== */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--s-150); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t1 { color: var(--s-900); font-weight: 650; }
.list .t2 { color: var(--s-600); font-size: 15.5px; }
.date-chip { width: 52px; flex: none; text-align: center; border: 1px solid var(--s-300); border-radius: 9px; overflow: hidden; line-height: 1.1; background: #fff; }
.date-chip .m { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-800); background: var(--c-50); padding: 4px 0; }
.date-chip .d { font-size: 20px; font-weight: 700; color: var(--s-900); padding: 4px 0 5px; font-variant-numeric: tabular-nums; }

/* carduri de alegere (radio mari, cu titlu și explicație) */
.choices { display: grid; gap: 10px; }
label.choice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 2px solid var(--field-line); border-radius: var(--r-md); background: #fff; cursor: pointer; font-weight: 400; margin: 0; transition: border-color var(--t), background var(--t); }
label.choice:hover { border-color: var(--s-900); }
label.choice input { margin-top: 3px; flex: none; }
label.choice .ch-t { display: block; font-weight: 700; color: var(--s-900); font-size: 18px; }
label.choice .ch-d { display: block; color: var(--s-700); margin-top: 2px; }
label.choice:has(input:checked) { border-color: var(--c-700); background: var(--c-50); box-shadow: 0 0 0 3px rgba(14, 116, 144, .2); }
label.choice:has(input:focus-visible) { outline: 3px solid var(--c-700); outline-offset: 3px; }
.faq .panel-b { padding-top: 8px; padding-bottom: 8px; }
.faq-item { border-bottom: 1px solid var(--s-150); }
.faq-item:last-child { border-bottom: 0; }
.faq-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 0; font-weight: 650; color: var(--s-900); }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--c-700); flex: none; width: 28px; text-align: center; }
.faq-item[open] > summary::after { content: "−"; }
.faq-item > summary:hover { color: var(--c-800); }
.faq-item p { margin: 0 0 14px; color: var(--s-700); }
.exemple { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.exemple .btn { border: 1px solid var(--s-300); font-weight: 500; text-align: left; white-space: normal; min-height: 40px; }
.daypick { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.daypick .btn { justify-content: space-between; gap: 12px; text-align: left; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.daypick .btn .muted { font-size: 15px; margin-left: 0 !important; }
@media (max-width: 640px) { .daypick .btn { flex-direction: column; align-items: flex-start; gap: 0; } }
.btn.primary .muted, .btn:not(.sec):not(.ghost):not(.danger) .muted { color: #e6f6fa; }
dl.review { grid-template-columns: minmax(110px, max-content) 1fr; }
dl.review dd a { display: inline-block; margin-top: 6px; font-weight: 600; }

/* indicator de progres pentru ghiduri pas cu pas */
.wizard-now { margin: 0 0 8px; color: var(--s-700); font-size: 16px; }
.wizard { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; max-width: 980px; }
.wizard li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 2px solid var(--s-200); background: #fff; color: var(--s-600); font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.wizard .w-nr { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--s-100); border: 2px solid var(--s-300); color: var(--s-700); font-weight: 700; }
.wizard li.done { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.wizard li.done .w-nr { background: var(--ok); border-color: var(--ok); color: #fff; }
.wizard li.current { color: var(--s-900); border-color: var(--c-700); background: var(--c-50); }
.wizard li.current .w-nr { background: var(--c-700); border-color: var(--c-700); color: #fff; }
@media (max-width: 640px) { .wizard li:not(.current) .w-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wizard { grid-template-columns: repeat(4, auto); justify-content: start; } .wizard li.current { grid-column: 1 / -1; order: -1; } }

/* pașii de urmat (checklist) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: pas; }
.steps > li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 22px; border-bottom: 1px solid var(--s-150); }
.steps > li:last-child { border-bottom: 0; }
.steps .nr { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--s-100); color: var(--s-700); border: 2px solid var(--s-300); }
.steps li.done .nr { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.current .nr { background: var(--c-700); border-color: var(--c-700); color: #fff; }
.steps .body { flex: 1; min-width: 0; }
.steps .body h3 { margin: 6px 0 4px; }
.steps .body p { margin: 0 0 10px; color: var(--s-700); }
.steps li.done .body h3 { color: var(--ok); }

.timeline { list-style: none; margin: 0; padding: 6px 22px 10px; }
.timeline li { position: relative; padding: 12px 0 12px 30px; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--s-200); }
.timeline li:first-child::before { top: 18px; } .timeline li:last-child::before { bottom: calc(100% - 18px); }
.timeline .tl-dot { position: absolute; left: 2px; top: 15px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--s-400); }
.timeline .tl-dot.ok { border-color: var(--ok-solid); } .timeline .tl-dot.warn { border-color: var(--warn-solid); }
.timeline .tl-dot.err { border-color: var(--err-solid); } .timeline .tl-dot.cyan { border-color: var(--c-600); }
.timeline .tl-t { color: var(--s-800); font-size: 16px; line-height: 1.45; }
.timeline .tl-t b { color: var(--s-900); font-weight: 650; }
.timeline .tl-m { color: var(--s-600); font-size: 15px; margin-top: 2px; }
.timeline .tl-c { margin-top: 6px; background: var(--s-50); border: 1px solid var(--s-200); border-radius: var(--r-sm); padding: 10px 12px; white-space: pre-wrap; color: var(--s-800); font-size: 16px; }

.empty { text-align: center; padding: 36px 22px; color: var(--s-600); }
.empty .empty-ic { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; display: grid; place-items: center; background: var(--s-100); color: var(--s-600); }
.empty .empty-t { color: var(--s-900); font-weight: 650; margin-bottom: 4px; font-size: 18px; }
.empty .empty-s { margin: 0 auto; max-width: 420px; }
.empty .btn { margin-top: 16px; }

dl.kv { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 12px 24px; margin: 0; }
dl.kv dt { color: var(--s-600); } dl.kv dd { margin: 0; color: var(--s-900); font-weight: 550; overflow-wrap: anywhere; min-width: 0; }

/* ==========================================================================
   Pagini existente (clase păstrate)
   ========================================================================== */
.cols { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); align-items: start; }
.cols > .card { margin-bottom: 0; }
.split { display: grid; gap: 22px; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); align-items: start; }
.secret { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 26px; letter-spacing: 2px; background: var(--s-50); border: 2px dashed var(--field-line); padding: 14px 18px; display: inline-block; border-radius: var(--r-sm); user-select: all; color: var(--s-900); }
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.clamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-sm { display: none; }

table.cal { table-layout: fixed; min-width: 720px; background: #fff; border: 1px solid var(--s-200); border-radius: var(--r-md); overflow: hidden; }
table.cal th { text-align: center; padding: 10px; border-bottom: 1px solid var(--s-200); border-radius: 0; }
table.cal td { border-right: 1px solid var(--s-150); border-bottom: 1px solid var(--s-150); padding: 0; vertical-align: top; }
table.cal td:last-child { border-right: 0; } table.cal tr:last-child td { border-bottom: 0; }
table.cal tbody tr:hover { background: transparent; }
.daylink { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 110px; padding: 8px; color: inherit; text-decoration: none; transition: background var(--t); }
.daylink:hover { background: var(--c-50); color: inherit; }
.daylink .num { font-weight: 700; font-size: 16px; color: var(--s-800); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.daylink .small { font-size: 14px; color: var(--s-600); line-height: 1.3; }
.daylink .tag { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 650; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--s-300); background: var(--s-50); color: var(--s-700); }
.tag.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.tag.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.tag.me { color: var(--c-800); background: var(--c-50); border-color: #67e8f9; }
table.cal td.out { background: var(--s-50); }  /* zilele din altă lună: atenuate prin fundal, nu prin transparență (contrast) */
table.cal td.out .daylink .num { color: var(--s-500); font-weight: 500; }
table.cal td.today .num { background: var(--s-900); color: #fff; }
table.cal td.st-rezervata { background: repeating-linear-gradient(-45deg, #fbfcfd, #fbfcfd 6px, #f1f4f8 6px, #f1f4f8 12px); }
table.cal td.st-nelucratoare { background: var(--s-50); }
label.slot { display: inline-flex; gap: 10px; align-items: center; border: 2px solid var(--field-line); border-radius: var(--r-sm); min-height: var(--ctl); padding: 0 16px; cursor: pointer; font-weight: 650; font-size: 17px; background: #fff; font-variant-numeric: tabular-nums; transition: border-color var(--t), background var(--t); }
label.slot:hover { border-color: var(--s-900); }
label.slot:has(input:checked) { border-color: var(--c-700); background: var(--c-50); color: var(--c-800); box-shadow: 0 0 0 3px rgba(14, 116, 144, .25); }

/* ==========================================================================
   Autentificare
   ========================================================================== */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--s-100); }
.auth-card { background: #fff; width: 100%; max-width: 480px; border: 1px solid var(--s-200); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--sh-md); }
.auth-card h1 { text-align: center; font-size: 26px; }
.auth-card .sub { text-align: center; color: var(--s-700); margin: 0 0 24px; font-size: 18px; }
.brand-auth { text-align: center; margin-bottom: 12px; }
.brand-auth img { display: inline-block; border-radius: 14px; }
.brand-auth .name { font-size: 24px; font-weight: 750; color: var(--s-900); margin-top: 8px; }
.auth-card .credit { margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--s-150); text-align: center; color: var(--s-600); font-size: 15px; }
.auth-card .credit a { color: var(--s-600); }
.auth-card .credit strong { color: var(--s-700); }
.auth-help { margin-top: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform 220ms cubic-bezier(.2, .7, .2, 1); }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--sh-lg); }
  .app.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15, 23, 42, .5); }
  .main { margin-left: 0; }
  .nav-toggle { display: inline-flex !important; }
  .sb-close { display: inline-flex !important; color: var(--s-900); }
  .topbar { padding: 0 14px; gap: 10px; }
  .page { padding: 22px 16px 8px; }
  footer.foot { padding: 18px 16px 26px; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .kpis { grid-template-columns: 1fr !important; } }
@media (max-width: 640px) {
  .topbar .who .meta { display: none; }
  .topbar .where { font-size: 17px; }
  h1 { font-size: 25px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 14px; } .kpi-value { font-size: 26px; } .kpi-top { font-size: 15px; }
  th, td { padding: 12px; }
  .panel-h, .panel-b, .list > li, .steps > li { padding-left: 16px; padding-right: 16px; }
  .auth-card { padding: 26px 20px; }
  .hide-sm { display: none; } .show-sm { display: block; }
  .list > li { flex-wrap: wrap; } .list > li .grow { flex: 1 1 160px; } .list > li.stack .grow { flex-basis: 100%; }
  .page-head .actions { width: 100%; } .page-head .actions .btn { flex: 1 1 100%; }
  .form-actions .btn { flex: 1 1 100%; }
  .month-pick { width: 100%; } .month-pick select { flex: 1; }
  dl.kv, dl.review { grid-template-columns: 1fr; gap: 2px; } dl.kv dt { margin-top: 10px; }
  .kpi-top { flex-wrap: wrap; }
}
