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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f0f4f8;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  background: #0d1f3c;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 3px solid #2563eb;
  flex-wrap: wrap;
}

.site-header-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
}

.site-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* legacy h1 inside header (login/register pages) */
.site-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.site-header .tagline {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Nav ── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.active { color: #fff; background: rgba(255,255,255,0.12); }
.nav-logout { color: #64748b; }
.nav-logout:hover { color: #f87171; background: rgba(248,113,113,0.1); }

/* ── Main Content ── */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 24px;
}

/* ── Upload Card ── */
.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(13, 31, 60, 0.10);
  padding: 40px 44px;
  width: 100%;
  max-width: 580px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0d1f3c;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Step Indicator ── */
.step-indicator {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 8px;
}

/* ── Form ── */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.required {
  color: #e11d48;
  font-weight: 700;
}

.helper-text {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.helper-text svg { flex-shrink: 0; }

.field-error {
  font-size: 0.8rem;
  color: #b91c1c;
  margin-top: 5px;
  min-height: 16px;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
}

input[type="password"]:focus,
input[type="text"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}

textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}

textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}

/* ── Step Navigation ── */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 12px;
}

.step-next-btn {
  width: auto;
  padding: 11px 28px;
  margin-top: 0;
}

/* ── File Upload ── */
.file-upload-area {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #f8fafc;
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.upload-icon { margin-bottom: 8px; color: #94a3b8; }

.upload-label {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 2px;
}

.upload-label strong { color: #2563eb; }
.upload-types { font-size: 0.78rem; color: #94a3b8; }

.file-name-display {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #2563eb;
  font-weight: 500;
  min-height: 18px;
}

/* ── Buttons ── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s;
  margin-top: 8px;
  font-family: inherit;
}

.btn-primary:hover  { background: #1d4ed8; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.btn-secondary:hover { background: #e2e8f0; border-color: #94a3b8; }

.btn-back {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}

.btn-back:hover { color: #334155; }

/* ── Error Banner ── */
.error-banner {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: #b91c1c;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ── Info Box (collapsible) ── */
.info-box {
  margin-top: 20px;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f7ff;
}

.info-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.info-toggle:hover { background: #dbeafe; }

.info-toggle .chevron { margin-left: auto; transition: transform 0.2s; }
.info-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.info-content {
  display: none;
  padding: 4px 16px 16px 16px;
  border-top: 1.5px solid #bfdbfe;
}

.info-content.open { display: block; }

.info-content p,
.info-content ol,
.info-content ul {
  font-size: 0.855rem;
  line-height: 1.65;
  color: #1e3a5f;
  margin-top: 10px;
}

.info-content ol,
.info-content ul { padding-left: 18px; }

.info-content li { margin-bottom: 6px; }
.info-content li strong { color: #1d4ed8; }
.info-content li em { color: #475569; }

/* ── Full-page Loading Overlay ── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 31, 60, 0.75);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.loading-box {
  background: #fff;
  border-radius: 12px;
  padding: 36px 48px;
  text-align: center;
  max-width: 380px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3.5px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0d1f3c;
  margin-bottom: 6px;
}

.loading-sub { font-size: 0.85rem; color: #64748b; line-height: 1.5; }

/* ── Results Layout ── */
.results-layout {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-toolbar h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0d1f3c;
}

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

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #0d1f3c;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.btn-download:hover { background: #162d54; }

/* ── Section Cards ── */
.section-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(13, 31, 60, 0.08);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.15s;
}

.section-card:last-child { margin-bottom: 0; }

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 0 28px;
  gap: 12px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d1f3c;
  letter-spacing: -0.01em;
}

.approved-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 99px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Section Content ── */
.section-content-area {
  padding: 16px 28px 20px 28px;
  transition: opacity 0.2s;
}

.section-content-area h1,
.section-content-area h2,
.section-content-area h3 {
  color: #0d1f3c;
  margin-top: 20px;
  margin-bottom: 8px;
  font-weight: 700;
}

.section-content-area h2 { font-size: 1rem; }
.section-content-area h3 { font-size: 0.95rem; }
.section-content-area h1:first-child,
.section-content-area h2:first-child,
.section-content-area h3:first-child { margin-top: 0; }

.section-content-area p {
  font-size: 0.93rem;
  line-height: 1.78;
  color: #334155;
  margin-bottom: 12px;
}

.section-content-area ul,
.section-content-area ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.section-content-area li {
  font-size: 0.93rem;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 5px;
}

.section-content-area blockquote {
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  margin: 12px 0;
  padding: 10px 16px;
  border-radius: 0 6px 6px 0;
}

.section-content-area blockquote p {
  color: #1e40af;
  font-style: italic;
  margin: 0;
}

.section-content-area strong { color: #0d1f3c; font-weight: 600; }

/* ── Section Feedback Row ── */
.section-feedback-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 28px 18px 28px;
  border-top: 1.5px solid #f1f5f9;
  background: #fafafa;
  flex-wrap: wrap;
}

.btn-approve {
  flex-shrink: 0;
  padding: 8px 16px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-approve:hover { background: #e2e8f0; }

.btn-approve.approved {
  background: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
}

.btn-approve:disabled { opacity: 0.5; cursor: not-allowed; }

.section-comment-wrap {
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: flex-start;
  min-width: 200px;
}

.section-comment-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.83rem;
  color: #334155;
  background: #fff;
  resize: vertical;
  min-height: 36px;
  max-height: 120px;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s;
}

.section-comment-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.btn-regenerate {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  font-family: inherit;
}

.btn-regenerate:hover { background: #1d4ed8; }
.btn-regenerate:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Per-section loading overlay ── */
.section-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 10;
  border-radius: 12px;
}

.section-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.section-loading-overlay p {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 500;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .card { padding: 28px 20px; }
  main { padding: 24px 16px; }
  .section-header-row,
  .section-content-area,
  .section-feedback-row { padding-left: 18px; padding-right: 18px; }
  .section-feedback-row { flex-direction: column; }
  .section-comment-wrap { width: 100%; }
}

/* ── Auth layouts ── */
.auth-layout {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.auth-switch {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
  margin-top: 16px;
}

.auth-switch a { color: #2563eb; font-weight: 600; }

/* ── Centered layout (narrow pages) ── */
.centered-layout {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

/* ── Select input ── */
.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
  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' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background-color: #fff;
}

/* ── Success Banner ── */
.success-banner {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: #16a34a;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ── Dashboard ── */
.dashboard-layout {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.dashboard-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0d1f3c;
  margin-bottom: 4px;
}

.dashboard-subtitle {
  font-size: 0.875rem;
  color: #64748b;
}

.btn-new-episode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  padding: 10px 20px;
  margin-top: 0;
  white-space: nowrap;
  text-decoration: none;
}

.dashboard-section {
  margin-bottom: 36px;
}

.section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 12px;
}

/* ── Podcast Cards ── */
.podcast-cards {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.podcast-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0;
  min-width: 180px;
  max-width: 240px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.podcast-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 12px rgba(37,99,235,0.1);
}

.podcast-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d1f3c;
}

.podcast-card-host {
  font-size: 0.8rem;
  color: #64748b;
}

.podcast-card-link {
  font-size: 0.78rem;
  color: #2563eb;
  font-weight: 600;
  margin-top: 6px;
}

/* ── Episode Table ── */
.episode-table-wrap {
  background: #fff;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  overflow: hidden;
}

.episode-table {
  width: 100%;
  border-collapse: collapse;
}

.episode-table th {
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1.5px solid #e2e8f0;
}

.episode-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  color: #334155;
  vertical-align: middle;
}

.episode-row:last-child td { border-bottom: none; }
.episode-row { cursor: pointer; transition: background 0.1s; }
.episode-row:hover td { background: #f8fafc; }

.episode-guest a {
  color: #0d1f3c;
  font-weight: 600;
  text-decoration: none;
}

.episode-guest a:hover { color: #2563eb; }

.episode-date { color: #94a3b8; font-size: 0.82rem; }

/* ── Status Badges ── */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

.status-not-started {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.status-in-progress {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fde68a;
}

.status-approved {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ── Empty State ── */
.empty-state {
  background: #fff;
  border-radius: 10px;
  border: 1.5px dashed #cbd5e1;
  padding: 32px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.empty-state a { color: #2563eb; font-weight: 600; }

/* ── Episode Detail ── */
.episode-detail-header {
  margin-bottom: 24px;
}

.btn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.btn-back-link:hover { color: #2563eb; }

.episode-meta-row {
  display: flex;
  gap: 20px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.episode-meta-item {
  font-size: 0.85rem;
  color: #64748b;
}

.episode-meta-item strong { color: #334155; }

/* ── Asset Link Cards ── */
.asset-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-link-card {
  display: block;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.asset-link-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 12px rgba(37,99,235,0.08);
}

.asset-link-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.asset-link-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d1f3c;
}

.asset-link-desc {
  font-size: 0.83rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 8px;
}

.asset-link-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2563eb;
}

/* ── Section card approved variant ── */
.section-card--approved {
  border-left: 4px solid #16a34a;
}

/* ── Generate bar ── */
.generate-bar {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.generate-bar-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #16a34a;
}

.generate-bar-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-generate {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: #0d1f3c;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-generate:hover { background: #162d54; }
.btn-generate:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-generate-promo {
  background: #2563eb;
}

.btn-generate-promo:hover { background: #1d4ed8; }

/* ── Empty generate state ── */
.empty-generate-state {
  background: #fff;
  border-radius: 12px;
  border: 1.5px dashed #cbd5e1;
  padding: 40px 32px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ── Register: podcast blocks ── */
.podcast-block {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.podcast-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.podcast-block-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0d1f3c;
  margin-bottom: 14px;
}

.btn-remove-podcast {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.btn-remove-podcast:hover { color: #b91c1c; background: #fef2f2; }

.btn-add-podcast {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
  margin-top: 4px;
}

.btn-add-podcast:hover { background: #e2e8f0; border-color: #94a3b8; }

/* ── Podcast Branding page ── */
.branding-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1.5px solid #f1f5f9;
}

.branding-section:last-of-type { border-bottom: none; }

.branding-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0d1f3c;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.branding-section-note {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: -10px;
  margin-bottom: 16px;
}

.branding-field {
  margin-bottom: 20px;
}

.branding-field > label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  display: block;
  margin-bottom: 6px;
}

.branding-field-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.branding-textarea-wrap {
  position: relative;
}

.branding-textarea {
  width: 100%;
  padding: 10px 12px;
  padding-bottom: 24px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #f8fafc;
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.branding-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}

.char-counter {
  position: absolute;
  bottom: 7px;
  right: 10px;
  font-size: 0.72rem;
  color: #94a3b8;
  pointer-events: none;
  font-family: inherit;
}

.counter-warn { color: #ca8a04; }
.counter-limit { color: #b91c1c; font-weight: 700; }

.branding-file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.file-upload-label:hover { background: #e2e8f0; border-color: #94a3b8; }

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.file-upload-name {
  font-size: 0.8rem;
  color: #2563eb;
  font-weight: 500;
}

/* ── Instructions block (content analysis & asset pages) ── */
.instructions-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.instructions-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.instructions-body {
  font-size: 0.88rem;
  color: #1e3a5f;
  line-height: 1.55;
}

.instructions-body strong {
  color: #1d4ed8;
}

/* ── Generate bar variants ── */
.generate-bar--ready {
  background: #f0fdf4;
  border-color: #86efac;
}

.generate-bar--ready .approval-progress {
  color: #16a34a;
  font-weight: 600;
}

.btn-generate:disabled,
.btn-generate-promo:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Upload CA section ── */
.upload-ca-details {
  margin-top: 32px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.upload-ca-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  list-style: none;
  background: #f8fafc;
  user-select: none;
}

.upload-ca-summary::-webkit-details-marker { display: none; }
.upload-ca-summary:hover { background: #f1f5f9; color: #1e293b; }

.upload-ca-body {
  padding: 16px;
  border-top: 1.5px solid #e2e8f0;
  background: #fff;
}

.upload-ca-body p {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 14px;
}

.upload-ca-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-ca-area {
  padding: 16px;
  text-align: center;
}

/* ── Approve button unapprove warning on hover ── */
.btn-approve.approved:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* ── Podcast card with images ── */
.podcast-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.podcast-card-artwork {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 10px 10px 0 0;
}

.podcast-card-artwork-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.podcast-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.podcast-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.podcast-card-headshot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #e2e8f0;
}

/* ── Image upload widget ── */
.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.img-upload-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 12px;
  border: 2px dashed #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
  overflow: hidden;
}

.img-upload-area:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
}

.img-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.img-upload-name {
  font-size: 0.78rem;
  color: #2563eb;
  margin-top: 4px;
  font-weight: 500;
  min-height: 1em;
}

/* ── Branding page image preview ── */
.branding-img-current {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.branding-img-preview {
  object-fit: cover;
  border: 1.5px solid #e2e8f0;
}

.branding-img-square {
  width: 56px;
  height: 56px;
  border-radius: 6px;
}

.branding-img-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.branding-img-label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ── Account settings page ── */
.account-info-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.account-info-label {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 110px;
}

.account-info-value {
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 500;
}

.account-section {
  margin-bottom: 24px;
}

.account-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 14px;
}

.account-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 24px 0;
}

/* ── Responsive additions ── */
@media (max-width: 640px) {
  .dashboard-header { flex-direction: column; align-items: flex-start; }
  .btn-new-episode { align-self: stretch; justify-content: center; }
  .episode-table th:nth-child(2),
  .episode-table td:nth-child(2) { display: none; }
  .episode-table th:nth-child(3),
  .episode-table td:nth-child(3) { display: none; }
  .generate-bar { flex-direction: column; align-items: flex-start; }
  .podcast-cards { flex-direction: column; }
}
