/* Castflow App Styles — extends theme.css */

.app-main {
  padding-top: 5rem;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Research Form */
.research-form-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.form-group .optional {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

.form-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
  background: var(--accent);
  color: #080703;
  border: none;
  border-radius: 8px;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}

.btn-primary:hover:not(:disabled) { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  width: auto;
}

.error-msg {
  margin-top: 1rem;
  color: #ef4444;
  font-size: 0.875rem;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 6px;
}

/* Sessions list */
.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.75rem;
  transition: background 0.2s;
}
.session-row:hover { background: rgba(255, 255, 255, 0.06); }

.session-info { display: flex; flex-direction: column; gap: 0.25rem; }
.session-topic { font-weight: 500; font-size: 0.9375rem; }
.session-meta { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.4); }

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pending { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }
.status-in_progress { background: rgba(245,158,11,0.15); color: var(--accent); }
.status-completed { background: rgba(34,197,94,0.15); color: #22c55e; }
.status-failed { background: rgba(239,68,68,0.15); color: #ef4444; }

/* Session page */
.session-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  gap: 1rem;
}
.session-topic-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.session-meta { font-size: 0.875rem; color: rgba(255,255,255,0.4); }
.session-meta .sep { margin: 0 0.5rem; }
.session-actions { flex-shrink: 0; }

.status-banner {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}
.status-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); color: #22c55e; }
.status-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #ef4444; }
.status-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); color: var(--accent); }

/* Guest cards grid */
.guests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.guest-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.guest-card:hover { border-color: rgba(245,158,11,0.2); }

.guest-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.guest-number {
  width: 32px;
  height: 32px;
  background: rgba(245,158,11,0.15);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.guest-name { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.25rem; }
.guest-role { font-size: 0.875rem; color: rgba(255,255,255,0.5); }
.guest-bio { font-size: 0.9375rem; color: rgba(255,255,255,0.7); line-height: 1.6; margin: 0.75rem 0; }

.guest-section { margin-top: 1rem; }
.guest-section-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); margin-bottom: 0.5rem; }
.talking-points { list-style: none; padding: 0; margin: 0; }
.talking-points li { font-size: 0.875rem; color: rgba(255,255,255,0.75); padding: 0.35rem 0; padding-left: 1rem; position: relative; }
.talking-points li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

.flag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.flag { font-size: 0.8125rem; padding: 0.25rem 0.75rem; background: rgba(239,68,68,0.1); color: #f87171; border-radius: 20px; border: 1px solid rgba(239,68,68,0.2); }

.guest-email-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.email-count-badge { font-size: 0.8125rem; color: rgba(255,255,255,0.4); }
.no-emails { font-size: 0.8125rem; color: rgba(255,255,255,0.25); }
.btn-view-emails {
  background: rgba(245,158,11,0.15);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  border: 1px solid rgba(245,158,11,0.25);
  transition: background 0.2s;
}
.btn-view-emails:hover { background: rgba(245,158,11,0.25); }

/* Outreach page */
.outreach-header { margin-bottom: 2.5rem; }
.back-link { color: rgba(255,255,255,0.4); text-decoration: none; font-size: 0.875rem; display: inline-block; margin-bottom: 1rem; }
.back-link:hover { color: rgba(255,255,255,0.7); }
.guest-name-large { font-family: 'Space Grotesk', sans-serif; font-size: 2.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.guest-role-large { font-size: 1rem; color: rgba(255,255,255,0.5); }

.dossier-section { margin-bottom: 3rem; }
.section-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 600; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
.dossier-bio { font-size: 1rem; color: rgba(255,255,255,0.75); line-height: 1.7; margin-bottom: 1.5rem; }
.dossier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.dossier-block-title { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); margin-bottom: 0.75rem; }
.talking-points-list { list-style: none; padding: 0; margin: 0; }
.talking-points-list li { font-size: 0.9rem; color: rgba(255,255,255,0.75); padding: 0.4rem 0; padding-left: 1rem; position: relative; line-height: 1.5; }
.talking-points-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }
.flag-chip { display: inline-block; font-size: 0.8125rem; padding: 0.25rem 0.75rem; background: rgba(239,68,68,0.1); color: #f87171; border-radius: 20px; border: 1px solid rgba(239,68,68,0.2); margin: 0.25rem 0.25rem 0.25rem 0; }
.empty-state { font-size: 0.875rem; color: rgba(255,255,255,0.25); font-style: italic; }

/* Email cards */
.email-cards { display: flex; flex-direction: column; gap: 1.5rem; }
.email-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.5rem;
}
.email-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.email-sequence-badge { font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.email-meta { display: flex; align-items: center; gap: 0.75rem; }
.status-pill { font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em; }
.status-pill.status-draft { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
.status-pill.status-sent { background: rgba(34,197,94,0.15); color: #22c55e; }
.status-pill.status-failed { background: rgba(239,68,68,0.15); color: #ef4444; }
.sent-date { font-size: 0.8125rem; color: rgba(255,255,255,0.3); }

.email-subject-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--fg);
  font-size: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  padding: 0.5rem 0;
  outline: none;
  transition: border-color 0.2s;
}
.email-subject-input:focus { border-color: var(--accent); }
.email-subject-input[readonly] { color: rgba(255,255,255,0.5); }

.email-body-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9375rem;
  font-family: inherit;
  padding: 0.875rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.email-body-input:focus { border-color: var(--accent); }
.email-body-input[readonly] { color: rgba(255,255,255,0.4); }

.email-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.btn-send {
  background: var(--accent);
  color: #080703;
  border: none;
  border-radius: 6px;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-send:hover:not(:disabled) { opacity: 0.85; }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-save {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-save:hover { background: rgba(255,255,255,0.12); }

.email-feedback { font-size: 0.8125rem; }
.email-feedback.success { color: #22c55e; }
.email-feedback.error { color: #ef4444; }

.batch-actions { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.06); }

@media (max-width: 600px) {
  .container { padding: 1.25rem; }
  .dossier-grid { grid-template-columns: 1fr; }
  .session-header { flex-direction: column; }
  .session-actions { width: 100%; }
  .session-actions .btn-primary { width: 100%; }
}