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

/* ═══════════════════════════════════════════════════════════════
   UdemyManager — Premium Dark Theme (v2 — Streamlined)
   ═══════════════════════════════════════════════════════════════ */
/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg-primary: #050510;
  --bg-secondary: #0a0a1a;
  --bg-card: rgba(22, 22, 50, 0.7);
  --bg-card-hover: rgba(30, 30, 65, 0.8);
  --bg-input: rgba(15, 15, 40, 0.8);
  --border: rgba(100, 100, 200, 0.12);
  --border-focus: rgba(124, 77, 255, 0.5);
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #5a5a78;
  --accent: #7c4dff;
  --accent-hover: #9e73ff;
  --accent-glow: rgba(124, 77, 255, 0.3);
  --success: #00e676;
  --warning: #ffab40;
  --error: #ff5252;
  --info: #40c4ff;
  --gradient-1: linear-gradient(135deg, #7c4dff, #448aff);
  --gradient-2: linear-gradient(135deg, #00e676, #00b0ff);
  --gradient-3: linear-gradient(135deg, #ff6d00, #ffab40);
  --gradient-4: linear-gradient(135deg, #ff5252, #ff4081);
  --gradient-5: linear-gradient(135deg, #40c4ff, #448aff);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(124, 77, 255, 0.15);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Glassmorphism Backgrounds */
  --glass-bg: rgba(10, 10, 26, 0.45);
  --glass-bg-hover: rgba(25, 25, 55, 0.55);
  --glass-bg-active: rgba(35, 35, 75, 0.65);

  /* Neon Border Colors */
  --border-neon: rgba(124, 77, 255, 0.15);
  --border-neon-glow: rgba(124, 77, 255, 0.45);

  /* Accent Shadows */
  --shadow-neon: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-neon-glow: 0 0 24px rgba(124, 77, 255, 0.25);

  /* Spring Back Curve Transition */
  --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ─── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
/* ─── App Layout ────────────────────────────────────────────── */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.app-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* ─── Title Bar ─────────────────────────────────────────────── */
.title-bar {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 8, 24, 0.98);
  border-bottom: 1px solid var(--border);
  -webkit-app-region: drag;
  user-select: none;
  padding: 0 4px 0 12px;
}
.title-bar-drag {
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-bar-logo {
  font-size: 14px;
}
.title-bar-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}
.title-bar-center {
  -webkit-app-region: no-drag;
  display: flex;
  align-items: center;
}
/* Engine button in title bar */
.engine-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.engine-btn:hover {
  border-color: var(--accent);
  background: rgba(124, 77, 255, 0.08);
}
.engine-btn.running {
  border-color: rgba(0, 230, 118, 0.4);
  color: var(--success);
  background: rgba(0, 230, 118, 0.06);
}
.engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}
.engine-btn.running .engine-dot {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse 2s infinite;
}
.engine-label {
  white-space: nowrap;
}
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}
.title-bar-controls {
  display: flex;
  -webkit-app-region: no-drag;
}
.tb-btn {
  width: 42px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.tb-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.tb-settings.active {
  color: var(--accent);
  background: rgba(124, 77, 255, 0.1);
}
.tb-close:hover {
  background: var(--error);
  color: white;
}
/* ─── Version Label ──────────────────────────────────────────── */
.title-bar-version {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.7;
}
/* ─── Update Button ──────────────────────────────────────────── */
.update-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.update-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}
.update-available {
  border-color: rgba(0, 230, 118, 0.5);
  color: var(--success);
  background: rgba(0, 230, 118, 0.08);
  animation: gentle-pulse 2s infinite;
}
.update-available:hover {
  background: rgba(0, 230, 118, 0.15);
}
.update-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}
.update-downloading {
  border-color: rgba(64, 196, 255, 0.4);
  color: var(--info);
  cursor: default;
}
.update-progress-ring {
  display: flex;
  align-items: center;
}
.update-ready {
  border-color: rgba(124, 77, 255, 0.5);
  color: var(--accent);
  background: rgba(124, 77, 255, 0.1);
  animation: gentle-pulse 1.5s infinite;
}
.update-ready:hover {
  background: rgba(124, 77, 255, 0.2);
}
.update-error {
  border-color: rgba(255, 82, 82, 0.3);
  color: var(--error);
}
.update-uptodate {
  border-color: rgba(0, 230, 118, 0.2);
  color: var(--text-muted);
  cursor: default;
  font-size: 10px;
}
.update-checking {
  cursor: default;
}
.update-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes gentle-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}
/* ═══════════════════════════════════════════════════════════════
   MAIN PAGE
   ═══════════════════════════════════════════════════════════════ */
.main-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
  overflow: hidden;
}
/* ─── Add Bar ───────────────────────────────────────────────── */
.add-bar {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.add-input {
  flex: 1;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  resize: none;
  transition: var(--transition);
  line-height: 1.4;
}
.add-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.add-input::placeholder {
  color: var(--text-muted);
}
.add-input:disabled {
  opacity: 0.5;
}
.add-btn {
  padding: 8px 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Validation result message bar */
.validation-msg {
  padding: 8px 20px;
  background: rgba(124, 77, 255, 0.08);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  animation: slideIn 0.2s ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* ─── Filter Bar ────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 4px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 15, 35, 0.5);
}
.filter-btn {
  padding: 5px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
}
.filter-btn:hover {
  background: rgba(124, 77, 255, 0.06);
  color: var(--text-primary);
}
.filter-btn.active {
  background: rgba(124, 77, 255, 0.12);
  border-color: rgba(124, 77, 255, 0.3);
  color: var(--accent);
}
.filter-count {
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-weight: 600;
}
.filter-btn.active .filter-count {
  background: rgba(124, 77, 255, 0.2);
  color: var(--accent);
}
.filter-btn-sm {
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 10px;
}
/* ─── Course List ───────────────────────────────────────────── */
.course-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}
.course-list::-webkit-scrollbar {
  width: 5px;
}
.course-list::-webkit-scrollbar-track {
  background: transparent;
}
.course-list::-webkit-scrollbar-thumb {
  background: rgba(124, 77, 255, 0.2);
  border-radius: 3px;
}
.course-list-header {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
/* Inline bulk actions (same row as Select All) */
.bulk-actions-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  animation: fadeIn 0.15s ease-out;
}
.bulk-actions-inline .bulk-count {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 8px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 10px;
  font-weight: 500;
}
.bulk-actions-inline .btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
  font-size: 12px;
  padding: 4px 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.25);
}
.bulk-actions-inline .btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}
.bulk-actions-inline .btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.bulk-actions-inline .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
}
.checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.checkbox-wrap .checkmark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
}
.checkbox-wrap .checkmark::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: -1px;
}
.checkbox-wrap:hover .checkmark {
  border-color: rgba(124, 77, 255, 0.5);
  background: rgba(124, 77, 255, 0.08);
}
.checkbox-wrap input[type="checkbox"]:checked+.checkmark {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(124, 77, 255, 0.35);
}
.checkbox-wrap input[type="checkbox"]:checked+.checkmark::after {
  border-color: white;
  transform: rotate(45deg) scale(1);
}
/* Indeterminate state for select-all */
.checkbox-wrap input[type="checkbox"]:indeterminate+.checkmark {
  background: rgba(124, 77, 255, 0.5);
  border-color: var(--primary);
}
.checkbox-wrap input[type="checkbox"]:indeterminate+.checkmark::after {
  width: 8px;
  height: 0;
  border: none;
  border-bottom: 2px solid white;
  transform: rotate(0deg) scale(1);
  margin-top: 0;
}
.course-checkbox {
  margin-right: 0;
}
/* Bulk actions bar */
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius-sm);
  margin: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  animation: slideIn 0.15s ease-out;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.bulk-actions .btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  font-weight: 500;
}
.bulk-actions .btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}
/* Bulk actions bar for Courses page */
.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  margin: 8px 0;
  background: rgba(124, 77, 255, 0.08);
  border: 1px solid rgba(124, 77, 255, 0.2);
  border-radius: var(--radius-sm);
  animation: slideIn 0.15s ease-out;
}
.bulk-actions-bar .bulk-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.bulk-actions-bar .bulk-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
}
.btn-danger:hover {
  background: #b91c1c;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}
/* Selected table row */
.data-table tr.row-selected {
  background: rgba(124, 77, 255, 0.08);
}
.data-table tr.row-selected:hover {
  background: rgba(124, 77, 255, 0.12);
}
.course-row-wrapper {
  margin-bottom: 8px; /* Increased separation */
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius); /* Rounded cards */
  transition: var(--transition-spring);
}
.course-row-wrapper:hover {
  background: var(--glass-bg-hover);
  border-color: var(--border-neon-glow);
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), var(--shadow-neon-glow);
}
.course-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px; /* Enhanced Padding */
  overflow: hidden;
}
.course-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.course-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.expand-icon {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 12px;
}
.course-url {
  font-size: 11px;
  color: var(--info);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.75;
}
.course-status {
  flex-shrink: 0;
}
.course-progress {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-right: 20px;
}
.course-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: var(--transition);
}
.course-row-wrapper:hover .course-actions {
  opacity: 1;
}
/* Always show stop button for active courses */
.course-row-wrapper.status-downloading .course-actions,
.course-row-wrapper.status-checking .course-actions,
.course-row-wrapper.status-enrolling .course-actions,
.course-row-wrapper.status-uploading .course-actions {
  opacity: 1;
}
/* ─── Active Download Effects ───────────────────────────────── */
/* Glowing animated left border for active rows */
.course-row-wrapper.status-downloading {
  border-left: 3px solid var(--info);
  background: linear-gradient(90deg, rgba(64, 196, 255, 0.06) 0%, transparent 40%);
  box-shadow: inset 3px 0 12px rgba(64, 196, 255, 0.08);
  animation: download-row-pulse 3s ease-in-out infinite;
}
.course-row-wrapper.status-checking {
  border-left: 3px solid #f0b429;
  background: linear-gradient(90deg, rgba(240, 180, 41, 0.06) 0%, transparent 40%);
  box-shadow: inset 3px 0 12px rgba(240, 180, 41, 0.08);
  animation: checking-row-pulse 2s ease-in-out infinite;
}
.course-row-wrapper.status-enrolling {
  border-left: 3px solid #2dd4bf;
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.06) 0%, transparent 40%);
  box-shadow: inset 3px 0 12px rgba(45, 212, 191, 0.08);
  animation: enrolling-row-pulse 2s ease-in-out infinite;
}
.course-row-wrapper.status-uploading {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(124, 77, 255, 0.06) 0%, transparent 40%);
  box-shadow: inset 3px 0 12px rgba(124, 77, 255, 0.08);
  animation: upload-row-pulse 3s ease-in-out infinite;
}
.course-row-wrapper.status-translating {
  border-left: 3px solid #22c55e;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.06) 0%, transparent 40%);
  box-shadow: inset 3px 0 12px rgba(34, 197, 94, 0.08);
  animation: translating-row-pulse 2.5s ease-in-out infinite;
}
/* Always show actions for translating status */
.course-row-wrapper.status-translating .course-actions {
  opacity: 1;
}
@keyframes download-row-pulse {

  0%,
  100% {
    border-left-color: var(--info);
    box-shadow: inset 3px 0 12px rgba(64, 196, 255, 0.08);
  }

  50% {
    border-left-color: #00e5ff;
    box-shadow: inset 3px 0 20px rgba(64, 196, 255, 0.15);
  }
}
@keyframes upload-row-pulse {

  0%,
  100% {
    border-left-color: var(--accent);
    box-shadow: inset 3px 0 12px rgba(124, 77, 255, 0.08);
  }

  50% {
    border-left-color: #b388ff;
    box-shadow: inset 3px 0 20px rgba(124, 77, 255, 0.15);
  }
}
@keyframes checking-row-pulse {

  0%,
  100% {
    border-left-color: #f0b429;
    box-shadow: inset 3px 0 12px rgba(240, 180, 41, 0.08);
  }

  50% {
    border-left-color: #fbbf24;
    box-shadow: inset 3px 0 20px rgba(240, 180, 41, 0.18);
  }
}
@keyframes enrolling-row-pulse {

  0%,
  100% {
    border-left-color: #2dd4bf;
    box-shadow: inset 3px 0 12px rgba(45, 212, 191, 0.08);
  }

  50% {
    border-left-color: #5eead4;
    box-shadow: inset 3px 0 20px rgba(45, 212, 191, 0.18);
  }
}
@keyframes translating-row-pulse {

  0%,
  100% {
    border-left-color: #22c55e;
    box-shadow: inset 3px 0 12px rgba(34, 197, 94, 0.08);
  }

  50% {
    border-left-color: #4ade80;
    box-shadow: inset 3px 0 20px rgba(34, 197, 94, 0.18);
  }
}
/* Pulsing neon badge for checking */
.badge-checking {
  background: rgba(240, 180, 41, 0.12);
  color: #f0b429;
  animation: badge-neon-amber 2s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(240, 180, 41, 0.4);
}
/* Pulsing neon badge for enrolling */
.badge-enrolling {
  background: rgba(45, 212, 191, 0.12);
  color: #2dd4bf;
  animation: badge-neon-teal 2s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(45, 212, 191, 0.4);
}
/* Pulsing neon badge for downloading */
.badge-downloading {
  background: rgba(64, 196, 255, 0.12);
  color: var(--info);
  animation: badge-neon 2s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(64, 196, 255, 0.4);
}
.badge-uploading {
  background: rgba(124, 77, 255, 0.12);
  color: var(--accent);
  animation: badge-neon-purple 2s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(124, 77, 255, 0.4);
}
.badge-translating {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  animation: badge-neon-green 2s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}
@keyframes badge-neon {

  0%,
  100% {
    box-shadow: 0 0 4px rgba(64, 196, 255, 0.2);
  }

  50% {
    box-shadow: 0 0 12px rgba(64, 196, 255, 0.4), 0 0 4px rgba(64, 196, 255, 0.2);
  }
}
@keyframes badge-neon-purple {

  0%,
  100% {
    box-shadow: 0 0 4px rgba(124, 77, 255, 0.2);
  }

  50% {
    box-shadow: 0 0 12px rgba(124, 77, 255, 0.4), 0 0 4px rgba(124, 77, 255, 0.2);
  }
}
@keyframes badge-neon-amber {

  0%,
  100% {
    box-shadow: 0 0 4px rgba(240, 180, 41, 0.2);
  }

  50% {
    box-shadow: 0 0 12px rgba(240, 180, 41, 0.4), 0 0 4px rgba(240, 180, 41, 0.2);
  }
}
@keyframes badge-neon-teal {

  0%,
  100% {
    box-shadow: 0 0 4px rgba(45, 212, 191, 0.2);
  }

  50% {
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.4), 0 0 4px rgba(45, 212, 191, 0.2);
  }
}
@keyframes badge-neon-green {

  0%,
  100% {
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.2);
  }

  50% {
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4), 0 0 4px rgba(34, 197, 94, 0.2);
  }
}
/* Translating progress: green gradient */
.status-translating .progress-fill {
  background: linear-gradient(90deg, #22c55e, #4ade80, #86efac, #4ade80, #22c55e);
  background-size: 300% 100%;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4), 0 0 3px rgba(74, 222, 128, 0.3);
}
/* ─── Per-Course Log Panel (Tabbed: Download / Upload) ──── */
.course-log-wrapper {
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}
.course-log-tabs {
  display: flex;
  gap: 0;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border);
}
.course-log-tab {
  flex: 1;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.course-log-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}
.course-log-tab.active {
  color: var(--text-primary);
  background: rgba(124, 77, 255, 0.1);
  border-bottom: 2px solid var(--accent);
}
.log-tab-count {
  font-size: 10px;
  padding: 0 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  min-width: 18px;
  text-align: center;
}
.course-log-tab.active .log-tab-count {
  background: rgba(124, 77, 255, 0.2);
  color: var(--accent);
}
.course-log-panel {
  max-height: 200px;
  overflow-y: auto;
  padding: 6px 14px 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 11px;
  line-height: 1.5;
}
.course-log-panel::-webkit-scrollbar {
  width: 12px;
}
.course-log-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}
.course-log-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.course-log-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.course-log-panel::-webkit-scrollbar-thumb:active {
  background: rgba(124, 77, 255, 0.4);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.course-log-line {
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}
.course-log-empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
  text-align: center;
}
.error-hint {
  font-size: 11px;
  color: var(--error);
  opacity: 0.8;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 14px;
}
/* ─── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-pending {
  background: rgba(255, 171, 64, 0.1);
  color: var(--warning);
}
.badge-downloading {
  background: rgba(64, 196, 255, 0.1);
  color: var(--info);
}
.badge-uploading {
  background: rgba(124, 77, 255, 0.1);
  color: var(--accent);
}
.badge-done {
  background: rgba(0, 230, 118, 0.1);
  color: var(--success);
}
.badge-error {
  background: rgba(255, 82, 82, 0.1);
  color: var(--error);
}
/* Pending elapsed timer */
.pending-timer {
  font-size: 11px;
  font-family: 'Inter', monospace;
  color: var(--warning);
  opacity: 0.8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* ─── Progress Bar ──────────────────────────────────────────── */
.progress-bar {
  width: 100px;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #40c4ff, #448aff, #7c4dff, #448aff, #40c4ff);
  background-size: 300% 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  animation: progress-flow 2.5s linear infinite;
  position: relative;
  box-shadow: 0 0 8px rgba(64, 196, 255, 0.4), 0 0 3px rgba(68, 138, 255, 0.3);
}
/* Shimmer sweep overlay */
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer-sweep 2s ease-in-out infinite;
}
@keyframes progress-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 300% 50%;
  }
}
@keyframes shimmer-sweep {
  0% {
    left: -50%;
  }

  100% {
    left: 150%;
  }
}
/* Indeterminate progress (0%) — scanning animation */
.progress-fill[style*="width: 0%"],
.progress-fill[style*="width:0%"] {
  width: 30% !important;
  animation: progress-flow 2.5s linear infinite, progress-scan 1.5s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes progress-scan {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(230%);
  }

  100% {
    transform: translateX(-100%);
  }
}
/* Upload progress: purple gradient */
.status-uploading .progress-fill {
  background: linear-gradient(90deg, #7c4dff, #b388ff, #e040fb, #b388ff, #7c4dff);
  background-size: 300% 100%;
  box-shadow: 0 0 8px rgba(124, 77, 255, 0.4), 0 0 3px rgba(179, 136, 255, 0.3);
}
.progress-text {
  position: absolute;
  right: -34px;
  top: -3px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-shadow: 0 0 4px rgba(64, 196, 255, 0.3);
}
/* ─── Log Panel (collapsible) ───────────────────────────────── */
.log-panel {
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 28, 0.95);
  flex-shrink: 0;
  transition: var(--transition);
}
.log-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  user-select: none;
  min-height: 36px;
}
.log-panel-header:hover {
  background: rgba(255, 255, 255, 0.02);
}
.log-panel-toggle {
  font-size: 10px;
  color: var(--text-muted);
  width: 14px;
}
.log-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.log-panel-preview {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Consolas', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-left: 8px;
}
.log-panel-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.log-panel-body {
  height: 200px;
  overflow-y: auto;
  padding: 4px 12px 8px;
  font-family: 'Consolas', 'Fira Code', monospace;
  font-size: 11px;
  line-height: 1.5;
}
.log-panel-body::-webkit-scrollbar {
  width: 12px;
}
.log-panel-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}
.log-panel-body::-webkit-scrollbar-thumb {
  background: rgba(124, 77, 255, 0.25);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.log-panel-body::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 77, 255, 0.4);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.log-panel-body::-webkit-scrollbar-thumb:active {
  background: rgba(124, 77, 255, 0.55);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.log-line {
  display: flex;
  gap: 8px;
  padding: 1px 0;
}
.log-time {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 10px;
}
.log-lvl {
  width: 40px;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
}
.log-msg {
  color: var(--text-secondary);
  word-break: break-all;
}
.log-info .log-lvl {
  color: var(--info);
}
.log-warn .log-lvl {
  color: var(--warning);
}
.log-error .log-lvl {
  color: var(--error);
}
.log-error .log-msg {
  color: var(--error);
}
.log-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  font-size: 12px;
  font-family: inherit;
}
/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-secondary {
  background: rgba(124, 77, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(124, 77, 255, 0.2);
}
.btn-secondary:hover {
  background: rgba(124, 77, 255, 0.2);
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}
.btn-icon {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: var(--transition);
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
}
.btn-danger:hover {
  background: rgba(255, 82, 82, 0.15);
}
/* ═══════════════════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════ */
.settings-page {
  overflow-y: auto;
  height: calc(100vh - 40px);
}
/* 2-column layout: sidebar + content */
.settings-layout {
  display: flex;
  gap: 0;
  position: relative;
}
.settings-sidebar {
  width: 180px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: calc(100vh - 140px);
  padding: 8px 0;
  border-right: 1px solid var(--border);
  margin-right: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.settings-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  text-align: left;
  white-space: nowrap;
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.settings-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.settings-sidebar-link.active {
  background: rgba(124, 77, 255, 0.08);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}
.settings-sidebar-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
/* Sidebar Status Panel (bottom) */
.settings-sidebar-status {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.sidebar-status-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.sidebar-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 11px;
}
.sidebar-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar-status-dot.ok {
  background: var(--success);
  box-shadow: 0 0 4px rgba(0, 230, 118, 0.4);
}
.sidebar-status-dot.missing {
  background: rgba(255, 255, 255, 0.15);
}
.sidebar-status-label {
  color: var(--text-muted);
  width: 52px;
  flex-shrink: 0;
  font-weight: 500;
}
.sidebar-status-value {
  color: var(--text-secondary);
  font-family: 'Consolas', monospace;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.settings-content {
  flex: 1;
  min-width: 0;
}
.page {
  padding: 24px 28px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* ─── Settings Cards ────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(12px);
}
.card h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.settings-section {
  margin-bottom: 16px;
}
.settings-subsection-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-left: 2px solid var(--accent);
  padding-left: 8px;
  margin: 16px 0 10px;
}
/* ─── Auto-Login Mode Picker ─────────────────────────────── */
.auto-login-mode-picker {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}
.mode-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.mode-option:hover {
  border-color: rgba(124, 77, 255, 0.4);
  background: rgba(124, 77, 255, 0.05);
}
.mode-option.active {
  border-color: var(--accent);
  background: rgba(124, 77, 255, 0.08);
}
.mode-radio {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1;
  flex-shrink: 0;
}
.mode-option.active .mode-radio {
  color: var(--accent);
}
.mode-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mode-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.mode-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.form-group {
  margin-bottom: 12px;
  flex: 1;
}
.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-row {
  display: flex;
  gap: 14px;
}
.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
}
.input-with-action {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.input-with-action .textarea {
  flex: 1;
}
.input-with-action .btn {
  flex-shrink: 0;
  margin-top: 4px;
}
/* ─── Inputs ────────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: var(--transition);
}
.input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input::placeholder {
  color: var(--text-muted);
}
.textarea {
  resize: vertical;
  min-height: 54px;
  font-family: 'Consolas', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.5;
}
select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238888aa' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
/* ─── Toast Notifications ─────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: toast-slide-in 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    toast-fade-out 0.5s 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: auto;
  min-width: 240px;
  max-width: 400px;
  border-left: 3px solid transparent;
}
.toast-success {
  background: rgba(0, 230, 118, 0.15);
  border-left-color: var(--success);
  color: var(--success);
}
.toast-error {
  background: rgba(255, 82, 82, 0.15);
  border-left-color: var(--error);
  color: var(--error);
}
.toast-info {
  background: rgba(64, 196, 255, 0.15);
  border-left-color: var(--info);
  color: var(--info);
}
@keyframes toast-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes toast-fade-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(60px);
    opacity: 0;
  }
}
/* ─── Cookie Input (bigger) ───────────────────────────────── */
.cookie-input {
  min-height: 100px !important;
  font-size: 11px !important;
  line-height: 1.6;
  letter-spacing: 0.2px;
  word-break: break-all;
}
.cookie-input:focus {
  min-height: 140px;
}
/* ─── Unsaved Changes Badge ───────────────────────────────── */
.page-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.unsaved-badge {
  color: var(--warning);
  font-size: 12px;
  font-weight: 500;
  animation: pulse-badge 1.5s infinite;
}
@keyframes pulse-badge {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}
/* ─── Save Button Glow ────────────────────────────────────── */
.btn-glow {
  box-shadow: 0 0 16px var(--accent-glow), 0 0 4px var(--accent-glow);
  animation: glow-pulse 2s infinite;
}
@keyframes glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 16px var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 24px var(--accent-glow), 0 0 8px var(--accent);
  }
}
/* ─── Colored Hints ───────────────────────────────────────── */
.hint-success {
  color: var(--success) !important;
}
.hint-error {
  color: var(--error) !important;
}
/* ─── Dashboard Stat Card Effects ─────────────────────────── */
.stat-card.stat-downloading .stat-value {
  color: var(--info);
  text-shadow: 0 0 8px rgba(64, 196, 255, 0.5);
  animation: stat-glow-cyan 2s ease-in-out infinite;
}
.stat-card.stat-done .stat-value {
  color: var(--success);
  text-shadow: 0 0 6px rgba(0, 230, 118, 0.35);
}
.stat-card.stat-error .stat-value {
  color: var(--error);
  text-shadow: 0 0 6px rgba(255, 82, 82, 0.35);
}
@keyframes stat-glow-cyan {

  0%,
  100% {
    text-shadow: 0 0 8px rgba(64, 196, 255, 0.3);
  }

  50% {
    text-shadow: 0 0 16px rgba(64, 196, 255, 0.6), 0 0 4px rgba(64, 196, 255, 0.4);
  }
}
/* Done course row — subtle success accent */
.course-row-wrapper.status-done {
  border-left: 2px solid rgba(0, 230, 118, 0.3);
}
.course-row-wrapper.status-done:hover {
  border-left-color: var(--success);
}
/* Error course row — subtle danger accent */
.course-row-wrapper.status-error {
  border-left: 2px solid rgba(255, 82, 82, 0.3);
}
.course-row-wrapper.status-error:hover {
  border-left-color: var(--error);
}
/* Engine info card glow when running */
.engine-info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.engine-stat-value {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* ─── Section header row (h2 + action buttons side by side) ── */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-header-row h2 {
  margin: 0;
}
/* ─── Settings subsection label ─────────────────────────────── */
.settings-subsection-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin: 16px 0 10px;
}
/* ─── Auto-Login Mode Picker ─────────────────────────────────── */
.auto-login-mode-picker {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}
.mode-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.mode-option:hover {
  border-color: rgba(124, 77, 255, 0.4);
  background: rgba(124, 77, 255, 0.05);
}
.mode-option.active {
  border-color: var(--accent);
  background: rgba(124, 77, 255, 0.08);
}
.mode-radio {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1;
  flex-shrink: 0;
}
.mode-option.active .mode-radio {
  color: var(--accent);
}
.mode-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mode-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.mode-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.form-group {
  margin-bottom: 12px;
  flex: 1;
}
/* ─── Toggle Switch ─────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}
.toggle-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
.toggle-row:last-child {
  border-bottom: none;
}
.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.toggle-label-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.toggle-label-hint {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.8;
}
.toggle-switch {
  position: relative;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-switch input:checked+.toggle-slider {
  background: rgba(124, 77, 255, 0.3);
  border-color: var(--accent);
}
.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(18px);
  background: var(--accent);
  box-shadow: 0 0 6px rgba(124, 77, 255, 0.5);
}
/* ─── Sticky Save Bar ──────────────────────────────────────── */
.settings-save-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 28px;
  background: rgba(10, 10, 28, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 100;
  animation: slideUp 0.2s ease-out;
}
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.settings-save-bar .unsaved-badge {
  font-size: 13px;
}
.settings-save-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* ─── Settings section collapsible ──────────────────────────── */
.section-collapse-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
  margin-left: 8px;
}
.section-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.section-body {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}
.section-body:not(.collapsed) {
  overflow: visible;
}
.section-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
  padding: 0;
}
/* --- Modal ------------------------------------------------ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease-out;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
/* ─── Account Cards ─────────────────────────────────────────── */
.account-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: var(--transition);
  user-select: none;
}
.account-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 77, 255, 0.25);
}
.account-card.primary {
  border-left: 3px solid var(--accent);
}
.account-card.dragging {
  opacity: 0.4;
  transform: scale(0.98);
}
.account-card.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(124, 77, 255, 0.25);
}
.account-card-drag {
  font-size: 18px;
  color: var(--text-muted);
  cursor: grab;
  line-height: 1;
}
.account-card-drag:active {
  cursor: grabbing;
}
.account-card-info {
  flex: 1;
  min-width: 0;
}
.account-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}
.account-card-priority {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 20px;
}
.account-card-icon {
  font-size: 15px;
}
.account-card-label {
  font-weight: 600;
  color: var(--text-primary);
}
.account-card-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--gradient-1);
  color: white;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.account-card-domain {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.account-card-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.account-card-actions .btn-ghost {
  background: transparent;
  border: none;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
}
.account-card-actions .btn-ghost:hover {
  opacity: 1;
  background: rgba(255,255,255,0.06);
}
.account-card-actions .btn-ghost.btn-danger:hover {
  background: rgba(255,82,82,0.15);
}
.account-edit-modal {
  max-width: 560px;
  width: 90vw;
}
/* ─── Statistics Button (Title Bar) ──────────────────────────── */
.tb-stats.active {
  color: var(--info);
  background: rgba(64, 196, 255, 0.1);
}
/* ═══════════════════════════════════════════════════════════════
   STATISTICS PAGE
   ═══════════════════════════════════════════════════════════════ */
.stats-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 20px 24px 32px;
  gap: 20px;
}
.stats-page::-webkit-scrollbar {
  width: 5px;
}
.stats-page::-webkit-scrollbar-track {
  background: transparent;
}
.stats-page::-webkit-scrollbar-thumb {
  background: rgba(124, 77, 255, 0.2);
  border-radius: 3px;
}
/* ─── Header ──────────────────────────────────────────────────── */
.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stats-title {
  font-size: 22px;
  font-weight: 700;
  background: var(--gradient-5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* ─── Loading ─────────────────────────────────────────────────── */
.stats-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 50vh;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}
.stats-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
/* ─── Overview Cards ──────────────────────────────────────────── */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  animation: statsFadeIn 0.4s ease-out both;
}
.stats-card:nth-child(1) { animation-delay: 0s; }
.stats-card:nth-child(2) { animation-delay: 0.06s; }
.stats-card:nth-child(3) { animation-delay: 0.12s; }
.stats-card:nth-child(4) { animation-delay: 0.18s; }
.stats-card:hover {
  border-color: rgba(124, 77, 255, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.stats-card-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.stats-card-body {
  flex: 1;
  min-width: 0;
}
.stats-card-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}
.stats-card-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}
.stats-card-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
}
.stats-card-bar-fill {
  height: 100%;
  border-radius: 0 3px 0 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.stats-bar-success { background: var(--success); }
.stats-bar-error { background: var(--error); }
.stats-card-total { border-left: 3px solid var(--accent); }
.stats-card-success { border-left: 3px solid var(--success); }
.stats-card-error { border-left: 3px solid var(--error); }
.stats-card-perf { border-left: 3px solid var(--info); }
@keyframes statsFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ─── Section Base ────────────────────────────────────────────── */
.stats-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  animation: statsFadeIn 0.4s ease-out 0.2s both;
}
.stats-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.stats-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.stats-section-header .stats-section-title {
  margin-bottom: 0;
}
.stats-subsection-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  margin-top: 16px;
}
/* ─── Middle Row Layout ───────────────────────────────────────── */
.stats-middle-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 14px;
}
/* ─── Donut Chart ─────────────────────────────────────────────── */
.stats-donut-container {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stats-donut {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.stats-donut:hover {
  transform: scale(1.05);
}
.stats-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}
.stats-donut-total {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.stats-donut-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stats-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.stats-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
}
.stats-legend-label {
  color: var(--text-secondary);
  min-width: 60px;
}
.stats-legend-value {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 30px;
  text-align: right;
}
.stats-legend-pct {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}
/* ─── Tab Group ───────────────────────────────────────────────── */
.stats-tab-group {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 2px;
}
.stats-tab {
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.stats-tab:hover {
  color: var(--text-primary);
}
.stats-tab.active {
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent);
}
/* ─── Error Breakdown ─────────────────────────────────────────── */
.stats-error-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.stats-error-list::-webkit-scrollbar {
  width: 3px;
}
.stats-error-list::-webkit-scrollbar-thumb {
  background: rgba(255, 82, 82, 0.2);
  border-radius: 3px;
}
.stats-error-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  position: relative;
}
.stats-error-bar-bg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
  z-index: 0;
}
.stats-error-bar-fill {
  height: 100%;
  background: rgba(255, 82, 82, 0.08);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.stats-error-msg {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
  padding-left: 8px;
}
.stats-error-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--error);
  min-width: 24px;
  text-align: right;
  position: relative;
  z-index: 1;
  padding-right: 8px;
}
/* Recent errors */
.stats-recent-error-row {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 82, 82, 0.04);
  border-left: 2px solid var(--error);
  margin-bottom: 4px;
}
.stats-recent-error-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-recent-error-msg {
  font-size: 11px;
  color: var(--error);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-recent-error-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.stats-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
/* ─── Bottom Row Layout ──────────────────────────────────────── */
.stats-bottom-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}
/* ─── Timeline Chart ─────────────────────────────────────────── */
.stats-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stats-timeline-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  padding: 0 4px;
}
.stats-timeline-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  cursor: default;
  min-width: 0;
}
.stats-timeline-bar-stack {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
  align-items: stretch;
  justify-content: flex-start;
}
.stats-timeline-bar {
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.stats-timeline-bar.stats-bar-done {
  background: var(--success);
  opacity: 0.8;
}
.stats-timeline-bar.stats-bar-error {
  background: var(--error);
  opacity: 0.8;
}
.stats-timeline-bar.stats-bar-other {
  background: var(--warning);
  opacity: 0.5;
}
.stats-timeline-label {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  transform: rotate(180deg);
  max-height: 40px;
  overflow: hidden;
}
.stats-timeline-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
}
.stats-timeline-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
/* ─── Insights Section ────────────────────────────────────────── */
.stats-perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stats-perf-item {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.stats-perf-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(124, 77, 255, 0.2);
}
.stats-perf-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.stats-perf-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}
/* ─── Retry List ──────────────────────────────────────────────── */
.stats-retry-list {
  max-height: 200px;
  overflow-y: auto;
}
.stats-retry-list::-webkit-scrollbar {
  width: 3px;
}
.stats-retry-list::-webkit-scrollbar-thumb {
  background: rgba(124, 77, 255, 0.15);
  border-radius: 3px;
}
.stats-retry-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.stats-retry-row:last-child {
  border-bottom: none;
}
.stats-retry-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-retry-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}
.stats-retry-badge.badge-done {
  background: rgba(0, 230, 118, 0.1);
  color: var(--success);
}
.stats-retry-badge.badge-error {
  background: rgba(255, 82, 82, 0.1);
  color: var(--error);
}
.stats-retry-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--warning);
  min-width: 24px;
  text-align: right;
}
/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-middle-row,
  .stats-bottom-row {
    grid-template-columns: 1fr;
  }

  .stats-donut-container {
    flex-direction: column;
    align-items: center;
  }
}
/* ─── Premium UI/UX Refactoring Enhancements ──────────────── */
/* Glassmorphism Panel Implementation */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-neon);
  transition: var(--transition-spring);
}
.glass-panel:hover {
  background: var(--glass-bg-hover);
  border-color: var(--border-neon-glow);
  box-shadow: var(--shadow-neon), var(--shadow-neon-glow);
  transform: translateY(-2px);
}
/* Spring-back Physics Toggles & Hover Scales */
.btn, .btn-icon, .filter-btn, .settings-tab-btn {
  transition: var(--transition-spring) !important;
}
.btn:hover, .btn-icon:hover {
  transform: scale(1.08);
}
.btn:active, .btn-icon:active {
  transform: scale(0.95);
}
/* Page Slide/Fade-in Transitions */
.page-view-wrapper.animate-page-transition {
  animation: pageSlideIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
/* Horizontal Tabs Header Styling */
.settings-tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.settings-tab-btn {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-spring);
  display: flex;
  align-items: center;
  gap: 6px;
}
.settings-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.settings-tab-btn.active {
  color: var(--accent);
  background: rgba(124, 77, 255, 0.1);
  border-color: rgba(124, 77, 255, 0.2);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(124, 77, 255, 0.1);
}
.settings-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8px 16px 0;
}
.settings-tab-content::-webkit-scrollbar {
  width: 5px;
}
.settings-tab-content::-webkit-scrollbar-thumb {
  background: rgba(124, 77, 255, 0.2);
  border-radius: 3px;
}
/* Unsaved Changes Save Footer */
.settings-save-footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(124, 77, 255, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--shadow-glow);
  z-index: 1000;
  animation: slideUpFooter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes slideUpFooter {
  from {
    transform: translate(-50%, 30px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
.save-warning-text {
  color: var(--warning);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.save-buttons {
  display: flex;
  gap: 12px;
}
/* Statistics Timeline Bars (Grouped Layout) */
.stats-timeline-bars.grouped {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  padding: 10px;
}
.stats-timeline-col-grouped {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.stats-timeline-bar-group {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  width: 100%;
  justify-content: center;
}
.stats-timeline-bar-group .stats-timeline-bar {
  width: 6px;
  border-radius: 4px 4px 0 0;
  transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stats-bar-added {
  background: var(--info);
  opacity: 0.85;
}
.stats-bar-done {
  background: var(--success);
  opacity: 0.95;
}
.stats-bar-error {
  background: var(--error);
  opacity: 0.95;
}
/* 2x2 Performance Grid */
.stats-perf-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.perf-card {
  background: rgba(22, 22, 50, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: var(--transition-spring);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.perf-card:hover {
  background: rgba(30, 30, 65, 0.6);
  border-color: var(--border-neon-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2), var(--shadow-neon-glow);
}
.perf-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.perf-icon {
  font-size: 16px;
}
.perf-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.perf-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.speed-fast .perf-icon { color: var(--info); }
.speed-avg .perf-icon { color: var(--success); }
.speed-slow .perf-icon { color: var(--error); }
.speed-retry .perf-icon { color: var(--warning); }
/* SVG Donut Chart */
.stats-donut-container {
  display: flex;
  align-items: center;
  gap: 20px;
}
.donut-svg {
  flex-shrink: 0;
  overflow: visible;
}
.donut-segment {
  transition: stroke-width 0.3s var(--transition-spring), filter 0.3s;
}
.donut-segment:hover {
  stroke-width: 5.5;
  filter: drop-shadow(0 0 4px var(--accent-glow));
}
.donut-text {
  transition: opacity 0.2s;
}
.donut-number {
  font-size: 8px;
  font-weight: 800;
  fill: var(--text-primary);
}
.donut-label {
  font-size: 2px;
  font-weight: 600;
  fill: var(--text-secondary);
  letter-spacing: 0.2px;
}
.stats-legend-item.interactive {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition-spring);
}
.stats-legend-item.interactive:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}
/* ─── Modern CSS Tooltips ─────────────────────────────────── */
.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  color: var(--text-muted);
  cursor: help;
  font-size: 13px;
  vertical-align: middle;
}
.tooltip-icon {
  opacity: 0.6;
  transition: opacity 0.2s ease;
  font-size: 13px;
}
.tooltip-container:hover .tooltip-icon {
  opacity: 1;
  color: var(--primary);
}
.tooltip-content {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #1e1e24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 1000;
  text-align: left;
  white-space: normal;
  font-weight: normal;
}
.tooltip-container:hover .tooltip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1e1e24 transparent transparent transparent;
}


