:root {
  --bg: #050706;
  --text: #f3f7f4;
  --muted: #8b9a91;
  --green: #3dde7a;
  --green-deep: #04180c;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(12, 17, 15, 0.88);
  --danger: #ff6b6b;
  --warn: #f0b429;
  --info: #7ec8ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 84px; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 50% -140px, rgba(48, 190, 100, 0.2), transparent 60%),
    radial-gradient(680px 480px at 108% 108%, rgba(16, 92, 78, 0.28), transparent 55%),
    radial-gradient(480px 300px at -8% 72%, rgba(18, 64, 42, 0.18), transparent 50%),
    linear-gradient(180deg, #070908 0%, #050706 100%);
}
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}
.skip:focus {
  left: 12px;
  z-index: 30;
  background: white;
  color: black;
  padding: 8px 12px;
  border-radius: 8px;
}

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.is-dashboard .wrap { width: min(1180px, calc(100% - 32px)); }
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(5, 7, 6, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, #6af59a, #2fce68);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 0 24px rgba(61, 222, 122, 0.28);
}
.brand-name { font-size: 13px; letter-spacing: 0.18em; font-weight: 700; }
.brand-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-top: 2px; }
.account-chip {
  display: inline-flex !important;
  margin-top: 4px !important;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(61, 222, 122, 0.12);
  border: 1px solid rgba(61, 222, 122, 0.28);
  color: #9af0bc !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  letter-spacing: 0.04em !important;
  text-transform: lowercase;
}
.nav-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #63f294, #2fce68);
  color: var(--green-deep);
  box-shadow: 0 8px 24px rgba(47, 206, 104, 0.22);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e7f2ec;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.16); }
.btn-danger { background: rgba(255, 93, 93, 0.12); color: #ffb4b4; border-color: rgba(255, 93, 93, 0.35); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 18px; font-size: 15px; }
.btn-pill { border-radius: 999px; }
.mini { padding: 8px 12px; font-size: 12px; border-radius: 999px; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.text-btn { background: none; border: 0; color: var(--green); padding: 0; cursor: pointer; font: inherit; }
.danger-text { color: #ff8d8d; }

.hero { text-align: center; padding: 78px 0 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(61, 222, 122, 0.28);
  background: rgba(61, 222, 122, 0.08);
  color: #c8f8da;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  margin-bottom: 18px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
h1 { font-size: clamp(42px, 6vw, 68px); letter-spacing: -0.045em; line-height: 1.02; font-weight: 800; }
h1 .accent { color: var(--green); }
.lede { margin: 16px auto 0; max-width: 560px; color: var(--muted); font-size: 16.5px; line-height: 1.6; }
.hero-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.feature h3 { margin: 12px 0 6px; font-size: 16px; }
.feature p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.feat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(61, 222, 122, 0.1);
  color: var(--green);
}
.code-card { margin-top: 18px; }
.code-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.code-top b { color: #d5e6dc; letter-spacing: 0; font-weight: 600; }
.latency, .ms {
  border: 1px solid rgba(61, 222, 122, 0.35);
  color: var(--green);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  letter-spacing: 0;
}
pre.code, .code {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: #d7f5e4;
  white-space: pre-wrap;
  word-break: break-word;
}
.res { color: var(--green); }
.sdk { margin: 18px auto 0; }
footer { padding: 28px 0 42px; text-align: center; color: var(--muted); font-size: 13px; }
h2 { font-size: 18px; margin-bottom: 8px; }

.page { padding: 22px 0 72px; display: grid; gap: 16px; }
.is-dashboard .page { gap: 18px; padding-top: 28px; }

.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 2px 4px;
}
.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.dash-title {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
  font-weight: 750;
  line-height: 1.05;
}
.dash-copy {
  margin-top: 8px;
  color: var(--muted);
  max-width: 460px;
  font-size: 15px;
}
.dash-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat {
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.stat:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.14); }
.stat:nth-child(2)::before { background: var(--green); }
.stat:nth-child(3)::before { background: var(--info); }
.stat:nth-child(4)::before { background: #8fd0ff; }
.stat:nth-child(5)::before { background: var(--danger); }
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-left: 8px;
}
.stat strong {
  display: block;
  margin-top: 12px;
  padding-left: 8px;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: #d5e0da;
}
.stat-icon.ok { color: var(--green); background: rgba(61, 222, 122, 0.12); }
.stat-icon.info { color: var(--info); background: rgba(126, 200, 255, 0.12); }
.stat-icon.warn { color: #8fd0ff; background: rgba(80, 160, 255, 0.12); }
.stat-icon.bad { color: var(--danger); background: rgba(255, 107, 107, 0.12); }

.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.section-title { display: flex; gap: 8px; align-items: center; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; margin: 0; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 4px; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-ok { background: rgba(61, 222, 122, 0.14); color: #7af0a8; }
.pill-bad { background: rgba(255, 107, 107, 0.14); color: #ff9d9d; }
.pill-warn { background: rgba(240, 180, 41, 0.14); color: #ffd36a; }
.pill-info { background: rgba(126, 200, 255, 0.14); color: #a9d8ff; }
.pill-muted { background: rgba(255, 255, 255, 0.06); color: var(--muted); }

.split, .api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: grid; gap: 14px; }
.form-stack { display: grid; gap: 12px; }
.panel-box {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
}
.issue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-bottom: 8px;
}
.issue-memo { grid-column: 1 / -1; }
.issue-actions { grid-column: 1 / -1; }
.issue-actions .btn { min-width: 180px; }
.issue-card { padding-bottom: 22px; }

.field label, .lbl {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.field-head label { margin: 0; }
input, select, textarea {
  width: 100%;
  background: rgba(7, 11, 9, 0.9);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(61, 222, 122, 0.65);
  box-shadow: 0 0 0 3px rgba(61, 222, 122, 0.15);
}
::placeholder { color: #66756e; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inner {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
}
.inner + .inner, .response-block { margin-top: 10px; }
.inner h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legend li { font-size: 13px; color: #c5d1cb; }
.legend b { color: white; font-weight: 600; }
.banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(61, 222, 122, 0.25);
  background: rgba(61, 222, 122, 0.08);
}
.banner p { font-size: 14px; }
.banner-warn { border-color: rgba(240, 180, 41, 0.35); background: rgba(240, 180, 41, 0.08); }
.error { color: #ff9b9b; min-height: 1.2em; font-size: 13px; }
.tok-key { color: #9ad7ff; }
.tok-str { color: #b6f5c9; }
.tok-num { color: #ffd18a; }
.is-ok { border-color: rgba(61, 222, 122, 0.35); }
.is-bad { border-color: rgba(255, 107, 107, 0.4); }

.tabs {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  padding: 4px;
  margin: 18px 0 14px;
}
.tab {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover { color: #e7f2ec; }
.tab.is-on {
  color: var(--green-deep);
  background: linear-gradient(180deg, #63f294, #2fce68);
  box-shadow: 0 6px 16px rgba(47, 206, 104, 0.2);
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.toolbar input, .toolbar select, .product-row input { width: auto; }
.toolbar select { min-width: 140px; }
input.grow { flex: 1 1 220px; min-width: 180px; }
.toolbar-right { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.table-wrap {
  overflow: auto;
  max-height: 560px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.18);
}
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 14px;
  background: rgba(16, 22, 20, 0.95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
}
td { padding: 13px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 13px; vertical-align: middle; }
tbody tr:hover td { background: rgba(61, 222, 122, 0.04); }
tr.is-dead td { opacity: 0.62; }
.key-cell { display: grid; gap: 2px; }
.key-cell small { color: var(--muted); font-family: Outfit, "Segoe UI", sans-serif; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: #d5e0da;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.14); }
.icon-btn.danger { color: #ff8d8d; }
.muted { color: var(--muted); }
.is-late { color: var(--warn); }
.empty { padding: 36px 12px; text-align: center; color: var(--muted); }
.product-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.login-shell { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 32px 16px 64px; }
.login-card { width: min(440px, 100%); display: grid; gap: 14px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  margin: 0;
}
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}
.modal {
  width: min(720px, 100%);
  max-height: min(82vh, 780px);
  overflow: auto;
  background: linear-gradient(180deg, #141b18, #101614);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.modal h3 { font-size: 18px; margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
#toasts { position: fixed; top: 16px; right: 16px; z-index: 50; display: grid; gap: 8px; width: min(320px, calc(100% - 32px)); }
.toast {
  background: #14201a;
  border: 1px solid rgba(61, 222, 122, 0.35);
  color: white;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.bad { border-color: rgba(255, 107, 107, 0.5); }
[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .features, .split, .api-grid { grid-template-columns: 1fr; }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .issue-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-inner { padding: 12px 0; flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr 1fr; }
  .product-row { grid-template-columns: 1fr; }
  .tabs { width: 100%; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot, .toast { animation: none; }
  .btn, .stat, .tab, .icon-btn { transition: none; }
}
