/* ═══════════════════════════════════════════
   AutoMixSJ88 — Design System
   Dark Glassmorphism + Gradient Accents
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Reset & Base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #06060f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(15, 15, 35, 0.6);
  --bg-card-hover: rgba(20, 20, 50, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-input: rgba(255, 255, 255, 0.05);

  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(139, 92, 246, 0.4);

  --text-primary: #e8e8ef;
  --text-secondary: #8888a0;
  --text-muted: #555570;

  --accent-1: #8b5cf6;
  --accent-2: #6366f1;
  --accent-3: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6);
  --accent-glow: rgba(99, 102, 241, 0.15);

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.1);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  /* NEW - Additional backgrounds */
  --bg-deep: #04040c;
  --bg-glass-2: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(255, 255, 255, 0.045);

  /* NEW - Additional borders */
  --border-hover: rgba(255, 255, 255, 0.10);
  --border-glow: rgba(99, 102, 241, 0.25);

  /* NEW - Typography */
  --text-bright: #ffffff;
  --text-secondary: #8e8ea8;

  /* NEW - Additional accent */
  --accent-4: #06b6d4;
  --accent-gradient-2: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #06b6d4 100%);
  --accent-glow: rgba(99, 102, 241, 0.12);

  /* NEW - Radii */
  --radius-xs: 6px;
  --radius-pill: 100px;

  /* NEW - Shadows */
  --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 36px rgba(99, 102, 241, 0.10);
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.03);

  /* NEW - Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.15s;
  --t-normal: 0.3s;
  --t-slow: 0.5s;

  /* NEW - Layout */
  --sidebar-collapsed-w: 72px;
  --header-h: 0px;
}

html { font-size: 15px; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Background Effects ─────────────────── */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.02) 0%, transparent 70%);
  z-index: 0;
  animation: bgFloat 30s ease-in-out infinite;
}
@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -1%) rotate(1deg); }
  66% { transform: translate(-1%, 2%) rotate(-1deg); }
}

/* ─── Layout ─────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── Sidebar ────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}
.sidebar-logo h1 {
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-logo small {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

/* Nav Items */
.nav-section {
  margin-bottom: 8px;
}
.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent-1);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent-gradient);
  border-radius: 0 4px 4px 0;
}
.nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }

/* User profile in sidebar */
.sidebar-user {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user .user-email {
  font-size: 0.65rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: var(--transition-fast);
}
.btn-logout:hover { color: var(--error); }

/* ─── Main Content ───────────────────────── */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}

/* ─── Page Header ────────────────────────── */
.page-header {
  margin-bottom: 32px;
}
.page-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.page-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ─── Cards ──────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
}

/* ─── Holographic Card ─────────────────────── */
.card-holo {
  position: relative;
  z-index: 1;
}
.card-holo::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--holo-angle, 0deg),
    #8b5cf6 0%, #3b82f6 15%, #06b6d4 30%,
    #10b981 45%, #f59e0b 60%, #ec4899 75%, #8b5cf6 100%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  padding: 1px;
}
.card-holo:hover::after {
  opacity: 0.6;
  animation: holoSpin 4s linear infinite;
}
@keyframes holoSpin {
  to { --holo-angle: 360deg; }
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Buttons ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-sm { padding: 6px 14px; font-size: 0.78rem; }
.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
.btn-block { width: 100%; }

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

/* ─── Inputs ─────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition-fast);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }

/* ─── File Upload Zone ───────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent-1);
  background: var(--accent-glow);
}
.upload-zone .upload-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}
.upload-zone .upload-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.upload-zone .upload-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ─── File List ──────────────────────────── */
.file-list {
  display: grid;
  gap: 8px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}
.file-item:hover { background: var(--bg-card-hover); }
.file-icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
}
.file-info { flex: 1; min-width: 0; }
.file-name {
  font-size: 0.82rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.file-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.file-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-1);
  cursor: pointer;
}

/* ─── Status Badges ──────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-queued { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-processing { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.badge-completed { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-failed { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.badge-expired { background: rgba(85, 85, 112, 0.2); color: var(--text-muted); }

/* ─── Progress Bar ───────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 100px;
  transition: width 0.5s ease;
}

/* ─── Stats Grid ─────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(10px);
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Job Card ───────────────────────────── */
.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.job-card:hover { border-color: var(--border-active); }
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.job-title { font-size: 0.9rem; font-weight: 600; }
.job-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.job-outputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.output-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

/* ─── Auth Pages ─────────────────────────── */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}
.auth-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 28px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo .logo-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.auth-switch a {
  color: var(--accent-1);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ─── Toast Notifications ────────────────── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease;
  max-width: 400px;
}
.toast-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}
.toast-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
}
.toast-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--info);
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── Loading Spinner ────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── Empty State ────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.4;
}
.empty-state .empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ─── Tabs ───────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  width: fit-content;
}
.tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  background: var(--accent-gradient);
  color: white;
}

/* ─── Grid Layout ────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ─── Hidden Pages ───────────────────────── */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.range-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.range-control {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}
.range-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.range-input {
  width: 100%;
  accent-color: var(--accent-1);
}
.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: -4px;
  margin-bottom: 14px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.modal-card {
  width: min(100%, 920px);
  max-height: 85vh;
  overflow: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 1rem;
  font-weight: 700;
}
.modal-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-body {
  padding: 20px;
}
.preview-player {
  width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-lg);
  background: #000;
}

/* Auth hidden */
.app-layout { display: none; }
.app-layout.visible { display: flex; }
.auth-container.hidden { display: none; }

/* ─── Scrollbar ──────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Audio Player ───────────────────────── */
audio {
  width: 100%;
  height: 36px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    width: 64px;
    padding: 16px 8px;
  }
  .sidebar-logo h1, .sidebar-logo small, .nav-item span, .sidebar-user .user-info { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .main-content { margin-left: 64px; padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .range-grid { grid-template-columns: 1fr; }
}

/* ─── Mobile Sidebar Toggle ────────────────── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
}

/* ─── Settings Page ─────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
}

.settings-copy {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.settings-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.settings-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.settings-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.settings-table-wrap {
  overflow-x: auto;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
}

.settings-table th,
.settings-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.settings-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.settings-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 20px !important;
}

/* ─── TTS Status Panel ─────────────────────── */
.tts-job-panel {
  margin-top: 16px;
}

.tts-job-list {
  max-height: 200px;
  overflow-y: auto;
}

.voice-status-panel {
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.voice-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.voice-status-badge {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
}

.voice-status-idle { background: rgba(59, 130, 246, 0.2); color: var(--info); }
.voice-status-busy { background: rgba(245, 158, 11, 0.2); color: var(--warning); }

.voice-status-current {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.voice-status-log {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: monospace;
  max-height: 60px;
  overflow-y: auto;
}
