/* ─── APP SHELL ─── */
.app-body {
  background: var(--bg);
  min-height: 100vh;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent);
}

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

.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem;
}

.app-container--narrow {
  max-width: 720px;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

.btn-launch {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
}

/* ─── PAGE HEADER ─── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--fg-muted);
}

/* ─── CAMPAIGN GRID ─── */
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.campaign-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--fg);
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}

.campaign-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-3px);
}

.campaign-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.campaign-name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.campaign-icp {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.campaign-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

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

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.campaign-date {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* ─── STATUS BADGES ─── */
.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-draft { background: rgba(139,139,158,0.15); color: var(--fg-muted); }
.status-active { background: var(--green-glow); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.status-completed { background: rgba(59,130,246,0.1); color: #60a5fa; }

.status-dot {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
}

.status-dot.status-pending { background: rgba(139,139,158,0.12); color: var(--fg-muted); }
.status-dot.status-sent { background: var(--green-glow); color: var(--green); }
.status-dot.status-failed { background: rgba(239,68,68,0.1); color: #ef4444; }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.empty-state p {
  color: var(--fg-muted);
  margin-bottom: 1.75rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-inline {
  padding: 2rem;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

/* ─── FORMS ─── */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.form-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
}

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

.form-hint {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.form-actions--compact {
  padding-top: 0.5rem;
}

/* ─── ALERTS ─── */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: var(--green-glow);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.alert-error {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.2);
}

/* ─── CAMPAIGN DETAIL ─── */
.campaign-detail-header {
  margin-bottom: 2rem;
}

.campaign-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.icp-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.icp-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.icp-text {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ─── STATS ROW ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.stat-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-card-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.text-orange { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: #ef4444; }
.text-muted { color: var(--fg-muted); }

/* ─── SECTION CARD ─── */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-card-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ─── ADD PROSPECTS ─── */
.add-prospects-form {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* ─── TABLE ─── */
.table-wrapper {
  overflow-x: auto;
}

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

.data-table th {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.td-email {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.87rem;
  color: var(--fg);
}

/* ─── SENDS DETAIL ─── */
.sends-detail {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.send-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.send-subject {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.send-status {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.send-body-preview {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .campaign-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .campaign-detail-title-row { flex-direction: column; }
}
