/* ===========================================================================
   LEAD THE WAY — Application Stylesheet
   Dark theme, mobile-first, designed for field use
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Nunito:wght@400;500;600;700&family=Work+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&family=Mulish:wght@400;500;600;700&display=swap');

/* ── Reset & Variables ── */
:root {
  /* Colors */
  --bg: #0c0e14;
  --surface: #12151e;
  --surface2: #181c28;
  --surface3: #1e2436;
  --border: #252a3e;
  --text: #c8cdd8;
  --text2: #8b92a8;
  --text3: #8b94ae;
  --blue: #3b82f6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --primary: #3b82f6;
  --secondary: #22c55e;
  --accent: #f59e0b;

  /* Typography */
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --mono: 'JetBrains Mono', monospace;

  /* Shape */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
  --shadow: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
  --shadow-glow: none;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space: 12px;
  --space-lg: 16px;
  --space-xl: 24px;

  /* Motion */
  --transition: 150ms ease;
  --transition-slow: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Button */
  --btn-radius: var(--radius);
  --btn-font: var(--font-body);

  /* Card */
  --card-radius: var(--radius);
  --card-shadow: none;
  --card-border: 1px solid var(--border);
  --card-bg: var(--surface);

  /* Layout */
  --sidebar-w: 220px;
  --topbar-h: 56px;

  /* iOS safe areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

/* ── Loading screen ── */
.loading-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; gap: 12px; color: var(--text2);
}
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ── Top Bar (mobile) ── */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  padding-top: var(--safe-top);
  background: rgba(12,14,20,0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding-left: 16px; padding-right: 16px;
  gap: 12px; z-index: 90;
}
.menu-btn {
  background: none; border: none; color: var(--text); font-size: 22px;
  cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm);
}
.menu-btn:hover { background: var(--surface2); }
.top-title { font-size: 15px; font-weight: 700; color: #f0f2f5; }
.conn-badge {
  margin-left: auto; font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 20px;
}
.conn-badge.offline { background: rgba(239,68,68,0.15); color: #f87171; }
.conn-badge.syncing { background: rgba(59,130,246,0.15); color: #60a5fa; }

@media (min-width: 769px) {
  .top-bar { display: none; }
  .menu-btn { display: none; }
}

/* ── Sidebar ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 100;
  transform: translateX(-100%); transition: transform 0.25s ease;
  padding-top: var(--safe-top);
}
.sidebar.open { transform: translateX(0); }
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99;
}

@media (min-width: 769px) {
  .sidebar { transform: translateX(0); }
  .sidebar-backdrop { display: none; }
}

.sidebar-brand {
  padding: 20px 16px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.brand-icon { font-size: 24px; }
.brand-text { font-family: var(--mono); font-size: 16px; font-weight: 700; color: #f0f2f5; }

.nav-list { list-style: none; padding: 12px 8px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--text2); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: all 0.15s;
}
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: rgba(59,130,246,0.12); color: var(--blue); font-weight: 600; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer { padding: 12px 8px; border-top: 1px solid var(--border); }
.logout-btn {
  width: 100%; background: none; border: none; color: var(--text2);
  padding: 10px 12px; text-align: left; font-size: 13px; cursor: pointer;
  border-radius: var(--radius-sm);
}
.logout-btn:hover { background: var(--surface2); color: var(--red); }

/* ── Main Content ── */
.main-content {
  flex: 1; padding: calc(var(--topbar-h) + var(--safe-top) + 16px) 16px calc(16px + var(--safe-bottom));
  max-width: 1200px;
}
@media (min-width: 769px) {
  .main-content { margin-left: var(--sidebar-w); padding: 24px 32px; }
}

/* ── Page ── */
.page { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 22px; font-weight: 700; color: #f0f2f5; }
.page-sub { color: var(--text2); font-size: 14px; }
.header-actions { display: flex; gap: 8px; }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  transition: all var(--transition);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.card-header h3 { font-size: 15px; font-weight: 700; color: #f0f2f5; }
.card-title { font-size: 14px; font-weight: 700; color: #f0f2f5; margin-bottom: 12px; }

/* ── Stat Grid ── */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.stat-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--space-lg);
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover { border-color: var(--surface3); transform: translateY(-1px); }
.stat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px; }
.stat-value { font-family: var(--mono); font-size: 28px; font-weight: 700; color: #f0f2f5; }
.stat-label { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ── Buttons ── */
.btn {
  font-family: var(--btn-font); font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--btn-radius); border: none;
  cursor: pointer; transition: all var(--transition); display: inline-flex;
  align-items: center; gap: 6px; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: white; border-radius: var(--btn-radius); }
.btn-primary:hover:not(:disabled) { background: #2563eb; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: var(--btn-radius); }
.btn-outline:hover { background: var(--surface2); border-color: var(--text2); }
.btn-ghost { background: transparent; color: var(--text2); }
.btn-ghost:hover { color: var(--text); background: var(--surface2); }
.btn-full { width: 100%; justify-content: center; padding: 12px; }

/* ── Inputs ── */
.input {
  font-family: var(--font-body); font-size: 16px; width: 100%; /* 16px prevents iOS auto-zoom */
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}
.input:focus { outline: none; border-color: var(--blue); }
.input::placeholder { color: var(--text3); }
.textarea { min-height: 80px; resize: vertical; }
select.input { appearance: auto; }

/* ── Filter Bar ── */
.filter-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.search-input { max-width: 300px; }
.filter-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text2); cursor: pointer; transition: all 0.15s;
}
.pill:hover { background: var(--surface2); color: var(--text); }
.pill.active { background: var(--blue); color: white; border-color: var(--blue); }

/* ── Dog Grid ── */
.dog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.dog-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.dog-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.dog-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dog-avatar {
  width: 40px; height: 40px; border-radius: 10px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.dog-name { font-size: 15px; font-weight: 700; color: #f0f2f5; }
.dog-breed { font-size: 12px; color: var(--text2); }
.handling-dot {
  width: 12px; height: 12px; border-radius: 50%; margin-left: auto; flex-shrink: 0;
}
.dog-card-body { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Status Badges ── */
.status-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 20px; text-transform: capitalize;
}
.status-prospect    { background: rgba(107,114,128,0.15); color: #9ca3af; }
.status-new         { background: rgba(59,130,246,0.15); color: #60a5fa; }
.status-active, .status-enrolled { background: rgba(34,197,94,0.15); color: #4ade80; }
.status-graduated, .status-alumni { background: rgba(139,92,246,0.15); color: #a78bfa; }
.status-contacted   { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-consultation_booked { background: rgba(139,92,246,0.15); color: #a78bfa; }
.status-consultation_done   { background: rgba(6,182,212,0.15); color: #22d3ee; }
.status-proposal_sent { background: rgba(236,72,153,0.15); color: #f472b6; }
.status-scheduled   { background: rgba(59,130,246,0.12); color: #60a5fa; }
.status-confirmed   { background: rgba(34,197,94,0.12); color: #4ade80; }
.status-completed   { background: rgba(107,114,128,0.12); color: #9ca3af; }
.status-cancelled   { background: rgba(239,68,68,0.12); color: #f87171; }
.status-paused      { background: rgba(245,158,11,0.12); color: #fbbf24; }

.program-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 20px; background: rgba(6,182,212,0.12); color: #22d3ee;
}

/* ── Pipeline (Kanban) ── */
.pipeline { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; max-width: 100%; }
.pipeline-col { min-width: 180px; max-width: 240px; flex: 1 0 180px; }
.pipeline-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--surface); border-top: 3px solid; font-size: 13px;
  font-weight: 700; color: #f0f2f5; margin-bottom: 8px;
}
.pipeline-count {
  font-family: var(--mono); font-size: 12px; background: var(--surface2);
  padding: 2px 8px; border-radius: 10px; color: var(--text2);
}
.pipeline-cards { display: flex; flex-direction: column; gap: 8px; }
.pipeline-empty {
  text-align: center; padding: 20px; color: var(--text3); font-size: 12px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.lead-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; cursor: pointer;
  transition: border-color 0.2s;
}
.lead-card:hover { border-color: var(--blue); }
.lead-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.lead-dog-name { font-size: 13px; font-weight: 700; color: #f0f2f5; }
.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lead-challenges { font-size: 12px; color: var(--text2); margin-bottom: 6px; line-height: 1.4; }
.lead-meta { display: flex; gap: 8px; font-size: 11px; color: var(--text3); }
.lead-source { text-transform: capitalize; }

/* ── Appointment List ── */
.appt-list { display: flex; flex-direction: column; gap: 4px; }
.appt-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); transition: background 0.15s;
}
.appt-row:hover { background: var(--surface2); }
.appt-time { font-family: var(--mono); font-size: 13px; color: var(--blue); min-width: 65px; }
.appt-type { font-size: 13px; flex: 1; }
.appt-status { font-size: 11px; }

/* ── Lead Row ── */
.lead-list { display: flex; flex-direction: column; gap: 2px; }
.lead-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s;
}
.lead-row:hover { background: var(--surface2); }

/* ── Profile / Detail ── */
.profile-header { }
.profile-top { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 16px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.profile-name { font-size: 22px; font-weight: 700; color: #f0f2f5; }
.profile-sub { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Field Rows ── */
.field-group { display: flex; flex-direction: column; gap: 2px; }
.field-row {
  display: flex; padding: 8px 0; border-bottom: 1px solid var(--border);
  gap: 12px; font-size: 13px;
}
.field-row:last-child { border-bottom: none; }
.field-label { color: var(--text2); min-width: 120px; flex-shrink: 0; font-weight: 500; }
.field-value { color: var(--text); }

/* ── Forms ── */
.form { max-width: 560px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 8px 12px; font-weight: 600; color: var(--text2);
  border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--surface2); }

/* ── Link ── */
.link { color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ── Empty / Loading states ── */
.empty-state { text-align: center; padding: 32px; color: var(--text3); font-size: 14px; }
.loading-state { text-align: center; padding: 32px; color: var(--text2); }
.error-text { color: var(--red); font-size: 13px; margin: 8px 0; }

/* ── Placeholder page ── */
.placeholder-page {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 64px 24px; text-align: center;
}
.placeholder-icon { font-size: 48px; margin-bottom: 16px; }
.placeholder-page h2 { font-size: 22px; margin-bottom: 8px; color: #f0f2f5; }
.placeholder-page p { color: var(--text2); max-width: 360px; }

/* ── Login ── */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh; padding: 24px;
}
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; width: 100%; max-width: 380px;
  text-align: center;
}
.login-brand { font-size: 48px; margin-bottom: 12px; }
.login-card h1 { font-size: 22px; font-weight: 700; color: #f0f2f5; margin-bottom: 4px; }
.login-sub { color: var(--text2); font-size: 14px; margin-bottom: 24px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }

/* ── Mobile optimizations ── */
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { flex-direction: column; }
  .pipeline-col { min-width: unset; }
  .form-row { grid-template-columns: 1fr; }
  .dog-grid { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 2px; }
  .field-label { min-width: unset; }
}

/* ── Touch targets ── */
@media (hover: none) {
  .btn { min-height: 44px; }
  .input { min-height: 44px; }
  .nav-link { min-height: 44px; }
}

/* ===========================================================================
   SCHEDULE SCREEN
   =========================================================================== */

.schedule-nav {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.schedule-date { font-size: 15px; font-weight: 600; color: #f0f2f5; margin-left: 4px; }
.schedule-today { font-size: 12px; }
.view-toggle { display: flex; gap: 4px; margin-left: auto; }

.schedule-timeline { }
.timeline-hour {
  display: flex; gap: 12px; min-height: 48px;
  border-bottom: 1px solid var(--border); padding: 4px 0;
}
.hour-label {
  font-family: var(--mono); font-size: 12px; color: var(--text3);
  min-width: 50px; padding-top: 4px; text-align: right;
}
.hour-slots { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.appt-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid; border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: pointer; transition: border-color 0.2s, transform 0.15s;
}
.appt-card:hover { transform: translateX(2px); border-color: var(--blue); }
.appt-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.appt-card-time { font-family: var(--mono); font-size: 12px; color: var(--blue); }
.appt-card-title { font-size: 13px; font-weight: 600; color: #f0f2f5; }
.appt-card-location { font-size: 11px; color: var(--text2); margin-top: 4px; }
.appt-card-zoom { font-size: 11px; margin-top: 4px; display: inline-block; }

.week-day-group { margin-bottom: 16px; }
.week-day-label {
  font-size: 13px; font-weight: 700; color: var(--blue);
  padding: 8px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.week-day-group .appt-card { margin-bottom: 6px; }

/* ===========================================================================
   DOG FORM
   =========================================================================== */

.dog-form { max-width: 680px; }
.form-section-title {
  font-size: 15px; font-weight: 700; color: var(--blue);
  margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--border);
}
.form-section-title:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

.handling-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.handling-btn {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 20px; border: 2px solid var(--border);
  background: transparent; color: var(--text2); cursor: pointer; transition: all 0.15s;
}
.handling-btn.active { color: white; }
.handling-btn.handling-green { border-color: #22c55e40; }
.handling-btn.handling-green.active { background: #22c55e; border-color: #22c55e; color: #0a0c12; }
.handling-btn.handling-yellow { border-color: #eab30840; }
.handling-btn.handling-yellow.active { background: #eab308; border-color: #eab308; color: #0a0c12; }
.handling-btn.handling-purple { border-color: #a855f740; }
.handling-btn.handling-purple.active { background: #a855f7; border-color: #a855f7; }
.handling-btn.handling-black { border-color: #37415140; }
.handling-btn.handling-black.active { background: #374151; border-color: #374151; }

.trigger-input-row { display: flex; gap: 8px; }
.trigger-input-row .input { flex: 1; }
.trigger-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.trigger-tag {
  display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500;
  padding: 4px 10px; background: rgba(239,68,68,0.12); color: #f87171;
  border-radius: 20px;
}
.trigger-remove {
  background: none; border: none; color: #f87171; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px;
}
.trigger-remove:hover { color: #ef4444; }

.reactivity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.reactivity-item { display: flex; align-items: center; gap: 8px; }
.reactivity-label { font-size: 12px; color: var(--text2); min-width: 80px; text-transform: capitalize; }
.reactivity-select { max-width: 120px; font-size: 16px; padding: 6px 8px; }

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

/* ===========================================================================
   MESSAGES / CHAT
   =========================================================================== */

.messages-page .page-header { margin-bottom: 12px; }
.messages-layout {
  display: flex; gap: 0; height: calc(100vh - 120px); min-height: 400px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
}

/* ── Sidebar — conversation list ── */
.msg-sidebar {
  width: 280px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); overflow-y: auto;
}
.msg-sidebar-header {
  padding: 14px 16px; font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border);
}
.msg-convo {
  display: flex; gap: 10px; padding: 12px 14px; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s;
}
.msg-convo:hover { background: var(--surface2); }
.msg-convo.active { background: rgba(59,130,246,0.08); }
.msg-convo-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
}
.msg-convo-info { flex: 1; min-width: 0; }
.msg-convo-top { display: flex; justify-content: space-between; align-items: center; }
.msg-convo-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-convo-badge {
  background: var(--blue); color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px; flex-shrink: 0;
}
.msg-convo-preview { font-size: 12px; color: var(--text3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-empty { padding: 24px; text-align: center; color: var(--text3); font-size: 13px; }

/* ── Chat area ── */
.msg-chat { flex: 1; display: flex; flex-direction: column; background: var(--bg); }
.msg-chat-inner { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msg-chat-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text3); font-size: 14px;
}

/* Chat header */
.msg-chat-header {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.msg-chat-title { font-size: 14px; font-weight: 600; color: var(--text); }
.msg-chat-subtitle { font-size: 11px; color: var(--text3); }
.msg-header-btn {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; cursor: pointer; font-size: 14px; transition: background 0.15s;
}
.msg-header-btn:hover { background: var(--surface2); }

/* Summary panel */
.msg-summary-panel {
  padding: 12px 16px; background: rgba(34,197,94,0.06); border-bottom: 1px solid var(--border);
}
.msg-summary-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 16px; }

/* ── Thread — message bubbles ── */
.msg-thread {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 2px;
}

/* Date divider */
.msg-date-divider {
  display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; color: var(--text3); font-size: 11px;
}
.msg-date-divider::before, .msg-date-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Message row */
.msg-row { display: flex; gap: 8px; align-items: flex-end; position: relative; }
.msg-row-sent { justify-content: flex-end; }
.msg-row-received { justify-content: flex-start; }
.msg-consecutive { margin-top: -4px; }

/* Avatar */
.msg-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface2); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text2);
}
.msg-avatar-spacer { width: 28px; flex-shrink: 0; }

/* Bubble */
.msg-cloud {
  max-width: 70%; padding: 8px 12px; border-radius: 18px; font-size: 14px;
  line-height: 1.45; position: relative; word-break: break-word;
}
.msg-cloud-sent {
  background: var(--blue); color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-cloud-received {
  background: var(--surface); color: var(--text);
  border-bottom-left-radius: 4px;
}
.msg-cloud-sender {
  font-size: 11px; font-weight: 600; color: var(--blue); margin-bottom: 2px;
  text-transform: capitalize;
}
.msg-auto-tag {
  display: inline-block; font-size: 9px; background: rgba(59,130,246,0.15);
  color: var(--blue); padding: 0 5px; border-radius: 6px; margin-left: 4px; vertical-align: middle;
}
.msg-cloud-body { white-space: pre-wrap; }
.msg-cloud-footer {
  display: flex; gap: 6px; align-items: center; justify-content: flex-end;
  margin-top: 2px; font-size: 10px; opacity: 0.6;
}
.msg-cloud-sent .msg-cloud-footer { color: rgba(255,255,255,0.7); }
.msg-cloud-received .msg-cloud-footer { color: var(--text3); }
.msg-cloud-time { font-family: var(--mono); }
.msg-flag { font-size: 10px; }

/* Media in bubbles */
.msg-cloud-media { margin-bottom: 4px; }
.msg-media-img { max-width: 220px; border-radius: 12px; cursor: pointer; display: block; }
.msg-media-video { max-width: 280px; border-radius: 12px; display: block; }

/* Hover actions */
.msg-actions {
  display: none; position: absolute; top: -4px; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 2px 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.msg-row-sent .msg-actions { left: -8px; right: auto; }
.msg-row-received .msg-actions { right: -8px; left: auto; }
.msg-row:hover .msg-actions, .msg-row-open .msg-actions { display: flex; }
.msg-actions button {
  background: none; border: none; cursor: pointer; font-size: 13px;
  padding: 3px 5px; border-radius: 4px; transition: background 0.1s;
}
.msg-actions button:hover { background: var(--surface2); }
.msg-actions-sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }
.msg-actions-more {
  font-size: 14px !important; font-weight: 700; color: var(--text3) !important;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface2) !important;
}

/* Emoji picker — fixed to bottom edge */
.msg-emoji-picker {
  position: fixed; bottom: calc(60px + var(--safe-bottom)); left: 0; right: 0; z-index: 100;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 10px 12px calc(10px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  animation: slideUp 0.15s ease;
}
.msg-emoji-picker button {
  background: none; border: none; cursor: pointer; font-size: 22px;
  padding: 8px; border-radius: 8px; transition: background 0.1s;
}
.msg-emoji-picker button:hover, .msg-emoji-picker button:active { background: var(--surface2); }

/* Reactions */
.msg-reactions { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.msg-reaction {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 12px;
  padding: 1px 6px; font-size: 12px; cursor: default;
}

/* ── Compose bar — messenger-style ── */
.msg-compose-bar {
  display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px;
  background: var(--surface); border-top: 1px solid var(--border);
}
.msg-compose-btn {
  background: none; border: none; cursor: pointer; font-size: 14px;
  padding: 4px; border-radius: 6px; transition: background 0.15s; color: var(--text3);
}
.msg-compose-btn:hover { background: var(--surface2); color: var(--text); }
.msg-compose-input-wrap { flex: 1; }
.msg-compose-input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 10px 16px; color: var(--text); font-size: 15px;
  font-family: inherit; resize: none; outline: none; min-height: 44px; max-height: 160px;
}
.msg-compose-input:focus { border-color: var(--blue); }
.msg-compose-input::placeholder { color: var(--text3); }
.msg-send-btn {
  background: var(--blue); color: #fff; border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; flex-shrink: 0;
}
.msg-send-btn:hover { background: #2563eb; }
.msg-send-btn:disabled { background: var(--surface2); color: var(--text3); cursor: default; }

/* Attachment preview */
.msg-attach-preview {
  display: flex; gap: 6px; padding: 8px 12px; background: var(--surface2);
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.msg-attach-thumb {
  display: flex; align-items: center; gap: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 12px;
}
.msg-attach-name { color: var(--text2); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-attach-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 12px; }
.msg-uploading { padding: 4px 16px; font-size: 12px; color: var(--blue); background: rgba(59,130,246,0.06); }

/* Admin action buttons */
.admin-action-btn {
  border: none; background: var(--surface2); cursor: pointer; font-size: 12px;
  color: var(--text2); padding: 4px 10px; border-radius: 6px; transition: all 0.15s;
  white-space: nowrap;
}
.admin-action-btn:hover { background: var(--surface); color: var(--text); }
.admin-action-btn.flagged { color: var(--red); }
.admin-action-btn.delete { color: var(--red); }
.admin-action-btn.delete:hover { background: rgba(239,68,68,0.15); }

@media (max-width: 768px) {
  .messages-layout { flex-direction: column; height: calc(100vh - 120px); }
  .msg-sidebar { width: 100%; max-height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
  .msg-cloud { max-width: 85%; }
  .msg-row-open .msg-actions { display: flex !important; }
}

/* ── Follow-up Alerts ── */
.alert-card { border-left: 3px solid var(--amber); }
.alert-count {
  background: var(--amber); color: #000; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px; min-width: 20px; text-align: center;
}
.followup-list { display: flex; flex-direction: column; gap: 2px; }
.followup-row {
  display: grid; grid-template-columns: 1fr 2fr auto;
  gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer;
  border-radius: 6px; transition: background 0.15s;
}
.followup-row:hover { background: var(--surface2); }
.followup-info { display: flex; align-items: center; gap: 8px; }
.followup-dog { font-weight: 600; color: var(--text); }
.followup-detail { color: var(--text2); font-size: 13px; }
.followup-challenge { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.followup-meta { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.followup-date { font-size: 12px; font-weight: 600; color: var(--amber); font-family: var(--mono); }

.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.priority-urgent { background: var(--red); }
.priority-high { background: var(--amber); }
.priority-normal { background: var(--text3); }
.priority-low { background: var(--text3); opacity: 0.5; }

@media (max-width: 768px) {
  .followup-row { grid-template-columns: 1fr; gap: 4px; }
  .followup-meta { justify-content: flex-start; }
}

/* ── Connection Bar ── */
.connection-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--safe-top)) 16px 8px; font-size: 13px; font-weight: 600;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.conn-offline { background: var(--red); color: white; }
.conn-syncing { background: var(--amber); color: #000; }
.conn-icon { font-size: 16px; }
.conn-text { flex: 1; }
.conn-sync-btn {
  background: rgba(0,0,0,0.2); color: inherit; border: none; padding: 4px 12px;
  border-radius: 4px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.conn-sync-btn:hover { background: rgba(0,0,0,0.3); }

/* ── Install Banner ── */
.install-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px calc(12px + var(--safe-bottom)); background: var(--surface); border-top: 1px solid var(--border);
  font-size: 14px; color: var(--text);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.install-banner span { flex: 1; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Offline Save Banner ── */
.offline-save-banner {
  background: var(--amber); color: #000; padding: 10px 16px;
  border-radius: var(--radius); font-size: 13px; font-weight: 600;
  margin-bottom: 12px; text-align: center;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.offline-hint { font-size: 12px; color: var(--amber); margin-left: 8px; }
.success-text { color: var(--green); font-size: 13px; font-weight: 600; }
.error-text { color: var(--red); font-size: 13px; font-weight: 600; }

/* ── Lead Pipeline Progress ── */
.lead-pipeline-progress {
  display: flex; gap: 4px; align-items: center; overflow-x: auto; padding: 4px 0;
}
.pipeline-step {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text3);
  text-transform: capitalize; white-space: nowrap; padding: 4px 8px; border-radius: 4px;
}
.pipeline-step.active { color: var(--text2); }
.pipeline-step.current {
  color: var(--blue); font-weight: 700; background: rgba(59,130,246,0.1);
}
.pipeline-step-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0;
}
.pipeline-step.active .pipeline-step-dot { background: var(--blue); }
.pipeline-step.current .pipeline-step-dot {
  background: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

/* ── Lead Card Inline Edit ── */
.lead-card-editing {
  background: var(--surface2); border: 1px solid var(--blue); cursor: default;
}
.lead-card-editing .input-sm {
  font-size: 12px; padding: 5px 8px; background: var(--surface); border: 1px solid var(--border);
}
.lead-card-editing textarea.input-sm { resize: vertical; }
.lead-card-editing select.input-sm { font-size: 16px; padding: 4px 6px; }
.pipeline-overall { font-size: 13px; color: var(--green); font-weight: 600; font-family: var(--mono); }
.pipeline-rate { font-size: 10px; color: var(--text3); font-family: var(--mono); margin-left: auto; }

/* ── Reports ── */
.report-bars { display: flex; flex-direction: column; gap: 10px; }
.report-bar-row { display: flex; align-items: center; gap: 12px; }
.report-bar-label { width: 140px; font-size: 13px; color: var(--text2); text-transform: capitalize; flex-shrink: 0; }
.report-bar-track { flex: 1; height: 20px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.report-bar-fill { height: 100%; background: var(--blue); border-radius: 4px; transition: width 0.3s ease; min-width: 2px; }
.report-bar-value { width: 80px; text-align: right; font-size: 13px; font-family: var(--mono); color: var(--text); font-weight: 600; }

/* ── Chat media ── */
.msg-media { margin-bottom: 6px; }
.msg-img { max-width: 200px; border-radius: 8px; cursor: pointer; }
.msg-video { max-width: 280px; border-radius: 8px; }
.msg-attach { font-size: 20px; padding: 8px; }

@media (max-width: 768px) {
  .report-bar-label { width: 100px; font-size: 11px; }
  .report-bar-value { width: 60px; font-size: 11px; }
}

/* ── Data Browser ── */
.data-browser-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.data-browser-tab {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text2);
  cursor: pointer; transition: all 0.15s;
}
.data-browser-tab:hover { background: var(--surface2); color: var(--text); border-color: var(--text3); }
.data-browser-tab.active {
  background: var(--blue); color: #fff; border-color: var(--blue);
}
.data-browser-table select.input-sm {
  min-width: 100px; font-size: 12px; padding: 4px 8px;
  background: var(--surface); border: 1px solid var(--border);
}
.row-saving { opacity: 0.5; pointer-events: none; }

/* ── Message History ── */
.msg-history { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.msg-history-item {
  padding: 10px 12px; background: var(--surface2); border-radius: 8px;
}
.msg-history-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px;
}
.msg-history-time { color: var(--text3); font-family: var(--mono); margin-left: auto; }
.msg-history-body { color: var(--text); font-size: 13px; line-height: 1.5; margin: 0; }

/* ── Schedule Page ── */
.schedule-nav {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding: 12px; background: var(--surface); border-radius: var(--radius);
}
.schedule-date { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; }
.schedule-date input[type="date"] { background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 6px 10px; border-radius: 6px; font-family: var(--mono); }
.schedule-date-label { color: var(--text2); font-size: 13px; }
.schedule-list { display: flex; flex-direction: column; gap: 8px; }
.schedule-item {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px !important;
}
.schedule-item-time {
  display: flex; flex-direction: column; align-items: flex-end; min-width: 70px;
  font-family: var(--mono); font-size: 14px; font-weight: 600;
}
.schedule-time-start { color: var(--text); }
.schedule-time-end { color: var(--text3); font-size: 12px; }
.schedule-item-body { flex: 1; }
.schedule-item-title { font-weight: 600; color: var(--text); text-transform: capitalize; margin-bottom: 4px; }
.schedule-item-loc { color: var(--text2); font-size: 13px; }
.schedule-item-status { margin-left: auto; }

/* ── Messages Page ── */
.messages-layout {
  display: flex; height: calc(100vh - 140px); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}
.msg-sidebar {
  width: 240px; background: var(--surface); border-right: 1px solid var(--border);
  overflow-y: auto; flex-shrink: 0;
}
.msg-thread {
  padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.msg-thread:hover { background: var(--surface2); }
.msg-thread.active { background: var(--surface2); border-left: 3px solid var(--blue); }
.msg-thread-name { font-weight: 600; color: var(--text); font-size: 14px; }
.msg-thread-sub { color: var(--text3); font-size: 12px; margin-top: 2px; text-transform: capitalize; }
.msg-chat {
  flex: 1; display: flex; flex-direction: column; background: var(--bg);
}
.msg-messages {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.msg-bubble {
  max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5;
}
.msg-sent {
  align-self: flex-end; background: var(--blue); color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-received {
  align-self: flex-start; background: var(--surface); color: var(--text);
  border-bottom-left-radius: 4px;
}
.msg-bubble .msg-time { font-size: 11px; opacity: 0.6; margin-top: 4px; }
.msg-compose {
  display: flex; align-items: center; gap: 8px; padding: 12px;
  border-top: 1px solid var(--border); background: var(--surface);
}
.msg-input { flex: 1; }
.msg-send { padding: 10px 16px; font-size: 18px; }

@media (max-width: 768px) {
  .messages-layout { flex-direction: column; height: auto; }
  .msg-sidebar { width: 100%; max-height: 150px; }
  .msg-chat { min-height: 400px; }
  .schedule-nav { flex-wrap: wrap; }
  .schedule-date-label { display: none; }
  .schedule-item { flex-direction: column; gap: 8px; }
  .schedule-item-time { flex-direction: row; gap: 8px; }
}

/* ===========================================================================
   DAY 2 COMPONENTS — Media, Encyclopedia, Documents, AI
   =========================================================================== */

/* ── Media Gallery ── */
.media-gallery { padding: 4px 0; }
.gallery-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gallery-count { font-size: 13px; color: var(--text2); }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.gallery-item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  cursor: pointer; aspect-ratio: 1; background: var(--surface2);
  border: 1px solid var(--border); transition: transform 0.15s, border-color 0.15s;
}
.gallery-item:hover { transform: scale(1.03); border-color: var(--blue); }
.gallery-item.processing { opacity: 0.6; }
.gallery-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb { position: relative; display: flex; align-items: center; justify-content: center; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.play-icon {
  position: absolute; font-size: 28px; color: white; text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  pointer-events: none;
}
.audio-thumb, .doc-thumb {
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; background: var(--surface3);
}
.processing-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5); color: white; font-size: 14px; font-weight: 600;
}
.processing-overlay.error { background: rgba(239,68,68,0.5); }
.progress-ring { font-size: 16px; font-weight: 700; }
.gallery-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 6px; background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 10px; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-tags { position: absolute; top: 4px; left: 4px; display: flex; gap: 3px; flex-wrap: wrap; }
.tag-chip {
  font-size: 9px; padding: 2px 6px; border-radius: 8px;
  background: rgba(59,130,246,0.8); color: white; backdrop-filter: blur(4px);
}

/* ── Upload progress ── */
.upload-progress { margin-bottom: 12px; }
.progress-bar { height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 2px; transition: width 0.2s; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-content {
  background: var(--surface); border-radius: var(--radius); padding: 8px;
  max-width: 90vw; max-height: 90vh; position: relative; overflow: auto;
}
.lightbox-close {
  position: absolute; top: 8px; right: 8px; z-index: 10;
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: var(--red); color: white; }
.lightbox-img { max-width: 100%; max-height: 80vh; border-radius: var(--radius-sm); }
.lightbox-video { max-width: 100%; max-height: 80vh; border-radius: var(--radius-sm); }
.lightbox-desc { color: var(--text2); font-size: 13px; margin-top: 8px; padding: 0 8px; }
.lightbox-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; }

/* ── Encyclopedia ── */
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.trait-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.trait-label { width: 120px; font-size: 13px; color: var(--text2); }
.trait-track { flex: 1; height: 8px; background: var(--surface3); border-radius: 4px; }
.trait-fill { height: 100%; background: var(--blue); border-radius: 4px; transition: width 0.3s; }
.trait-value { width: 35px; text-align: right; font-size: 13px; color: var(--text2); }

/* ── Documents Panel ── */
.documents-panel { padding: 4px 0; }

/* ── Signature Pad ── */
.signature-canvas {
  width: 100%; height: 150px; border: 2px solid var(--border);
  border-radius: var(--radius); cursor: crosshair; touch-action: none;
  background: var(--surface2);
}

/* ── Enrollment Detail ── */
.enrollment-header { padding: 20px; }
.ai-result {
  margin-top: 16px; padding: 16px; background: var(--surface2);
  border-radius: var(--radius); border-left: 4px solid var(--green);
}

/* ── Enhanced Messages ── */
.msg-type-btn {
  padding: 6px 10px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 16px;
  color: var(--text2); transition: all 0.15s;
}
.msg-type-btn:hover { background: var(--surface3); color: var(--text); }
.msg-type-btn.active { background: var(--blue); border-color: var(--blue); color: white; }
.msg-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 8px; margin-top: 4px; }
.homework-tag { background: rgba(245,158,11,0.15); color: var(--amber); }
.progress-tag { background: rgba(59,130,246,0.15); color: var(--blue); }

/* ── Btn variants for Day 2 ── */
.btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 8px 14px; border-radius: var(--btn-radius); cursor: pointer;
  font-size: 13px; font-weight: 500; transition: all var(--transition);
}
.btn-outline:hover { background: var(--surface2); border-color: var(--blue); color: var(--blue); }
.btn-outline:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost {
  background: none; border: none; color: var(--text2); cursor: pointer;
  font-size: 13px; padding: 6px 10px;
}
.btn-ghost:hover { color: var(--text); }

/* ── Status badges for enrollment ── */
.status-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 10px; }

/* ── Empty state ── */
.empty-state { color: var(--text3); font-size: 14px; text-align: center; padding: 24px; }
.loading-state { color: var(--text3); font-size: 14px; text-align: center; padding: 24px; }

/* ── Card title consistency ── */
.card-title {
  font-size: 14px; font-weight: 600; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
}

/* ── Field rows ── */
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: flex; gap: 12px; font-size: 14px; }
.field-label { color: var(--text2); min-width: 120px; flex-shrink: 0; }

/* ── Session Tracker ── */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Responsive Day 2 ── */
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .filter-pills { gap: 4px; }
  .filter-pills .btn-sm { font-size: 11px; padding: 4px 8px; }
}

/* ── Tab buttons (Partners, Templates, etc.) ── */
.tab-btn { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text2); cursor: pointer; font-size: 13px; }
.tab-btn.active { background: var(--blue); color: white; border-color: var(--blue); font-weight: 600; }
.tab-btn:hover:not(.active) { background: var(--surface); }

/* Sidebar scrollable nav — prevents overflow on mobile with many nav items */
.nav-list { overflow-y: auto; max-height: calc(100vh - 120px); -webkit-overflow-scrolling: touch; padding-bottom: env(safe-area-inset-bottom, 20px); }
.nav-list::-webkit-scrollbar { width: 4px; }
.nav-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Light Mode (auto-detects system preference) ── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="pawforge"]):not([data-theme="pro"]):not([data-theme="cream"]):not([data-theme="field"]):not([data-theme="terminal"]):not([data-theme="soft"]):not([data-theme="high-contrast"]) {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface2: #f0f0f0;
    --border: #e0e0e0;
    --text: #1a1a2e;
    --text2: #4a5268;
    --text3: #5f6880;
    --green: #1a8a4a;
    --blue: #2563eb;
    --red: #dc2626;
    --amber: #d97706;
    --card-bg: #ffffff;
    --card-border: 1px solid #e0e0e0;
  }
  :root:not([data-theme="dark"]):not([data-theme="pawforge"]):not([data-theme="pro"]):not([data-theme="cream"]):not([data-theme="field"]):not([data-theme="terminal"]):not([data-theme="soft"]):not([data-theme="high-contrast"]) .sidebar { background: #1a1a2e; }
  :root:not([data-theme="dark"]):not([data-theme="pawforge"]):not([data-theme="pro"]):not([data-theme="cream"]):not([data-theme="field"]):not([data-theme="terminal"]):not([data-theme="soft"]):not([data-theme="high-contrast"]) .top-bar { background: #ffffff; border-bottom: 1px solid #e0e0e0; color: #1a1a2e; }
  :root:not([data-theme="dark"]):not([data-theme="pawforge"]):not([data-theme="pro"]):not([data-theme="cream"]):not([data-theme="field"]):not([data-theme="terminal"]):not([data-theme="soft"]):not([data-theme="high-contrast"]) .card { background: #ffffff; border: 1px solid #e0e0e0; }
  :root:not([data-theme="dark"]):not([data-theme="pawforge"]):not([data-theme="pro"]):not([data-theme="cream"]):not([data-theme="field"]):not([data-theme="terminal"]):not([data-theme="soft"]):not([data-theme="high-contrast"]) .input { background: #f5f5f5; border-color: #d0d0d0; color: #1a1a2e; }
}

/* ── Explicit Light Theme ── */
:root[data-theme="light"] {
  --bg: #f5f5f5; --surface: #ffffff; --surface2: #f0f0f0; --border: #e0e0e0;
  --text: #1a1a2e; --text2: #4a5268; --text3: #5f6880; /* 5.1:1 contrast — WCAG AA */
  --green: #1a8a4a; --blue: #2563eb; --red: #dc2626; --amber: #d97706;
  --card-bg: #ffffff; --card-border: 1px solid #e0e0e0;
}
:root[data-theme="light"] .sidebar { background: #1a1a2e; }
:root[data-theme="light"] .top-bar { background: #fff; border-bottom: 1px solid #e0e0e0; color: #1a1a2e; }
:root[data-theme="light"] .input { background: #f5f5f5; border-color: #d0d0d0; color: #1a1a2e; }
:root[data-theme="light"] .btn-primary { background: var(--blue); color: white; }
:root[data-theme="light"] .dog-card, :root[data-theme="light"] .lead-card { background: #fff; border: 1px solid #e0e0e0; }

/* ── PawForge Theme (Purple/Green — Plus Jakarta Sans) ── */
:root[data-theme="pawforge"] {
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Plus Jakarta Sans', monospace;
  --bg: #faf9fc; --surface: #ffffff; --surface2: #f4f2f7; --surface3: #e8e5ef;
  --border: #ddd6fe; --text: #1a1a2e; --text2: #6b7280; --text3: #6f64a0; /* 5.0:1 contrast — WCAG AA */
  --blue: #7c3aed; --green: #059669; --red: #dc2626; --amber: #d97706; /* purple-600 for better contrast */
  --purple: #8b5cf6; --pink: #a78bfa; --cyan: #10b981;
  --radius: 14px; --radius-sm: 8px;
  --btn-radius: 10px; --card-radius: 16px;
  --card-bg: #ffffff; --card-border: 1px solid #ddd6fe;
  --card-shadow: 0 1px 3px rgba(107,63,160,0.06);
}
:root[data-theme="pawforge"] .sidebar {
  background: linear-gradient(180deg, #2e1065, #064e3b); color: #e8e5ef;
}
:root[data-theme="pawforge"] .nav-link { color: #c4b5fd; }
:root[data-theme="pawforge"] .nav-link.active { color: #6ee7b7; background: rgba(139,92,246,0.1); border-left: 3px solid #6ee7b7; }
:root[data-theme="pawforge"] .nav-link:hover { color: #a78bfa; background: rgba(139,92,246,0.08); }
:root[data-theme="pawforge"] .top-bar { background: #fff; border-bottom: 1px solid #ddd6fe; color: #1a1a2e; }
:root[data-theme="pawforge"] .card { background: #fff; border: 1px solid #ddd6fe; box-shadow: 0 1px 3px rgba(107,63,160,0.06); }
:root[data-theme="pawforge"] .card:hover { box-shadow: 0 8px 30px rgba(107,63,160,0.08); }
:root[data-theme="pawforge"] .input { background: #faf9fc; border-color: #ddd6fe; color: #1a1a2e; }
:root[data-theme="pawforge"] .input:focus { border-color: #a78bfa; }
:root[data-theme="pawforge"] .btn-primary { background: #8b5cf6; color: white; }
:root[data-theme="pawforge"] .btn-primary:hover { background: #7c3aed; }
:root[data-theme="pawforge"] .btn-outline { border-color: #ddd6fe; color: #8b5cf6; }
:root[data-theme="pawforge"] .stat-card { background: #fff; border: 1px solid #ddd6fe; }
:root[data-theme="pawforge"] .stat-icon { background: #f5f3ff !important; }
:root[data-theme="pawforge"] .status-badge { border: 1px solid #ddd6fe; }
:root[data-theme="pawforge"] .status-active, :root[data-theme="pawforge"] .status-enrolled { background: #d1fae5; color: #059669; border-color: #a7f3d0; }
:root[data-theme="pawforge"] .status-new, :root[data-theme="pawforge"] .status-prospect { background: #ede9fe; color: #7c3aed; border-color: #ddd6fe; }
:root[data-theme="pawforge"] .status-graduated, :root[data-theme="pawforge"] .status-alumni { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
:root[data-theme="pawforge"] .dog-card, :root[data-theme="pawforge"] .lead-card { background: #fff; border: 1px solid #ddd6fe; }
:root[data-theme="pawforge"] .pipeline-col { background: #f5f3ff; }
:root[data-theme="pawforge"] .msg-cloud-sent { background: #8b5cf6; color: #fff; }
:root[data-theme="pawforge"] .msg-cloud-received { background: #f4f2f7; color: #1a1a2e; }
:root[data-theme="pawforge"] .msg-convo-avatar { background: linear-gradient(135deg, #8b5cf6, #10b981); }
:root[data-theme="pawforge"] .msg-send-btn { background: #8b5cf6; }
:root[data-theme="pawforge"] .msg-compose-input { background: #f4f2f7; border-color: #ddd6fe; color: #1a1a2e; }
:root[data-theme="pawforge"] .brand-text { color: #1a1a2e; }
:root[data-theme="pawforge"] .sidebar .brand-text { color: #e8e5ef; }
:root[data-theme="pawforge"] .report-bar-fill { background: linear-gradient(90deg, #8b5cf6, #10b981); }
:root[data-theme="pawforge"] .handling-dot[title*="green"] { background: #10b981 !important; }
:root[data-theme="pawforge"] .handling-dot[title*="purple"] { background: #8b5cf6 !important; }
:root[data-theme="pawforge"] .schedule-nav { background: #f4f2f7; }
:root[data-theme="pawforge"] .data-browser-tab.active { background: #8b5cf6; border-color: #8b5cf6; }

/* ── High Contrast — user preference or accessibility override ── */
@media (prefers-contrast: more) {
  :root { --text3: #4a5268 !important; --text2: #2a3040 !important; --border: #999 !important; }
  :root[data-theme="pawforge"] { --text3: #4a3d7a !important; --blue: #5b21b6 !important; }
}
:root[data-theme="high-contrast"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #f0f0f0; --border: #666;
  --text: #000000; --text2: #333333; --text3: #555555;
  --blue: #0000cc; --green: #006600; --red: #cc0000; --amber: #996600;
  --card-bg: #ffffff; --card-border: 2px solid #666; --card-shadow: none;
  --shadow: none; --transition: 0ms;
}
:root[data-theme="high-contrast"] .sidebar { background: #000; }
:root[data-theme="high-contrast"] .input { border: 2px solid #666; color: #000; background: #fff; }
:root[data-theme="high-contrast"] .btn-primary { background: #0000cc; color: #fff; }

/* ── Mobile input fix (prevents iOS zoom on focus) ── */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
  .nav-link { font-size: 16px; min-height: 48px; display: flex; align-items: center; }
}

/* ── Status badges — always show text, not just dots ── */
.status-dot { display: none; }
.status-badge { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.status-badge.status-new { background: #3b82f622; color: #3b82f6; }
.status-badge.status-contacted { background: #f59e0b22; color: #f59e0b; }
.status-badge.status-active { background: #22c55e22; color: #22c55e; }
.status-badge.status-enrolled { background: #22c55e22; color: #22c55e; }
.status-badge.status-prospect { background: #3b82f622; color: #3b82f6; }
.status-badge.status-graduated { background: #a855f722; color: #a855f7; }
.status-badge.status-paused { background: #7e87a022; color: #7e87a0; }

/* ── Global mobile overflow prevention ── */
html, body { overflow-x: hidden; width: 100%; }
.app-layout { overflow-x: hidden; width: 100%; }
.main-content { overflow-x: hidden; width: 100%; min-width: 0; }
.page { overflow-x: hidden; min-width: 0; }

/* ── PawRadar mobile fixes ── */
@media (max-width: 768px) {
  .page { padding: 0 !important; }
  .page-header { padding: 0 12px; }
}

/* ===========================================================================
   PROCESS MANAGER — Flowchart, steps, SLA indicators, modals
   =========================================================================== */

/* ── Modal overlay ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  padding: 16px; animation: fadeIn 0.15s ease;
}
.modal-content {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; width: 100%; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
  animation: slideUp 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: translateY(0) } }

/* ── Tab bar ── */
.tab-bar { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }

/* ── Process flowchart ── */
.process-flowchart { position: relative; padding-left: 20px; }

.process-step-row { position: relative; }

.process-connector {
  position: absolute; left: 17px; top: -8px; width: 2px; height: 8px;
  background: linear-gradient(to bottom, var(--purple), var(--blue));
  opacity: 0.4;
}

.process-step-node {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; margin-bottom: 8px;
  background: var(--surface2); border-radius: var(--radius);
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  position: relative;
}
.process-step-node:hover { background: var(--surface3); border-left-color: var(--purple); }
.process-step-gate { border-left-color: var(--amber) !important; background: rgba(245,158,11,0.05); }
.process-step-current { border-left-color: var(--green) !important; background: rgba(34,197,94,0.08); box-shadow: 0 0 12px rgba(34,197,94,0.1); }

.process-step-icon {
  font-size: 18px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface3); border-radius: 8px; flex-shrink: 0;
}

.process-step-body { flex: 1; min-width: 0; }

.process-step-label {
  font-weight: 600; font-size: 14px; color: var(--text);
  display: block; line-height: 1.3;
}

.process-step-meta {
  display: block; font-size: 12px; color: var(--text3);
  margin-top: 2px; line-height: 1.4;
}

/* ── Gate branches ── */
.process-branches {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px 0 6px 44px; margin-bottom: 8px;
}
.process-branch-label {
  font-size: 11px; color: var(--amber);
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.15);
  padding: 3px 10px; border-radius: 20px;
}

/* ── SLA badges ── */
.sla-badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.sla-ok { background: rgba(34,197,94,0.12); color: var(--green); }
.sla-warning { background: rgba(245,158,11,0.12); color: var(--amber); }
.sla-overdue { background: rgba(239,68,68,0.12); color: var(--red); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.6 } }

/* ── Category badges ── */
.badge {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  font-weight: 600; text-transform: capitalize;
}

/* ── LTW Original — Amy's exact brand from lead-the-way.us ── */
:root[data-theme="ltw-original"] {
  --bg: #f7f7f7; --surface: #ffffff; --surface2: #f0eff4; --surface3: #e8e5ef;
  --border: #d4cfe0; --text: #32373c; --text2: #5a5a5a; --text3: #777777;
  --primary: #54218f; --secondary: #008137; --accent: #d39c22;
  --blue: #3281ff; --green: #008137; --amber: #d39c22; --red: #cf2e2e;
  --purple: #54218f; --pink: #f78da7; --cyan: #50cdeb;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Mulish', system-ui, sans-serif;
  --radius: 6px; --btn-radius: 6px; --card-radius: 10px;
  --card-bg: #ffffff; --card-border: 1px solid #d4cfe0;
  --card-shadow: 0 2px 12px rgba(84,33,143,0.06);
  --shadow: 0 2px 8px rgba(84,33,143,0.05);
}
:root[data-theme="ltw-original"] h1,:root[data-theme="ltw-original"] h2,
:root[data-theme="ltw-original"] h3,:root[data-theme="ltw-original"] .card-title,
:root[data-theme="ltw-original"] .page-header h2 { font-family: var(--font-display); }
:root[data-theme="ltw-original"] .btn-primary { background: #54218f; color: #fff; }
:root[data-theme="ltw-original"] .btn-primary:hover { background: #6b2eb3; }
:root[data-theme="ltw-original"] .sidebar { background: #54218f; color: #e8e5ef; }
:root[data-theme="ltw-original"] .sidebar .nav-link { color: rgba(255,255,255,0.75); }
:root[data-theme="ltw-original"] .sidebar .nav-link:hover,
:root[data-theme="ltw-original"] .sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,0.12); }
:root[data-theme="ltw-original"] .sidebar-brand { color: #fff; }
:root[data-theme="ltw-original"] .top-bar { background: #54218f; color: #fff; }
:root[data-theme="ltw-original"] .stat-card { background: #fff; border: 1px solid #e8e5ef; }
:root[data-theme="ltw-original"] .stat-icon { background: rgba(84,33,143,0.08) !important; color: #54218f !important; }

/* ── Process card hover lift ── */
.process-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.process-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* ===========================================================================
   PROCESS MANAGER — Pro View (Command Center)
   Toggle: ◉ button in header
   =========================================================================== */

.pm-view-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
  background: transparent; color: var(--text3); font-size: 16px; cursor: pointer;
  transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
}
.pm-view-toggle:hover { border-color: var(--purple); color: var(--purple); }
.pm-view-toggle.active {
  border-color: var(--purple); color: var(--purple);
  box-shadow: 0 0 12px rgba(139,92,246,0.3); background: rgba(139,92,246,0.08);
}

/* ── Pro header ── */
.pm-pro .pm-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 0 16px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(139,92,246,0.15);
}
.pm-header { display: flex; justify-content: space-between; align-items: center; }
.pm-header-left { flex: 1; }

.pm-pro .pm-title {
  font-family: 'JetBrains Mono', var(--mono), monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 6px; color: var(--purple);
  margin: 0;
}
.pm-pro .pm-subtitle {
  font-size: 12px; color: var(--text3); margin-top: 6px;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono);
}
.pm-pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  display: inline-block; animation: pulse 2s infinite;
}
.pm-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text3); display: inline-block; }

/* ── Pro tabs ── */
.pm-pro .pm-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
}
.pm-pro .pm-tab {
  background: none; border: none; color: var(--text3); cursor: pointer;
  padding: 10px 20px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
  border-bottom: 2px solid transparent; transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.pm-pro .pm-tab:hover { color: var(--text); }
.pm-pro .pm-tab.active {
  color: var(--purple); border-bottom-color: var(--purple);
}
.pm-tab-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--purple);
  animation: pulse 2s infinite;
}

/* ── Pro new button ── */
.pm-new-btn {
  background: transparent; border: 1px solid var(--purple); color: var(--purple);
  padding: 8px 16px; border-radius: 6px; font-family: var(--mono);
  font-size: 11px; letter-spacing: 1px; cursor: pointer;
  transition: all 0.2s;
}
.pm-new-btn:hover {
  background: var(--purple); color: #fff;
  box-shadow: 0 0 20px rgba(139,92,246,0.3);
}

/* ── Pro playbook cards ── */
.pm-pro .card {
  background: rgba(18,21,30,0.6); backdrop-filter: blur(8px);
  border: 1px solid rgba(139,92,246,0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.pm-pro .card:hover {
  border-color: rgba(139,92,246,0.25);
  box-shadow: 0 0 30px rgba(139,92,246,0.06), 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-3px);
}

/* ── Pro step nodes ── */
.pm-pro .process-step-node {
  background: rgba(18,21,30,0.4); border: 1px solid rgba(255,255,255,0.04);
  border-left: 3px solid transparent; border-radius: 8px;
  backdrop-filter: blur(4px);
}
.pm-pro .process-step-node:hover {
  background: rgba(139,92,246,0.06); border-color: rgba(139,92,246,0.15);
  border-left-color: var(--purple);
}
.pm-pro .process-step-gate {
  border-left-color: var(--amber) !important;
  background: rgba(245,158,11,0.03);
}
.pm-pro .process-step-current {
  border-left-color: var(--green) !important;
  background: rgba(34,197,94,0.04);
  box-shadow: 0 0 20px rgba(34,197,94,0.08);
}

.pm-pro .process-step-icon {
  background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.15);
}

.pm-pro .process-connector {
  background: linear-gradient(to bottom, rgba(139,92,246,0.3), rgba(59,130,246,0.1));
  width: 1px;
}

/* ── Pro stat cards ── */
.pm-pro .stat-card {
  background: rgba(18,21,30,0.6); border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
}
.pm-pro .stat-value {
  font-family: var(--mono); font-size: 32px; font-weight: 300;
  background: linear-gradient(135deg, #a78bfa, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Pro SLA badges ── */
.pm-pro .sla-overdue {
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  animation: pulse 1.5s infinite;
}
.pm-pro .sla-warning {
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
}
.pm-pro .sla-ok {
  background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2);
}

/* ── Pro branch labels ── */
.pm-pro .process-branch-label {
  background: rgba(245,158,11,0.05); border: 1px solid rgba(245,158,11,0.12);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.5px;
}

/* ── Pro badge ── */
.pm-pro .badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Pro modal ── */
.pm-pro .modal-content {
  background: rgba(12,14,20,0.95); backdrop-filter: blur(20px);
  border: 1px solid rgba(139,92,246,0.15);
  box-shadow: 0 32px 64px rgba(0,0,0,0.6), 0 0 40px rgba(139,92,246,0.05);
}

/* ── Pro table ── */
.pm-pro table { font-family: var(--mono); font-size: 12px; }
.pm-pro th { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--purple); }

/* ── Animations ── */
.pm-pro .card { animation: fadeSlideIn 0.3s ease both; }
.pm-pro .card:nth-child(2) { animation-delay: 0.05s; }
.pm-pro .card:nth-child(3) { animation-delay: 0.1s; }
.pm-pro .card:nth-child(4) { animation-delay: 0.15s; }
.pm-pro .card:nth-child(5) { animation-delay: 0.2s; }
.pm-pro .card:nth-child(6) { animation-delay: 0.25s; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── PawRadar Dog Photo Markers ── */
.dog-photo-marker { background: none !important; border: none !important; }
.photo-circle {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--green); background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.15s ease;
}
.photo-circle:hover { transform: scale(1.15); }
.photo-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-fallback { display: none; font-size: 20px; line-height: 1; }

/* ── Widget Dashboard ── */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.widget-card {
  animation: fadeSlideIn 0.3s ease both;
}
.widget-card:nth-child(2) { animation-delay: 0.05s; }
.widget-card:nth-child(3) { animation-delay: 0.1s; }
.widget-card:nth-child(4) { animation-delay: 0.15s; }
.widget-card:nth-child(5) { animation-delay: 0.2s; }
.widget-card:nth-child(6) { animation-delay: 0.25s; }
.widget-card-header h3 { display: flex; align-items: center; gap: 6px; }
.widget-quick-stats .stat-grid { margin-bottom: 0; }

/* Edit mode banner */
.widget-edit-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 10px 16px; margin-bottom: 16px;
  font-size: 13px; color: var(--text2);
}
.widget-edit-banner-text { display: flex; align-items: center; gap: 8px; }

/* Edit list */
.widget-edit-list {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px;
}
.widget-edit-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.widget-edit-item:hover { border-color: var(--surface3); }
.widget-edit-item.widget-hidden { opacity: 0.45; }
.widget-edit-icon { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.widget-edit-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.widget-edit-actions { display: flex; align-items: center; gap: 4px; }

/* Arrow & visibility buttons in edit mode */
.btn-icon {
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text2); font-size: 14px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.btn-icon:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }
.widget-vis-on { color: #3b82f6; }
.widget-vis-off { color: var(--text3); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Widget content styles */
.widget-loading { display: flex; justify-content: center; padding: 24px 0; }
.widget-empty { text-align: center; color: var(--text3); font-size: 13px; padding: 16px 0; }

.widget-list { display: flex; flex-direction: column; gap: 2px; }
.widget-list-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px; border-radius: var(--radius-sm);
  transition: background 0.12s; cursor: pointer; font-size: 13px;
}
.widget-list-row:hover { background: var(--surface2); }
.widget-list-primary { flex: 1; font-weight: 600; color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.widget-list-secondary { color: var(--text2); font-size: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.widget-list-meta { color: var(--text3); font-size: 11px; font-family: var(--mono); white-space: nowrap; }

/* Overdue row highlight */
.widget-row-overdue { background: rgba(239, 68, 68, 0.06); border-left: 2px solid #ef4444; }
.widget-row-overdue:hover { background: rgba(239, 68, 68, 0.1); }

/* Handling badge (active dogs widget) */
.handling-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}

/* Severity indicators (stale alerts / SLA) */
.severity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.severity-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.severity-critical { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.severity-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.severity-info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

/* Enrollment progress bars */
.widget-enrollment-row { flex-wrap: wrap; }
.widget-enrollment-info { display: flex; align-items: center; gap: 8px; width: 100%; }
.widget-progress-bar {
  width: 100%; height: 6px; background: var(--surface2);
  border-radius: 3px; overflow: hidden; margin-top: 4px;
}
.widget-progress-fill { height: 100%; background: #8b5cf6; border-radius: 3px; transition: width 0.3s ease; }

/* Schedule today */
.widget-schedule-time {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  min-width: 58px; flex-shrink: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .widget-grid { grid-template-columns: 1fr; }
  .widget-edit-banner { flex-direction: column; gap: 8px; text-align: center; }
  .widget-edit-item { flex-wrap: wrap; }
  .widget-edit-actions { width: 100%; justify-content: flex-end; }
}

/* ===========================================================================
   THEME ENGINE — Additional Themes
   =========================================================================== */

/* ── Cream Theme (warm light, editorial) ── */
:root[data-theme="cream"] {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface2: #f5f2ed;
  --surface3: #ece8e1;
  --border: #d4cfc6;
  --text: #2d2a24;
  --text2: #6b6560;
  --text3: #8a847c;
  --primary: #c17f3e;
  --secondary: #5a8a6e;
  --accent: #b8860b;
  --blue: #4a7fb5;
  --green: #5a8a6e;
  --amber: #c17f3e;
  --red: #c44d4d;
  --purple: #7c6b9e;
  --font: 'Work Sans', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 8px;
  --btn-radius: 8px;
  --card-radius: 12px;
  --card-bg: #ffffff;
  --card-border: 1px solid #d4cfc6;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
}
:root[data-theme="cream"] .sidebar { background: #2d2a24; }
:root[data-theme="cream"] .top-bar { background: #faf8f5; border-bottom: 1px solid #d4cfc6; color: #2d2a24; }
:root[data-theme="cream"] .input { background: #f5f2ed; border-color: #d4cfc6; color: #2d2a24; }
:root[data-theme="cream"] .btn-primary { background: #c17f3e; color: white; }
:root[data-theme="cream"] .btn-primary:hover { background: #a86a2e; }
:root[data-theme="cream"] .btn-outline { border-color: #d4cfc6; color: #6b6560; }
:root[data-theme="cream"] .dog-card, :root[data-theme="cream"] .lead-card { background: #fff; border: 1px solid #d4cfc6; }
:root[data-theme="cream"] .stat-card { background: #fff; }
:root[data-theme="cream"] .nav-link.active { color: #c17f3e; border-left-color: #c17f3e; }
:root[data-theme="cream"] .data-browser-tab.active { background: #c17f3e; border-color: #c17f3e; }
:root[data-theme="cream"] .page-header h2 { color: #2d2a24; }
:root[data-theme="cream"] .stat-value { color: #2d2a24; }
:root[data-theme="cream"] .brand-text { color: #2d2a24; }

/* ── PawForge Pro Theme (purple/green brand, glass) ── */
:root[data-theme="pro"] {
  --bg: #0a0812;
  --surface: rgba(18,15,30,0.8);
  --surface2: rgba(24,20,40,0.8);
  --surface3: rgba(30,25,50,0.6);
  --border: rgba(139,92,246,0.12);
  --text: #e2dff0;
  --text2: #a09bb8;
  --text3: #706b88;
  --primary: #a78bfa;
  --secondary: #34d399;
  --blue: #a78bfa;
  --green: #34d399;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #a78bfa;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --btn-radius: 10px;
  --card-radius: 16px;
  --card-bg: rgba(18,15,30,0.8);
  --card-border: 1px solid rgba(139,92,246,0.1);
  --card-shadow: 0 4px 24px rgba(139,92,246,0.06);
  --shadow: 0 2px 8px rgba(139,92,246,0.1);
  --shadow-lg: 0 8px 24px rgba(139,92,246,0.15);
  --shadow-glow: 0 0 20px rgba(139,92,246,0.08);
}
:root[data-theme="pro"] .card { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
:root[data-theme="pro"] .stat-card { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
:root[data-theme="pro"] .sidebar {
  background: linear-gradient(180deg, rgba(18,15,30,0.95), rgba(10,8,18,0.98));
  border-right: 1px solid rgba(139,92,246,0.1);
}
:root[data-theme="pro"] .top-bar { background: rgba(18,15,30,0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid rgba(139,92,246,0.1); }
:root[data-theme="pro"] .nav-link { color: #a09bb8; }
:root[data-theme="pro"] .nav-link.active { color: #34d399; background: rgba(139,92,246,0.1); border-left: 3px solid #34d399; }
:root[data-theme="pro"] .nav-link:hover { color: #a78bfa; background: rgba(139,92,246,0.08); }
:root[data-theme="pro"] .btn-primary { background: #a78bfa; color: #0a0812; }
:root[data-theme="pro"] .btn-primary:hover { background: #8b5cf6; }
:root[data-theme="pro"] .btn-outline { border-color: rgba(139,92,246,0.2); color: #a78bfa; }
:root[data-theme="pro"] .input { background: rgba(18,15,30,0.6); border-color: rgba(139,92,246,0.15); color: #e2dff0; }
:root[data-theme="pro"] .input:focus { border-color: #a78bfa; box-shadow: 0 0 0 2px rgba(167,139,250,0.1); }
:root[data-theme="pro"] .data-browser-tab.active { background: #a78bfa; border-color: #a78bfa; color: #0a0812; }
:root[data-theme="pro"] .msg-cloud-sent { background: #a78bfa; color: #0a0812; }
:root[data-theme="pro"] .msg-cloud-received { background: rgba(24,20,40,0.8); color: #e2dff0; }
:root[data-theme="pro"] .report-bar-fill { background: linear-gradient(90deg, #a78bfa, #34d399); }
:root[data-theme="pro"] .page-header h2 { color: #e2dff0; }
:root[data-theme="pro"] .stat-value { color: #e2dff0; }

/* ── Field Theme (high-contrast, outdoor use, large text) ── */
:root[data-theme="field"] {
  font-size: 18px;
  --bg: #000000;
  --surface: #111111;
  --surface2: #1a1a1a;
  --surface3: #222222;
  --border: #444444;
  --text: #ffffff;
  --text2: #cccccc;
  --text3: #999999;
  --primary: #ff6b00;
  --secondary: #00cc66;
  --blue: #ff6b00;
  --green: #00cc66;
  --amber: #ffcc00;
  --red: #ff3333;
  --purple: #cc66ff;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 4px;
  --radius-sm: 2px;
  --btn-radius: 4px;
  --card-radius: 4px;
  --card-bg: #111111;
  --card-border: 1px solid #444444;
  --card-shadow: none;
  --shadow: none;
  --shadow-sm: none;
  --shadow-lg: none;
  --transition: 0ms;
  --transition-slow: 0ms;
}
:root[data-theme="field"] .sidebar { background: #111111; border-right: 2px solid #444; }
:root[data-theme="field"] .top-bar { background: #111111; border-bottom: 2px solid #444; color: #ffffff; }
:root[data-theme="field"] .btn-primary { background: #ff6b00; color: #000; font-weight: 700; }
:root[data-theme="field"] .btn-primary:hover { background: #ff8533; }
:root[data-theme="field"] .btn-outline { border: 2px solid #444; color: #ffffff; }
:root[data-theme="field"] .input { background: #1a1a1a; border: 2px solid #444; color: #ffffff; }
:root[data-theme="field"] .nav-link.active { color: #ff6b00; border-left: 3px solid #ff6b00; }
:root[data-theme="field"] .data-browser-tab.active { background: #ff6b00; border-color: #ff6b00; color: #000; }
:root[data-theme="field"] .page-header h2 { color: #ffffff; }
:root[data-theme="field"] .stat-value { color: #ffffff; }
:root[data-theme="field"] .stat-card { border: 2px solid #444; }

/* ── Terminal Theme (monospace, hacker) ── */
:root[data-theme="terminal"] {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --surface3: #222222;
  --border: #333333;
  --text: #00ff41;
  --text2: #00cc33;
  --text3: #008822;
  --primary: #00ff41;
  --secondary: #00ccff;
  --accent: #ffcc00;
  --blue: #00ccff;
  --green: #00ff41;
  --amber: #ffcc00;
  --red: #ff3333;
  --purple: #cc66ff;
  --font: 'JetBrains Mono', monospace;
  --font-display: 'JetBrains Mono', monospace;
  --font-body: 'JetBrains Mono', monospace;
  --font-mono: 'JetBrains Mono', monospace;
  --mono: 'JetBrains Mono', monospace;
  --radius: 0px;
  --radius-sm: 0px;
  --btn-radius: 0px;
  --card-radius: 0px;
  --card-bg: #111111;
  --card-border: 1px solid #333;
  --card-shadow: none;
  --shadow: none;
  --shadow-sm: none;
  --shadow-lg: none;
  --transition: 0ms;
  --transition-slow: 0ms;
}
:root[data-theme="terminal"] .sidebar { background: #0a0a0a; border-right: 1px solid #333; }
:root[data-theme="terminal"] .top-bar { background: #0a0a0a; border-bottom: 1px solid #333; color: #00ff41; }
:root[data-theme="terminal"] .btn-primary { background: #00ff41; color: #0a0a0a; font-weight: 700; }
:root[data-theme="terminal"] .btn-primary:hover { background: #33ff66; }
:root[data-theme="terminal"] .btn-outline { border: 1px solid #333; color: #00ff41; }
:root[data-theme="terminal"] .btn-outline:hover { border-color: #00ff41; background: rgba(0,255,65,0.05); }
:root[data-theme="terminal"] .input { background: #0a0a0a; border: 1px solid #333; color: #00ff41; }
:root[data-theme="terminal"] .input:focus { border-color: #00ff41; }
:root[data-theme="terminal"] .input::placeholder { color: #008822; }
:root[data-theme="terminal"] .nav-link { color: #00cc33; }
:root[data-theme="terminal"] .nav-link.active { color: #00ff41; border-left: 3px solid #00ff41; background: rgba(0,255,65,0.05); }
:root[data-theme="terminal"] .data-browser-tab.active { background: #00ff41; border-color: #00ff41; color: #0a0a0a; }
:root[data-theme="terminal"] .page-header h2 { color: #00ff41; }
:root[data-theme="terminal"] .stat-value { color: #00ff41; }
:root[data-theme="terminal"] .brand-text { color: #00ff41; }
:root[data-theme="terminal"] .msg-cloud-sent { background: #00ff41; color: #0a0a0a; }
:root[data-theme="terminal"] .msg-cloud-received { background: #1a1a1a; color: #00ff41; }
:root[data-theme="terminal"] .report-bar-fill { background: #00ff41; }

/* ── Soft Theme (pastel, friendly) ── */
:root[data-theme="soft"] {
  --bg: #f8f0ff;
  --surface: #ffffff;
  --surface2: #f3eafc;
  --surface3: #ede2f7;
  --border: #ddd0ee;
  --text: #3d2e5c;
  --text2: #6b5a8a;
  --text3: #8a7ba3;
  --primary: #9b72cf;
  --secondary: #6bc4a6;
  --accent: #f0a050;
  --blue: #6b9fd4;
  --green: #6bc4a6;
  --amber: #f0a050;
  --red: #e06060;
  --purple: #9b72cf;
  --font: 'Nunito', system-ui, sans-serif;
  --font-display: 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --btn-radius: 999px;
  --card-radius: 20px;
  --card-bg: #ffffff;
  --card-border: 1px solid #ddd0ee;
  --card-shadow: 0 4px 16px rgba(155,114,207,0.08);
  --shadow: 0 2px 8px rgba(155,114,207,0.06);
  --shadow-lg: 0 8px 24px rgba(155,114,207,0.12);
  --transition: 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-slow: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
:root[data-theme="soft"] .btn { border-radius: 999px; }
:root[data-theme="soft"] .sidebar { background: #3d2e5c; }
:root[data-theme="soft"] .top-bar { background: #ffffff; border-bottom: 1px solid #ddd0ee; color: #3d2e5c; }
:root[data-theme="soft"] .btn-primary { background: #9b72cf; color: white; border-radius: 999px; }
:root[data-theme="soft"] .btn-primary:hover { background: #8a5fc0; }
:root[data-theme="soft"] .btn-outline { border-color: #ddd0ee; color: #6b5a8a; border-radius: 999px; }
:root[data-theme="soft"] .input { background: #f3eafc; border-color: #ddd0ee; color: #3d2e5c; border-radius: 12px; }
:root[data-theme="soft"] .input:focus { border-color: #9b72cf; }
:root[data-theme="soft"] .nav-link.active { color: #9b72cf; border-left-color: #9b72cf; background: rgba(155,114,207,0.08); }
:root[data-theme="soft"] .data-browser-tab.active { background: #9b72cf; border-color: #9b72cf; }
:root[data-theme="soft"] .dog-card, :root[data-theme="soft"] .lead-card { background: #fff; border: 1px solid #ddd0ee; border-radius: 16px; }
:root[data-theme="soft"] .page-header h2 { color: #3d2e5c; }
:root[data-theme="soft"] .stat-value { color: #3d2e5c; }
:root[data-theme="soft"] .brand-text { color: #3d2e5c; }
:root[data-theme="soft"] .msg-cloud-sent { background: #9b72cf; color: white; border-radius: 20px; }
:root[data-theme="soft"] .msg-cloud-received { background: #f3eafc; color: #3d2e5c; border-radius: 20px; }
:root[data-theme="soft"] .report-bar-fill { background: linear-gradient(90deg, #9b72cf, #6bc4a6); }
:root[data-theme="soft"] .status-badge { border-radius: 999px; }
