/* ==========================================================================
   YouTube Studio Pro - Multi-Channel Monitoring & Monetization Tracker
   Aesthetic: Dark Obsidian Glassmorphism, YouTube Crimson & Emerald Glow
   ========================================================================== */

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

:root {
  /* Color Palette */
  --bg-deep: #080b12;
  --bg-surface: #0e1524;
  --bg-card: rgba(17, 26, 44, 0.72);
  --bg-card-hover: rgba(23, 34, 58, 0.85);
  --bg-glass: rgba(14, 21, 36, 0.65);
  --bg-input: rgba(10, 16, 28, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-active: rgba(255, 0, 51, 0.4);

  /* Accents */
  --yt-red: #ff0033;
  --yt-red-hover: #ff2a54;
  --yt-red-glow: rgba(255, 0, 51, 0.35);

  --status-monetized: #10b981;
  --status-monetized-bg: rgba(16, 185, 129, 0.12);
  --status-monetized-border: rgba(16, 185, 129, 0.3);
  --status-monetized-glow: rgba(16, 185, 129, 0.35);

  --status-eligible: #f59e0b;
  --status-eligible-bg: rgba(245, 158, 11, 0.14);
  --status-eligible-border: rgba(245, 158, 11, 0.38);
  --status-eligible-glow: rgba(245, 158, 11, 0.35);

  --status-progress: #3b82f6;
  --status-progress-bg: rgba(59, 130, 246, 0.12);
  --status-progress-border: rgba(59, 130, 246, 0.3);
  --status-progress-glow: rgba(59, 130, 246, 0.3);

  --status-growing: #94a3b8;
  --status-growing-bg: rgba(148, 163, 184, 0.1);
  --status-growing-border: rgba(148, 163, 184, 0.2);

  /* Typography */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Dimensions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.15s ease;
  --trans-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-deep: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-input: #ffffff;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.18);
  --border-active: rgba(255, 0, 51, 0.5);
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 0, 51, 0.12), transparent),
    radial-gradient(circle at 100% 30%, rgba(59, 130, 246, 0.06), transparent 35%),
    radial-gradient(circle at 0% 70%, rgba(16, 185, 129, 0.05), transparent 40%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Layout Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px 80px;
}

/* Header & Top Bar */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  gap: 16px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ff0033 0%, #b80024 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px var(--yt-red-glow);
  color: #fff;
  flex-shrink: 0;
}

.brand-logo-icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.pro-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  background: linear-gradient(90deg, var(--yt-red), #ff5e00);
  color: white;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.brand-text p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 2px;
}

.header-right-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Dedicated Action Toolbar */
.action-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  gap: 14px;
}

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

.toolbar-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.db-status-pill.online {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.db-status-pill.local {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--trans-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--yt-red) 0%, #d60029 100%);
  color: white;
  box-shadow: 0 4px 16px var(--yt-red-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--yt-red-hover) 0%, #e6002c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--yt-red-glow);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 4px 16px var(--status-eligible-glow);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-icon-only {
  padding: 10px;
  width: 40px;
  height: 40px;
  justify-content: center;
}

/* KPI Hero Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform var(--trans-normal), border-color var(--trans-normal), box-shadow var(--trans-normal);
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

.kpi-card.kpi-total::before { background: linear-gradient(90deg, #6366f1, #3b82f6); }
.kpi-card.kpi-monetized::before { background: linear-gradient(90deg, #10b981, #059669); }
.kpi-card.kpi-eligible::before { background: linear-gradient(90deg, #f59e0b, #eab308); }
.kpi-card.kpi-progress::before { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.kpi-card.kpi-hours::before { background: linear-gradient(90deg, var(--yt-red), #f97316); }

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

.kpi-title {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

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

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
  line-height: 1.1;
}

.kpi-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-subtext .highlight {
  font-weight: 600;
}

.text-monetized { color: var(--status-monetized); }
.text-eligible { color: var(--status-eligible); }
.text-progress { color: var(--status-progress); }
.text-red { color: var(--yt-red); }

/* Milestone Spotlight Banner */
.milestone-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(255, 0, 51, 0.08) 50%, rgba(14, 21, 36, 0.85) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.1);
  position: relative;
  overflow: hidden;
}

.milestone-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25), transparent 70%);
  pointer-events: none;
}

.milestone-info {
  display: flex;
  align-items: center;
  gap: 18px;
}

.milestone-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #101522;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--status-eligible-glow);
  flex-shrink: 0;
}

.milestone-badge-icon svg {
  width: 26px;
  height: 26px;
}

.milestone-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--text-main);
}

.milestone-text p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.milestone-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Control Toolbar & Filters */
.toolbar-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.filter-tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tabs-group {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  max-width: 100%;
}

.tab-btn {
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--trans-fast);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

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

.tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.tab-btn .badge-pill {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
}

.tab-btn.active .badge-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-mode-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
}

.view-toggle-btn:hover {
  color: var(--text-main);
}

.view-toggle-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-main);
}

/* Search & Secondary Filter Row */
.filter-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.search-input:focus {
  outline: none;
  border-color: rgba(255, 0, 51, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 0, 51, 0.15);
}

.select-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-select {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--trans-fast);
}

.custom-select:focus {
  border-color: rgba(255, 0, 51, 0.5);
}

.custom-select option {
  background: var(--bg-surface);
  color: var(--text-main);
}

/* ==========================================================================
   CHANNEL GRID VIEW
   ========================================================================== */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 22px;
}

.channel-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--trans-smooth);
}

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

/* Specific status accent borders on cards */
.channel-card.status-monetized {
  border-left: 4px solid var(--status-monetized);
}
.channel-card.status-eligible {
  border-left: 4px solid var(--status-eligible);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-card) 40%);
}
.channel-card.status-in_progress {
  border-left: 4px solid var(--status-progress);
}
.channel-card.status-growing {
  border-left: 4px solid var(--status-growing);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.channel-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.channel-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  background: #1c273c;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

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

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: white;
}

.status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

.status-dot.dot-monetized { background: var(--status-monetized); box-shadow: 0 0 8px var(--status-monetized); }
.status-dot.dot-eligible { background: var(--status-eligible); box-shadow: 0 0 8px var(--status-eligible); }
.status-dot.dot-in_progress { background: var(--status-progress); }
.status-dot.dot-growing { background: var(--status-growing); }

.channel-title-group h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.channel-sub-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.channel-handle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.niche-tag {
  font-size: 0.7rem;
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-status.badge-monetized {
  background: var(--status-monetized-bg);
  border: 1px solid var(--status-monetized-border);
  color: var(--status-monetized);
  box-shadow: 0 0 12px var(--status-monetized-glow);
}

.badge-status.badge-eligible {
  background: var(--status-eligible-bg);
  border: 1px solid var(--status-eligible-border);
  color: var(--status-eligible);
  box-shadow: 0 0 12px var(--status-eligible-glow);
  animation: pulseAmber 2.5s infinite;
}

@keyframes pulseAmber {
  0% { box-shadow: 0 0 6px var(--status-eligible-glow); }
  50% { box-shadow: 0 0 16px var(--status-eligible-glow); }
  100% { box-shadow: 0 0 6px var(--status-eligible-glow); }
}

.badge-status.badge-in_progress {
  background: var(--status-progress-bg);
  border: 1px solid var(--status-progress-border);
  color: var(--status-progress);
}

.badge-status.badge-growing {
  background: var(--status-growing-bg);
  border: 1px solid var(--status-growing-border);
  color: var(--text-secondary);
}

/* Card Body: Metrics & Progress Meters */
.card-body {
  margin-bottom: 18px;
}

/* Mini stat counter row */
.quick-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(10, 16, 28, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
  text-align: center;
}

.quick-stat-item .stat-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
  font-weight: 500;
}

.quick-stat-item .stat-val {
  font-size: 0.96rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-main);
}

/* Progress Meters Section */
.monetization-meters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meter-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.meter-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.meter-title {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.meter-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.meter-count .current {
  color: var(--text-main);
}

.meter-count .target {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.meter-bar-container {
  height: 9px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.meter-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.fill-hours {
  background: linear-gradient(90deg, #ff0033 0%, #f59e0b 60%, #10b981 100%);
}

.fill-subs {
  background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 70%, #10b981 100%);
}

.fill-monetized {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Sub-text progress note */
.meter-subnote {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Card Footer Actions */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.card-footer .left-action {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-footer .right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Monetized Earnings Banner inside card */
.monetized-revenue-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--status-monetized-bg);
  border: 1px solid var(--status-monetized-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--status-monetized);
  margin-top: 6px;
}

/* ==========================================================================
   TABLE / LIST VIEW
   ========================================================================== */
.table-view-container {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.channel-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.channel-table th {
  background: rgba(10, 16, 28, 0.7);
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.channel-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-secondary);
}

.channel-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

.channel-table .ch-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.table-progress-cell {
  min-width: 160px;
}

.table-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

/* ==========================================================================
   MODAL WINDOWS & BACKDROP
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--trans-smooth);
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #0f1627;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.8);
  transform: translateY(20px) scale(0.97);
  transition: all var(--trans-smooth);
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

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

.modal-header h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 15, 26, 0.5);
}

/* Form Controls in Modal */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color var(--trans-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: rgba(255, 0, 51, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 0, 51, 0.15);
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Quick Update Slider */
.slider-group {
  background: rgba(10, 16, 28, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

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

.slider-val-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.range-input {
  width: 100%;
  accent-color: var(--yt-red);
  cursor: pointer;
}

/* Checklist Cards in Detail Modal */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 16, 28, 0.6);
  border: 1px solid var(--border-subtle);
}

.check-item.passed {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

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

.check-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.check-icon.icon-passed {
  background: var(--status-monetized);
  color: #0b0f19;
}

.check-icon.icon-pending {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.check-text h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.check-text p {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

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

.toast {
  pointer-events: auto;
  background: #141e33;
  border: 1px solid var(--border-hover);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  min-width: 280px;
}

.toast.toast-success {
  border-left: 4px solid var(--status-monetized);
}

.toast.toast-error {
  border-left: 4px solid var(--yt-red);
}

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  grid-column: 1 / -1;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.86rem;
  max-width: 400px;
  margin: 0 auto 18px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .app-container {
    padding: 16px;
  }
  .milestone-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .milestone-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .top-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
  }
  .header-right-zone {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .action-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }
  .toolbar-right {
    width: 100%;
    justify-content: stretch;
  }
  .toolbar-right .btn {
    flex: 1;
    justify-content: center;
  }
  .channel-grid {
    grid-template-columns: 1fr;
  }
  .filter-search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .user-nav-wrap {
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  .user-chip {
    padding: 3px 8px;
    font-size: 0.74rem;
  }
  .quota-pill {
    display: none;
  }
  .toolbar-right {
    flex-direction: column;
  }
  .toolbar-right .btn {
    width: 100%;
  }
}

/* ==========================================================================
   SAAS COMMERCIAL & MULTI-USER STYLES
   ========================================================================== */

/* User Nav Chip */
.user-nav-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 6px;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.user-avatar-initial {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.user-plan-badge.badge-silver {
  background: rgba(147, 197, 253, 0.15);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.3);
}

.user-plan-badge.badge-gold {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.user-plan-badge.badge-platinum {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(168, 85, 247, 0.2));
  color: #e879f9;
  border-color: rgba(232, 121, 249, 0.4);
  box-shadow: 0 0 10px rgba(232, 121, 249, 0.2);
}

.quota-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.quota-pill-bar {
  width: 40px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.quota-pill-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
}

/* Tab Switcher */
.tab-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.pricing-card.popular {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

.pricing-badge-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.pricing-header h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pricing-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pricing-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 16px;
}

.pricing-price span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  flex: 1;
}

.pricing-features li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pricing-features li svg {
  color: #10b981;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Admin Table */
.admin-table-container {
  overflow-x: auto;
  margin-top: 14px;
}

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

.admin-table th, .admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.admin-table th {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 600;
}

.badge-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-tag.tag-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-tag.tag-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.badge-tag.tag-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Quota Modal Callout */
.quota-callout-box {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(249, 115, 22, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
}

