:root {
  color-scheme: dark;
  --bg: #020409;
  --panel: rgba(8, 12, 24, .92);
  --panel-2: rgba(15, 21, 39, .94);
  --line: rgba(123, 53, 255, .32);
  --text: #f7f3ff;
  --muted: #b7bdd4;
  --dim: #78809d;
  --accent: #24c8ff;
  --accent-soft: rgba(36, 200, 255, .16);
  --orange: #24c8ff;
  --orange-2: #7a35ff;
  --magenta: #cf40ff;
  --cyan: #24c8ff;
  --danger: #f87171;
  --ok: #22c55e;
  --surface: rgba(7, 10, 20, .88);
  --surface-strong: rgba(10, 15, 29, .96);
  --shadow: 0 30px 94px rgba(0, 0, 0, .46);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 13% 8%, rgba(123, 53, 255, .24), transparent 30rem),
    radial-gradient(circle at 88% 0%, rgba(36, 200, 255, .17), transparent 31rem),
    radial-gradient(circle at 50% 48%, rgba(123, 53, 255, .08), transparent 34rem),
    linear-gradient(180deg, #070915 0%, #020409 54%, #010205 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body,
.admin-shell {
  background-color: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background:
    linear-gradient(rgba(36, 200, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 53, 255, .032) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

a { color: inherit; }
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--text);
}
.container-fluid { --bs-gutter-x: 0; }
.card {
  --bs-card-color: var(--text);
  --bs-card-bg: transparent;
  color: var(--text);
}
.card-body,
.card-title,
.card-text {
  color: var(--text);
}
.btn {
  --bs-btn-border-radius: 12px;
  --bs-btn-font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  border: 0;
  white-space: nowrap;
}
.btn-gd,
.btn-primary {
  --bs-btn-color: #f7fbff;
  --bs-btn-bg: #11182b;
  --bs-btn-border-color: rgba(36,200,255,.34);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #182548;
  --bs-btn-hover-border-color: rgba(36,200,255,.58);
  background:
    linear-gradient(135deg, rgba(123,53,255,.26), rgba(36,200,255,.12)),
    #11182b;
  border: 1px solid rgba(36,200,255,.3);
  box-shadow: 0 14px 34px rgba(36,200,255,.1);
}
.btn-gd-secondary,
.btn-secondary {
  --bs-btn-color: var(--text);
  --bs-btn-bg: #202829;
  --bs-btn-border-color: rgba(255,255,255,.08);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: #293435;
  --bs-btn-hover-border-color: rgba(148,163,184,.32);
  box-shadow: none;
  border: 1px solid rgba(123,53,255,.22);
  background:
    linear-gradient(135deg, rgba(123,53,255,.09), rgba(36,200,255,.04)),
    rgba(17,21,38,.78);
}
.btn-gd-danger,
.btn-danger {
  --bs-btn-color: #d9e1ff;
  --bs-btn-bg: rgba(255,77,95,.14);
  --bs-btn-border-color: rgba(255,77,95,.35);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(255,77,95,.28);
  --bs-btn-hover-border-color: rgba(255,77,95,.55);
  box-shadow: none;
  border: 1px solid rgba(255,77,95,.35);
}
.form-control,
.form-select,
.form-check-input,
input,
textarea,
select {
  background-color: #080d0d;
  color: var(--text);
  border-color: rgba(148,163,184,.24);
}
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  color: var(--text);
  background-color: #080d0d;
  border-color: rgba(148,163,184,.62);
  box-shadow: 0 0 0 .2rem rgba(148,163,184,.16);
}
.form-control::placeholder,
input::placeholder,
textarea::placeholder { color: rgba(184,159,140,.7); }
input[type="file"] {
  color: var(--muted);
}
input[type="file"]::file-selector-button {
  margin: -12px 12px -12px -14px;
  min-height: 44px;
  border: 0;
  border-right: 1px solid rgba(148,163,184,.25);
  background: #11182b;
  color: #f4f4f5;
  font-weight: 750;
  padding: 0 16px;
  cursor: pointer;
}
.form-check-input:checked {
  background-color: var(--orange);
  border-color: var(--orange);
}
.table {
  --bs-table-color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(148,163,184,.10);
  --bs-table-hover-color: var(--text);
  --bs-table-hover-bg: rgba(148,163,184,.055);
}
.badge,
.pill {
  --bs-badge-font-weight: 750;
}
.alert {
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
}
.wrap { width: min(1220px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 56px; }
.top { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 14px; font-weight: 780; font-size: clamp(1.6rem, 4vw, 2.8rem); letter-spacing: 0; }
.brand-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #11182b; color: #f4f4f5; box-shadow: none; }
.subtitle { color: var(--muted); font-weight: 700; margin-top: 6px; }
.button, button {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(123,53,255,.34), rgba(36,200,255,.16)), #11182b;
  color: #f4f4f5;
  font-weight: 750;
  padding: 10px 15px;
  cursor: pointer;
  box-shadow: none;
}
.button.secondary, button.secondary { background: #1a1d21; color: var(--text); box-shadow: none; border: 1px solid rgba(148,163,184,.18); }
button.danger {
  background: rgba(255,77,95,.14);
  color: #d9e1ff;
  border: 1px solid rgba(255,77,95,.35);
  box-shadow: none;
}
.portal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; overflow: hidden; padding: 18px; border-radius: 16px; border: 1px solid rgba(36,200,255,.16); background: linear-gradient(145deg, rgba(123,53,255,.12), rgba(36,200,255,.045)), rgba(10,15,29,.78); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 46px rgba(0,0,0,.2); }
.stat-card::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: linear-gradient(90deg, var(--orange-2), var(--accent), var(--magenta)); opacity: .78; }
a.stat-card { position: relative; overflow: hidden; padding: 18px; border-radius: 16px; border: 1px solid rgba(36,200,255,.16); background: linear-gradient(145deg, rgba(123,53,255,.12), rgba(36,200,255,.045)), rgba(10,15,29,.78); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 46px rgba(0,0,0,.2); }
a.stat-card,
a.stat-card:hover,
a.stat-card:focus {
  color: inherit;
  text-decoration: none;
}
a.stat-card * {
  text-decoration: none;
}
a.stat-card:hover { transform: translateY(-2px); border-color: rgba(36,200,255,.42); box-shadow: 0 24px 58px rgba(36,200,255,.08); }
.stat-kicker { color: #d9e1ff; font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.stat-kicker i { color: var(--accent); }
.stat-value { margin-top: 8px; font-size: 1.9rem; font-weight: 900; color: var(--text); }
.stat-sub { color: var(--muted); font-weight: 680; font-size: .88rem; margin-top: 4px; }
.manager-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.manager-nav a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(148,163,184,.16); background: rgba(17,21,26,.72); color: #d4d4d8; border-radius: 999px; padding: 9px 13px; font-weight: 740; }
.portal-stack { display: grid; gap: 18px; }
.grid { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.wide-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; align-items: start; }
.card {
  background:
    linear-gradient(145deg, rgba(123,53,255,.08), rgba(36,200,255,.035)),
    rgba(10,15,29,.88);
  border: 1px solid rgba(36,200,255,.13);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card.glow { background: linear-gradient(145deg, rgba(123,53,255,.12), rgba(36,200,255,.04)), rgba(10,15,29,.92); }
.card-head { padding: 18px 20px; border-bottom: 1px solid rgba(36,200,255,.13); display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.card-head h1, .card-head h2 { margin: 0; font-size: .94rem; text-transform: uppercase; letter-spacing: .12em; color: #eef6ff; font-weight: 850; }
.card-head h1 i, .card-head h2 i { color: var(--accent); }
.card-body { padding: 20px; }
label { display: block; color: var(--muted); font-weight: 720; margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
input, textarea, select {
  width: 100%;
  border: 1px solid rgba(36,200,255,.16);
  background: rgba(4,7,15,.68);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
}
textarea { min-height: 86px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(36,200,255,.52); box-shadow: 0 0 0 4px rgba(36,200,255,.11); }
.fields { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.toggles { display: flex; flex-wrap: wrap; gap: 12px; }
.check { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; text-transform: none; letter-spacing: 0; margin: 0; }
.check input { width: auto; accent-color: var(--orange); }
.dj-list { display: grid; gap: 12px; padding: 14px; }
.dj-card { background: linear-gradient(145deg, rgba(123,53,255,.08), rgba(36,200,255,.035)), rgba(10,15,29,.76); border: 1px solid rgba(36,200,255,.13); border-radius: 15px; overflow: hidden; }
.dj-card[open] { border-color: rgba(36,200,255,.34); box-shadow: 0 18px 42px rgba(36,200,255,.08); }
.dj-card summary { list-style: none; cursor: pointer; padding: 16px 18px; }
.dj-card summary::-webkit-details-marker { display: none; }
.dj-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.dj-title-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chevron { color: var(--orange); transition: transform .18s ease; }
.dj-card[open] .chevron { transform: rotate(90deg); }
.dj-panel { padding: 0 18px 18px; }
.name { font-size: 1.18rem; font-weight: 780; color: var(--text); }
.meta { color: var(--muted); font-weight: 650; font-size: .92rem; margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(148,163,184,.16); border-radius: 999px; padding: 7px 10px; font-weight: 740; font-size: .78rem; white-space: nowrap; }
.pill.ok { color: #c9ffe0; background: rgba(53,208,127,.13); border-color: rgba(53,208,127,.35); }
.pill.bad { color: #d9e1ff; background: rgba(255,77,95,.13); border-color: rgba(255,77,95,.35); }
.pill.idle { color: #d4d4d8; background: rgba(36,40,46,.72); border-color: rgba(148,163,184,.32); }
.flash { margin-bottom: 16px; padding: 13px 15px; border-radius: 14px; font-weight: 720; border: 1px solid rgba(148,163,184,.18); }
.flash.ok { background: rgba(53,208,127,.12); color: #d8ffe8; }
.flash.bad { background: rgba(255,77,95,.12); color: #d9e1ff; }
.login { max-width: 430px; margin: 12vh auto; }
.hint { color: var(--muted); font-size: .92rem; line-height: 1.55; margin: 0; }
.actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.dropzone {
  border: 2px dashed rgba(148,163,184,.28);
  background: rgba(17,21,26,.78);
  border-radius: 18px;
  padding: 34px 20px;
  text-align: center;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
  cursor: pointer;
}
.dropzone.dragover { border-color: var(--orange-2); transform: translateY(-1px); background: rgba(36,40,46,.52); }
.dropzone i { font-size: 2.2rem; color: var(--orange-2); margin-bottom: 10px; }
.dropzone strong { display: block; font-size: 1.08rem; }
.dropzone input { margin-top: 16px; }
.upload-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; background: rgba(17,21,26,.72); border: 1px solid rgba(148,163,184,.13); }
.upload-summary strong { display: block; }
.upload-queue { display: grid; gap: 10px; }
.upload-item { padding: 13px; border-radius: 15px; background: rgba(17,21,26,.72); border: 1px solid rgba(148,163,184,.12); }
.upload-item-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.upload-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 780; }
.upload-progress { position: relative; height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); margin-top: 11px; }
.upload-progress span { display: block; height: 100%; width: 0%; border-radius: inherit; background: #6b7280; transition: width .16s ease; }
.upload-item.done { border-color: rgba(53,208,127,.36); }
.upload-item.failed { border-color: rgba(255,77,95,.42); }
.file-list { display: grid; gap: 10px; max-height: 460px; overflow: auto; padding-right: 4px; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; background: rgba(17,21,26,.72); border: 1px solid rgba(148,163,184,.12); }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 760; color: var(--text); }
.file-meta { color: var(--muted); font-size: .84rem; font-weight: 650; margin-top: 3px; }
.recording-dj-badge { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 128px; max-width: 210px; padding: 9px 12px; border-radius: 999px; border: 1px solid rgba(36,200,255,.36); background: linear-gradient(135deg, rgba(36,200,255,.18), rgba(36,40,46,.74)); color: #d9e1ff; font-size: .82rem; font-weight: 820; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.recording-dj-badge i { color: var(--orange-2); }
.recording-progress-badge { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 126px; padding: 9px 12px; border-radius: 999px; border: 1px solid rgba(53,208,127,.34); background: rgba(53,208,127,.12); color: #c9ffe0; font-size: .82rem; font-weight: 850; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 0 5px rgba(53,208,127,.12), 0 0 18px rgba(53,208,127,.45); }
.icon-button.disabled,
.icon-button:disabled { opacity: .48; cursor: not-allowed; filter: saturate(.7); }
.recording-pager { display: flex; justify-content: center; margin-top: 22px; }
.recording-pagination { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 0; padding: 7px; list-style: none; border: 1px solid rgba(148,163,184,.14); border-radius: 999px; background: rgba(17,21,26,.78); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.recording-pagination a,
.recording-pagination span { min-width: 38px; height: 38px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 820; border: 1px solid transparent; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.recording-pagination a:hover { color: var(--text); background: rgba(36,200,255,.16); border-color: rgba(36,200,255,.3); transform: translateY(-1px); }
.recording-pagination .active a { color: #020409; background: linear-gradient(135deg, var(--orange), var(--orange-2)); border-color: rgba(36,200,255,.75); box-shadow: 0 10px 26px rgba(36,200,255,.2); }
.recording-pagination .disabled a,
.recording-pagination .disabled span { color: rgba(184,159,140,.42); pointer-events: none; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border-radius: 12px; box-shadow: none; }
.playlist-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 370px); gap: 24px; align-items: stretch; }
.playlist-hero-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.autodj-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.autodj-metric { min-height: 76px; padding: 12px; border: 1px solid rgba(148,163,184,.13); border-radius: 16px; background: linear-gradient(180deg, rgba(17,21,26,.86), rgba(10,14,18,.72)); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); display: grid; gap: 4px; align-content: center; }
.autodj-metric span { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--orange-2); background: rgba(36,200,255,.13); border: 1px solid rgba(36,200,255,.18); }
.autodj-metric strong { color: var(--text); font-size: 1.02rem; font-weight: 860; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autodj-metric small { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.autodj-metric.ok span { color: #bfffd9; background: rgba(53,208,127,.12); border-color: rgba(53,208,127,.25); }
.autodj-metric.bad span { color: #ffd2d2; background: rgba(236,72,91,.14); border-color: rgba(236,72,91,.28); }
.playlist-status { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.playlist-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.playlist-grid { margin-top: 22px; }
.playlist-create-card { position: sticky; top: 92px; }
.playlist-stack { display: grid; gap: 16px; padding: 18px; }
.playlist-card { border: 1px solid rgba(148,163,184,.13); border-radius: 15px; background: rgba(17,21,26,.76); overflow: hidden; }
.playlist-card.active { border-color: rgba(36,200,255,.35); box-shadow: 0 0 0 1px rgba(36,200,255,.08); }
.playlist-card summary { list-style: none; cursor: pointer; padding: 18px 20px; }
.playlist-card summary::-webkit-details-marker { display: none; }
.playlist-card[open] { border-color: rgba(36,200,255,.3); box-shadow: 0 12px 30px rgba(0,0,0,.14); }
.playlist-card[open] .chevron { transform: rotate(90deg); }
.playlist-title-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.playlist-title-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.playlist-summary-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.playlist-panel { padding: 0 20px 20px; border-top: 1px solid rgba(148,163,184,.09); }
.playlist-panel .fields { padding-top: 18px; gap: 16px; }
.playlist-panel .row { gap: 18px; }
.playlist-panel .actions { margin-top: 4px; }
.playlist-title { font-size: 1.1rem; font-weight: 760; color: var(--text); }
.playlist-sub { color: var(--muted); font-size: .85rem; font-weight: 650; margin-top: 4px; }
.empty-panel { padding: 16px 18px; border: 1px solid rgba(148,163,184,.11); border-radius: 15px; background: rgba(17,21,26,.56); }
.song-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 10px; max-height: 390px; overflow: auto; padding: 4px 6px 4px 0; }
.song-picker::-webkit-scrollbar { width: 9px; }
.song-picker::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 999px; }
.song-picker::-webkit-scrollbar-thumb { background: #6b7280; border-radius: 999px; }
.song-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; min-height: 42px; padding: 10px 12px; border: 1px solid rgba(148,163,184,.11); border-radius: 12px; background: rgba(8,9,11,.42); font-weight: 680; color: #d4d4d8; }
.song-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-check input { accent-color: var(--orange); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.service { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid rgba(148,163,184,.13); background: rgba(17,21,26,.76); }
.service-name { font-weight: 780; }
.service-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.autodj-control-panel { height: 100%; padding: 16px; border: 1px solid rgba(148,163,184,.14); border-radius: 18px; background: rgba(10,14,18,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); display: grid; gap: 14px; align-content: center; }
.control-panel-title { color: var(--text); font-size: .8rem; font-weight: 880; text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.control-panel-title i { color: var(--orange-2); }
.autodj-order-form { display: grid; gap: 9px; }
.control-label { margin: 0; color: var(--muted); font-size: .76rem; font-weight: 820; text-transform: uppercase; letter-spacing: .08em; }
.order-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: 15px; border: 1px solid rgba(148,163,184,.14); background: rgba(3,7,10,.52); }
.order-toggle button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 860; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
.order-toggle button:hover { color: var(--text); background: rgba(148,163,184,.09); }
.order-toggle button.active { color: #020409; background: linear-gradient(135deg, var(--orange), var(--orange-2)); box-shadow: 0 12px 28px rgba(36,200,255,.18); }
.order-toggle button.active:hover { color: #020409; transform: translateY(-1px); }
.control-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.control-actions form { min-width: 0; }
.control-actions .btn { width: 100%; justify-content: center; padding-inline: 12px; }
.live-strip { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; border: 1px solid rgba(53,208,127,.25); background: rgba(53,208,127,.09); padding: 14px 16px; border-radius: 16px; }
.live-strip.off { border-color: rgba(148,163,184,.22); background: rgba(36,40,46,.52); }
.live-title { font-weight: 780; }
.section-anchor { scroll-margin-top: 16px; }
.file-list::-webkit-scrollbar { width: 10px; }
.file-list::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 999px; }
.file-list::-webkit-scrollbar-thumb { background: #6b7280; border-radius: 999px; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  border-right: 1px solid rgba(36,200,255,.12);
  background:
    radial-gradient(circle at 15% 0%, rgba(123,53,255,.18), transparent 18rem),
    linear-gradient(180deg, rgba(8,12,24,.96), rgba(3,6,14,.98));
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; border-bottom: 1px solid rgba(36,200,255,.12); }
.side-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #f7fbff; background: linear-gradient(135deg, rgba(123,53,255,.72), rgba(36,200,255,.28)); box-shadow: 0 14px 34px rgba(123,53,255,.22); }
.side-title { font-size: 1.02rem; font-weight: 900; color: var(--text); }
.side-sub { color: var(--muted); font-size: .78rem; font-weight: 650; margin-top: 2px; }
.side-nav { display: grid; gap: 6px; }
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 820;
  border: 1px solid transparent;
}
.side-nav a:hover {
  color: var(--text);
  background: rgba(36,200,255,.075);
  border-color: rgba(36,200,255,.14);
}
.side-nav a.active {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(123,53,255,.2), rgba(36,200,255,.095)),
    rgba(9,16,31,.78);
  border-color: rgba(36,200,255,.24);
  box-shadow: 0 14px 36px rgba(36,200,255,.08), inset 0 1px 0 rgba(255,255,255,.045);
}
.side-nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--orange-2));
  box-shadow: 0 0 18px rgba(36,200,255,.5);
}
.side-nav a.active i { color: var(--accent); }
.side-footer { margin-top: auto; display: grid; gap: 10px; }
.main-panel { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 26px;
  border-bottom: 1px solid rgba(36,200,255,.12);
  background:
    linear-gradient(135deg, rgba(123,53,255,.08), rgba(36,200,255,.035)),
    rgba(3,6,14,.9);
  backdrop-filter: blur(18px);
}
.topbar-title { font-size: 1.1rem; font-weight: 900; color: var(--text); }
.topbar-sub { color: var(--muted); font-size: .86rem; font-weight: 650; margin-top: 2px; }
.content { width: min(1280px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0 56px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.page-kicker { color: var(--orange-2); font-size: .76rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.page-title { margin: 5px 0 0; font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1; color: var(--text); font-weight: 950; text-shadow: 0 18px 42px rgba(0,0,0,.44); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions a { text-decoration: none; }
.mobile-menu { display: none; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td { padding: 13px 14px; border-bottom: 1px solid rgba(148,163,184,.10); text-align: left; vertical-align: middle; }
.history-table th { color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; }
.history-table td { font-weight: 650; }
.track-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cover { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; object-fit: cover; background: rgba(36,40,46,.52); border: 1px solid rgba(148,163,184,.24); }
.cover.placeholder { display: grid; place-items: center; color: var(--orange-2); }
.track-title { font-weight: 780; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw; }
.track-artist { color: var(--muted); font-size: .86rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw; }
.scroll-panel { overflow: auto; max-height: 690px; }
.scroll-panel::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll-panel::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 999px; }
.scroll-panel::-webkit-scrollbar-thumb { background: #6b7280; border-radius: 999px; }
.hero-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px; }
.hero-control h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2.15rem); color: var(--text); font-weight: 780; }
.hero-control p { margin: 8px 0 0; color: var(--muted); font-weight: 650; line-height: 1.5; }
.control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-list { display: grid; gap: 10px; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(10,15,29,.72); border: 1px solid rgba(36,200,255,.1); }
.mini-title { font-weight: 760; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-sub { color: var(--muted); font-size: .84rem; font-weight: 650; margin-top: 3px; }
.dashboard-grid { display: grid; gap: 18px; }
.chart-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.chart-card { min-height: 330px; }
.chart-card .card-head { border-bottom-color: rgba(36,200,255,.12); }
.chart-card .card-body { background: radial-gradient(circle at 50% 0%, rgba(36,200,255,.055), transparent 16rem); }
.chart-wrap { position: relative; height: 250px; padding: 4px 2px 0; }
.chart-wrap.tall { height: 310px; }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.action-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 16px;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(123,53,255,.1), rgba(36,200,255,.04)),
    rgba(10,15,29,.72);
  border: 1px solid rgba(36,200,255,.12);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.action-tile:hover { transform: translateY(-2px); border-color: rgba(36,200,255,.32); background: linear-gradient(135deg, rgba(123,53,255,.16), rgba(36,200,255,.07)), rgba(12,18,36,.82); }
.action-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #f7fbff; background: linear-gradient(135deg, rgba(123,53,255,.5), rgba(36,200,255,.22)); box-shadow: 0 12px 30px rgba(123,53,255,.18); }
.action-title { font-weight: 850; color: var(--text); }
.action-sub { color: var(--muted); font-size: .82rem; font-weight: 650; margin-top: 2px; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid rgba(148,163,184,.16); }
  .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-footer { margin-top: 0; }
  .topbar { position: static; padding: 14px 18px; }
  .content { width: min(100% - 24px, 1280px); }
  .grid, .wide-grid, .playlist-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .playlist-hero { grid-template-columns: 1fr; }
  .autodj-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .autodj-control-panel { align-content: stretch; }
  .top { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .wrap { width: min(100% - 20px, 1220px); padding-top: 22px; }
  .side-nav { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .row { grid-template-columns: 1fr; }
  .portal-grid, .service-grid { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: minmax(0, 1fr) auto; }
  .file-row .pill,
  .recording-dj-badge,
  .recording-progress-badge { grid-column: 1 / -1; width: fit-content; min-width: 0; }
  .recording-pagination { border-radius: 18px; }
  .track-title, .track-artist { max-width: 58vw; }
  .history-table th:nth-child(3), .history-table td:nth-child(3) { display: none; }
  .hero-control { grid-template-columns: 1fr; }
  .control-grid { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: 1fr; }
  .autodj-metrics { grid-template-columns: 1fr; }
  .control-row,
  .control-actions { grid-template-columns: 1fr; }
  .song-picker { grid-template-columns: 1fr; }
  .dj-title { align-items: flex-start; flex-direction: column; }
}

/* Branded login */
body:has(.brand-login) {
  min-height: 100dvh;
  overflow: hidden;
  background: #03040b !important;
}

.brand-login {
  min-height: 100dvh;
  width: min(1040px, calc(100% - 32px));
  display: grid;
  place-items: center;
  padding: 0;
  margin-block: 0;
  position: relative;
  isolation: isolate;
}

.brand-login::before {
  content: "";
  position: fixed;
  inset: -22px;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(3, 4, 11, .78), rgba(11, 9, 32, .68) 44%, rgba(3, 18, 30, .76)),
    url("/assets/dropdeck-login-bg.png") center / cover no-repeat;
  filter: blur(4px) saturate(1.08);
  transform: scale(1.018);
  z-index: 0;
}

.brand-login::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(36, 200, 255, .2), transparent 24rem),
    radial-gradient(circle at 28% 42%, rgba(123, 53, 255, .22), transparent 27rem),
    linear-gradient(180deg, rgba(2, 4, 10, .28), rgba(2, 4, 10, .72));
  z-index: 0;
}

.brand-login .login-card {
  position: relative;
  z-index: 1;
}

.login-card {
  width: min(520px, 100%);
  overflow: hidden;
  border-color: rgba(36, 200, 255, .34) !important;
  background:
    linear-gradient(145deg, rgba(123, 53, 255, .16), rgba(36, 200, 255, .08) 48%, rgba(5, 9, 18, .96)),
    rgba(8, 13, 25, .96) !important;
}

.login-card::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #7b35ff, #24c8ff, #cc4cff);
}

.login-brand {
  position: relative;
  padding: 34px 34px 22px;
  text-align: center;
  border-bottom: 1px solid rgba(36, 200, 255, .14);
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: -42px 12% auto;
  height: 130px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(36, 200, 255, .2), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.login-logo {
  position: relative;
  width: min(310px, 82%);
  max-height: 120px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .38)) drop-shadow(0 0 24px rgba(36, 200, 255, .16));
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 7px 12px;
  border: 1px solid rgba(36, 200, 255, .28);
  border-radius: 999px;
  color: #dff7ff;
  background: rgba(36, 200, 255, .09);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-brand h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 950;
  letter-spacing: -.04em;
  line-height: .96;
}

.login-brand p {
  max-width: 36rem;
  margin: 12px auto 0;
  color: #b8c1d6;
  font-weight: 760;
  line-height: 1.45;
}

.login-card .card-body {
  padding: 28px 34px 34px;
}

.login-card .fields {
  gap: 16px;
}

.login-card label {
  margin-bottom: 7px;
}

.login-card input {
  min-height: 52px;
  border-radius: 14px;
}

.login-submit {
  min-height: 54px;
  border-radius: 15px !important;
  font-size: 1rem;
}

@media (max-width: 620px) {
  body:has(.brand-login) {
    overflow: auto;
  }

  .brand-login {
    width: min(100% - 22px, 1040px);
    padding: 0;
  }

  .login-brand {
    padding: 28px 20px 20px;
  }

  .login-card .card-body {
    padding: 22px 20px 24px;
  }

  .login-logo {
    width: min(260px, 88%);
    max-height: 96px;
  }
}
