/* AI SDR — Lavender light design system v13 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ── Light background / surface tokens (FIX 1) ── */
  --bg-canvas:   #FDFBFF;
  --bg-surface:  #FFFFFF;
  --bg-sidebar:  #F9F5FF;
  --bg-hover:    #F5EDFF;
  --bg-selected: #EDE0FF;

  /* ── Borders ── */
  --border-subtle:  #F0E7FC;
  --border-default: #E2D2F5;

  /* ── Legacy aliases — used throughout component CSS ── */
  --bg:      var(--bg-canvas);
  --bg-2:    var(--bg-sidebar);
  --panel:   var(--bg-surface);
  --panel-2: var(--bg-hover);
  --border:  var(--border-subtle);
  --border-2: var(--border-default);

  /* ── Text ── */
  --text:  #1a1523;
  --muted: #7c6fa0;

  /* ── Lavender accent palette (unchanged per FIX 1) ── */
  --accent:        #9b8cde;
  --accent-light:  #b8aeff;
  --accent-hover:  #7f6ec8;
  --accent-bg:     #EDE0FF;
  --accent-border: #c4b5fd;

  /* ── Status colours (light mode) ── */
  --good:    #16a34a;
  --good-bg: #f0fdf4;
  --warn:    #d97706;
  --warn-bg: #fffbeb;
  --bad:     #dc2626;
  --bad-bg:  #fef2f2;
  --teal:    #0d9488;
  --teal-bg: #f0fdfa;

  /* ── Shadows — 50% lighter per FIX 1 ── */
  --shadow-sm: 0 1px 2px rgba(124, 58, 237, 0.03);
  --shadow-md: 0 2px 8px rgba(124, 58, 237, 0.04);
  --shadow-lg: 0 8px 24px rgba(124, 58, 237, 0.06);

  /* ── Layout ── */
  --sidebar-w: 224px;
  --topbar-h:  0px;

  /* ── Typography ── */
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg-canvas);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-hover); text-decoration: none; }
a:hover { color: var(--accent); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── App shell ── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand .brand-icon {
  width: 28px; height: 28px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.sidebar-brand .brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.sidebar-nav {
  padding: 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav-group {
  margin-top: 16px;
  margin-bottom: 4px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.1s, color 0.1s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active {
  background: var(--bg-selected);
  color: #5b21b6;
  border-color: var(--accent-border);
}
.nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-bottom {
  padding: 12px 10px;
  border-top: 1px solid var(--border-subtle);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}
.user-chip .user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: #5b21b6;
  font-weight: 600;
  flex-shrink: 0;
}
.user-chip .user-info { flex: 1; min-width: 0; }
.user-chip .user-email { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .user-plan { font-size: 11px; font-weight: 600; color: var(--accent-hover); }
.tenant-picker-wrap { margin-bottom: 8px; }
.tenant-picker-wrap select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
}

/* ── Main content area ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
}
.view { display: none; flex: 1; flex-direction: column; }
.view.active { display: flex; }

/* ── Page header ── */
.page-header {
  padding: 24px 32px 0;
  flex-shrink: 0;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 4px;
}
.page-subtitle { font-size: 13px; color: var(--muted); }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.breadcrumb .bc-sep { color: var(--border-default); }
.breadcrumb .bc-link { color: var(--accent-hover); cursor: pointer; }
.breadcrumb .bc-link:hover { color: var(--accent); }
.breadcrumb .bc-current { color: var(--text); font-weight: 500; }

/* ── Page content ── */
.page-content { padding: 24px 32px; flex: 1; }

/* ── Stat cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stat-card:hover { border-color: var(--border-default); box-shadow: var(--shadow-md); }
.stat-card .sc-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-card .sc-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}
.stat-card .sc-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.1s, background 0.1s, box-shadow 0.1s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--accent-border); }
.btn-danger { background: var(--bad-bg); border: 1px solid #fca5a5; color: var(--bad); }
.btn-danger:hover:not(:disabled) { background: #fee2e2; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 3px 9px; font-size: 11px; border-radius: 5px; }

/* ── Cards ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--border-default); box-shadow: var(--shadow-md); }

/* ── Campaign grid ── */
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.campaign-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.campaign-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}
.campaign-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.campaign-card-name { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.2px; }
.campaign-card-value { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.4; }
.campaign-card-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.campaign-card-stat { font-size: 12px; }
.campaign-card-stat .ccs-n { font-size: 18px; font-weight: 700; color: var(--text); display: block; }
.campaign-card-stat .ccs-l { color: var(--muted); }
.campaign-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.three-dot-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
}
.three-dot-btn:hover { background: var(--bg-hover); color: var(--text); }

/* ── Sub-tabs ── */
.sub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 24px;
  padding: 0 32px;
  background: var(--bg-surface);
}
.sub-tab {
  padding: 11px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.1s;
  margin-bottom: -2px;
}
.sub-tab:hover { color: var(--text); }
.sub-tab.active { color: var(--accent-hover); border-bottom-color: var(--accent); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  white-space: nowrap;
  background: var(--bg-canvas);
}
td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* ── Form elements ── */
.form-group { margin-bottom: 14px; }
label, .form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 5px;
}
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(155, 140, 222, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.6; }
textarea { min-height: 80px; resize: vertical; font-family: var(--font); line-height: 1.5; }
.row { display: flex; gap: 12px; }
.row .col { flex: 1; }

/* ── Pills ── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill-queued, .pill-draft, .pill-paused     { background: #ede0ff; color: #6b21a8; border-color: #c4b5fd; }
.pill-contacted, .pill-active               { background: var(--good-bg); color: var(--good); border-color: #bbf7d0; }
.pill-replied                               { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.pill-booked, .pill-approved                { background: var(--good-bg); color: var(--good); border-color: #bbf7d0; }
.pill-unsubscribed, .pill-rejected          { background: var(--bad-bg); color: var(--bad); border-color: #fca5a5; }
.pill-none                                  { background: var(--bg-hover); color: var(--muted); border-color: var(--border-default); }
.pill-converted_to_customer                 { background: #f0fdfa; color: #0d9488; border-color: #99f6e4; }

/* ── Tag ── */
.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  background: var(--bg-hover);
  color: var(--muted);
  border: 1px solid var(--border-default);
  font-weight: 500;
}

/* ── Excl pill (removable pill in campaign form) ── */
.excl-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-bg);
  color: #5b21b6;
  border: 1px solid var(--accent-border);
  cursor: default;
}
.excl-pill .excl-pill-x {
  background: none;
  border: none;
  color: #7c3aed;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
}
.excl-pill .excl-pill-x:hover { opacity: 1; }

/* ── Utilities ── */
.hide { display: none !important; }
.flex { display: flex; align-items: center; }
.flex-gap { gap: 10px; }
.space-between { justify-content: space-between; }
.muted { color: var(--muted); }
.empty {
  padding: 60px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.section-sub { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

/* ── Auth ── */
.auth-wrap { max-width: 420px; margin: 80px auto; padding: 0 20px; }
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
.auth-logo span { color: var(--accent-hover); }
.auth-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }
.auth-tabs { display: flex; gap: 0; border: 1px solid var(--border-default); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.auth-tab {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.auth-tab.active { background: var(--bg-hover); color: var(--text); font-weight: 600; }
.auth-err { font-size: 12px; color: var(--bad); margin-top: 8px; min-height: 16px; }

/* ── Filter bar ── */
.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filter-row .filter-item { display: flex; flex-direction: column; gap: 4px; }
.filter-row .filter-item.grow { flex: 1; min-width: 160px; }
.filter-row .filter-item.grow2 { flex: 2; min-width: 200px; }
.dfst-group {
  display: flex;
  border: 1px solid var(--border-default);
  border-radius: 7px;
  overflow: hidden;
}
.dfst-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-default);
  color: var(--muted);
  padding: 7px 12px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.dfst-btn:last-child { border-right: none; }
.dfst-btn.dfst-active { background: var(--accent-bg); color: #5b21b6; font-weight: 600; }
.filter-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

/* ── Draft cards ── */
.draft-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.draft-card:hover { border-color: var(--border-default); box-shadow: var(--shadow-md); }
.draft-card-to { font-size: 14px; margin-bottom: 6px; }
.draft-card-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.draft-subject { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 14px; line-height: 1.3; }
.draft-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.8;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  color: var(--text);
}
.draft-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}
.owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  margin-top: 5px;
}
.pain-section {
  border-top: 1px solid var(--border-subtle);
  margin-top: 18px;
  padding-top: 14px;
}
.pain-summary {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
  line-height: 1.5;
}
.pain-item { margin-bottom: 14px; }
.pain-item-title { font-weight: 500; margin-bottom: 3px; }
.pain-item-evidence {
  font-style: italic;
  color: var(--muted);
  font-size: 12px;
  padding-left: 14px;
  margin-bottom: 4px;
}
.pain-item-source { padding-left: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.signal-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 600;
}
.pain-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* ── Side drawer ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 21, 35, 0.3);
  z-index: 200;
  display: none;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 520px;
  max-width: 95vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  z-index: 201;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
}
.drawer-title { font-size: 16px; font-weight: 600; }
.drawer-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.drawer-body { padding: 24px; }

/* ── Needs-attention ── */
.needs-attention { display: flex; flex-direction: column; gap: 8px; }
.attention-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.attention-item .ai-label { font-size: 13px; font-weight: 500; }
.attention-item .ai-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Activity feed ── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-text { font-size: 13px; line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Settings sections ── */
.settings-section { margin-bottom: 28px; }
.settings-section .card { margin-bottom: 16px; }

/* ── Status badges ── */
.status-queued-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 7px;
  background: var(--good-bg);
  color: var(--good);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #bbf7d0;
}
.status-sent-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 7px;
  background: var(--teal-bg);
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #99f6e4;
}
.status-rejected-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 7px;
  background: var(--bad-bg);
  color: var(--bad);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #fca5a5;
}

/* ── Toast notifications ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #5b21b6;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-slide-in 0.2s ease;
  pointer-events: auto;
  max-width: 380px;
  line-height: 1.4;
}
@keyframes toast-slide-in {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Campaign wizard step boxes ── */
.wizard-step-box {
  padding: 14px;
  background: var(--bg-hover);
  border-radius: 10px;
  border: 1px solid var(--border-default);
  margin-bottom: 16px;
}
.wizard-step-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}
.type-radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border-default);
  background: var(--bg-surface);
  transition: border-color 0.12s, background 0.12s;
  margin-bottom: 8px;
}
.type-radio-option:last-child { margin-bottom: 0; }
.type-radio-option:hover { border-color: var(--accent-border); background: var(--bg-hover); }
.type-radio-option input[type=radio] { margin-top: 3px; accent-color: var(--accent); }
.type-radio-option.selected { border-color: var(--accent); background: #f9f5ff; }

/* ── Lookalike customer table in wizard ── */
.lookalike-customer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.lookalike-customer-row:last-child { border-bottom: none; }
.lookalike-customer-row input[type=checkbox] { accent-color: var(--accent); }

/* ── Profile pills (editable) ── */
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--accent-bg);
  color: #5b21b6;
  border: 1px solid var(--accent-border);
}
.profile-pill-x {
  background: none;
  border: none;
  cursor: pointer;
  color: #7c3aed;
  font-size: 14px;
  padding: 0;
  line-height: 1;
}

/* ── Fit score badge ── */
.fit-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 20px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.fit-score-high   { background: #dcfce7; color: #15803d; }
.fit-score-medium { background: #fef3c7; color: #b45309; }
.fit-score-low    { background: #fee2e2; color: #b91c1c; }

/* ── Drag-drop CSV zone ── */
.csv-dropzone {
  border: 2px dashed var(--border-default);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg-canvas);
}
.csv-dropzone:hover, .csv-dropzone.drag-over {
  border-color: var(--accent);
  background: var(--bg-hover);
}
.csv-dropzone .dz-icon { font-size: 28px; margin-bottom: 8px; }
.csv-dropzone .dz-label { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.csv-dropzone .dz-sub { font-size: 12px; color: var(--muted); }

/* ── Inbox health banner ── */
.inbox-health-banner {
  background: #fef2f2;
  border-bottom: 1px solid #fca5a5;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 32px;
  line-height: 1.6;
}
.inbox-health-banner a { color: #b91c1c; text-decoration: underline; }

/* ── Health pills ── */
.health-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.health-ok      { background: #dcfce7; color: #15803d; }
.health-bad     { background: #fee2e2; color: #b91c1c; cursor: help; }
.health-warn    { background: #fef3c7; color: #b45309; }
.health-unknown { background: var(--bg-hover); color: var(--muted); }

/* ── Draft status badges (new states) ── */
.status-sent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}
.status-failed-badge {
  display: inline-flex;
  align-items: center;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ── App password help text ── */
.app-password-help {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: #78350f;
  line-height: 1.7;
  margin-bottom: 16px;
}
.app-password-help a { color: #92400e; text-decoration: underline; }

/* ── Activity feed ── */
.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.activity-sent    { background: #dcfce7; color: #15803d; }
.activity-replied { background: #dbeafe; color: #1d4ed8; }
.activity-failed  { background: #fee2e2; color: #b91c1c; }
.activity-bounced { background: #fef3c7; color: #b45309; }

/* Reply classification badges. Auto/oof = blue, human = green, bounce = red,
   unsubscribe = amber. Used both in the activity feed and the campaign
   Sent tab Reply column. */
.cls-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.cls-auto_reply,
.cls-oof          { background: #dbeafe; color: #1d4ed8; }
.cls-human_reply  { background: #dcfce7; color: #15803d; }
.cls-bounce       { background: #fee2e2; color: #b91c1c; }
.cls-unsubscribe  { background: #fef3c7; color: #b45309; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { width: 56px; }
  .sidebar-brand .brand-name,
  .nav-item span:not(.nav-icon),
  .sidebar-bottom .user-info,
  .sidebar-bottom .tenant-picker-wrap { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item .nav-icon { width: auto; }
  .page-content, .page-header { padding: 16px; }
  .sub-tabs { padding: 0 16px; }
  .campaign-grid { grid-template-columns: 1fr; }
}

/* ── Inbox row three-dot dropdown ── */
.inbox-menu-items {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 300;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
  min-width: 100px;
  padding: 4px 0;
}
.inbox-menu-items > div {
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.inbox-menu-items > div:hover { background: var(--bg-hover); }
.inbox-menu-items .inbox-menu-delete { color: var(--bad); }
