:root {
  --bg: #0b1220;
  --surface: #121b2c;
  --surface-2: #18233a;
  --line: #22304a;
  --line-2: #2c3d5c;
  --text: #eef3fb;
  --soft: #a9b8cf;
  --muted: #7486a3;
  --yellow: #f5b301;
  --red: #ef4a43;
  --green: #2fbf71;
  --blue: #4aa3ff;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--yellow); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 20% -10%, #1a2a4a 0%, transparent 60%), var(--bg); }
.login__box { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.login__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login h1 { margin: 0; font-size: 20px; }
.login p.lead { margin: 0 0 18px; color: var(--soft); }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--soft); font-weight: 600; }
.field input, .field select { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 15px; font-weight: 400; }
.field input:focus, .field select:focus { outline: 2px solid var(--yellow); outline-offset: 1px; border-color: transparent; }
.field small { color: var(--muted); font-weight: 400; }
.check { display: flex; gap: 10px; align-items: center; color: var(--soft); margin: 4px 0 18px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--yellow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--soft); }
.btn--primary { background: var(--yellow); color: #111; border-color: var(--yellow); }
.btn--primary:hover { filter: brightness(1.08); border-color: var(--yellow); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.error { color: #ffb4ae; background: rgba(239,74,67,.12); border: 1px solid rgba(239,74,67,.35); padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 0 0 14px; }
.ok { color: #9be7bd; background: rgba(47,191,113,.12); border: 1px solid rgba(47,191,113,.35); padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 0 0 14px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; font-weight: 800; letter-spacing: .02em; }
.brand__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; border: 1px solid var(--line-2); flex: none; }
.brand small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--soft); text-decoration: none; font-weight: 600; }
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--yellow); }
.side__foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.linkbtn { background: none; border: 0; color: var(--soft); cursor: pointer; padding: 6px 0; font-weight: 600; }
.linkbtn:hover { color: var(--yellow); }

.main { min-width: 0; padding: 26px 30px 40px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.top h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.top__meta { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.dot.is-off { background: var(--red); }
.menu-btn { display: none; }
.scrim { display: none; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: border-color .15s; }
a.tile:hover { border-color: var(--line-2); }
.tile__label { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 13px; font-weight: 600; }
.tile__label svg { width: 18px; height: 18px; color: var(--tile-accent, var(--yellow)); }
.tile__value { font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile__sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__sub b { color: var(--soft); font-weight: 600; }
.tile.is-unknown .tile__value { color: var(--muted); }

/* ---------- on air ---------- */
.grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card__head h2 { margin: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 6px; background: rgba(239,74,67,.15); color: #ff8f88; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.live.is-standby { background: rgba(169,184,207,.12); color: var(--soft); }
.live.is-standby::before { background: var(--muted); animation: none; }
.onair { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 20px; align-items: center; }
.cover { width: 100%; aspect-ratio: 1; border-radius: 14px; background: var(--surface-2) center / cover no-repeat; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.cover svg { width: 42%; height: 42%; color: var(--line-2); }
.cover.has-art svg { display: none; }
.onair__artist { color: var(--yellow); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0 0 4px; }
.onair__title { margin: 0; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.progress { margin-top: 14px; }
.progress__bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress__bar span { display: block; height: 100%; width: 0; background: var(--yellow); border-radius: 999px; transition: width 1s linear; }
.progress__times { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.onair__note { color: var(--muted); margin: 10px 0 0; font-size: 13px; }
.next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.next li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.next li .cover { border-radius: 9px; }
.next li .cover svg { width: 50%; height: 50%; }
.next__text { min-width: 0; }
.next__text b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next__text span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.empty { color: var(--muted); font-size: 14px; margin: 0; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: rgba(245,179,1,.08); border: 1px solid rgba(245,179,1,.3); color: #f6d47a; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.notice ul { margin: 4px 0 0; padding-left: 18px; color: var(--soft); }

/* ---------- settings ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
.form-grid .full { grid-column: 1 / -1; }
.section-title { font-size: 15px; margin: 6px 0 14px; color: var(--text); }
.stack { display: grid; gap: 14px; }
.results { display: grid; gap: 6px; margin-top: 14px; font-size: 14px; }
.results div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.results b { color: var(--soft); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tables { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; }
.tables__list { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.tables__list button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; cursor: pointer; color: var(--soft); }
.tables__list button:hover, .tables__list button.is-on { background: var(--surface-2); color: var(--text); }
.tables__list small { color: var(--muted); }
.peek { overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: 10px; }
.peek table { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.peek th, .peek td { padding: 6px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.peek th { position: sticky; top: 0; background: var(--surface-2); color: var(--soft); }
.cols { color: var(--muted); font-size: 12px; margin: 0 0 8px; }

.soon { text-align: center; padding: 60px 20px; }
.soon svg { width: 54px; height: 54px; color: var(--line-2); }
.soon h2 { margin: 12px 0 6px; }
.soon p { color: var(--muted); max-width: 460px; margin: 0 auto; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 40; transform: translateX(-102%); transition: transform .2s ease-out; height: 100%; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .shell.menu-open .side { transform: none; }
  .shell.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30; }
  .menu-btn { display: inline-flex; width: 42px; height: 42px; padding: 0; border-radius: 10px; }
  .main { padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); }
  .top { margin-bottom: 14px; }
  .top h1 { font-size: 20px; flex: 1; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 13px 14px; }
  .tile__value { font-size: 28px; }
  .onair { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .tables { grid-template-columns: 1fr; }
  .tables__list { max-height: 220px; }
  .results div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 420px) { .onair { grid-template-columns: 1fr; } .onair .cover { width: min(240px, 100%); margin: 0 auto; } .onair__text { text-align: center; } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } .side { transition: none; } }
@media (max-width: 860px) { .tiles .tile:last-child:nth-child(odd) { grid-column: span 2; } }
@media (min-width: 861px) and (max-width: 1280px) { .tiles .tile:nth-child(4), .tiles .tile:nth-child(5) { grid-column: span 1; } }

/* ---------- listener stats ---------- */
.headline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.hl { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.hl b { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hl span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.hl:first-child b { color: var(--yellow); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--soft); font-weight: 700; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--yellow); }
.period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.period select, .period input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); }
.period span { color: var(--muted); }
.btn--icon { width: 40px; padding: 9px 0; font-size: 18px; line-height: 1; }
.btn--small { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn--danger { border-color: rgba(239,74,67,.5); color: #ff9b95; }
.btn--danger:hover { background: rgba(239,74,67,.15); border-color: var(--red); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpis--small { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kpi__icon { color: var(--tile-accent, var(--yellow)); }
.kpi b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi > span { color: var(--soft); font-size: 13px; font-weight: 600; }
.kpi small { color: var(--muted); }
.kpi--small { padding: 12px; }
.kpi--small b { font-size: 20px; }
.chg { font-size: 12px; font-weight: 700; color: var(--muted); }
.chg--up { color: var(--green); }
.chg--down { color: #ff8f88; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.grid2 + .grid2 { margin-top: 0; }
.chart { min-height: 120px; }
.ch { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.ch-total { fill: var(--text); font-size: 26px; font-weight: 800; font-family: var(--font); }
.ch-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--soft); }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ch-legend--col { flex-direction: column; gap: 6px; margin: 0; }
.ch-legend--col li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 4px; }
.ch-legend--col span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-legend--col b { color: var(--text); font-variant-numeric: tabular-nums; }
.ch-donut { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; }
.ch--donut { max-width: 150px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.tbl .actions { white-space: nowrap; text-align: right; }
.tbl .actions .btn + .btn { margin-left: 6px; }
.flag { font-size: 18px; vertical-align: -2px; }
.share { display: inline-block; width: 60px; height: 6px; border-radius: 99px; background: var(--surface-2); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.share i { display: block; height: 100%; background: var(--yellow); }
.credit { color: var(--muted); font-size: 11px; margin: 10px 0 0; }
.live-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.live-now { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.live-now > span { color: var(--soft); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.live-now > b { font-size: 64px; font-weight: 800; line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.devbar { display: flex; width: 100%; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; }
.devbar i { display: block; }
.map { height: 340px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
@media (max-width: 1280px) { .headline { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis--small { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .grid3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis--small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-grid { grid-template-columns: 1fr; }
  .map { height: 260px; }
  .top__meta .btn { padding: 8px 10px; font-size: 13px; }
  .ch-donut { grid-template-columns: 120px minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .headline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .period select { flex: 1 1 100%; order: -1; }
  .period input { flex: 1 1 120px; min-width: 120px; }
  .tbl .hide-sm { display: none; }
  .tbl td, .tbl th { padding: 8px 6px; }
  .share { display: none; }
}
.live-now [data-status], .test-row, .test td { overflow-wrap: anywhere; }

.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
@media (max-width: 1500px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid4 { grid-template-columns: 1fr; } }
.tbl .small { font-size: 12px; max-width: 420px; overflow-wrap: anywhere; }
[data-hidden] { margin-top: 14px; }

.ch-all { margin-top: 10px; font-size: 13px; }
.ch-all summary { cursor: pointer; color: var(--muted, #9aa8bd); }
.ch-all ul { margin-top: 8px; max-height: 260px; overflow: auto; }
.muted { color: var(--muted, #9aa8bd); }
[data-unrec] { margin-top: 14px; }
.flag-img { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; vertical-align: -2px; margin-right: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.flag-none { font-size: 16px; vertical-align: -2px; margin-right: 4px; }
.flag { font-size: inherit; }

.pg-title { font-weight: 600; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-path { color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-msg { grid-column: 1 / -1; margin: 4px 0 0; }

.tbl .up { color: #2fbf71; } .tbl .down { color: #ef4a43; }
.tbl-scroll { max-height: 420px; overflow: auto; }
.st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st-ok { background: rgba(47,191,113,.15); color: #2fbf71; }
.st-no { background: rgba(239,74,67,.15); color: #ff7a73; }
.st-wait { background: rgba(154,168,189,.15); color: #b8c4d6; }
.stack { display: grid; gap: 14px; align-content: start; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input { font: inherit; font-size: 14px; color: var(--text, #e8eef8); background: var(--surface-2, #1a2336); border: 1px solid var(--line, #26324a); border-radius: 9px; padding: 7px 10px; min-width: 200px; }
.seg { display: inline-flex; border: 1px solid var(--line, #26324a); border-radius: 9px; overflow: hidden; }
.seg button { font: inherit; font-size: 13px; background: transparent; color: var(--muted); border: 0; padding: 7px 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--yellow, #f5b301); color: #111; font-weight: 700; }
.kpi small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.card a { color: inherit; }
@media (max-width: 760px) { .card__head:has(.filters) { flex-direction: column; align-items: stretch; gap: 8px; } .filters { width: 100%; } .filters input { min-width: 0; flex: 1 1 100%; } .seg { width: 100%; } .seg button { flex: 1; padding: 7px 4px; } .tbl .mail-sm { display: none; } }

/* Web forms */
.forms-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.forms-bar input, .forms-bar select { font: inherit; font-size: 14px; color: var(--text, #e8eef8); background: var(--surface-2, #1a2336); border: 1px solid var(--line, #26324a); border-radius: 9px; padding: 8px 10px; }
.forms-bar input { flex: 1 1 240px; min-width: 0; }
.forms-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.forms-list { padding: 8px; max-height: calc(100vh - 290px); overflow: auto; }
.forms-detail { position: sticky; top: 14px; }
.msg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.msg { width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; }
.msg:hover { background: var(--surface-2, #1a2336); }
.msg.is-sel { border-color: var(--yellow, #f5b301); background: var(--surface-2, #1a2336); }
.msg.is-done { opacity: .6; }
.msg__top { display: flex; justify-content: space-between; gap: 8px; }
.msg__sub { font-size: 14px; }
.msg__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kvs { display: grid; gap: 6px; margin: 4px 0 14px; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.kv > span { color: var(--muted); }
.kv a { color: inherit; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2, #1a2336); border-radius: 10px; padding: 14px; line-height: 1.55; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
@media (max-width: 1000px) { .forms-grid { grid-template-columns: 1fr; } .forms-list { max-height: 55vh; } .forms-detail { position: static; } }

/* Security */
.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sec-item { border: 1px solid var(--line, #26324a); border-radius: 12px; padding: 14px; }
.sec-item h3, .sec-h { margin: 0 0 8px; font-size: 15px; }
.sec-h { margin-top: 18px; }
.sec-item .check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: 14px; }
.sec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn--danger { color: #ff7a73; border-color: rgba(239,74,67,.5); }
.tfa { margin-top: 12px; }
.tfa-steps { margin: 0 0 10px; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
.tfa-qr { background: #fff; padding: 10px; border-radius: 10px; width: max-content; }
.tfa-qr img, .tfa-qr canvas { display: block; }
.tfa-key { font-size: 14px; letter-spacing: .06em; word-break: break-all; }
.tfa-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; }
.tfa-form .field { margin: 0; min-width: 180px; }
.tfa-ask { flex-direction: column; align-items: stretch; }
.tfa-codes pre { background: var(--surface-2, #1a2336); padding: 12px 16px; border-radius: 10px; font-size: 17px; letter-spacing: .05em; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } }

.nav-stop { display: flex; align-items: center; gap: 12px; width: 100%; margin: 8px 0 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.nav-stop:hover { color: #ff7a73; border-color: rgba(239,74,67,.35); background: rgba(239,74,67,.08); }

.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.is-sorted { color: var(--text, #e8eef8); }
.tbl-scroll.tall { max-height: 560px; }
.likebar { display: inline-block; width: 70px; height: 8px; border-radius: 99px; background: rgba(239,74,67,.55); overflow: hidden; vertical-align: middle; }
.likebar i { display: block; height: 100%; background: #2fbf71; }

.copybox { width: 100%; margin-top: 6px; font: 13px ui-monospace, monospace; color: var(--text, #e8eef8); background: var(--surface-2, #1a2336); border: 1px solid var(--line, #26324a); border-radius: 8px; padding: 8px; }

.art-missing { margin-top: 12px; }
.art-missing summary { cursor: pointer; color: var(--muted); }
.art-missing input { margin: 10px 0; font: inherit; font-size: 14px; color: var(--text, #e8eef8); background: var(--surface-2, #1a2336); border: 1px solid var(--line, #26324a); border-radius: 9px; padding: 7px 10px; width: min(320px, 100%); }

/* Cover art */
.cv-row { grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; }
.cv-row__txt { display: grid; gap: 3px; min-width: 0; }
.cv-thumb { width: 48px; height: 48px; border-radius: 6px; background: var(--surface-2, #1a2336) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.cv-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(47,191,113,.16); color: #59d28f; }
.cv-badge--manual { background: rgba(245,179,1,.18); color: var(--yellow, #f5b301); }
.cv-badge--none { background: rgba(255,255,255,.08); color: var(--muted); }
.cv-title { margin: 0 0 2px; font-size: 18px; overflow-wrap: anywhere; }
.cv-now { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; margin: 12px 0 6px; align-items: start; }
.cv-now > img, .cv-empty { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2, #1a2336); }
.cv-empty { display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); }
.cv-now p { margin: 0 0 8px; }
.cv-small { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; display: block; margin: 4px 0; }
.cv-h3 { font-size: 15px; margin: 18px 0 8px; }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.cv-cand { font: inherit; color: inherit; text-align: left; background: var(--surface-2, #1a2336); border: 2px solid transparent; border-radius: 10px; padding: 6px; cursor: pointer; display: grid; gap: 2px; position: relative; }
.cv-cand:hover, .cv-cand:focus-visible { border-color: var(--yellow, #f5b301); }
.cv-cand img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.cv-cand .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-src { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.7); color: #fff; padding: 1px 6px; border-radius: 99px; }
.warn { color: var(--yellow, #f5b301); }
@media (max-width: 560px) { .cv-now { grid-template-columns: 1fr; } .cv-now > img, .cv-empty { max-width: 300px; } }

/* ---------- Scheduler ---------- */
.mono { font-family: ui-monospace, Consolas, monospace; }
.small { font-size: 12.5px; }
.sch-grow { flex: 1; }
.sch-clocks { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.sch-lib { padding: 10px; position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow: auto; }
.sch-lib__head input, .forms-bar input[type=search] { width: 100%; }
.sch-lib__head input { font-size: 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; margin-bottom: 8px; }
.sch-sec { border-top: 1px solid var(--line); padding: 4px 0; }
.sch-sec:first-child { border-top: 0; }
.sch-sec__head { display: flex; align-items: center; gap: 2px; }
.sch-sec__body { list-style: none; margin: 0; padding: 0 0 4px 22px; display: none; }
.sch-sec.is-open .sch-sec__body { display: block; }
.sch-tog { background: none; border: 0; color: var(--muted); cursor: pointer; width: 22px; height: 26px; flex: none; transition: transform .15s; padding: 0; }
.sch-sec.is-open > .sch-sec__head .sch-tog { transform: rotate(90deg); }
.sch-tog--sm { width: 18px; }
.sch-li { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; text-align: left; background: none; border: 1px solid transparent; border-radius: 8px; padding: 5px 7px; color: var(--text); font-size: 13.5px; cursor: grab; }
.sch-li.is-item:hover, .sch-li.is-item:focus-visible { background: var(--surface-2); border-color: var(--line-2); outline: none; }
.sch-li.is-item { user-select: none; -webkit-user-select: none; }
.sch-li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sch-li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-li em { font-style: normal; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sch-li--head { font-weight: 800; letter-spacing: .04em; font-size: 12.5px; }
.sch-li.is-static { cursor: default; }
.sch-sec__body li { display: flex; align-items: center; flex-wrap: wrap; }
.sch-sec__body li > .sch-li { flex: 1; }
.sch-songs { list-style: none; margin: 0; padding: 0 0 0 16px; width: 100%; }
.sch-sub { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; padding: 8px 7px 2px; }
.sch-note { padding: 4px 7px; }
.sch-editor { display: grid; gap: 14px; min-width: 0; }
.sch-ed-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; }
.sch-ed-top .field { flex: 1 1 260px; margin: 0; }
.sch-ed-name { display: grid; grid-template-columns: minmax(0, 1fr) 180px auto; gap: 12px; align-items: end; margin-top: 12px; }
.sch-ed-name .field { margin: 0; }
.sch-ed-save { justify-content: flex-end; }
.sch-total b { color: var(--text); font-variant-numeric: tabular-nums; }
.sch-pie { display: inline-flex; }
.sch-donut { width: 34px; height: 34px; border-radius: 50%; display: inline-block; -webkit-mask: radial-gradient(circle, transparent 42%, #000 43%); mask: radial-gradient(circle, transparent 42%, #000 43%); }
.sch-items { display: grid; gap: 3px; min-height: 80px; }
.sch-row { display: grid; grid-template-columns: 28px 70px minmax(0, 1.1fr) 60px minmax(0, 2fr) 56px 82px; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 9px; background: var(--surface-2); font-size: 13.5px; border: 1px solid transparent; }
.sch-row[draggable=true] { cursor: grab; }
.sch-row--head { background: none; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding-top: 0; padding-bottom: 2px; }
.sch-row.is-dragging { opacity: .4; }
.sch-row.drop-before { box-shadow: inset 0 3px 0 var(--yellow); }
.sch-row.drop-after { box-shadow: inset 0 -3px 0 var(--yellow); }
.sch-row .num { text-align: right; }
.sch-kind { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sch-kind i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sch-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-acts { display: flex; gap: 2px; justify-content: flex-end; }
.sch-acts button { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 11px; padding: 0; }
.sch-acts button:hover { color: var(--text); border-color: var(--line-2); }
.sch-dropzone { border: 2px dashed var(--line-2); border-radius: 12px; padding: 28px; text-align: center; color: var(--muted); }
.sch-hint { margin: 10px 0 0; }
.sch-goals { display: grid; gap: 6px; }
.sch-goal { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 54px; gap: 12px; align-items: center; font-size: 14px; }
.sch-goal span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sch-goal span i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sch-goal input { accent-color: var(--yellow); width: 100%; }
.sch-goal b { text-align: right; font-variant-numeric: tabular-nums; }
.sch-modal { position: fixed; inset: 0; background: rgba(4,8,16,.66); display: grid; place-items: center; padding: 16px; z-index: 50; }
.sch-dialog { background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.sch-dialog--wide { width: min(980px, 100%); }
.sch-dialog h2 { margin: 0 0 12px; font-size: 18px; }
.sch-dialog textarea, .sch-dialog select { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 15px; font-weight: 400; }
.sch-dialog__btns { justify-content: flex-end; margin-top: 14px; }
.sch-dialog > input[type=search] { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); margin-bottom: 10px; }
.sch-picklist { display: grid; gap: 3px; max-height: 50vh; overflow: auto; }
.sch-picklist button { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; text-align: left; background: var(--surface-2); border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer; }
.sch-picklist button:hover { border-color: var(--yellow); }
.sch-week-wrap { overflow-x: auto; margin: 10px 0; }
.sch-week, .sch-cal { display: grid; grid-template-columns: 64px repeat(24, minmax(30px, 1fr)); gap: 2px; min-width: 820px; user-select: none; }
.sch-cal { grid-template-columns: 110px repeat(24, minmax(26px, 1fr)); }
.sch-wc { min-height: 34px; border-radius: 5px; font-size: 11px; display: flex; align-items: center; justify-content: center; border: 0; color: var(--soft); padding: 0; }
.sch-wc--corner { background: none; }
.sch-wc--hour, .sch-wc--day { background: none; font-weight: 700; color: var(--muted); cursor: pointer; }
.sch-wc--day { justify-content: flex-start; padding-left: 4px; font-size: 12px; }
.sch-cell { background: var(--surface-2); cursor: pointer; position: relative; overflow: hidden; }
.sch-cell.has-clock { background: color-mix(in srgb, var(--cc) 72%, #000 28%); color: #fff; justify-content: flex-start; padding-left: 4px; }
.sch-cell span { white-space: nowrap; font-weight: 700; font-size: 10.5px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.sch-cell.is-sel { outline: 2px solid var(--yellow); outline-offset: -2px; }
.sch-cell.is-sel:not(.has-clock) { background: rgba(245,179,1,.18); }
.sch-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; }
.sch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sch-legend i { width: 12px; height: 12px; border-radius: 3px; }
.sch-legend em { font-style: normal; color: var(--muted); }
.sch-range { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.sch-res { white-space: normal; margin-top: 14px; }
.sch-cal__cell { background: var(--surface-2); cursor: pointer; color: #0b1220; font-weight: 800; box-shadow: inset 0 -3px 0 var(--cc, transparent); }
.sch-cal__cell.is-done { background: rgba(47,191,113,.75); }
.sch-cal__cell.is-now { outline: 2px solid var(--yellow); outline-offset: -2px; }
.sch-hourtbl { max-height: 60vh; overflow: auto; }
.sch-subtabs { margin-bottom: 14px; flex-wrap: wrap; }
.sch-songtbl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--yellow); }
.sch-dpgrid .sch-dp { background: var(--surface-2); cursor: pointer; min-height: 26px; }
.sch-dpgrid .sch-dp.is-on { background: rgba(47,191,113,.8); }
.sch-dpq { margin: 4px 0; flex-wrap: wrap; }
.sch-dpq .btn, .sch-fav .btn { padding: 7px 11px; font-size: 13px; }
.sch-cgroup { border-top: 1px solid var(--line); padding: 12px 0; }
.sch-cgroup__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sch-cgroup__head i { width: 16px; height: 16px; border-radius: 4px; }
.sch-cgroup select, .sch-in { font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; }
.sch-in { width: 100%; min-width: 90px; }
.sch-in--s { width: 80px; min-width: 70px; }
.sch-fav { margin-bottom: 8px; }
.sch-fav .sch-in { flex: 1 1 200px; width: auto; }
.sch-station { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.sch-log { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 360px; overflow: auto; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--soft); margin: 0; }
@media (max-width: 1100px) { .sch-clocks { grid-template-columns: 1fr; } .sch-lib { position: static; max-height: 46vh; } .sch-station { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .sch-ed-name { grid-template-columns: 1fr; }
  .sch-row { grid-template-columns: 20px minmax(0, 1fr) 42px 74px; grid-template-areas: "n k l a" "n d l a"; gap: 2px 6px; }
  .sch-row > :nth-child(1) { grid-area: n; } .sch-row > :nth-child(3) { grid-area: k; font-size: 12px; color: var(--soft); }
  .sch-row > :nth-child(5) { grid-area: d; } .sch-row > :nth-child(6) { grid-area: l; } .sch-row > :nth-child(7) { grid-area: a; }
  .sch-row > :nth-child(2), .sch-row > :nth-child(4) { display: none; }
  .sch-row--head { display: none; }
  .sch-range { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sch-goal { grid-template-columns: minmax(90px, 130px) minmax(0, 1fr) 44px; }
}
.card__head select { font: inherit; font-size: 14px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.sch-station .sch-goal { grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) 46px; }
@media (max-width: 760px) { .card__head:has([data-pclock]) { flex-direction: column; align-items: stretch; } .card__head:has([data-pclock]) .row > * { flex: 1 1 auto; } }
.sch-row.is-sel { border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 10%, var(--surface-2)); }
.sch-week [data-cell], .sch-dpgrid [data-c] { touch-action: none; }
.sch-seq { position: relative; }
.sch-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px -18px -18px; padding: 12px 18px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line-2); border-radius: 0 0 var(--radius) var(--radius); font-size: 14px; }
.sch-ghost { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; background: var(--surface-2); border: 1px dashed var(--muted); color: var(--text); border-radius: 9px; padding: 7px 12px; font-size: 13px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 12px 30px rgba(0,0,0,.45); opacity: .95; }
.sch-ghost.is-ok { border: 1px solid var(--yellow); }
body.sch-dragging, body.sch-dragging * { cursor: grabbing !important; user-select: none !important; }
.sch-row { user-select: none; -webkit-user-select: none; }
.sch-mk { color: var(--yellow); font-weight: 700; }
