* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-2: #1a1a28;
  --border: #1e1e2e;
  --border-hover: #2a2a3e;
  --text: #e8e8ed;
  --muted: #8888a0;
  --accent: #4ade80;
  --accent-dim: #22c55e;
  --accent-bg: rgba(74, 222, 128, 0.08);
  --accent-border: rgba(74, 222, 128, 0.15);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.08);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.08);
  --blue: #60a5fa;
  --blue-bg: rgba(96, 165, 250, 0.08);
  --purple: #a78bfa;
  --sidebar-w: 240px;
  --radius: 10px;
  --radius-sm: 6px;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.2;
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  padding: 0 24px 24px;
  letter-spacing: -0.5px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-logo svg {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  flex-shrink: 0;
}

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

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-item.active {
  color: var(--accent);
  background: var(--accent-bg);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-details {
  overflow: hidden;
  flex: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-email {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 6px;
  width: 100%;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.logout-btn:hover {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.3);
  background: var(--red-bg);
}

.sidebar-contact-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 6px;
  width: 100%;
  text-decoration: none;
  box-sizing: border-box;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.sidebar-contact-link:hover {
  color: var(--accent);
  border-color: rgba(74, 222, 128, 0.3);
  background: var(--accent-bg);
}

/* Main content */
.main-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  padding: 28px 40px;
  max-width: 1400px;
  overflow-x: hidden;
  transition: margin-left 0.3s ease;
}

/* Breadcrumb navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
  cursor: pointer;
}

.breadcrumb-item:hover {
  color: var(--accent);
}

.breadcrumb-item.active {
  color: var(--text);
  font-weight: 500;
  cursor: default;
}

.breadcrumb-separator {
  color: var(--border);
  margin: 0 4px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  animation: slideInUp 0.3s ease-out;
}

.page-header-content h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin: 0;
  line-height: 1.2;
}

.page-header-content p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  line-height: 1.5;
}

.page-header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Page transitions */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  animation: slideInUp 0.3s ease-out 0.05s both;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.stat-card:hover {
  border-color: var(--accent-border);
  background: rgba(18, 18, 26, 0.8);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card-clickable {
  cursor: pointer;
}

@media (hover: hover) {
  .stat-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.1);
  }
}

.stat-card-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.stat-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-top: 12px;
  line-height: 1.1;
}

.stat-card-value.green { color: var(--accent); }
.stat-card-value.amber { color: var(--amber); }
.stat-card-value.red { color: var(--red); }
.stat-card-value.blue { color: var(--blue); }

.stat-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

.btn-danger:hover {
  background: var(--red-bg);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.15);
}

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tables */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideInUp 0.3s ease-out 0.1s both;
  max-width: 100%;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.table-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th {
  text-align: left;
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

td {
  padding: 14px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.5;
}

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

tr:hover td {
  background: rgba(26, 26, 40, 0.6);
  transition: background 0.12s ease;
}

/* Mobile table responsiveness */
@media (max-width: 768px) {
  .table-container {
    border-radius: var(--radius-sm);
    font-size: 12px;
  }

  th {
    padding: 12px 16px;
    font-size: 10px;
  }

  td {
    padding: 12px 16px;
    font-size: 12px;
  }

  table {
    min-width: 500px;
  }
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-green { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-amber { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(251,191,36,0.15); }
.badge-red { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,113,113,0.15); }
.badge-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(96,165,250,0.15); }
.badge-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea { min-height: 100px; resize: vertical; }
.form-select { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* 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;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Upload area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.upload-area.dragging {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.upload-area svg {
  width: 40px;
  height: 40px;
  color: var(--muted);
  margin-bottom: 12px;
}

.upload-area p {
  color: var(--muted);
  font-size: 14px;
}

.upload-area .accent { color: var(--accent); font-weight: 600; }

/* Email preview */
.email-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}

.email-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.email-preview-to {
  font-size: 13px;
  color: var(--muted);
}

.email-preview-subject {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.email-preview-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  margin-bottom: 20px;
}

/* Auth page */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-box .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

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

.auth-box .subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.auth-toggle a {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}

.auth-toggle a:hover { text-decoration: underline; }

.auth-error {
  background: var(--red-bg);
  border: 1px solid rgba(248,113,113,0.15);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

/* Google sign-in button — follows Google branding guidelines */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Roboto', 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 0;
  transition: background 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  text-decoration: none;
  color: #3c4043;
}

.btn-google:active {
  background: #f1f3f4;
}

/* Divider between Google button and email/password form */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* Campaign detail sections */
.section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: -1px;
}

.tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 13px;
  z-index: 2000;
  animation: slideUp 0.3s ease;
  max-width: 360px;
}

.toast.success { border-color: var(--accent-border); color: var(--accent); }
.toast.error { border-color: rgba(248,113,113,0.3); color: var(--red); }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
}

input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #0a0a0f;
  font-weight: 700;
}

/* Textarea for CSV paste */
.csv-paste-area {
  font-family: 'SF Mono', 'Monaco', 'Fira Code', monospace;
  font-size: 12px;
  min-height: 200px;
}

/* Pricing Page */
.pricing-page {
  min-height: 100vh;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
}

.pricing-header {
  text-align: center;
  margin-bottom: 48px;
  max-width: 640px;
}

.pricing-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 32px;
}

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

.pricing-eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.pricing-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.pricing-header h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1040px;
  width: 100%;
  margin-bottom: 40px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.04) 0%, var(--surface) 40%);
  box-shadow: 0 0 40px rgba(74, 222, 128, 0.06);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #0a0a0f;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 16px;
  border-radius: 20px;
  font-family: 'Space Grotesk', sans-serif;
}

.pricing-card-header {
  margin-bottom: 20px;
}

.pricing-card-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-card-price {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--text);
}

.price-period {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  flex: 1;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-check {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: 50%;
  font-size: 10px;
}

/* Coming Q3 badge — premium inline hype tag */
.badge-q3 {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(168,85,247,0.10));
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,0.28);
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
  flex-shrink: 0;
}

.pricing-comparison {
  text-align: center;
  margin-bottom: 32px;
}

.pricing-comparison-text {
  font-size: 14px;
  color: var(--muted);
}

.pricing-comparison-text .red { color: var(--red); font-weight: 600; }
.pricing-comparison-text .amber { color: var(--amber); font-weight: 600; }
.pricing-comparison-text .green { color: var(--accent); font-weight: 600; }

.pricing-contact-row {
  text-align: center;
  margin: 0 0 8px;
}

.pricing-contact-row p {
  font-size: 13px;
  color: var(--muted);
}

.pricing-contact-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s;
}

.pricing-contact-link:hover {
  opacity: 0.8;
}

.pricing-footer-note {
  text-align: center;
}

.pricing-footer-note p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.pricing-skip-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
  font-family: 'Inter', sans-serif;
}

.pricing-skip-link:hover {
  color: var(--text);
}

.pricing-skip-btn {
  width: 100%;
  max-width: 420px;
  justify-content: center;
  margin-top: 4px;
}

/* Free Trial Banner */
.pricing-free-trial-banner {
  width: 100%;
  max-width: 1040px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08) 0%, rgba(52, 211, 153, 0.04) 100%);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 16px;
  padding: 32px 32px 20px;
  text-align: center;
}

.pricing-free-trial-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 10px;
}

.pricing-free-trial-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.pricing-free-trial-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
}

.pricing-free-trial-cta {
  padding: 14px 32px;
  font-size: 15px;
}

.pricing-free-trial-divider {
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pricing-free-trial-divider::before,
.pricing-free-trial-divider::after {
  content: '';
  flex: 1;
  max-width: 140px;
  height: 1px;
  background: var(--border);
}

/* Promo Code Section */
.promo-section {
  max-width: 480px;
  margin: 0 auto 32px;
  text-align: center;
}

.promo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  user-select: none;
}

.promo-toggle:hover {
  color: var(--text);
  background: var(--surface);
}

.promo-toggle-icon {
  font-size: 16px;
}

.promo-input-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}

.promo-input {
  flex: 1;
  font-family: 'Space Grotesk', monospace;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-align: center;
}

.promo-feedback {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.promo-feedback-success {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.promo-feedback-error {
  background: rgba(239, 68, 68, 0.08);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Discounted price display */
.price-amount {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.price-original {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
  letter-spacing: -1px;
}

.price-discounted {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--accent);
}

.promo-first-month-note {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 8px;
  text-align: center;
}

/* ===================== SETTINGS PAGE ===================== */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

/* Full-width card that spans both grid columns */
.settings-card-full {
  grid-column: 1 / -1;
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.settings-card-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.settings-card-icon svg {
  width: 18px;
  height: 18px;
}

.settings-card-header h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.settings-card-header p {
  font-size: 13px;
  color: var(--muted);
}

.settings-form-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.settings-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* --- Invite form --- */
.invite-form {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.invite-form-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.invite-form-row .form-input {
  flex: 1;
}

.form-select-sm {
  width: auto !important;
  min-width: 110px;
  flex-shrink: 0;
}

/* --- Team members table --- */
.tm-table-wrap {
  overflow-x: auto;
}

.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tm-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--border);
}

.tm-table td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.tm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

.tm-avatar-muted {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--muted);
}

/* Ghost button variant (transparent background) */
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Ghost + danger combo (team member remove button) */
.btn-ghost.btn-danger {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.25);
  background: transparent;
}

.btn-ghost.btn-danger:hover {
  background: var(--red-bg);
}

/* --- Billing section --- */
.billing-plan-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.billing-plan-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.billing-plan-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-right: 4px;
}

.billing-plan-price {
  font-size: 14px;
  color: var(--muted);
  margin-right: 8px;
}

.billing-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.billing-meta-label {
  font-weight: 500;
  color: var(--text);
  margin-right: 4px;
}

.billing-invoices-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 12px;
}

.billing-empty {
  padding: 24px 0;
  font-size: 14px;
  color: var(--muted);
}

.billing-empty a {
  color: var(--accent);
  text-decoration: none;
}

/* badge badge-green with icon */
.badge svg {
  width: 11px;
  height: 11px;
  vertical-align: middle;
  margin-right: 3px;
}

/* Mobile Header — visible only on small screens */
.mobile-header {
  display: none;
}

/* Mobile Settings button (in mobile header) */
.mobile-settings-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  padding: 5px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.mobile-settings-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.mobile-settings-btn:hover,
.mobile-settings-btn.active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

/* ─── Settings Page ──────────────────────────────────────────────────────── */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.settings-card-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.settings-card-header p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.settings-card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.settings-card-icon svg {
  width: 18px;
  height: 18px;
}

.settings-form-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* Section label (divider within a settings card form) */
.settings-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
  margin-top: 4px;
}

/* Email signature live preview */
.email-sig-preview {
  margin-top: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.email-sig-preview-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.email-sig-preview-body {
  font-family: 'SF Mono', 'Monaco', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
  .pricing-card.featured { order: -1; }
}

@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Sidebar is handled by the drawer approach below (line ~3212).
     Do NOT add bottom-tab-bar styles here — they conflict with the drawer. */

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  .mobile-header-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
  }

  .mobile-header-logo svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    display: inline-block;
  }

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

  .mobile-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
    overflow: visible;
  }

  .mobile-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-user-badge .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .mobile-user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-logout-btn {
    padding: 5px 10px;
    font-size: 11px;
  }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Show Settings gear in mobile header */
  .mobile-settings-btn { display: flex; }
}

/* ─── FAQ Accordion (dashboard) ─── */
.faq-accordion {
  max-width: 760px;
  display: flex;
  flex-direction: column;
}

.faq-accordion-item {
  border-bottom: 1px solid var(--border);
}

.faq-accordion-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-accordion-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  user-select: none;
  list-style: none;
}

.faq-accordion-q::-webkit-details-marker { display: none; }

.faq-accordion-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent);
  transition: transform 0.2s ease;
}

details[open] .faq-accordion-chevron {
  transform: rotate(180deg);
}

.faq-accordion-a {
  padding: 0 24px 18px 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 680px;
}

.faq-accordion-a strong {
  color: var(--text);
  font-weight: 600;
}

.faq-accordion-a code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', 'Consolas', monospace;
  color: var(--accent);
}

.faq-accordion-a a {
  color: var(--accent);
  text-decoration: none;
}

.faq-accordion-a a:hover {
  text-decoration: underline;
}

/* ---- Toggle switch (Data & Privacy) ---- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: var(--border-hover);
  transition: background 0.2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-track {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(20px);
  background: var(--accent);
}

/* ============= NOTIFICATION PREFERENCES ============= */

/* Digest radio card group */
.notif-digest-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .notif-digest-group {
    grid-template-columns: 1fr;
  }
}

.notif-digest-option {
  display: block;
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--surface-2);
}

.notif-digest-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notif-digest-option:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.03);
}

.notif-digest-active {
  border-color: var(--accent) !important;
  background: var(--accent-bg) !important;
}

.notif-digest-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.notif-digest-active .notif-digest-label {
  color: var(--accent);
}

.notif-digest-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Toggle list rows */
.notif-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.notif-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  transition: background 0.15s;
}

.notif-toggle-row:last-child {
  border-bottom: none;
}

.notif-toggle-row:hover {
  background: rgba(255,255,255,0.02);
}

.notif-toggle-info {
  flex: 1;
  min-width: 0;
}

.notif-toggle-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}

.notif-toggle-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Atom logo animation ─────────────────────────────── */
@keyframes atom-orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes atom-pulse {
  0%, 100% { opacity: 0.85; }
  50%       { opacity: 0.45; }
}
.atom-e1 { transform-origin: 20px 20px; animation: atom-orbit 4s linear infinite; }
.atom-e2 { transform-origin: 20px 20px; animation: atom-orbit 4s linear infinite; animation-delay: -1.33s; }
.atom-e3 { transform-origin: 20px 20px; animation: atom-orbit 4s linear infinite; animation-delay: -2.67s; }
.atom-nucleus-glow { animation: atom-pulse 2.5s ease-in-out infinite; }

/* ── Onboarding Progress (sidebar) ──────────────────── */
.onboarding-progress {
  padding: 12px 12px 0;
  margin: 8px 0;
}

.onboarding-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.onboarding-progress-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.onboarding-progress-fraction {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.onboarding-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.onboarding-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

.onboarding-steps-mini {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.onboarding-step-dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.onboarding-step-dot.done {
  background: var(--accent);
}

.onboarding-step-dot.current {
  background: rgba(74,222,128,0.4);
}

/* ── Onboarding Welcome Screen ────────────────────── */
.onboarding-welcome {
  max-width: 580px;
  margin: 0 auto;
  padding: 40px 20px 48px;
  text-align: center;
}

.onboarding-welcome-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: welcome-bounce 1.5s ease-in-out infinite alternate;
}

@keyframes welcome-bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}

.onboarding-welcome h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.welcome-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 36px;
  line-height: 1.6;
}

.onboarding-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.onboarding-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  transition: border-color 0.2s;
}

.onboarding-step-card.done {
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

.onboarding-step-card .step-number {
  width: 26px;
  height: 26px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 auto 10px;
}

.onboarding-step-card.done .step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0f;
}

.onboarding-step-card .step-number svg {
  width: 12px;
  height: 12px;
  stroke: #0a0a0f;
}

.onboarding-step-card .step-icon {
  font-size: 26px;
  margin-bottom: 8px;
}

.onboarding-step-card h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.onboarding-step-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.onboarding-step-card .step-text {
  flex: 1;
  min-width: 0;
}

.onboarding-welcome-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.onboarding-skip {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  transition: color 0.15s;
  font-family: inherit;
}

.onboarding-skip:hover { color: var(--text); }

/* ── Contextual empty states ──────────────────────── */
.contextual-empty {
  padding: 48px 32px;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.contextual-empty .step-badge {
  display: inline-block;
  padding: 3px 12px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.contextual-empty h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.contextual-empty p {
  color: var(--muted);
  font-size: 14px;
  max-width: 420px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* ── Empty state icon wrapper ─────────────────────── */
.empty-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.18);
  margin-bottom: 16px;
  color: var(--accent);
}

.empty-icon-wrap svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
}

/* ── Dashboard progress nudge ─────────────────────── */
.onboarding-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.onboarding-nudge-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.onboarding-nudge-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 6px;
}

.onboarding-nudge-step.done {
  color: var(--accent);
}

.onboarding-nudge-step.active {
  background: var(--accent-bg);
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--accent-border);
}

.nudge-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.onboarding-nudge-step.done .nudge-step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0f;
}

.onboarding-nudge-step.done .nudge-step-num svg {
  width: 10px;
  height: 10px;
  stroke: #0a0a0f;
}

.onboarding-nudge-step.active .nudge-step-num {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
}

.nudge-step-arrow {
  color: var(--border);
  font-size: 12px;
  flex-shrink: 0;
}

.nudge-hint {
  font-size: 13px;
  color: var(--muted);
}

/* ── Celebration banner ───────────────────────────── */
.celebration-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(74,222,128,0.08), rgba(52,211,153,0.04));
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
  animation: celebrate-in 0.4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes celebrate-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.celebration-banner-text h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.celebration-banner-text p {
  font-size: 13px;
  color: var(--muted);
}

.celebration-banner-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  margin-left: auto;
  transition: color 0.15s;
}

.celebration-banner-dismiss:hover { color: var(--text); }

/* ── Confetti canvas ──────────────────────────────── */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ── Responsive tweaks for onboarding ────────────── */
@media (max-width: 600px) {
  .onboarding-steps-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .onboarding-step-card {
    padding: 16px 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
  }
  .onboarding-step-card .step-number {
    margin: 0;
    flex-shrink: 0;
  }
  .onboarding-step-card .step-icon {
    display: none;
  }
  .onboarding-nudge {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── UI Polish Pass ─────────────────────────────── */

/* Sidebar logo with atom icon — moved to base rule (line 61) to fix CSS cascade on mobile */

/* Active nav item — left accent bar */
.nav-item.active {
  position: relative;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

/* Stat card hover glow — only on devices with hover (mouse), not touch */
@media (hover: hover) {
  .stat-card {
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  }
  .stat-card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.06);
    transform: translateY(-1px);
  }
}

/* Stat card trend indicator */
.stat-card-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 20px;
}
.stat-card-trend.up {
  color: var(--accent);
  background: var(--accent-bg);
}
.stat-card-trend.neutral {
  color: var(--muted);
  background: var(--surface-2);
}
.stat-card-trend.down {
  color: var(--red);
  background: var(--red-bg);
}

/* Skeleton loaders */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.skeleton-title {
  height: 14px;
  width: 60%;
  margin-bottom: 12px;
}
.skeleton-value {
  height: 36px;
  width: 80%;
  margin-bottom: 8px;
}
.skeleton-sub {
  height: 10px;
  width: 50%;
}
.skeleton-row {
  height: 44px;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}
.skeleton-row:last-child {
  border-bottom: none;
}
.skeleton-table-header {
  height: 38px;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

/* Clickable table row glow */
tr[data-campaign] {
  transition: background 0.12s;
}
tr[data-campaign]:hover td {
  background: rgba(74, 222, 128, 0.04);
}
tr[data-id] {
  transition: background 0.12s;
}
tr[data-id]:hover td {
  background: rgba(74, 222, 128, 0.04);
}

/* Sort indicator on table headers */
.th-sortable {
  cursor: pointer;
  user-select: none;
}
.th-sortable:hover {
  color: var(--text);
}
.th-sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.4;
  font-size: 9px;
}
.th-sortable.sort-asc .th-sort-icon,
.th-sortable.sort-desc .th-sort-icon {
  opacity: 1;
  color: var(--accent);
}

/* Page fade-in transition — only on explicit page navigation, NOT on data re-renders.
   JS adds .page-enter class on navigate(), removed after animation completes. */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter .page-header,
.page-enter .stats-grid,
.page-enter .table-container,
.page-enter .settings-grid {
  animation: pageFadeIn 0.2s ease forwards;
}

/* Tab switch transition */
.page-enter .tab-content {
  animation: pageFadeIn 0.15s ease forwards;
}

/* Mobile header logo with atom icon — moved inside mobile media query to fix cascade */

/* Green glow btn-primary hover enhancement */
.btn-primary:hover {
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
}

/* ============= PHASE 3: REPLIES & HOT LEADS ============= */

/* Intent badge — orange/hot for interested leads */
.badge-hot {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Nav badge — small number indicator on sidebar items */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
  flex-shrink: 0;
}

/* Hot leads panel — distinct from regular table-container */
.hot-leads-panel {
  border-color: rgba(249, 115, 22, 0.25);
  background: rgba(249, 115, 22, 0.03);
}
.hot-leads-panel .table-header {
  border-bottom-color: rgba(249, 115, 22, 0.15);
}
.hot-leads-panel .table-header h3 {
  color: #f97316;
}

/* Hot lead row highlight in replies table */
.row-hot td {
  background: rgba(249, 115, 22, 0.04);
}
.row-hot:hover td {
  background: rgba(249, 115, 22, 0.08);
}

/* Stat card — hot leads variant */
.stat-card-hot {
  border-color: rgba(249, 115, 22, 0.2);
  transition: border-color 0.15s, background 0.15s;
}
.stat-card-hot:hover {
  border-color: rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.04);
}

/* ── Campaign Detail Tabs ──────────────────────────────────── */
.campaign-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-btn svg {
  opacity: 0.7;
}
.tab-btn.active svg {
  opacity: 1;
}

/* ── Prospects Page Tabs ──────────────────────────────────── */
.prospects-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.prospects-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -2px;
  white-space: nowrap;
}
.prospects-tab-btn:hover {
  color: var(--text);
}
.prospects-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 222, 128, 0.15);
  color: var(--accent);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
}

/* ── Prospect search chips (Find tab) ─────────────────────── */
.prospect-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}
.prospect-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(74, 222, 128, 0.06);
}

/* ── Campaign Selector ────────────────────────────────────── */
.campaign-selector {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  min-width: 160px;
  max-width: 280px;
  transition: border-color 0.15s;
}
.campaign-selector:hover,
.campaign-selector:focus {
  border-color: var(--border-hover);
}

/* ── Campaign Stats Grid (6 cols) ─────────────────────────── */
.campaign-stats-grid {
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 1100px) {
  .campaign-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .campaign-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Daily Chart ──────────────────────────────────────────── */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}
.chart-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.chart-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.chart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.chart-empty-icon {
  opacity: 0.8;
}

/* ── Prospect Status Bar ──────────────────────────────────── */
.prospect-status-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.psb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.psb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.psb-label {
  color: var(--muted);
}
.psb-count {
  font-weight: 700;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  min-width: 20px;
}
.psb-arrow {
  color: var(--border-hover);
  font-size: 16px;
  padding: 0 4px;
}

/* ── Badge purple variant ─────────────────────────────────── */
.badge-purple {
  color: var(--purple);
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.2);
}

/* ── Hot row in prospect table ────────────────────────────── */
.tr-hot td {
  background: rgba(74, 222, 128, 0.03);
}
.tr-hot:hover td {
  background: rgba(74, 222, 128, 0.06);
}

/* ─── Notification Bell ──────────────────────────────────────────────────────── */
.notif-bell-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.notif-bell-btn:hover {
  color: var(--accent);
  background: var(--bg-card-hover, rgba(74,222,128,0.08));
}
.notif-bell-btn svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  background: #ef4444;
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  padding: 0 3px;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg-sidebar, #111);
}

/* Sidebar variant — full width row */
.notif-bell-sidebar {
  width: 100%;
  margin-bottom: 6px;
}
.notif-bell-sidebar .notif-bell-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
}
.notif-bell-sidebar .notif-bell-btn::after {
  content: 'Notifications';
  font-size: 13px;
  color: inherit;
}

/* Notification dropdown */
.notif-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 340px;
  max-width: 92vw;
  background: var(--bg-card, #111);
  border: 1px solid var(--border, #222);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 9999;
  overflow: hidden;
  animation: notifFadeIn 0.15s ease;
}
@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile variant — use fixed positioning to avoid overflow-x:hidden clipping on .main-content */
.notif-bell-mobile .notif-dropdown {
  position: fixed;
  top: 72px;
  bottom: auto;
  left: 16px;
  right: 16px;
  width: auto;
  max-width: none;
  z-index: 10000;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border, #1f1f1f);
}
.notif-dropdown-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.notif-mark-all-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-weight: 600;
}
.notif-mark-all-btn:hover { opacity: 0.75; }

.notif-dropdown-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text);
  font-size: 14px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border, #1a1a1a);
  transition: background 0.1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.notif-unread { background: rgba(74,222,128,0.04); }
.notif-item.notif-unread:hover { background: rgba(74,222,128,0.07); }

.notif-item-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-msg {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-time {
  font-size: 11px;
  color: var(--border-hover, #555);
}

.notif-dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border, #1f1f1f);
  text-align: center;
}
.notif-view-all {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.notif-view-all:hover { opacity: 0.75; }

/* Notification preferences UI extra styles */
.notif-digest-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .notif-digest-group { grid-template-columns: 1fr; }
}
.notif-digest-option {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.notif-digest-option:hover { border-color: var(--accent); }
.notif-digest-option input { display: none; }
.notif-digest-active {
  border-color: var(--accent);
  background: rgba(74,222,128,0.06);
}
.notif-digest-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.notif-digest-desc { font-size: 12px; color: var(--muted); }

.notif-toggle-list { display: flex; flex-direction: column; gap: 2px; }
.notif-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.notif-toggle-row:last-child { border-bottom: none; }
.notif-toggle-info { flex: 1; min-width: 0; margin-right: 16px; }
.notif-toggle-title { font-size: 14px; font-weight: 500; color: var(--text); }

/* ── Deliverability health ── */
.stat-card-alert {
  border-color: rgba(245, 158, 11, 0.4) !important;
}
.stat-card-alert.red-alert {
  border-color: rgba(239, 68, 68, 0.4) !important;
}
.notif-toggle-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Gold badge (meeting_booked) ──────────────────────────── */
.badge-gold {
  background: rgba(250, 204, 21, 0.1);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.2);
}

/* ── Prospect table expandable rows ───────────────────────── */
.prospect-row {
  cursor: pointer;
  transition: background 0.12s;
}
.prospect-row:hover td {
  background: var(--surface-2);
}
.expand-btn {
  border-color: var(--border);
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  min-width: 28px;
  justify-content: center;
}
.expand-btn.expanded,
.expand-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-bg);
}
.prospect-expand-row td {
  padding: 0 !important;
  background: rgba(18, 18, 26, 0.6);
  border-bottom: 1px solid var(--border);
}

/* ── Prospect email timeline ──────────────────────────────── */
.prospect-timeline {
  padding: 16px 24px 20px;
}
.tl-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 14px;
}
.tl-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
}
.tl-item:last-child {
  margin-bottom: 0;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: -12px;
  width: 1px;
  background: var(--border);
}
.tl-item:last-child::before {
  display: none;
}
.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  border: 2px solid;
}
.tl-dot.green  { background: rgba(74, 222, 128, 0.2);  border-color: var(--accent); }
.tl-dot.blue   { background: rgba(96, 165, 250, 0.2);  border-color: var(--blue); }
.tl-dot.gold   { background: rgba(250, 204, 21, 0.15); border-color: #facc15; }
.tl-dot.muted  { background: var(--surface-2);         border-color: var(--border); }
.tl-content {
  font-size: 13px;
  line-height: 1.5;
}
.tl-content strong {
  color: var(--text);
  font-weight: 600;
}
.tl-time {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.tl-snippet {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 3px;
  line-height: 1.5;
}

/* ═════════════════════════════════════════════════════════════════
   DASHBOARD UI POLISH — RESPONSIVE & MOBILE OPTIMIZATION
   Part 1: Navigation, Layout & Page Structure
   ═════════════════════════════════════════════════════════════════ */

/* Mobile Sidebar Toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 110;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  border-color: var(--accent-border);
  background: var(--surface-2);
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text);
}

/* Mobile & Tablet Breakpoint: 768px */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -240px;
    width: 240px;
    height: 100vh;
    z-index: 105;
    flex-direction: column;
    padding: 24px 0;
    box-shadow: none;
    display: none;
    overflow: hidden;
  }

  .sidebar.active {
    display: flex;
    left: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.4);
  }

  /* Hide sidebar notification bell on mobile — mobile header bell handles this */
  .notif-bell-sidebar {
    display: none;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 104;
    display: none;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-top: 70px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  .page-header-content h1 {
    font-size: 24px;
  }

  .page-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .page-header-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .breadcrumb {
    font-size: 12px;
    margin-bottom: 16px;
    gap: 6px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card-value {
    font-size: clamp(20px, 4vw, 28px);
    margin-top: 8px;
  }

  .stat-card-label {
    font-size: 10px;
  }

  .stat-card-sub {
    font-size: 11px;
    margin-top: 6px;
  }
}

/* Small Devices: 480px */
@media (max-width: 480px) {
  .main-content {
    padding: 16px 12px;
    padding-top: 60px;
  }

  .page-header-content h1 {
    font-size: 20px;
  }

  .page-header-content p {
    font-size: 13px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card-label {
    font-size: 9px;
    letter-spacing: 0.5px;
  }

  .stat-card-value {
    font-size: 18px;
    margin-top: 6px;
  }

  .stat-card-sub {
    font-size: 10px;
  }

  .table-header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .table-header h3 {
    font-size: 14px;
    width: 100%;
  }

  table {
    min-width: 100%;
  }

  th {
    padding: 10px 12px;
    font-size: 9px;
  }

  td {
    padding: 10px 12px;
    font-size: 11px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Prevent mobile header from overflowing on narrow screens */
  .mobile-header-right {
    gap: 4px;
  }

  .mobile-user-name {
    display: none;
  }

  .mobile-logout-btn {
    padding: 5px;
    font-size: 0;
    gap: 0;
    width: 32px;
    height: 32px;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .mobile-logout-btn svg {
    width: 16px;
    height: 16px;
  }

  .notif-bell-mobile .notif-dropdown {
    left: 8px;
    right: 8px;
  }
}

/* Large Tablets & Desktops: 1024px+ */
@media (min-width: 1024px) {
  .main-content {
    padding: 32px 48px;
  }

  .page-header {
    margin-bottom: 40px;
  }

  .stats-grid {
    margin-bottom: 40px;
  }
}

/* Print Styles */
@media print {
  .sidebar,
  .sidebar-toggle,
  .page-header-actions,
  .btn {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }

  table {
    page-break-inside: avoid;
  }

  tr {
    page-break-inside: avoid;
  }
}

/* ============= SKILL PICKER PAGE ============= */
.skill-picker-page {
  min-height: 100vh;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
}

.skill-picker-inner {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.skill-picker-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

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

.skill-picker-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.skill-picker-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 440px;
  line-height: 1.6;
}

.skill-picker-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.skill-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  text-align: left;
  position: relative;
}

.skill-card:hover {
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.04);
  transform: translateY(-1px);
}

.skill-card.selected {
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.08);
}

.skill-card-emoji {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.skill-card-body {
  flex: 1;
  min-width: 0;
}

.skill-card-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.skill-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.skill-card-detail {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.7;
  line-height: 1.5;
}

.skill-card-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.15s, border-color 0.15s;
  color: transparent;
}

.skill-card-check svg {
  width: 13px;
  height: 13px;
}

.skill-card.selected .skill-card-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.skill-picker-cta {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-bottom: 16px;
}

.skill-picker-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.skill-picker-skip {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}

.skill-picker-skip:hover {
  color: var(--text);
}

/* Settings: AI skill level inline options */
.skill-level-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.skill-level-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
  width: 100%;
}

.skill-level-option:hover {
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.04);
}

.skill-level-option.selected {
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.07);
}

.skill-level-emoji {
  font-size: 20px;
  flex-shrink: 0;
}

.skill-level-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  min-width: 90px;
}

.skill-level-desc {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.skill-level-checkmark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.skill-level-checkmark svg {
  width: 12px;
  height: 12px;
}

.skill-level-option.selected .skill-level-checkmark {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

@media (max-width: 640px) {
  .skill-picker-title { font-size: 22px; }
  .skill-card-detail { display: none; }
  .skill-level-desc { display: none; }
  .skill-level-label { min-width: auto; }
  .btn-lg { padding: 13px; font-size: 14px; }
}

/* ============= TRAINING PAGE ============= */

.training-level-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.training-level-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.training-level-switcher {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.training-level-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: 'Space Grotesk', sans-serif;
}

.training-level-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.training-level-btn.active {
  background: var(--accent);
  color: #0a0a0f;
}

.training-progress-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  white-space: nowrap;
}

.training-guides {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}

.training-guide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.training-guide:hover {
  border-color: var(--accent);
}

.training-guide--done {
  opacity: 0.7;
  border-color: rgba(74, 222, 128, 0.3);
}

.training-guide--done .training-guide-title {
  text-decoration: line-through;
  color: var(--muted);
}

.training-guide-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.training-guide-summary::-webkit-details-marker { display: none; }

.training-guide-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.training-guide-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  color: transparent;
}

.training-guide-check:hover {
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.1);
}

.training-guide-check--done {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0f;
}

.training-guide-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s;
}

details[open] .training-guide-chevron {
  transform: rotate(180deg);
}

.training-guide-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

.training-steps {
  margin: 16px 0 20px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.training-step {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.training-step code {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
}

.training-mark-done-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: opacity 0.15s;
}

.training-mark-done-btn:hover {
  opacity: 0.85;
}

.training-mark-undone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: border-color 0.15s, color 0.15s;
}

.training-mark-undone-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.training-all-done {
  margin-top: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 14px;
  text-align: center;
  max-width: 440px;
}

.training-all-done h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.training-all-done p {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .training-level-bar { gap: 8px; }
  .training-level-btn { font-size: 11px; padding: 4px 9px; }
  .training-progress-badge { margin-left: 0; }
  .training-guide-title { font-size: 13px; }
}

/* ── Expand panel animation ───────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Pipeline tab summary stats responsive ───────────────── */
@media (max-width: 640px) {
  .pipeline-expand-btn { display: inline-flex; }
}
