@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --primary: #2C3E50;
  --primary-light: #34495E;
  --primary-pale: #7F8C8D;
  --secondary: #BDC3C7;
  --accent: #ECF0F1;
  --accent-light: #FEF3C7;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --success: #10B981;
  --success-light: #D1FAE5;
  --info: #3B82F6;
  --info-light: #DBEAFE;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

::selection {
  background: var(--primary-pale);
  color: var(--primary);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

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

.header-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.header-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.02em;
}

/* Buttons */
.btn-primary {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease both;
}

.stat-card.stat-idea {
  border-left: 3px solid var(--accent);
}

.stat-card.stat-scripted {
  border-left: 3px solid var(--info);
}

.stat-card.stat-recorded {
  border-left: 3px solid var(--primary);
}

.stat-card.stat-published {
  border-left: 3px solid var(--success);
}

.stat-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-count {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Episode List */
.board-section {
  margin-bottom: 24px;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Episode Card */
.episode-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
  animation: fadeInUp 0.4s ease both;
}

.episode-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-pale);
}

.episode-card:active {
  cursor: grabbing;
}

.episode-card.dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

.episode-card.drag-over {
  border-color: var(--primary);
  border-style: dashed;
  background: var(--primary-pale);
}

.card-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.episode-number {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--surface-alt);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-idea {
  background: var(--accent-light);
  color: #92400E;
}

.status-scripted {
  background: var(--info-light);
  color: #1E40AF;
}

.status-recorded {
  background: var(--primary-pale);
  color: var(--primary);
}

.status-published {
  background: var(--success-light);
  color: #065F46;
}

.card-menu-wrapper {
  position: relative;
  margin-left: auto;
}

.card-menu-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 2px;
}

.card-menu-btn:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.card-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  animation: fadeIn 0.15s ease;
}

.card-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.15s;
}

.card-dropdown button:hover {
  background: var(--surface-alt);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.dropdown-label {
  display: block;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dropdown-danger {
  color: var(--danger) !important;
}

.dropdown-danger:hover {
  background: var(--danger-light) !important;
}

.card-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-topic {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.card-guest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-pale);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.guest-icon {
  font-size: 0.75rem;
}

.card-points {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.points-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 6px;
}

.points-list {
  list-style: none;
  padding: 0;
}

.point-item {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 3px 0 3px 16px;
  position: relative;
  line-height: 1.5;
}

.point-item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}

.point-more {
  color: var(--text-muted);
  font-style: italic;
}

.point-more::before {
  display: none;
}

.card-drag-handle {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 1rem;
  color: var(--border);
  letter-spacing: 1px;
  user-select: none;
}

.drag-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 16px;
  font-style: italic;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 1rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

/* Form */
.episode-form {
  padding: 20px 24px 24px;
}

.form-group {
  margin-bottom: 18px;
}

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

.form-half {
  flex: 1;
}

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

.form-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-pale);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

/* Skeleton Loading */
.skeleton-stat,
.skeleton-card {
  animation: pulse 1.5s ease infinite !important;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: var(--surface-alt);
  margin-bottom: 8px;
}

.skeleton-line.wide {
  width: 80%;
}

.skeleton-line.medium {
  width: 60%;
}

.skeleton-line.short {
  width: 35%;
}

.skeleton-btn {
  width: 80px;
  background: var(--surface-alt) !important;
  border-color: var(--surface-alt) !important;
  color: transparent !important;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 640px) {
  .app-container {
    padding: 16px 14px 40px;
  }

  .header-title {
    font-size: 1.3rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 12px;
  }

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

  .stat-count {
    font-size: 1.1rem;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .episode-card {
    padding: 16px;
  }

  .card-title {
    font-size: 1rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .modal-content {
    max-height: 95vh;
  }

  .modal-header {
    padding: 16px 18px 0;
  }

  .episode-form {
    padding: 16px 18px 20px;
  }

  .btn-primary {
    padding: 10px 16px;
    font-size: 0.8125rem;
  }
}

@media (max-width: 380px) {
  .stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .stat-card {
    padding: 10px;
    gap: 8px;
  }

  .app-header {
    flex-wrap: wrap;
    gap: 12px;
  }
}

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to PodPlanner! This is your podcast season planning board. You can see the overview stats at the top showing how many episodes are in each stage.", "view": "user", "highlight_selector": ".stats-bar", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "Click '+ New Episode' to create your first episode. Fill in the title, topic, guest name, talking points, and set the status.", "view": "user", "highlight_selector": ".btn-primary", "wait_for": "user_interaction"},
  {"step": 3, "narration": "Each episode card shows the title, topic, guest, and talking points. The colored badge shows the current status.", "view": "user", "highlight_selector": ".episode-card", "wait_for": "tap_to_continue"},
  {"step": 4, "narration": "Use the filter buttons to view episodes by status — Ideas, Scripted, Recorded, or Published.", "view": "user", "highlight_selector": ".filter-bar", "wait_for": "user_interaction"},
  {"step": 5, "narration": "Drag and drop episode cards to reorder your season lineup. The episode numbers update automatically.", "view": "user", "highlight_selector": ".episode-list", "wait_for": "tap_to_continue"},
  {"step": 6, "narration": "Click the ⋯ menu on any card to edit details, change status, or delete the episode. You can quickly move episodes between stages from here.", "view": "user", "highlight_selector": ".card-menu-btn", "wait_for": "user_interaction"}
]
-->

.auth-state {
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  color: var(--text-secondary);
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 10px;
}

.auth-text {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.auth-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.header-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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

@media (max-width: 640px) {
  .auth-card {
    padding: 22px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.rich-editor {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.7;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rich-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-pale);
}

.rich-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}

.rich-editor p {
  margin-bottom: 0.75em;
}

.rich-editor p:last-child {
  margin-bottom: 0;
}

.rich-editor a {
  color: var(--primary);
  text-decoration: underline;
}

.guest-picker-wrap {
  position: relative;
}

.guest-picker-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 10px;
}

.guest-picker-section + .guest-picker-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.guest-picker-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.guest-picker-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-light);
  background: var(--surface-alt);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}

.guest-picker-item strong,
.guest-picker-item span {
  display: block;
}

.guest-picker-item strong {
  font-size: 0.875rem;
  color: var(--text);
}

.guest-picker-item span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.guest-mini-input,
.guest-mini-textarea {
  margin-bottom: 8px;
}

.guest-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.guest-linked-card {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--primary-pale);
  background: var(--primary-pale);
  border-radius: var(--radius-xs);
}

.guest-linked-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.guest-linked-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.ai-assistant-panel {
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(108, 60, 225, 0.04), rgba(255, 255, 255, 1));
}

.ai-assistant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ai-assistant-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.ai-assistant-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.ai-assistant-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.ai-assistant-error {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--danger);
}

.ai-assistant-results {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.ai-result-block {
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  background: var(--surface);
}

.ai-result-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.ai-result-list {
  margin-left: 18px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.ai-result-list li + li {
  margin-top: 6px;
}

@media (max-width: 640px) {
  .ai-assistant-panel {
    padding: 14px;
  }

  .ai-assistant-actions {
    flex-direction: column;
  }

  .ai-assistant-actions .btn-primary,
  .ai-assistant-actions .btn-secondary {
    width: 100%;
  }
}

.email-outreach-panel {
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.04), rgba(255, 255, 255, 1));
}

.email-outreach-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.email-outreach-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.email-outreach-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.email-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--surface-alt);
  color: var(--text-muted);
  white-space: nowrap;
}

.email-status-draft {
  background: var(--surface-alt);
  color: var(--text-muted);
}

.email-status-sending {
  background: var(--warning-light);
  color: #92400E;
}

.email-status-sent {
  background: var(--success-light);
  color: #065F46;
}

.email-status-error {
  background: var(--danger-light);
  color: #991B1B;
}

.email-outreach-error {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--danger);
}

.email-outreach-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.email-message {
  min-height: 180px;
}

@media (max-width: 640px) {
  .email-outreach-panel {
    padding: 14px;
  }

  .email-outreach-header {
    flex-direction: column;
  }

  .email-outreach-actions .btn-primary {
    width: 100%;
  }
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.analytics-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  animation: fadeInUp 0.4s ease both;
}

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

.analytics-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.analytics-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.analytics-chart-wrap {
  position: relative;
  min-height: 240px;
}

.analytics-canvas {
  width: 100% !important;
  height: 240px !important;
}

.analytics-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 24px;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

.analytics-skeleton-chart {
  height: 240px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  margin-top: 16px;
}

@media (max-width: 640px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-panel {
    padding: 14px;
  }

  .analytics-chart-wrap,
  .analytics-empty,
  .analytics-skeleton-chart {
    min-height: 220px;
  }

  .analytics-canvas {
    height: 220px !important;
  }
}
