*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f13;
  --bg2: #17171e;
  --bg3: #1e1e28;
  --border: #2a2a38;
  --accent: #7c5cfc;
  --accent2: #a07cff;
  --accent-dim: #7c5cfc22;
  --text: #e8e8f0;
  --text2: #9090a8;
  --text3: #5a5a72;
  --danger: #fc5c7c;
  --success: #5cfca0;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ─── Layout ─── */
.app { display: flex; flex-direction: column; min-height: 100vh; }

header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ─── Navigation ─── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin-left: 16px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--accent2); background: var(--accent-dim); }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo svg { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }

main { flex: 1; padding: 32px 24px; max-width: 1100px; margin: 0 auto; width: 100%; }

/* ─── Page header ─── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 1.6rem; }
.page-header .subtitle { color: var(--text2); font-size: 0.9rem; margin-top: 4px; }

/* ─── Auth pages ─── */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 24px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.auth-card .subtitle { color: var(--text2); margin-bottom: 32px; }

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

textarea { resize: vertical; min-height: 80px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text3); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
}
.btn-danger:hover { background: #fc5c7c18; }

.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── Error / Success messages ─── */
.message {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: none;
}
.message.error { background: #fc5c7c18; border: 1px solid #fc5c7c44; color: var(--danger); }
.message.success { background: #5cfca018; border: 1px solid #5cfca044; color: var(--success); }
.message.warning { background: rgba(246,173,85,0.10); border: 1px solid rgba(246,173,85,0.35); color: #f6ad55; }
.message.show { display: block; }

/* ─── Upload spinner ─── */
.upload-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Auth link ─── */
.auth-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text2);
}
.auth-link a { color: var(--accent2); text-decoration: none; font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }

/* ─── Dashboard ─── */
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.dashboard-header h1 { font-size: 1.6rem; }
.dashboard-header .subtitle { color: var(--text2); font-size: 0.9rem; margin-top: 4px; }

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.search-bar input { flex: 1; }

/* ─── Tabs ─── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  transition: color 0.2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent2); border-bottom-color: var(--accent); }

/* ─── Upload panel ─── */
.upload-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
  display: none;
}
.upload-panel.show { display: block; }
.upload-panel h2 { margin-bottom: 20px; font-size: 1.1rem; }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
  position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.drop-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%;
}
.drop-zone .drop-icon { font-size: 2.5rem; margin-bottom: 10px; }
.drop-zone p { color: var(--text2); font-size: 0.9rem; }
.drop-zone .file-selected { color: var(--accent2); font-weight: 600; margin-top: 8px; }

/* ─── Audio grid ─── */
.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.audio-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audio-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.audio-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }

.audio-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.audio-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.audio-tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent2);
  border: 1px solid #7c5cfc44;
  font-weight: 600;
}

.audio-card-desc {
  font-size: 0.85rem;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.audio-card-info {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text3);
}

/* ─── Audio player ─── */
.audio-player-wrap {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 12px;
}

audio {
  width: 100%;
  height: 36px;
  accent-color: var(--accent);
}

audio::-webkit-media-controls-panel { background: var(--bg3); }

/* ─── Empty state ─── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text3);
  grid-column: 1 / -1;
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1rem; }

/* ─── Loading skeleton ─── */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── User badge ─── */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
}

.avatar {
  width: 26px; height: 26px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Progress bar (upload) ─── */
.upload-progress {
  display: none;
  margin-top: 12px;
}
.upload-progress.show { display: block; }
.progress-bar-bg {
  background: var(--bg3);
  border-radius: 20px;
  height: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 20px;
  width: 0;
  transition: width 0.3s;
}
.progress-label { font-size: 0.8rem; color: var(--text2); margin-top: 6px; }

/* ─── Role badge ─── */
.role-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent2);
  border: 1px solid #7c5cfc44;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.role-badge.maker {
  background: #5cfca012;
  color: var(--success);
  border-color: #5cfca044;
}

/* ─── Toolbar (library search/filter bar) ─── */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrap input { padding-left: 38px; width: 100%; }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none;
}
.toolbar select {
  width: auto;
  padding: 10px 14px;
}

/* ─── Accordion ─── */
.accordion {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-header {
  display: flex;
  align-items: stretch;
}
.accordion-header.open { border-bottom: 1px solid var(--border); }

.accordion-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  transition: background 0.15s;
}
.accordion-toggle:hover { background: var(--bg3); }

.subscribe-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text3);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.subscribe-btn:hover { background: var(--bg3); color: var(--text); }
.subscribe-btn.subscribed { color: var(--accent2); }
.subscribe-btn.subscribed:hover { color: var(--danger); }

.bell-icon { display: flex; align-items: center; }
.sub-label { font-size: 0.78rem; }

.accordion-arrow {
  display: flex;
  align-items: center;
  color: var(--text3);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.accordion-toggle.open .accordion-arrow { transform: rotate(90deg); }

.accordion-title { flex: 1; }

.episode-count {
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--bg3);
  color: var(--text3);
  border: 1px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
}

.accordion-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* ─── Episode card ─── */
.episode-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.episode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.episode-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent2);
  background: var(--accent-dim);
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid #7c5cfc33;
}

.episode-uploader { font-size: 0.8rem; color: var(--text3); }

.parts-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
}

.episode-title { font-weight: 700; font-size: 1rem; }

.episode-desc {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
}

.episode-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text3);
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.duration-badge {
  background: rgba(99, 179, 237, 0.15);
  color: #63b3ed;
  border: 1px solid rgba(99, 179, 237, 0.3);
}
.bitrate-badge {
  background: rgba(154, 117, 234, 0.15);
  color: #b794f4;
  border: 1px solid rgba(154, 117, 234, 0.3);
}
.size-badge {
  background: rgba(160, 174, 192, 0.12);
  color: #a0aec0;
  border: 1px solid rgba(160, 174, 192, 0.25);
}
.format-badge {
  background: rgba(72, 187, 120, 0.15);
  color: #68d391;
  border: 1px solid rgba(72, 187, 120, 0.3);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* ─── LUFS / True Peak badges ─── */
/* Neutral (niet gemeten of geen norm) */
.lufs-badge, .peak-badge {
  font-variant-numeric: tabular-nums;
}
.lufs-neutral, .peak-neutral {
  background: rgba(160, 174, 192, 0.10);
  color: #718096;
  border: 1px solid rgba(160, 174, 192, 0.2);
}
/* Binnen norm */
.lufs-ok {
  background: rgba(72, 187, 120, 0.15);
  color: #68d391;
  border: 1px solid rgba(72, 187, 120, 0.3);
}
.peak-ok {
  background: rgba(72, 187, 120, 0.15);
  color: #68d391;
  border: 1px solid rgba(72, 187, 120, 0.3);
}
/* Buiten norm */
.lufs-warn {
  background: rgba(246, 173, 85, 0.18);
  color: #f6ad55;
  border: 1px solid rgba(246, 173, 85, 0.35);
}
.peak-warn {
  background: rgba(252, 129, 74, 0.18);
  color: #fc814a;
  border: 1px solid rgba(252, 129, 74, 0.35);
}

/* ─── Upload knop in accordion header ─── */
.accordion-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg2);
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.accordion-upload-btn:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #fff;
}

/* ─── Subscriber strip (library accordion) ─── */
.subscriber-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 20px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.station-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(124,92,252,0.12);
  border: 1px solid rgba(124,92,252,0.25);
  color: var(--accent2);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Download button (episode footer) ─── */
.footer-spacer { flex: 1; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg2);
  color: var(--text3);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-download:hover {
  background: var(--accent-dim);
  color: var(--accent2);
  border-color: var(--accent);
}

/* ─── Status badges (maker dashboard) ─── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge.uploaded {
  background: var(--accent-dim);
  color: var(--accent2);
  border: 1px solid #7c5cfc33;
}
.status-badge.downloaded {
  background: #1a3a1a;
  color: var(--success);
  border: 1px solid #5cfca033;
}

.reused-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
}

.scheduled-time {
  font-size: 0.82rem;
  color: var(--accent2);
  font-weight: 600;
}

/* ─── Role badge: luisteraar ─── */
.role-badge.listener {
  background: #1a2a3a;
  color: #60aaff;
  border: 1px solid #60aaff33;
}

/* ─── Maker table ─── */
.maker-table { font-size: 0.88rem; }

/* ─── Quality standards form ─── */
.quality-form { max-width: 900px; }
.quality-program-block { padding: 16px 0; }

/* ─── Multi-part player ─── */
.parts-player { display: flex; flex-direction: column; gap: 8px; }

.parts-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.part-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg2);
  color: var(--text2);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.part-btn:hover { background: var(--bg3); color: var(--text); }
.part-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Upload file list ─── */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.part-label-upload {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent2);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.file-list-name { flex: 1; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list-badges { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* ─── API key display ─── */
.new-key-box {
  background: #1a2e1a;
  border: 1px solid #2d5a2d;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.new-key-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #5cb85c;
  margin-bottom: 12px;
}

.new-key-value-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.new-key-value {
  flex: 1;
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
  color: #a8d5a8;
  background: #0f1f0f;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #2d5a2d;
}

/* ─── Form card (upload page) ─── */
.form-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 140px; }

.required { color: var(--danger); }

/* ─── Admin table ─── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg3); }

.count-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text2);
  font-weight: 600;
}

/* ─── Inline form (admin) ─── */
.inline-form {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
}

/* ─── Settings list ─── */
.settings-list { display: flex; flex-direction: column; gap: 1px; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}

.setting-info strong { display: block; margin-bottom: 4px; }
.setting-info p { font-size: 0.85rem; color: var(--text2); max-width: 520px; }

/* ─── Toggle switch ─── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 26px;
  transition: .2s;
}
.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: var(--text3);
  border-radius: 50%;
  transition: .2s;
}
input:checked + .toggle-slider { background: var(--accent-dim); border-color: var(--accent); }
input:checked + .toggle-slider::before { transform: translateX(22px); background: var(--accent); }

/* ─── Small button variant ─── */
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

/* ─── Maker chips (admin program panel) ─── */
.makers-expand-row td { background: var(--bg); }

.makers-panel-wrap { border-top: 1px solid var(--border); }

.makers-panel-inner {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.makers-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
  align-items: center;
}

.maker-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px 4px 8px;
  background: var(--accent-dim);
  border: 1px solid #7c5cfc44;
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--accent2);
  font-weight: 600;
}

.chip-remove {
  background: none;
  border: none;
  color: var(--accent2);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.6;
  font-family: inherit;
}
.chip-remove:hover { opacity: 1; color: var(--danger); }

.add-maker-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.add-maker-row select { flex: 1; max-width: 360px; }

.count-badge.zero { color: var(--danger); border-color: #fc5c7c44; background: #fc5c7c12; }

/* ─── Responsive ─── */
@media (max-width: 700px) {
  main { padding: 20px 16px; }
  .auth-card { padding: 28px 20px; }
  .form-card { padding: 20px 16px; }
  .accordion-toggle { padding: 14px 16px; }
  .toolbar { flex-direction: column; }
  .toolbar select, .toolbar .btn { width: 100%; }
  .admin-table { font-size: 0.8rem; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
  .setting-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .form-row { flex-direction: column; }
  header { padding: 0 16px; gap: 8px; }
  .nav-links { gap: 0; }
  .nav-link span { display: none; }
}
