/* Schlichtes dunkles Design, reines CSS */
:root {
  --bg: #0d1016;
  --panel: #151a23;
  --panel2: #1b2130;
  --line: #262d3b;
  --text: #dfe4ee;
  --muted: #8892a6;
  --accent: #7aa2ff;
  --vyr: #c792ea;
  --ok: #5fd39a;
  --bad: #ff6b7a;
  --warn: #ffcb6b;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 10px 20px; background: rgba(13,16,22,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 18px; color: var(--text); }
.brand .k { color: var(--accent); } .brand .v { color: var(--vyr); }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); }
nav a.active, nav a:hover { background: var(--panel2); color: var(--text); text-decoration: none; }

main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 80px; }
.footer { position: fixed; bottom: 0; left: 0; right: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 20px; font-size: 12px; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
.card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-bottom: 16px; }
.grid > .card { margin-bottom: 0; }
.grid.two + .grid.two, .grid.two + .card, .card + .grid.two { margin-top: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 19px; font-weight: 600; margin-top: 2px; word-break: break-word; }

.row { display: flex; gap: 10px; align-items: flex-end; }
.row.wrap { flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.row > .field { flex: 1; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field > span { font-size: 13px; color: var(--muted); }

input, select, textarea, button, .button {
  font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
textarea { width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button, .button { cursor: pointer; display: inline-block; }
button:hover, .button:hover { border-color: var(--accent); text-decoration: none; }
button.primary { background: var(--accent); color: #0d1016; border-color: var(--accent); font-weight: 600; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.small { padding: 3px 8px; font-size: 12px; }

.kv { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }
tbody tr:hover { background: var(--panel2); }

.mono { font-family: var(--mono); font-size: 13px; }
.break { word-break: break-all; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.bad { color: var(--bad); }
.ok { color: var(--ok); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; letter-spacing: .03em; }
.badge-pow { background: rgba(122,162,255,.15); color: var(--accent); }
.badge-pos { background: rgba(199,146,234,.15); color: var(--vyr); }
.badge-genesis { background: rgba(255,203,107,.15); color: var(--warn); }
.role { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--panel2); }
.role-in { color: var(--ok); } .role-out { color: var(--bad); } .role-slashed { color: var(--warn); }
.warning { background: rgba(255,203,107,.1); border: 1px solid rgba(255,203,107,.4); color: var(--warn); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.warning button { margin-left: 8px; }
.preview { background: var(--panel2); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; min-height: 40px; }
.search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search input { flex: 1; min-width: 240px; }
.pager { justify-content: center; align-items: center; margin-top: 12px; }
canvas.qr { image-rendering: pixelated; border-radius: 6px; background: #fff; max-width: 100%; }
canvas.chart { width: 100%; height: 240px; display: block; }
.qr-box { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.steps { color: var(--muted); padding-left: 20px; margin-top: 0; }
.loading { text-align: center; padding: 80px 0; color: var(--muted); }

.toasts { position: fixed; right: 16px; bottom: 44px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.toast-ok { border-left-color: var(--ok); } .toast-error { border-left-color: var(--bad); }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 560px; width: 100%; }

@media (max-width: 640px) {
  .top { padding: 10px 12px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
  .row { flex-direction: column; align-items: stretch; }
  .row.wrap { flex-direction: row; }
}
