:root { --bg: #141414; --card: #1f1f1f; --line: #2e2e2e; --text: #f2f2f2; --dim: #a3a3a3; --accent: #f5b301; --warn: #ffb020; --bad: #ff6b6b; }
* { box-sizing: border-box; }
/* Author display rules (e.g. .savebar { display: flex }) would otherwise override the hidden attribute. */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.brand { color: var(--accent); font-weight: 800; letter-spacing: 3px; font-size: 20px; }
.who { color: var(--dim); font-size: 14px; }
.who button { margin-left: 12px; }
main { max-width: 980px; margin: 0 auto; padding: 24px 16px 120px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 20px; }
.card.narrow { max-width: 460px; margin: 48px auto; }
h1 { margin: 0 0 8px; font-size: 28px; }
h2 { margin: 0 0 12px; font-size: 20px; }
.muted { color: var(--dim); }
.error { color: var(--bad); min-height: 1.5em; }
.warning { color: var(--warn); }
label { display: block; margin: 12px 0; color: var(--dim); font-size: 14px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); }
input, select { width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #111; color: var(--text); font: inherit; }
label.inline input { width: auto; margin: 0; }
button { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: #2a2a2a; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
button:hover { background: #333; }
button.primary { background: var(--accent); border-color: var(--accent); color: #000; }
button:disabled { opacity: 0.5; cursor: default; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.row.spread { justify-content: space-between; }
.row select { width: auto; margin: 0; }
.row input[type='search'] { flex: 1 1 220px; width: auto; margin: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.grid input { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.list li .grow { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cats { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; }
.cats li.hidden .grow { color: #6a6a6a; text-decoration: line-through; }
.cats button { padding: 4px 10px; }
.star.on { color: var(--accent); border-color: var(--accent); }
.badge { font-size: 12px; padding: 1px 6px; border-radius: 4px; background: #333; color: var(--dim); }
.tabs { display: flex; gap: 6px; }
.tab.active { background: var(--text); color: #000; }
.status { font-size: 18px; font-weight: 700; }
.status.active { color: #5ad17a; } .status.trial { color: var(--accent); } .status.expired { color: var(--bad); }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; gap: 16px; padding: 14px; background: #222; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 20px; top: 20px; padding: 12px 18px; border-radius: 8px; background: #2a2a2a; border-left: 4px solid var(--accent); }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

/* ---------- admin ---------- */
main.wide { max-width: 1240px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.stat { margin: 0; }
.stat-value { font-size: 30px; font-weight: 800; }
.stat-label { color: var(--dim); margin-top: 2px; }
.small { font-size: 13px; }
.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--dim); font-weight: 600; font-size: 14px; }
.clickable { cursor: pointer; }
.clickable:hover { background: #262626; }
.pill-status { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; background: #333; }
.pill-status.active { background: #1f3d27; color: #7be495; }
.pill-status.trial { background: #3d3418; color: var(--accent); }
.pill-status.expired { background: #3d1f1f; color: var(--bad); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 12px 0 16px; }
.kv > div:nth-child(odd) { color: var(--dim); }
.small-input { width: 90px; margin: 0; }
.row input:not([type]) { flex: 1 1 260px; width: auto; margin: 0; }
button.danger { border-color: var(--bad); color: var(--bad); }
.narrow-left { max-width: 640px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.95em; }

.pay-option { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; padding: 10px 0; border-top: 1px solid var(--line); }
.pay-label { min-width: 150px; font-weight: 700; color: var(--dim); }
.pay-note { flex-basis: 100%; font-size: 13px; color: var(--dim); }
.price-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
.price-row legend { padding: 0 6px; font-weight: 700; }
.price-row label { flex: 1 1 160px; margin: 0; }
