:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #10141b;
  --panel-2: #151b24;
  --line: #253041;
  --text: #eef3fb;
  --muted: #8e9aad;
  --accent: #0ea5e9;
  --ok: #22c55e;
  --danger: #ef4444;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(14,165,233,.22), transparent 28rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card, .card {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

.login-card {
  width: min(360px, 100%);
}

.shell {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

h1, h2, p { margin: 0; }
h1 { font-size: 26px; letter-spacing: 0; }
h2 { font-size: 15px; margin-bottom: 12px; }
p, label, .muted { color: var(--muted); font-size: 13px; }
label { display: block; margin: 10px 0 6px; font-weight: 700; }

input, select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090d13;
  color: var(--text);
  padding: 8px 10px;
}

button, .button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

form > button { width: 100%; margin-top: 12px; }
.ghost { background: var(--panel-2); border: 1px solid var(--line); }
.danger { background: var(--danger); }
.copy-code { background: #0f766e; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }

.grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.alert {
  padding: 10px 12px;
  border-radius: 7px;
  margin-bottom: 12px;
}
.ok { background: rgba(34,197,94,.14); color: #bbf7d0; border: 1px solid rgba(34,197,94,.35); }
.error { background: rgba(239,68,68,.14); color: #fecaca; border: 1px solid rgba(239,68,68,.35); }

.table { display: grid; gap: 6px; overflow-x: visible; }
.head, .line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  padding: 10px;
  border-radius: 7px;
}
.head { display: none; }
.line { background: var(--panel-2); border: 1px solid rgba(255,255,255,.04); }
.codes .head, .codes .line { grid-template-columns: 1fr; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 900; }
.field { display: block; color: var(--text); }
.field strong { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.actions form {
  display: flex;
  gap: 6px;
  margin: 0;
}
.actions input { width: 62px; min-height: 32px; }
.actions button { min-height: 32px; padding: 6px 9px; }

.list { display: grid; gap: 6px; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  background: var(--panel-2);
  border-radius: 7px;
}
.row span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .shell { padding: 12px; }
  .topbar { align-items: flex-start; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
