:root {
  --bg: #08090b;
  --panel: #111318;
  --panel-2: #171a21;
  --line: rgba(255,255,255,.12);
  --text: #f7f9ff;
  --muted: rgba(247,249,255,.62);
  --accent: #ffb454;
  --blue: #36a3ff;
  --green: #35d07f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(145deg, #08090b, #151820 55%, #090a0c);
}
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
code { font-family: "DM Mono", ui-monospace, monospace; }
.hidden { display: none !important; }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0; }
.login-panel {
  width: min(440px, 100%);
  margin: 10vh auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17,19,24,.94);
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
}
.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #f9cc7a, #fb8a2f);
  color: #08090b;
  font-size: 30px;
  font-weight: 800;
}
.eyebrow {
  margin: 18px 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.05; }
h2 { font-size: 18px; }
.login-form { display: grid; gap: 14px; margin-top: 24px; }
label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: rgba(255,255,255,.07);
}
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(54,163,255,.15); }
.login-form button, .key-row button, .ghost-btn {
  height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
}
.login-form button { background: #f4f7ff; color: #090a0c; }
.status-line { min-height: 20px; margin-top: 14px; color: #ff7e7e; font-size: 13px; }
.dashboard { display: grid; gap: 18px; }
.topbar, .api-key-panel, .todo-panel, .module-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17,19,24,.92);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
}
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ghost-btn, .ghost-link {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
  font-weight: 800;
  text-decoration: none;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metrics article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.metrics span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.metrics strong { display: block; margin-top: 8px; font-size: 34px; }
.api-key-panel { display: grid; gap: 16px; padding: 20px; }
.key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.key-row code {
  min-width: 0;
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: #08090b;
}
.key-row button { color: #08090b; background: var(--accent); }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.tabs button {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  font-weight: 800;
}
.tabs button.active { color: #090a0c; background: #f4f7ff; }
.module-content { padding: 20px; }
.module-head { display: grid; gap: 8px; margin-bottom: 16px; }
.module-head p { color: var(--muted); line-height: 1.55; }
.endpoint-list { display: grid; gap: 10px; }
.endpoint {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.endpoint-main {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.method {
  min-width: 62px;
  padding: 5px 8px;
  border-radius: 6px;
  text-align: center;
  color: #090a0c;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.endpoint code { color: #f4f7ff; word-break: break-all; }
.endpoint pre {
  margin: 0;
  overflow-x: auto;
  padding: 12px;
  border-radius: 8px;
  background: #08090b;
  color: var(--muted);
}
.todo-panel { padding: 20px; }
.todo-panel ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }

@media (max-width: 760px) {
  .page { width: min(100% - 20px, 1180px); padding: 18px 0; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr; }
  .key-row { grid-template-columns: 1fr; }
}
