/* Meetings Portal — neutral-first modern theme, mobile + desktop.
   Redesigned from the original purple/orange pass after feedback that the
   color was overwhelming and the segmented control read as visually
   inconsistent. Now: a near-monochrome neutral base (grays/black/white)
   with ONE accent color (indigo) used sparingly — primary actions, the
   active sidebar item, focus rings, brand mark — and nothing else.
   Status semantics (green/amber/red) are unchanged. Filter/tab controls are
   plain underline tabs instead of pill segments, applied identically
   everywhere so there's exactly one tab pattern in the whole app. */

:root {
  --accent-900: #312E81;
  --accent-700: #4338CA;
  --accent-500: #6366F1;
  --accent-100: #E0E7FF;

  --amber-500:  #F59E0B;
  --amber-100:  #FEF3C7;
  --amber-900:  #92400E;
  --green-500:  #22C55E;
  --green-100:  #DCFCE7;
  --green-900:  #14532D;
  --red-500:    #EF4444;
  --red-100:    #FEE2E2;
  --red-900:    #7F1D1D;

  --ink-950:    #0A0A0F;
  --ink-900:    #18181B;
  --ink-700:    #3F3F46;
  --ink-500:    #71717A;
  --ink-300:    #D4D4D8;
  --ink-200:    #E4E4E7;
  --ink-100:    #F4F4F5;

  --page-bg:    #FAFAFA;
  --sheet-bg:   #FFFFFF;
  --border:     #E7E7EA;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 28px;

  --spring: cubic-bezier(0.34, 1.28, 0.64, 1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --shadow-1: 0 1px 2px rgba(10, 10, 15, 0.04);
  --shadow-2: 0 8px 24px rgba(10, 10, 15, 0.10);

  --sidebar-w: 224px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--page-bg);
  font-family: 'Inter', -apple-system, 'SF Pro Text', 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app { min-height: 100%; padding-bottom: 80px; display: flex; flex-direction: column; }

/* ================================================================== */
/* MOBILE (default)                                                     */
/* ================================================================== */

/* ---- Top bar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--sp-4) var(--sp-3);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-900); }
.navbar-sub { font-size: 11.5px; color: var(--ink-500); margin-top: 1px; }
.navbar-brand { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.navbar-right { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.navbar-logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink-900);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
  flex: none;
}
.navbar-action {
  background: transparent; border: 0; color: var(--accent-700);
  font-weight: 600; font-size: 13px; cursor: pointer; padding: 6px 8px;
  border-radius: var(--radius-sm);
}
.navbar-action:hover { background: var(--ink-100); }
.brand-bar { display: none; }

/* ---- RM / Admin view-switch (Sri only — one account, two views) ---- */
.view-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 1px;
  background: var(--ink-100);
}
.view-switch-item {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 11px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
  color: var(--ink-500);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.view-switch-item.active { background: white; color: var(--ink-900); box-shadow: var(--shadow-1); }

/* ---- Bottom tab bar ---- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  padding: var(--sp-2) 6px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.tabbar-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: transparent; border: 0; cursor: pointer;
  padding: 4px 2px;
  color: var(--ink-500);
  font-size: 10px; font-weight: 600;
  transition: color 0.15s var(--ease);
  text-decoration: none;
}
.tabbar-item .icon { font-size: 18px; line-height: 1; opacity: 0.7; }
.tabbar-item.active { color: var(--ink-900); }
.tabbar-item.active .icon { opacity: 1; }

/* ---- Main content ---- */
.main {
  flex: 1;
  padding: var(--sp-4) var(--sp-4) var(--sp-6);
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.page { animation: fade-in 180ms var(--ease); }
.page.hidden { display: none; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h1.page-title {
  font-size: 20px; font-weight: 700; letter-spacing: -0.015em;
  color: var(--ink-900); margin: 4px 0 var(--sp-4);
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
}
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-500);
  margin: var(--sp-5) 2px var(--sp-2);
}

/* ---- Demo-only annotation (Stage A instrumentation, stripped in Stage B) ---- */
/* grep -r "demo-tag" before Stage B deploy must return zero matches. */
.demo-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--amber-900);
  background: var(--amber-100);
  border: 1px dashed var(--amber-500);
  border-radius: 999px;
  padding: 3px 9px;
  vertical-align: middle;
}
.demo-panel {
  border: 1px dashed var(--ink-300);
  background: var(--ink-100);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}

/* ---- Underline tabs (status filter, Details/History) — ONE tab pattern
   used everywhere instead of the old pill-segmented control. ---- */
.tabs {
  display: flex;
  gap: var(--sp-5);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-item {
  position: relative;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-500);
  white-space: nowrap;
  transition: color 0.15s var(--ease);
}
.tab-item:hover { color: var(--ink-900); }
.tab-item.active { color: var(--ink-900); }
.tab-item.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink-900);
  border-radius: 2px;
}

/* ---- Grouped list ---- */
.grouped-list {
  background: var(--sheet-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.grouped-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px var(--sp-4);
  border-bottom: 1px solid var(--ink-100);
  cursor: pointer;
  transition: background 0.15s var(--ease);
  position: relative;
}
.grouped-row:last-child { border-bottom: none; }
.grouped-row:hover { background: var(--ink-100); }
.grouped-row:active { background: var(--ink-100); }
.grouped-row .chevron { color: var(--ink-300); font-size: 14px; margin-left: auto; }

.meeting-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--ink-100);
  border: 1px solid var(--border);
  color: var(--ink-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.meeting-info { flex: 1; min-width: 0; }
.meeting-name { font-weight: 600; font-size: 13.5px; color: var(--ink-900); display: flex; align-items: center; gap: 6px; }
.meeting-meta { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; display: flex; gap: 6px; align-items: center; }

/* status pill */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; white-space: nowrap;
}
.status-pill.unconfirmed { background: var(--amber-100); color: var(--amber-900); }
.status-pill.confirmed   { background: var(--green-100); color: var(--green-900); }
.status-pill.happened    { background: var(--accent-100); color: var(--accent-900); }
.status-pill.not_happened{ background: var(--red-100); color: var(--red-900); }

/* unread badge dot */
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 0 0 2px white;
  flex: none;
}

/* ---- Cards ---- */
.card {
  background: var(--sheet-bg);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  margin-bottom: var(--sp-3);
}
.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  padding: 9px 0;
  border-bottom: 1px solid var(--ink-100);
  font-size: 13px;
}
.field-row:last-child { border-bottom: none; }
.field-label { color: var(--ink-500); font-weight: 500; }
.field-value { color: var(--ink-900); font-weight: 600; text-align: right; }
.field-value.locked { color: var(--ink-300); font-style: italic; font-weight: 500; }
.field-value.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---- Buttons ---- */
.btn {
  font: inherit;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform 0.1s var(--spring), box-shadow 0.15s var(--ease), background 0.15s var(--ease), opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--ink-900);
  color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-700); }
.btn-accent {
  background: var(--accent-700);
  color: white;
}
.btn-accent:hover:not(:disabled) { background: var(--accent-500); }
.btn-secondary {
  background: white;
  color: var(--ink-900);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--ink-100); }
.btn-danger { background: var(--red-100); color: var(--red-900); }
.btn-danger:hover { background: #FCD5D5; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: var(--sp-2); margin-top: 4px; }
.btn-row .btn { flex: 1; }

/* ---- Inputs ---- */
.input, .select, .textarea {
  font: inherit;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  background: white;
  font-size: 13.5px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent-500);
  box-shadow: 0 0 0 3px var(--accent-100);
}
label.form-label { display: block; font-size: 11px; font-weight: 700; color: var(--ink-700); margin: 11px 0 5px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Role card (login) ---- */
.role-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 14px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  margin-bottom: var(--sp-2);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.1s var(--spring);
}
.role-card:hover { border-color: var(--ink-900); box-shadow: var(--shadow-1); }
.role-card:active { transform: scale(0.99); }
.role-card.selected { border-color: var(--accent-500); background: var(--accent-100); }
.role-avatar {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--ink-900);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: white; flex: none;
}
.role-name { font-weight: 700; font-size: 14px; color: var(--ink-900); }
.role-desc { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }

/* ---- Toasts ---- */
.toast-host {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: var(--sp-2);
  z-index: 999;
  width: 92%;
  max-width: 380px;
}
.toast {
  background: white;
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ink-900);
  animation: toast-in 260ms var(--spring);
  display: flex; align-items: flex-start; gap: var(--sp-2);
}
.toast.success { border-left-color: var(--green-500); }
.toast.error   { border-left-color: var(--red-500); }
.toast.info    { border-left-color: var(--accent-500); }
.toast .t-icon { font-size: 16px; }
.toast .t-title { font-weight: 700; margin-bottom: 1px; }
.toast .t-body { color: var(--ink-500); font-size: 11.5px; }
@keyframes toast-in { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- History timeline ---- */
.history-item { display: flex; gap: var(--sp-3); padding: 11px 0; border-bottom: 1px solid var(--ink-100); }
.history-item:last-child { border-bottom: none; }
.history-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-500); margin-top: 5px; flex: none;
}
.history-body { flex: 1; }
.history-line { font-size: 12.5px; color: var(--ink-900); }
.history-line b { font-weight: 700; }
.history-meta { font-size: 10.5px; color: var(--ink-500); margin-top: 2px; }
.history-diff { font-size: 11.5px; margin-top: 3px; color: var(--ink-700); }
.history-diff .old { text-decoration: line-through; color: var(--red-500); }
.history-diff .new { color: var(--green-900); font-weight: 600; }

/* ---- Toggle switch ---- */
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; }
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; z-index: 1; }
.switch-track {
  position: absolute; inset: 0; background: var(--ink-300); border-radius: 999px;
  transition: background 0.2s var(--ease);
}
.switch input:checked ~ .switch-track { background: var(--ink-900); }
.switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  background: white; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s var(--spring);
}
.switch input:checked ~ .switch-thumb { transform: translateX(16px); }

/* ---- Modal / sheet ---- */
.modal-host {
  position: fixed; inset: 0; background: rgba(10, 10, 15, 0.4);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 500; animation: fade-in 150ms var(--ease);
}
.modal-host.centered { align-items: center; padding: var(--sp-5); }
.sheet {
  background: white; width: 100%; max-width: 460px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 10px var(--sp-5) calc(env(safe-area-inset-bottom, 0px) + 20px);
  animation: sheet-up 280ms var(--spring);
  max-height: 86vh; overflow-y: auto;
  box-shadow: var(--shadow-2);
}
.modal-host.centered .sheet { border-radius: var(--radius-lg); animation: pop-in 200ms var(--spring); }
.sheet-handle { width: 34px; height: 4px; background: var(--ink-300); border-radius: 999px; margin: 6px auto 13px; }
.sheet-title { font-size: 16px; font-weight: 700; color: var(--ink-900); margin: 0 0 3px; }
.sheet-sub { font-size: 12px; color: var(--ink-500); margin-bottom: var(--sp-4); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pop-in { from { transform: scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Chat ---- */
.chat-page { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-scroll {
  flex: 1;
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: 2px 0 var(--sp-3);
}
.chat-bubble { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.chat-bubble.user { align-self: flex-end; background: var(--ink-900); color: white; border-bottom-right-radius: 4px; }
.chat-bubble.bot { align-self: flex-start; background: white; color: var(--ink-900); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-bubble.bot .redacted { color: var(--ink-300); font-style: italic; }
.chat-input-bar {
  position: sticky;
  bottom: 0; left: 0; right: 0;
  display: flex; gap: var(--sp-2);
  padding: var(--sp-3) 0 calc(env(safe-area-inset-bottom, 0px) + var(--sp-2));
  background: linear-gradient(to top, var(--page-bg) 60%, transparent);
  margin-top: auto;
}
.chat-input-bar .input { border-radius: 999px; background: white; }
.chat-send {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--ink-900); color: white; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.chat-send:hover { background: var(--accent-700); }

/* ---- Install banner ---- */
.install-banner {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--ink-900);
  color: white; border-radius: var(--radius-md);
  padding: 13px 15px; margin-bottom: var(--sp-3);
}
.install-banner .ib-text { flex: 1; font-size: 12.5px; }
.install-banner .ib-title { font-weight: 700; margin-bottom: 2px; }
.install-banner button { flex: none; }

.empty-state { text-align: center; padding: 36px var(--sp-5); color: var(--ink-500); }
.empty-state .es-icon { font-size: 36px; margin-bottom: var(--sp-2); }

/* Dashboard search + urgency grouping (mobile) / table (desktop) — see the
   desktop media query below for .desktop-only. Mobile default: table hidden,
   cards + groups shown. */
.desktop-only { display: none; }
.mobile-only { display: block; }

.dash-search-bar { margin-bottom: var(--sp-3); }
.dash-search-bar .input { border-radius: var(--radius-sm); }
.urgency-group { margin-bottom: var(--sp-4); }
.urgency-group-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-500); margin: 0 2px 8px; display: flex; align-items: center; gap: 6px;
}
.urgency-group-label .count { font-weight: 500; text-transform: none; letter-spacing: 0; }
.urgency-group-label.urgent { color: var(--red-900); }

.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }

/* ================================================================== */
/* DESKTOP (>= 900px) — sidebar shell, multi-column layouts             */
/* ================================================================== */
@media (min-width: 900px) {
  #app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    padding-bottom: 0;
  }

  .navbar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    padding: 18px 32px;
  }

  #tabbar-slot { grid-row: 1 / 3; grid-column: 1; }
  .tabbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    width: var(--sidebar-w);
    height: 100vh;
    padding: 22px 14px;
    gap: 1px;
    border-top: none;
    border-right: 1px solid var(--border);
    background: var(--sheet-bg);
  }
  .tabbar-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    position: relative;
  }
  .tabbar-item .icon { font-size: 15px; }
  .tabbar-item:hover { background: var(--ink-100); }
  .tabbar-item.active { background: var(--ink-100); color: var(--ink-900); font-weight: 700; }
  .tabbar-item.active::before {
    content: '';
    position: absolute; left: -14px; top: 6px; bottom: 6px; width: 3px;
    background: var(--accent-700); border-radius: 0 3px 3px 0;
  }

  .main {
    grid-column: 2;
    grid-row: 2;
    max-width: 1080px;
    width: 100%;
    padding: 28px 32px 48px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
  }

  h1.page-title { font-size: 22px; }

  /* Dashboard at scale (60-100 meetings): desktop gets a real sortable/
     searchable table instead of a card grid — cards don't hold up at that
     volume. Mobile keeps cards (see .mobile-only/.desktop-only below). */
  .mobile-only { display: none !important; }
  .desktop-only { display: block; }

  .dash-table-wrap {
    background: var(--sheet-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
  table.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  table.dash-table thead th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--ink-500);
    border-bottom: 1px solid var(--border);
    background: var(--ink-100);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
  }
  table.dash-table thead th:hover { color: var(--ink-900); }
  table.dash-table thead th .sort-arrow { margin-left: 4px; opacity: 0.5; font-size: 10px; }
  table.dash-table thead th.sorted .sort-arrow { opacity: 1; }
  table.dash-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--ink-100);
    vertical-align: middle;
  }
  table.dash-table tbody tr { cursor: pointer; transition: background 0.1s var(--ease); }
  table.dash-table tbody tr:hover { background: var(--ink-100); }
  table.dash-table tbody tr:last-child td { border-bottom: none; }
  table.dash-table .col-name { font-weight: 600; color: var(--ink-900); display: flex; align-items: center; gap: 6px; }
  table.dash-table .col-meta { color: var(--ink-500); font-size: 12px; }

  .dash-toolbar { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
  .dash-toolbar .input { max-width: 320px; }
  .dash-count { font-size: 12px; color: var(--ink-500); white-space: nowrap; }

  /* Lead detail: split into a left fields column + right actions/history rail. */
  .detail-split {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--sp-5);
    align-items: start;
  }
  .detail-split .detail-main { min-width: 0; }
  .detail-split .detail-rail { position: sticky; top: 88px; }

  /* Modals present as centered dialogs on desktop, not bottom sheets. */
  .modal-host { align-items: center; padding: var(--sp-5); }
  .sheet {
    border-radius: var(--radius-lg);
    animation: pop-in 200ms var(--spring);
    max-width: 480px;
  }
  .sheet-handle { display: none; }

  .chat-scroll { max-width: 720px; width: 100%; margin: 0 auto; }
  .chat-input-bar { max-width: 720px; width: 100%; margin: 0 auto; padding-bottom: var(--sp-4); }
}
