/* White H · stil comun (landing, cont, panou intern)
   Pornește din design system-ul Datasap Light: alb, un singur verde (#00D95A),
   Space Grotesk + JetBrains Mono, colțuri 6px (butoane, câmpuri) și 14px (carduri). */
@import url("./fonts.css");

:root {
  --green: #00D95A;
  --green-bright: #00DC44;
  --green-soft: #6EE193;
  --green-deep: #007223;
  --green-ink: #006B27;          /* verde pentru text pe alb (contrast 6.9:1) */
  --green-tint: #EAFBF1;
  --green-tint-2: #D3F6E1;
  --grad-green: linear-gradient(135deg, #007223 0%, #04C23F 45%, #00DC44 65%, #6EE193 100%);
  --grad-h: linear-gradient(140deg, #00862E 0%, #00B947 55%, #00D95A 100%);

  --bg: #FFFFFF;
  --bg-alt: #F5F9F6;
  --bg-sunken: #ECF2EE;
  --ink: #10221A;            /* verde foarte închis în loc de negru */
  --fg: #10221A;
  --fg-muted: #34463D;
  --fg-subtle: #56675E;
  --fg-faint: #67776F;
  --border: #E1E9E4;
  --border-strong: #C9D5CE;
  --deep: #0B6B34;           /* verdele închis pentru butoane și accente pline */
  --deep-hover: #095A2B;

  --warn: #B26A00;
  --warn-bg: #FFF4E0;
  --danger: #C62828;
  --danger-bg: #FDECEC;

  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-xs: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow-1: 0 1px 2px rgba(10, 10, 11, .05);
  --shadow-2: 0 8px 24px rgba(10, 10, 11, .07);
  --shadow-3: 0 24px 60px rgba(10, 10, 11, .10);
  --ring: 0 0 0 3px rgba(0, 217, 90, .35);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1760px;
  --gutter: clamp(20px, 4.5vw, 88px);

  /* motion-kit pe culorile noastre */
  --tabs-bar-bg: var(--bg-sunken);
  --tabs-pill-bg: var(--green);
  --tabs-text-muted: var(--fg-subtle);
  --tabs-text-active: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" on;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--green-tint-2); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
.num, .tab-num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-xs); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 640px) { :root { --gutter: 18px; } }

/* ---------- tipografie ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.2vw, 80px); letter-spacing: -0.04em; }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.02em; line-height: 1.15; }
h4 { font-size: 18px; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--fg-muted); max-width: 58ch; }
.muted { color: var(--fg-subtle); }
.faint { color: var(--fg-faint); }
.accent { color: var(--green-ink); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em; color: var(--green-ink);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--green); border-radius: 2px; }
.eyebrow.plain::before { display: none; }
.label-mono {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em; color: var(--fg-subtle);
}

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo-word { font-weight: 600; font-size: 22px; letter-spacing: -0.04em; line-height: 1; color: var(--green-ink); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo.on-green .logo-word { color: var(--ink); }

/* ---------- butoane ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 20px; border-radius: var(--r-xs);
  border: 1px solid transparent; background: none; cursor: pointer;
  font-weight: 500; font-size: 16px; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary:hover { background: #00C752; box-shadow: 0 6px 20px rgba(0, 217, 90, .32); }
.btn-dark { background: var(--deep); color: #fff; }
.btn-dark:hover { background: var(--deep-hover); box-shadow: 0 6px 20px rgba(11, 107, 52, .25); }
.btn-ghost { border-color: var(--border-strong); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-text { padding: 0 6px; height: auto; color: var(--fg-muted); }
.btn-text:hover { color: var(--ink); }
.btn-sm { --h: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { --h: 56px; padding: 0 26px; font-size: 17px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- carduri, insigne ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1;
  background: var(--bg-sunken); color: var(--fg-muted); white-space: nowrap;
}
.badge.green { background: var(--green-tint); color: var(--green-ink); }
.badge.dark { background: var(--deep); color: #fff; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-mono {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-subtle); font-weight: 500;
}

/* ---------- formulare ---------- */
.field { display: grid; gap: 8px; align-content: start; }
.field + .field { margin-top: 22px; }
.field-label { font-weight: 500; font-size: 15.5px; color: var(--ink); line-height: 1.35; }
.field-label .q { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint); margin-right: 6px; letter-spacing: .04em; font-weight: 500; }
.field-help { font-size: 14px; color: var(--fg-subtle); line-height: 1.45; }
.field-err { font-size: 13.5px; color: var(--danger); display: none; }
.field.has-error .field-err { display: block; }
.field.has-error .input { border-color: var(--danger); }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-xs);
  border: 1px solid var(--border-strong); background: #fff; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235C5C62' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input:hover { border-color: #A9A9B0; }
.input:focus { outline: none; border-color: var(--green-deep); box-shadow: var(--ring); }
.input[readonly] { background: var(--bg-alt); color: var(--fg-subtle); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .unit { position: absolute; right: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--fg-faint); pointer-events: none; }
.input-wrap .input { padding-right: 52px; }
.prefilled-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--green-ink); }
.prefilled-note svg { width: 13px; height: 13px; }

/* opțiuni ca butoane */
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--r-xs); background: #fff;
  font-size: 15px; line-height: 1.25; transition: border-color .15s, background-color .15s, color .15s;
}
.opt span::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: #fff; transition: all .15s;
}
.opt.multi span::before { border-radius: 4px; }
.opt input:hover + span { border-color: #A9A9B0; }
.opt input:checked + span { border-color: var(--deep); background: var(--green-tint); color: var(--ink); box-shadow: 0 0 0 1px var(--deep) inset; }
.opt input:checked + span::before { border-color: var(--deep); background: var(--green); box-shadow: inset 0 0 0 3px #fff; }
.opt.multi input:checked + span::before { box-shadow: none; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.6 2.6L9 1' fill='none' stroke='%230A0A0B' stroke-width='1.8'/%3E%3C/svg%3E") center/10px no-repeat; }
.opt input:focus-visible + span { box-shadow: var(--ring); }
.opt.unknown span { border-style: dashed; color: var(--fg-subtle); }
.opt.unknown input:checked + span { color: var(--ink); }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; line-height: 1.45; color: var(--fg-muted); }
.check input { appearance: none; width: 20px; height: 20px; margin: 1px 0 0; flex: none; border-radius: 4px; border: 1.5px solid var(--border-strong); background: #fff; cursor: pointer; transition: all .15s; }
.check input:checked { border-color: var(--green-deep); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='9' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.5l3.2 3.2L11 1' fill='none' stroke='%230A0A0B' stroke-width='2'/%3E%3C/svg%3E") center/12px no-repeat; }
.check input:focus-visible { box-shadow: var(--ring); }
.check a { color: var(--ink); }

/* ---------- toast ---------- */
.t-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; translate: -50% 0;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-md);
  background: var(--deep); color: #fff; font-size: 14.5px; box-shadow: var(--shadow-3); max-width: calc(100vw - 32px);
}
.t-toast[hidden] { display: none; }
.t-toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.t-toast.is-error .dot { background: #FF6B6B; }

/* ---------- utilitare ---------- */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.hide { display: none !important; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.arrow-chip {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px;
  background: var(--green); color: var(--ink); font-size: 15px; flex: none;
}
.tbd { color: var(--fg-faint); border-bottom: 1px dashed var(--border-strong); }
