:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --line: rgba(255,255,255,.08);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --danger: #fb7185;
  --ok: #34d399;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, Arial, sans-serif; }
body { min-height: 100vh; }
.app-shell { max-width: 860px; margin: 0 auto; padding: 14px; }
.topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom: 14px; }
h1 { margin: 4px 0 0; font-size: 28px; }
.eyebrow { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.panel { background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 14px 38px rgba(0,0,0,.22); }
.panel.compact { padding: 12px 14px; }
.tabs { display:flex; gap:8px; margin: 14px 0; flex-wrap: wrap; }
.tab, .btn, .ghost-btn, .danger-btn, .ok-btn { border: 0; border-radius: 14px; padding: 11px 14px; cursor:pointer; font-weight:600; }
.tab { background: var(--panel-2); color: var(--text); }
.tab.active { background: var(--accent); color: #082f49; }
.ghost-btn { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn { background: var(--accent); color: #082f49; }
.ok-btn { background: var(--ok); color: #052e25; }
.danger-btn { background: var(--danger); color: #4c0519; }
.stack { display:grid; gap:12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.row { display:flex; gap:8px; flex-wrap: wrap; align-items:center; }
.spread { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.muted { color: var(--muted); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; background: rgba(255,255,255,.03); border-radius: 12px; padding: 12px; border: 1px solid var(--line); }
input[type="file"], textarea, select { width: 100%; background: #0b1220; border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 12px; }
textarea { min-height: 88px; resize: vertical; }
.kv { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:10px; margin-top:10px; }
.kpi { background: rgba(255,255,255,.03); border:1px solid var(--line); border-radius:14px; padding:12px; }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font-size: 24px; font-weight: 800; margin-top: 4px; }
hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }
a { color: var(--accent); }
@media (max-width: 640px) {
  .topbar { flex-direction: column; }
  h1 { font-size: 24px; }
}
