:root {
  color-scheme: dark;
  --bg: #05060a;
  --bg-elevated: #111321;
  --accent: #6c5ce7;
  --accent-soft: rgba(108, 92, 231, 0.2);
  --accent-soft-strong: rgba(108, 92, 231, 0.35);
  --text: #f5f7ff;
  --text-muted: #9ca3c7;
  --border-soft: rgba(255, 255, 255, 0.06);
  --danger: #ff7675;
  --danger-soft: rgba(255, 118, 117, 0.16);
  --success: #00b894;
  --success-soft: rgba(0, 184, 148, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b2142 0, var(--bg) 55%);
  color: var(--text);
}

#app-root {
  min-height: 100vh;
  display: flex;
}

.admin-shell {
  display: flex;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.sidebar {
  width: 220px;
  background: rgba(5, 6, 15, 0.98);
  border-right: 1px solid var(--border-soft);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-title {
  font-size: 17px;
  font-weight: 600;
}

.sidebar-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.sidebar-item {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid transparent;
  color: var(--text-muted);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.sidebar-item.active {
  background: linear-gradient(135deg, #6c5ce7, #a363d9);
  border-color: transparent;
  color: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
}

.main {
  flex: 1;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.main-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.main-title {
  font-size: 18px;
  font-weight: 600;
}

.main-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.main-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 999px;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-primary {
  background: linear-gradient(135deg, #6c5ce7, #a363d9);
  color: #ffffff;
}

.btn-danger {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}
.btn-danger:hover { background: rgba(255, 71, 87, 0.25); }

.btn-xs {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
}

.del-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.del-confirm-text {
  font-size: 11px;
  color: var(--text-muted);
}
.del-cell { width: 1%; white-space: nowrap; }

.btn-secondary {
  background: rgba(12, 16, 32, 0.95);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-success {
  background: rgba(0, 184, 148, 0.15);
  color: #00b894;
  border: 1px solid rgba(0, 184, 148, 0.35);
}
.btn-success:hover { background: rgba(0, 184, 148, 0.25); }

.btn-danger {
  background: rgba(220, 53, 69, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(220, 53, 69, 0.3);
}
.btn-danger:hover {
  background: rgba(220, 53, 69, 0.28);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 12px;
  align-items: flex-start;
}

.content-stacked {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.surface--full {
  grid-column: 1 / -1;
}

.surface {
  border-radius: 16px;
  background: rgba(6, 8, 20, 0.96);
  border: 1px solid var(--border-soft);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.surface-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.surface-title {
  font-size: 13px;
  font-weight: 500;
}

.surface-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(8, 10, 22, 0.9);
}

.chip.accent {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric-card {
  flex: 1;
  min-width: 120px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top left, rgba(108, 92, 231, 0.12), rgba(6, 8, 20, 0.98));
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
}

.metric-value {
  font-size: 18px;
  font-weight: 600;
}

.metric-extra {
  font-size: 11px;
  color: var(--success);
}

.table-wrapper {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  margin-bottom: 16px;
  padding: 4px 0;
}

/* ===== Монетизация: KPI-карточки ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
  background: rgba(255,255,255,0.025);
  transition: background 0.2s, border-color 0.2s;
}
.kpi-card:hover { background: rgba(255,255,255,0.045); border-color: rgba(255,255,255,0.12); }
.kpi-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  border-radius: 16px 16px 0 0;
}
.kpi-card--purple::before { background: linear-gradient(90deg,#7B61FF,#b09dff); }
.kpi-card--teal::before   { background: linear-gradient(90deg,#00D4AA,#00f5c8); }
.kpi-card--gold::before   { background: linear-gradient(90deg,#FFB800,#ffd760); }
.kpi-card--blue::before   { background: linear-gradient(90deg,#5E9BFF,#89b8ff); }

.kpi-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi-card-icon { font-size: 22px; line-height: 1; }
.kpi-card-badge {
  font-size: 9px; color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
  border-radius: 6px; padding: 2px 7px;
  letter-spacing: 0.3px; white-space: nowrap;
}
.kpi-card-val {
  font-size: 30px; font-weight: 800;
  letter-spacing: -1px; line-height: 1;
}
.kpi-card-val--dim { color: rgba(255,255,255,0.3); font-size: 22px; }
.kpi-card-label { font-size: 11px; color: var(--text-muted); line-height: 1.3; }
.kpi-card-hint { font-size: 10px; color: rgba(255,255,255,0.18); font-style: italic; margin-top: -4px; }

/* ===== Donut + воронка ===== */
.info-split {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 20px;
}
@media (max-width: 860px) { .info-split { grid-template-columns: 1fr; } }

.chart-wrapper--donut { height: 210px; margin-bottom: 0; }

.funnel-list { display: flex; flex-direction: column; gap: 14px; }
.funnel-item { display: flex; flex-direction: column; gap: 5px; }
.funnel-item-top { display: flex; justify-content: space-between; align-items: baseline; }
.funnel-item-label { font-size: 12px; color: var(--text-muted); }
.funnel-item-right { display: flex; align-items: baseline; gap: 5px; }
.funnel-item-val { font-size: 14px; font-weight: 700; }
.funnel-item-pct {
  font-size: 11px;
  padding: 1px 5px; border-radius: 5px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.5);
}
.funnel-track {
  height: 7px; border-radius: 6px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.funnel-fill { height: 100%; border-radius: 6px; transition: width 0.7s cubic-bezier(.4,0,.2,1); }

/* ===== Таблица платежей ===== */
.pay-table-wrap {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  margin-top: 4px;
  max-height: 420px;
  overflow-y: auto;
}
.pay-row {
  display: grid;
  grid-template-columns: 46px 70px 1fr 1fr 100px 100px 120px;
  gap: 6px; align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
}
.pay-row:last-child { border-bottom: none; }
.pay-row--head {
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  background: rgba(9,12,28,0.97);
  position: sticky; top: 0; z-index: 1;
}
.pay-row:not(.pay-row--head):hover { background: rgba(255,255,255,0.025); }
.pay-id { color: var(--text-muted); font-size: 11px; }
.pay-user { font-weight: 600; }
.pay-amount { font-weight: 700; font-size: 13px; }
.pay-date { color: var(--text-muted); font-size: 11px; }

.s-badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 20px; padding: 3px 9px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.2px;
  white-space: nowrap;
}
.s-badge--ok  { background: rgba(0,212,170,0.13); color: #00D4AA; }
.s-badge--wait { background: rgba(255,184,0,0.13); color: #FFB800; }
.s-badge--fail { background: rgba(255,71,87,0.13);  color: #FF4757; }
.s-badge--other { background: rgba(255,255,255,0.07); color: var(--text-muted); }

/* Billing: сводка платежей */
.billing-pay-summary {
  display: flex; gap: 20px; flex-wrap: wrap;
  padding: 4px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 14px;
}
.billing-pay-sum-item { display: flex; flex-direction: column; gap: 2px; }
.billing-pay-sum-val { font-size: 22px; font-weight: 700; line-height: 1; }
.billing-pay-sum-label { font-size: 11px; color: var(--text-muted); }

/* Referrals: настройки */
.ref-settings-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 8px 0 4px;
}
.ref-settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ref-settings-field--btn { justify-content: flex-end; }
.ref-settings-label { font-size: 12px; color: var(--text-muted); }
.ref-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ref-toggle-label { font-size: 13px; }

/* Notifications */
.notif-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.notif-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-wrap: wrap;
}
.notif-row:last-child { border-bottom: none; }
.notif-row--actions { padding-top: 18px; }
.notif-row-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
  font-size: 13px;
}
.notif-row-hint { font-size: 11px; color: var(--text-muted); }

/* Toggle switch */
.notif-toggle-row { display: flex; align-items: center; gap: 10px; }
.notif-toggle-track {
  width: 42px; height: 24px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.notif-toggle-track--on { background: var(--accent); }
.notif-toggle-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px; left: 3px;
  transition: left 0.2s;
}
.notif-toggle-track--on .notif-toggle-thumb { left: 21px; }
.notif-toggle-status { font-size: 12px; color: var(--text-muted); }
.notif-toggle-status--on { color: var(--accent); }

/* Day chips */
.notif-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.notif-chip {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.notif-chip:hover { border-color: rgba(255,255,255,0.3); color: var(--text); }
.notif-chip--active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Playlist expand panel */
.pl-expand-row { background: rgba(255,255,255,0.02); }
.pl-expand-td { padding: 0 !important; }
.pl-expand-inner {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.pl-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.pl-track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.pl-track-item:hover { background: rgba(255,255,255,0.04); }
.pl-track-pos {
  width: 22px;
  text-align: right;
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
}
.pl-track-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.pl-track-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-track-artist { font-size: 11px; color: var(--text-muted); }
.pl-track-dur {
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
}
.pl-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
}
.pl-add-row .input { width: 130px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead {
  background: rgba(9, 12, 28, 0.96);
}

th,
td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

th {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11px;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
}

.pill-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.pill-muted {
  background: rgba(120, 120, 140, 0.14);
  color: var(--text-muted);
}

.pill-info {
  background: rgba(108, 92, 231, 0.18);
  color: #a29bfe;
}

.scroll-y {
  max-height: 360px;
  overflow-y: auto;
}

.input,
.select {
  background: rgba(10, 12, 26, 0.96);
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  min-width: 0;
}

.input::placeholder {
  color: var(--text-muted);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.surface-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.detail-panel {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top right, rgba(108, 92, 231, 0.16), rgba(6, 8, 20, 0.98));
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-title {
  font-size: 14px;
  font-weight: 500;
}

.detail-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-soft {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 10px;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 184, 148, 0.18);
  color: var(--text);
  font-size: 12px;
  border: 1px solid var(--success-soft);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.toast-error {
  background: rgba(255, 118, 117, 0.18);
  border-color: var(--danger-soft);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 30;
}

.modal {
  width: 100%;
  max-width: 640px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(108, 92, 231, 0.16), rgba(5, 6, 15, 0.98));
  border: 1px solid var(--border-soft);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
}

.modal-tabs {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px;
  background: rgba(10, 12, 26, 0.96);
  border: 1px solid var(--border-soft);
}

.modal-tab {
  border-radius: 999px;
  border: none;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
}

.modal-tab.active {
  background: linear-gradient(135deg, #6c5ce7, #a363d9);
  color: #fff;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 120px;
  flex: 1;
}

.field-label {
  font-size: 11px;
  color: var(--text-muted);
}

.field-error {
  font-size: 11px;
  color: var(--danger);
}

.file-input {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.modal-hint {
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .sidebar {
    display: none;
  }
  .content {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── БЛОК 8: Batch-операции ─────────────────────────────────────────── */
.cb-cell {
  width: 36px;
  text-align: center;
  padding: 0 8px;
}
.cb-cell input[type="checkbox"] {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}
.row-selected td {
  background: var(--accent-soft) !important;
}
.load-more-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  margin-top: 4px;
}
.load-more-info {
  font-size: 12px;
  color: var(--text-muted);
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 8px;
}
.bulk-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* ── БЛОК 9: Сортировка таблиц ─────────────────────────────────────── */
th {
  user-select: none;
}
th:hover {
  color: var(--accent);
}
.th-sorted {
  color: var(--accent);
}

/* ── БЛОК 10: Прогресс загрузки ─────────────────────────────────────── */
.upload-progress-wrap {
  margin-bottom: 8px;
}
.upload-progress {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--border-soft);
  border: none;
}
.upload-progress::-webkit-progress-bar {
  background: var(--border-soft);
  border-radius: 3px;
}
.upload-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.2s;
}
.upload-progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 3px;
}

/* ── БЛОК 7: Аудит лог ─────────────────────────────────────────────── */
.audit-action-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  white-space: nowrap;
}
.audit-date {
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-muted);
}
.audit-detail {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── БЛОК 8: Мониторинг здоровья ──────────────────────────────────── */
.health-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.health-card {
  flex: 1 1 160px;
  background: var(--surface-2, rgba(255,255,255,0.04));
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
}
.health-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.health-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.health-dot.health-ok      { background: #00D4AA; box-shadow: 0 0 6px rgba(0,212,170,0.5); }
.health-dot.health-error   { background: #ff5555; box-shadow: 0 0 6px rgba(255,85,85,0.5); }
.health-dot.health-loading { background: #888; }
.health-workers,
.health-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Disk bar ──────────────────────────────────────────────────────── */
.disk-bar-wrap {
  margin-top: 6px;
}
.disk-bar-bg {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.disk-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7B61FF, #00D4AA);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.disk-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── БЛОК 9: Статус треков (preview + badge) ───────────────────────── */
.track-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.track-badge.warm {
  background: rgba(255,200,80,0.18);
  color: #ffcc44;
}
.track-badge.cold {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(123,97,255,0.12);
  color: var(--accent);
  cursor: pointer;
  font-size: 10px;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.btn-play:hover   { background: rgba(123,97,255,0.28); }
.btn-play.active  { background: rgba(123,97,255,0.4); border-color: var(--accent); }
.btn-play:active  { transform: scale(0.9); }
.track-preview-audio {
  display: block;
  width: 100%;
  height: 28px;
  margin-top: 4px;
  accent-color: var(--accent);
}

/* ── Жалобы: кнопки действий ───────────────────────────────────────── */
.complaint-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── btn-sm helper ─────────────────────────────────────────────────── */
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
.btn-danger {
  background: rgba(255,85,85,0.15);
  color: #ff5555;
  border-color: rgba(255,85,85,0.3);
}
.btn-danger:hover {
  background: rgba(255,85,85,0.28);
}

/* ── БЛОК 10: Жанры ────────────────────────────────────────────────── */
.genre-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(123,97,255,0.15);
  color: var(--accent);
  border: 1px solid rgba(123,97,255,0.25);
}
.genre-chip--view {
  cursor: default;
}
.genre-chip--sm {
  padding: 1px 6px;
  font-size: 10px;
}
.genre-chip--more {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border-color: var(--border-soft);
}
.genre-chip-remove {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 0 0 2px;
  opacity: 0.7;
}
.genre-chip-remove:hover { opacity: 1; }

/* Ячейка жанров в таблице треков */
.genre-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: 200px;
}
.btn-genre-edit {
  background: none;
  border: 1px dashed var(--border-soft);
  color: var(--text-muted);
  border-radius: 20px;
  font-size: 10px;
  padding: 1px 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.btn-genre-edit:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Список жанров в управлении */
.genre-create-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.genre-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.input--inline {
  width: 200px;
}

/* Пикер жанров (модалка) */
.modal--sm {
  width: 380px;
  max-width: 95vw;
}
.genre-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}
.genre-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.1s;
  font-size: 13px;
}
.genre-picker-item:hover { background: rgba(255,255,255,0.05); }
.genre-picker-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── БЛОК 11: Upload — drag-drop, file list, cover preview ─────────── */
.upload-dropzone {
  position: relative;
  border: 1.5px dashed var(--border-soft);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: rgba(255,255,255,0.02);
}
.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(123,97,255,0.06);
}
.upload-dropzone .file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-dropzone-hint {
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
  user-select: none;
}

/* Cover preview */
.cover-preview-wrap {
  margin-top: 8px;
  min-height: 0;
}
.cover-preview-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
}

/* Batch file list */
.batch-file-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}
.batch-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  font-size: 12px;
}
.batch-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.85);
}
.batch-file-size {
  color: var(--text-muted);
  white-space: nowrap;
}
.batch-file-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.1s;
}
.batch-file-remove:hover { color: #ff5555; }
.batch-file-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px;
  text-align: center;
}

/* Чекбоксы жанров в форме загрузки */
.genre-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  max-height: 120px;
  overflow-y: auto;
  padding: 6px 4px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
}
.genre-check-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.1s;
}
.genre-check-item:hover { background: rgba(255,255,255,0.05); }
.genre-check-cb {
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── БЛОК 12: Вкладки (жалобы/пожелания) ──────────────────────────── */
.tabs-row {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 8px;
}
.tab-btn {
  padding: 5px 14px;
  border-radius: 8px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.tab-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.tab-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-soft-strong);
  color: var(--text);
}

.wish-text-cell {
  max-width: 360px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}

