/* Dashboard styles — extends landing page theme */
:root {
  --bg: #0A0A0F;
  --bg2: #111118;
  --fg: #F0EDE8;
  --fg2: #8A8A95;
  --accent: #F5A623;
  --accent2: #E8921A;
  --border: #1E1E28;
  --card: #111118;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* NAV */
.nav { padding: 20px 48px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-head); font-size: 18px; font-weight: 700; letter-spacing: -0.03em; color: var(--fg); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--fg2); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-actions { display: flex; gap: 12px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: #0A0A0F; }
.btn-primary:hover { background: var(--accent2); }
.btn-secondary { background: var(--bg2); color: var(--fg); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--fg2); }
.btn-danger { background: #2a1212; color: #e05; border: 1px solid #4a2020; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* LAYOUT */
.container { max-width: 1100px; margin: 0 auto; padding: 40px 48px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.page-title { font-family: var(--font-head); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.stat-label { font-size: 12px; color: var(--fg2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-num { font-family: var(--font-head); font-size: 36px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.stat-sub { font-size: 12px; color: var(--fg2); margin-top: 4px; }

/* CAMPAIGNS TABLE */
.section-title { font-family: var(--font-head); font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--fg2); }
.table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 40px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 14px 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg2); border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
td { padding: 14px 20px; font-size: 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
.td-name { font-weight: 500; }
.td-email { color: var(--fg2); font-size: 13px; }
.td-company { font-size: 13px; }

/* STATUS BADGES */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.badge-draft { background: rgba(138,138,149,0.15); color: var(--fg2); }
.badge-pending { background: rgba(245,166,35,0.15); color: var(--accent); }
.badge-generated { background: rgba(100,180,255,0.15); color: #64b4ff; }
.badge-sent { background: rgba(80,220,150,0.15); color: #50dc96; }
.badge-failed { background: rgba(255,80,80,0.15); color: #e05050; }
.badge-active { background: rgba(80,220,150,0.15); color: #50dc96; }
.badge-paused { background: rgba(138,138,149,0.15); color: var(--fg2); }

/* PROSPECTS TABLE */
.rate-bar { display: flex; align-items: center; gap: 8px; }
.rate-fill { height: 6px; background: var(--accent); border-radius: 3px; transition: width 0.5s ease; }
.rate-pct { font-size: 12px; color: var(--fg2); min-width: 36px; }

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--fg2); }
.form-input, .form-textarea, .form-select { width: 100%; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--fg); font-size: 14px; font-family: var(--font-body); transition: border-color 0.2s; }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--fg2); margin-top: 4px; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 32px; max-width: 560px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--fg2); font-size: 24px; cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--fg); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* FILE UPLOAD */
.upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 48px; text-align: center; cursor: pointer; transition: all 0.2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: rgba(245,166,35,0.05); }
.upload-icon { font-size: 40px; margin-bottom: 12px; }
.upload-text { font-size: 14px; color: var(--fg2); }
.upload-text strong { color: var(--accent); }

/* TOAST */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 20px; font-size: 14px; z-index: 9999; animation: toastIn 0.3s ease; max-width: 360px; }
.toast-success { border-color: #50dc96; }
.toast-error { border-color: #e05050; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* EMAIL PREVIEW */
.email-preview { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-top: 12px; }
.email-subject { font-size: 13px; color: var(--fg2); margin-bottom: 8px; }
.email-body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; color: var(--fg2); }
.empty-state h3 { font-family: var(--font-head); font-size: 18px; margin-bottom: 8px; color: var(--fg); }

/* CSV Preview */
.csv-preview { max-height: 200px; overflow-y: auto; margin-top: 12px; }
.csv-preview table { font-size: 12px; }
.csv-preview th, .csv-preview td { padding: 8px 12px; }

/* TABS */
.tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.tab { padding: 12px 20px; font-size: 14px; color: var(--fg2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.2s; }
.tab:hover { color: var(--fg); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* SECTIONS */
.section { display: none; }
.section.active { display: block; }