:root {
  --bg: #0f1117; --panel: #171a23; --line: #2a2f3d; --text: #e8eaf0;
  --muted: #9aa3b5; --accent: #6c8cff; --ok: #34c98e; --warn: #f2b04d; --bad: #ef5d5d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, sans-serif; }
header { display: flex; align-items: center; gap: 24px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
header h1 { margin: 0; font-size: 18px; } header h1 span { color: var(--accent); }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
nav a.active, nav a:hover { color: var(--text); background: #222738; }
main { padding: 20px; max-width: 1100px; margin: 0 auto; }
h2 { margin: 0 0 12px; } h3 { margin: 18px 0 6px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: none; }
small, .hint, time { color: var(--muted); } .hint { font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.card b { font-size: 20px; display: block; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inline { display: flex; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0; }
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 13px; }
input, select, textarea { width: 100%; padding: 8px; background: #10131b; color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
textarea { font-family: inherit; resize: vertical; }
button { padding: 8px 14px; background: #222738; color: var(--text); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font: inherit; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #0b0d13; font-weight: 600; margin-top: 8px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid var(--line); margin: 1px 0; }
.chip-ready, .chip-completed { color: var(--ok); border-color: var(--ok); }
.chip-busy, .chip-running { color: var(--warn); border-color: var(--warn); }
.chip-auth_required, .chip-rate_limited, .chip-error, .chip-failed, .chip-cancelled { color: var(--bad); border-color: var(--bad); }
.chip-queued { color: var(--accent); border-color: var(--accent); }
.chip-unavailable, .chip-disabled { color: var(--muted); }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed .type { color: var(--accent); font-weight: 600; margin-right: 8px; }
.error { color: var(--bad); }
#quota-banner { background: #5c1f1f; color: #ffd7d7; text-align: center; padding: 10px; font-size: 14px; }
#quota-banner button { background: #ffd7d7; color: #5c1f1f; border: none; margin-left: 8px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; max-width: 640px; width: 90%; }
dialog pre { white-space: pre-wrap; font: 13px/1.5 system-ui; max-height: 40vh; overflow: auto; background: #10131b; padding: 12px; border-radius: 6px; }
dialog .row { margin-top: 12px; }
