body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #f4f6fa;
  color: #1b2430;
}

a {
  color: #2563eb;
}

.landing {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Login */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0f172a, #1e293b);
}

.login-wrap {
  width: min(420px, calc(100% - 2rem));
}

.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem 1.75rem 1.25rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.muted {
  color: #64748b;
  margin: 0 0 1rem;
}

.form label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
}

.form input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  background: #e2e8f0;
  color: #0f172a;
}

.login-card .btn.primary {
  width: 100%;
  background: #2563eb;
  color: #fff;
}

.admin-content .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
}

.admin-content .btn.primary {
  width: auto;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.admin-content .btn.primary:hover {
  background: #1d4ed8;
}

.admin-content button.btn {
  border: 1px solid transparent;
  line-height: 1.2;
}

.admin-content .btn:hover {
  filter: brightness(0.97);
}

.admin-content .btn.btn-sm {
  padding: 0.38rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 7px;
}

.admin-content .btn.secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.admin-content .btn.secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.admin-content .btn.danger {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.28);
}

.admin-content .btn.danger:hover {
  background: #b91c1c;
}

.admin-content .btn.ghost-danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
  box-shadow: none;
}

.admin-content .btn.ghost-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.table-actions form {
  margin: 0;
}

.data-table td.table-actions-cell {
  white-space: nowrap;
}

.alert {
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
}

.alert.err {
  background: #fee2e2;
  color: #991b1b;
}

.login-foot {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

/* Admin shell */
.admin-body {
  background: #eef2f7;
}

.admin-shell {
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.admin-sidebar {
  background: #111827;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  padding: 1rem 0.85rem;
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand span {
  color: #94a3b8;
  font-size: 0.82rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 1.25rem 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.nav-group {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.nav-group-title {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 0.65rem 0.7rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-group-title::-webkit-details-marker {
  display: none;
}

.nav-group-title::before {
  content: "▸";
  font-size: 0.85rem;
  color: #93c5fd;
  transition: transform 0.15s ease;
}

.nav-group[open] .nav-group-title::before {
  transform: rotate(90deg);
}

.nav-group-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.45rem 0.55rem 0.55rem;
}

.admin-nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.5rem 0.65rem 0.5rem 1.15rem;
  border-radius: 8px;
  font-size: 0.88rem;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-nav a.active {
  box-shadow: inset 3px 0 0 #60a5fa;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.sidebar-foot p {
  margin: 0;
  font-weight: 600;
}

.sidebar-foot small {
  display: block;
  color: #94a3b8;
  margin: 0.15rem 0 0.65rem;
}

.sidebar-foot a {
  color: #93c5fd;
}

.admin-main {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.admin-top h1 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-open-site {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  color: #2563eb;
  text-decoration: none;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-open-site:hover {
  color: #1d4ed8;
  background: #dbeafe;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

.admin-open-site:active {
  transform: translateY(0);
}

.admin-open-site .icon-house {
  flex-shrink: 0;
}

.admin-content {
  flex: 1;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 1.25rem 1.5rem 2rem;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  width: 100%;
  box-sizing: border-box;
}

.card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.card-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 1rem;
}

.form-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.hint {
  color: #64748b;
  font-size: 0.88rem;
  margin: 0.25rem 0 0;
}

.module-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.module-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.badge {
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.badge.on {
  background: #dcfce7;
  color: #166534;
}

.badge.off {
  background: #fee2e2;
  color: #991b1b;
}

.badge.neutral {
  background: #f1f5f9;
  color: #64748b;
}

.alert.ok {
  background: #dcfce7;
  color: #166534;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.template-grid {
  display: grid;
  gap: 0.75rem;
}

.template-option {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
}

.template-option.is-active {
  border-color: #2563eb;
  background: #eff6ff;
}

.template-option input {
  justify-self: start;
}

.template-option .muted {
  color: #64748b;
  font-size: 0.9rem;
}

.template-option small {
  color: #94a3b8;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.card-head-inline h2 {
  margin: 0 0 0.25rem;
}

.card-head-inline .muted {
  margin: 0 0 1rem;
}

.perm-board {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.perm-section {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
  background: #f8fafc;
}

.perm-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.perm-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}

.perm-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.perm-toggle:hover {
  border-color: #93c5fd;
}

.perm-toggle.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
  color: #1e3a8a;
}

.perm-toggle-label {
  font-size: 0.92rem;
  font-weight: 600;
}

.perm-toggle-slug {
  font-size: 0.75rem;
  color: #64748b;
  font-family: Consolas, monospace;
}

.perm-toggle.is-active .perm-toggle-slug {
  color: #3b82f6;
}

.perm-user-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.perm-user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.perm-user-meta strong {
  display: block;
  font-size: 0.92rem;
}

.perm-user-meta small {
  display: block;
  color: #64748b;
  font-family: Consolas, monospace;
  font-size: 0.75rem;
}

.perm-role-hint {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.perm-state-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.perm-state-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.perm-state-btn.is-active {
  border-color: #64748b;
  background: #e2e8f0;
  color: #0f172a;
}

.perm-state-btn.allow.is-active {
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}

.perm-state-btn.deny.is-active {
  border-color: #dc2626;
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 720px) {
  .perm-user-row {
    grid-template-columns: 1fr;
  }

  .perm-state-group {
    justify-content: flex-start;
  }
}

.form select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

@media (max-width: 800px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
  }

  .admin-nav {
    flex-direction: column;
    margin: 0;
    max-height: none;
  }

  .sidebar-foot {
    margin-top: 0;
    margin-left: auto;
    border-top: 0;
    text-align: right;
  }
}

.card-head-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.card-head-inline h2 {
  margin: 0;
}

.schedule-mode-form {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.schedule-mode-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.schedule-mode-toggle {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  background: #f1f5f9;
  border-radius: 10px;
}

.mode-btn {
  border: 0;
  background: transparent;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #475569;
}

.mode-btn.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.schedule-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.schedule-tab {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

.schedule-tab.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.schedule-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

@media (max-width: 900px) {
  .form-grid-2,
  .form-grid-3,
  .form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .form-grid-2,
  .form-grid-3,
  .form-grid-4 {
    grid-template-columns: 1fr;
  }
}

.radio-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mode-btn-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 600;
}

.mode-btn-option input[type="radio"] {
  accent-color: #2563eb;
}

.mode-btn-option:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.admin-form .card + .card {
  margin-top: 1rem;
}

.admin-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.admin-form .form-field:last-child {
  margin-bottom: 0;
}

.admin-form .form-field-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: #0f172a;
  line-height: 1.35;
}

.admin-form .form-field-label code {
  font-size: 0.82em;
  font-weight: 600;
}

.admin-form .form-field-hint {
  margin: -0.15rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.45;
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="email"],
.admin-form input[type="number"],
.admin-form input[type="password"],
.admin-form select,
.admin-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.admin-form select {
  cursor: pointer;
}

.admin-form .form-grid-2,
.admin-form .form-grid-3 {
  margin-bottom: 0.25rem;
}

.admin-form .form-grid-2 > .form-field,
.admin-form .form-grid-3 > .form-field {
  margin-bottom: 0;
}

.admin-form .form-stream-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 1rem 1.25rem;
  align-items: end;
}

@media (max-width: 900px) {
  .admin-form .form-stream-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-form .form-stream-grid .form-field:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .admin-form .form-stream-grid {
    grid-template-columns: 1fr;
  }
}

.admin-form .form-settings-group {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.admin-form .form-settings-group h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.admin-form .form-settings-group .muted {
  margin: 0 0 1rem;
}

.admin-form .form-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 1.25rem 0;
}

.admin-form .switch-row {
  margin-bottom: 1rem;
}

.admin-form .switch-row:last-child {
  margin-bottom: 0;
}

.admin-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid #e2e8f0;
}

.card > .form-section-lead {
  margin: -0.35rem 0 1.15rem;
  max-width: 52rem;
  line-height: 1.5;
}

.radio-admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.radio-live-preview .radio-preview-grid {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 55%);
}

.radio-preview-art {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #2f8cff;
  background: #0f172a;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.radio-preview-meta {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.radio-preview-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
  margin: 0;
}

.radio-preview-row dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.radio-preview-row dd {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.radio-preview-row dd.is-on-air {
  font-size: 1.05rem;
  color: #0369a1;
}

.radio-preview-row dd.is-muted-value {
  font-weight: 500;
  color: #64748b;
}

.radio-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .radio-upload-grid {
    grid-template-columns: 1fr;
  }
}

.radio-upload-tile {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.radio-upload-tile-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.radio-upload-tile .upload-preview {
  width: 100%;
  max-width: none;
  max-height: 140px;
  margin: 0;
  aspect-ratio: 1;
  object-fit: cover;
}

.radio-upload-tile .file-drop-zone {
  margin-top: 0;
  min-height: 96px;
}

.radio-upload-tile .upload-preview + .file-drop-zone {
  min-height: 88px;
}

.radio-preview-picker {
  margin: 0;
}

.radio-preview-picker-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
}

.radio-preview-picker select {
  min-width: 12rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font: inherit;
}

.radio-stream-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.radio-stream-entry.is-default .radio-stream-row {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.radio-stream-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 55%);
}

.radio-stream-row-media {
  flex: 0 0 96px;
  width: 96px;
}

.radio-stream-art {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #2f8cff;
  background: #0f172a;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.radio-stream-row-body {
  flex: 1 1 14rem;
  min-width: 0;
}

.radio-stream-row-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 7.5rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.radio-stream-row-actions form {
  margin: 0;
}

.radio-stream-row-actions .btn {
  width: 100%;
  justify-content: center;
}

.radio-stream-row .badge.on {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.radio-stream-edit-panel {
  margin-top: 0.65rem;
}

.radio-stream-edit-panel:not([open]) {
  display: none;
}

@media (max-width: 720px) {
  .radio-stream-row-media {
    flex-basis: 72px;
    width: 72px;
  }

  .radio-stream-art {
    width: 72px;
    height: 72px;
  }

  .radio-stream-row-actions {
    flex-basis: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
    margin-left: 0;
  }

  .radio-stream-row-actions .btn {
    width: auto;
    flex: 1 1 auto;
  }
}

.radio-stream-add-panel {
  margin-top: 1rem;
}

.radio-stream-add-panel:not([open]) {
  display: none;
}

.radio-stream-add-summary {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.radio-stream-add-title {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.radio-upload-tile--inline {
  max-width: 280px;
}

.radio-stream-autodj-field {
  margin-top: 0.25rem;
}

.card-head-inline .form-section-lead {
  margin: 0.35rem 0 0;
  max-width: 36rem;
}

.schedule-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.schedule-image-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
  background: #f8fafc;
}

.schedule-image-card h4 {
  margin: 0 0 0.65rem;
}

.schedule-image-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.65rem;
}

.schedule-image-placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
}

.settings-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.settings-subnav-link {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.92rem;
}

.settings-subnav-link.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.switch-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.switch-row-label {
  font-weight: 600;
  color: #0f172a;
}

.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.15rem 0;
  color: #64748b;
  font-weight: 600;
  font-size: 0.85rem;
}

.switch-track {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.15s;
}

.switch-thumb {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s;
}

.switch-toggle.is-on {
  color: #166534;
}

.switch-toggle.is-on .switch-track {
  background: #22c55e;
}

.switch-toggle.is-on .switch-thumb {
  transform: translateX(1.25rem);
}

.switch-state {
  min-width: 2rem;
  text-align: left;
}

.perm-toggle-state {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.perm-toggle.is-active .perm-toggle-state {
  color: #16a34a;
}

.card-danger {
  border: 1px solid #fecaca;
  background: #fffafb;
}

.user-danger-actions {
  align-items: center;
}

.user-danger-actions form {
  margin: 0;
}

.form-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 1.25rem 0;
}

.admin-collapse {
  margin: 1rem 0 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.admin-collapse > summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-collapse > summary::-webkit-details-marker {
  display: none;
}

.admin-collapse > summary::before {
  content: "▸";
  color: #64748b;
  transition: transform 0.15s ease;
}

.admin-collapse[open] > summary::before {
  transform: rotate(90deg);
}

.admin-collapse-hint {
  font-weight: 500;
  color: #64748b;
  font-size: 0.88rem;
}

.admin-collapse-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid #e2e8f0;
}

.perm-collapse .perm-board {
  margin-top: 0.85rem;
}

.file-drop-zone {
  position: relative;
  margin-top: 0.45rem;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
  min-height: 108px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop-zone:hover,
.file-drop-zone.is-dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.file-drop-zone.has-file {
  border-style: solid;
  border-color: #93c5fd;
}

.file-drop-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-drop-prompt {
  pointer-events: none;
  text-align: center;
  padding: 1rem;
  color: #475569;
  font-size: 0.9rem;
}

.file-drop-icon {
  display: block;
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  line-height: 2rem;
  font-weight: 700;
  color: #334155;
}

.file-drop-zone.is-dragover .file-drop-icon,
.file-drop-zone.has-file .file-drop-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.file-drop-name {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e40af;
}

.upload-preview {
  display: block;
  max-width: 120px;
  max-height: 120px;
  margin-top: 0.35rem;
  margin-bottom: 0.25rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  object-fit: cover;
}

.member-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.25rem;
}

.member-nav-link {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.92rem;
}

.member-nav-link:hover,
.member-nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.member-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.sidebar-extra-link {
  display: block;
  margin-bottom: 0.35rem;
  color: #93c5fd;
  font-size: 0.85rem;
}

.page-toolbar {
  margin-bottom: 1rem;
}

.user-profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
}

.user-profile-head-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.92rem;
}

.checkbox-inline input {
  width: auto;
  margin: 0;
}
