/* BEAT Music Radio — light, airy, modern. Palette from the logo: cyan → violet → coral. */
:root {
  --cyan: #00c2ff;
  --violet: #c871fc;
  --coral: #ff5160;
  --grad: linear-gradient(120deg, var(--cyan) 0%, var(--violet) 52%, var(--coral) 100%);
  --bg: #f7f7fb;
  --panel: #ffffff;
  --line: rgba(24, 18, 60, .09);
  --line-strong: rgba(24, 18, 60, .16);
  --ink: #0f0d1a;
  --text: #1d1a2e;
  --muted: #6a6780;
  --soft: #f3f2fa;
  --err: #d3263a;
  --ok: #0f8a4a;
  --warn: #9a5b00;
  --r: 20px;
  --shadow: 0 1px 2px rgba(24, 18, 60, .04), 0 12px 32px -12px rgba(60, 30, 120, .14);
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* soft colour wash behind the top of every page */
body::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 560px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 55% at 12% 8%, rgba(0, 194, 255, .20), transparent 70%),
    radial-gradient(36% 55% at 52% -5%, rgba(200, 113, 252, .24), transparent 70%),
    radial-gradient(38% 55% at 92% 12%, rgba(255, 81, 96, .16), transparent 70%);
}
a { color: #7a2fd0; text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.08; margin: 0 0 .4rem; font-weight: 750; }
h2 { font-size: 1.3rem; margin: 2.6rem 0 1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 1.2rem; margin: 0; font-weight: 700; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1240px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
.count { font-size: .8rem; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 1px 10px; }
.empty { padding: 2rem; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: var(--r); color: var(--muted); background: rgba(255, 255, 255, .6); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* header: frosted, sticky */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .72); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand img { width: 36px; height: 36px; border-radius: 11px; display: block; box-shadow: 0 4px 14px -4px rgba(200, 113, 252, .6); }
.brand-text strong { font-weight: 800; letter-spacing: .01em; }
.brand-text span { color: var(--muted); }
.top-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: .93rem; }
.top-nav > a { color: var(--text); text-decoration: none; padding: 6px 11px; border-radius: 99px; }
.top-nav > a:hover { background: var(--soft); }
.lang { display: inline-flex; background: var(--soft); border-radius: 99px; padding: 3px; margin-right: 6px; }
.lang a { color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 600; padding: 3px 11px; border-radius: 99px; }
.lang a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(24, 18, 60, .15); }
.who { color: var(--text); font-weight: 600; font-size: .9rem; padding: 0 6px; }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 6px 11px; border-radius: 99px; color: var(--muted); font: inherit; font-size: .93rem; cursor: pointer; }
button.link:hover { background: var(--soft); color: var(--ink); }

main { padding-bottom: 56px; min-height: 62vh; }
.foot { padding-top: 22px; padding-bottom: 34px; color: var(--muted); font-size: .85rem; }

/* hero (home) */
.hero { padding: 44px 0 6px; }
.eyebrow { margin: 0 0 10px; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero p.lead { margin: 6px 0 0; color: var(--muted); max-width: 52ch; }

/* auth + form cards */
.auth { text-align: center; padding-top: 40px; }
.auth-logo { width: 68px; height: 68px; border-radius: 20px; display: block; margin: 0 auto 18px; box-shadow: 0 14px 34px -10px rgba(200, 113, 252, .65); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 30px; margin: 26px auto; box-shadow: var(--shadow); text-align: left; }
.card.wide { margin-left: 0; margin-right: 0; }
.card.narrow { max-width: 430px; }
.card.narrow-wide { max-width: 760px; }
.card h1 { font-size: 1.7rem; }
.card > h1:first-child { margin-top: 0; }
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; margin-bottom: 6px; font-size: .88rem; font-weight: 600; color: var(--text); }
.field > span small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236a6780' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
input[type=file] { max-width: 100%; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(200, 113, 252, .2); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 9px; align-items: center; margin: 0 0 14px; }
input[type=checkbox] { accent-color: #8a3fe0; width: 17px; height: 17px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: #fff; border: 0;
  border-radius: 99px; padding: 12px 24px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(15, 13, 26, .45); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.btn-block { width: 100%; }
.btn-grad { background: var(--grad); color: var(--ink); box-shadow: 0 8px 22px -10px rgba(200, 113, 252, .9); }
.btn-grad:hover { box-shadow: 0 12px 28px -8px rgba(200, 113, 252, .95); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line-strong); }
.btn.ghost:hover { box-shadow: 0 6px 16px -8px rgba(24, 18, 60, .3); }
.btn.danger { background: #fff; color: var(--err); border: 1px solid rgba(211, 38, 58, .35); }
.btn.danger:hover { background: var(--err); color: #fff; box-shadow: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.small-btn { padding: 8px 17px; font-size: .9rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 12px 16px; border-radius: 14px; margin: 14px 0; border: 1px solid var(--line); background: #fff; font-size: .95rem; }
.notice-ok { border-color: rgba(15, 138, 74, .3); background: #effaf4; color: var(--ok); }
.notice-err { border-color: rgba(211, 38, 58, .3); background: #fff1f3; color: var(--err); }

/* station picker */
fieldset.stations { border: 0; padding: 0; margin: 22px 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
fieldset.stations legend { padding: 0; margin-bottom: 12px; font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.station { display: block; cursor: pointer; position: relative; }
.station input { position: absolute; opacity: 0; pointer-events: none; }
.station span { display: flex; flex-direction: column; gap: 2px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 16px; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.station span b { font-weight: 650; color: var(--ink); }
.station span i { font-style: normal; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.station:hover span { border-color: var(--violet); transform: translateY(-1px); }
.station input:checked + span { border: 2px solid transparent; padding: 12px 14px; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: 0 10px 24px -12px rgba(200, 113, 252, .8); }
.station input:checked + span::after { content: "✓"; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: var(--ink); font-size: .8rem; font-weight: 800; display: grid; place-items: center; }
.station input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* releases */
.release { display: grid; grid-template-columns: 78px 1fr; gap: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin: 0 0 14px; box-shadow: var(--shadow); }
.datechip { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 78px; height: 92px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); line-height: 1.05; }
.datechip span { font-size: .72rem; font-weight: 800; letter-spacing: .12em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.datechip b { font-size: 2rem; font-weight: 800; color: var(--ink); margin: 3px 0 4px; letter-spacing: -.03em; }
.datechip i { font-style: normal; font-size: .72rem; color: var(--muted); font-weight: 600; }
.release-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.release-head p { margin: 0; flex-basis: 100%; color: var(--muted); font-size: .92rem; }
.badge { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; background: var(--ink); color: #fff; }
.notes { color: #4a4660; margin: 12px 0 0; font-size: .95rem; }
ul.files { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
ul.files li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 10px 10px 14px; background: var(--soft); border-radius: 14px; }
ul.files .wave { width: 20px; height: 20px; color: #8a3fe0; flex: none; }
ul.files .fname { flex: 1 1 200px; font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
ul.files small { color: var(--muted); font-weight: 500; margin-left: 8px; font-variant-numeric: tabular-nums; }
.tick { color: var(--ok); font-size: .85rem; font-weight: 700; }

/* drag & drop upload (admin release page) */
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--r); padding: 26px 20px; text-align: center; background: var(--soft); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; margin: 0 0 14px; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--violet); outline: 0; }
.dropzone.over { border-color: var(--violet); background: #fff; box-shadow: 0 0 0 5px rgba(200, 113, 252, .2); }
.dropzone svg { width: 34px; height: 34px; color: #8a3fe0; margin-bottom: 6px; }
.dropzone p { margin: 2px 0; }
.dz-msg { color: var(--err); min-height: 1em; }
.dz-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.dz-list li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 7px 8px 7px 12px; cursor: default; }
.dz-list .dz-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: .92rem; }
.dz-list .dz-tag { font-size: .7rem; font-weight: 800; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: var(--ink); color: #fff; }
.dz-list .dz-size { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.dz-list button { background: none; border: 0; font-size: 1.2rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.dz-list button:hover { background: var(--soft); color: var(--err); }

/* admin */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 22px; background: var(--panel); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: break-word; }
.email { overflow-wrap: anywhere; }
th, .pill, td.num { white-space: nowrap; }
/* station × release matrix: narrow centred columns, readable station names */
.matrix th, .matrix th.num { white-space: normal; text-align: center; line-height: 1.25; padding: 10px 6px; font-size: .72rem; vertical-align: bottom; }
.matrix th small { display: block; font-size: .72rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.matrix th:first-child { text-align: left; padding-left: 14px; }
.matrix td.num { text-align: center; padding: 11px 6px; }
@media (max-width: 1100px) { .matrix td.num { text-align: right; padding: 8px 0; } }
.matrix td:first-child { white-space: nowrap; padding-left: 14px; }
main > h1:first-child { margin-top: 30px; }
td .row-actions { min-width: 150px; }
td .btn.small-btn { padding: 6px 13px; font-size: .85rem; }
td input[type=text] { min-width: 140px; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; background: #fbfbfe; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.zero { color: #b6b3c8; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 22px 0; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.tile b { display: block; font-size: 2rem; line-height: 1.1; color: var(--ink); letter-spacing: -.02em; }
.tile b.sm { font-size: 1.05rem; line-height: 1.5; padding: 4px 0 2px; }
.tile span { color: var(--muted); font-size: .88rem; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); }
.pill.active { color: var(--ok); border-color: rgba(15, 138, 74, .3); background: #effaf4; }
.pill.pending { color: var(--warn); border-color: rgba(154, 91, 0, .3); background: #fff7e6; }
.pill.blocked { color: var(--err); border-color: rgba(211, 38, 58, .3); background: #fff1f3; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; gap: 5px; align-items: baseline; font-size: .78rem; padding: 2px 9px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip b { font-weight: 700; }
.chip.seen { background: #f6edff; border-color: rgba(138, 63, 224, .3); color: #7a2fd0; }
.chip.on { background: #effaf4; border-color: rgba(15, 138, 74, .3); color: var(--ok); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.srow { display: grid; grid-template-columns: 1fr 90px auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.srow .check { margin: 0; white-space: nowrap; }
.grid2 { display: grid; gap: 0 18px; grid-template-columns: 1fr 1fr; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 0 0 18px; }
.filters .field { margin: 0; min-width: 190px; }

@media (max-width: 700px) { .srow { grid-template-columns: 1fr 90px; } }

/* Admin tables become stacked cards on tablets/phones (labels come from admin.js) — no sideways scrolling. */
@media (max-width: 1100px) {
  .tablewrap { overflow: visible; border: 0; background: none; box-shadow: none; border-radius: 0; }
  .tablewrap table, .tablewrap tbody { display: block; }
  .tablewrap tr.hrow { display: none; }
  .tablewrap tr { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 16px; margin: 0 0 12px; box-shadow: var(--shadow); }
  .tablewrap td { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: right; }
  .tablewrap td:last-child { border-bottom: 0; }
  .tablewrap td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
  .tablewrap td[data-label=""]::before { display: none; }
  .tablewrap td[data-label=""] { justify-content: flex-start; }
  .tablewrap td.num { text-align: right; }
  .tablewrap td input[type=text] { min-width: 0; width: 100%; max-width: 280px; }
  td .row-actions { min-width: 0; }
}
@media (max-width: 600px) {
  .grid2 { grid-template-columns: 1fr; }
  .card { padding: 22px 18px; border-radius: 20px; }
  .release { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .datechip { flex-direction: row; gap: 8px; width: auto; height: auto; padding: 8px 14px; justify-self: start; border-radius: 14px; }
  .datechip b { font-size: 1.3rem; margin: 0; }
  .hero { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
