/* cryptolicit — o singura foaie de stil, fara dependinte externe. */
:root {
  --bg: #f5f7fa; --surface: #ffffff; --surface-2: #eef2f6; --ink: #0f172a; --ink-2: #334155; --muted: #5b6675;
  --line: #e2e8f0; --line-2: #cbd5e1; --accent: #059669; --accent-ink: #047857; --accent-soft: #d1fae5;
  --danger: #b91c1c; --danger-soft: #fee2e2; --warn: #a3470a; --warn-soft: #fef3c7;
  --navy: #0b1220; --navy-2: #131d33; --radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.18);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --surface: #121b2e; --surface-2: #182339; --ink: #e5e9f0; --ink-2: #c3cbd8; --muted: #8e9bb0;
    --line: #1f2b45; --line-2: #2c3a57; --accent: #34d399; --accent-ink: #6ee7b7; --accent-soft: #0f2f27;
    --danger: #f87171; --danger-soft: #3b1414; --warn: #fbbf24; --warn-soft: #3a2a08;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
  .btn, .big-search button, .adm-login button, .chip--on { color: #0b1220; }
  a.chip--on:hover { color: #0b1220; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Linkurile din text curent se disting si fara culoare (WCAG 1.4.1): subliniate. */
p a, dd a, .note a, .consent-text a, .chg-what a, .lead a, .site-foot p a, .foot-legal a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 750; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.6rem); margin-top: 2.2rem; }
h3 { font-size: 1.1rem; margin-top: 1.4rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); font-size: .92em; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.8rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1.5rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ── antet ── */
.site-head { background: var(--navy); color: #e5e9f0; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.head-inner { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 8px 4px; margin-left: -4px; color: inherit; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-check { stroke: var(--accent); }
.wordmark b { color: #34d399; font-weight: 800; }
.head-search { display: flex; flex: 1; max-width: 420px; margin-left: auto; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; overflow: hidden; }
.head-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; padding: 9px 12px; font: inherit; font-size: .95rem; }
.head-search input::placeholder { color: rgba(255,255,255,.55); }
.head-search button { background: transparent; border: 0; color: #fff; padding: 0 12px; cursor: pointer; display: flex; align-items: center; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; border-radius: 8px; color: #fff; }
.nav { display: flex; gap: 4px; }
.nav a { color: rgba(255,255,255,.85); padding: 8px 11px; border-radius: 8px; font-weight: 600; font-size: .93rem; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
@media (max-width: 1000px) {
  .head-inner { position: relative; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; right: 20px; top: 56px; background: var(--navy-2); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 8px; flex-direction: column; min-width: 210px; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
  .nav-open .nav { display: flex; }
  .nav a { padding: 11px 14px; }
}
@media (max-width: 640px) {
  .head-inner { gap: 8px; }
  .brand span.wordmark { display: none; }
  .head-search { max-width: none; }
}

/* ── erou ── */
.hero { padding: 3.2rem 0 2rem; text-align: center; }
.hero h1 { max-width: 20ch; margin: 0 auto .5em; }
.hero .lead { margin: 0 auto 1.6rem; }
.big-search { display: flex; max-width: 640px; margin: 0 auto; background: var(--surface); border: 2px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.big-search:focus-within { border-color: var(--accent); }
.big-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 15px 18px; font: inherit; font-size: 1.08rem; color: var(--ink); }
.big-search button { border: 0; background: var(--accent-ink); color: #fff; font: inherit; font-weight: 700; padding: 0 22px; cursor: pointer; }
.big-search button:hover { filter: brightness(1.05); }
.hero-hint { margin-top: .9rem; }
.hero-hint a { margin: 0 4px; }

/* ── KPI ── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 1.5rem 0; }
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi:last-child:nth-child(odd) { grid-column: span 2; } }
@media (min-width: 561px) and (max-width: 1000px) { .kpis--5 { grid-template-columns: repeat(3, 1fr); } .kpis--5 .kpi:nth-child(4) { grid-column: span 1; } }
@media (min-width: 1001px) { .kpis--5 { grid-template-columns: repeat(5, 1fr); } }
.kpi { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi-value { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--accent-ink); }
.kpi-label { font-weight: 600; margin-top: 4px; }
.kpi-sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }

/* ── ecusoane ── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 7px; border-radius: 999px; font-weight: 700; font-size: .82rem; white-space: nowrap; line-height: 1.5; }
.badge svg { width: 15px; height: 15px; flex: none; }
.badge--ok { background: var(--accent-soft); color: var(--accent-ink); }
.badge--bad { background: var(--danger-soft); color: var(--danger); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--muted { background: var(--surface-2); color: var(--muted); }
.badge--big { font-size: 1.05rem; padding: 8px 16px 8px 12px; }
.badge--big svg { width: 20px; height: 20px; }

/* ── verdict ── */
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 16px 20px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 20px 22px; margin: 1.2rem 0 1.8rem; box-shadow: var(--shadow); }
.verdict--bad { border-left-color: var(--danger); }
.verdict--warn { border-left-color: var(--warn); }
.verdict--muted { border-left-color: var(--line-2); }
.verdict-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.verdict-icon svg { width: 30px; height: 30px; }
.verdict--bad .verdict-icon { background: var(--danger-soft); color: var(--danger); }
.verdict--warn .verdict-icon { background: var(--warn-soft); color: var(--warn); }
.verdict--muted .verdict-icon { background: var(--surface-2); color: var(--muted); }
.verdict-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 4px; }
.verdict p { margin: 0; color: var(--ink-2); }
@media (max-width: 520px) { .verdict { grid-template-columns: 1fr; } }

/* ── liste de entitati ── */
.rows { list-style: none; padding: 0; margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 14px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row-main { color: inherit; min-width: 0; }
.row-main:hover { text-decoration: none; }
.row-main:hover .row-name { text-decoration: underline; }
.row-name { font-weight: 650; display: block; }
.row-legal { display: block; color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-state { color: var(--muted); font-size: .9rem; white-space: nowrap; }
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr auto; }
  .row-state { grid-column: 1; font-size: .82rem; }
  .row-badge { grid-row: 1 / span 2; }
}

/* ── carduri ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 1rem 0 1.5rem; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: inherit; }
a.card:hover { border-color: var(--accent); text-decoration: none; }
.card-title { font-weight: 700; margin-bottom: 4px; }
.card-meta { color: var(--muted); font-size: .88rem; }
.card-n { font-size: 1.5rem; font-weight: 800; color: var(--accent-ink); letter-spacing: -.02em; }

/* ── tabele de fapte ── */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0 0 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.facts dt { color: var(--muted); font-size: .9rem; padding-top: 2px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px 0; } .facts dd { margin-bottom: 10px; } }

.services { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 10px; }
.svc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 12px; align-items: start; }
.svc-code { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-family: var(--mono); }
.svc-name { font-weight: 700; }
.svc-name a { color: inherit; }
.svc-desc { color: var(--ink-2); font-size: .92rem; grid-column: 2 / span 2; }
.svc-cou { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.svc--off { background: var(--surface-2); border-style: dashed; }
.services--past .svc:not(.svc--off) { border-style: dashed; }
.services--past .svc-code { background: var(--warn-soft); color: var(--warn); }
.svc--off .svc-code { background: var(--surface); color: var(--muted); }
.svc--off .svc-name a, .svc--off .svc-desc, .svc--off .svc-cou { color: var(--muted); }

/* ── grila de tari ── */
.cgrid { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.cgrid a { display: block; text-align: center; padding: 7px 4px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .85rem; font-weight: 600; }
.cgrid .on a { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.cgrid .home a { outline: 2px solid var(--accent); }
.cgrid a:hover { text-decoration: none; border-color: var(--accent); }

/* ── bare ── */
.bars { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr 52px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bar-suffix { color: var(--muted); font-weight: 400; font-size: .85rem; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 480px) { .bar-row { grid-template-columns: minmax(90px, 130px) 1fr 44px; gap: 8px; } }

/* ── tabel ── */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
th { border-top: 0; background: var(--surface-2); font-weight: 700; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── schimbari (feed) ── */
.changes { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.chg { display: grid; grid-template-columns: 96px 1fr; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chg-date { color: var(--muted); font-size: .88rem; white-space: nowrap; padding-top: 2px; }
.chg-what { color: var(--ink-2); font-size: .9rem; }
.chg-kind { font-weight: 700; margin-right: 6px; }
.chg-kind--added { color: var(--accent-ink); }
.chg-kind--removed, .chg-kind--withdrawn { color: var(--danger); }
.chg-kind--changed { color: var(--warn); }
@media (max-width: 480px) { .chg { grid-template-columns: 1fr; gap: 2px; } }

/* ── chips ── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1rem; padding: 0; list-style: none; }
.chip { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--ink-2); }
a.chip:hover { border-color: var(--accent); text-decoration: none; color: var(--accent-ink); }
.chip--on { background: var(--accent-ink); color: #fff; border-color: var(--accent-ink); }
a.chip--on:hover { color: #fff; }

/* ── butoane, formulare ── */
.btn { display: inline-block; background: var(--accent-ink); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.form { max-width: 560px; display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; font-weight: 600; }
.form input, .form textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--ink); }
.form textarea { min-height: 140px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); margin: 0 0 1rem; }
.notice--bad { background: var(--danger-soft); color: var(--danger); }

/* ── note ── */
.note { background: var(--surface-2); border-left: 4px solid var(--line-2); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 0 0 1.4rem; color: var(--ink-2); }
.note--warn { border-left-color: var(--warn); background: var(--warn-soft); }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: var(--ink-2); }

/* ── crumbs ── */
.crumbs { margin: 1.2rem 0 .4rem; font-size: .88rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; color: var(--muted); margin: 0 6px 0 2px; }
.crumbs span { color: var(--muted); }

/* ── sectiuni cu doua coloane ── */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
.cols > * { min-width: 0; }

/* ── subsol ── */
.site-foot { margin-top: 4rem; background: var(--navy); color: #c3cbd8; padding: 40px 0 28px; }
.site-foot a { color: #f3f5f8; }
.site-foot .brand { font-size: 1.15rem; color: #fff; }
.site-foot .wordmark b { color: #34d399; }
.foot-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot-cols ul { list-style: none; padding: 0; margin: 8px 0 0; }
.foot-cols li { margin: 4px 0; }
.foot-cols strong { color: #fff; }
.foot-about .muted { color: #b3bccb; }
.foot-legal { color: #b3bccb; margin-top: 22px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
@media (max-width: 800px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-cols { grid-template-columns: 1fr; } }

/* ── consimtamant ── */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; display: flex; gap: 16px; align-items: center; box-shadow: 0 16px 40px rgba(0,0,0,.25); z-index: 60; }
.consent-text { flex: 1; font-size: .93rem; }
.consent-btn { display: flex; gap: 8px; }
@media (max-width: 600px) { .consent { flex-direction: column; align-items: stretch; padding: 12px 14px; gap: 10px; left: 8px; right: 8px; bottom: 8px; } .consent-text { font-size: .86rem; } .consent-btn { justify-content: flex-end; } .consent .btn { padding: 8px 14px; } }

/* ── admin ── */
.adm-body { background: var(--bg); }
.adm-side { position: fixed; left: 0; top: 0; bottom: 0; width: 230px; background: var(--navy); color: #e5e9f0; display: flex; flex-direction: column; padding: 18px 12px; z-index: 40; }
.adm-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; padding: 6px 8px 18px; }
.adm-brand small { display: block; font-weight: 500; color: #8e9bb0; font-size: .75rem; }
.adm-nav a, .adm-side-bottom a, .adm-side-bottom button { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.85); padding: 9px 10px; border-radius: 8px; font-weight: 600; font-size: .93rem; background: none; border: 0; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.adm-nav a:hover, .adm-nav a.active, .adm-side-bottom a:hover, .adm-side-bottom button:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.adm-nav svg, .adm-side-bottom svg { width: 18px; height: 18px; }
.adm-side-bottom { margin-top: auto; }
.adm-main { margin-left: 230px; padding: 20px 28px 40px; }
.adm-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.adm-top h1 { margin: 0; font-size: 1.5rem; }
.adm-menu-btn { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px; color: var(--ink); }
.adm-pill { margin-left: auto; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.adm-pill--warn { background: var(--danger-soft); color: var(--danger); }
.adm-login { max-width: 380px; margin: 60px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.adm-login form { display: grid; gap: 12px; }
.adm-login label { display: grid; gap: 4px; font-weight: 600; }
.adm-login input[type=email], .adm-login input[type=password] { font: inherit; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--ink); }
.adm-login .adm-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.adm-login button { background: var(--accent-ink); color: #fff; border: 0; border-radius: 9px; padding: 11px; font: inherit; font-weight: 700; cursor: pointer; }
.adm-error { background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: 8px; }
@media (max-width: 900px) {
  .adm-side { transform: translateX(-100%); transition: transform .2s; }
  .sb-open .adm-side { transform: none; }
  .adm-main { margin-left: 0; padding: 16px; }
  .adm-menu-btn { display: block; }
}
