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

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-elevated: #ffffff;
  --surface-muted: #f8fafc;
  --sidebar-bg: rgba(255, 255, 255, 0.75);
  --topbar-bg: rgba(255, 255, 255, 0.7);
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --green: #059669;
  --green-soft: #d1fae5;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --orange: #ea580c;
  --orange-soft: #ffedd5;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --body-bg:
    radial-gradient(1200px 600px at 0% 0%, #e0e7ff 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 0%, #cffafe 0%, transparent 55%),
    radial-gradient(1000px 700px at 100% 100%, #fae8ff 0%, transparent 60%),
    linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f5f3ff 100%);
  --sidebar-w: 220px;
}

[data-theme="dark"] {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-hover: #1e2235;
  --surface-elevated: #1a1d27;
  --surface-muted: #0d0f14;
  --sidebar-bg: rgba(20, 22, 32, 0.85);
  --topbar-bg: rgba(26, 29, 39, 0.75);
  --border: #2d3148;
  --border-strong: #3a3f5a;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #6b7280;
  --blue: #60a5fa;
  --blue-soft: #1e2a4a;
  --green: #34d399;
  --green-soft: #1a3a2f;
  --amber: #fbbf24;
  --amber-soft: #3a2f10;
  --purple: #a78bfa;
  --purple-soft: #2d1f47;
  --red: #f87171;
  --red-soft: #3a1010;
  --orange: #fb923c;
  --orange-soft: #2a1f10;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --body-bg:
    radial-gradient(1200px 600px at 0% 0%, #1e1b4b 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 0%, #0c4a6e 0%, transparent 55%),
    radial-gradient(1000px 700px at 100% 100%, #4a044e 0%, transparent 60%),
    linear-gradient(135deg, #0f1117 0%, #111827 50%, #1a1d27 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--body-bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

/* ── Auth pages (login / register) ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.auth-card .brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-card .brand span { color: var(--blue); }
.auth-card .subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }

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

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .logo { font-size: 16px; font-weight: 700; color: var(--text); }
.sidebar-brand .logo span { background: linear-gradient(135deg, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-brand .tagline { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section { padding: 16px 12px 4px; font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.nav-link svg { flex-shrink: 0; opacity: .7; }
.nav-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 4px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-info .name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .role { font-size: 11px; color: var(--text-muted); }

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 { font-size: 18px; font-weight: 600; color: var(--text); }
.topbar .actions { display: flex; gap: 10px; align-items: center; }

.page-content { padding: 28px 32px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-input, .form-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.form-input::placeholder { color: var(--text-muted); }
.form-input.error { border-color: var(--red); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity .15s, background .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #1d4ed8, #4338ca); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--border-strong); }
.btn-danger { background: var(--red-soft); color: var(--red); border: 1px solid var(--border); }
.btn-danger:hover:not(:disabled) { background: var(--red); color: #fff; border-color: var(--red); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text); background: var(--surface-hover); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-radius: 6px 0 0 6px; }
.btn-group .btn:last-child { border-radius: 0 6px 6px 0; border-right-width: 1px; }
.btn-secondary.active { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; border-color: transparent; }

/* ── Cards / panels ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.stat-card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: var(--text); margin-top: 6px; }
.stat-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-card.blue .value { color: var(--blue); }
.stat-card.green .value { color: var(--green); }
.stat-card.amber .value { color: var(--amber); }
.stat-card.red .value { color: var(--red); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 0 12px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tr:hover td { background: var(--surface-hover); }
.td-muted { color: var(--text-muted); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-bpo        { background: var(--orange-soft); color: var(--orange); }
.badge-software   { background: var(--green-soft); color: var(--green); }
.badge-ai         { background: var(--purple-soft); color: var(--purple); }
.badge-pending    { background: var(--surface-hover); color: var(--text-secondary); }
.badge-active     { background: var(--green-soft); color: var(--green); }
.badge-done       { background: var(--green-soft); color: var(--green); }
.badge-completed  { background: var(--blue-soft); color: var(--blue); }
.badge-replied    { background: var(--purple-soft); color: var(--purple); }
.badge-paused     { background: var(--amber-soft); color: var(--amber); }
.badge-bounced    { background: var(--red-soft); color: var(--red); }
.badge-failed     { background: var(--red-soft); color: var(--red); }
.badge-in_progress { background: var(--amber-soft); color: var(--amber); }
.badge-admin      { background: var(--purple-soft); color: var(--purple); }
.badge-member     { background: var(--blue-soft); color: var(--blue); }
.badge-inactive   { background: var(--surface-hover); color: var(--text-muted); }

/* ── Score bar ── */
.score-bar { display: flex; align-items: center; gap: 8px; }
.score-track { flex: 1; background: var(--border); border-radius: 4px; height: 6px; overflow: hidden; max-width: 80px; }
.score-fill { height: 100%; border-radius: 4px; }
.score-label { font-size: 12px; font-weight: 600; min-width: 28px; }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: var(--red-soft); border: 1px solid var(--border); color: var(--red); }
.alert-success { background: var(--green-soft); border: 1px solid var(--border); color: var(--green); }
.alert-info { background: var(--blue-soft); border: 1px solid var(--border); color: var(--blue); }
.alert-warning { background: var(--amber-soft); border: 1px solid var(--border); color: var(--amber); }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Upload zone ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.upload-zone .upload-icon { color: var(--text-muted); margin-bottom: 12px; }
.upload-zone .upload-title { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.upload-zone .upload-sub { font-size: 13px; color: var(--text-muted); }

/* ── Dividers / utils ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.justify-between { justify-content: space-between; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-mono { font-family: ui-monospace, monospace; }
.hidden { display: none !important; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.page-info { font-size: 13px; color: var(--text-muted); flex: 1; }

/* ── Funnel bars ── */
.funnel-row { margin-bottom: 14px; }
.funnel-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; color: var(--text-secondary); }
.funnel-label span { color: var(--text); }
.funnel-track { background: var(--border); border-radius: 4px; height: 8px; overflow: hidden; }
.funnel-fill  { height: 100%; border-radius: 4px; transition: width .6s ease; }
.f-sent    { background: var(--blue); }
.f-opened  { background: var(--green); }
.f-clicked { background: var(--amber); }
.f-replied { background: var(--purple); }

canvas { max-height: 240px; }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
}

/* ── Token box ── */
.token-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
}
.token-box code { flex: 1; font-family: ui-monospace, monospace; font-size: 12px; color: var(--green); word-break: break-all; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 32px; color: var(--text-muted); }
.empty-state svg { margin: 0 auto 12px; display: block; opacity: .4; }
.empty-state p { font-size: 14px; }

/* ── Interest level badges ── */
.badge-hot     { background: var(--green-soft); color: var(--green); }
.badge-warm    { background: var(--amber-soft); color: var(--amber); }
.badge-cold    { background: var(--blue-soft); color: var(--blue); }
.badge-unknown { background: var(--surface-hover); color: var(--text-muted); }

/* ── Contact note panel ── */
.note-panel {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.note-summary {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
}
.note-key-points {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.note-key-points li {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
}
.note-key-points li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}
.note-action {
  font-size: 12px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 4px;
}
.note-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ── List cards ── */
.list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.list-card:hover { border-color: var(--blue); background: var(--surface-hover); box-shadow: var(--shadow-md); }
.list-card.active { border-color: var(--blue); background: var(--blue-soft); }
.list-card-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.list-card-desc { font-size: 12px; color: var(--text-muted); }
.list-card-count { font-size: 24px; font-weight: 700; color: var(--blue); text-align: right; }
.list-card-count-label { font-size: 11px; color: var(--text-muted); text-align: right; }

/* ── Open rate bar (compact) ── */
.open-rate-bar { display: flex; align-items: center; gap: 6px; }
.open-rate-track { width: 60px; background: var(--border); border-radius: 4px; height: 5px; overflow: hidden; }
.open-rate-fill { height: 100%; border-radius: 4px; background: var(--green); }

/* ── Email preview drawer (campaigns page) ── */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 900;
  display: flex;
  justify-content: flex-end;
}
.drawer-backdrop.hidden { display: none; }

.drawer {
  width: min(600px, 95vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: slideInRight .22s ease;
  box-shadow: var(--shadow-lg);
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.drawer-title { font-size: 15px; font-weight: 600; }
.drawer-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.drawer-body { padding: 24px; flex: 1; }

/* ── Email step card ── */
.email-step-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color .15s;
}
.email-step-card:hover { border-color: var(--blue); }
.email-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.email-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  background: var(--blue-soft);
  color: var(--blue);
  margin-right: 8px;
  flex-shrink: 0;
}
.email-step-subject { font-size: 13px; font-weight: 500; flex: 1; }
.email-step-body {
  padding: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
  display: none;
}
.email-step-body.open { display: block; }

/* ── Step progress dots ── */
.step-progress { display: flex; align-items: center; gap: 4px; }
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.step-dot.done   { background: var(--green); }
.step-dot.active { background: var(--blue);  box-shadow: 0 0 0 2px var(--blue-soft); }
.step-dot.pending { background: var(--border); }

/* ── Send timing badge ── */
.timing-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
}

/* ── Daily welcome modal ── */
.welcome-modal-inner {
  text-align: center;
  max-width: 480px;
  padding: 48px 40px 40px;
  animation: welcomeFadeIn .3s ease;
}
@keyframes welcomeFadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.welcome-greeting {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  letter-spacing: -.3px;
}
.welcome-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.welcome-accent {
  width: 36px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin: 0 auto 28px;
}
.welcome-quote {
  font-size: 15px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 32px;
  border: none;
  padding: 0;
}
.welcome-btn { min-width: 130px; }

/* ── Theme toggle (sidebar footer) ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  margin: 4px 0;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  width: 100%;
}
.theme-toggle:hover { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.theme-toggle .theme-toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  background: var(--border);
  border-radius: 9999px;
  flex-shrink: 0;
}
.theme-toggle .theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: left .18s ease, background .18s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
[data-theme="dark"] .theme-toggle .theme-toggle-track { background: #4f46e5; }
[data-theme="dark"] .theme-toggle .theme-toggle-thumb { left: 16px; background: #f1f5f9; }

