/* Admin panel — a plain working tool in the site's colours. */
:root {
  --violet: #9945ff;
  --mint: #14f195;
  --gold: #ffc02e;
  --red: #ff6b8b;
  --text: #e9ebff;
  --muted: #9a9cc4;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(255, 255, 255, 0.045);
  --display: 'Unbounded', 'Chakra Petch', system-ui, sans-serif;
  --ui: 'Chakra Petch', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh;
  background: #080519;
  color: var(--text);
  font-family: var(--ui); font-weight: 500; font-size: 15px; line-height: 1.5;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; }
h2 { font-family: var(--display); font-weight: 800; font-size: 20px; }
h2 small, h3 small { font-family: var(--ui); font-weight: 500; font-size: 13px; color: var(--muted); }
h3 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 26px 0 8px; }
.muted { color: var(--muted); }
.error { color: var(--red); min-height: 1.2em; margin: 6px 0; font-size: 14px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--mint); }
.neg { color: var(--red); }

.brand {
  font-family: var(--display); font-weight: 900; font-size: 16px; letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--violet), var(--mint));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand span { font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; -webkit-text-fill-color: var(--muted); }
.brand:hover { text-decoration: none; }

/* buttons and fields */
.btn {
  display: inline-block; padding: 9px 15px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.07);
  color: var(--text); font: inherit; font-weight: 600; font-size: 14px;
}
.btn:hover { background: rgba(255, 255, 255, 0.13); text-decoration: none; }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; padding: 12px; margin-top: 4px; }
.btn.primary { background: linear-gradient(135deg, var(--violet), #6a2bd9); border-color: rgba(255, 255, 255, 0.2); }
.btn.primary:hover { filter: brightness(1.15); }
.btn.good { background: rgba(20, 241, 149, 0.14); border-color: rgba(20, 241, 149, 0.45); color: var(--mint); }
.btn.bad { background: rgba(255, 107, 139, 0.12); border-color: rgba(255, 107, 139, 0.45); color: var(--red); }
.link { background: none; border: 0; padding: 0; color: var(--mint); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35);
  color: var(--text); font: inherit; font-size: 15px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(153, 69, 255, 0.6); outline-offset: 0; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }

/* sign-in */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card { width: 100%; max-width: 380px; padding: 26px; border-radius: 16px; background: #120c2e; border: 1px solid var(--line); }
.card .brand { display: block; font-size: 20px; margin-bottom: 18px; }
.gate-actions { display: flex; gap: 8px; margin: 16px 0 0; }

/* layout */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap;
  padding: 10px 20px; background: rgba(8, 5, 25, 0.94); border-bottom: 1px solid var(--line);
}
nav { display: flex; gap: 2px; flex-wrap: wrap; margin-right: auto; }
nav button {
  padding: 7px 12px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
nav button:hover { color: var(--text); }
nav button.on { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #1a1200; font-size: 12px; line-height: 18px; text-align: center; }
.who { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.who #whoName { color: var(--text); font-weight: 700; }
.net { padding: 1px 8px; border-radius: 6px; font-size: 12px; border: 1px solid var(--line); }
.net.live { color: var(--mint); border-color: rgba(20, 241, 149, 0.4); }
.net.off { color: var(--gold); border-color: rgba(255, 192, 46, 0.4); }
main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 70px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input { width: 300px; max-width: 100%; }
.filters select { width: auto; }

/* notes */
.note { padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; font-size: 14px; border: 1px solid rgba(255, 192, 46, 0.4); background: rgba(255, 192, 46, 0.07); }
.note.bad { border-color: rgba(255, 107, 139, 0.5); background: rgba(255, 107, 139, 0.08); }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tile { padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.tile > span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tile b { display: block; margin: 3px 0 1px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tile.warn { border-color: rgba(255, 192, 46, 0.5); }
.tile.warn b { color: var(--gold); }

/* tables */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
td { white-space: nowrap; }
td.wrap { white-space: normal; min-width: 200px; overflow-wrap: anywhere; }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(255, 255, 255, 0.04); }
.empty { padding: 22px; text-align: center; color: var(--muted); }
.acts { display: flex; gap: 6px; justify-content: flex-end; }
.tag { display: inline-block; padding: 0 7px; border-radius: 6px; font-size: 12px; line-height: 19px; border: 1px solid var(--line); color: var(--muted); }
.tag.review, .tag.pending { color: var(--gold); border-color: rgba(255, 192, 46, 0.45); }
.tag.sent, .tag.confirmed, .tag.on { color: var(--mint); border-color: rgba(20, 241, 149, 0.4); }
.tag.failed, .tag.rejected, .tag.banned { color: var(--red); border-color: rgba(255, 107, 139, 0.45); }
.tag.approved, .tag.sending, .tag.admin { color: #c79bff; border-color: rgba(153, 69, 255, 0.5); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 14px; }

/* player */
.back { margin-bottom: 12px; }
.phead { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.phead .acts { margin-left: auto; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts span { color: var(--muted); white-space: nowrap; }
.facts b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* dialog */
.dialog { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(3, 2, 10, 0.75); }
.dialog .card { max-width: 420px; }
.dialog h3 { font-family: var(--display); font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--text); margin: 0 0 8px; }
.dialog p { margin: 0 0 14px; color: var(--muted); overflow-wrap: anywhere; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.seg { display: flex; gap: 6px; margin-bottom: 12px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; width: 0; }
.seg span { display: block; padding: 8px; border-radius: 9px; border: 1px solid var(--line); text-align: center; font-weight: 600; cursor: pointer; }
.seg input:checked + span { border-color: var(--violet); background: rgba(153, 69, 255, 0.2); }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 10px; background: #1a1340; border: 1px solid rgba(20, 241, 149, 0.5); font-weight: 600; font-size: 14px; max-width: 90vw; }
.toast.bad { border-color: rgba(255, 107, 139, 0.7); }

@media (max-width: 700px) {
  .top { padding: 10px 12px; }
  main { padding: 16px 12px 60px; }
  .who { width: 100%; justify-content: flex-end; order: 3; }
  nav { order: 4; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  nav button { white-space: nowrap; }
  .filters input { width: 100%; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile b { font-size: 18px; }
}
