/* ─────────────────────────────────────────────────────────────────────
   Stiluri generale. Mobile-first, două teme (albă / neagră) prin variabile.
   Culorile brandului și ale secțiunilor (--brand*, --bani*, --doc*, --copii*, --node, .s-<cheie>)
   NU sunt aici: se generează din config/site.php (vezi theme_css() în lib/helpers.php).
   ───────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #111827;
  --muted: #4b5563;
  --border: #dde2ea;
  --focus: #1e63d6;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 18px rgba(16, 24, 40, .06);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #151b23;
  --surface-2: #1c242e;
  --text: #e8edf3;
  --muted: #a5b0bd;
  --border: #2a3340;
  --focus: #8db8ff;
  --shadow: none;
}

/* ── Bază ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
/* Fără zoom la dublu-tap pe telefon (zoom-ul cu două degete rămâne). */
a, button, input, select, textarea, label, summary { touch-action: manipulation; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 1rem/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
}

main { flex: 1; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }

a { color: var(--accent-ink, var(--brand-ink)); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: .12em; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: .75rem 1rem; border-radius: 10px;
  background: var(--brand); color: var(--brand-on); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ── Butoane ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.25rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  color: var(--accent-ink, var(--brand-ink)); background: var(--surface);
  border: 1.5px solid var(--accent, var(--brand)); border-radius: 12px;
}
.btn:hover { background: var(--accent-soft, var(--brand-soft)); }
.btn--primary { color: var(--accent-on, var(--brand-on)); background: var(--accent, var(--brand)); }
.btn--primary:hover { background: var(--accent, var(--brand)); filter: brightness(.94); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.icon-btn .icon { width: 22px; height: 22px; }

/* ── Logo ─────────────────────────────────────────────────────────── */

.brand { display: inline-flex; text-decoration: none; color: var(--text); }
.logo { display: inline-flex; align-items: center; gap: .5rem; line-height: 1; }
.logo__mark { width: 38px; height: 38px; flex: none; }
.logo__text { font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; color: var(--text); }
.logo__accent { color: var(--brand-ink); }
.logo--mono { color: var(--text); }
.logo--mono .logo__text, .logo--mono .logo__accent { color: inherit; }
.logo--reverse { color: #fff; }
.logo--reverse .logo__text, .logo--reverse .logo__accent { color: #fff; }

.logo-demo { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.logo-demo__cell {
  margin: 0; padding: 32px 16px; display: grid; justify-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.logo-demo__cell--brand { background: var(--brand); border-color: var(--brand); }
.logo-demo__cell figcaption { font-size: .8rem; color: var(--muted); }
.logo-demo__cell--brand figcaption { color: #fff; }

/* ── Antet și navigare ────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.header__bar { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.header__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header__tools .header__auth { min-height: 40px; padding: 0 .85rem; font-size: .9rem; white-space: nowrap; border-radius: 10px; }
@media (max-width: 480px) {
  .header__bar { gap: 8px; }
  .header__tools { gap: 6px; }
  .header__tools .header__auth { min-height: 36px; padding: 0 .55rem; font-size: .8rem; }
  .header__bar .logo__mark { width: 30px; height: 30px; }
  .header__bar .logo__text { font-size: 1.1rem; }
  .header__tools .menu-btn { width: 38px; height: 38px; }
}

.nav { display: none; }
.nav__list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav__link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  color: var(--text); font-weight: 600; text-decoration: none;
  border: 0; border-radius: 999px;
}
.nav__link:hover { background: var(--accent-soft); }
.nav__link[aria-current] { background: var(--accent-soft); }
.nav__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* Comutator alb / negru */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.theme-toggle__opt {
  display: grid; place-items: center; width: 38px; height: 36px;
  color: var(--muted); border-radius: 999px;
}
.theme-toggle__opt .icon { width: 20px; height: 20px; }
:root[data-theme="light"] .theme-toggle__opt--light,
:root[data-theme="dark"] .theme-toggle__opt--dark { background: var(--brand); color: var(--brand-on); }

/* Hamburger + meniu telefon */
.menu-btn .icon--close { display: none; }
.menu-btn[aria-expanded="true"] .icon--open { display: none; }
.menu-btn[aria-expanded="true"] .icon--close { display: block; }

.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
}
.acc { border-bottom: 1px solid var(--border); }
.acc:last-child { border-bottom: 0; }
.acc__head { display: flex; align-items: center; }
.acc__link {
  flex: 1; display: flex; align-items: center; gap: 12px; min-height: 60px;
  color: var(--text); font-weight: 600; text-decoration: none;
}
.acc__icon {
  display: grid; place-items: center; width: 38px; height: 38px;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 10px;
}
.acc__btn {
  display: grid; place-items: center; width: 56px; height: 56px; padding: 0;
  color: var(--muted); background: transparent; border: 0; cursor: pointer;
}
.acc__btn .icon { transition: transform .15s; }
.acc__btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.acc__panel { margin: 0; padding: 0 0 12px 50px; list-style: none; }
.acc__panel a {
  display: flex; align-items: center; min-height: 44px;
  color: var(--text); text-decoration: none;
}
.acc__panel a:hover { color: var(--accent-ink); text-decoration: underline; }

@media (min-width: 900px) {
  .nav { display: block; margin-left: 16px; }
  .menu-btn { display: none; }
  .mobile-menu { display: none !important; }
}

/* ── Breadcrumb ───────────────────────────────────────────────────── */

.breadcrumb { font-size: .875rem; padding: 12px 0 0; }
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.breadcrumb__item + .breadcrumb__item::before { content: "›"; margin: 0 8px; color: var(--muted); }
.breadcrumb__item a { display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumb__item [aria-current] { color: var(--muted); }

/* ── Homepage ─────────────────────────────────────────────────────── */

.hero { padding: 40px 0 8px; text-align: center; }
.hero__title { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 800; margin-bottom: 12px; }
.hero__lead { max-width: 560px; margin: 0 auto 24px; color: var(--muted); font-size: 1.1rem; }

.search {
  position: relative; display: flex; gap: 8px; max-width: 680px; margin: 0 auto;
  padding: 6px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--brand); }
.search__icon { position: absolute; left: 20px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search__input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 12px 0 44px;
  font: inherit; color: var(--text); background: transparent; border: 0; outline: 0;
}
.search__input::placeholder { color: var(--muted); opacity: .85; }
.search__btn { border-radius: 13px; }

.section { padding: 24px 0 40px; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
.section__title { font-size: 1.5rem; margin-bottom: 20px; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.silo-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
}
.silo-card__band {
  display: flex; align-items: center; gap: 14px; padding: 20px;
  color: var(--accent-on); background: var(--accent);
}
.silo-card__icon {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px;
  background: rgba(255, 255, 255, .2);
  background: color-mix(in srgb, var(--accent-on) 18%, transparent);
}
.silo-card__icon .icon { width: 26px; height: 26px; }
.silo-card__title { margin: 0; font-size: 1.4rem; }
.silo-card__title a { color: inherit; text-decoration: none; }
.silo-card__title a:hover { text-decoration: underline; }
.silo-card__body { display: flex; flex-direction: column; flex: 1; padding: 16px 12px 8px; }
.silo-card__desc { margin: 0 8px 12px; color: var(--muted); }

.link-list { margin: 0 0 8px; padding: 0; list-style: none; }
.link-list__item {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px;
  color: var(--text); text-decoration: none; border-radius: 12px;
}
.link-list__item:hover { background: var(--accent-soft); }
.link-list__icon { color: var(--accent-ink); }
.link-list__text { flex: 1; font-weight: 600; }
.link-list__arrow { width: 1em; height: 1em; color: var(--muted); }
.link-list__item:hover .link-list__arrow { color: var(--accent-ink); }
.silo-card__more {
  display: inline-flex; align-items: center; align-self: flex-start; min-height: 48px; padding: 0 8px;
  margin-top: auto; font-weight: 700; color: var(--accent-ink);
}

.tool-grid { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.tool {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; height: 100%;
  padding: 16px; color: var(--text); text-decoration: none;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.tool:hover { border-color: var(--accent); }
.tool__icon {
  display: grid; place-items: center; width: 44px; height: 44px; grid-row: span 2;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 12px;
}
.tool__body { display: block; }
.tool__title { display: block; font-weight: 700; }
.tool__desc { display: block; margin-top: 2px; font-size: .9rem; color: var(--muted); }
.tag {
  justify-self: start; padding: 2px 10px; font-size: .75rem; font-weight: 700;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px;
}

/* ── Reclame ──────────────────────────────────────────────────────── */

.ad { max-width: 728px; margin: 24px auto; text-align: center; }
.ad__label { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad__box { width: 300px; max-width: 100%; height: 250px; margin: 4px auto 0; }
.ad__box--placeholder {
  display: grid; place-items: center; font-size: .9rem; color: var(--muted);
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.ad__box--placeholder small { display: block; font-size: .75rem; opacity: .8; }
@media (min-width: 768px) { .ad__box { width: 728px; height: 90px; } }

/* ── Pagini simple (404, „în lucru”) ──────────────────────────────── */

.state { max-width: 640px; padding-top: 56px; padding-bottom: 64px; }
.state__kicker { margin-bottom: 4px; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.state__links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }

/* ── Footer ───────────────────────────────────────────────────────── */

.site-footer { margin-top: 24px; background: var(--surface); border-top: 1px solid var(--border); }
.footer__grid { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 24px; }
.footer__brand p { max-width: 36ch; margin: 12px 0 0; color: var(--muted); font-size: .95rem; }
.footer__title { margin-bottom: 8px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.footer__list { margin: 0; padding: 0; list-style: none; }
.footer__list a { display: flex; align-items: center; min-height: 40px; color: var(--text); }
.footer__bottom { padding-top: 16px; padding-bottom: 28px; border-top: 1px solid var(--border); }
.footer__bottom p { margin: 0; font-size: .85rem; color: var(--muted); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.linklike { padding: 0; margin-left: 8px; font: inherit; color: var(--accent-ink, var(--brand-ink)); background: none; border: 0; text-decoration: underline; cursor: pointer; }

/* ═════════════════════════════════════════════════════════════════════
   Pagini de unelte: formulare, rezultate, text, FAQ
   ═════════════════════════════════════════════════════════════════════ */

:root { --bad: #c2312d; --ok: #167a42; --warn-bg: #fff4d6; --warn-ink: #5c3d00; --err-bg: #fde8e7; --ok-bg: #e6f5ec; }
:root[data-theme="dark"] { --bad: #ff8a85; --ok: #5fd694; --warn-bg: #3a2e10; --warn-ink: #f7d98a; --err-bg: #3b1a19; --ok-bg: #12291d; }

.tool-page { max-width: 880px; padding-top: 8px; padding-bottom: 48px; }
.tool-head { padding: 20px 0 8px; }
.tool-head h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 800; margin-bottom: 8px; }
.tool-head__lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }

.panel { margin: 16px 0; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel__title { font-size: 1.15rem; }

.notice { margin: 12px 0; padding: 12px 16px; font-size: .95rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice--warn { color: var(--warn-ink); background: var(--warn-bg); border-color: transparent; }
.notice--ok { background: var(--ok-bg); border-color: transparent; }
.notice--error { background: var(--err-bg); border-color: transparent; }

/* Câmpuri */
.field { margin-bottom: 16px; }
.field__label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.field__hint { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.field__hint[role="alert"] { color: var(--bad); font-weight: 600; }
.input {
  display: block; width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 12px;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--accent, var(--brand)); outline: 3px solid var(--focus); outline-offset: 1px; }
.input[aria-invalid="true"] { border-color: var(--bad); }
select.input { appearance: auto; }
.range { width: 100%; min-height: 40px; accent-color: var(--accent, var(--brand)); }

.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--accent, var(--brand)); }
.checks { display: grid; gap: 0 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg__opt span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; font-weight: 600; border-radius: 10px; }
.seg__opt input:checked + span { color: var(--accent-on, var(--brand-on)); background: var(--accent, var(--brand)); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.fieldset { margin: 0 0 16px; padding: 14px 16px 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.fieldset legend { padding: 0 8px; font-weight: 700; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid--3 { grid-template-columns: 2fr 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.form-row { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }

.btn--lg { min-height: 54px; padding: 0 1.75rem; font-size: 1.05rem; }
.btn--small { min-height: 40px; padding: 0 .9rem; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions--start { justify-content: flex-start; }

.repeat { display: grid; gap: 12px; margin-bottom: 12px; }
.repeat__item { padding: 12px; background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.repeat__item .field { margin-bottom: 8px; }
.repeat__item .field__label input, .repeat__item .field__label textarea { margin-top: 6px; font-weight: 400; }
.inline-add { display: flex; gap: 8px; }
.inline-add .input { flex: 1; }
.plain-list { margin: 8px 0 0; padding: 0; list-style: none; }
.plain-list li { padding: 4px 0; }
.inline-form { display: inline; margin: 0; }

/* Rezultat */
.result__label { margin: 0 0 2px; font-size: .9rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.result__value { margin: 0 0 16px; font-size: clamp(2.25rem, 9vw, 3.5rem); font-weight: 800; line-height: 1.1; color: var(--accent-ink, var(--brand-ink)); }
.result__sub { margin: 20px 0 8px; font-size: 1.05rem; }
.result__note { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
.result__grid { display: grid; gap: 10px; margin: 0 0 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.result__grid > div { padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.result__grid dt { font-size: .8rem; color: var(--muted); }
.result__grid dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; }

.stackbar { display: flex; height: 18px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.stackbar__seg--net { background: var(--doc); }
.stackbar__seg--cas { background: var(--bani); }
.stackbar__seg--cass { background: var(--copii); }
.stackbar__seg--tax { background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 16px; padding: 0; list-style: none; font-size: .9rem; }
.legend__dot { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; }
.legend__dot--net { background: var(--doc); } .legend__dot--cas { background: var(--bani); }
.legend__dot--cass { background: var(--copii); } .legend__dot--tax { background: var(--bad); }

.progress { height: 16px; margin: 0 0 16px; overflow: hidden; background: var(--surface-2); border-radius: 999px; }
.progress__fill { display: block; height: 100%; width: 0; background: var(--accent, var(--brand)); border-radius: 999px; transition: width .3s; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table thead th { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tbody th { font-weight: 500; }
.table__total th, .table__total td { font-weight: 800; border-bottom: 0; background: var(--accent-soft); }
.table--compact th, .table--compact td { padding: 6px 10px; font-size: .85rem; }
.schedule { margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.schedule summary { padding: 12px 14px; font-weight: 700; cursor: pointer; min-height: 44px; }
.schedule .table-wrap { max-height: 420px; overflow-y: auto; }

.tabs { display: flex; gap: 4px; margin-top: 16px; }
.tabs__tab { flex: 1; min-height: 48px; padding: 0 12px; font: inherit; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0; cursor: pointer; }
.tabs__tab[aria-selected="true"] { color: var(--accent-on, var(--brand-on)); background: var(--accent, var(--brand)); border-color: var(--accent, var(--brand)); }
.tabs__panel { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.tabs__panel .result { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Text explicativ, FAQ, unelte similare */
.prose { margin: 32px 0; max-width: 70ch; }
.prose h2 { margin-top: 1.4em; font-size: 1.5rem; }
.prose h3 { margin: 1.4em 0 .4em; font-size: 1.15rem; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 22px; }
.prose-page .prose h2 { font-size: 1.25rem; }

.faq { margin: 32px 0; }
.faq h2 { font-size: 1.5rem; }
.faq__item { margin-bottom: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.faq__item summary { padding: 14px 16px; font-weight: 700; cursor: pointer; min-height: 48px; }
.faq__a { padding: 0 16px 6px; color: var(--muted); }

.related { margin: 32px 0 0; }
.related h2 { font-size: 1.25rem; }
.related__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.related__item { display: flex; gap: 12px; align-items: flex-start; height: 100%; padding: 14px; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.related__item:hover { border-color: var(--accent); }
.related__item span { display: block; }
.related__item small { display: block; margin-top: 2px; color: var(--muted); }
.related__icon { margin-top: 2px; color: var(--accent-ink); }

.affiliate { display: grid; gap: 6px; justify-items: start; margin: 20px 0; padding: 16px; background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); }
.affiliate--placeholder { border-style: dashed; color: var(--muted); }
.affiliate__tag { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; max-width: calc(100% - 32px); padding: 12px 18px; color: var(--bg); background: var(--text); border-radius: 12px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast--show { opacity: 1; transform: translate(-50%, 0); }

/* Categorie, căutare */
.band { color: var(--accent-on); background: var(--accent); }
.band__inner { display: flex; align-items: center; gap: 18px; padding-top: 28px; padding-bottom: 28px; }
.band__icon { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 18px; background: rgba(255, 255, 255, .2); background: color-mix(in srgb, var(--accent-on) 18%, transparent); }
.band__icon .icon { width: 32px; height: 32px; }
.band__title { margin: 0 0 4px; font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 800; }
.band__text { margin: 0; max-width: 62ch; opacity: .95; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.js-only { display: none; }
html.js .js-only { display: block; }
html.js .chips.js-only, html.js .filter-group .chips { display: flex; }
.chip { min-height: 44px; padding: 0 16px; font: inherit; font-weight: 600; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--accent-on); background: var(--accent); border-color: var(--accent); }
.filter-group { margin-bottom: 12px; }

.tool-list, .result-list { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.tool-list [hidden] { display: none; }
.tool-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tool-row:hover { border-color: var(--accent, var(--brand)); }
.tool-row__body { flex: 1; min-width: 0; }
.tool-row .tool__icon { grid-row: auto; flex: none; }
.empty, .search-page__hint { color: var(--muted); }
.search-page { max-width: 760px; padding-top: 28px; padding-bottom: 48px; }
.search-page h1 { font-size: 2rem; margin-bottom: 16px; }
.search-page .search { margin-bottom: 8px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Conturi: formulare de autentificare / creare cont */
.auth-form { max-width: 480px; }
.auth-form .btn--lg { width: 100%; }
/* Login / Creează cont: coloană îngustă, centrată pe mijlocul ecranului */
.auth-page { max-width: 520px; margin: 0 auto; padding-top: clamp(16px, 6vh, 56px); padding-bottom: 48px; text-align: center; }
.auth-page .tool-head__lead { margin-left: auto; margin-right: auto; }
.auth-page .auth-form { max-width: none; text-align: left; }
.auth-page .notice { text-align: left; }

/* ── Previzualizări: documente, CV, factură, fișe ─────────────────── */
.paper-wrap, .sheet-wrap { overflow-x: auto; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.paper {
  max-width: 794px; margin: 0 auto; padding: 32px 36px; color: #111; background: #fff;
  font: 400 14px/1.6 Georgia, "Times New Roman", serif; border: 1px solid #d5d9e0; box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.paper p { margin: 0 0 .7em; text-align: justify; }
.paper__title { margin: 0 0 18px; font-size: 20px; text-align: center; letter-spacing: .02em; }
.paper__h2 { margin: 16px 0 6px; font-size: 15px; }
.paper__li { padding-left: 14px; }
.paper .fill { background: #e8f0fe; border-radius: 3px; padding: 0 2px; font-weight: 600; }
.paper .blank { color: #8a8f98; }
.paper__sign { display: flex; justify-content: space-between; gap: 24px; margin-top: 40px; }
.paper__sign > div { flex: 1; text-align: center; }
.paper__line { display: block; height: 1px; margin: 44px 12px 4px; background: #333; }
.paper__sign small { color: #777; }

.cv { font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; font-size: 13.5px; }
.cv p { text-align: left; }
.cv__name { margin: 0; font-size: 26px; }
.cv__title { margin: 2px 0 4px; font-size: 15px; color: #444; }
.cv__contact { margin: 0 0 8px; font-size: 12.5px; color: #555; }
.cv__sec { margin-top: 14px; }
.cv__sec h2 { margin: 0 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.cv__item { margin-bottom: 8px; }
.cv__item p { margin: 2px 0 0; }
.cv__row { display: flex; justify-content: space-between; gap: 12px; }
.cv__date { flex: none; color: #555; font-size: 12.5px; }
.cv__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cv__tags li { padding: 2px 10px; background: #eef1f6; border-radius: 999px; font-size: 12.5px; }
.cv--clasic { font-family: Georgia, "Times New Roman", serif; }
.cv--clasic .cv__head { padding-bottom: 8px; text-align: center; border-bottom: 2px solid #222; }
.cv--clasic .cv__sec h2 { padding-bottom: 2px; border-bottom: 1px solid #999; }
.cv--modern .cv__head { margin: -32px -36px 14px; padding: 26px 36px 18px; color: #fff; background: #1e63d6; }
.cv--modern .cv__title, .cv--modern .cv__contact { color: #e6efff; }
.cv--modern .cv__sec h2 { color: #1e63d6; }
.cv--simplu .cv__sec h2 { color: #333; }
.cv--simplu .cv__tags li { background: none; border: 1px solid #bbb; }

.invoice { font-family: "Segoe UI", system-ui, Arial, sans-serif; font-size: 13.5px; }
.invoice__meta { text-align: center !important; color: #444; }
.invoice__parties { display: grid; gap: 16px; margin: 16px 0; grid-template-columns: 1fr 1fr; }
.invoice__party h2 { margin: 0 0 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #666; }
.invoice__party p { text-align: left; }
.invoice__table { width: 100%; border-collapse: collapse; }
.invoice__table th, .invoice__table td { padding: 6px 8px; text-align: left; border: 1px solid #c9ced6; }
.invoice__table .num { text-align: right; }
.invoice__table th { background: #f1f3f7; }
.invoice__empty { color: #888; text-align: center !important; }
.invoice__totals { margin-top: 12px; text-align: right; }
.invoice__totals p { margin: 2px 0; text-align: right; }
.invoice__grand { font-size: 17px; }
.invoice__note { margin-top: 12px; text-align: left !important; }
.invoice__disclaimer { margin-top: 20px; font-size: 11.5px; color: #888; font-style: italic; text-align: left !important; }

.sheet { max-width: 794px; margin: 0 auto; background: #fff; border: 1px solid #d5d9e0; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.sheet--land { max-width: 1123px; }
.sheet svg { display: block; width: 100%; height: auto; }
.sheet__break { height: 16px; background: var(--surface-2); }

.plansa-grid { display: grid; gap: 12px; margin: 16px 0; padding: 0; list-style: none; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .plansa-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.plansa[hidden] { display: none; }
.plansa { padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.plansa__fig { margin: 0; }
.plansa__art { overflow: hidden; background: #fff; border: 1px solid #e3e6ec; border-radius: 10px; }
.plansa__art svg { display: block; width: 100%; height: auto; }
.plansa figcaption { display: grid; gap: 2px; margin: 8px 0; }
.plansa__meta { font-size: .8rem; color: var(--muted); }
.plansa__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Consimțământ cookie ──────────────────────────────────────────── */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; padding: 12px; }
.consent__box { max-width: 720px; margin: 0 auto; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.consent__title { margin: 0 0 4px; font-size: 1.05rem; }
.consent__box p { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.consent__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ── Administrare ─────────────────────────────────────────────────── */
.admin__badge { padding: 4px 10px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); background: var(--brand-soft); border-radius: 999px; }
.admin__main { max-width: 880px; padding-top: 24px; padding-bottom: 56px; }
.admin__tabs { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; }
.admin__tab { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 600; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.admin__tab[aria-current] { color: var(--brand-on); background: var(--brand); border-color: var(--brand); }
.admin__login { max-width: 420px; margin: 40px auto; }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist__item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); }
.checklist__item:last-child { border-bottom: 0; }
.checklist__mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; font-weight: 800; border-radius: 50%; }
.checklist__item--ok .checklist__mark { color: #fff; background: var(--ok); }
.checklist__item--warn .checklist__mark { color: var(--warn-ink); background: var(--warn-bg); outline: 2px solid var(--warn-ink); }

/* ── Tipărire ─────────────────────────────────────────────────────── */
@media print {
  html.printing body { color: #000; background: #fff !important; }
  html.printing .paper, html.printing .sheet, html.printing .plansa__art, html.printing #print-salary, html.printing #print-loan, html.printing #print-tax, html.printing #print-stamp, html.printing #print-leave {
    box-shadow: none; border: 0; max-width: none; margin: 0; color: #000; background: #fff;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  html.printing .paper { padding: 0; }
  html.printing .paper .fill { background: none; font-weight: 700; }
  html.printing .cv--modern .cv__head { margin: 0 0 14px; }
  html.printing .sheet svg { width: 100%; height: auto; }
  html.printing .sheet__break { height: 0; break-after: page; background: none; }
  html.printing .table-wrap, html.printing .schedule .table-wrap { max-height: none; overflow: visible; }
  html.printing .toast, html.printing .consent { display: none !important; }
}
