/* PressLoop App Shell — matches landing page design tokens */

:root {
  --ink: #0F172A;
  --ink-muted: #334155;
  --surface: #FAFAF8;
  --surface-2: #F4F3EF;
  --border: #E5E4DF;
  --accent: #E85D26;
  --accent-hover: #D14E1A;
  --white: #FFFFFF;
  --success: #16A34A;
  --success-bg: #DCFCE7;
  --error: #DC2626;
  --error-bg: #FEE2E2;
  --info-bg: #EFF6FF;
  --info: #1D4ED8;
}

/* App body override — light surface for the dashboard */
.app-body {
  background: var(--surface);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
}

/* App nav */
.app-nav {
  background: var(--ink);
  padding: 14px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-nav-links {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.app-nav-link {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}
.app-nav-link:hover, .app-nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.nav-logo {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* Stats bar */
.dash-stats-bar {
  background: var(--ink);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 0;
}
.dash-stat {
  flex: 1;
  text-align: center;
}
.dash-stat-value {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.04em;
}
.dash-stat-label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.dash-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
}

/* App layout */
.app-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 48px;
}

.app-content {
  margin-top: 32px;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.app-title {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.app-subtitle {
  font-size: 14px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Campaign grid */
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.campaign-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.15s;
}
.campaign-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(232,93,38,0.08);
  transform: translateY(-2px);
}
.campaign-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.campaign-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.campaign-niche {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.campaign-desc {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.campaign-metrics {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}
.metric {
  text-align: center;
}
.metric-value {
  display: block;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.metric-label {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 1px;
}

/* Status badges */
.campaign-status, .status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: capitalize;
  white-space: nowrap;
}
.status-active, .status-sent { background: #DBEAFE; color: #1D4ED8; }
.status-discovered { background: #F3F4F6; color: #374151; }
.status-contacted { background: #DBEAFE; color: #1D4ED8; }
.status-replied { background: var(--success-bg); color: var(--success); }
.status-paused { background: #FEF3C7; color: #92400E; }

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--ink-muted); }

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-muted); }

.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-xs.btn-primary { font-weight: 600; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.empty-desc { font-size: 14px; color: var(--ink-muted); max-width: 400px; margin: 0 auto 24px; line-height: 1.6; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ink-muted);
  line-height: 1;
  padding: 0 4px;
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-optional { font-weight: 400; color: var(--ink-muted); }
.form-hint { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border 0.15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
}
.form-textarea { min-height: 80px; resize: vertical; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* Contacts table */
.contacts-table-wrap { overflow-x: auto; }
.contacts-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.contacts-table thead {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.contacts-table th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-align: left;
}
.contacts-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.contact-row:last-child td { border-bottom: none; }
.contact-row:hover { background: var(--surface); }
.contact-name { font-weight: 600; color: var(--ink); }
.contact-twitter { font-size: 12px; color: var(--ink-muted); margin-top: 1px; }
.contact-outlet { font-size: 13px; font-weight: 500; color: var(--ink); display: block; }
.contact-beat { font-size: 12px; color: var(--ink-muted); }
.contact-email { font-size: 12px; color: var(--ink-muted); font-family: monospace; }
.no-email { font-size: 12px; color: #CBD5E1; }

/* Source badges */
.source-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.source-techcrunch { background: #FEE2E2; color: #DC2626; }
.source-forbes { background: #FEF3C7; color: #92400E; }
.source-wired { background: #F3F4F6; color: #374151; }
.source-podcast { background: #EDE9FE; color: #7C3AED; }
.source-newsletter { background: #D1FAE5; color: #065F46; }
.source-inc { background: #DBEAFE; color: #1D4ED8; }
.source-venturebeat { background: #FCE7F3; color: #9D174D; }
.source-ai { background: #F3F4F6; color: #6B7280; }

/* Campaign page header */
.campaign-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.campaign-page-breadcrumb {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.breadcrumb-link { color: var(--accent); text-decoration: none; }
.breadcrumb-sep { margin: 0 6px; }
.campaign-niche-tag { font-size: 14px; color: var(--ink-muted); margin-top: 4px; }
.campaign-page-desc { font-size: 13px; color: var(--ink-muted); margin-top: 6px; max-width: 600px; line-height: 1.6; }
.campaign-page-actions { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }

/* Section header */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-weight: 600; font-size: 16px; color: var(--ink); }
.section-filters { display: flex; gap: 8px; }

/* Status message */
.status-msg {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}
.status-info { background: var(--info-bg); color: var(--info); }
.status-success { background: var(--success-bg); color: var(--success); }
.status-error { background: var(--error-bg); color: var(--error); }

.text-success { color: var(--success); font-weight: 600; }
.text-muted { color: var(--ink-muted); }
