/* ============================================================
   CleverMateAI — Shared theme
   Extracted VERBATIM from landing/index.html so the new auth +
   pricing + dashboard pages match the landing aesthetic exactly.
   index.html stays self-contained; this file is for the NEW pages.
   Aesthetic: "midnight azure" — deep ink canvas, logo blue
   (#008dd9) + lime accents, glassy surfaces, grain.
   ============================================================ */

:root {
  --ink-950: #07070f;
  --ink-900: #0a0a16;
  --ink-850: #0e0e1d;
  --ink-800: #131325;
  --ink-700: #1b1b33;
  --ink-600: #262647;

  --peri-300: #8fd4ff;
  --peri-400: #41b2f5;
  --peri-500: #008dd9;   /* logo blue — sampled from cleverMateAI.png */
  --peri-600: #0073b8;

  --violet-400: #00b4f0;
  --violet-500: #0073b8;

  --mint-400: #c6f56f;   /* NextSaaS ns-green accent */
  --amber-400: #f9eb57;  /* NextSaaS ns-yellow */

  --text-1: #eef0ff;
  --text-2: #a9adce;
  --text-3: #6e7299;

  --stroke-1: rgba(65, 178, 245, 0.14);
  --stroke-2: rgba(65, 178, 245, 0.07);

  --warn: #f9eb57;
  --danger: #ff6b6b;
  --ok: #c6f56f;

  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
  --font-mono: "Spline Sans Mono", monospace;

  --rail: clamp(16px, 6vw, 96px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink-900);
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--peri-500); color: var(--ink-950); }

/* ---- atmosphere: grain ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-1);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.mono { font-family: var(--font-mono); }

kbd {
  font-family: var(--font-mono);
  font-size: 0.78em;
  background: var(--ink-700);
  border: 1px solid var(--stroke-1);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--peri-300);
  white-space: nowrap;
}

/* ---- badge (NextSaaS pattern) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--peri-300);
  border: 1px solid var(--stroke-1);
  background: rgba(0, 141, 217, 0.07);
  padding: 7px 16px;
  border-radius: 100px;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint-400);
  box-shadow: 0 0 10px var(--mint-400);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  border-radius: 100px;
  padding: 14px 28px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(.2,.8,.3,1.1), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
/* flat, NextSaaS-style .btn-primary: solid fill + 1px lighter border + 1px shadow */
.btn-primary {
  background: var(--peri-500);
  color: #fff;
  border-color: var(--peri-400);
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--peri-600); }
.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--stroke-1);
}
.btn-ghost:hover { background: rgba(65,178,245,0.06); border-color: rgba(65,178,245,0.3); }
.btn[disabled], .btn.is-loading { opacity: 0.6; cursor: not-allowed; pointer-events: none; transform: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* button inline spinner */
.btn .spin {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- reveal animations (NextSaaS data-ns-animate equivalent) ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(.16,.84,.3,1), transform 0.8s cubic-bezier(.16,.84,.3,1);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 10, 22, 0.78);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--stroke-2);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.nav-logo img {
  width: 34px; height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--stroke-1), 0 4px 14px rgba(0, 141, 217, 0.3);
}
.nav-logo .ai { color: var(--peri-400); }
.nav-links {
  display: flex;
  gap: 34px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text-1); }
.nav-links a.active { color: var(--text-1); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav .btn { padding: 10px 22px; font-size: 14.5px; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ============ SECTION SHARED ============ */
section { position: relative; }
.sec-pad { padding: 110px 0; }
.sec-head { text-align: center; max-width: 700px; margin: 0 auto 70px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 48px); margin: 22px 0 16px; }
.sec-head h2 .grad {
  background: linear-gradient(105deg, var(--peri-400), var(--violet-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-head p { font-size: 17.5px; }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--stroke-2);
  padding: 44px 0;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
}
.foot-inner .nav-logo { font-size: 17px; }
.foot-inner .nav-logo img { width: 28px; height: 28px; }
.foot-links { display: flex; gap: 26px; font-size: 14px; color: var(--text-3); }
.foot-links a:hover { color: var(--text-1); }
.foot-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); }

/* ============================================================
   AUTH CARD (login / signup) — adapted from ai-chatbot template
   ============================================================ */
.auth-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
  overflow: clip;
}
/* dawn glow behind auth card */
.auth-wrap::before {
  content: "";
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 700px;
  background:
    radial-gradient(ellipse 50% 42% at 50% 30%, rgba(0, 141, 217, 0.18), transparent 70%),
    radial-gradient(ellipse 34% 30% at 62% 24%, rgba(0, 115, 184, 0.12), transparent 70%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 420px;
  background: var(--ink-850);
  border: 1px solid var(--stroke-1);
  border-radius: 20px;
  padding: 44px 34px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.5);
}
.auth-card .auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-card .auth-logo img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 1px var(--stroke-1), 0 4px 14px rgba(0,141,217,0.3); }
.auth-card .auth-logo span { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--text-1); }
.auth-card .auth-logo .ai { color: var(--peri-400); }
.auth-card h1 { font-size: 27px; text-align: center; margin-bottom: 8px; }
.auth-card .auth-sub { text-align: center; font-size: 15px; color: var(--text-2); margin-bottom: 28px; }

.field-group { margin-bottom: 16px; }
.field-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-2);
  margin-bottom: 7px;
}
.input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-1);
  background: var(--ink-800);
  border: 1px solid var(--stroke-1);
  border-radius: 12px;
  padding: 13px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--peri-400); box-shadow: 0 0 0 3px rgba(0,141,217,0.15); }

.auth-alt { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--text-2); }
.auth-alt a { color: var(--peri-300); font-weight: 600; }
.auth-alt a:hover { color: var(--peri-400); }

/* divider with centered "Or" */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--stroke-1);
}

/* status / error / success messages */
.msg-box {
  font-size: 14px;
  border-radius: 12px;
  padding: 11px 15px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  display: none;
}
.msg-box.show { display: block; }
.msg-box.err { color: #ffd3d3; background: rgba(255,107,107,0.1); border-color: rgba(255,107,107,0.3); }
.msg-box.ok  { color: #e8ffd0; background: rgba(198,245,111,0.08); border-color: rgba(198,245,111,0.3); }
.msg-box.info { color: var(--peri-300); background: rgba(0,141,217,0.08); border-color: var(--stroke-1); }

/* ============================================================
   GENERIC CARD / PANEL (dashboard + pricing)
   ============================================================ */
.panel {
  background: linear-gradient(180deg, rgba(27,27,51,0.5), rgba(14,14,29,0.5));
  border: 1px solid var(--stroke-2);
  border-radius: 20px;
  padding: 28px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}
.panel-sub { font-size: 14px; color: var(--text-3); margin-bottom: 20px; }

/* progress bar (credits) */
.progress {
  height: 10px;
  border-radius: 100px;
  background: var(--ink-800);
  border: 1px solid var(--stroke-2);
  overflow: hidden;
}
.progress .bar {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--peri-500), var(--violet-400));
  transition: width 0.6s cubic-bezier(.2,.8,.3,1);
}
.progress .bar.warn { background: linear-gradient(90deg, var(--amber-400), #f5a623); }
.progress .bar.full { background: linear-gradient(90deg, var(--mint-400), #8fd96f); }

/* plan badge pills */
.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 5px 13px;
  border: 1px solid var(--stroke-1);
}
.plan-pill.free  { color: var(--text-2); background: rgba(110,114,153,0.12); }
.plan-pill.pro   { color: var(--peri-300); background: rgba(0,141,217,0.12); border-color: rgba(65,178,245,0.4); }
.plan-pill.power { color: var(--mint-400); background: rgba(198,245,111,0.1); border-color: rgba(198,245,111,0.4); }

/* generic table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--stroke-2);
}
.tbl th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.tbl td { color: var(--text-2); }
.tbl td.model-id { font-family: var(--font-mono); color: var(--text-1); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; font-family: var(--font-mono); }
.tag-free {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--mint-400);
  border: 1px solid rgba(198,245,111,0.3);
  background: rgba(198,245,111,0.08);
  border-radius: 100px;
  padding: 1px 8px;
}

/* spinner block (loading states) */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 13px;
}
.loader .spin {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--stroke-1);
  border-top-color: var(--peri-400);
  animation: spin 0.7s linear infinite;
}

/* details/summary collapsible (model price table) */
details.collapse {
  border: 1px solid var(--stroke-2);
  border-radius: 16px;
  background: rgba(14,14,29,0.55);
  overflow: hidden;
}
details.collapse > summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse > summary .chev { transition: transform 0.3s ease; color: var(--peri-400); }
details.collapse[open] > summary .chev { transform: rotate(180deg); }
details.collapse .collapse-body { padding: 0 24px 22px; overflow-x: auto; }

/* ============================================================
   FLOATING PILL NAV (ai-chatbot template signature)
   A rounded-full dark bar with margin from the viewport edges:
   logo left · centered links · primary pill button right.
   Distinct .nav-pill* names so they never clash with .nav rules.
   ============================================================ */
.nav-pill-wrap {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 1140px;
}
.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(14, 14, 29, 0.72);
  border: 1px solid var(--stroke-1);
  border-radius: 100px;
  padding: 9px 9px 9px 20px;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.nav-pill .nav-logo { font-size: 19px; }
.nav-pill .nav-logo img { width: 30px; height: 30px; border-radius: 8px; }
.nav-pill-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-pill-links a {
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.nav-pill-links a:hover { color: var(--text-1); background: rgba(65,178,245,0.06); }
.nav-pill-links a.active {
  color: var(--text-1);
  background: rgba(0,141,217,0.12);
  border-color: var(--stroke-1);
}
.nav-pill-cta { display: flex; align-items: center; gap: 10px; }
.nav-pill-cta .btn { padding: 10px 22px; font-size: 14px; }
@media (max-width: 900px) { .nav-pill-links { display: none; } }

/* ============================================================
   DASHBOARD HEADER (display h1 + plan badge + logout pill)
   ============================================================ */
.dash-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.dash-title-row .dash-title-l { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-title-row .dash-title-r { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   STEP CARDS (template-style big ghost numerals) — "Connect"
   ============================================================ */
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .step-grid { grid-template-columns: 1fr; } }
.step-card {
  position: relative;
  background: var(--ink-850);
  border: 1px solid var(--stroke-2);
  border-radius: 16px;
  padding: 22px 22px 24px;
  overflow: hidden;
}
.step-card .step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(65,178,245,0.30);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  display: block;
}
.step-card h4 { font-size: 16px; margin-bottom: 7px; }
.step-card p { font-size: 13.5px; color: var(--text-3); line-height: 1.55; }
.step-card strong { color: var(--text-1); font-weight: 600; }

/* ============================================================
   COMPARISON TABLE — ai-chatbot pricing "What's included"
   rows = ids/features · plan columns · circular check vs dim dash
   ============================================================ */
.cmp {
  display: grid;
  border: 1px solid var(--stroke-2);
  border-radius: 16px;
  overflow: hidden;
}
.cmp-row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr));
  align-items: center;
  border-bottom: 1px solid var(--stroke-2);
}
.cmp-row:last-child { border-bottom: none; }
.cmp-row.head {
  background: rgba(19,19,37,0.6);
}
.cmp-row.head .cmp-cell {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.cmp-row:not(.head):hover { background: rgba(65,178,245,0.035); }
.cmp-cell {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-2);
  text-align: center;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cmp-cell.feat {
  justify-content: flex-start;
  text-align: left;
  color: var(--text-1);
  gap: 9px;
}
.cmp-cell.feat .cmp-id { font-family: var(--font-mono); font-size: 13px; color: var(--text-1); word-break: break-word; }
.cmp-cell.feat .cmp-prov { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }
.cmp-cell .num { font-family: var(--font-mono); font-size: 13px; color: var(--text-1); }
.cmp-cell .muted { color: var(--text-3); }
/* circular check (template signature) */
.cmp-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}
.cmp-check.on { background: var(--mint-400); }
.cmp-check.on svg { stroke: var(--ink-950); }
.cmp-check.off { background: rgba(110,114,153,0.22); }
.cmp-check.off svg { stroke: rgba(110,114,153,0.55); }
.cmp-dash { color: var(--text-3); font-family: var(--font-mono); }
@media (max-width: 640px) {
  .cmp { display: block; overflow-x: auto; }
  .cmp-inner { min-width: 540px; }
}

/* ============================================================
   TWO-COLUMN AUTH LAYOUT (ai-chatbot login/signup template)
   Left = labeled pill-input card, right = branded visual panel.
   Additive — builds on the existing .auth-wrap / .auth-card rules.
   ============================================================ */
.auth-wrap.is-split { padding: 130px 24px 80px; align-items: center; }
.auth-split {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 940px) {
  .auth-split { grid-template-columns: 1fr; max-width: 460px; }
  .auth-split .authviz { display: none; }
}

/* LEFT card — the form. Reuses .auth-card look but left-aligned. */
.auth-split .auth-card {
  max-width: none;
  width: 100%;
  padding: 42px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-split .auth-card h1 { text-align: left; font-size: 28px; }
.auth-split .auth-card .auth-sub { text-align: left; margin-bottom: 24px; }
.auth-split .auth-card .auth-logo { justify-content: flex-start; }

/* pill-shaped inputs + bold labels (template signature #3) */
.auth-split .field-group { margin-bottom: 18px; }
.auth-split .field-group label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--text-1);
  margin-bottom: 9px;
}
.auth-split .input {
  border-radius: 100px;
  padding: 14px 20px;
  background: var(--ink-800);
}
.auth-split .input.mono { font-size: 13.5px; letter-spacing: 0.02em; }
.auth-split .btn-block { margin-top: 4px; }

/* remember-me row + forgot link */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 20px;
  gap: 14px;
}
.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check .box {
  width: 18px; height: 18px;
  border-radius: 6px;
  border: 1px solid var(--stroke-1);
  background: var(--ink-800);
  display: grid;
  place-items: center;
  transition: background 0.18s ease, border-color 0.18s ease;
  flex: none;
}
.auth-check .box svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.6); transition: opacity 0.16s ease, transform 0.16s ease; color: var(--ink-950); }
.auth-check input:checked + .box { background: var(--peri-500); border-color: var(--peri-400); }
.auth-check input:checked + .box svg { opacity: 1; transform: scale(1); }
.auth-check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(0,141,217,0.25); }
.auth-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-link:hover { color: var(--text-1); }

/* outline pill rows (our equivalent of the template social buttons) */
.auth-options { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
.auth-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-1);
  background: var(--ink-850);
  border: 1px solid var(--stroke-1);
  border-radius: 100px;
  padding: 13px 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.auth-opt:hover { border-color: rgba(65,178,245,0.34); background: rgba(65,178,245,0.05); }
.auth-opt .opt-ico {
  width: 26px; height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0,141,217,0.12);
  border: 1px solid var(--stroke-1);
  color: var(--peri-300);
}
.auth-opt .opt-ico svg { width: 13px; height: 13px; }
.auth-opt .opt-txt { display: flex; flex-direction: column; line-height: 1.25; }
.auth-opt .opt-txt small { font-weight: 500; font-size: 12px; color: var(--text-3); }
.auth-opt .opt-chev { margin-left: auto; color: var(--text-3); transition: transform 0.25s ease; flex: none; }
.auth-opt[aria-expanded="true"] .opt-chev { transform: rotate(180deg); color: var(--peri-400); }
.auth-opt.is-static { cursor: default; }
.auth-opt.is-static:hover { border-color: var(--stroke-1); background: var(--ink-850); }

/* collapsible reveal region (login redeem) */
.auth-reveal {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(.2,.8,.3,1), margin 0.38s ease;
  margin-top: 0;
}
.auth-reveal.open { max-height: 340px; margin-top: 12px; }
.auth-reveal-inner {
  border: 1px solid var(--stroke-1);
  border-radius: 18px;
  background: var(--ink-800);
  padding: 18px;
}
.auth-reveal-inner .field-group:last-of-type { margin-bottom: 14px; }

/* small lime-dot mono note (trial credits / byok) */
.auth-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--text-2);
  margin-top: 18px;
}
.auth-note::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--mint-400);
  box-shadow: 0 0 10px var(--mint-400);
}

/* ============================================================
   RIGHT BRANDED VISUAL PANEL (template big rounded image)
   Deep gradient ink, radial primary glows, faint grid mask,
   centered chat mockup miniature (.authviz-* mirrors index mock).
   ============================================================ */
.authviz {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--stroke-1);
  background:
    radial-gradient(ellipse 60% 50% at 22% 16%, rgba(0,141,217,0.30), transparent 62%),
    radial-gradient(ellipse 55% 45% at 88% 88%, rgba(0,115,184,0.26), transparent 60%),
    linear-gradient(165deg, var(--ink-850), var(--ink-950));
  box-shadow: 0 40px 120px rgba(0,0,0,0.5), 0 -1px 0 rgba(143,212,255,0.10) inset;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px 48px;
  min-height: 580px;
}
/* faint grid mask like the index hero */
.authviz::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 78%);
  pointer-events: none;
}
.authviz-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  text-align: center;
}
.authviz-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--peri-300);
  border: 1px solid var(--stroke-1);
  background: rgba(0,141,217,0.08);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.authviz-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint-400);
  box-shadow: 0 0 10px var(--mint-400);
}
.authviz-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 10px;
}
.authviz-title .grad {
  background: linear-gradient(105deg, var(--peri-400), var(--violet-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.authviz-sub {
  font-size: 14.5px;
  color: var(--text-2);
  margin: 0 auto 30px;
  max-width: 350px;
}

/* chat mockup miniature (mirrors index .mock-chat, prefixed authviz-) */
.authviz-chat {
  text-align: left;
  display: flex;
  flex-direction: column;
  background: rgba(14, 14, 29, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(65,178,245,0.2);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.6);
  overflow: hidden;
}
.authviz-chat .ac-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: linear-gradient(135deg, rgba(0,141,217,0.18), rgba(0,115,184,0.18));
  border-bottom: 1px solid var(--stroke-2);
}
.authviz-chat .ac-head img { width: 22px; height: 22px; border-radius: 6px; }
.authviz-chat .ac-head .name { font-weight: 600; font-size: 14px; color: var(--text-1); }
.authviz-chat .ac-head .model {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--peri-300);
  border: 1px solid var(--stroke-1);
  border-radius: 100px;
  padding: 3px 10px;
  background: rgba(0,141,217,0.1);
}
.authviz-chat .ac-msgs { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.authviz-chat .ac-msg {
  max-width: 88%;
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: 14px;
}
.authviz-chat .ac-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--peri-600), var(--violet-500));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.authviz-chat .ac-msg.ai {
  align-self: flex-start;
  background: var(--ink-700);
  color: var(--text-2);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--stroke-2);
}
.authviz-chat .ac-msg.ai .cur {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--peri-400);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.authviz-chat .ac-input {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--stroke-2);
}
.authviz-chat .ac-input .field {
  flex: 1;
  font-size: 12.5px;
  color: var(--text-3);
  background: var(--ink-800);
  border: 1px solid var(--stroke-2);
  border-radius: 100px;
  padding: 9px 16px;
}
.authviz-chat .ac-input .send {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peri-500), var(--violet-500));
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}

/* floating model chips around the visual */
.authviz-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
}
.authviz-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(14,14,29,0.7);
  border: 1px solid var(--stroke-1);
  border-radius: 100px;
  padding: 7px 14px;
}
.authviz-chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---- auth pages without nav: discreet back-to-home link ---- */
.auth-back {
  position: absolute;
  top: 26px;
  left: clamp(20px, 4vw, 48px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text-3, #6e7299);
  text-decoration: none;
  z-index: 10;
  transition: color .2s ease;
}
.auth-back:hover { color: var(--text-1, #eef0ff); }
.auth-back img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(65, 178, 245, .14);
}

/* ---- authviz mock chat: match the REAL chat design ---- */
/* lime status dot in the model chip (like the live extension header) */
.authviz-chat .ac-head .model::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint-400);
  margin-right: 6px;
  vertical-align: 1px;
}
/* user bubble: flat solid logo blue (the real chat has no gradient) */
.authviz-chat .ac-msg.user {
  background: var(--peri-500);
}
/* timestamps under bubbles (mono micro-detail, like the live chat) */
.authviz-chat .ac-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
  line-height: 1;
  margin-top: -4px;
}
.authviz-chat .ac-time.user { align-self: flex-end; margin-right: 2px; }
.authviz-chat .ac-time.ai { align-self: flex-start; margin-left: 2px; }

/* ============ LIGHT THEME (site-wide toggle) ============ */
html[data-theme='light'] {
  --ink-950: #e9eef6;
  --ink-900: #fcfcfd;
  --ink-850: #f5f7fb;
  --ink-800: #edf1f7;
  --ink-700: #e2e8f1;
  --ink-600: #d3dce9;
  --text-1: #16161a;
  --text-2: #454b5e;
  --text-3: #7c8298;
  --stroke-1: rgba(22, 22, 26, 0.14);
  --stroke-2: rgba(22, 22, 26, 0.08);
}
html[data-theme='light'] body::before { opacity: 0.03; }
html[data-theme='light'] .auth-card { background: #ffffff; }
html[data-theme='light'] .panel { background: #ffffff; }
html[data-theme='light'] .input { background: #ffffff; }
html[data-theme='light'] .authviz-chat { background: #ffffff; }
html[data-theme='light'] .nav-pill { background: rgba(255, 255, 255, 0.78); }

/* theme toggle — IDENTICAL to the template's #theme-toggle:
   48x48 tab flush right (rounded-l-2xl, bottom-5). Dark mode: white bg
   + black sun. Light mode: #070b10 bg + white moon. No border/shadow. */
.theme-fab {
  position: fixed;
  right: 0;
  bottom: 20px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 16px 0 0 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
html[data-theme='light'] .theme-fab { background: #070b10; }
.theme-fab svg, .theme-fab span { pointer-events: none; display: block; }
.theme-fab .tf-sun { display: block; }
.theme-fab .tf-moon { display: none; }
html[data-theme='light'] .theme-fab .tf-sun { display: none; }
html[data-theme='light'] .theme-fab .tf-moon { display: block; }
