/* ═══════════════════════════════════════════════════════════════════════════
   LevelUp Dashboard — Design System v2
   Direction: White premium, lime/neon accent, bold typography, airy layout
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* ── Brand / Accent ── */
  --color-accent: #c8ff00;
  --color-accent-hover: #b8ef00;
  --color-accent-subtle: rgba(200, 255, 0, 0.12);
  --color-accent-medium: rgba(200, 255, 0, 0.25);
  --color-accent-text: #1a1a1a; /* text on accent bg */

  /* ── Semantic ── */
  --color-blue: #3b82f6;
  --color-green: #22c55e;
  --color-orange: #f59e0b;
  --color-red: #ef4444;
  --color-purple: #8b5cf6;

  /* ── Neutral palette ── */
  --color-bg: #f5f5f0;
  --color-surface: rgba(255, 255, 255, 0.72);
  --color-surface-solid: #ffffff;
  --color-surface-hover: rgba(250, 250, 248, 0.8);
  --color-surface-alt: rgba(240, 240, 235, 0.6);
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-light: rgba(255, 255, 255, 0.5);

  /* ── Aliases (used by LUS Brain, Video Detail, Tracker sections) ── */
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text-secondary);
  --text-muted: var(--color-text-muted);
  --bg-base: var(--color-bg);
  --bg-card: var(--color-surface-solid);
  --border: var(--color-border);
  --accent: var(--color-accent);
  --color-primary: var(--color-accent);

  /* ── Glass ── */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: blur(16px);
  --glass-blur-strong: blur(24px);
  --color-text: #111111;
  --color-text-secondary: #6b6b6b;
  --color-text-muted: #999999;

  /* ── Sidebar ── */
  --sidebar-width: 264px;
  --sidebar-bg: rgba(255, 255, 255, 0.65);
  --sidebar-border: rgba(255, 255, 255, 0.5);
  --sidebar-text: #6b6b6b;
  --sidebar-text-active: #111111;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.08);

  /* ── Radii ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 999px;

  /* ── Transitions ── */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Typography Scale ── */
  --text-xs: 0.7rem;      /* 10.5px - badges, micro labels */
  --text-sm: 0.8rem;      /* 12px - captions, secondary info */
  --text-base: 0.9rem;    /* 13.5px - body text */
  --text-md: 1rem;        /* 15px - default, prominent body */
  --text-lg: 1.15rem;     /* 17.25px - section titles */
  --text-xl: 1.35rem;     /* 20.25px - page titles */
  --text-2xl: 1.7rem;     /* 25.5px - hero numbers, KPIs */
  --text-3xl: 2.2rem;     /* 33px - big feature numbers */

  /* ── Font Weights ── */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* ── Line Heights ── */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* ── Spacing Scale (4px base grid) ── */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-7: 2rem;      /* 32px */
  --space-8: 2.5rem;    /* 40px */
  --space-9: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */

  /* ── Accent with alpha (fix concatenation bug) ── */
  --color-accent-4: rgba(200, 255, 0, 0.04);
  --color-accent-8: rgba(200, 255, 0, 0.08);
  --color-accent-12: rgba(200, 255, 0, 0.12);
  --color-accent-20: rgba(200, 255, 0, 0.20);
  --color-accent-30: rgba(200, 255, 0, 0.30);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

a {
  color: var(--color-text);
  text-decoration: none;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-text-secondary);
  text-decoration-color: currentColor;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input {
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR — White, clean, premium
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-brand {
  padding: var(--space-7) var(--space-6) var(--space-5);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.3rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-weight: 900;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: -0.04em;
}

.sidebar-client-name {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-medium);
  margin-top: 0.15rem;
}

/* ─── Sidebar Navigation ─── */
.sidebar-nav {
  flex: 1;
  padding: var(--space-3) var(--space-3);
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  transition: background var(--transition-fast), color var(--transition-fast);
  margin-bottom: var(--space-1);
  position: relative;
}

.nav-link:hover {
  background: var(--color-accent-4);
  color: var(--sidebar-text-active);
}
.nav-link:active {
  transform: scale(0.98);
}

.nav-link.active {
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-weight: var(--font-bold);
}

.nav-link[data-view="tracker"] {
  color: #f472b6;
}

.nav-link[data-view="tracker"]:hover {
  color: #ec4899;
}

.nav-link[data-view="tracker"].active {
  background: #ec4899;
  color: #fff;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.8;
}

.nav-separator {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--space-3) var(--space-2);
}

.nav-section-title {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3) var(--space-2);
}

.sidebar-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--color-border-light);
}

.sidebar-powered {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── TOP BAR ─── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  background: rgba(245, 245, 240, 0.6);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.topbar-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 0.15rem;
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.config-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  border: 1px solid transparent;
}

.config-btn:hover {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.config-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text);
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIEW SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.view {
  display: none;
  padding: 0 var(--space-8) var(--space-8);
  flex: 1;
}

.view.active {
  display: block;
}

.view-description {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
  font-weight: var(--font-normal);
}

/* ═══════════════════════════════════════════════════════════════════════════
   KPI CARDS — Bold numbers, accent highlights
   ═══════════════════════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}

.kpi-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.kpi-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  background: var(--glass-bg-strong);
  border-color: rgba(255, 255, 255, 0.7);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.kpi-icon svg {
  width: 22px;
  height: 22px;
}

.kpi-icon--blue {
  background: rgba(59, 130, 246, 0.08);
  color: var(--color-blue);
}

.kpi-icon--green {
  background: rgba(34, 197, 94, 0.08);
  color: var(--color-green);
}

.kpi-icon--orange {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-orange);
}

.kpi-icon--purple {
  background: rgba(139, 92, 246, 0.08);
  color: var(--color-purple);
}

.kpi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kpi-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
}

.kpi-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS — Clean, rounded, soft
   ═══════════════════════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-5);
}

.card {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  animation: cardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.7);
}

.card--large {
  grid-column: span 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
}

.card-title {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.card-body {
  padding: var(--space-6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES — Clean, minimal
   ═══════════════════════════════════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.015);
}

.data-table tbody td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
  line-height: var(--leading-normal);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.012);
}

.data-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-empty-row td {
  padding: var(--space-7) var(--space-4);
}

.table-empty-row:hover {
  background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS BADGES — Pill-shaped, modern
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Attente de création → rouge */
.badge--waiting {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* Script en cours → bleu */
.badge--script {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

/* Script terminé → vert clair */
.badge--script-done {
  background: rgba(132, 204, 22, 0.12);
  color: #65a30d;
}

/* Tournage → jaune */
.badge--shooting {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

/* Montage → rouge clair */
.badge--editing {
  background: rgba(251, 113, 133, 0.15);
  color: #e11d48;
}

/* Validé → rose */
.badge--validated {
  background: rgba(236, 72, 153, 0.1);
  color: #db2777;
}

/* Publié → vert */
.badge--published {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

/* Fallback in-progress */
.badge--in-progress {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

/* Priority badges */
.badge--prio-haute {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  font-weight: 600;
}
.badge--prio-moyenne {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.badge--prio-basse {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

/* Outline badge (niche, tags) */
.badge--outline {
  background: transparent;
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PUBLISHED LIST
   ═══════════════════════════════════════════════════════════════════════════ */
.published-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.published-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.published-item:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.published-item-thumb {
  width: 80px;
  height: 45px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--color-bg);
}

.published-item-info {
  flex: 1;
  min-width: 0;
}

.published-item-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.published-item-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state-icon {
  color: var(--color-text-muted);
  opacity: 0.25;
  margin-bottom: 1.25rem;
  font-size: 2.5rem;
}

.empty-state p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 320px;
  line-height: var(--leading-relaxed);
  letter-spacing: 0.005em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS — Accent primary, ghost secondary
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  letter-spacing: 0.01em;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 6px 16px rgba(200, 255, 0, 0.35);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(200, 255, 0, 0.2);
}

.btn--ghost {
  color: var(--color-text-secondary);
  background: transparent;
  border-color: var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

.btn--ghost:active {
  transform: translateY(0);
}

.btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: var(--text-sm);
}

.btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn--icon svg {
  width: 16px;
  height: 16px;
}

.view-toggle {
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.view-toggle.active {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INPUTS — Clean, bordered
   ═══════════════════════════════════════════════════════════════════════════ */
.input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--color-text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.input::placeholder {
  color: var(--color-text-muted);
}

/* ─── FORM ─── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: var(--leading-normal);
}

.form-divider {
  border: none;
  height: 1px;
  background: var(--color-border-light);
  margin: var(--space-6) 0;
}

.form-section-title {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL — Glassmorphism overlay
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--space-7);
  animation: modalFade 0.2s ease both;
}
@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-overlay > .card,
.modal-overlay > .modal-content {
  animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid var(--glass-border);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-7);
  border-bottom: 1px solid var(--color-border-light);
}

.modal-header h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

.modal-close {
  font-size: 1.4rem;
  color: var(--color-text-muted);
  line-height: 1;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-text);
  background: var(--color-surface-alt);
}

.modal-body {
  padding: var(--space-7);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-7);
  border-top: 1px solid var(--color-border-light);
}

/* ─── Onboard success link cards ─── */
.onboard-link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface-alt, #f8f8f5);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.onboard-link-card:hover {
  border-color: var(--color-accent);
  background: rgba(200, 255, 0, 0.06);
}

/* ─── Client avatar in table ─── */
.client-name-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.client-yt-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface-alt, #f0f0ec);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.client-yt-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
a.client-yt-link {
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}
a.client-yt-link:hover {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px var(--color-accent, #c8ff00);
}
.handle-link {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.82rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-subtle, #f3f4f6);
  border: 1px solid var(--color-border, #e5e7eb);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-family: inherit;
}
.handle-link:hover {
  background: #fee2e2;
  border-color: #ff0000;
  color: #cc0000;
}

/* ─── YouTube preview in onboard modal ─── */
.ob-yt-input-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ob-yt-avatar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt, #f8f8f5);
  border: 1px solid var(--color-border-light);
}
.ob-yt-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.ob-yt-avatar span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
}

/* ─── Edit modal YouTube avatar preview ─── */
.edit-yt-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.2rem;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt, #f8f8f5);
  border: 1px solid var(--color-border-light);
}
.edit-yt-preview img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.edit-yt-preview span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLANNING / CALENDAR — Clean grid, accent day markers
   ═══════════════════════════════════════════════════════════════════════════ */
.planning-month-label {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--color-text);
  min-width: 160px;
  text-align: center;
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Nav badge */
.notif-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: auto;
}

/* Layout */
.notif-layout {
  display: flex;
  gap: 1.5rem;
  min-height: calc(100vh - 120px);
}
.notif-main { flex: 1; min-width: 0; }
.notif-sidebar { width: 260px; flex-shrink: 0; }

/* Toolbar */
.notif-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}
.notif-toolbar-left { display: flex; align-items: center; gap: 0.75rem; }
.notif-section-title {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--color-text);
  line-height: var(--leading-snug);
}
.notif-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Notification list */
.notif-list {
  display: flex;
  flex-direction: column;
}

.notif-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.15s;
  cursor: default;
}
.notif-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.notif-item:last-child { border-bottom: none; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.notif-item:only-child { border-radius: var(--radius-md); }
.notif-item:hover { background: #fafafa; }
.notif-item.unread { border-left: 3px solid var(--color-accent); }
.notif-item.read { opacity: 0.7; }

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-icon--status { background: rgba(99,102,241,0.12); color: #6366f1; }
.notif-icon--info { background: rgba(14,165,233,0.12); color: #0ea5e9; }
.notif-icon--success { background: rgba(34,197,94,0.12); color: #22c55e; }

.notif-body { flex: 1; min-width: 0; }
.notif-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: 2px;
}
.notif-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}
.notif-status-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.75rem;
}
.notif-status-pill {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.7rem;
}
.notif-status-arrow {
  color: var(--color-text-muted);
}

.notif-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.notif-time {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Load more */
.notif-load-more {
  text-align: center;
  padding: 1rem 0;
}

/* Sidebar summary card */
.notif-summary-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--color-border-light);
}
.notif-summary-title {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
}
.notif-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}
.notif-summary-count {
  margin-left: auto;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface-alt);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
}
.notif-summary-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.notif-summary-dot--unread { background: var(--color-accent); }
.notif-summary-dot--total { background: var(--color-text-muted); }

/* Responsive */
@media (max-width: 768px) {
  .notif-layout { flex-direction: column; }
  .notif-sidebar { width: 100%; }
  .notif-item { padding: 0.75rem; gap: 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLANNING — Evernote-style calendar layout
   ═══════════════════════════════════════════════════════════════════════════ */
.pl-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 120px);
}

/* ── Sidebar ── */
.pl-sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 1.25rem 1.25rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Mini calendar */
.pl-mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.pl-mini-cal-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
}
.pl-mini-cal-nav { display: flex; gap: 2px; }
.pl-mini-nav-btn {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--color-text-muted); border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.pl-mini-nav-btn:hover { color: var(--color-text); background: var(--color-surface-alt); }

.pl-mini-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.pl-mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 1px;
}
.pl-mini-day {
  font-size: 0.75rem;
  padding: 4px 0;
  color: var(--color-text-secondary);
  border-radius: 50%;
  cursor: default;
  line-height: 1.6;
}
.pl-mini-day.other { color: var(--color-text-muted); opacity: 0.4; }
.pl-mini-day.today {
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-weight: 700;
}
.pl-mini-day.has-event { font-weight: 700; color: var(--color-text); }

/* Legend */
.pl-legend { display: flex; flex-direction: column; gap: 6px; }
.pl-legend-title {
  font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px;
  padding-bottom: 6px; border-bottom: 1px solid var(--color-border-light);
}
.pl-legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--color-text-secondary);
}
.pl-legend-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.pl-legend-dot--published { background: #22c55e; }
.pl-legend-dot--review { background: #f59e0b; }
.pl-legend-dot--editing { background: #818cf8; }
.pl-legend-dot--shooting { background: #ec4899; }
.pl-legend-dot--script { background: #0ea5e9; }

/* Upcoming */
.pl-upcoming-title {
  font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--color-border-light);
}
.pl-upcoming-list { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border-light);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item--past { opacity: 0.55; }

.timeline-date {
  display: flex; flex-direction: column; align-items: center;
  min-width: 40px; padding: 0.2rem 0.4rem;
  background: var(--color-accent-subtle); border-radius: var(--radius-sm);
}
.timeline-date-day {
  font-size: 1rem; font-weight: 900; color: var(--color-text);
  line-height: 1; letter-spacing: -0.03em;
}
.timeline-date-month {
  font-size: 0.6rem; text-transform: uppercase; font-weight: 600;
  color: var(--color-text-muted); margin-top: 0.1rem;
}
.timeline-content {
  flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.timeline-title {
  font-size: 0.8rem; font-weight: 600; color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timeline-meta { font-size: 0.7rem; color: var(--color-text-muted); margin-top: 0.15rem; }

/* ── Main calendar ── */
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

.pl-main-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0; margin-bottom: 0;
}
.pl-main-month {
  font-size: var(--text-lg); font-weight: var(--font-normal); color: var(--color-text-secondary); letter-spacing: -0.01em;
}
.pl-main-actions { display: flex; align-items: center; gap: 8px; }
.pl-today-btn {
  font-size: 0.82rem; font-weight: 600; color: var(--color-accent);
  background: none; border: none; cursor: pointer; padding: 4px 8px;
  transition: opacity 0.15s;
}
.pl-today-btn:hover { opacity: 0.7; }
.pl-nav-btn {
  background: none; border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm); cursor: pointer; padding: 4px 6px;
  color: var(--color-text-muted); transition: color var(--transition-fast), border-color var(--transition-fast);
}
.pl-nav-btn:hover { border-color: var(--color-text-muted); color: var(--color-text); }

/* Calendar header (day names) */
.pl-cal-header {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  border-bottom: 1px solid var(--color-border-light);
}
.pl-cal-week-label { /* empty top-left corner */ }
.pl-cal-day-name {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0.5rem 0;
}

/* Calendar body (rows of weeks) */
.pl-cal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pl-cal-row {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  flex: 1;
  min-height: 90px;
  border-bottom: 1px solid var(--color-border-light);
}
.pl-cal-row:last-child { border-bottom: none; }

.pl-week-label {
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 10px;
  font-size: 0.7rem; font-weight: 500; color: var(--color-text-muted);
}

.pl-cal-cell {
  border-left: 1px solid var(--color-border-light);
  padding: 6px 8px;
  display: flex; flex-direction: column;
  transition: background 0.15s;
  cursor: default;
  overflow: hidden;
  min-width: 0;
  background: #fff;
}
.pl-cal-cell:hover { background: #f9fafb; }
.pl-cal-cell.other-month .pl-cal-num { opacity: 0.4; }
.pl-cal-cell.other-month .pl-cal-event { display: none; }

.pl-cal-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.pl-cal-cell.today .pl-cal-num {
  background: var(--color-accent);
  color: var(--color-accent-text);
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 700;
}

.pl-cal-event {
  font-size: 0.68rem;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  cursor: default;
  border-left: 3px solid transparent;
  max-width: 100%;
}
.pl-cal-event--published { background: rgba(34,197,94,0.18); color: #15803d; border-left-color: #22c55e; }
.pl-cal-event--review { background: rgba(245,158,11,0.18); color: #b45309; border-left-color: #f59e0b; }
.pl-cal-event--editing { background: rgba(99,102,241,0.18); color: #4f46e5; border-left-color: #818cf8; }
.pl-cal-event--shooting { background: rgba(236,72,153,0.18); color: #be185d; border-left-color: #ec4899; }
.pl-cal-event--script { background: rgba(14,165,233,0.18); color: #0369a1; border-left-color: #0ea5e9; }
.pl-cal-event--default { background: rgba(200,255,0,0.18); color: #4a6600; border-left-color: var(--color-accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .pl-layout { flex-direction: column; }
  .pl-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 0 0 1rem 0; gap: 1rem; }
  .pl-mini-cal { flex: 1; min-width: 200px; }
  .pl-legend { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .pl-upcoming { flex: 1; min-width: 200px; }
  .pl-cal-header, .pl-cal-row { grid-template-columns: 36px repeat(7, 1fr); }
  .pl-cal-cell { padding: 4px; }
  .pl-cal-event { font-size: 0.6rem; padding: 1px 4px; }
}
@media (max-width: 480px) {
  .pl-sidebar { flex-direction: column; }
  .pl-cal-header, .pl-cal-row { grid-template-columns: repeat(7, 1fr); }
  .pl-week-label { display: none; }
  .pl-cal-week-label { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DRIVE BROWSER — Modern file grid
   ═══════════════════════════════════════════════════════════════════════════ */
.drive-toolbar {
  margin-bottom: 1rem;
}

.drive-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.breadcrumb-item {
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.breadcrumb-item:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.breadcrumb-root {
  font-weight: 600;
  color: var(--color-text);
}

.breadcrumb-sep {
  color: var(--color-text-muted);
  user-select: none;
}

.drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.drive-grid.list-view {
  grid-template-columns: 1fr;
  gap: 0;
}

.drive-item {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  cursor: pointer;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.drive-item:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.7);
}

.drive-item-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drive-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drive-item-preview .file-icon {
  font-size: 2rem;
  color: var(--color-text-muted);
  opacity: 0.4;
}

.drive-item-preview .folder-icon {
  color: var(--color-orange);
  opacity: 0.7;
}

/* Folder SVG icon */
.drive-item-preview .folder-icon-svg {
  width: 3.5rem;
  height: 3.5rem;
  filter: drop-shadow(0 2px 4px rgba(217, 119, 6, 0.2));
}

/* File SVG icon */
.drive-item-preview .file-icon-svg {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* Folder card specific styling */
.drive-item--folder .drive-item-preview {
  background: rgba(245, 158, 11, 0.04);
}

.drive-item--folder:hover .drive-item-preview {
  background: rgba(245, 158, 11, 0.08);
}

.drive-item-info {
  padding: 0.75rem 0.85rem;
}

.drive-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-item-meta {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

/* List view */
.drive-grid.list-view .drive-item {
  flex-direction: row;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--color-border-light);
  align-items: center;
  padding: 0.7rem 0.5rem;
}

.drive-grid.list-view .drive-item:hover {
  transform: none;
  background: var(--color-surface-hover);
  box-shadow: none;
}

.drive-grid.list-view .drive-item-preview {
  width: 40px;
  height: 40px;
  aspect-ratio: auto;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.drive-grid.list-view .drive-item-info {
  flex: 1;
  padding: 0 0.8rem;
}

.drive-item-actions {
  display: flex;
  gap: 0.3rem;
  padding: 0 0.8rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   YOUTUBE — Channel header, KPI grid, video cards
   ═══════════════════════════════════════════════════════════════════════════ */
.yt-search-bar {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.yt-search-bar .input {
  flex: 1;
  border-radius: var(--radius-full);
  padding-left: 1.2rem;
}

.yt-channel-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.3rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  margin-bottom: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.yt-channel-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-accent);
}

.yt-channel-info h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

.yt-channel-info p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.yt-kpi {
  text-align: center;
  padding: var(--space-5) var(--space-4);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.yt-kpi-value {
  display: block;
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
}

.yt-kpi-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-subtitle {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

.yt-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.yt-video-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.yt-video-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-3px);
}

.yt-video-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-surface-alt);
}

.yt-video-info {
  padding: 0.85rem;
}

.yt-video-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.yt-video-stats {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* ─── YouTube Analytics ──────────────────────────────────────────────── */
.yt-analytics-section {
  margin-bottom: 1.5rem;
}

.yt-kpi-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.yt-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.yt-chart-card {
  padding: 1.2rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.yt-chart-wrapper {
  position: relative;
  width: 100%;
  min-height: 300px;
}

.yt-chart-wrapper--timeline {
  min-height: 250px;
}

.yt-chart-wrapper canvas {
  width: 100% !important;
}

.yt-best-video-title {
  font-size: 0.85rem !important;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── YouTube KPI 6-column ─── */

.yt-kpi-grid--6 {
  grid-template-columns: repeat(6, 1fr);
}

/* ─── YouTube Section titles ─── */

.yt-section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-extrabold);
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
  margin: 0 0 0.6rem;
}

/* ─── Dual grid: Top 10 + Outliers side by side ─── */

.yt-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

/* ─── Chart toolbar + filters ─── */

.yt-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.yt-chart-toolbar .section-subtitle {
  margin-bottom: 0;
}

.yt-chart-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.yt-filter-group {
  display: flex;
  gap: 0.25rem;
}

.yt-filter-sep {
  width: 1px;
  height: 20px;
  background: var(--color-border);
  margin: 0 0.25rem;
}

.yt-filter-btn {
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.yt-filter-btn:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text);
}

.yt-filter-btn.active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.yt-metric-btn.active {
  background: var(--metric-color, var(--color-text));
  color: #fff;
  border-color: var(--metric-color, var(--color-text));
}

/* ─── YouTube Video Table ─── */

.yt-video-table {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.yt-vtable-header {
  display: grid;
  grid-template-columns: 36px 80px 1fr 80px 70px 60px 90px 72px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 1rem;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.yt-vtable-row {
  display: grid;
  grid-template-columns: 36px 80px 1fr 80px 70px 60px 90px 72px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.yt-vtable-row:last-child {
  border-bottom: none;
}

.yt-vtable-row:hover {
  background: var(--color-surface-alt);
}

.yt-vtable-col--rank {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-text-muted);
  text-align: center;
}

.yt-vtable-col--thumb {
  width: 80px;
  height: 45px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-alt);
}

.yt-vtable-col--thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-vtable-col--title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.yt-vtable-col--stat {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-align: right;
}

.yt-vtable-col--ratio {
  text-align: center;
}

.yt-ratio-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  border: 1.5px solid;
  letter-spacing: -0.02em;
}

/* ─── YouTube responsive ─── */

@media (max-width: 900px) {
  .yt-vtable-header,
  .yt-vtable-row {
    grid-template-columns: 28px 60px 1fr 65px 55px 60px;
  }
  /* Hide duration + date columns */
  .yt-vtable-header .yt-vtable-col--stat:nth-child(6),
  .yt-vtable-header .yt-vtable-col--stat:nth-child(7),
  .yt-vtable-row .yt-vtable-col--stat:nth-child(6),
  .yt-vtable-row .yt-vtable-col--stat:nth-child(7) {
    display: none;
  }
}

@media (max-width: 600px) {
  .yt-kpi-grid--6 {
    grid-template-columns: repeat(2, 1fr);
  }
  .yt-vtable-header,
  .yt-vtable-row {
    grid-template-columns: 28px 1fr 55px 60px;
  }
  .yt-vtable-col--thumb,
  .yt-vtable-header .yt-vtable-col--thumb,
  .yt-vtable-col--stat:nth-child(5),
  .yt-vtable-header .yt-vtable-col--stat:nth-child(5) {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHANNEL DIRECTORY — Grid of channel bubbles
   ═══════════════════════════════════════════════════════════════════════════ */

.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
}

.ch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.2rem 1.5rem;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.ch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.ch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(200, 255, 0, 0.3);
}

.ch-card:hover::before {
  opacity: 1;
}

.ch-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.8);
  transition: transform var(--transition-normal);
}

.ch-card:hover .ch-card-avatar {
  transform: scale(1.05);
}

.ch-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ch-card-name {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
  line-height: var(--leading-snug);
}

.ch-card-niche {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-accent-text);
  background: var(--color-accent);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ch-card-stats {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ch-card-stat {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.ch-card-arrow {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  transform: translateX(-4px);
}

.ch-card:hover .ch-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHANNEL DETAIL — Profile + panels layout
   ═══════════════════════════════════════════════════════════════════════════ */

.ch-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.ch-back-btn:hover {
  background: var(--color-surface-solid);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.ch-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ─── Profile card (left sidebar) ─── */

.ch-profile-card {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.ch-profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 2.4rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  border: 3px solid var(--color-accent);
}

.ch-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ch-profile-name {
  font-size: var(--text-xl);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 0.3rem;
  line-height: var(--leading-tight);
}

.ch-profile-niche {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-accent-text);
  background: var(--color-accent);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ch-profile-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.ch-profile-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.8rem;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
}

.ch-profile-stat-value {
  font-size: var(--text-md);
  font-weight: var(--font-extrabold);
  color: var(--color-text);
}

.ch-profile-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-medium);
}

.ch-profile-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: #ff0000;
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.ch-profile-yt-btn:hover {
  background: #cc0000;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.3);
}

/* ─── Content panels (right side) ─── */

.ch-detail-main {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.ch-panel {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.ch-panel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--color-border);
}

.ch-panel-header h3 {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--color-text);
  flex: 1;
  line-height: var(--leading-snug);
}

.ch-panel-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--color-accent);
  color: var(--color-accent-text);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

/* Videos panel accent */
.ch-panel--videos {
  border-left: 3px solid #f59e0b;
}

.ch-panel--videos .ch-panel-header {
  background: rgba(245, 158, 11, 0.06);
}

.ch-panel--videos .ch-panel-header svg {
  color: #f59e0b;
}

/* Stats panel accent */
.ch-panel--stats {
  border-left: 3px solid var(--color-blue);
}

.ch-panel--stats .ch-panel-header {
  background: rgba(59, 130, 246, 0.06);
}

.ch-panel--stats .ch-panel-header svg {
  color: var(--color-blue);
}

/* Forces panel */
.ch-panel--forces {
  border-left: 3px solid var(--color-green);
}

.ch-panel--forces .ch-panel-header {
  background: rgba(34, 197, 94, 0.06);
}

.ch-panel--forces .ch-panel-header svg {
  color: var(--color-green);
}

/* Faiblesses panel */
.ch-panel--faiblesses {
  border-left: 3px solid var(--color-red);
}

.ch-panel--faiblesses .ch-panel-header {
  background: rgba(239, 68, 68, 0.06);
}

.ch-panel--faiblesses .ch-panel-header svg {
  color: var(--color-red);
}

/* ─── Video list inside panel ─── */

.ch-video-list {
  padding: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
}

.ch-video-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ch-video-item:hover {
  background: var(--color-surface-alt);
}

.ch-video-thumb-sm {
  width: 90px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-surface-alt);
}

.ch-video-thumb-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ch-video-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-surface-alt);
}

.ch-video-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ch-video-meta-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.ch-video-meta-stats {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* ─── Stats grid inside panel ─── */

.ch-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  padding: 1.2rem;
}

.ch-stat-item {
  text-align: center;
  padding: 1rem 0.6rem;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
}

.ch-stat-value {
  display: block;
  font-size: var(--text-xl);
  font-weight: var(--font-extrabold);
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
}

.ch-stat-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.2rem;
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Best video callout ─── */

.ch-best-video {
  margin: 0 1.2rem 1.2rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, rgba(200, 255, 0, 0.1), rgba(200, 255, 0, 0.04));
  border: 1px solid rgba(200, 255, 0, 0.2);
  border-radius: var(--radius-md);
}

.ch-best-video-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.ch-best-video-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.ch-best-video-stats {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
}

/* ─── Avatar fallback for detail view ─── */

.ch-detail-avatar-fallback {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Insight buttons row ─── */

.ch-insight-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.ch-insight-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
}

.ch-insight-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ch-insight-btn--resume {
  color: var(--color-primary);
  border-color: rgba(99, 102, 241, 0.25);
}
.ch-insight-btn--resume:hover {
  background: rgba(99, 102, 241, 0.08);
}

.ch-insight-btn--forces {
  color: var(--color-green);
  border-color: rgba(34, 197, 94, 0.25);
}
.ch-insight-btn--forces:hover {
  background: rgba(34, 197, 94, 0.08);
}

.ch-insight-btn--faiblesses {
  color: var(--color-red, #ef4444);
  border-color: rgba(239, 68, 68, 0.25);
}
.ch-insight-btn--faiblesses:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* ─── Insight modal popup ─── */

.ch-insight-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: chModalFadeIn 0.2s ease;
}

@keyframes chModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ch-insight-modal {
  background: var(--color-bg, #fff);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: chModalSlideIn 0.25s ease;
}

@keyframes chModalSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ch-insight-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--glass-border);
}

.ch-insight-modal-header h3 {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  letter-spacing: -0.01em;
}

.ch-insight-modal--forces .ch-insight-modal-header h3 { color: var(--color-green); }
.ch-insight-modal--faiblesses .ch-insight-modal-header h3 { color: var(--color-red, #ef4444); }
.ch-insight-modal--resume .ch-insight-modal-header h3 { color: var(--color-primary); }

.ch-insight-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0 0.2rem;
  line-height: 1;
}
.ch-insight-modal-close:hover {
  color: var(--color-text);
}

.ch-insight-modal-body {
  padding: 1.2rem 1.4rem;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.ch-insight-modal-body p {
  white-space: pre-line;
}

.ch-insight-modal-body .ch-analysis-list {
  padding: 0;
}

.ch-insight-modal--forces .ch-analysis-list li::before {
  background: var(--color-green);
}

.ch-insight-modal--faiblesses .ch-analysis-list li::before {
  background: var(--color-red, #ef4444);
}

/* ─── Analysis row (forces/faiblesses side by side) ─── */

.ch-analysis-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.ch-analysis-list {
  list-style: none;
  padding: 1rem 1.3rem;
}

.ch-analysis-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.2rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.ch-analysis-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ch-panel--forces .ch-analysis-list li::before {
  background: var(--color-green);
}

.ch-panel--faiblesses .ch-analysis-list li::before {
  background: var(--color-red);
}

/* ─── Charts in channel detail ─── */

.ch-charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.ch-panel--chart {
  border-left: 3px solid var(--color-purple);
}

.ch-panel--chart .ch-panel-header {
  background: rgba(139, 92, 246, 0.06);
}

.ch-panel--chart .ch-panel-header svg {
  color: var(--color-purple);
}

.ch-chart-wrapper {
  position: relative;
  width: 100%;
  min-height: 280px;
  padding: 1rem 1.2rem;
}

.ch-chart-wrapper canvas {
  width: 100% !important;
}

/* ─── Channel responsive (handled in main RESPONSIVE section) ─── */

@media (max-width: 600px) {
  .ch-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  .ch-card {
    padding: 1.4rem 0.8rem 1.2rem;
  }
  .ch-card-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.4rem;
  }
  .ch-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DOC VIEWER
   ═══════════════════════════════════════════════════════════════════════════ */
.doc-content {
  max-width: 720px;
  line-height: 1.7;
}

.doc-content h1 {
  font-size: var(--text-xl);
  font-weight: var(--font-extrabold);
  margin: 1.5rem 0 0.8rem;
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
}

.doc-content h2 {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  margin: 1.3rem 0 0.6rem;
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

.doc-content h3 {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  margin: 1rem 0 0.5rem;
  line-height: var(--leading-snug);
}

.doc-content p {
  margin-bottom: 0.8rem;
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.doc-content table td,
.doc-content table th {
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.8rem;
}

.doc-content table th {
  background: var(--color-surface-alt);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING — Lime accent spinner
   ═══════════════════════════════════════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 245, 240, 0.5);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── HIDDEN ─── */
.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — PC BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Ultrawide (2560px+) — cap content width ─── */
@media (min-width: 2200px) {
  .view {
    max-width: 1800px;
  }
}

/* ─── Large desktop (≤1600px) — slight density adjustments ─── */
@media (max-width: 1600px) {
  .yt-kpi-grid--6 {
    grid-template-columns: repeat(3, 1fr);
  }
  .veille-card-row {
    grid-template-columns: 80px 130px 1fr 130px;
    gap: 1rem;
  }
  .veille-card-thumb {
    width: 170px;
  }
}

/* ─── Standard desktop (≤1440px) ─── */
@media (max-width: 1440px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .yt-charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ch-charts-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .intel-compare-grid {
    gap: 1rem;
  }
}

/* ─── Small desktop / Laptop (≤1280px) ─── */
@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .yt-kpi-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .yt-kpi-grid--6 {
    grid-template-columns: repeat(3, 1fr);
  }
  .yt-dual-grid {
    grid-template-columns: 1fr;
  }
  .ch-detail {
    grid-template-columns: 240px 1fr;
    gap: 1rem;
  }
  .ch-profile-card {
    padding: 1.5rem 1rem;
  }
  .ch-profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
  .veille-card-row {
    grid-template-columns: 70px 120px 1fr 120px;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
  }
  .veille-card-thumb {
    width: 140px;
  }
}

/* ─── Tablet-desktop transition (≤1024px) ─── */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .yt-kpi-grid--6 {
    grid-template-columns: repeat(2, 1fr);
  }
  .yt-charts-grid {
    grid-template-columns: 1fr;
  }
  .ch-detail {
    grid-template-columns: 1fr;
  }
  .ch-profile-card {
    position: static;
    flex-direction: row;
    text-align: left;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .ch-profile-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 0;
  }
  .ch-profile-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .ch-profile-stat {
    flex: 1;
    min-width: 120px;
  }
  .ch-analysis-row {
    grid-template-columns: 1fr;
  }
  .ch-charts-row {
    grid-template-columns: 1fr;
  }
  .veille-card-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .veille-card-profile {
    flex-direction: row;
    gap: 0.75rem;
    justify-content: flex-start;
  }
  .veille-card-badges {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .veille-badge-group {
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
  }
  .veille-card-content {
    flex-direction: row;
  }
  .veille-card-thumb {
    width: 180px;
  }
  .veille-card-actions {
    flex-direction: row;
  }
  .intel-compare-grid,
  .intel-dual-section,
  .intel-thumb-compare {
    grid-template-columns: 1fr;
  }
}

/* ─── Mobile overlay backdrop ─── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-content {
    margin-left: 0;
    overflow-x: hidden;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .topbar {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .topbar-left {
    gap: 0.5rem;
    min-width: 0;
  }

  .topbar-title {
    font-size: 1.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-subtitle {
    font-size: 0.7rem;
  }

  .view {
    padding: 0 0.75rem 1.2rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .yt-kpi-grid {
    grid-template-columns: 1fr;
  }

  .yt-kpi-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .yt-charts-grid {
    grid-template-columns: 1fr;
  }

  .yt-search-bar {
    flex-direction: column;
  }

  .drive-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  /* Buttons and inputs: bigger touch targets */
  .btn, button {
    min-height: 40px;
  }

  .input, select, textarea {
    min-height: 40px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  /* Tables: ensure wrapper scrolls horizontally */
  .table-wrapper, [style*="overflow-x"] {
    -webkit-overflow-scrolling: touch;
  }

  /* Veille cards: stack content vertically */
  .veille-card-content {
    flex-direction: column;
  }
  .veille-card-thumb {
    width: 100%;
    max-width: 400px;
  }

  /* Channel profile: simplified */
  .ch-profile-card {
    flex-direction: column;
    text-align: center;
  }
  .ch-stats-grid {
    grid-template-columns: 1fr;
  }

  /* Hub grid */
  .hub-grid {
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .kpi-card {
    padding: 1rem;
  }

  .topbar {
    padding: 0.6rem 0.75rem;
  }

  .topbar-title {
    font-size: 1rem;
  }

  .view {
    padding: 0 0.5rem 1rem;
  }

  .yt-kpi-grid--4 {
    grid-template-columns: 1fr;
  }

  .sidebar-brand {
    padding: 1.2rem 1rem 1rem;
  }

  .sidebar-nav {
    padding: 0.4rem 0.5rem;
  }
}

/* ─── ACCESS DENIED SCREEN ──────────────────────────────────────────────── */
.access-denied-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  z-index: 9999;
}

.access-denied-box {
  text-align: center;
  padding: 3rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  max-width: 420px;
  width: 90%;
}

.access-denied-icon {
  color: var(--color-red);
  margin-bottom: 1.5rem;
}

.access-denied-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  line-height: var(--leading-tight);
}

.access-denied-message {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.access-denied-help {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── LOGIN SCREEN ──────────────────────────────────────────────────────── */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  z-index: 9999;
}

.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  margin: 1rem;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.login-logo .logo-icon { color: var(--accent); font-size: 1.3rem; }
.login-logo .logo-text { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }

.login-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
  line-height: var(--leading-tight);
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-bottom: 1.75rem;
  line-height: var(--leading-normal);
}

.login-field { margin-bottom: 1rem; }

.login-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.login-input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.login-btn:hover:not(:disabled) { background: #4f46e5; }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 0.5rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.login-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.login-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.login-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.login-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  border-radius: 0.5rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ─── LOGOUT BUTTON ─────────────────────────────────────────────────────── */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  margin-top: 0.5rem;
  width: 100%;
  transition: color 0.15s, background 0.15s;
}

.logout-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UPLOAD — Dropzone, file list, progress
   ═══════════════════════════════════════════════════════════════════════════ */
.drive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.upload-rush-btn {
  gap: 0.4rem;
  flex-shrink: 0;
}

.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface-alt);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  color: var(--color-text-muted);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
  color: var(--color-text-secondary);
}

.upload-dropzone svg {
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.upload-dropzone-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.upload-browse-link {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-dropzone-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}

.upload-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.upload-file-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.upload-file-name {
  flex: 1;
  font-weight: 500;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-size {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.upload-file-remove {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  padding: 0 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  line-height: 1;
}

.upload-file-remove:hover {
  color: var(--color-red);
  background: rgba(239, 68, 68, 0.08);
}

.upload-progress {
  margin-top: 1rem;
}

.upload-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.upload-progress-text {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  text-align: center;
}

/* ─── Status Filters ─────────────────────────────────────────────────────── */
.status-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text-primary);
}

.filter-btn.active {
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-color: var(--color-accent);
}

.filter-btn .filter-count {
  margin-left: 0.4rem;
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ─── Report Button in Published List ──────────────────────────────────── */
.published-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.report-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.report-btn--has-report {
  border-color: var(--color-green);
  color: var(--color-green);
}

.brief-link-btn,
.rush-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  font-size: 0.75rem;
  white-space: nowrap;
}

.rush-link-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.rush-edit-btn {
  padding: 0.25rem !important;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}
.rush-edit-btn:hover { opacity: 1; }
.rush-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  background: var(--color-surface-solid, #fff);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 10px);
  padding: 0.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rush-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg, #f5f5f0);
}
.rush-input:focus { outline: none; border-color: var(--color-text); }
.rush-popover-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* ─── Report Modal Content ──────────────────────────────────────────────── */
#reportModalContent .doc-content {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

#reportModalContent .doc-content h1 { font-size: 1.3rem; margin: 1rem 0 0.5rem; }
#reportModalContent .doc-content h2 { font-size: 1.1rem; margin: 0.8rem 0 0.4rem; }
#reportModalContent .doc-content h3 { font-size: 1rem; margin: 0.6rem 0 0.3rem; }
#reportModalContent .doc-content p { margin-bottom: 0.5rem; line-height: 1.6; }
#reportModalContent .doc-content table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
#reportModalContent .doc-content th, #reportModalContent .doc-content td {
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  font-size: 0.85rem;
}

#reportModalContent .empty-state { padding: 2rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   ANALYSE VIDÉO — Card Layout (Veille Level Up)
   ═══════════════════════════════════════════════════════════════════════════ */
.veille-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.veille-card {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.veille-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.7);
}

.veille-card-row {
  display: grid;
  grid-template-columns: 90px 150px 1fr 140px;
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem 1.5rem;
}

/* ─── Profile column ─── */
.veille-card-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.veille-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.veille-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.veille-card-youtuber {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.veille-card-yt-link {
  font-size: 0.68rem;
  color: var(--color-red);
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.veille-card-yt-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* ─── Badges column ─── */
.veille-card-badges {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.veille-badge-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.veille-badge-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding-left: 0.15rem;
}

.veille-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  width: fit-content;
}

.veille-badge--niche {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.veille-badge--format {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.veille-badge--type {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

/* ─── Content column (thumb + meta) ─── */
.veille-card-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: 0;
}

.veille-card-thumb {
  width: 200px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-alt);
}

.veille-card-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.veille-card-no-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  opacity: 0.3;
}

.veille-card-meta {
  flex: 1;
  min-width: 0;
}

.veille-card-title {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--color-text);
  line-height: var(--leading-snug);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.veille-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.veille-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.veille-stat svg {
  opacity: 0.5;
  flex-shrink: 0;
}

.veille-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.veille-tag {
  padding: 0.12rem 0.5rem;
  background: var(--color-accent-subtle);
  color: #5a7a00;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
}

/* ─── Actions column ─── */
.veille-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.veille-expand-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.veille-expand-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
  background: var(--color-accent-subtle);
}

.veille-expand-btn.active {
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-color: var(--color-accent);
}

/* ─── Expandable panels ─── */
.veille-card-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease-out;
  padding: 0 1.5rem;
}

.veille-card-expand.open {
  max-height: 500px;
  padding: 1rem 1.5rem 1.2rem;
  border-top: 1px solid var(--color-border-light);
  overflow-y: auto;
}

.veille-card-expand-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.veille-card-expand p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── Responsive for veille cards (handled in main RESPONSIVE section) ─── */

/* ─── Inline Images in Docs ──────────────────────────────────────────────── */
.doc-inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 0.8rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INTELLIGENCE VIEW (LUS Brain)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Sub-tabs ───────────────────────────────────────────────────────────── */
.intel-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-lg);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.intel-tab {
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.intel-tab:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.intel-tab.active {
  background: var(--color-surface-solid);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ─── Panels ─────────────────────────────────────────────────────────────── */
.intel-panel {
  display: none;
}

.intel-panel.active {
  display: block;
}

/* ─── KPI Grid ───────────────────────────────────────────────────────────── */
.intel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.intel-kpi {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.5);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.intel-kpi-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

.intel-kpi-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ─── Sections ───────────────────────────────────────────────────────────── */
.intel-section {
  margin-bottom: 2rem;
}

.intel-section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

.intel-section-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  line-height: var(--leading-normal);
}

.intel-dual-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ─── AI Insights Banner ─────────────────────────────────────────────────── */
.intel-insights-banner {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.intel-insights-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.intel-insights-header h3 {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--color-accent);
  letter-spacing: -0.01em;
}

.intel-insights-header svg {
  color: var(--color-accent);
}

.intel-insights-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.intel-insight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.5;
}

.intel-insight-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(200, 255, 0, 0.15);
}

.intel-insight-text {
  flex: 1;
}

.intel-insight-text strong {
  color: var(--color-accent);
}

/* ─── Dimension Distribution Grid ────────────────────────────────────────── */
.intel-dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.intel-dim-card {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.5);
}

.intel-dim-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}

/* ─── Distribution Bars ──────────────────────────────────────────────────── */
.intel-distrib-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.intel-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.intel-bar-label {
  width: 120px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: capitalize;
  flex-shrink: 0;
  text-align: right;
}

.intel-bar-track {
  flex: 1;
  height: 24px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.intel-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #c8ff00, #a8e600);
  transition: width 0.4s ease;
  min-width: 2px;
}

.intel-bar-fill--blue { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.intel-bar-fill--green { background: linear-gradient(90deg, #22c55e, #16a34a); }
.intel-bar-fill--orange { background: linear-gradient(90deg, #f59e0b, #d97706); }
.intel-bar-fill--red { background: linear-gradient(90deg, #ef4444, #dc2626); }
.intel-bar-fill--purple { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }

.intel-bar-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 120px;
  flex-shrink: 0;
}

.intel-bar-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.intel-bar-outlier {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Compare Grid (Bangers vs Flops) ────────────────────────────────────── */
.intel-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.intel-compare-col {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.intel-compare-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid;
  font-size: 0.85rem;
  font-weight: 700;
}

.intel-compare-header--banger { border-color: var(--color-green); color: #16a34a; }
.intel-compare-header--flop { border-color: var(--color-red); color: #dc2626; }

.intel-compare-count {
  font-size: var(--text-xl);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
}

.intel-compare-dim {
  margin-bottom: 0.75rem;
}

.intel-compare-dim-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  letter-spacing: 0.03em;
}

.intel-compare-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.intel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.intel-chip-count {
  font-weight: 400;
  color: var(--text-secondary);
}

/* ─── Top Combos ─────────────────────────────────────────────────────────── */
.intel-combos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.intel-combo-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.intel-combo-rank {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-secondary);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.intel-combo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex: 1;
}

.intel-combo-tag {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

.intel-combo-tag--emotion { background: #fef3c7; color: #92400e; }
.intel-combo-tag--hook { background: #dbeafe; color: #1e40af; }
.intel-combo-tag--bias { background: #f3e8ff; color: #6b21a8; }

.intel-combo-stats {
  text-align: right;
  flex-shrink: 0;
}

.intel-combo-outlier {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.intel-combo-count {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ─── Video List ─────────────────────────────────────────────────────────── */
.intel-video-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.intel-video-row {
  display: grid;
  grid-template-columns: 80px 1fr 80px 80px 80px;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--color-surface-solid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  font-size: 0.82rem;
  transition: box-shadow 0.15s;
}

.intel-video-row:hover {
  box-shadow: var(--shadow-md);
}

.intel-video-thumb {
  width: 80px;
  height: 45px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: rgba(0, 0, 0, 0.06);
}

.intel-video-title {
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.intel-video-channel {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.intel-video-metric {
  text-align: right;
  font-weight: 700;
}

.intel-video-metric-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* ─── Hook Cards ─────────────────────────────────────────────────────────── */
.intel-hook-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intel-hook-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--color-accent);
}

.intel-hook-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.intel-hook-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.intel-hook-card-badges {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.intel-hook-transcript {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  font-style: italic;
  margin-top: 0.5rem;
}

.intel-hook-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ─── Structure Grid ─────────────────────────────────────────────────────── */
.intel-struct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.intel-struct-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.intel-struct-name {
  font-size: var(--text-md);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  text-transform: capitalize;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.intel-struct-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.intel-struct-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.intel-struct-metric {
  text-align: center;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-sm);
}

.intel-struct-metric-value {
  display: block;
  font-size: var(--text-md);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
}

.intel-struct-metric-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.intel-struct-examples {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.intel-struct-example {
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: space-between;
}

/* ─── Stat Cards (Open Loops, Belief Breaking) ───────────────────────────── */
.intel-stat-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.intel-stat-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.intel-stat-block {
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.02);
}

.intel-stat-block-value {
  display: block;
  font-size: var(--text-xl);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
}

.intel-stat-block-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.intel-stat-block--positive .intel-stat-block-value { color: #16a34a; }
.intel-stat-block--negative .intel-stat-block-value { color: #dc2626; }

/* ─── CTA Grid ───────────────────────────────────────────────────────────── */
.intel-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.intel-cta-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.intel-cta-name {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 0.25rem;
}

.intel-cta-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.intel-cta-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
}

.intel-cta-stat-value {
  font-weight: 800;
}

/* ─── Impact Grid ────────────────────────────────────────────────────────── */
.intel-impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.intel-impact-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.intel-impact-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.intel-impact-badge--positive { background: #dcfce7; color: #16a34a; }
.intel-impact-badge--negative { background: #fee2e2; color: #dc2626; }

.intel-impact-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.intel-impact-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ─── Thumbnail Grid ─────────────────────────────────────────────────────── */
.intel-thumb-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.intel-thumb-compare-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid;
}

.intel-thumb-compare-title--top { border-color: var(--color-green); color: #16a34a; }
.intel-thumb-compare-title--bottom { border-color: var(--color-red); color: #dc2626; }

.intel-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.intel-thumb-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: rgba(0, 0, 0, 0.06);
}

.intel-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intel-thumb-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.intel-thumb-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.intel-thumb-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.intel-thumb-filter-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--color-surface-solid);
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.intel-thumb-filter-btn.active {
  background: var(--color-text);
  color: var(--color-surface-solid);
  border-color: var(--color-text);
}

/* ─── Formulas (Titles) ──────────────────────────────────────────────────── */
.intel-formulas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.intel-formula-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.intel-formula-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.intel-formula-name {
  font-size: var(--text-base);
  font-weight: var(--font-extrabold);
  text-transform: capitalize;
  letter-spacing: -0.01em;
}

.intel-formula-outlier {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-accent);
  background: #1e293b;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.intel-formula-examples {
  font-size: 0.78rem;
}

.intel-formula-example {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.intel-formula-example-title {
  flex: 1;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.intel-formula-example-outlier {
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* ─── Title List ─────────────────────────────────────────────────────────── */
.intel-title-search {
  margin-bottom: 1rem;
}

.intel-title-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.intel-title-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 80px 80px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  background: var(--color-surface-solid);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  box-shadow: var(--shadow-xs);
}

/* ─── Recipes (Ideation) ─────────────────────────────────────────────────── */
.intel-recipes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intel-recipe-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-accent);
}

.intel-recipe-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.intel-recipe-emoji {
  font-size: 1.5rem;
}

.intel-recipe-name {
  font-size: var(--text-lg);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.01em;
}

.intel-recipe-outlier {
  margin-left: auto;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-accent);
  background: #1e293b;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
}

.intel-recipe-tags {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.intel-recipe-instruction {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.intel-recipe-examples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.intel-recipe-example {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
}

.intel-recipe-example img {
  width: 60px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.intel-recipe-example-info {
  flex: 1;
  min-width: 0;
}

.intel-recipe-example-title {
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.intel-recipe-example-views {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

/* ─── Gaps (Ideation) ────────────────────────────────────────────────────── */
.intel-gaps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.intel-gap-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--color-orange);
}

.intel-gap-tags {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.intel-gap-predicted {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.intel-gap-suggestion {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ─── Objectives (Ideation) ──────────────────────────────────────────────── */
.intel-objectives {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intel-obj-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.intel-obj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.intel-obj-name {
  font-size: var(--text-md);
  font-weight: var(--font-extrabold);
  text-transform: capitalize;
  letter-spacing: -0.01em;
}

.intel-obj-recommendation {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.intel-obj-profile {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.intel-obj-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

/* ─── Trends (Ideation) ──────────────────────────────────────────────────── */
.intel-trends {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.intel-trend-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.intel-trend-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 0.75rem;
}

.intel-trend-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 0;
  font-size: 0.78rem;
}

.intel-trend-value {
  font-weight: 600;
  width: 100px;
  text-transform: capitalize;
}

.intel-trend-delta {
  font-weight: 800;
  font-size: 0.82rem;
}

.intel-trend-delta--up { color: #16a34a; }
.intel-trend-delta--down { color: #dc2626; }

.intel-trend-bar {
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 3px;
  overflow: hidden;
}

.intel-trend-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.intel-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.intel-page-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--color-surface-solid);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.intel-page-btn:hover { background: rgba(0, 0, 0, 0.04); }
.intel-page-btn.active { background: var(--color-text); color: var(--color-surface-solid); border-color: var(--color-text); }

.intel-page-info {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ─── Loading ────────────────────────────────────────────────────────────── */
.intel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .intel-compare-grid,
  .intel-dual-section,
  .intel-thumb-compare {
    grid-template-columns: 1fr;
  }
  .intel-video-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .intel-video-thumb { display: none; }
  .intel-title-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ─── Hub Navigation Cards (2x2 Grid) ──────────────────────────────────── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1.5rem;
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal), border-color var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-accent);
}

.hub-card-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.hub-card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

@media (max-width: 640px) {
  .hub-grid {
    gap: 0.75rem;
  }
  .hub-card {
    padding: 1.5rem 1rem;
  }
  .hub-card-icon {
    font-size: 2rem;
  }
  .hub-card-title {
    font-size: 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRACKER — Channel tracking + Video feed
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Tracker Tabs ─── */
.tracker-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
  width: fit-content;
}

.tracker-tab {
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.tracker-tab:hover {
  color: var(--color-text);
}

.tracker-tab.active {
  background: var(--color-accent);
  color: var(--color-accent-text);
  box-shadow: var(--shadow-sm);
}

/* ─── Tracker Panels ─── */
.tracker-panel {
  display: none;
}

.tracker-panel.active {
  display: block;
}

/* ─── Toolbar ─── */
.tracker-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.tracker-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* ─── Channel Grid ─── */
/* ─── Channel Row (horizontal scroll, 1of10 style) ─── */
.tracker-channel-grid {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.tracker-channel-grid::-webkit-scrollbar {
  height: 4px;
}

.tracker-channel-grid::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.tracker-ch-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  white-space: nowrap;
  flex-shrink: 0;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.tracker-ch-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(200, 255, 0, 0.4);
}

.tracker-ch-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  min-height: 36px;
  max-height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
}

.tracker-ch-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tracker-ch-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.tracker-ch-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.tracker-ch-subs {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.tracker-ch-remove {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.tracker-ch-card:hover .tracker-ch-remove {
  opacity: 1;
}

.tracker-ch-remove:hover {
  background: var(--color-red);
  color: #fff;
}

/* ─── Feed Toolbar ─── */
/* ─── Feed Toolbar & Grid — overridden by admin.html inline styles ─── */
.tracker-feed-loading {
  display: flex;
  justify-content: center;
  padding: 3rem 0;
}

/* ─── Add Channel Modal ─── */
.add-channel-search {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.add-channel-search .input {
  flex: 1;
}

.add-channel-results {
  max-height: 400px;
  overflow-y: auto;
}

.add-channel-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 1rem;
  color: var(--color-text-muted);
  text-align: center;
}

.add-channel-hint p {
  font-size: 0.85rem;
}

.add-channel-loading {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.add-channel-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.add-channel-item:hover {
  background: var(--color-surface-alt);
  border-color: rgba(200, 255, 0, 0.3);
}

.add-channel-item--tracked {
  opacity: 0.5;
}

.add-channel-item .btn,
.add-channel-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.add-channel-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  min-height: 48px;
  max-height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  overflow: hidden;
}

.add-channel-niches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.add-channel-niche {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.add-channel-info {
  flex: 1;
  min-width: 0;
}

.add-channel-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.add-channel-subs {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.add-channel-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-accent-text);
  background: var(--color-accent);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ─── Tracker Responsive — overridden by admin.html inline styles ─── */

@media (max-width: 480px) {
  .tf-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ Toast Notifications ═══ */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  max-width: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.removing {
  opacity: 0;
  transform: translateX(100%);
}

.toast--error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.toast--success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.toast--warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.toast--info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.5;
  color: inherit;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.toast-close:hover { opacity: 1; }

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ═══ Skeleton Loaders ═══ */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 0.9rem;
  margin-bottom: 0.5rem;
  width: 80%;
}

.skeleton-text:last-child { width: 60%; }

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-md);
}

@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ═══ Client Tracker (Veille concurrents) ═══ */
.ct-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0.75rem 0; margin-bottom: 1rem; flex-wrap: wrap;
}
.ct-toolbar-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.ct-toolbar-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.ct-search-wrap { position: relative; max-width: 280px; flex: 1; }
.ct-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--color-text-muted); pointer-events: none;
}
.ct-search {
  width: 100%; padding: 7px 10px 7px 34px;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--color-text); background: var(--color-surface-solid);
  font-family: inherit; transition: border-color 0.15s;
}
.ct-search::placeholder { color: var(--color-text-muted); }
.ct-search:focus { outline: none; border-color: var(--color-accent); }

.ct-channel-select {
  padding: 7px 30px 7px 10px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--color-text);
  background: var(--color-surface-solid); font-family: inherit; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: border-color 0.15s;
}
.ct-channel-select:focus { outline: none; border-color: var(--color-accent); }

.ct-count { font-size: 12px; color: var(--color-text-secondary); white-space: nowrap; }

.ct-sort-group {
  display: flex; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.ct-sort-btn {
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  background: transparent; border: none; color: var(--color-text-muted);
  cursor: pointer; font-family: inherit; transition: color var(--transition-fast), background var(--transition-fast);
}
.ct-sort-btn:hover { color: var(--color-text); }
.ct-sort-btn.active { color: var(--color-text); background: var(--color-accent); }

.ct-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (min-width: 1400px) { .ct-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1100px) { .ct-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .ct-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .ct-grid { grid-template-columns: 1fr; } }

.ct-grid .empty-state { grid-column: 1 / -1; }

.ct-card {
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius-md); overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  cursor: pointer; text-decoration: none; display: block; color: inherit;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.5);
}
.ct-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--color-border); }

.ct-thumb { position: relative; width: 100%; aspect-ratio: 16/9; background: var(--color-bg); overflow: hidden; }
.ct-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-dur {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.8); color: #fff;
  font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px;
}
.ct-outlier {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: -0.02em;
}
.ct-outlier--high { background: #16a34a; color: #fff; }
.ct-outlier--mid { background: #ca8a04; color: #fff; }
.ct-outlier--low { background: #dc2626; color: #fff; }

.ct-body { padding: 10px 12px 12px; }
.ct-title {
  font-size: 13px; font-weight: 600; color: var(--color-text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 6px;
}
.ct-channel-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.ct-channel-name { font-size: 11px; color: var(--color-text-secondary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-channel-subs { font-size: 10px; color: var(--color-text-muted); white-space: nowrap; }
.ct-stats { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--color-text-secondary); flex-wrap: wrap; }
.ct-views { font-weight: 600; color: var(--color-text); }
.ct-vs-avg { color: var(--color-text-muted); }
.ct-time { color: var(--color-text-muted); }
.ct-rank {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 700; background: var(--color-bg); color: var(--color-text-secondary);
}
.ct-rank--top { background: var(--color-accent); color: var(--color-text); }

.ct-pagination {
  display: flex; justify-content: center; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem; padding: 0.5rem 0;
}
.ct-pagination button {
  padding: 0.4rem 0.8rem; border-radius: 6px;
  border: 1px solid var(--color-border); background: var(--color-surface-solid);
  color: var(--color-text); cursor: pointer; font-size: 0.8rem;
  font-family: inherit; transition: border-color var(--transition-fast), background var(--transition-fast);
}
.ct-pagination button:hover { border-color: var(--color-accent); background: var(--color-accent-subtle); }
.ct-pagination .ct-page-info { font-size: 0.82rem; color: var(--color-text-secondary); }

@media (max-width: 768px) {
  .ct-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .ct-search-wrap { max-width: 100%; }
  .ct-channel-select { width: 100%; }
}

/* ═══ Video Detail (shared with admin) ═══ */
.vd-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--color-text-secondary);
  cursor: pointer; margin-bottom: 1.25rem; transition: color var(--transition-fast), gap var(--transition-fast);
  background: none; border: none; padding: 4px 0;
}
.vd-back:hover { color: var(--color-text); gap: 8px; }

/* ── Header ── */
.vd-header {
  display: flex; gap: 1.5rem; margin-bottom: 1.25rem;
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg); padding: 1.5rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.5);
}
.vd-thumb-wrap {
  flex-shrink: 0; width: 440px; aspect-ratio: 16/9;
  border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.vd-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.vd-header-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.vd-video-title { font-size: var(--text-xl); font-weight: var(--font-extrabold); color: var(--color-text); line-height: var(--leading-snug); letter-spacing: -0.01em; }
.vd-channel-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-secondary); }
.vd-channel-name { font-weight: 600; color: var(--color-text-secondary); }
.vd-date { font-size: 12px; color: var(--color-text-muted); }

/* ── Global Score Circle ── */
.vd-global-score {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex-shrink: 0; margin-left: auto;
}
.vd-score-circle { position: relative; width: 90px; height: 90px; }
.vd-score-circle svg { transform: rotate(-90deg); }
.vd-score-circle-bg { fill: none; stroke: var(--color-bg); stroke-width: 6; }
.vd-score-circle-fill { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.vd-score-circle-text {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: var(--text-2xl); font-weight: var(--font-extrabold); color: var(--color-text); letter-spacing: -0.02em;
}
.vd-score-circle-label { font-size: var(--text-xs); font-weight: var(--font-semibold); color: var(--color-text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.vd-score-circle-fill { animation: scoreFill 1s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.3s; }
@keyframes scoreFill { from { stroke-dashoffset: 283; } }

/* ── Score Cards row ── */
.vd-scores {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.vd-score-card {
  background: var(--color-surface-solid); border-radius: 14px; padding: 1rem 1.25rem;
  border: 1px solid var(--color-border); text-align: center;
  box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
}
.vd-score-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.vd-score-card--views::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.vd-score-card--engage::before { background: linear-gradient(90deg, #c8ff00, #a3e635); }
.vd-score-card--outlier::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.vd-score-card--viral::before { background: linear-gradient(90deg, #ec4899, #f472b6); }
.vd-score-label { font-size: 11px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.vd-score-value { font-size: var(--text-2xl); font-weight: var(--font-extrabold); color: var(--color-text); margin: 4px 0 2px; line-height: var(--leading-tight); letter-spacing: -0.02em; }
.vd-score-sub { font-size: 11px; color: var(--color-text-muted); }

/* ── Gauge bar (mini) ── */
.vd-gauge { height: 6px; border-radius: 3px; background: var(--color-bg); margin-top: 8px; overflow: hidden; }
.vd-gauge-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

/* ── Mini stat badges ── */
.vd-mini-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.5rem; }
.vd-mini-stat {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-xl);
  font-size: 12px; font-weight: 600; background: var(--color-bg); color: var(--color-text-secondary);
}
.vd-mini-stat svg { width: 13px; height: 13px; opacity: 0.5; }

/* ── Sections ── */
.vd-section {
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg); padding: 1.5rem;
  border: 1px solid var(--glass-border); margin-bottom: 1rem;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.5);
}
.vd-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--color-text); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 1.25rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-bg);
}
.vd-section-icon {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vd-section-icon svg { width: 15px; height: 15px; }
.vd-section-icon--script { background: #dbeafe; color: #2563eb; }
.vd-section-icon--pack { background: #fce7f3; color: #db2777; }
.vd-section-icon--strat { background: #d1fae5; color: #059669; }

/* ── Grid fields ── */
.vd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.vd-field {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0.75rem; border-radius: 10px; background: var(--color-bg);
  border: 1px solid var(--color-bg); transition: border-color 0.15s;
}
.vd-field:hover { border-color: var(--color-border); }
.vd-field-label { font-size: 10px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.vd-field-value { font-size: 14px; font-weight: 600; color: var(--color-text); }
.vd-field-value--muted { color: #d1d5db; font-weight: 400; }

/* ── Colored Pills ── */
.vd-pill {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; line-height: 1.4;
}
.vd-pill--blue { background: #dbeafe; color: #1e40af; }
.vd-pill--green { background: #d1fae5; color: #065f46; }
.vd-pill--amber { background: #fef3c7; color: #92400e; }
.vd-pill--rose { background: #fce7f3; color: #9d174d; }
.vd-pill--purple { background: #ede9fe; color: #5b21b6; }
.vd-pill--cyan { background: #cffafe; color: #155e75; }
.vd-pill--orange { background: #ffedd5; color: #9a3412; }
.vd-pill--lime { background: #ecfccb; color: #3f6212; }
.vd-pill--gray { background: var(--color-bg); color: var(--color-text-secondary); }
.vd-pill--red { background: #fee2e2; color: #991b1b; }
.vd-pill--teal { background: #ccfbf1; color: #115e59; }
.vd-pill--yes { background: #d1fae5; color: #065f46; }
.vd-pill--no { background: var(--color-bg); color: var(--color-text-muted); }

/* ── Number highlight ── */
.vd-num {
  font-size: var(--text-2xl); font-weight: var(--font-extrabold); color: var(--color-text); line-height: var(--leading-tight); letter-spacing: -0.02em;
}

/* ── Copy button ── */
.vd-copyable { position: relative; }
.vd-copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,0.85); border: 1px solid var(--color-border);
  border-radius: 6px; padding: 4px 6px; cursor: pointer;
  font-size: 14px; line-height: 1; opacity: 0.4;
  transition: opacity 0.15s, background 0.15s;
  backdrop-filter: blur(4px);
}
.vd-copyable:hover .vd-copy-btn { opacity: 1; }
.vd-copy-btn:hover { background: var(--color-surface-solid); border-color: var(--color-accent); }
.vd-copy-btn--ok { opacity: 1; border-color: var(--color-green); }

/* ── Hook transcript ── */
.vd-hook-transcript {
  background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
  border-left: 3px solid var(--color-accent); padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 13px;
  color: var(--color-text-secondary); line-height: 1.7; font-style: italic;
  margin-bottom: 1.25rem; max-height: 200px; overflow-y: auto;
}
.vd-hook-transcript::-webkit-scrollbar { width: 4px; }
.vd-hook-transcript::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

/* ── Text blocks ── */
.vd-text-block {
  background: var(--color-bg); border-radius: 10px; padding: 0.75rem 1rem;
  font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; margin-top: 0.75rem;
  border: 1px solid var(--color-bg);
}
.vd-text-block strong { color: var(--color-text); }

/* ── Retention badge ── */
.vd-retention {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 13px;
}
.vd-retention--high { background: linear-gradient(135deg, #d1fae5, #ecfccb); color: #065f46; }
.vd-retention--medium { background: linear-gradient(135deg, #fef3c7, #ffedd5); color: #92400e; }
.vd-retention--low { background: linear-gradient(135deg, #fee2e2, #fce7f3); color: #991b1b; }

/* ── Subsection divider ── */
.vd-sub {
  font-size: 11px; font-weight: 700; color: var(--color-text-secondary); text-transform: uppercase;
  letter-spacing: 0.05em; padding: 6px 12px; border-radius: 6px;
  background: var(--color-bg); display: inline-block; margin-bottom: 0.75rem;
}

/* ── Color swatch ── */
.vd-color-swatch {
  display: inline-flex; align-items: center; gap: 6px;
}
.vd-color-dot {
  width: 18px; height: 18px; border-radius: 6px;
  display: inline-block; border: 2px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ── Takeaway cards ── */
.vd-takeaways { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.vd-takeaway {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0.75rem 1rem; border-radius: 10px; font-size: 13px; line-height: 1.5;
  border: 1px solid var(--color-bg);
}
.vd-takeaway-icon {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 13px;
}
.vd-takeaway--retention { background: #f0fdf4; }
.vd-takeaway--retention .vd-takeaway-icon { background: #d1fae5; }
.vd-takeaway--insight { background: #eff6ff; }
.vd-takeaway--insight .vd-takeaway-icon { background: #dbeafe; }
.vd-takeaway--thesis { background: #fdf4ff; }
.vd-takeaway--thesis .vd-takeaway-icon { background: #f3e8ff; }

/* ── Collapsible transcript ── */
.vd-collapse-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--color-text-secondary);
  cursor: pointer; transition: background var(--transition-fast), border-color var(--transition-fast);
}
.vd-collapse-btn:hover { background: var(--color-bg); border-color: var(--color-accent); }
.vd-collapse-body {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
}
.vd-collapse-body.open { max-height: 500px; overflow-y: auto; }
.vd-collapse-body::-webkit-scrollbar { width: 4px; }
.vd-collapse-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.vd-transcript-text {
  margin-top: 1rem; font-size: 13px; line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ── YouTube button ── */
.vd-youtube-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, #c8ff00, #a3e635); color: var(--color-text); font-weight: 700;
  font-size: 14px; text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 2px 8px rgba(200,255,0,0.3);
}
.vd-youtube-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,255,0,0.4); }

.vd-footer {
  text-align: center; margin-top: 1.5rem; padding-bottom: 1rem;
}

/* ── Two-col layout ── */
.vd-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }

@media (max-width: 900px) {
  .vd-header { flex-direction: column; }
  .vd-thumb-wrap { width: 100%; }
  .vd-scores { grid-template-columns: repeat(2, 1fr); }
  .vd-grid { grid-template-columns: repeat(2, 1fr); }
  .vd-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .vd-scores { grid-template-columns: 1fr 1fr; }
  .vd-grid { grid-template-columns: 1fr; }
}
