/* ═══════════════════════════════════════════════════════════════════════════
   GarcArzP HUB – IG Analytics Tracker Modern Glassmorphism Design System
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Surface & Base Colors */
  --bg-color: #0b0f19;
  --panel-bg: rgba(18, 24, 38, 0.75);
  --panel-border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(17, 24, 39, 0.70);
  --card-hover-bg: rgba(24, 33, 53, 0.85);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-border-hover: rgba(255, 255, 255, 0.18);
  --card-border-glow: rgba(99, 102, 241, 0.35);

  /* Typography Colors (High Contrast) */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Accent Colors */
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-sky: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-pink: #ec4899;

  /* Gradients */
  --ig-grad: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --ig-grad-subtle: linear-gradient(135deg, rgba(220, 39, 67, 0.15), rgba(188, 24, 136, 0.15));
  --indigo-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --cyan-grad: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --emerald-grad: linear-gradient(135deg, #10b981 0%, #059669 100%);

  /* Radii & Shadows */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-main: 0 12px 35px -8px rgba(0, 0, 0, 0.65);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow-ig: 0 0 25px rgba(220, 39, 67, 0.28);
  --shadow-glow-indigo: 0 0 25px rgba(99, 102, 241, 0.25);
  --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.22);
}

/* ─── Global Reset & Body ─────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 12% 10%, rgba(99, 102, 241, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 88% 15%, rgba(236, 72, 153, 0.08) 0%, transparent 38%),
    radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
}

/* ─── Top Navbar ─────────────────────────────────────────────────────────── */
.header {
  height: 70px;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35em;
  color: #fff;
}

.ig-gradient-icon {
  background: var(--ig-grad);
  box-shadow: 0 4px 18px rgba(220, 39, 67, 0.4);
}

.ig-gradient-text {
  background: var(--ig-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.3em;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.68em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-indigo);
}

.badge-status-pill {
  font-size: 0.8em;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.dot-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

.btn-logout {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
}

/* ─── Main Container ─────────────────────────────────────────────────────── */
.main-container {
  max-width: 1520px;
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: 24px 0 70px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ─── Top View Navigation Bar (Glass Segmented Tabs) ─────────────────────── */
.main-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.nav-tabs-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-tab-btn.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.22);
}

.nav-tab-btn i {
  font-size: 1.05em;
}

.nav-tab-btn.active i {
  color: #818cf8;
}

.tab-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.tab-badge-accent {
  background: rgba(236, 72, 153, 0.25);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.nav-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-sync-action {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-sync-action:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
  border-color: #818cf8;
  color: #fff;
  box-shadow: var(--shadow-glow-indigo);
  transform: translateY(-1px);
}

/* ─── Toolbar (Add Profile Form & Quick Filter) ───────────────────────────── */
.toolbar-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-card);
}

.add-account-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.input-with-icon {
  display: flex;
  align-items: center;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.input-with-icon:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.input-prefix {
  padding: 0 0 0 14px;
  color: #f472b6;
  font-weight: 700;
  font-size: 1.05em;
}

.input-with-icon input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 10px 16px 10px 6px;
  font-size: 0.92em;
  font-family: inherit;
  outline: none;
  min-width: 250px;
}

.input-with-icon input::placeholder {
  color: var(--text-dim);
}

.btn-add {
  background: var(--ig-grad);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(220, 39, 67, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(220, 39, 67, 0.5);
}

.btn-add:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.search-with-icon {
  display: flex;
  align-items: center;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0 14px;
  gap: 10px;
  transition: all 0.2s ease;
}

.search-with-icon:focus-within {
  border-color: var(--accent-sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.search-with-icon i {
  color: var(--text-dim);
  font-size: 0.9em;
}

.search-with-icon input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 9px 0;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  min-width: 200px;
}

.search-with-icon input::placeholder {
  color: var(--text-dim);
}

/* ─── Stat Summary KPI Row ───────────────────────────────────────────────── */
.stats-summary-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.stat-badge-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-badge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.stat-badge-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover-bg);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-main);
}

.stat-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35em;
  flex-shrink: 0;
}

.icon-violet {
  background: rgba(99, 102, 241, 0.14);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.icon-ig {
  background: rgba(220, 39, 67, 0.14);
  color: #fb7185;
  border: 1px solid rgba(220, 39, 67, 0.3);
}

.icon-cyan {
  background: rgba(6, 182, 212, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.icon-amber {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.icon-pink {
  background: rgba(236, 72, 153, 0.14);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.stat-badge-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.stat-badge-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
}

.stat-badge-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-badge-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.stat-badge-sublink {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  transition: color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-badge-sublink:hover {
  color: #fff;
}

.stat-badge-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.likes-sub {
  color: #f43f5e;
  font-weight: 600;
}

.date-sub {
  color: var(--text-muted);
}

.meta-ext-icon {
  font-size: 0.7em;
  opacity: 0.7;
}

/* ─── Table Card (View 1) ────────────────────────────────────────────────── */
.table-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.card-inner-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.card-inner-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-inner-title i {
  font-size: 1.4rem;
}

.card-inner-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.card-inner-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.table-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.legend-dot.green { background: #10b981; box-shadow: 0 0 6px #10b981; }
.legend-dot.cyan { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }

.table-wrapper {
  overflow-x: auto;
}

.ig-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.ig-table th {
  background: rgba(11, 15, 25, 0.75);
  padding: 12px 14px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.ig-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  font-size: 0.88rem;
}

.ig-table tr.account-row-item {
  transition: background 0.15s ease;
}

.ig-table tr.account-row-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* Table Cells */
.account-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  cursor: pointer;
}

.avatar-hover-edit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.avatar-wrapper:hover .avatar-hover-edit {
  opacity: 1;
}

.btn-avatar-preset:hover {
  background: #2a2d42 !important;
  border-color: #6366f1 !important;
  transform: translateY(-1px);
}

.account-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.avatar-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f172a;
}

.account-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-username {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.96rem;
  transition: color 0.15s ease;
}

.account-username:hover {
  color: #f472b6;
}

.account-fullname {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.account-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.badge-reels {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.badge-reels:hover {
  background: rgba(236, 72, 153, 0.3);
  color: #fff;
}

.badge-usa {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
}

.followers-cell, .views-cell, .engagement-cell {
  display: flex;
  align-items: baseline;
  gap: 8px;
  transition: all 0.15s ease;
  border-radius: var(--radius-xs);
  padding: 4px 6px;
  margin: -4px -6px;
}

.followers-cell:hover, .views-cell:hover, .engagement-cell:hover {
  background: rgba(99, 102, 241, 0.14);
}

.followers-main, .mono-stat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.delta-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.delta-pos {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.delta-neg {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.delta-neutral {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.top-reel-pill {
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.top-reel-pill:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #fbbf24;
  color: #fff;
}

.reel-sep {
  opacity: 0.5;
}

.engagement-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f59e0b;
}

.latest-post-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.latest-post-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  transition: all 0.15s ease;
}

.latest-post-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.perf-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.perf-badge-mini {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.perf-viral {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.perf-hot {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.perf-good {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.perf-fresh {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.perf-cooling, .perf-slow {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Action Buttons */
/* Action Buttons */
.row-actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.btn-action-pill {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-action-reels {
  background: rgba(236, 72, 153, 0.14);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #f472b6;
}

.btn-action-reels:hover {
  background: rgba(236, 72, 153, 0.28);
  color: #fff;
  border-color: #ec4899;
  transform: translateY(-1px);
}

.btn-action-counter {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 0.68rem;
}

.btn-action-charts {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.btn-action-charts:hover {
  background: rgba(56, 189, 248, 0.28);
  color: #fff;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.btn-action-delete {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 5px 8px;
  font-size: 0.76rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-1px);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  background: var(--ig-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Comparison Studio (View 2) ─────────────────────────────────────────── */
.compare-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.compare-chart-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.compare-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.compare-chart-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.compare-chart-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.compare-chart-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.compare-chart-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-pill-group {
  display: inline-flex;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  flex-wrap: wrap;
}

.chart-pill-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chart-pill-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.chart-pill-btn.active {
  background: var(--indigo-grad);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.compare-profiles-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(11, 15, 25, 0.4);
  border-radius: var(--radius-md);
}

.compare-profile-pill {
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.compare-profile-pill:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.compare-profile-pill.disabled {
  opacity: 0.45;
  background: transparent;
}

.compare-profile-pill.no-data {
  opacity: 0.55;
  border-style: dashed;
  color: var(--text-muted);
}

.compare-profile-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.compare-chart-wrapper {
  position: relative;
  height: 380px;
  width: 100%;
}

.chart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 240px;
  padding: 40px 20px;
  text-align: center;
  background: rgba(11, 15, 25, 0.45);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  gap: 12px;
}

.chart-empty-state i {
  font-size: 2.4rem;
  color: var(--text-dim);
}

.chart-empty-state p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.5;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.compare-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.compare-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.compare-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compare-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  flex-shrink: 0;
}

.compare-rank.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #000;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.compare-rank.rank-2 {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  color: #000;
}

.compare-rank.rank-3 {
  background: linear-gradient(135deg, #f97316, #c2410c);
  color: #fff;
}

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

.compare-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compare-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compare-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.compare-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.compare-bar-fill {
  height: 100%;
  background: var(--indigo-grad);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ─── Reels Showcase (View 3) ────────────────────────────────────────────── */
.showcase-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.showcase-header-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.showcase-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.showcase-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.showcase-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.showcase-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.btn-refresh {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.showcase-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px;
  background: rgba(11, 15, 25, 0.5);
  border-radius: var(--radius-md);
}

.summary-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-pill-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-pill-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.showcase-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-account-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.chip-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
  color: #fff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.showcase-controls-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.showcase-search-box {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0 14px;
  gap: 10px;
}

.showcase-search-box:focus-within {
  border-color: #ec4899;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.18);
}

.showcase-search-box input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 9px 0;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.showcase-sort-group, .reels-sort-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sort-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.sort-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.sort-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.sort-btn.active {
  background: rgba(236, 72, 153, 0.2);
  border-color: #ec4899;
  color: #fff;
}

/* Reels Grid & Card Styling */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.reel-card {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.reel-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-main);
}

.reel-thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b0f19;
  overflow: hidden;
  cursor: pointer;
}

.reel-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.reel-thumbnail-wrap:hover .reel-thumbnail {
  transform: scale(1.05);
}

.reel-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1b4b, #311042);
}

.reel-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.reel-thumbnail-wrap:hover .reel-play-overlay {
  opacity: 1;
}

.play-circle-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.7);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.reel-thumbnail-wrap:hover .play-circle-btn {
  transform: scale(1);
}

.reel-badge-top-left {
  position: absolute;
  top: 10px;
  left: 10px;
}

.badge-views {
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.reel-badge-top-right {
  position: absolute;
  top: 10px;
  right: 10px;
}

.reel-link-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.reel-link-btn:hover {
  background: var(--ig-grad);
  transform: scale(1.1);
}

.reel-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.reel-author-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reel-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.reel-author-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.reel-author-name:hover {
  color: #f472b6;
}

.reel-stats-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.reel-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stat-likes { color: #f43f5e; font-weight: 600; }
.stat-comments { color: #38bdf8; font-weight: 600; }
.stat-date { color: var(--text-muted); font-size: 0.74rem; margin-left: auto; }

.reel-caption {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
  max-height: 55px;
  overflow-y: auto;
  word-break: break-word;
}

.reel-ai-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-box-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-caption-text {
  font-size: 0.76rem;
  color: #f1f5f9;
  line-height: 1.4;
  font-style: italic;
  max-height: 60px;
  overflow-y: auto;
}

.ai-topics-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.ai-topics-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f472b6;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.topic-pill {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reel-music-info {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel-card-footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  gap: 8px;
}

.btn-open-reel {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-open-reel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-preview-video {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-preview-video:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* ─── Analytics & Trends (View 4) ────────────────────────────────────────── */
.analytics-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.analytics-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.analytics-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.analytics-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.analytics-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.analytics-stat-box {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analytics-box-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
}

.analytics-box-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
}

.analytics-box-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.analytics-launchpad-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.launchpad-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-launchpad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.launchpad-card {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

.launchpad-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(11, 15, 25, 0.85);
  transform: translateY(-2px);
}

.launchpad-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.launchpad-info {
  flex: 1;
  min-width: 0;
}

.launchpad-username {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.launchpad-metrics {
  display: flex;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.launchpad-actions {
  display: flex;
  gap: 6px;
}

/* ─── Modals (History, Reels, Video, Delete) ─────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  max-width: 620px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-modal-card {
  max-width: 1040px;
  max-height: 92vh;
}

.reels-modal-card {
  max-width: 1120px;
  max-height: 92vh;
}

.video-modal-card {
  max-width: 520px;
}

.delete-modal-card {
  max-width: 440px;
  padding: 28px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-modal-user, .reels-modal-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.history-modal-avatar, .reels-modal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-indigo);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.history-modal-fullname, .reels-modal-fullname {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25em;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 1.3em;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: #ef4444;
}

.history-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 10px;
}

.history-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 24px;
}

.history-kpi-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.history-kpi-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.history-kpi-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.history-chart-wrapper {
  position: relative;
  height: 340px;
  width: 100%;
  padding: 0 24px 16px;
}

.history-table-section {
  padding: 0 24px 16px;
}

.btn-toggle-table {
  width: 100%;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.btn-toggle-table:hover {
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
}

.history-table-container {
  max-height: 240px;
  overflow-y: auto;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.history-table th {
  background: #0f172a;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  text-align: left;
}

.history-table td {
  padding: 9px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-family: 'JetBrains Mono', monospace;
  color: #cbd5e1;
}

.modal-footer {
  padding: 14px 24px;
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-hint-text {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Reels Modal Header Actions */
.reels-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-enrich-all {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-enrich-all:hover {
  background: rgba(168, 85, 247, 0.3);
  color: #fff;
}

.btn-sync-fast {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-sync-fast:hover {
  background: rgba(245, 158, 11, 0.3);
  color: #fff;
}

.btn-sync-full {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-sync-full:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
}

.reels-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 14px 24px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reels-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 12px;
}

.reels-search-box {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0 12px;
  gap: 8px;
}

.reels-search-box input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 0;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.reels-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(92vh - 270px);
}

/* Video Player Modal */
.video-player-wrapper {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 65vh;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-player-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Delete Confirm Modal */
.delete-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.delete-modal-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.delete-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.delete-modal-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.delete-modal-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.delete-modal-actions button {
  flex: 1;
}

.btn-danger-confirm {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-danger-confirm:hover {
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ─── Toast Notifications ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 0.86rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: slideInToast 0.25s ease;
}

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

.toast.success { border-color: rgba(16, 185, 129, 0.4); }
.toast.success i { color: #10b981; }

.toast.error { border-color: rgba(239, 68, 68, 0.4); }
.toast.error i { color: #ef4444; }

.toast.warning { border-color: rgba(245, 158, 11, 0.4); }
.toast.warning i { color: #f59e0b; }

.toast.info { border-color: rgba(56, 189, 248, 0.4); }
.toast.info i { color: #38bdf8; }

/* ─── Login Screen Styles ────────────────────────────────────────────────── */
.center-card-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.center-card {
  max-width: 440px;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-main);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.center-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(220, 39, 67, 0.4);
}

.center-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.center-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.alert-error {
  width: 100%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-bottom: 16px;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-input {
  width: 100%;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.btn-primary-ig {
  background: var(--ig-grad);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(220, 39, 67, 0.4);
  transition: all 0.2s ease;
}

.btn-primary-ig:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(220, 39, 67, 0.55);
}

/* ─── Responsive Media Queries ───────────────────────────────────────────── */
@media (max-width: 1280px) {
  .stats-summary-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .compare-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .header {
    padding: 0 20px;
  }
  .main-container {
    width: calc(100% - 32px);
  }
  .stats-summary-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .showcase-summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    height: auto;
    padding: 14px 16px;
    flex-direction: column;
    gap: 12px;
  }
  .header-left, .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .main-container {
    width: calc(100% - 20px);
    padding: 16px 0 40px;
    gap: 16px;
  }
  .main-nav-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-tabs-container {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
  }
  .nav-quick-actions {
    justify-content: flex-end;
  }
  .toolbar-section {
    flex-direction: column;
    align-items: stretch;
  }
  .add-account-form {
    flex-direction: column;
    align-items: stretch;
  }
  .input-with-icon input {
    min-width: 0;
    width: 100%;
  }
  .btn-add {
    justify-content: center;
  }
  .stats-summary-row {
    grid-template-columns: 1fr;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .analytics-stats-strip {
    grid-template-columns: 1fr;
  }
  .reels-grid {
    grid-template-columns: 1fr;
  }
  .history-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .topics-hashtags-grid {
    grid-template-columns: 1fr;
  }
  .insights-modal-card {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ─── Keyboard Shortcut Badge ──────────────────────────────────────────────── */
.kbd-shortcut {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: inherit;
  padding: 1px 6px;
  margin-left: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  user-select: none;
}

/* ─── Action & Export Buttons ──────────────────────────────────────────────── */
.btn-action-insights {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}
.btn-action-insights:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: #818cf8;
  color: #fff;
  transform: translateY(-1px);
}

.btn-farm-insights {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn-farm-insights:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(236, 72, 153, 0.35));
  border-color: #ec4899;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
}

.btn-export-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.btn-export-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.btn-copy-reel-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-copy-reel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ─── Video Expired Alert Banner ───────────────────────────────────────────── */
.video-expired-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #fde68a;
  font-size: 0.82rem;
  margin-top: 10px;
}
.video-expired-banner .btn-open-reel {
  white-space: nowrap;
}

/* ─── Insights Modal Styles ────────────────────────────────────────────────── */
.insights-modal-card {
  max-width: 960px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

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

.insights-modal-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.insights-modal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.insights-modal-fullname {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.insights-modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.insights-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.insights-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.trend-badge-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: 20px;
  margin-left: auto;
}

/* Projections Grid */
.projections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.proj-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.proj-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}
.proj-card.highlight-proj {
  background: rgba(236, 72, 153, 0.06);
  border-color: rgba(236, 72, 153, 0.3);
}

.proj-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.proj-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 2px 0;
}

.proj-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Actionable Advice List */
.insights-advice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.advice-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.advice-card strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
  color: #fff;
}
.advice-card p {
  margin: 0;
  color: var(--text-secondary);
}

.advice-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}
.advice-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}
.advice-info {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}
.advice-highlight {
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #fbcfe8;
}

/* Best Time Cards */
.best-time-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.best-time-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.btc-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

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

.btc-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btc-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 1px 0;
}

.btc-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.best-time-recommendation {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #ec4899;
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Weekdays Bar Chart */
.weekdays-bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 18px 14px 12px 14px;
}

.weekday-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.weekday-bar-col .bar-val {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.weekday-bar-col .bar-track {
  width: 100%;
  max-width: 32px;
  height: 90px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.weekday-bar-col .bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.weekday-bar-col.top-day .bar-fill {
  background: linear-gradient(180deg, #ec4899, #f43f5e);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
}

.weekday-bar-col .bar-day {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.weekday-bar-col.top-day .bar-day {
  color: #ec4899;
}

.weekday-bar-col .bar-count {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Topics & Hashtags Grid */
.topics-hashtags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tax-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tax-box-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tax-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tax-table-wrapper {
  overflow-x: auto;
}

.tax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.tax-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
}

.tax-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.topic-rank {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-right: 6px;
  display: inline-block;
  min-width: 14px;
}

.topic-name-pill {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 600;
}

.hashtag-name-pill {
  color: #f472b6;
  font-weight: 600;
  font-size: 0.76rem;
}

.badge-count {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
}

.link-top-reel {
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.link-top-reel:hover {
  color: #38bdf8;
}

/* ─── Copy Metadata Button & Video Error Player Overlay ──────────────────────── */
.btn-copy-meta-btn {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}
.btn-copy-meta-btn:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
}

.video-player-error-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.video-expired-player-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

/* ─── Mobile Responsive Overrides for Insights & Showcase ────────────────────── */
@media (max-width: 768px) {
  .insights-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
  }
  .insights-modal-header {
    padding: 14px 16px;
  }
  .insights-modal-body {
    padding: 16px;
    gap: 20px;
  }
  .projections-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .proj-card {
    padding: 12px;
  }
  .proj-val {
    font-size: 1.3rem;
  }
  .best-time-summary-row {
    grid-template-columns: 1fr;
  }
  .topics-hashtags-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .weekdays-bar-chart {
    padding: 14px 8px 8px 8px;
    gap: 4px;
    overflow-x: auto;
  }
  .weekday-bar-col .bar-val {
    font-size: 0.64rem;
  }
  .weekday-bar-col .bar-track {
    max-width: 24px;
    height: 75px;
  }
}

@media (max-width: 480px) {
  .projections-grid {
    grid-template-columns: 1fr;
  }
  .weekday-bar-col .bar-day {
    font-size: 0.7rem;
  }
  .weekday-bar-col .bar-count {
    font-size: 0.6rem;
  }
  .weekdays-bar-chart {
    min-width: 280px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REEL DOWNLOADER STYLES (v2.3.0)
   ═══════════════════════════════════════════════════════════════════════════ */

.downloader-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.downloader-main-card,
.third-party-guide-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
}

/* Downloader Header */
.downloader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.downloader-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.downloader-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(220, 39, 67, 0.12);
  border: 1px solid rgba(220, 39, 67, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.downloader-title-group h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.downloader-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.downloader-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Cookie Status Badge */
.cookie-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.cookie-status-badge.has-cookies {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.28);
}

.cookie-status-badge.no-cookies {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.28);
}

.cookie-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.cookie-status-badge.has-cookies .cookie-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.cookie-status-badge.no-cookies .cookie-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

/* Cookie Drawer */
.downloader-cookie-drawer {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 18px;
  margin-bottom: 12px;
  animation: fadeInDown 0.25s ease-out;
}

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

.cookie-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.cookie-drawer-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cookie-drawer-title i {
  font-size: 1.3rem;
  margin-top: 2px;
}

.cookie-drawer-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-top: 4px;
}

.cookie-drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.cookie-drawer-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.cookie-drawer-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.cookie-info-item {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.cookie-info-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-right: 4px;
}

.cookie-drawer-info code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-cyan);
  font-size: 0.8rem;
}

.cookie-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie-input-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.cookie-textarea {
  width: 100%;
  background: rgba(8, 12, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  padding: 10px 14px;
  resize: vertical;
}

.cookie-textarea:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.cookie-actions-bar {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btn-save-cookies {
  background: var(--indigo-grad);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-save-cookies:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Downloader Input Box */
.downloader-input-box {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-box-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.input-box-label {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.input-box-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.input-box-hint code {
  color: var(--accent-sky);
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
}

.downloader-textarea {
  width: 100%;
  background: rgba(11, 16, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.downloader-textarea:focus {
  outline: none;
  border-color: rgba(220, 39, 67, 0.45);
  box-shadow: 0 0 0 3px rgba(220, 39, 67, 0.15);
}

.downloader-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.downloader-controls-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-tool-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9999px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-tool-pill:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Cookie Switch Toggle */
.cookie-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.cookie-switch-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.cookie-switch-slider {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  transition: background-color 0.25s;
}

.cookie-switch-slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.25s;
}

.cookie-switch-label input:checked + .cookie-switch-slider {
  background: var(--ig-grad);
}

.cookie-switch-label input:checked + .cookie-switch-slider::before {
  transform: translateX(14px);
}

.cookie-switch-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cookie-switch-label input:checked ~ .cookie-switch-text {
  color: var(--text-primary);
}

/* Process Button */
.btn-process-download {
  background: var(--ig-grad);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 10px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 18px rgba(220, 39, 67, 0.35);
}

.btn-process-download:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(220, 39, 67, 0.50);
}

.btn-process-download:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Progress Strip */
.downloader-progress-strip {
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 14px;
}

.progress-spinner-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--accent-sky);
  font-weight: 500;
}

.progress-spinner-row i {
  font-size: 1.15rem;
}

/* Results Wrap */
.downloader-results-wrap {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.results-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.results-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-title-group h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.results-summary-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.btn-zip-download {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-zip-download:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-zip-download:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Reels Cards Grid */
.downloader-reels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.downloader-reel-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  background: rgba(14, 20, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.downloader-reel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.downloader-reel-card.status-ready {
  border-left: 4px solid var(--accent-emerald);
}

.downloader-reel-card.status-failed {
  border-left: 4px solid var(--accent-rose);
  opacity: 0.9;
}

/* Thumbnail Box */
.reel-thumb-box {
  width: 120px;
  height: 80px;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-thumb-placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.6rem;
}

.reel-dur-pill {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Reel Content Box */
.reel-content-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.reel-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reel-author-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reel-author-name i {
  color: #e1306c;
}

.reel-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}

.reel-badge-status.badge-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.reel-badge-status.badge-err {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.reel-caption-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.reel-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reel-meta-pill {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.reel-meta-pill.pill-source {
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.2);
}

.reel-error-box {
  font-size: 0.78rem;
  color: #fb7185;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

/* Reel Actions Box */
.reel-actions-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-download {
  background: var(--ig-grad);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-action-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 39, 67, 0.4);
}

.btn-action-download:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-action-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  text-decoration: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-action-disabled {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 3rd Party Guide Card */
.third-party-guide-card {
  margin-top: 10px;
}

.guide-header {
  margin-bottom: 20px;
}

.guide-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guide-title-box h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.guide-subtitle {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.tools-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.tool-card-link {
  background: rgba(14, 20, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card-link:hover {
  transform: translateY(-3px);
  background: rgba(20, 28, 48, 0.85);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.tool-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.tool-icon-circle.icon-cobalt {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.tool-icon-circle.icon-fastdl {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.tool-icon-circle.icon-snapinsta {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
}

.tool-icon-circle.icon-saveig {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

.tool-badge-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.tool-badge-pill.badge-recommended {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tool-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tool-ext {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.tool-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* CLI Box */
.cli-box-wrap {
  background: rgba(9, 13, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

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

.cli-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-cli {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-copy-cli:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.cli-command-row {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  overflow-x: auto;
}

.cli-command-row code {
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  font-size: 0.86rem;
  white-space: nowrap;
}

.cli-subtext {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

.cli-subtext code {
  color: var(--accent-amber);
}

/* Responsive Downloader */
@media (max-width: 768px) {
  .downloader-reel-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .reel-thumb-box {
    width: 100%;
    height: 140px;
  }
  .reel-actions-box {
    justify-content: flex-start;
    width: 100%;
  }
  .downloader-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  .downloader-controls-left,
  .downloader-controls-right {
    width: 100%;
    justify-content: space-between;
  }
  .btn-process-download {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENHANCED POLISH: MODALS, QUICK ACTIONS & RESPONSIVENESS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Modal Trigger in Toolbar */
.btn-modal-trigger-add {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(236, 72, 153, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn-modal-trigger-add:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(236, 72, 153, 0.4));
  border-color: #818cf8;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

/* Add Profile Modal */
.add-profile-modal-card {
  max-width: 480px;
  width: 92%;
}
.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.example-profiles-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.example-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.example-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: #a5b4fc;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.example-chip:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
  color: #fff;
}

/* USA Audience Modal & Interactive Badges */
.audience-modal-card {
  max-width: 440px;
  width: 92%;
}
.badge-usa {
  cursor: pointer;
  transition: all 0.2s ease;
}
.badge-usa:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.badge-usa-empty {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px dashed rgba(255, 255, 255, 0.2) !important;
  color: var(--text-muted) !important;
}
.badge-usa-empty:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: #38bdf8 !important;
  color: #e2e8f0 !important;
}
.badge-edit-icon {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-left: 3px;
}
.audience-slider-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.audience-val-display {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: -0.02em;
}
#audienceSlider {
  width: 100%;
  accent-color: #38bdf8;
  height: 6px;
  cursor: pointer;
}
.audience-presets-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.preset-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  margin-bottom: 2px;
}
.preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-chip:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #fff;
}
.preset-chip.chip-clear {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}
.preset-chip.chip-clear:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
}
.btn-save-audience {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-save-audience:hover {
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

/* Quick Sync Row Button */
.btn-action-sync-row {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.btn-action-sync-row:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #fff;
  transform: translateY(-1px);
}

/* Compare View Bulk Actions */
.compare-profiles-filter-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.compare-filter-bulk-actions {
  display: flex;
  gap: 6px;
}
.btn-chip-bulk {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-chip-bulk:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* Card Download Buttons */
.btn-download-reel-btn {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}
.btn-download-reel-btn:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* Downloader Play Hint on Thumb */
.reel-thumb-play-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}
.reel-thumb-box:hover .reel-thumb-play-hint {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Video Modal Meta Styling */
.video-modal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.video-modal-caption {
  font-size: 0.84rem;
  color: #cbd5e1;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Table Column Sorting & Toolbar Left */
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.sortable-th:hover {
  color: #fff;
}
.sortable-th .sort-icon {
  margin-left: 6px;
  font-size: 0.8em;
  opacity: 0.4;
  transition: all 0.2s ease;
}
.sortable-th:hover .sort-icon {
  opacity: 0.8;
}
.sortable-th .sort-icon.active {
  opacity: 1;
  color: #ec4899;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-nav-pill {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}
.btn-nav-pill:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: #818cf8;
  color: #fff;
}

.video-player-wrapper {
  max-width: 380px;
  max-height: 70vh;
  margin: 0 auto;
}

/* Mobile Polish (<768px & <480px) */
@media (max-width: 768px) {
  .toolbar-left, .toolbar-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .add-account-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .input-with-icon {
    width: 100%;
  }
  .input-with-icon input {
    min-width: 0;
    width: 100%;
  }
  .btn-add {
    width: 100%;
    justify-content: center;
  }
  .insights-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .btn-modal-trigger-add {
    width: 100%;
    justify-content: center;
  }
  .compare-profiles-filter-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .row-actions-group {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .btn-action-pill {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .header-left, .header-right {
    gap: 8px;
  }
  .brand-text .brand-name {
    font-size: 1.05rem;
  }
  .nav-tab-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  .stat-badge-value {
    font-size: 1.4rem;
  }
  .row-actions-group {
    flex-wrap: wrap;
    max-width: 160px;
  }
}

/* ═══════════════════════════════════════════════════════════════════ */
/* Facebook & Multi-Platform UI Extensions                            */
/* ═══════════════════════════════════════════════════════════════════ */

/* Platform filter tabs in table header */
.platform-filter-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.btn-plat-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-plat-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-plat-tab.active {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

/* Platform Badges in Account Cells */
.account-name-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-platform {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-platform-ig {
  background: rgba(225, 48, 108, 0.15);
  border: 1px solid rgba(225, 48, 108, 0.4);
  color: #f43f5e;
}

.badge-platform-fb {
  background: rgba(24, 119, 242, 0.18);
  border: 1px solid rgba(24, 119, 242, 0.45);
  color: #60a5fa;
}

/* Virality & Talking About Badges */
.badge-talking {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.badge-talking:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fff;
}

.talking-about-cell-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 5px 12px;
  border-radius: 8px;
}

/* Add Platform Selector in Add Modal */
.add-platform-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.btn-plat-choice {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-plat-choice:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-plat-choice.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#btnChoiceFB.active {
  background: rgba(24, 119, 242, 0.2);
  border-color: rgba(24, 119, 242, 0.5);
  color: #93c5fd;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* Demographics Modal & Countries Progress Bars                        */
/* ═══════════════════════════════════════════════════════════════════ */
.demographics-card-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.demographics-header-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.demographics-status-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
}

.demographics-countries-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demographics-country-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demographics-country-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.demographics-country-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-primary);
}

.demographics-country-name .flag-icon {
  font-size: 1rem;
}

.demographics-country-pct {
  font-weight: 700;
  color: #a5b4fc;
}

.demographics-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.demographics-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #38bdf8);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.demographics-empty-hint {
  padding: 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* Meta Token Input Box */
.meta-token-details summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  user-select: none;
}

.meta-token-details summary:hover {
  color: #fff;
}

.meta-token-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-token-sync {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-token-sync:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}

.btn-action-audience {
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #38bdf8;
}

.btn-action-audience:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   THE MIX, OVER TIME — Modern Stacked Area Audience Timeline
   ───────────────────────────────────────────────────────────────────────────── */
.the-mix-card {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

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

.the-mix-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.the-mix-title i {
  color: #60a5fa;
  font-size: 0.85rem;
}

.the-mix-date-range {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.02em;
}

.the-mix-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 95px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  padding: 4px;
  overflow: hidden;
}

.the-mix-canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

.the-mix-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
}

.the-mix-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  white-space: nowrap;
}

.the-mix-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.the-mix-name {
  color: #94a3b8;
  font-weight: 500;
}

.the-mix-pct {
  color: #f8fafc;
  font-weight: 700;
}

.the-mix-delta {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
}

.the-mix-delta.pos {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.the-mix-delta.neg {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.the-mix-delta.neu {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
}


