/* OutboundOS Design System */
:root {
  --bg: #1a1916;
  --bg-2: #211f1b;
  --bg-card: #262420;
  --fg: #f0ece4;
  --fg-muted: #9a9086;
  --accent: #e8a04a;
  --accent-2: #d4893a;
  --accent-glow: rgba(232, 160, 74, 0.15);
  --green: #6bc97b;
  --amber: #e8a04a;
  --red: #e85c4a;
  --border: #2e2b27;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(26, 25, 22, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo-mark { color: var(--accent); font-size: 14px; }
.logo-text { color: var(--fg); }
.nav-tagline { font-size: 13px; color: var(--fg-muted); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: #1a1916;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--fg-muted); background: var(--bg-card); }

/* ─── HERO ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 80px 48px 100px;
  align-items: center;
  min-height: 80vh;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(232,160,74,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 90% 80%, rgba(232,160,74,0.04) 0%, transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 28px;
}
.hero-headline .accent { color: var(--accent); }
.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-muted);
  max-width: 460px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.stat-label { font-size: 13px; color: var(--fg-muted); margin-top: 4px; }

/* Hero visual */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}
.email-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.email-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.email-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #1a1916;
}
.email-meta { flex: 1; }
.email-from { font-size: 13px; font-weight: 600; color: var(--fg); }
.email-subject { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }
.email-body { font-size: 14px; color: var(--fg-muted); line-height: 1.6; }
.email-body strong { color: var(--fg); font-weight: 500; }
.email-tag {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── FEATURES ─── */
.features { padding: 80px 48px; border-bottom: 1px solid var(--border); }
.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 16px;
  color: var(--fg-muted);
  max-width: 560px;
  margin-bottom: 56px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: rgba(232,160,74,0.3);
  box-shadow: 0 0 0 1px rgba(232,160,74,0.1);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 20px;
}
.feature-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.feature-desc { font-size: 14px; color: var(--fg-muted); line-height: 1.6; }

/* ─── HOW IT WORKS ─── */
.how-it-works { padding: 80px 48px; border-bottom: 1px solid var(--border); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.step-card { text-align: left; }
.step-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--border);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}
.step-title { font-size: 16px; font-weight: 600; color: var(--fg); margin-bottom: 8px; }
.step-desc { font-size: 14px; color: var(--fg-muted); line-height: 1.6; }

/* ─── CTA ─── */
.cta-section {
  padding: 100px 48px;
  text-align: center;
  background:
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(232,160,74,0.08) 0%, transparent 60%),
    var(--bg);
}
.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 20px;
}
.cta-sub { font-size: 17px; color: var(--fg-muted); margin-bottom: 36px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ─── FOOTER ─── */
.footer {
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--fg-muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--fg-muted); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--fg); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 48px 24px 64px; min-height: auto; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .features, .how-it-works, .cta-section, .footer { padding: 48px 24px; }
}

/* ─── APP SHELL ─── */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
  text-decoration: none;
}
.sidebar-logo .logo-mark { font-size: 12px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav a:hover { background: var(--bg-card); color: var(--fg); }
.sidebar-nav a.active { background: var(--accent-glow); color: var(--accent); }
.sidebar-nav a .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-topbar {
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}
.app-topbar h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* ─── DASHBOARD CARDS ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.stat-card .stat-value.accent { color: var(--accent); }
.stat-card .stat-value.green { color: var(--green); }
.stat-card .stat-value.red { color: var(--red); }

/* ─── CAMPAIGN LIST ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.campaign-list { display: flex; flex-direction: column; gap: 12px; }
.campaign-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 24px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.campaign-row:hover { border-color: var(--fg-muted); }
.campaign-row:hover .campaign-name { color: var(--accent); }
.campaign-name { font-size: 16px; font-weight: 600; color: var(--fg); transition: color 0.15s; }
.campaign-meta { font-size: 13px; color: var(--fg-muted); margin-top: 4px; }
.campaign-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.campaign-status.draft { background: rgba(154,144,134,0.15); color: var(--fg-muted); }
.campaign-status.active { background: rgba(107,201,123,0.15); color: var(--green); }
.campaign-status.paused { background: rgba(232,160,74,0.15); color: var(--amber); }
.campaign-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.btn-sm {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-sm.primary { background: var(--accent); color: #1a1916; }
.btn-sm.primary:hover { background: var(--accent-2); }
.btn-sm.secondary { background: var(--bg-2); color: var(--fg); border: 1px solid var(--border); }
.btn-sm.secondary:hover { background: var(--border); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 24px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--fg);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--fg-muted); opacity: 0.6; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ─── PROSPECTS TABLE ─── */
.prospects-table {
  width: 100%;
  border-collapse: collapse;
}
.prospects-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.prospects-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}
.prospects-table tr:hover td { background: var(--bg-2); }
.prospects-table .email-cell { color: var(--fg-muted); font-size: 13px; }
.prospect-name-cell { display: flex; align-items: center; gap: 12px; }
.prospect-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.badge.ai { background: rgba(232,160,74,0.15); color: var(--accent); }
.badge.queued { background: rgba(107,201,123,0.15); color: var(--green); }
.badge.pending { background: rgba(154,144,134,0.15); color: var(--fg-muted); }
.badge.sent { background: rgba(107,201,123,0.1); color: #4a9e5c; }

/* ─── SEQUENCE BUILDER ─── */
.sequence-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.sequence-step {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.step-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
}
.step-badge-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1916;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.delay-badge {
  font-size: 12px;
  color: var(--fg-muted);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--fg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.3s ease;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--fg-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--fg); margin-bottom: 8px; }
.empty-state p { font-size: 14px; line-height: 1.6; }

/* ─── LOADING ─── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .app-sidebar { display: none; }
}