/* ═══════════════════════════════════════════════════════════
   TikTok Scraper Dashboard — Dark Premium Theme
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1c2a4a;
  --bg-input: #0d1b33;
  --border: #2a2a4a;
  --border-light: #3a3a5a;

  --text-primary: #e8e8f0;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent: #ff2d55;
  --accent-hover: #ff4d70;
  --accent-glow: rgba(255, 45, 85, 0.3);

  --blue: #3b82f6;
  --green: #10b981;
  --red: #ef4444;
  --purple: #8b5cf6;
  --yellow: #f59e0b;
  --cyan: #06b6d4;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);

  --sidebar-width: 240px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  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);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Sidebar ───────────────────────────────────────────────── */

.sidebar {
  width: 68px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.2s ease;
  overflow: hidden;
}

.sidebar:hover { width: 180px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 20px;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #ff6b8a);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.brand-text {
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(135deg, var(--accent), #ff6b8a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar:hover .brand-text { opacity: 1; }

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-label {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar:hover .nav-label { opacity: 1; }

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(255, 45, 85, 0.1);
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

/* ─── Main Content ──────────────────────────────────────────── */

.main-content {
  flex: 1;
  margin-left: 68px;
  padding: 24px 32px;
  max-width: 1400px;
  transition: margin-left 0.2s ease;
}

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

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

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.view-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ─── Stats Cards ───────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.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: var(--transition);
}

.stat-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.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: 24px;
  height: 24px;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Form Card ─────────────────────────────────────────────── */

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.mt-8 { margin-top: 8px; }

/* ─── Buttons ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #e6194b);
  color: white;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #ff3366);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* ─── Jobs List ─────────────────────────────────────────────── */

.jobs-list, .history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card, .history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.job-card:hover, .history-card:hover {
  background: var(--bg-card-hover);
}

.job-type-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.badge-brand { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-hashtag { background: rgba(139, 92, 246, 0.15); color: var(--purple); }
.badge-profile { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }

.job-info { flex: 1; }
.job-name { font-weight: 600; font-size: 15px; }
.job-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.job-actions {
  display: flex;
  gap: 4px;
}

/* ─── Activity / History ────────────────────────────────────── */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-dot.success { background: var(--green); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.activity-dot.error { background: var(--red); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.activity-dot.running { background: var(--yellow); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); animation: pulse 1.5s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.activity-text { flex: 1; font-size: 13px; }
.activity-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ─── Files Grid ────────────────────────────────────────────── */

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.file-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.file-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.file-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
}

.file-icon.json { background: rgba(245, 158, 11, 0.15); color: var(--yellow); }
.file-icon.xlsx { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.file-icon.pdf { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ─── Status Message ────────────────────────────────────────── */

.status-msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  animation: fadeIn 0.3s ease;
}

.status-msg.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--green);
}

.status-msg.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
}

.status-msg.loading {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue);
}

.hidden { display: none !important; }

/* ─── Modal ─────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.btn-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ─── Empty State ───────────────────────────────────────────── */

.empty-state {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ─── Section Header ────────────────────────────────────────── */

.section-header {
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar {
    width: 64px;
    padding: 16px 8px;
  }
  .sidebar-brand span,
  .nav-link span { display: none; }
  .nav-link { justify-content: center; padding: 12px; }
  .main-content { margin-left: 64px; padding: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── TikTok One ────────────────────────────────────────────── */

.tto-auth-card {
  background: linear-gradient(135deg, var(--bg-card), #1a2540);
  border-color: var(--cyan);
  margin-bottom: 20px;
}

.tto-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.tto-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tto-status.connected { color: var(--green); }
.tto-status.expired { color: var(--yellow); }
.tto-status.error { color: var(--red); }

.tto-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.tto-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.tto-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tto-tab.active {
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.15), rgba(254, 44, 85, 0.15));
  color: var(--text-primary);
}

.tto-tab-content {
  display: none;
}

.tto-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ─── Creator Cards ─────────────────────────────────────────── */

.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.creator-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.creator-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

.creator-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.creator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-name {
  font-weight: 700;
  font-size: 15px;
}

.creator-username {
  font-size: 12px;
  color: var(--text-muted);
}

.creator-type-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-mega-kol { background: rgba(245, 158, 11, 0.2); color: var(--yellow); }
.badge-kol { background: rgba(139, 92, 246, 0.2); color: var(--purple); }
.badge-koc { background: rgba(6, 182, 212, 0.2); color: var(--cyan); }
.badge-micro-koc { background: rgba(16, 185, 129, 0.2); color: var(--green); }
.badge-nano { background: rgba(107, 114, 128, 0.2); color: var(--text-muted); }

.creator-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.creator-stat {
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.creator-stat-value {
  font-size: 16px;
  font-weight: 700;
}

.creator-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}


/* ─── Apify: Topbar ─────────────────────────────────────────── */

.apify-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 8px;
}

.apify-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.apify-icon-circle {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.apify-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.apify-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

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

.btn-apify-primary {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.btn-apify-primary:hover { filter: brightness(1.15); }

.btn-apify-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-apify-secondary:hover { border-color: var(--accent); color: var(--accent); }

.apify-count-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 600;
}

/* ─── Apify: Screen Tabs ────────────────────────────────────── */

.apify-screen-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.apify-screen-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.apify-screen-tab:hover { color: var(--text-primary); }
.apify-screen-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Apify: Form ────────────────────────────────────────────── */

.apify-panel { animation: fadeIn 0.2s ease; }

.apify-form-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
}

.apify-form-col { display: flex; flex-direction: column; gap: 20px; }
.apify-form-col-sm { gap: 20px; }

.apify-field { display: flex; flex-direction: column; gap: 8px; }

.apify-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.apify-optional { font-weight: 400; text-transform: none; color: var(--text-muted); }

.apify-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  width: 100%;
}

.apify-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.15);
}

.apify-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.apify-type-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.apify-chip {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.apify-chip input[type="radio"] { display: none; }

.apify-chip:hover { border-color: var(--text-muted); color: var(--text-primary); }

.apify-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 45, 85, 0.08);
}

/* ─── Apify: Results Header ──────────────────────────────────── */

.apify-results-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.btn-apify-back {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.btn-apify-back:hover { border-color: var(--accent); color: var(--accent); }

.apify-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.apify-bc-link {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}

.apify-bc-link:hover { text-decoration: underline; }

.apify-bc-current {
  color: var(--text-primary);
  font-weight: 600;
}

.apify-breadcrumb svg { color: var(--text-muted); }

/* ─── Apify: Status Strip ────────────────────────────────────── */

.apify-run-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.apify-status-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(255, 204, 0, 0.15);
  color: #fc0;
}

.apify-status-pill.succeeded { background: rgba(52, 199, 89, 0.15); color: var(--green); }
.apify-status-pill.failed { background: rgba(255, 59, 48, 0.15); color: var(--red); }

.apify-strip-meta { font-size: 13px; color: var(--text-muted); }
.apify-strip-count { font-size: 13px; font-weight: 600; color: var(--accent); }

/* ─── Apify: Stat Cards ──────────────────────────────────────── */

.apify-stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.apify-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.apify-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.apify-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Apify: Output Tabs ─────────────────────────────────────── */

.apify-output-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.apify-out-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.apify-out-tab:hover { color: var(--text-primary); }
.apify-out-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Apify: Data Table ──────────────────────────────────────── */

.apify-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.apify-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.apify-data-table thead {
  background: var(--bg-card);
  position: sticky;
  top: 0;
}

.apify-data-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.apify-data-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.apify-data-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.apify-data-table .author-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.apify-data-table .author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.apify-data-table .author-name { font-weight: 600; color: var(--text-primary); }
.apify-data-table .author-handle { font-size: 11px; color: var(--text-muted); }
.apify-data-table .text-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apify-data-table .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.apify-data-table .link-cell a { color: var(--accent); font-size: 12px; }
.apify-data-table .link-cell a:hover { text-decoration: underline; }

/* ─── Apify: Export Menu ─────────────────────────────────────── */

.apify-export-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 100;
  min-width: 160px;
  overflow: hidden;
}

.apify-export-menu button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.apify-export-menu button:hover { background: var(--bg-card-hover); color: var(--accent); }

/* ─── Apify: Runs List ───────────────────────────────────────── */

.apify-runs-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.apify-runs-list th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.apify-runs-list td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.apify-runs-list tr:hover { background: rgba(255,255,255,0.02); cursor: pointer; }

/* ─── Campaign Cards ────────────────────────────────────────── */

.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.campaign-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: var(--transition);
}

.campaign-card:hover {
  background: var(--bg-card-hover);
}

.campaign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.campaign-name {
  font-weight: 700;
  font-size: 15px;
}

.campaign-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.campaign-status.active { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.campaign-status.draft { background: rgba(107, 114, 128, 0.15); color: var(--text-muted); }
.campaign-status.completed { background: rgba(59, 130, 246, 0.15); color: var(--blue); }

.campaign-meta {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Scrollbar ─────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }
