/* ==========================================================================
   Comet Command — Multi-Stream Dashboard Design System
   Mobile-First (Android Phone Priority), Glassmorphic, Accessible
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  
  /* DARK THEME (DEFAULT) */
  --bg-primary: #0A0E1A;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-hover: rgba(255, 255, 255, 0.04);
  --bg-glass: rgba(17, 24, 39, 0.7);
  
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  
  --text-primary: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  
  --accent: #6366F1;
  --accent-light: #818CF8;
  --accent-hover: #4F46E5;
  --accent-glow: rgba(99, 102, 241, 0.25);
  
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #06B6D4;
  --info-bg: rgba(6, 182, 212, 0.15);
  
  /* STREAM PALETTES */
  --stream-tes: #0EA5E9;
  --stream-itch: #F43F5E;
  --stream-kdp: #F59E0B;
  --stream-youtube: #EF4444;
  --stream-promptbase: #8B5CF6;
  --stream-rankforge: #10B981;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.45);
}

/* LIGHT THEME */
[data-theme="light"] {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-hover: rgba(0, 0, 0, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.8);
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  
  --accent: #4F46E5;
  --accent-light: #6366F1;
  --accent-hover: #4338CA;
  --accent-glow: rgba(79, 70, 229, 0.15);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* BASE RESETS */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* LAYOUT STRUCTURE */
.layout-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* MOBILE TOP BAR (<768px) */
.mobile-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-comet-icon {
  font-size: 1.25rem;
  color: var(--accent);
}

.mobile-brand-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.mobile-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-ist-pill {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.mobile-theme-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

/* DESKTOP SIDEBAR (HIDDEN ON MOBILE) */
.desktop-sidebar {
  display: none;
}

/* MAIN VIEWPORT */
.main-viewport {
  flex: 1;
  width: 100%;
  padding-bottom: 80px; /* Space for mobile bottom tabs */
}

.app-content-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* MOBILE BOTTOM TAB BAR */
.mobile-bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: blur(16px);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.bottom-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s ease;
  min-height: 44px;
}

.bottom-tab-item.active {
  color: var(--accent);
}

.bottom-tab-item .tab-icon {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-tab-item .tab-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* DRAWER & OVERLAY */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
  backdrop-filter: blur(4px);
}

.drawer-overlay.visible {
  display: block;
}

.mobile-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 16px 20px 32px 20px;
  z-index: 100;
  transition: bottom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}

.mobile-drawer.open {
  bottom: 0;
}

.drawer-handle-bar {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  margin: 0 auto 12px auto;
}

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

.drawer-title {
  font-size: 1rem;
  font-weight: 600;
}

.btn-close-drawer {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.drawer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 48px;
}

.drawer-nav-link:hover, .drawer-nav-link.active {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.drawer-icon {
  font-size: 1.1rem;
}

.drawer-footer {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   DESKTOP RESPONSIVE BREAKPOINT (>= 768px)
   ========================================================================== */
@media (min-width: 768px) {
  .layout-wrapper {
    flex-direction: row;
  }

  .mobile-top-bar, .mobile-bottom-tabs, .mobile-drawer, .drawer-overlay {
    display: none !important;
  }

  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 250px;
    height: 100vh;
    position: sticky;
    top: 0;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    padding: 20px 16px;
    z-index: 40;
  }

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

  .brand-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: block;
    color: var(--text-primary);
  }

  .brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
  }

  .sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
  }

  .sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
  }

  .sidebar-nav-link:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
  }

  .sidebar-nav-link.active {
    background-color: var(--accent);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 2px 8px var(--accent-glow);
  }

  .sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .sidebar-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .sidebar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ist-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
  }

  .theme-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease;
  }

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

  .main-viewport {
    padding-bottom: 32px;
  }

  .app-content-container {
    padding: 32px;
  }
}

/* ==========================================================================
   PAGE HEADERS & TYPOGRAPHY
   ========================================================================== */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .page-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.header-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.time-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-light);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.status-pill.live {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-bg);
}

.status-pill.warning {
  border-color: var(--warning);
  color: var(--warning);
  background: var(--warning-bg);
}

.status-pill.idle {
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.status-dot.live {
  background-color: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-dot.warning {
  background-color: var(--warning);
}

/* SECTION BLOCKS & CARDS */
.section-block {
  margin-bottom: 24px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge.highlight {
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid var(--accent);
}

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

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

/* TOP 3 ACTIONS (BIG CARDS) */
.top-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .top-actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(8px);
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.action-card.rank-1 {
  border-top: 3px solid var(--accent);
}

.action-card.rank-2 {
  border-top: 3px solid var(--info);
}

.action-card.rank-3 {
  border-top: 3px solid var(--success);
}

.action-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.impact-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.impact-pill.high {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.impact-pill.med {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.impact-pill.low {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info);
}

.action-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
}

.action-why {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.time-needed {
  color: var(--text-muted);
}

.action-link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
}

.action-link:hover {
  text-decoration: underline;
}

/* CROSS PROMO CARD */
.promo-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

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

.promo-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
}

.promo-route {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.promo-concept {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.promo-cta code {
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  border: 1px solid var(--border-subtle);
}

/* RANKINGS MINI GRID */
.rankings-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.ranking-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.ranking-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
}

.ranking-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.ranking-details small {
  color: var(--text-secondary);
}

.btn-icon-subtle {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* ==========================================================================
   STREAM PILLS & BADGES
   ========================================================================== */
.stream-pill {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  letter-spacing: 0.05em;
}

.stream-pill.stream-tes {
  background: rgba(14, 165, 233, 0.15);
  color: var(--stream-tes);
  border: 1px solid var(--stream-tes);
}

.stream-pill.stream-itch {
  background: rgba(244, 63, 94, 0.15);
  color: var(--stream-itch);
  border: 1px solid var(--stream-itch);
}

.stream-pill.stream-kdp {
  background: rgba(245, 158, 11, 0.15);
  color: var(--stream-kdp);
  border: 1px solid var(--stream-kdp);
}

.stream-pill.stream-youtube {
  background: rgba(239, 68, 68, 0.15);
  color: var(--stream-youtube);
  border: 1px solid var(--stream-youtube);
}

.stream-pill.stream-promptbase {
  background: rgba(139, 92, 246, 0.15);
  color: var(--stream-promptbase);
  border: 1px solid var(--stream-promptbase);
}

.stream-pill.stream-rankforge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--stream-rankforge);
  border: 1px solid var(--stream-rankforge);
}

/* STREAM CARDS GRID (PAGE 2) */
.streams-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .streams-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .streams-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stream-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.stream-card-box.planned {
  opacity: 0.85;
  border-style: dashed;
}

.stream-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stream-tag {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.stream-tag.stream-tes { color: var(--stream-tes); }
.stream-tag.stream-itch { color: var(--stream-itch); }
.stream-tag.stream-kdp { color: var(--stream-kdp); }
.stream-tag.stream-youtube { color: var(--stream-youtube); }
.stream-tag.stream-promptbase { color: var(--stream-promptbase); }
.stream-tag.stream-rankforge { color: var(--stream-rankforge); }

.stream-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

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

.status-badge.planned {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.stream-audience, .stream-voice {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stream-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  margin: 14px 0;
  border: 1px solid var(--border-subtle);
}

.stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-val {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* PROGRESS BARS */
.goal-progress-section {
  margin-bottom: 16px;
}

.goal-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-fill.fill-danger {
  background: linear-gradient(90deg, var(--warning), var(--danger));
}

.stream-card-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.btn-primary-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: none;
  cursor: pointer;
  min-height: 40px;
}

.btn-primary-small:hover {
  background: var(--accent-hover);
}

/* ==========================================================================
   CONTENT STUDIO & STREAM DECK
   ========================================================================== */
.breadcrumb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
}

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

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

.stream-deck-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .stream-deck-meta-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.meta-card {
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

/* TOPIC PICK CARD */
.topic-pick-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.topic-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent-light);
}

.score-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .score-breakdown-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.score-metric {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.score-bar {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: var(--accent);
}

.score-val {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.source-items-box {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.source-items-box ul {
  list-style: none;
  margin-top: 4px;
}

/* CONTENT BOXES */
.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

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

.header-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.channel-badge.youtube {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: var(--danger);
}

.channel-badge.bluesky {
  background: rgba(14, 165, 233, 0.15);
  color: var(--stream-tes);
  border-color: var(--stream-tes);
}

.channel-badge.pinterest {
  background: rgba(220, 38, 38, 0.15);
  color: #DC2626;
  border-color: #DC2626;
}

.channel-badge.instagram {
  background: rgba(217, 70, 239, 0.15);
  color: #D946EF;
  border-color: #D946EF;
}

.ai-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  min-height: 40px;
}

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

.btn-copy.copied {
  border-color: var(--success);
}

.content-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

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

.hooks-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

.hooks-list {
  list-style: none;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hooks-list li {
  padding: 6px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hooks-list li.best-hook {
  border-color: var(--accent);
  background: var(--bg-hover);
}

/* SCENES BREAKDOWN */
.scenes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 14px;
}

@media (min-width: 640px) {
  .scenes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.scene-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 0.8rem;
}

.scene-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--accent-light);
}

.scene-visual {
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.scene-text {
  color: var(--text-primary);
  font-style: italic;
}

.voiceover-section {
  margin-bottom: 14px;
  font-size: 0.85rem;
}

.voiceover-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 6px;
  color: var(--text-primary);
  white-space: pre-wrap;
  line-height: 1.6;
}

.social-post-text {
  font-size: 0.95rem;
  line-height: 1.5;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.content-footer-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* FILTER CONTROLS */
.filter-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.pill-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
}

.pill-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.pill-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
  font-weight: 600;
}

.search-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  min-height: 44px;
}

.search-input:focus {
  border-color: var(--accent);
}

/* ==========================================================================
   TABLES & LISTS (HOOK BANK, RUNS, APPROVALS)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

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

.data-table th {
  background: var(--bg-secondary);
  padding: 12px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

.score-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.score-pos {
  background: var(--success-bg);
  color: var(--success);
}

.score-neg {
  background: var(--warning-bg);
  color: var(--warning);
}

.score-neutral {
  background: var(--bg-primary);
  color: var(--text-muted);
}

.score-retired {
  background: var(--danger-bg);
  color: var(--danger);
  text-decoration: line-through;
}

.btn-copy-small {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
}

.btn-copy-small:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* APPROVAL CARDS */
.approvals-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.approval-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.approval-card.status-pending {
  border-left: 4px solid var(--warning);
}

.approval-card.status-approved {
  border-left: 4px solid var(--success);
}

.approval-card.status-rejected {
  border-left: 4px solid var(--danger);
}

.approval-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

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

.type-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.approval-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.approval-status-pill.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.approval-status-pill.approved {
  background: var(--success-bg);
  color: var(--success);
}

.approval-status-pill.rejected {
  background: var(--danger-bg);
  color: var(--danger);
}

.approval-id code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.approval-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.approval-rationale {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.approval-timestamps {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.approval-action-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.tg-cmd-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.tg-cmds-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tg-cmd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.tg-cmd-item code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--success);
}

.tg-cmd-item.reject code {
  color: var(--danger);
}

/* SECURITY BANNER */
.security-gate-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.security-banner-icon {
  font-size: 1.5rem;
}

.security-banner-text strong {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 4px;
}

.security-banner-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   CALENDAR STYLES (PAGE 6)
   ========================================================================== */
.calendar-list-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-event-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

@media (min-width: 640px) {
  .calendar-event-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.event-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.event-days-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}

.event-days-pill.urgent {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.days-num {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
}

.days-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.event-title {
  font-size: 1rem;
  font-weight: 600;
}

.event-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.event-streams {
  display: flex;
  gap: 6px;
}

/* MONTH GRID VIEW */
.month-calendar-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

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

.calendar-day-head {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
}

.calendar-cell {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  min-height: 50px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calendar-cell.empty {
  background: transparent;
  border-color: transparent;
}

.calendar-cell.today {
  border-color: var(--accent);
}

.calendar-cell.has-event {
  background: var(--bg-hover);
}

.cell-day-num {
  font-size: 0.75rem;
  font-weight: 600;
}

.cell-event-badge {
  font-size: 0.62rem;
  background: var(--accent);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  padding: 1px 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   RESULTS & HEALTH STYLES (PAGE 7 & 9)
   ========================================================================== */
.results-stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .results-stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

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

.metric-val {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  margin-top: 4px;
}

.trend-bars-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
}

.trend-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.trend-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 120px;
  gap: 6px;
  padding-top: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.bar-fill {
  width: 70%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.4s ease;
}

.bar-date {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 6px;
}

/* BUDGET METERS (HEALTH) */
.budget-meters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .budget-meters-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.meter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
}

.meter-val {
  font-family: var(--font-mono);
  color: var(--accent-light);
}

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

/* TASKS LIST */
.tasks-container-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .tasks-container-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tasks-column {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.tasks-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

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

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.task-item.completed {
  opacity: 0.65;
}

.task-checkbox-dummy {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  margin-top: 2px;
}

.task-check-icon {
  color: var(--success);
  font-weight: 700;
}

/* SOURCE HEALTH STATUS GRID */
.source-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.source-health-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.source-health-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-status-label {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.setup-checklist-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.checklist-pre {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* ==========================================================================
   EMPTY STATE & SPINNERS
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  margin: 12px 0;
}

.empty-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.empty-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 440px;
  line-height: 1.5;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ==========================================================================
   FIREBASE AUTH VIEW & NOSCRIPT
   ========================================================================== */
.noscript-banner {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 18px 24px;
  text-align: center;
  font-weight: 600;
}

.auth-viewport {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: var(--bg-primary);
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo-icon {
  font-size: 2rem;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.auth-error-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  min-height: 44px;
}

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

.btn-auth-primary {
  width: 100%;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s ease;
}

.btn-auth-primary:hover {
  background: var(--accent-hover);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-divider span {
  padding: 0 10px;
}

.btn-auth-secondary {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  transition: border-color 0.15s ease;
}

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

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* LOGOUT & USER BAR */
.sidebar-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.user-email-text {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  min-height: 36px;
  min-width: 36px;
}

.btn-logout:hover {
  color: var(--danger);
}

/* ==========================================================================
   UI 11: PERSISTENT SYSTEM STATUS BANNER
   ========================================================================== */
.persistent-system-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.78rem;
}

@media (min-width: 640px) {
  .persistent-system-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.banner-pill {
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.banner-pill.dry-run {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.banner-pill.live {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

.banner-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.banner-sep {
  color: var(--border-strong);
}

.sources-off-tag {
  color: var(--warning);
}

/* ==========================================================================
   UI 12: SOURCE CHIPS
   ========================================================================== */
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.source-chip.verified .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.source-chip.unverified {
  border-color: var(--warning);
  color: var(--warning);
}

.chip-sep {
  color: var(--text-muted);
}

/* ==========================================================================
   UI 15: STREAM SWITCHER BAR
   ========================================================================== */
.stream-switcher-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.switcher-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.switcher-pills {
  display: flex;
  gap: 6px;
}

.switcher-pill {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  transition: all 0.15s ease;
}

.switcher-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.switcher-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

/* CATALOG GRID */
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

@media (min-width: 640px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.catalog-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.catalog-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.price-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--accent-light);
}

.catalog-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.catalog-mini-list {
  list-style: none;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-tag {
  color: var(--accent-light);
  font-family: var(--font-mono);
}

.audit-note-box {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  margin: 8px 0;
}

