:root {
  --bg0: #0b0f14;
  --bg1: #121821;
  --bg2: #1a2330;
  --line: #2a3648;
  --text: #e8eef7;
  --muted: #93a0b4;
  --accent: #3db8a0;
  --accent-2: #f0a36b;
  --danger: #e05a6a;
  --ad: #6b8af0;
  --ann: #f0a36b;
  --hp: #f06b8a;
  --music: #3db8a0;
  --radius: 12px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a2a33 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #241a14 0%, transparent 50%),
    var(--bg0);
  color: var(--text);
  font-family: var(--font);
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
}
button.primary {
  background: linear-gradient(180deg, #45c7ad, #2f9e89);
  border-color: #2f9e89;
  color: #06201a;
  font-weight: 600;
}
button.danger { border-color: var(--danger); color: #ffd0d6; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.nav {
  border-right: 1px solid var(--line);
  background: rgba(10, 14, 20, 0.85);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.25rem;
}
.brand span { color: var(--accent); }
.brand-sub { color: var(--muted); font-size: 0.8rem; margin-bottom: 1.5rem; }
.nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.nav a.active, .nav a:hover {
  background: var(--bg2);
  color: var(--text);
}
.main { padding: 1.25rem 1.5rem 2.5rem; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.topbar h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.status-pill.on { color: #b7ffe9; border-color: #2f9e89; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
}
.status-pill.on .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.grid-4 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}
.card {
  background: linear-gradient(180deg, rgba(26,35,48,0.95), rgba(14,18,26,0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card h2 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.now-title { font-size: 1.35rem; font-weight: 600; margin: 0 0 0.2rem; }
.now-artist { color: var(--muted); margin-bottom: 0.8rem; }
.progress {
  height: 6px;
  background: #0a0e14;
  border-radius: 99px;
  overflow: hidden;
  margin: 0.6rem 0 0.9rem;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #7ee0cc);
}
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.queue-list, .sched-list { list-style: none; margin: 0; padding: 0; }
.queue-list li, .sched-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(42,54,72,0.7);
  font-size: 0.92rem;
}
.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.tag.music { color: var(--music); border-color: #2f6f62; }
.tag.ad { color: #b7c8ff; border-color: #3d528f; }
.tag.announcement { color: #ffd7a8; border-color: #8a5a2f; }
.tag.high_priority { color: #ffc1cf; border-color: #8a3048; }

textarea, input[type="text"], input[type="password"], input[type="number"], input[type="time"], select {
  width: 100%;
  background: #0a0e14;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 0.8rem; color: var(--muted); margin: 0.55rem 0 0.25rem; }
.muted { color: var(--muted); font-size: 0.85rem; }
.hidden { display: none !important; }
.page { display: none; }
.page.active { display: block; }
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.drop {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  background: rgba(0,0,0,0.2);
}
.drop.drag { border-color: var(--accent); color: var(--text); }
.login-gate {
  max-width: 420px;
  margin: 12vh auto;
  padding: 1.5rem;
}
.duck-banner {
  background: rgba(240,107,138,0.12);
  border: 1px solid #8a3048;
  color: #ffc1cf;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .nav {
    position: sticky;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
  }
  .brand-sub { display: none; }
  .nav a { margin: 0; }
  .grid-4 { grid-template-columns: 1fr; }
}
