/* =====================================================================
   VerifyKit design system - premium SaaS, dark-first with light dashboard
   ===================================================================== */

:root {
  --bg: #070b16;
  --bg-soft: #0c1424;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(148, 178, 220, 0.16);
  --text: #eaf1ff;
  --muted: #93a4c2;
  --brand: #2fd6a5;
  --brand-2: #29a9ff;
  --brand-ink: #04211a;
  --danger: #ff6b6b;
  --warn: #ffc65c;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 60px rgba(2, 8, 20, 0.55);
  --font: "Plus Jakarta Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Light theme for dashboards (toggled with data-theme="light") */
[data-theme="light"] {
  --bg: #f5f7fc;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f4fa;
  --border: #e3e8f2;
  --text: #111a2e;
  --muted: #5b6b8a;
  --shadow: 0 18px 40px rgba(17, 26, 46, 0.08);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.18rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--muted); }

.container { width: min(1180px, 92%); margin-inline: auto; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); border: 1px solid var(--border);
  background: var(--surface); padding: .38rem .8rem; border-radius: 999px;
}

/* ------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 12px; padding: .8rem 1.35rem; font-weight: 650; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: .2s ease;
  font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(47, 214, 165, .28); }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: rgba(255, 107, 107, .14); border-color: rgba(255,107,107,.4); color: #ff9d9d; }
.btn-sm { padding: .5rem .85rem; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* -------------------------------------------------------------- navbar -- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: -.02em; font-size: 1.12rem; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink);
  font-weight: 900; font-size: .95rem;
}
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a { color: var(--muted); font-size: .94rem; font-weight: 550; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { display: flex; gap: .6rem; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: .45rem .6rem; cursor: pointer; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; inset: 70px 0 auto;
    background: var(--bg-soft); padding: 1rem 6%; gap: 1rem; border-bottom: 1px solid var(--border);
  }
}

/* ---------------------------------------------------------------- hero -- */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }
.hero::before {
  content: ""; position: absolute; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(41,169,255,.20), transparent 62%);
  top: -320px; right: -180px; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,214,165,.16), transparent 62%);
  bottom: -360px; left: -220px; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; position: relative; }
.hero p.lead { font-size: 1.1rem; max-width: 38rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-stats { display: flex; gap: 2.4rem; margin-top: 2.6rem; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 1.5rem; }
.hero-stats span { font-size: .84rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- card -- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; backdrop-filter: blur(12px);
}
.card-hover { transition: transform .25s ease, border-color .25s ease; }
.card-hover:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.icon-tile {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(47,214,165,.18), rgba(41,169,255,.18));
  border: 1px solid var(--border); margin-bottom: .9rem; font-size: 1.1rem;
}

/* --------------------------------------------------------- code window -- */
.code-window {
  background: #050912; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
}
.code-head { display: flex; gap: .45rem; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #2b3b57; }
.code-head span { margin-left: auto; font-size: .78rem; color: var(--muted); font-family: var(--mono); }
pre { margin: 0; padding: 1.1rem; overflow-x: auto; font-family: var(--mono); font-size: .84rem; line-height: 1.7; color: #cfe3ff; }
code { font-family: var(--mono); }
.inline-code { background: var(--surface-2); border: 1px solid var(--border); padding: .12rem .4rem; border-radius: 6px; font-size: .86em; }

/* ------------------------------------------------------------- pricing -- */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border-color: color-mix(in srgb, var(--brand) 55%, transparent); box-shadow: var(--shadow); }
.price { font-size: 2.4rem; font-weight: 800; margin: .4rem 0; }
.price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan-list { list-style: none; margin: 1rem 0 1.6rem; padding: 0; }
.plan-list li { padding: .38rem 0; color: var(--muted); font-size: .93rem; display: flex; gap: .55rem; }
.plan-list li::before { content: "✓"; color: var(--brand); }

/* ----------------------------------------------------------------- faq -- */
details.faq { border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.2rem; background: var(--surface); margin-bottom: .8rem; }
details.faq summary { cursor: pointer; font-weight: 650; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq[open] { border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
details.faq p { margin: .7rem 0 0; }

/* -------------------------------------------------------------- footer -- */
footer.site { border-top: 1px solid var(--border); padding: 56px 0 32px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer-grid h4 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.footer-grid a { display: block; padding: .22rem 0; color: var(--muted); font-size: .92rem; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* --------------------------------------------------------------- forms -- */
.field { margin-bottom: 1rem; }
label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; padding: .78rem .9rem; border-radius: 12px; font-family: inherit; font-size: .95rem;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); transition: .18s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,214,165,.16); }
select option { background: var(--bg-soft); color: var(--text); }
.checkbox { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--muted); }
.checkbox input { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.help { font-size: .82rem; color: var(--muted); }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(460px, 100%); }

/* -------------------------------------------------------------- alerts -- */
.alert { border-radius: 12px; padding: .8rem 1rem; font-size: .9rem; margin-bottom: 1rem; border: 1px solid var(--border); }
.alert-success { background: rgba(47,214,165,.12); border-color: rgba(47,214,165,.4); color: #a7f3dc; }
.alert-error { background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.4); color: #ffb4b4; }
.alert-info { background: rgba(41,169,255,.12); border-color: rgba(41,169,255,.35); color: #b6dcff; }
[data-theme="light"] .alert-success { color: #0d6a51; }
[data-theme="light"] .alert-error { color: #a12727; }
[data-theme="light"] .alert-info { color: #14568c; }

.badge { font-size: .74rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--border); }
.badge-ok { background: rgba(47,214,165,.14); color: #4fe0b4; }
.badge-bad { background: rgba(255,107,107,.14); color: #ff8f8f; }
.badge-warn { background: rgba(255,198,92,.14); color: #ffd489; }
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* ---------------------------------------------------------- dashboard -- */
.app { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-soft); border-right: 1px solid var(--border);
  padding: 1.2rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-nav { display: flex; flex-direction: column; gap: .18rem; margin-top: 1.4rem; }
.side-nav a { display: flex; align-items: center; gap: .65rem; padding: .62rem .8rem; border-radius: 11px; color: var(--muted); font-size: .93rem; font-weight: 550; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: linear-gradient(135deg, rgba(47,214,165,.18), rgba(41,169,255,.14)); color: var(--text); }
.side-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 1rem .8rem .3rem; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
  padding: .9rem 1.6rem; border-bottom: 1px solid var(--border); background: var(--bg-soft);
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 1.18rem; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); }
.profile-menu { position: relative; }
.profile-drop { position: absolute; right: 0; top: 46px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 14px; min-width: 200px; padding: .4rem; display: none; box-shadow: var(--shadow); z-index: 40; }
.profile-drop.open { display: block; }
.profile-drop a { display: block; padding: .55rem .7rem; border-radius: 9px; font-size: .9rem; color: var(--muted); }
.profile-drop a:hover { background: var(--surface-2); color: var(--text); }
.content { padding: 1.6rem; display: flex; flex-direction: column; gap: 1.2rem; }

.stat { padding: 1.15rem 1.25rem; }
.stat .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat .value { font-size: 1.9rem; font-weight: 800; margin-top: .25rem; }
.stat .delta { font-size: .82rem; color: var(--brand); }

.mobile-bar { display: none; }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 262px; transform: translateX(-100%); transition: .25s; z-index: 80; }
  .sidebar.open { transform: none; }
  .mobile-bar { display: inline-flex; }
  .content { padding: 1rem; }
}

/* --------------------------------------------------------------- table -- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 620px; }
thead th { text-align: left; padding: .8rem 1rem; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tbody td { padding: .78rem 1rem; border-top: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tbody tr:hover { background: var(--surface); }
.empty { padding: 2.2rem; text-align: center; color: var(--muted); }

.pager { display: flex; gap: .35rem; margin-top: 1rem; }
.pager a { padding: .4rem .75rem; border-radius: 9px; border: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.pager a.active { background: var(--surface-2); color: var(--text); }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }

/* --------------------------------------------------------------- misc --- */
.key-box { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.key-value { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border);
  padding: .6rem .8rem; border-radius: 10px; font-size: .88rem; word-break: break-all; flex: 1; min-width: 220px; }

.toast-stack { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: .5rem; z-index: 200; }
.toast { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1rem;
  font-size: .9rem; box-shadow: var(--shadow); animation: slide-in .25s ease; }
.toast.ok { border-color: rgba(47,214,165,.45); }
.toast.bad { border-color: rgba(255,107,107,.45); }
@keyframes slide-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.fade-up { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.in { opacity: 1; transform: none; }

.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
.docs-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: .15rem; }
.docs-nav a { padding: .5rem .75rem; border-radius: 10px; color: var(--muted); font-size: .92rem; }
.docs-nav a.active, .docs-nav a:hover { background: var(--surface); color: var(--text); }
.docs-body h2 { margin-top: 2rem; }
.docs-body table { min-width: 0; }
@media (max-width: 880px) { .docs-layout { grid-template-columns: 1fr; } .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; } }

.tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { background: none; border: none; color: var(--muted); padding: .55rem .9rem; cursor: pointer; font-family: inherit;
  font-size: .9rem; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--text); border-bottom-color: var(--brand); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.step { display: flex; gap: 1rem; }
.step-num { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: .9rem; }

/* ---- Dashboard progress bars ---- */
.bar{position:relative;display:block;height:9px;border-radius:999px;background:rgba(148,178,220,.16);overflow:hidden}
.bar-fill{display:block;height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,var(--brand),var(--brand-2,#2fd6a5));transition:width .8s cubic-bezier(.22,1,.36,1)}
.bar-fill.warn{background:linear-gradient(90deg,#f0a92c,#f7c66b)}
.bar-fill.danger{background:linear-gradient(90deg,#e5484d,#f0787c)}

/* --- Progress bars & filter rows -------------------------------------- */
.progress-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: .8rem; padding: .42rem 0; font-size: .9rem; }
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2, var(--brand))); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.1rem; }
.filters input, .filters select { flex: 0 1 220px; margin: 0; }
.filters .btn { flex: 0 0 auto; }
@media (max-width: 700px) { .progress-row { grid-template-columns: 90px 1fr auto; } .filters input, .filters select { flex: 1 1 100%; } }

.inline-form { display: inline-block; margin: 0 .25rem .25rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.checkbox { display: flex; align-items: center; gap: .5rem; margin: .45rem 0; font-size: .92rem; color: var(--muted); }
.message { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: .9rem; }
.message-unread { border-color: var(--brand); }
.message header { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-size: .86rem; margin-bottom: .4rem; }
.message h4 { margin: .2rem 0 .5rem; }
