/* ============================================================
   Podcast Production App — Complete Stylesheet
   Ground-up rewrite: fixed sidebar + topbar layout, no CSS Grid
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

/* --- Keyframe Animations (7) --- */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.4); }
  50%      { box-shadow: 0 0 20px 4px rgba(212,175,55,0.2); }
}
@keyframes checkBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Animation Utility Classes --- */
.animate-fadeIn {
  animation: fadeSlideUp 0.4s ease forwards;
  opacity: 0;
}
.animate-slideUp {
  animation: fadeSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--delay, 0) * 80ms);
  opacity: 0;
}
.animate-scaleIn {
  animation: scaleIn 0.3s ease forwards;
  opacity: 0;
}

/* ============================================================
   RESET + BODY
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a1a;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================================
   APP CONTAINER — plain wrapper, NO grid
   ============================================================ */
.app-container {
  position: relative;
  min-height: 100vh;
}
.app-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 400px;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.app-container.loaded {
  visibility: visible;
}

/* ============================================================
   SIDEBAR — 240 px fixed left
   ============================================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  height: 100vh;
  z-index: 200;
  background: #0f1525;
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 8px;
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.sidebar-brand {
  display: flex;
  flex-direction: column;
}
.sidebar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #d4af37;
}
.sidebar-subtitle {
  font-size: 11px;
  color: #888888;
  cursor: pointer;
}

/* Nav sections */
.nav-section {
  margin-bottom: 20px;
}
.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #555555;
  padding: 0 12px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #888888;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}
.nav-item:hover {
  color: #e0e0e0;
  background: rgba(255,255,255,0.05);
}
.nav-item.active {
  color: #d4af37;
  background: rgba(212,175,55,0.08);
  border-left: 3px solid #d4af37;
  font-weight: 600;
}
.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

.nav-badge {
  background: #f87171;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  margin-left: auto;
}

.version-footer {
  margin-top: auto;
  padding: 16px 12px;
  font-size: 11px;
  color: #555555;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.clickable { cursor: pointer; }
.clickable:hover { color: #d4af37; }

/* ============================================================
   CLIENT SELECTOR
   ============================================================ */
.client-selector-wrapper {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}
.client-selector-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #555555;
  margin-bottom: 6px;
}
.client-active-name {
  padding: 8px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 500;
}
.client-dropdown {
  padding: 8px 14px;
  background: #0f1525;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
}

/* ============================================================
   SIDEBAR USER
   ============================================================ */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-email {
  font-size: 11px;
  color: #555555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   TOPBAR — fixed, offset by sidebar width
   ============================================================ */
.topbar {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 64px;
  z-index: 200;
  background: rgba(15,21,37,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}
.recording-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 9999px;
  font-size: 13px;
  color: #d4af37;
  font-weight: 500;
}
.recording-badge i {
  font-size: 12px;
}

/* --- User Display (topbar) --- */
#user-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  max-width: 260px;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.user-role {
  font-size: 10px;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: 240px;
  margin-top: 64px;
  padding: 24px 28px;
  min-height: calc(100vh - 64px);
  position: relative;
  overflow-x: hidden;
}
.main-content.loading {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================================
   VIEW SECTIONS
   ============================================================ */
.view-section {
  display: none;
}
.view-section.active {
  display: block;
}

/* ============================================================
   STAT GRID + CARDS
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  border-top: 3px solid #d4af37;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.stat-icon {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(212,175,55,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4af37;
  font-size: 18px;
}
.stat-icon.glow-success {
  background: rgba(52,211,153,0.1);
  color: #34d399;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888888;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.1;
}
.stat-value-suffix {
  font-size: 16px;
  font-weight: 400;
  color: #888888;
}
.stat-trend {
  font-size: 12px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-trend.positive { color: #34d399; }
.stat-trend.negative { color: #f87171; }
.stat-trend.neutral  { color: #888888; }

.stat-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}
.stat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #e8c547);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* Color helpers */
.text-success { color: #34d399; }
.text-warning { color: #fbbf24; }
.text-error   { color: #f87171; }
.text-gold    { color: #d4af37; }

/* ============================================================
   CARDS (generic)
   ============================================================ */
.card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body {
  padding: 20px 24px;
}

/* ============================================================
   EPISODE CARDS
   ============================================================ */
.episode-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.episode-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  border-top: 3px solid #d4af37;
  overflow: hidden;
}
.episode-card:hover {
  box-shadow: 0 8px 32px rgba(212,175,55,0.1);
}
.episode-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  gap: 20px;
}
.episode-meta {
  flex: 1;
}
.episode-number {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #d4af37;
  font-weight: 600;
}
.episode-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 4px 0 8px;
  font-family: 'Space Grotesk', sans-serif;
}
.episode-hosts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.host-tag {
  padding: 4px 10px;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 9999px;
  font-size: 12px;
  color: #d4af37;
  font-weight: 500;
}
.host-tag.editable {
  background: transparent;
  border-style: dashed;
  cursor: pointer;
  color: #888888;
}
.host-tag.editable:hover {
  border-color: #d4af37;
  color: #d4af37;
}

/* ============================================================
   EPISODE PROGRESS RING
   ============================================================ */
.episode-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.progress-ring {
  width: 64px;
  height: 64px;
  position: relative;
}
.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.progress-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 3;
}
.progress-ring-fill {
  fill: none;
  stroke: #d4af37;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}
.progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

/* ============================================================
   EPISODE GUESTS BAR
   ============================================================ */
.episode-guests-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 24px 16px;
}
.guest-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
}
.guest-chip i { font-size: 10px; }
.guest-type-athlete     { background: rgba(52,211,153,0.1);  color: #34d399; border-color: rgba(52,211,153,0.2); }
.guest-type-professional { background: rgba(96,165,250,0.1);  color: #60a5fa; border-color: rgba(96,165,250,0.2); }
.guest-type-guest       { background: rgba(212,175,55,0.1);  color: #d4af37; border-color: rgba(212,175,55,0.2); }
.guest-add {
  background: transparent;
  border-style: dashed;
  color: #555555;
  cursor: pointer;
}
.guest-add:hover {
  border-color: #d4af37;
  color: #d4af37;
}

/* ============================================================
   SEGMENTS
   ============================================================ */
.segment-list {
  border-top: 1px solid rgba(255,255,255,0.06);
}
.segment-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.segment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 200ms;
}
.segment-header:hover {
  background: rgba(255,255,255,0.03);
}
.segment-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.segment-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(212,175,55,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4af37;
  font-size: 14px;
}
.segment-name {
  font-size: 14px;
  font-weight: 500;
  color: #e0e0e0;
}
.segment-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}
.segment-pct {
  font-size: 12px;
  color: #888888;
  font-weight: 600;
  min-width: 32px;
  text-align: right;
}
.segment-pct.text-success { color: #34d399; }
.segment-progress-mini {
  width: 60px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.segment-progress-mini-fill {
  height: 100%;
  background: #d4af37;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.segment-progress-mini-fill.complete { background: #34d399; }
.segment-chevron {
  color: #555555;
  font-size: 12px;
  transition: transform 300ms;
}
.segment-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.segment-item.expanded .segment-content { max-height: 2000px; }
.segment-item.expanded .segment-chevron { transform: rotate(180deg); }
.segment-tasks {
  padding: 0 24px 20px;
}
.segment-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* ============================================================
   GUEST TASKS
   ============================================================ */
.guest-task-block {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.guest-task-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.guest-task-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.guest-note {
  font-size: 11px;
  color: #d4af37;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   DATA TABLE
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #555555;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.data-table tbody tr {
  transition: background 200ms;
}
.data-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
.data-table tbody td {
  padding: 10px 16px;
  font-size: 13px;
  color: #e0e0e0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.data-table tbody tr.completed { opacity: 0.5; }
.data-table tbody tr.completed .task-name { text-decoration: line-through; }
.task-name { font-weight: 500; }

/* ============================================================
   CHECKBOX
   ============================================================ */
.checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 200ms;
  background: transparent;
  flex-shrink: 0;
}
.checkbox:checked {
  background: #d4af37;
  border-color: #d4af37;
  animation: checkBounce 0.3s ease;
}
.checkbox:checked::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a1a;
  font-size: 12px;
  font-weight: 700;
}
.checkbox:hover {
  border-color: #d4af37;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-success { background: rgba(52,211,153,0.15);  color: #34d399; }
.badge-warning { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.badge-error   { background: rgba(248,113,113,0.15); color: #f87171; }
.badge-info    { background: rgba(96,165,250,0.15);  color: #60a5fa; }
.badge-neutral { background: rgba(255,255,255,0.08); color: #888888; }
.badge-primary { background: rgba(212,175,55,0.15);  color: #d4af37; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #d4af37, #b8960c);
  color: #0a0a1a;
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #e8c547, #d4af37);
  box-shadow: 0 0 20px rgba(212,175,55,0.3);
}
.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #e0e0e0;
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}
.btn-ghost {
  background: transparent;
  color: #888888;
}
.btn-ghost:hover {
  color: #e0e0e0;
  background: rgba(255,255,255,0.05);
}
.btn-danger {
  background: rgba(248,113,113,0.1);
  color: #f87171;
}
.btn-danger:hover {
  background: rgba(248,113,113,0.2);
}
.btn-success {
  background: rgba(52,211,153,0.1);
  color: #34d399;
}
.btn-success:hover {
  background: rgba(52,211,153,0.2);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
}
.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #888888;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 200ms;
  outline: none;
}
.form-input:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}
.form-input::placeholder {
  color: #555555;
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay.active .modal {
  transform: scale(1);
  opacity: 1;
}
.modal {
  background: #0f1525;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95);
  opacity: 0;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: none;
  border: none;
  color: #555555;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: color 200ms;
}
.modal-close:hover {
  color: #ffffff;
}
.modal-body {
  padding: 20px 24px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ============================================================
   COMMENT SECTION
   ============================================================ */
.comment-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.comment-title {
  font-size: 13px;
  font-weight: 600;
  color: #888888;
  display: flex;
  align-items: center;
  gap: 6px;
}
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comment-item {
  display: flex;
  gap: 10px;
}
.comment-avatar {
  width: 28px;
  height: 28px;
  background: rgba(212,175,55,0.15);
  color: #d4af37;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 2px;
}
.comment-author {
  font-size: 12px;
  font-weight: 600;
  color: #e0e0e0;
}
.comment-time {
  font-size: 11px;
  color: #555555;
}
.comment-text {
  font-size: 13px;
  color: #888888;
  line-height: 1.5;
}

/* ============================================================
   ANALYTICS
   ============================================================ */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.analytics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.analytics-row:last-child { border-bottom: none; }
.chart-container { width: 100%; }

/* ============================================================
   BAR CHART (Host Participation)
   ============================================================ */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.bar-label {
  width: 80px;
  font-size: 13px;
  font-weight: 500;
  color: #e0e0e0;
  text-align: right;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  height: 28px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #e8c547);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  min-width: 40px;
  transition: width 0.6s ease;
}
.bar-value {
  font-size: 11px;
  font-weight: 700;
  color: #0a0a1a;
  white-space: nowrap;
}

/* ============================================================
   TREND CHART (Completion Trends)
   ============================================================ */
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  min-height: 160px;
  padding-top: 12px;
}
.trend-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.trend-bar {
  width: 100%;
  background: linear-gradient(180deg, #d4af37, #b8960c);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
}
.trend-bar-label {
  font-size: 10px;
  color: #555555;
  white-space: nowrap;
}

/* ============================================================
   SEGMENT HEATMAP
   ============================================================ */
.segment-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  width: 100%;
}
.heatmap-cell {
  text-align: center;
  padding: 16px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 200ms;
}
.heatmap-cell:hover { transform: translateY(-2px); }
.heatmap-cell.heat-complete { background: rgba(52,211,153,0.12);  border-color: rgba(52,211,153,0.2); }
.heatmap-cell.heat-progress { background: rgba(212,175,55,0.1);   border-color: rgba(212,175,55,0.2); }
.heatmap-cell.heat-started  { background: rgba(251,191,36,0.08);  border-color: rgba(251,191,36,0.15); }
.heatmap-cell.heat-empty    { background: rgba(255,255,255,0.02); }
.heatmap-value {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
}
.heatmap-label {
  font-size: 10px;
  color: #888888;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.heatmap-detail {
  font-size: 10px;
  color: #555555;
  margin-top: 2px;
}

/* ============================================================
   ISSUE TREND CHART
   ============================================================ */
.issue-trend-chart-inner {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  min-height: 140px;
  padding-bottom: 24px;
}
.issue-trend-week {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.issue-trend-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 100px;
  width: 100%;
  justify-content: center;
}
.issue-bar {
  width: 14px;
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  transition: height 0.4s ease;
}
.issue-bar.opened  { background: #f87171; }
.issue-bar.resolved { background: #34d399; }
.issue-trend-label {
  font-size: 10px;
  color: #555555;
}
.issue-trend-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
  font-size: 12px;
  color: #888888;
}

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.category-card {
  text-align: center;
  padding: 18px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 200ms;
}
.category-card:hover { transform: translateY(-1px); }
.category-card.has-open { border-color: rgba(248,113,113,0.3); }
.category-count {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
}
.category-name {
  font-size: 12px;
  color: #888888;
  text-transform: capitalize;
  margin-top: 4px;
}
.category-open {
  font-size: 11px;
  color: #f87171;
  margin-top: 4px;
  font-weight: 500;
}

/* ============================================================
   GUEST FREQUENCY
   ============================================================ */
.guest-freq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guest-freq-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.guest-freq-count {
  font-size: 13px;
  color: #888888;
  font-weight: 500;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline-grid {
  width: 100%;
  overflow-x: auto;
}
.timeline-header-row {
  display: flex;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
  position: sticky;
  top: 0;
}
.timeline-row {
  display: flex;
  gap: 2px;
  margin-bottom: 2px;
}
.timeline-ep-label {
  min-width: 140px;
  max-width: 140px;
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.timeline-ep-label strong { color: #ffffff; }
.timeline-ep-label span   { color: #888888; font-size: 11px; }
.timeline-seg-label {
  flex: 1;
  min-width: 80px;
  font-size: 10px;
  color: #555555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 8px;
  text-align: center;
  font-weight: 600;
}
.timeline-cell {
  flex: 1;
  min-width: 80px;
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}
.timeline-cell.complete { background: rgba(52,211,153,0.12); color: #34d399; }
.timeline-cell.progress { background: rgba(212,175,55,0.1);  color: #d4af37; }
.timeline-cell.empty    { background: rgba(255,255,255,0.03); color: #555555; }
.timeline-cell.na       { background: transparent; color: #333333; }

/* ============================================================
   RECORDING DAY CHIPS
   ============================================================ */
/* Recording Day Sidebar Items */
.rd-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms;
  font-family: inherit;
  text-align: left;
  color: #888888;
  font-size: 13px;
}
.rd-sidebar-item:hover {
  background: rgba(255,255,255,0.05);
  color: #e0e0e0;
}
.rd-sidebar-item.active {
  background: rgba(212,175,55,0.08);
  color: #d4af37;
}
.rd-sidebar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  flex-shrink: 0;
  transition: all 200ms;
}
.rd-sidebar-dot.active {
  background: #d4af37;
  box-shadow: 0 0 8px rgba(212,175,55,0.4);
}
.rd-sidebar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rd-sidebar-date {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.3;
}
.rd-sidebar-meta {
  font-size: 11px;
  color: #555555;
}
.rd-sidebar-item.active .rd-sidebar-meta {
  color: rgba(212,175,55,0.6);
}
.rd-sidebar-delete {
  color: #555;
  font-size: 11px;
  padding: 4px;
  border-radius: 4px;
  transition: all 200ms;
  opacity: 0;
}
.rd-sidebar-item:hover .rd-sidebar-delete {
  opacity: 1;
}
.rd-sidebar-delete:hover {
  color: #f87171;
  background: rgba(248,113,113,0.1);
}
.rd-sidebar-add {
  color: #555;
  font-size: 12px;
  gap: 8px;
  margin-top: 4px;
  border: 1px dashed rgba(255,255,255,0.08);
}
.rd-sidebar-add:hover {
  color: #d4af37;
  border-color: rgba(212,175,55,0.3);
  background: rgba(212,175,55,0.05);
}
/* Legacy compat */
.rd-chip-group { display: inline-flex; align-items: center; gap: 4px; }
.rd-ep-count { background: rgba(212,175,55,0.15); color: #d4af37; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; margin-left: 4px; }

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.command-palette,
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  z-index: 1200;
}
.command-palette.active,
#command-palette.active,
.command-palette-overlay.active {
  display: flex;
}
.command-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  outline: none;
  font-family: inherit;
}
.command-input:focus {
  border-color: #d4af37;
}
.command-results {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 8px;
}
.command-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 14px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.command-result:hover,
.command-result.active {
  background: rgba(212,175,55,0.1);
  color: #d4af37;
}
.command-result i {
  width: 20px;
  text-align: center;
  color: #888888;
}
.command-empty {
  padding: 20px;
  text-align: center;
  color: #555555;
}
.kbd-hint {
  background: rgba(255,255,255,0.1);
  color: #888888;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
}

/* ============================================================
   ISSUES
   ============================================================ */
.issue-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.issue-item:last-child { border-bottom: none; }
.issue-severity {
  width: 4px;
  border-radius: 2px;
  align-self: stretch;
  flex-shrink: 0;
}
.issue-severity.minor    { background: #fbbf24; }
.issue-severity.major    { background: #f97316; }
.issue-severity.critical { background: #f87171; }
.issue-content { flex: 1; }
.issue-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}
.issue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #555555;
}
.issue-description {
  font-size: 13px;
  color: #888888;
  margin-top: 6px;
  line-height: 1.5;
}

/* ============================================================
   CHANGELOG
   ============================================================ */
.changelog-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.changelog-time {
  font-size: 12px;
  color: #555555;
  min-width: 80px;
  flex-shrink: 0;
}
.changelog-content { flex: 1; }
.changelog-action {
  font-size: 13px;
  color: #e0e0e0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.changelog-detail {
  font-size: 12px;
  color: #555555;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #555555;
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  color: #34d399;
}

/* ============================================================
   UNDO TOAST
   ============================================================ */
.undo-toast {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: #16213e;
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1100;
  transition: bottom 400ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.undo-toast.visible {
  bottom: 24px;
}

/* ============================================================
   FILE UPLOAD
   ============================================================ */
.file-upload {
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 200ms;
}
.file-upload:hover {
  border-color: #d4af37;
  background: rgba(212,175,55,0.03);
}
.file-upload-icon {
  font-size: 40px;
  color: #d4af37;
  margin-bottom: 12px;
}
.file-upload-text {
  font-size: 14px;
  color: #e0e0e0;
  margin-bottom: 4px;
}
.file-upload-hint {
  font-size: 12px;
  color: #555555;
}

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 300ms;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .topbar {
    left: 0;
  }
  .main-content {
    margin-left: 0;
    margin-top: 56px;
    padding: 16px;
  }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .episode-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .topbar-right { gap: 8px; }
  .btn-sm { padding: 4px 8px; font-size: 11px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .sidebar,
  .topbar,
  .undo-toast,
  .command-palette {
    display: none !important;
  }
  .main-content {
    margin: 0;
    padding: 16px;
  }
  body {
    background: white;
    color: black;
  }
}
