:root {
  --p: #7c3aed; --p2: #6d28d9; --a: #f97316;
  --bg: #f6f5fa; --card: #fff; --fg: #1c1830; --mu: #6b6580; --ln: #e7e4ef; --soft: #f3f0fa;
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --r: 12px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f0c18; --card: #171225; --fg: #f4f2fa; --mu: #a39cb8; --ln: #2a2340; --soft: #1e1830; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--p); }
.boot { padding: 40px; text-align: center; color: var(--mu); }
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--ln); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 800; font-size: 17px; padding: 4px 10px 18px; text-decoration: none; color: var(--fg); }
.brand span { color: var(--a); }
.side a.nav { text-decoration: none; color: var(--mu); padding: 9px 12px; border-radius: 9px; font-weight: 500; display: flex; justify-content: space-between; }
.side a.nav:hover { background: var(--soft); color: var(--fg); }
.side a.nav.on { background: var(--soft); color: var(--p); font-weight: 700; }
.side .grow { flex: 1; }
.side .who { font-size: 13px; color: var(--mu); padding: 10px 12px; border-top: 1px solid var(--ln); }
.count { background: var(--a); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; font-weight: 700; line-height: 20px; }
main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 0 0 12px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.muted { color: var(--mu); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--ln); border-radius: var(--r); padding: 20px; margin-bottom: 18px; }
.grid { display: grid; gap: 14px; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 18px; }
.tile { background: var(--card); border: 1px solid var(--ln); border-radius: var(--r); padding: 16px; }
.tile .k { font-size: 13px; color: var(--mu); }
.tile .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile.hl { background: linear-gradient(135deg, var(--p), #a855f7); color: #fff; border: 0; }
.tile.hl .k { color: #ede9fe; }
.two { grid-template-columns: 1fr 1fr; }
button, .btn { font: inherit; cursor: pointer; border: 0; border-radius: 9px; padding: 9px 14px; font-weight: 600; background: var(--p); color: #fff; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--p2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost, .btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--ln); }
button.ghost:hover { background: var(--soft); }
button.danger { background: var(--bad); }
button.sm { padding: 5px 10px; font-size: 13px; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--ln); border-radius: 9px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--p) 40%, transparent); border-color: var(--p); }
input[type=checkbox] { width: auto; }
input[type=color] { padding: 2px; height: 38px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--mu); }
label.c { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.form { display: grid; gap: 14px; }
.form.cols { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ln); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--mu); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--p); border-color: var(--p); font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--ln); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mu); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl { overflow-x: auto; }
.st { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 9px; white-space: nowrap; background: var(--soft); color: var(--mu); }
.st.ACTIVE { background: #dcfce7; color: #166534; }
.st.PENDING_MODERATION, .st.AWAITING_PAYMENT { background: #fef3c7; color: #92400e; }
.st.REJECTED, .st.REFUND { background: #fee2e2; color: #991b1b; }
.st.REFUNDED { background: #e0e7ff; color: #3730a3; }
.msgs { display: flex; flex-direction: column; gap: 10px; }
.msg { border: 1px solid var(--ln); border-radius: var(--r); padding: 14px 16px; background: var(--card); }
.msg .top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--mu); }
.msg .top b { color: var(--fg); font-size: 15px; }
.msg p { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .why { font-size: 13px; color: var(--bad); }
.msg .acts { display: flex; gap: 6px; flex-wrap: wrap; }
pre.code { background: #1c1830; color: #e9d5ff; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.tier { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 10px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--ln); }
.preview { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 18px; align-items: start; }
iframe.pv { width: 100%; height: 720px; border: 1px dashed var(--ln); border-radius: var(--r); background: repeating-conic-gradient(var(--soft) 0 25%, transparent 0 50%) 0 0/20px 20px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: min(420px, 100%); }
.auth h1 { margin-bottom: 14px; }
.err { color: var(--bad); font-size: 14px; min-height: 1em; }
.toast { position: fixed; bottom: 18px; right: 18px; background: var(--fg); color: var(--bg); padding: 12px 16px; border-radius: 10px; font-weight: 600; z-index: 10; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.empty { text-align: center; padding: 36px 16px; color: var(--mu); }
.funnel .bar { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--p), var(--a)); }
.banner { background: #fef3c7; color: #92400e; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 16px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; }
  .side .grow, .side .who { display: none; }
  .brand { padding: 4px 10px; }
  .two, .preview { grid-template-columns: 1fr; }
  .tier { grid-template-columns: 1fr 1fr; }
}
[hidden] { display: none !important; }
