:root {
  --bg: #ffffff;
  --bg-soft: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2f6fed;
  --accent-2: #7c3aed;
  --accent-3: #0891b2;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 14px;
  --max-w: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Background flourish ─────────────────────────────────────────── */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(47,111,237,0.08), transparent 60%),
    radial-gradient(700px circle at 85% 25%, rgba(124,58,237,0.07), transparent 60%),
    radial-gradient(500px circle at 50% 90%, rgba(8,145,178,0.06), transparent 60%);
}

/* ── Nav ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.86);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img.logo { height: 32px; width: auto; display: block; }
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.92rem; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.lang-toggle {
  font-weight: 700; font-size: 0.78rem !important; letter-spacing: 0.04em;
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--text) !important; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 8px 20px -8px rgba(47,111,237,0.5);
}
.btn-primary:hover { box-shadow: 0 10px 24px -6px rgba(47,111,237,0.6); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(47,111,237,0.04); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: #ffffff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { padding: 96px 0 64px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-3);
  background: rgba(8,145,178,0.08);
  border: 1px solid rgba(8,145,178,0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.12;
  margin: 0 0 20px;
  background: linear-gradient(135deg, var(--text) 25%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.subtitle {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 1.1rem;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Stats ────────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  max-width: 720px;
  margin: 56px auto 0;
}
.stat { text-align: center; }
.stat .value {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .label { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }

/* ── Sections ─────────────────────────────────────────────────────── */
section.section { padding: 72px 0; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 18px;
  font-weight: 700;
}
.section-lead { color: var(--muted); max-width: 700px; margin-bottom: 40px; font-size: 1.05rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 1px 8px rgba(15,23,42,0.04);
}

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

.point-card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.point-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.fact-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.fact-row {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 12px;
}
.fact-row .fact-value { font-weight: 700; color: var(--accent); font-size: 0.92rem; margin-bottom: 2px; }
.fact-row .fact-label { color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.point-card .index {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(47,111,237,0.12), rgba(124,58,237,0.12));
  color: var(--accent); font-weight: 700;
}

.safe-callout {
  border: 1px solid rgba(47,111,237,0.3);
  background: linear-gradient(135deg, rgba(47,111,237,0.06), rgba(124,58,237,0.05));
  border-radius: var(--radius);
  padding: 32px;
}
.safe-callout h2 { margin-top: 0; }
.safe-callout p { color: var(--muted); }

.urgency-callout {
  border: 1px solid rgba(217,119,6,0.35);
  background: linear-gradient(135deg, rgba(217,119,6,0.08), rgba(220,38,38,0.05));
  border-radius: var(--radius);
  padding: 32px;
}
.urgency-callout h2 { margin-top: 0; }
.urgency-callout p { color: var(--muted); white-space: pre-line; }
.urgency-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(217,119,6,0.2);
}
.urgency-stats .stat .value {
  background: linear-gradient(135deg, #d97706, #dc2626);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── FAQ ──────────────────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-weight: 600; font-size: 1rem;
}
.faq-q .chev { transition: transform .2s; color: var(--muted); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; color: var(--muted);
  transition: max-height .25s ease;
  font-size: 0.95rem;
}
.faq-item.open .faq-a { max-height: 240px; padding-top: 12px; }

/* ── Footer ───────────────────────────────────────────────────────── */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
footer.site-footer .container { display: flex; flex-direction: column; gap: 12px; }

/* ── Reveal-on-scroll ─────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Auth pages ───────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.06);
}
.auth-card h1 { font-size: 1.4rem; margin: 0 0 6px; }
.auth-card p.lead { color: var(--muted); margin: 0 0 28px; font-size: 0.92rem; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 6px; }

.alert {
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 0.88rem;
  margin-bottom: 18px;
}
.alert-error { background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.3); color: #b91c1c; }
.alert-success { background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.3); color: #15803d; }
.alert-info { background: rgba(47,111,237,0.08); border: 1px solid rgba(47,111,237,0.3); color: #1d4ed8; }

/* ── Dashboard ────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; border-bottom: 1px solid var(--border); margin-bottom: 40px;
}
.topbar .who { font-size: 0.9rem; color: var(--muted); }

.tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; border-radius: 9px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 0.9rem;
}
.tab-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(47,111,237,0.06); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--muted); }
.checkbox-row input { margin-top: 3px; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.pill-pending { background: rgba(217,119,6,0.1); color: #b45309; }
.pill-completed { background: rgba(22,163,74,0.1); color: #15803d; }
.pill-failed { background: rgba(220,38,38,0.1); color: #b91c1c; }
.pill-cancelled { background: rgba(100,116,139,0.1); color: #475569; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr.row-link:hover { background: var(--bg-soft); cursor: pointer; }

.credential-box {
  background: var(--bg-soft);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}
.credential-box .row { display: flex; justify-content: space-between; padding: 4px 0; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding: 64px 0 40px; }
}
