:root {
  --bg: #0f1221;
  --card: #1a1f36;
  --line: #2a3152;
  --text: #e7eaf6;
  --muted: #9aa3c7;
  --accent: #5b8cff;
  --good: #2ecc71;
  --warn: #ffb454;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%;
}
header {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
header h1 { font-size: 17px; margin: 0; flex: 1; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; margin-left: 14px; }
nav a.active { color: var(--accent); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input, select, textarea, button {
  font: inherit; width: 100%; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #11152a; color: var(--text);
}
textarea { min-height: 70px; resize: vertical; }
button {
  background: var(--accent); border: none; color: #fff; font-weight: 600; cursor: pointer; width: auto;
  padding: 12px 18px;
}
button.secondary { background: #2a3152; }
button.block { width: 100%; }
button.big { font-size: 18px; padding: 18px; }
button:disabled { opacity: .5; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #11152a; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }
.ok { color: var(--good); }
.warn { color: var(--warn); }
.scanbox { text-align: center; padding: 8px; }
.scanbox .uid { font-size: 20px; font-weight: 700; word-break: break-all; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.item .grow { flex: 1; }
.del { background: #3a1f2a; color: #ff9aa9; padding: 8px 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--good); color: #04210f; padding: 12px 18px; border-radius: 10px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.options-list .opt { display: flex; gap: 8px; }
.q-options button { width: 100%; margin-top: 6px; background: #11152a; border: 1px solid var(--line); }
.q-options button.sel { background: var(--accent); border-color: var(--accent); }
