/* ==========================================================================
   HER-OS CONTENT HUB - PRO DARK THEME DESIGN SYSTEM
   Ergonomic Deep Obsidian/Slate Palette | High Contrast | Crisp Statuses & Alerts
   ========================================================================== */

:root {
  /* Dark Mode Surface & Backgrounds */
  --bg-app: #080c14;            /* Main page background */
  --bg-header: #0d1322;         /* Top header bar */
  --bg-surface: #111a2e;        /* Primary container / card */
  --bg-surface-card: #162038;   /* Inner interactive cards */
  --bg-surface-alt: #1a2744;    /* Subtle elevated elements */
  --bg-surface-hover: #223254;  /* Hover state */
  --bg-input: #0d1527;          /* Input fields background */

  /* High-Contrast Typography */
  --text-main: #f8fafc;         /* Brightest white for titles */
  --text-secondary: #cbd5e1;    /* Light slate for body copy */
  --text-muted: #94a3b8;        /* Medium slate for secondary info */
  --text-subtle: #64748b;       /* Subtle meta info */

  /* Brand Accents */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.35);
  --primary-light: rgba(2, 132, 199, 0.18);
  --primary-border: rgba(56, 189, 248, 0.4);

  --accent-indigo: #6366f1;
  --accent-indigo-light: rgba(99, 102, 241, 0.18);

  /* Clear Status & Warning Colors */
  --status-emerald: #10b981;
  --status-emerald-bg: rgba(16, 185, 129, 0.15);
  --status-emerald-border: rgba(16, 185, 129, 0.4);
  --status-emerald-text: #34d399;

  --status-amber: #f59e0b;
  --status-amber-bg: rgba(245, 158, 11, 0.15);
  --status-amber-border: rgba(245, 158, 11, 0.4);
  --status-amber-text: #fbbf24;

  --status-rose: #f43f5e;
  --status-rose-bg: rgba(244, 63, 94, 0.18);
  --status-rose-border: rgba(244, 63, 94, 0.45);
  --status-rose-text: #fda4af;

  --status-blue: #0ea5e9;
  --status-blue-bg: rgba(14, 165, 233, 0.15);
  --status-blue-border: rgba(14, 165, 233, 0.4);
  --status-blue-text: #38bdf8;

  --status-purple: #a855f7;
  --status-purple-bg: rgba(168, 85, 247, 0.15);
  --status-purple-border: rgba(168, 85, 247, 0.4);
  --status-purple-text: #c084fc;

  /* Borders */
  --border-subtle: #1e293b;
  --border-medium: #2a3952;
  --border-strong: #3b4e6d;

  /* Shadows (Dark glow & depth) */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.6), 0 4px 8px -2px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 6px 18px -2px rgba(2, 132, 199, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.5);

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Fonts */
  --font-sans: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-secondary);
  line-height: 1.55;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* SCROLLBAR STYLING FOR DARK THEME */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: #25334c;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #354769;
}

/* ==========================================================================
   APP CONTAINER & HEADER
   ========================================================================== */

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-badge {
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.logo-text {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.version-tag {
  font-size: 11.5px;
  background: var(--primary-light);
  color: var(--status-blue-text);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-border);
}

/* NAVIGATION PILL TABS */
.view-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.nav-btn {
  border: none;
  background: transparent;
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s ease;
}

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

.nav-btn.active {
  background: var(--bg-surface-card);
  color: var(--status-blue-text);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-medium);
}

.badge-count {
  background: var(--accent-amber);
  color: #080c14;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

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

/* ==========================================================================
   BUTTON SYSTEM (Prominent, High-Visibility)
   ========================================================================== */

.btn {
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
  border-color: rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-alt);
  color: var(--text-main);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: #ffffff;
}

.btn-success {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.btn-success:hover {
  background: #047857;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.45);
}

.btn-danger-outline {
  background: var(--status-rose-bg);
  color: var(--status-rose-text);
  border: 1px solid var(--status-rose-border);
}

.btn-danger-outline:hover {
  background: rgba(244, 63, 94, 0.28);
  border-color: var(--status-rose);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-text:hover {
  color: var(--status-blue-text);
  text-decoration: underline;
}

/* ==========================================================================
   FILTER BAR
   ========================================================================== */

.filter-bar {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-group select,
.form-control {
  border: 1px solid var(--border-medium);
  background: var(--bg-input);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
}

.filter-group select:focus,
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
  background: #111a2e;
}

.search-group {
  position: relative;
  min-width: 280px;
}

.search-group input {
  width: 100%;
  padding-left: 34px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
  opacity: 0.6;
}

.filter-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.total-indicator {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--status-blue-text);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-border);
}

/* ==========================================================================
   MAIN CONTENT VIEW PANELS
   ========================================================================== */

.main-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-app);
}

.view-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
}

.view-panel.active {
  display: block;
}

/* ==========================================================================
   BATCH SHOOTING VIEW (High Contrast Dark Cards & Clear Badges)
   ========================================================================== */

.batch-header-banner {
  background: linear-gradient(135deg, #111a2e 0%, #16223b 100%);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.batch-header-banner h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-header-banner p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  align-items: start;
}

.batch-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
}

.batch-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

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

.batch-host-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-host-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: var(--radius-md);
}

.batch-host-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.batch-stats-pill {
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
}

.batch-video-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.batch-item {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.batch-item:hover {
  border-color: var(--primary);
  background: var(--bg-surface-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

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

.batch-item-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12.5px;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.18);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.batch-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
}

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

.chip-owner,
.chip-pillar {
  background: var(--bg-surface-alt);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-print-shotlist {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-weight: 800;
  font-size: 13px;
}

/* ==========================================================================
   KANBAN BOARD VIEW
   ========================================================================== */

.kanban-board {
  display: flex;
  gap: 16px;
  height: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  flex: 0 0 310px;
  background: var(--bg-header);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  box-shadow: var(--shadow-sm);
}

.kanban-column-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.column-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.column-count {
  font-size: 11.5px;
  font-weight: 800;
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
}

.kanban-card-list {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

.card-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.18);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.card-topic {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

.card-host {
  font-weight: 600;
  color: var(--text-secondary);
}

.card-owner-badge {
  background: var(--bg-surface-alt);
  font-weight: 700;
  color: var(--text-main);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

/* HIGH VISIBILITY CHANNEL BADGES */
.badge-channel {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
}

.channel-bs {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.channel-her {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.45);
}

/* ==========================================================================
   TABLE VIEW (Master Table Dark Theme)
   ========================================================================== */

.table-container {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.data-table th {
  background: var(--bg-header);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
}

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

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: var(--bg-surface-card);
}

.topic-cell {
  max-width: 360px;
}

.topic-title {
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 2px;
}

.topic-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   DASHBOARD STATS VIEW
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.stat-meta {
  font-size: 12px;
  color: var(--text-subtle);
}

.stats-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.details-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
}

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

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================================================
   MODALS (Deep Frosted Glass, High Contrast Dialogs)
   ========================================================================== */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-medium);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  animation: modalEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-lg {
  width: 900px;
}

.modal-md {
  width: 680px;
}

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

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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-group h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.ai-badge {
  background: linear-gradient(135deg, #6366f1, #0284c7);
  color: #ffffff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 0 24px;
}

.m-tab {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.m-tab:hover {
  color: var(--text-main);
}

.m-tab.active {
  color: var(--status-blue-text);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tab-pane.active {
  display: flex;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-header);
}

.footer-actions {
  display: flex;
  gap: 10px;
}

/* FORM ELEMENTS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-row {
  display: flex;
  gap: 16px;
}

.col-4 { flex: 1; }
.col-6 { flex: 1; }

.form-control {
  width: 100%;
}

textarea.form-control {
  resize: vertical;
}

.textarea-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* WARNING & AUDIT RESULTS */
.ai-audit-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.35);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.ai-hint {
  font-size: 12.5px;
  color: #7dd3fc;
  font-weight: 600;
}

.audit-results-box {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audit-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.score-badge-large {
  font-size: 18px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-md);
}

.score-pass {
  background: var(--status-emerald-bg);
  color: var(--status-emerald-text);
  border: 1px solid var(--status-emerald-border);
}

.score-review {
  background: var(--status-amber-bg);
  color: var(--status-amber-text);
  border: 1px solid var(--status-amber-border);
}

.score-reject {
  background: var(--status-rose-bg);
  color: var(--status-rose-text);
  border: 1px solid var(--status-rose-border);
}

.audit-feedback-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.studio-intro {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  background: var(--bg-surface-card);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.studio-result-box {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.storyboard-preview {
  background: #080c14;
  color: #e2e8f0;
  border: 1px solid var(--border-medium);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }
  .header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }
  .view-nav {
    width: 100%;
    overflow-x: auto;
  }
  .batch-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .modal-card {
    width: 100% !important;
  }
}

/* ==========================================================================
   MISSING COMPONENT STYLES — Bug Fix Batch
   ========================================================================== */

/* --- Storyboard Tab Top Actions --- */
.storyboard-top-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.storyboard-top-actions .topic-display {
  flex: 1;
}
.storyboard-top-actions .topic-display label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Gemini AI Button Accent */
.btn-gemini {
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-gemini:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* Monospace text for storyboard textarea */
.mono-text {
  font-family: var(--font-mono) !important;
  font-size: 12.5px !important;
  line-height: 1.7 !important;
  letter-spacing: 0.015em;
}

/* --- Gemini Audit Loading --- */
.audit-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
}
.audit-loading p {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Audit Score Banner --- */
.audit-score-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 16px;
}
.score-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-surface-alt);
  border: 2px solid var(--border-subtle);
  flex-shrink: 0;
}
.score-circle.pass {
  color: var(--status-emerald-text);
  background: var(--status-emerald-bg);
  border-color: var(--status-emerald-border);
}
.score-circle.revision {
  color: var(--status-amber-text);
  background: var(--status-amber-bg);
  border-color: var(--status-amber-border);
}
.score-circle.reject {
  color: var(--status-rose-text);
  background: var(--status-rose-bg);
  border-color: var(--status-rose-border);
}
.score-meta {
  flex: 1;
}
.score-meta h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
}
.score-meta p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* --- Audit Metrics Grid --- */
.audit-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.metric-box {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.metric-box .m-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.metric-box .m-val {
  display: block;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* --- Audit Policy Alerts & Hook Suggestions --- */
.audit-policy-alerts,
.audit-hook-suggestions {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}
.audit-policy-alerts h5,
.audit-hook-suggestions h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 10px;
}
.policy-item {
  background: var(--status-rose-bg);
  border: 1px solid var(--status-rose-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.6;
}
.policy-item strong {
  color: var(--status-rose-text);
}
.hook-item {
  background: var(--status-blue-bg);
  border: 1px solid var(--status-blue-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.6;
}
.hook-item strong {
  color: var(--status-blue-text);
}

/* --- Dashboard Panels --- */
.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
}
.panel-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 14px;
}

/* --- Batch Header Banner --- */
.batch-header-banner .banner-text h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 6px;
}
.batch-header-banner .banner-text p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* --- Modal Status Badge (header) --- */
.modal-status-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.18);
  color: var(--status-blue-text);
  border: 1px solid var(--status-blue-border);
  display: inline-block;
}

/* --- Studio Intro Text --- */
.studio-intro {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* --- Storyboard Preview (Studio result) --- */
.storyboard-preview {
  max-height: 400px;
  overflow-y: auto;
  padding: 4px 0;
}

/* --- Search Input Override --- */
.search-group .form-control {
  padding-left: 36px;
}

/* --- Responsive Fixes for Added Components --- */
@media (max-width: 768px) {
  .audit-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-panels {
    grid-template-columns: 1fr;
  }
  .storyboard-top-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --- Interactive Status Quick Selector in Table --- */
.status-quick-select {
  font-family: var(--font-main);
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-block;
  appearance: auto;
  min-width: 140px;
}
.status-quick-select:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}
.status-quick-select option {
  background: var(--bg-surface-card) !important;
  color: var(--text-main) !important;
  font-weight: 600 !important;
  padding: 6px 10px;
}

