/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg-primary:    #0d0f14;
  --bg-secondary:  #13161d;
  --bg-card:       #191c25;
  --bg-hover:      #1f2330;
  --bg-input:      #1a1d27;

  --border:        rgba(255,255,255,0.07);
  --border-focus:  rgba(99,102,241,0.6);

  --accent:        #6366f1;
  --accent-hover:  #5254cc;
  --accent-glow:   rgba(99,102,241,0.25);
  --accent-2:      #ec4899;

  --text-primary:  #f0f2f8;
  --text-secondary:#8b92a9;
  --text-muted:    #4b5268;

  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;

  --sidebar-w:     240px;
  --topbar-h:      60px;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;

  --shadow:        0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg:     0 8px 48px rgba(0,0,0,0.5);

  --transition:    0.18s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

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

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.logo-icon svg { width: 20px; height: 20px; }
.logo-icon.large { width: 56px; height: 56px; border-radius: 16px; }
.logo-icon.large svg { width: 32px; height: 32px; }

.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.2);
}
.nav-item.active svg { stroke: var(--accent); }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.nav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.user-info { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 0.85rem; }

/* ─── Main Content ───────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.page-title {
  font-size: 1.05rem;
  font-weight: 600;
  flex: 1;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.ws-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.page-container {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
}

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

/* ─── Dots / Status Indicators ───────────────────────────────────────────── */
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--text-muted);
}
.dot.live      { background: var(--success); animation: pulse-dot 2s infinite; }
.dot.running   { background: var(--info); animation: pulse-dot 1.2s infinite; }
.dot.done      { background: var(--success); }
.dot.failed    { background: var(--danger); }
.dot.queued    { background: var(--warning); }
.dot.pending   { background: var(--text-muted); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* ─── Stats Grid ─────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: rgba(99,102,241,0.3); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.accounts { background: rgba(99,102,241,0.15); color: var(--accent); }
.stat-icon.success  { background: rgba(34,197,94,0.15);  color: var(--success); }
.stat-icon.pending  { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-icon.failed   { background: rgba(239,68,68,0.15);  color: var(--danger); }

.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; display: block; }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 4px; display: block; }

/* ─── Dashboard Grid ──────────────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card:last-child { margin-bottom: 0; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h2, .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.card-header h2 { margin-bottom: 0; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--accent); padding: 6px 10px; }
.btn-ghost:hover { background: var(--accent-glow); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-icon svg { width: 16px; height: 16px; }
.sidebar-toggle { display: none; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.88rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); }
.char-count { font-size: 0.75rem; color: var(--text-muted); text-align: right; margin-top: 4px; }
.hint { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 5px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; }
.input-with-icon { position: relative; }
.input-with-icon .form-input { padding-right: 44px; }
.toggle-password { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }

/* ─── Radio Group ────────────────────────────────────────────────────────── */
.radio-group, .schedule-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
}
.radio-option input[type="radio"] { display: none; }
.radio-custom {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.radio-option input:checked + .radio-custom {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.radio-option input:checked + .radio-custom::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: white;
}

/* ─── Drop Zone ──────────────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.drop-zone.small { padding: 24px; }
.drop-zone-content { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drop-zone-content svg { width: 40px; height: 40px; color: var(--text-muted); }
.drop-zone-content p { color: var(--text-secondary); font-size: 0.9rem; }
.drop-zone-content span { color: var(--text-muted); font-size: 0.8rem; }
.drop-zone-content small { color: var(--text-muted); font-size: 0.75rem; }
.drop-zone-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.drop-zone-preview svg { width: 36px; height: 36px; color: var(--accent); flex-shrink: 0; }
.file-info { flex: 1; text-align: left; }
.file-info span { display: block; }
#file-name { font-size: 0.88rem; font-weight: 500; }
#file-size { font-size: 0.78rem; color: var(--text-secondary); margin-top: 3px; }

/* ─── Upload Layout ──────────────────────────────────────────────────────── */
.upload-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}
.schedule-datetime { margin-top: 10px; }

/* ─── Accounts Grid ──────────────────────────────────────────────────────── */
.page-actions { margin-bottom: 20px; }
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
}
.account-card:hover { border-color: rgba(99,102,241,0.35); transform: translateY(-2px); box-shadow: var(--shadow); }

.account-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.account-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.account-name { font-weight: 600; font-size: 0.95rem; }
.account-username { font-size: 0.78rem; color: var(--text-secondary); }

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-active  { background: rgba(34,197,94,0.15);  color: var(--success); }
.status-pending { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-expired { background: rgba(239,68,68,0.15);  color: var(--danger); }
.status-error   { background: rgba(239,68,68,0.15);  color: var(--danger); }
.status-no_cookies { background: rgba(107,114,128,0.15); color: var(--text-muted); }

.account-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.account-actions .btn { flex: 1; justify-content: center; font-size: 0.78rem; }

/* ─── Jobs Table ──────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-btn.active, .filter-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.jobs-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}
.jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.jobs-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.jobs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.jobs-table tr:last-child td { border-bottom: none; }
.jobs-table tr:hover td { background: var(--bg-hover); }
.text-center { text-align: center; color: var(--text-muted); }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-pending   { background: rgba(107,114,128,0.2); color: var(--text-secondary); }
.badge-queued    { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-running   { background: rgba(59,130,246,0.15); color: var(--info); }
.badge-done      { background: rgba(34,197,94,0.15);  color: var(--success); }
.badge-failed    { background: rgba(239,68,68,0.15);  color: var(--danger); }
.badge-cancelled { background: rgba(107,114,128,0.15); color: var(--text-muted); }

/* ─── Logs ───────────────────────────────────────────────────────────────── */
.logs-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; justify-content: space-between; }
.logs-filter { display: flex; gap: 6px; flex-wrap: wrap; }

.log-console {
  background: #0a0c12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.log-stream {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0a0c12;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
}
.log-entry {
  padding: 2px 0;
  line-height: 1.5;
}
.log-entry.info    { color: #94a3b8; }
.log-entry.warning { color: var(--warning); }
.log-entry.error   { color: var(--danger); }
.log-entry.success { color: var(--success); }

/* ─── Settings ───────────────────────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: start;
}
.settings-grid .card { margin-bottom: 0; }
.info-grid { display: flex; flex-direction: column; gap: 12px; }
.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.info-row span:first-child { color: var(--text-secondary); }
.info-row span:last-child { font-weight: 500; }

/* ─── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { opacity:0; transform: translateY(20px); }
  to   { opacity:1; transform: translateY(0); }
}

.modal-logo {
  text-align: center;
  margin-bottom: 28px;
}
.modal-logo .logo-icon { margin: 0 auto 14px; }
.modal-logo h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.modal-logo p { color: var(--text-secondary); font-size: 0.88rem; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h2 { font-size: 1rem; font-weight: 600; }

.modal-info {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 16px 0;
  line-height: 1.6;
}
.modal-info strong { color: var(--text-primary); }
.modal-info code {
  background: var(--bg-primary);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent);
}

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.login-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.83rem;
  margin-bottom: 14px;
}
.login-error.hidden { display: none; }

/* ─── Empty States ───────────────────────────────────────────────────────── */
.empty-state { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 16px; }
.empty-state-full {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ─── Mini Account List ──────────────────────────────────────────────────── */
.accounts-mini { display: flex; flex-direction: column; gap: 8px; }
.account-mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.account-mini-row:hover { background: var(--bg-hover); }
.account-mini-name { flex: 1; font-size: 0.85rem; }

/* ─── Jobs Mini List ─────────────────────────────────────────────────────── */
.jobs-list { display: flex; flex-direction: column; gap: 8px; }
.job-mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.job-mini-video { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-mini-account { color: var(--text-secondary); font-size: 0.75rem; }

/* ─── Live dot wrapper ───────────────────────────────────────────────────── */
.live-dot-wrapper { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--success); }

/* ─── Upload Progress ────────────────────────────────────────────────────── */
.upload-progress-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-bar-bg { height: 6px; background: var(--bg-hover); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width 0.5s ease; }

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  animation: slideUp 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
}
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
.toast.info    { border-color: rgba(99,102,241,0.4); }

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

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .upload-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .page-container { padding: 16px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
