/* AllowID demo — shared design system */
:root {
  --bg: #0e1420;
  --panel: #17202f;
  --panel-2: #1d2939;
  --line: #2b3a52;
  --text: #e8eef7;
  --muted: #93a4bc;
  --brand: #2e5aac;
  --brand-2: #4d82e0;
  --accent: #35c48d;
  --danger: #e35d6a;
  --warn: #e0a83f;
  --radius: 14px;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #1a2b4d 0%, var(--bg) 55%);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.85em; word-break: break-all; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(14, 20, 32, 0.8); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.topbar .logo { font-weight: 800; letter-spacing: 0.3px; font-size: 17px; color: var(--text); }
.logo .dot { color: var(--accent); }
.topbar .crumb { color: var(--muted); font-size: 14px; }
.topbar .spacer { flex: 1; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 26px 22px 80px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card + .card { margin-top: 16px; }
.card h2 { font-size: 17px; margin-bottom: 10px; }
.card h3 { font-size: 15px; margin: 14px 0 6px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; border-radius: 10px;
  padding: 10px 16px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--brand-2); background: rgba(77, 130, 224, 0.08); }
.btn.green { background: var(--accent); color: #06281b; }
.btn.red { background: var(--danger); }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
input, select, textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 15px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.2px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.pill.green { color: #7ce7bd; border-color: #22694e; background: #12321f66; }
.pill.red { color: #ff9aa3; border-color: #7c3a41; background: #3a181c66; }
.pill.blue { color: #a9c6f5; border-color: #3a5a8c; background: #16233d66; }
.pill.amber { color: #f2ca7e; border-color: #6d5426; background: #3a2d1266; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 18px; border-radius: 12px; box-shadow: 0 10px 30px #0008;
  z-index: 100; font-size: 14px; max-width: 90vw;
}
.toast.err { border-color: var(--danger); }

.notice {
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: var(--muted); margin-top: 12px;
}
.notice b { color: var(--warn); }

code.k { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-family: var(--mono); font-size: 0.85em; }

.qr-box { background: #fff; border-radius: 12px; padding: 12px; display: inline-block; line-height: 0; }
.qr-box svg, .qr-box img { display: block; }

.statbar { height: 10px; background: var(--panel-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.statbar > div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; transition: width 0.4s; }

@media (max-width: 640px) { .wrap { padding: 18px 14px 60px; } }
