/* === APP PAGES (intake, dashboard, reports) === */

/* Page layout */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.page-header {
  margin-bottom: 2.5rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.page-sub {
  font-size: 1rem;
  color: var(--fg-muted);
}

/* Client banner */
.client-banner {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

/* Form card */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.form-section {
  padding: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type { border-bottom: none; }
.form-section-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.form-field:last-child { margin-bottom: 0; }
.form-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
}
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.625rem 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
}
.form-field textarea {
  resize: vertical;
  min-height: 80px;
}
.field-hint {
  font-size: 0.75rem;
  color: var(--fg-muted);
  opacity: 0.7;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  margin-top: 1.5rem;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  display: inline-block;
  background: var(--bg-card-alt);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-ghost:hover { border-color: rgba(245,166,35,0.3); }

/* Video list */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.video-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.video-row:last-child { border-bottom: none; }
.video-row--full { align-items: flex-start; }
.video-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.video-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-meta {
  font-size: 0.78rem;
  color: var(--fg-muted);
}
.video-notes {
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

/* Status badges */
.status-badge {
  flex-shrink: 0;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-received { background: rgba(255,255,255,0.06); color: var(--fg-muted); }
.status-editing { background: rgba(245,166,35,0.15); color: var(--accent); }
.status-ready { background: rgba(45,200,80,0.12); color: #2dc850; }
.status-posted { background: rgba(45,150,255,0.12); color: #4da6ff; }

/* Status select (dashboard) */
.status-select {
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.status-select.status-received { background: rgba(255,255,255,0.06); color: var(--fg-muted); }
.status-select.status-editing { background: rgba(245,166,35,0.15); color: var(--accent); }
.status-select.status-ready { background: rgba(45,200,80,0.12); color: #2dc850; }
.status-select.status-posted { background: rgba(45,150,255,0.12); color: #4da6ff; }

/* Client card */
.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.client-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.client-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.2rem;
}
.client-meta { font-size: 0.85rem; color: var(--fg-muted); }

/* Pipeline tracker */
.pipeline {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.pipeline-step {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  transition: border-color 0.2s;
}
.pipeline-step.has-clips {
  border-color: rgba(245,166,35,0.2);
}
.pipeline-step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}
.pipeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.pipeline-step.has-clips .pipeline-dot { background: var(--accent); }
.pipeline-label { color: var(--fg-muted); font-weight: 500; }
.pipeline-count {
  margin-left: auto;
  font-weight: 700;
  color: var(--fg);
  font-size: 0.8rem;
}

/* Reports */
.week-group { margin-bottom: 3rem; }
.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.week-header h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
}
.week-meta {
  font-size: 0.78rem;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.5rem;
}
.report-client {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
}
.report-videos {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}
.report-metrics {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.metric-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
}
.metric-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.report-notes {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.5;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Summary row */
.summary-row {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 2rem;
}
.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.summary-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.summary-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* Recent clips */
.recent-clips {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .pipeline { flex-wrap: wrap; }
  .pipeline-step { min-width: 45%; }
  .summary-row { flex-wrap: wrap; }
  .client-card-header { flex-direction: column; }
}