:root {
  --bg: #0b1020;
  --panel: #141b30;
  --panel-2: #1b2440;
  --line: #263252;
  --text: #e7ecf6;
  --muted: #93a0bd;
  --brand: #3ea6ff;
  --brand-2: #1f6feb;
  --ok: #35c47a;
  --warn: #f5b02e;
  --bad: #ff5f6d;
  --chip: #22304f;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, #16305c 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  display: flex; flex-direction: column;
}

/* topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(10,14,28,.6); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.logo { font-size: 26px; }
.brand-title { font-weight: 700; letter-spacing: .2px; }
.brand-sub { color: var(--muted); font-size: 12px; }
nav { display: flex; gap: 8px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
nav a:hover { color: var(--text); background: var(--panel-2); }
nav a.active { color: var(--text); background: var(--brand-2); }
.who { color: var(--muted); font-size: 13px; margin-right: 4px; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 22px 60px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; border-top: 1px solid var(--line); }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.center-wrap { max-width: 440px; margin: 6vh auto 0; }
h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 0 0 14px; }
h3 { font-size: 15px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
p.lead { color: var(--muted); margin-top: 0; }

/* forms */
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 68px; font-family: ui-monospace, Menlo, monospace; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 16px; border-radius: 9px; border: 1px solid transparent;
  background: var(--brand-2); color: #fff; font-weight: 700; font-size: 14px;
  cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: rgba(255,95,109,.12); }
.btn.small { padding: 7px 11px; font-size: 13px; }
.btn.google { background: #fff; color: #202124; border-color: #dadce0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }

/* table */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: rgba(255,255,255,.02); }
.table-wrap { overflow-x: auto; }

/* chips / badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.ok { background: rgba(53,196,122,.15); color: var(--ok); }
.badge.bad { background: rgba(255,95,109,.15); color: var(--bad); }
.badge.warn { background: rgba(245,176,46,.15); color: var(--warn); }
.badge.muted { background: var(--chip); color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, monospace; }
.pre { background: #0a0f1e; border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; overflow-x: auto; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; white-space: pre; color: #cfe0ff; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; }
.tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.tile .n { font-size: 28px; font-weight: 800; }
.tile .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

/* tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 9px 14px; border-radius: 9px; font-weight: 700; cursor: pointer; }
.tabs button.active { color: #fff; background: var(--brand-2); border-color: var(--brand-2); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(4,7,15,.7); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 640px; width: 100%; box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto; }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(40px);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0;
  transition: all .25s; pointer-events: none; z-index: 100; max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.ok { border-color: var(--ok); }
.toast.bad { border-color: var(--bad); }

/* copy fields (token / config blocks) */
.copyfield { margin: 14px 0; }
.copyfield-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.copyfield-head h3 { margin: 0; }
.copybtn { white-space: nowrap; }
.copybtn.copied { color: var(--ok); border-color: var(--ok); background: rgba(53,196,122,.12); }
.pre.highlight { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hero-list { color: var(--muted); font-size: 14px; padding-left: 18px; }
.hero-list li { margin: 6px 0; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.copy-btn { cursor: pointer; }
@media (max-width: 620px) {
  .brand-sub { display: none; }
  main { padding: 18px 14px 50px; }
}
