/* DayCommand styles — modern refresh.
 * Mobile-first, Business-Calendar-2-dense agenda.
 * Desktop (>=1024px): calendar + side panel multi-pane layout.
 * Design language: quiet neutrals, indigo accent, soft layered shadows,
 * 12px radii, tabular numerals for times. Dark mode via variables.
 */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #eceef3;
  --surface-3: #e2e5ec;
  --text: #171a21;
  --text-dim: #616a7a;
  --text-faint: #9aa2b1;
  --border: #e2e5eb;
  --border-strong: #d3d8e0;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-ink: #ffffff;
  --primary-soft: rgba(79, 70, 229, .10);
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --danger: #dc2626;
  --ok: #15803d;

  --q1: #dc2626;   /* Do first */
  --q2: #4f46e5;   /* Schedule */
  --q3: #d97706;   /* Delegate */
  --q4: #6b7280;   /* Eliminate */

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 4px 12px rgba(16, 24, 40, .08), 0 16px 40px rgba(16, 24, 40, .12);
  --shadow-pop: 0 2px 6px rgba(16, 24, 40, .08), 0 12px 28px rgba(16, 24, 40, .14);

  --toast-bg: #171a21;
  --toast-ink: #ffffff;

  --topbar-h: 108px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d15;
    --surface: #141824;
    --surface-2: #1c2233;
    --surface-3: #262d45;
    --text: #e9ebf4;
    --text-dim: #9aa3bb;
    --text-faint: #6b7490;
    --border: #242b42;
    --border-strong: #323a56;

    --primary: #818cf8;
    --primary-hover: #a5b0ff;
    --primary-ink: #0b0d15;
    --primary-soft: rgba(129, 140, 248, .16);
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --danger: #f87171;
    --ok: #4ade80;

    --q1: #f87171;
    --q2: #818cf8;
    --q3: #fbbf24;
    --q4: #9aa3bb;

    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .5);
    --shadow-pop: 0 2px 8px rgba(0, 0, 0, .5), 0 16px 36px rgba(0, 0, 0, .55);

    --toast-bg: #e9ebf4;
    --toast-ink: #141824;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* Never allow horizontal page scroll (clip preserves position:sticky, unlike hidden) */
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
::selection { background: var(--primary-soft); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ Top bar ============ */
#topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.topbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  box-shadow: 0 0 0 1.5px rgba(240,180,41,.45), 0 2px 6px rgba(0, 0, 0, .45);
  display: inline-block;
  flex: none;
  overflow: hidden;
}
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; display: block; }

/* Traveler time-zone chip — shows when the device zone differs from home */
.tz-chip {
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer;
  white-space: nowrap; flex: none;
}
.tz-chip .tz-home { font-weight: 600; color: var(--text-dim); }

/* Accent color swatches (Settings → Appearance, Pro) */
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid transparent;
  padding: 0; cursor: pointer;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.swatch span { position: absolute; inset: 0; border-radius: 50%; }
.swatch i {
  position: absolute; left: 50%; top: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.swatch.active { border-color: var(--primary); }
.topbar-spacer { flex: 1; }

/* ============ App shell + sidebar ============ */
#appShell { display: flex; min-height: 100dvh; --sbw: 248px; }
#sidebar {
  width: var(--sbw); flex: none;
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 60;
}
#contentCol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.sb-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.sb-tz { padding: 2px 16px 6px; min-height: 0; }
.sb-tz .tz-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sb-focus { padding: 2px 12px 6px; }
.sb-focus .focus-sel { width: 100%; max-width: none; }
#sideNav { flex: 1; overflow-y: auto; padding: 2px 8px 12px; }
.sb-group {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-dim); padding: 14px 12px 4px;
}
/* Collapsible sidebar sections (Home / Business dropdowns) */
.sb-section {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: transparent; padding: 12px 12px 4px; border-radius: 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-dim); cursor: pointer; text-align: left; white-space: nowrap;
}
.sb-section:hover { color: var(--text); background: var(--surface-2); }
.sb-sec-caret { width: 14px; text-align: center; flex: none; font-size: 10px; }
.sb-sec-ico { font-size: 15px; width: 22px; text-align: center; flex: none; }
.sb-section .sb-label { flex: 1; }
.sb-sec-body { padding-bottom: 2px; }
.sb-sec-body .sb-item { padding-left: 16px; }
.sb-empty { font-size: 12.5px; color: var(--text-dim); padding: 6px 16px; }
.sb-ico .ws-dot { display: inline-block; vertical-align: middle; }
.sb-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 0; background: transparent; padding: 9px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; text-align: left; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.sb-item:hover { background: var(--surface-2); color: var(--text); }
.sb-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.sb-ico { font-size: 18px; width: 24px; text-align: center; flex: none; }
.sb-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.soon-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--surface-3); color: var(--text-dim);
  padding: 2px 7px; border-radius: 999px; flex: none;
}
.sb-item.active .soon-tag { background: transparent; }
.sb-foot { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.sb-collapse {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim);
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-size: 16px; line-height: 1;
}
.sb-collapse:hover { color: var(--text); }
/* Collapsed icon rail */
#appShell.sb-rail { --sbw: 68px; }
#appShell.sb-rail .sb-name,
#appShell.sb-rail .sb-group,
#appShell.sb-rail .sb-item .sb-label,
#appShell.sb-rail .sb-section .sb-label,
#appShell.sb-rail .sb-section .sb-sec-caret,
#appShell.sb-rail .sb-sec-body,
#appShell.sb-rail .soon-tag,
#appShell.sb-rail .sb-tz,
#appShell.sb-rail .mini-cal,
#appShell.sb-rail .sb-focus { display: none; }
#appShell.sb-rail .sb-brand { justify-content: center; padding: 14px 0 6px; }
#appShell.sb-rail .sb-item { justify-content: center; padding: 10px 0; }
#appShell.sb-rail .sb-section { justify-content: center; padding: 12px 0 6px; }
#appShell.sb-rail .sb-foot { justify-content: center; }
#appShell.sb-rail .sb-collapse { transform: scaleX(-1); }
/* Drawer scrim (phone) */
#sbScrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 59; }
/* PWA update banner: one-tap refresh when a new version is ready. */
.update-banner { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; white-space: nowrap; }
#sbScrim[hidden] { display: none; }
#menuBtn { display: none; }
@media (max-width: 1023px) {
  #sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-105%); transition: transform .2s ease;
    box-shadow: 12px 0 32px rgba(0,0,0,.2);
  }
  #appShell.sb-open #sidebar { transform: none; }
  #appShell.sb-open #sbScrim { display: block; }
  #appShell.sb-open { --sbw: 248px; }
  .sb-foot { display: none; }
  /* No hamburger on phones — edge swipes open both drawers instead. */
  #menuBtn { display: none !important; }
  /* Right slide-over (phone): the task hub, same five tabs as desktop. */
  #appShell #sidepanel {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(360px, 94vw); z-index: 90;
    transform: translateX(105%); transition: transform .22s ease;
    background: var(--surface); border-left: 1px solid var(--border);
    box-shadow: -12px 0 32px rgba(0,0,0,.25);
    overflow: hidden;
  }
  #appShell.sp-open #sidepanel { transform: none; }
  #spScrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 89; }
  #spScrim[hidden] { display: none; }
  #appShell.sp-open #spScrim { display: block; }
  /* Full-page toggle is desktop-only; on phones » closes the drawer. */
  #spFullBtn { display: none; }
}
@media (max-width: 720px) {
  .btn-txt { display: none; }
  #addBtn { padding: 7px 10px; }
  .nav-label { display: none; }
  .seg button { padding: 5px 9px; }
}
@media (max-width: 560px) {
  .seg { display: none; }
  #briefBtn { display: none; }
}

.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 7px 13px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -.005em;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--primary); border-color: var(--primary); color: var(--primary-ink);
  box-shadow: 0 1px 2px rgba(79, 70, 229, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-accent {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(2, 132, 199, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.icon-btn {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-dim);
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { background: var(--surface-3); }

/* ============ Compact date nav (in the slim top bar) ============ */
.dnav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dnav.hidden { display: none; }
.dnav-arrows {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 2px;
}
.dnav-arrows .icon-btn { padding: 4px 10px; font-size: 20px; }
.dnav .icon-btn { padding: 6px 9px; font-size: 22px; }
#todayBtn { flex: none; }
.seg {
  display: flex; background: var(--surface-2); border-radius: 999px; padding: 2px; margin-left: 6px;
}
.seg button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--text-dim); cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.active {
  background: var(--surface); color: var(--text); font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,.14);
}
.nav-label { margin-left: 10px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }

/* ============ Bottom calendar toggle bar ============ */
#calbar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50;  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(16, 24, 40, .18);
  padding: 8px 10px;
}
@media (min-width: 1024px) {
  #calbar { left: calc(var(--sbw, 248px) + 12px); }
}
.calbar-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.calbar-chips::-webkit-scrollbar { display: none; }
.cal-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 210px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, opacity .15s ease, transform .08s ease, background .15s ease;
}
.cal-chip:hover { border-color: var(--border-strong); }
.cal-chip:active { transform: scale(.96); }
.cal-chip:disabled { cursor: wait; }
.cal-chip .cal-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.cal-chip .cal-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip.off { opacity: .38; box-shadow: none; }
.cal-chip.off .cal-chip-name { text-decoration: line-through; }
.calbar-empty { font-size: 13px; color: var(--text-dim); padding: 8px 12px; text-align: center; }
/* Keep page content clear of the floating bottom bar */
body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) {
  #calbar { left: 50%; right: auto; transform: translateX(-50%); max-width: 720px; width: calc(100% - 24px); }
}

/* Phones: BC2-style calendar tab strip — flush full-width bar at the bottom,
 * each calendar a tab with its color as the underline. Tap toggles it.
 * Month view goes edge-to-edge behind it, filling the whole screen. */
@media (max-width: 1023px) {
  body { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  #calbar {
    left: 0; right: 0; bottom: 0;
    border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
    box-shadow: none;
    padding: 0 0 env(safe-area-inset-bottom);
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transform: none;
    max-width: none;
    width: auto;
  }
  .calbar-chips { gap: 0; padding: 0; }
  .cal-chip {
    flex: 0 0 auto;
    min-width: 78px;
    max-width: 180px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 12px 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .cal-chip:hover { border-color: transparent; }
  .cal-chip .cal-dot { display: none; }
  .cal-chip .cal-chip-name {
    text-align: center;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cal-chip::after {
    content: "";
    display: block;
    height: 3px;
    border-radius: 2px;
    margin-top: 6px;
    background: var(--cal-color, var(--primary));
  }
  .cal-chip.off { opacity: .35; box-shadow: none; }
  .cal-chip.off .cal-chip-name { text-decoration: none; }
  .cal-chip.off::after { background: var(--border-strong); }
  .calbar-empty { padding: 12px; }

  /* Month view fills the phone screen edge-to-edge: no card chrome, rows stretch. */
  #view:has(.month-grid) {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    animation: none;
  }
  .month-grid {
    min-height: calc(100dvh - 170px);
    grid-template-rows: auto repeat(6, 1fr);
  }
  .m-cell { min-height: 0; }
}

/* ============ Main layout ============ */
#main {
  display: block;
  max-width: 100%;
  /* Fill the #contentCol flex column on mobile. Without an explicit width,
   * a column-flex item's flex base size is its max-content, so the auto
   * margins shrink-wrap and center the view (the old "narrow strip with a
   * blank area on the left" mobile bug). */
  width: 100%;
  margin: 0 auto;
  padding-bottom: 48px;
}
#view { min-height: 60vh; animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }
#sidepanel { display: none; }
#spExpand { display: none; }

@media (min-width: 1024px) {
  /* Fixed app shell on desktop: the top bar stays put, the center card and
   * the right panel each scroll internally and always fill the height. */
  #appShell { height: 100dvh; }
  #contentCol { min-height: 0; }
  #main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 0;
    margin: 0; /* override base auto margins: auto margins on a flex item cancel stretch and shrink-wrap the grid */
    padding: 0 0 0 16px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
    min-width: 0;
  }
  #view {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow-x: hidden;
    overflow-y: auto;
    margin: 16px 16px 16px 0;
    min-height: 0;
    min-width: 0;
  }
  /* Right panel: full height, flush against the right edge */
  #sidepanel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border-left: 1px solid var(--border);
  }
  .sp-scroll { flex: 1; min-height: 0; overflow-y: auto; }
  .sp-foot {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    /* Arrows sit on the side they point toward: « expands left, » collapses right. */
    justify-content: space-between;
    flex: none;
  }
  /* Full-page mode shows only the lone » (back to panel) — keep it right. */
  #main.sp-full .sp-foot { justify-content: flex-end; }
  /* Collapsible right panel (desktop): » hides, « tab reopens */
  #main.sp-hidden { grid-template-columns: minmax(0, 1fr); }
  #main.sp-hidden #sidepanel { display: none; }
  #main.sp-hidden #view { margin-right: 0; }
  #main.sp-hidden #spExpand {
    display: flex;
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60;
    width: 26px;
    height: 64px;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
  }
  #main.sp-hidden #spExpand:hover { color: var(--text); border-color: var(--primary); }
  /* Full-page panel: the current tab takes over the whole screen (Esc closes) */
  #main.sp-full #sidepanel {
    position: fixed;
    inset: 0;
    z-index: 200;
    border-left: 0;
    background: var(--surface);
    animation: spSlideIn .22s ease-out;
  }
  /* In full-page mode the only way out is back to the panel — one » button. */
  #main.sp-full #spCollapse { display: none; }
  @keyframes spSlideIn {
    from { transform: translateX(48px); opacity: .35; }
    to { transform: none; opacity: 1; }
  }
  #main.sp-full .sp-scroll { max-width: 920px; width: 100%; margin: 0 auto; }
  #main.sp-full .sp-tabs { border-radius: 0; }
  #sidepanel .sp-tabs { border-radius: 0; }
}
body.no-scroll { overflow: hidden; }

/* Panel full-page toggle — lives in the bottom bar next to the collapse control */
.sp-expand-btn {
  flex: none;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: 8px;
  color: var(--text-dim); font-size: 15px; line-height: 1;
  cursor: pointer;
}
.sp-expand-btn:hover { color: var(--text); border-color: var(--border); background: var(--surface-2); }

/* Task list "Sort" control at the top of the panel Tasks tab */
.sp-sortrow {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 0;
  font-size: 12px; color: var(--text-dim);
}
.sp-sortrow select {
  flex: 1;
  font-size: 12.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 8px;
}

/* "Needs scheduling" explainer note under the group title */
.task-group-note {
  font-size: 12px; color: var(--text-dim); line-height: 1.45;
  padding: 2px 2px 10px;
  max-width: 60ch;
}

/* ============ Sidebar widgets: mini month + coming up ============ */
/* Shared by the desktop sidebar and the phone drawer (both render #sideNav). */
.mini-cal { padding: 4px 10px 10px; }
.mini-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 4px; }
.mini-cal-title { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.mini-cal-nav {
  border: 0; background: transparent; color: var(--text-dim);
  font-size: 17px; line-height: 1; width: 28px; height: 28px;
  border-radius: 8px; cursor: pointer; padding: 0;
}
.mini-cal-nav:hover { background: var(--surface-2); color: var(--text); }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.mini-cal-dow { font-size: 10px; font-weight: 600; color: var(--text-faint); text-align: center; padding: 3px 0; }
.mini-cal-day {
  position: relative; aspect-ratio: 1; border: 0; background: transparent;
  color: var(--text); font-size: 12px; border-radius: 50%;
  cursor: pointer; padding: 0; font-variant-numeric: tabular-nums;
}
.mini-cal-day:hover { background: var(--surface-2); }
.mini-cal-day.outside { opacity: .35; }
.mini-cal-day.today { background: var(--primary); color: #fff; font-weight: 700; }
.mini-cal-day.today:hover { background: var(--primary-hover, var(--primary)); }
.mini-cal-day.selected { box-shadow: inset 0 0 0 2px var(--primary); }
.mini-cal-day.today.selected { box-shadow: inset 0 0 0 2px #fff; }
.mini-cal-dot {
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--primary);
}
.mini-cal-day.today .mini-cal-dot { background: #fff; }

/* ============ Top bar: calendar view dropdown ============ */
.view-drop-wrap { position: relative; flex: none; }
.view-drop-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.view-drop-btn:hover { border-color: var(--primary); }
.view-drop-btn .sb-chev { margin: 0; font-size: 10px; color: var(--text-dim); line-height: 1; }
.view-drop-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 100;
  min-width: 168px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.view-drop-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0; border-radius: 8px; background: none;
  font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left;
}
.view-drop-menu button:hover { background: var(--surface-2); }
.view-drop-menu button.active { color: var(--primary); }
@media (max-width: 640px) {
  #viewDropLabel { display: none; }
  .view-drop-btn { padding: 7px 9px; }
}

/* ============ Day / Week time grid ============ */
.tgrid { position: relative; }
.allday-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  min-height: 34px;
}
.allday-label {
  flex: 0 0 52px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  padding: 8px 4px;
  text-align: center;
}
.allday-cells { flex: 1; display: flex; }
.allday-cell {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--border);
  padding: 3px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tgrid-body { position: relative; display: flex; }
.gutter { flex: 0 0 52px; position: relative; }
.gutter .hr {
  height: var(--hour-h, 46px);
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  text-align: right;
  padding: 2px 6px 0 0;
  position: relative;
}
.gutter .hr span { position: relative; top: -9px; background: var(--surface); padding: 0 2px; }
@media (min-width: 1024px) { #view .gutter .hr span { background: var(--surface); } }
.cols { flex: 1; display: flex; position: relative; }
.day-col { flex: 1; min-width: 0; position: relative; border-left: 1px solid var(--border); }
.day-col .hr-line { height: var(--hour-h, 46px); border-top: 1px solid var(--border); }
.day-col.today { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.now-line {
  position: absolute; left: 0; right: 0;
  height: 2px; background: #f43f5e; z-index: 5;
  box-shadow: 0 1px 4px rgba(244, 63, 94, .5);
}
.now-line::before {
  content: ""; position: absolute; left: -5px; top: -4px;
  width: 10px; height: 10px; border-radius: 50%; background: #f43f5e;
}
.ev {
  position: absolute;
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  cursor: pointer;
  border-left: 3px solid;
  background: color-mix(in srgb, var(--ev-color, var(--primary)) 13%, var(--surface));
  border-left-color: var(--ev-color, var(--primary));
  color: var(--text);
  z-index: 2;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
  transition: box-shadow .15s ease, transform .1s ease;
}
.ev:hover { box-shadow: var(--shadow); }
.ev .ev-title { font-weight: 600; }
.ev .ev-time { font-weight: 600; font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }
.ev-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-left: 3px solid var(--ev-color, var(--primary));
  background: color-mix(in srgb, var(--ev-color, var(--primary)) 13%, var(--surface));
  transition: box-shadow .15s ease;
}
.ev-chip:hover { box-shadow: var(--shadow); }

/* ============ Scheduled tasks on the calendar ============ */
.ev.is-task, .ev-chip.is-task, .m-ev.is-task {
  border-left-style: dashed;
  border-left-color: var(--ev-color, var(--primary));
}
.ev-taskmark { font-weight: 800; opacity: .85; margin-right: 2px; }

/* ============ Important events: bold dark border + brighter fill ============ */
.ev.important, .ev-chip.important, .m-ev.important, .ag-row.important, .sp-row.important {
  border: 2px solid color-mix(in srgb, var(--ev-color, var(--primary)) 68%, #101828);
  background: color-mix(in srgb, var(--ev-color, var(--primary)) 30%, var(--surface));
  font-weight: 800;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ev-color, var(--primary)) 60%, transparent),
              0 2px 10px rgba(16, 24, 40, .22);
}
.ev.important:hover, .ev-chip.important:hover {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ev-color, var(--primary)) 70%, transparent),
              0 4px 14px rgba(16, 24, 40, .28);
}
.ev.important .ev-title, .ev-chip.important, .m-ev.important { font-weight: 800; }

/* ============ Event sheet: importance + color controls ============ */
.ev-imp-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; flex-wrap: wrap; }
.ev-swatches { display: flex; gap: 8px; align-items: center; }
.ev-swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0; transition: transform .12s ease, border-color .12s ease;
}
.ev-swatch:hover { transform: scale(1.12); }
.ev-swatch.sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.ev-swatch-auto {
  background: var(--surface-3); color: var(--text-dim); font-weight: 800; font-size: 13px;
  border: 2px dashed var(--border);
}
.btn-warn { border-color: #d97706 !important; color: #d97706 !important; }
.week-head { display: flex; border-bottom: 1px solid var(--border); background: var(--surface); }
.week-head .gutter-sp { flex: 0 0 52px; }
.week-head .day-h {
  flex: 1; min-width: 0; text-align: center; padding: 8px 2px;
  border-left: 1px solid var(--border); cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.week-head .day-h:hover { background: var(--surface-2); }
.day-h .dow { font-size: 10.5px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }
.day-h .dnum { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.day-h.today .dnum {
  background: var(--primary); color: var(--primary-ink);
  border-radius: 50%; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .4);
}

/* ============ Month ============ */
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.m-dow {
  text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-faint);
  padding: 10px 0 8px; text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1px solid var(--border);
}
.m-cell {
  min-height: 86px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 5px;
  cursor: pointer;
  background: var(--surface);
  transition: background .12s ease;
}
.m-cell:nth-child(7n) { border-right: 0; }
.m-cell:hover { background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.m-cell.outside { background: var(--surface-2); color: var(--text-dim); }
.m-cell.outside:hover { background: var(--surface-3); }
.m-cell.selected { box-shadow: inset 0 0 0 2px var(--primary); }
.m-cell .m-num {
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  width: 26px; height: 26px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 50%;
}
.m-cell.today .m-num {
  background: var(--primary); color: var(--primary-ink); font-weight: 700;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .4);
}
.m-cell .m-ev {
  font-size: 11px; font-weight: 600; margin-top: 2px; padding: 2px 5px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid var(--ev-color, var(--primary));
  background: color-mix(in srgb, var(--ev-color, var(--primary)) 12%, var(--surface));
}
.m-cell .m-more { font-size: 11px; font-weight: 600; color: var(--text-dim); padding-left: 5px; }
.m-cell .m-dot { display: none; }
@media (max-width: 700px) {
  .m-cell { min-height: 60px; padding: 4px; }
  .m-cell .m-ev { display: none; }
  .m-cell .m-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin: 3px 2px 0 0; background: var(--ev-color, var(--primary)); }
}

/* ============ Agenda (BC2-dense) ============ */
.agenda-day { border-bottom: 1px solid var(--border); }
.agenda-day:last-child { border-bottom: 0; }
.agenda-day-head {
  position: sticky;
  top: calc(var(--topbar-h) + 45px);
  background: var(--surface-2);
  padding: 7px 14px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .06em;
  z-index: 5;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 1024px) { .agenda-day-head { top: 0; } }
.ag-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 8px 14px;
  border-left: 4px solid var(--ev-color, var(--primary));
  cursor: pointer;
  transition: background .12s ease;
}
.ag-row:hover { background: color-mix(in srgb, var(--ev-color, var(--primary)) 5%, transparent); }
.ag-row:active { background: var(--surface-2); }
.ag-time {
  flex: 0 0 118px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text-dim); padding-top: 1px;
}
.ag-main { flex: 1; min-width: 0; }
.ag-title { font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.ag-sub { font-size: 12px; color: var(--text-dim); }
.ag-sub.trunc { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-empty { padding: 28px; text-align: center; color: var(--text-dim); font-size: 13.5px; }

/* ============ Quadrants (Eisenhower) ============ */
.quads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
}
@media (min-width: 1024px) { .quads { padding: 18px; gap: 16px; } }
@media (max-width: 560px) { .quads { grid-template-columns: 1fr; } }
.quad {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.quad.dragover { outline: 2px dashed var(--primary); outline-offset: -4px; }
.quad-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--q-color, var(--q2));
  display: flex; align-items: baseline; gap: 6px;
  background: color-mix(in srgb, var(--q-color, var(--q2)) 4%, var(--surface));
}
.quad-head h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.quad-head .q-sub { font-size: 11px; color: var(--text-dim); }
.quad-head .q-count {
  margin-left: auto; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--text-dim);
  border-radius: 999px; padding: 2px 9px;
}
.quad-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.q-empty { font-size: 12.5px; color: var(--text-faint); text-align: center; padding: 22px 6px; }

.task-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 9px 11px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}
.task-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.task-card:active { transform: scale(.99); }
.task-card.dragging { opacity: .45; }
.task-card .tc-title { font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; }
.task-card .tc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.task-card .tc-actions { display: flex; gap: 6px; margin-top: 8px; }
.mini-btn {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 7px; padding: 4px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  color: var(--text-dim);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mini-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

/* ============ Tasks view ============ */
.tasks-wrap { padding: 14px 12px; max-width: 860px; margin: 0 auto; }
.quickadd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.quickadd h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; letter-spacing: .01em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-strong); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { min-height: 74px; resize: vertical; }
/* Sub-task rows in the New task sheet and the task detail sheet. */
.sub-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; font-size: 14px; background: var(--surface); }
.sub-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; font-size: 14px; cursor: pointer; }
.sub-check input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.sub-check.done span { text-decoration: line-through; color: var(--text-dim); }
.sub-check .mini-btn { margin-left: auto; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.task-group-title {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-dim); margin: 20px 0 10px;
}
/* Side panel: keep group headers and their explainer off the panel edge. */
.sp-scroll .task-group-title { margin-left: 16px; margin-right: 16px; }
.sp-scroll .task-group-note { margin-left: 16px; margin-right: 16px; }
.task-row {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow .15s ease, border-color .15s ease, background .12s ease;
}
.task-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.task-row:active { background: var(--surface-2); }
.task-check {
  width: 23px; height: 23px; border-radius: 50%;
  border: 2px solid var(--border-strong); background: transparent;
  flex: 0 0 auto; margin-top: 1px; cursor: pointer;
  font-size: 13px; line-height: 1; color: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.task-check:hover { border-color: var(--primary); transform: scale(1.06); }
.task-check.done { border-color: var(--ok); background: var(--ok); color: #fff; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; }
.task-title.done { text-decoration: line-through; color: var(--text-dim); font-weight: 500; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-dim); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.badge.q1 { background: color-mix(in srgb, var(--q1) 13%, transparent); color: var(--q1); }
.badge.q2 { background: color-mix(in srgb, var(--q2) 13%, transparent); color: var(--q2); }
.badge.q3 { background: color-mix(in srgb, var(--q3) 13%, transparent); color: var(--q3); }
.badge.q4 { background: color-mix(in srgb, var(--q4) 13%, transparent); color: var(--q4); }
.badge.sched { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--danger) 11%, transparent); color: var(--danger); }

/* ============ Settings ============ */
.settings-wrap { padding: 14px 12px; max-width: 720px; margin: 0 auto; }
.set-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.set-card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.set-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.set-row:last-child { margin-bottom: 0; }
.set-row .field { flex: 1; min-width: 140px; }
.workdays { display: flex; gap: 6px; flex-wrap: wrap; }
.workdays label {
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; user-select: none;
  color: var(--text-dim);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.workdays label:hover { border-color: var(--border-strong); color: var(--text); }
.workdays input { display: none; }
.workdays input:checked + span { font-weight: 700; }
.workdays label:has(input:checked) {
  background: var(--primary); border-color: var(--primary); color: var(--primary-ink);
  box-shadow: 0 1px 3px rgba(79, 70, 229, .4);
}
.acct-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.acct-row:last-child { border-bottom: 0; }
.acct-email { flex: 1; font-size: 14px; font-weight: 500; word-break: break-all; }
.acct-sub { font-size: 11.5px; color: var(--text-dim); }
/* Settings → Calendars: BC2-style favorite bar management */
.cal-acct-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 12px 0 2px; }
.cal-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--border); }
.cal-row:last-child { border-bottom: 0; }
.cal-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cal-row .icon-btn { font-size: 17px; padding: 4px 8px; }
.cal-eye.off { opacity: .45; filter: grayscale(1); }
.cal-star { color: var(--text-faint); }
.cal-star.on { color: #f0b429; }
.switch { position: relative; width: 48px; height: 28px; flex: 0 0 auto; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--border);
  transition: background .18s ease, border-color .18s ease;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: left .18s ease;
}
.switch input:checked + .track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .track::after { left: 22px; }

/* ============ Side panel ============ */
.sp-section { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sp-section:last-child { border-bottom: 0; }
.sp-section h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); }
.sp-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px;
  border-left: 3px solid var(--ev-color, var(--primary)); padding-left: 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer; font-size: 13.5px; font-weight: 500;
  transition: background .12s ease;
}
.sp-row:hover { background: var(--surface-2); }
.sp-row .sp-time { color: var(--text-dim); font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-empty { color: var(--text-dim); font-size: 13px; }
/* Inbox header stacks vertically in the narrow panel */
.sp-scroll .inbox-head { flex-direction: column; align-items: stretch; }
.sp-scroll .inbox-head #inboxAdd { align-self: flex-start; }

/* Right-panel task tabs (desktop): all task destinations live here. */
.sp-tabs {
  display: flex; flex: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.sp-tab {
  flex: 1 1 0; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 2px 7px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--text-dim); font-size: 10px; font-weight: 600;
  cursor: pointer;
}
.sp-tab-ico { font-size: 16px; line-height: 1; }
.sp-tab-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sp-tab:hover { color: var(--text); background: var(--surface-2); }
.sp-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.sp-tab .nav-badge { position: absolute; top: 3px; right: 6px; }

/* Phone task hub: same tabbed hub as the desktop right panel, full-screen */
.hub-wrap { display: flex; flex-direction: column; min-height: 60vh; }
.hub-tabs { position: sticky; top: 0; z-index: 20; border-radius: 0; }
.hub-body { flex: 1; min-width: 0; }

/* Compact quadrant groups inside the panel */
.sp-quad { border-bottom: 1px solid var(--border); }
.sp-quad:last-child { border-bottom: 0; }
.sp-quad-head {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: none; border: 0; cursor: pointer;
  font-size: 13px; color: var(--text); text-align: left;
}
.sp-quad-head:hover { background: var(--surface-2); }
.sp-quad-head .q-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--q-color); flex: none; }
.sp-quad-head .ag-sub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-quad-head .q-count { font-weight: 700; color: var(--text-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.sp-quad-body { padding: 0 8px 10px; }
.sp-task-row { margin: 3px 0; }

/* ============ Sheets / modals ============ */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(12, 15, 28, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: scrim-in .18s ease-out;
}
@keyframes scrim-in { from { opacity: 0; } }
@media (min-width: 700px) { .sheet-scrim { align-items: center; padding: 24px; } }
.sheet {
  background: var(--surface);
  width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: sheet-up .24s cubic-bezier(.32, .72, .35, 1);
}
@media (min-width: 700px) {
  .sheet { border-radius: 20px; animation: sheet-pop .18s cubic-bezier(.32, .72, .35, 1); }
}
@keyframes sheet-up { from { opacity: .6; transform: translateY(40px); } }
@keyframes sheet-pop { from { opacity: 0; transform: scale(.97) translateY(10px); } }
.sheet h2 { margin: 4px 0 14px; font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.sheet .grabber {
  width: 40px; height: 4px; border-radius: 999px; background: var(--surface-3);
  margin: 0 auto 10px;
}
.sheet p { font-size: 14px; color: var(--text-dim); }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1; min-width: 100px; padding: 10px 14px; }
.qseg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qseg label {
  border: 2px solid var(--border); border-radius: 10px; padding: 10px 8px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: center;
  transition: border-color .15s ease, background .15s ease;
}
.qseg label:hover { border-color: var(--border-strong); }
.qseg input { display: none; }
.qseg label:has(input:checked) {
  border-color: var(--q-color, var(--primary));
  background: color-mix(in srgb, var(--q-color, var(--primary)) 9%, transparent);
}
.popover {
  position: fixed; z-index: 80;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; min-width: 200px;
  animation: sheet-pop .14s ease-out;
}
.popover button {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; padding: 10px 12px;
  border-radius: 8px; font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background .12s ease;
}
.popover button:hover { background: var(--surface-2); }
.popover button:active { background: var(--surface-3); }

/* ============ Toasts ============ */
#toastRoot {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 100; pointer-events: none;
  padding: 0 16px;
}
.toast {
  background: var(--toast-bg); color: var(--toast-ink);
  padding: 11px 18px; border-radius: 16px;
  font-size: 13.5px; font-weight: 600; letter-spacing: -.005em;
  text-align: center;
  box-shadow: var(--shadow-lg); max-width: 92vw;
  animation: toast-in .22s cubic-bezier(.32, .72, .35, 1);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }

.loading { padding: 40px 32px; text-align: center; color: var(--text-dim); font-size: 13.5px; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--primary);
  margin: 0 auto 12px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* NLP date chip (quick-add) — shown when a typed date like "tomorrow at 3pm" is detected. */
.nlp-hint {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; padding: 5px 6px 5px 12px;
  width: fit-content; max-width: 100%;
  font-size: 13px; font-weight: 500; color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}
.nlp-hint button {
  border: 0; border-radius: 999px; cursor: pointer;
  width: 20px; height: 20px; line-height: 1; font-size: 11px;
  background: var(--surface-3); color: var(--primary); flex: none;
}
.nlp-hint[hidden] { display: none; }

/* Task filters (workspaces / projects) */
.filter-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 14px 0 4px;
}
.ws-pills { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.ws-pill {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
  border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.ws-pill:hover { border-color: var(--border-strong); color: var(--text); }
.ws-pill.active { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.ws-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wp, var(--primary)); flex: none; }
.proj-filter {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 7px 10px; font-size: 13px; max-width: 220px;
}

/* Project badge on task rows */
.proj-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--pb, var(--primary)); background: color-mix(in srgb, var(--pb, var(--primary)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--pb, var(--primary)) 30%, transparent);
  border-radius: 999px; padding: 2px 9px; margin-right: 6px; vertical-align: 1px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Maintenance view */
.maint-wrap { max-width: 860px; margin: 0 auto; padding: 4px 0 40px; }
.maint-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 6px 0 18px; }
.maint-head h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.015em; }
.maint-ws { margin-bottom: 22px; }
.maint-ws-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-dim); margin: 0 2px 10px;
}
.maint-proj {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.maint-proj-title { padding: 12px 16px 4px; font-weight: 700; font-size: 14.5px; }
/* Equipment-type groups: Vehicles, Mowers & Outdoor Equipment, … */
.maint-type { margin-bottom: 26px; }
.maint-type:last-child { margin-bottom: 8px; }
.maint-type-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 800; letter-spacing: -.01em;
  margin: 0 2px 10px; color: var(--text);
}
.maint-count { font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-left: 2px; }
.due-warn { color: var(--danger); }
.maint-none { padding: 2px 16px 12px; font-size: 12.5px; }
.asset-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-top: 1px solid var(--border);
}
.asset-row:first-of-type { border-top: 0; }
.asset-main { flex: 1; min-width: 0; }
.asset-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asset-meta { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.asset-actions { display: flex; gap: 6px; flex: none; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.status-pill {
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 10px;
}
.st-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.st-soon { color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); }
.st-overdue { color: #fff; background: var(--danger); }
.st-unknown { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* suggestions */
.sg-items { max-height: 46vh; overflow: auto; margin-bottom: 6px; }
.sg-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; background: var(--card); }
.sg-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.sg-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sg-name { font-weight: 600; font-size: 14px; }
.sg-sub { font-size: 12px; color: var(--muted); }
.sg-tracked { font-size: 12px; color: var(--accent); font-weight: 600; }
.sg-row.is-tracked { opacity: .6; cursor: default; }
.sg-wd { font-size: 12px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }
.ws-add { font-weight: 700; color: var(--accent); }
.proj-filter-wrap { display: flex; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .asset-row { align-items: flex-start; }
  .asset-actions { flex-direction: column; }
  .maint-head { flex-direction: column; align-items: stretch; }
}

/* ------------------------------- Meals ---------------------------------- */
.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.view-head h2 { margin: 0 0 2px; }
.meal-weeknav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.meal-weeknav .btn { min-width: 40px; }
.meal-weeklabel { font-weight: 700; font-size: 15px; padding: 0 4px; }
.meal-week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.meal-day { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px; cursor: pointer; min-height: 128px; transition: box-shadow .15s, transform .15s; box-shadow: var(--shadow); }
.meal-day:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.meal-day.today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }
.meal-dow { font-weight: 700; font-size: 14px; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.meal-today-pill { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--primary); color: var(--primary-ink); border-radius: 999px; padding: 2px 8px; }
.meal-date { font-size: 12px; color: var(--text-dim); margin: 2px 0 8px; }
.meal-slot { font-size: 13px; line-height: 1.4; border-radius: 10px; padding: 9px; min-height: 54px; }
.meal-slot.filled { background: var(--primary-soft); color: var(--text); font-weight: 700; font-size: 14px; }
.meal-slot.empty { background: transparent; color: var(--text-faint); border: 1.5px dashed var(--border-strong); display: flex; align-items: center; gap: 6px; }
.meal-plus { font-weight: 800; color: var(--primary); font-size: 15px; }
.meal-pub { display: inline-block; font-size: 11px; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-radius: 999px; padding: 2px 8px; margin-top: 8px; font-weight: 700; }
.meal-pick-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.meal-pick { border-radius: 999px; }
.meal-add { display: flex; gap: 8px; }
.meal-add input { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 14px; background: var(--surface); color: var(--text); }
.meal-add input::placeholder { color: var(--text-faint); }
/* Auth + form validation: red ring on the exact field that's wrong. */
.field-err { border-color: #dc2626 !important; box-shadow: 0 0 0 2px rgba(220,38,38,.18); }
.meal-lib-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.meal-lib-name { font-weight: 600; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
@media (max-width: 640px) {
  .view-head { flex-direction: column; align-items: stretch; }
  .meal-day { min-height: 104px; }
}
.recipe-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin: 8px 0; }
.recipe-list { margin: 6px 0 14px 18px; font-size: 14px; line-height: 1.55; }
.recipe-steps { list-style: none; margin-left: 0; }
.recipe-steps li { display: flex; gap: 10px; margin-bottom: 10px; }
.recipe-step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #4f46e5; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.list-actions { display: flex; gap: 8px; }
.list-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.list-tab { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.list-tab.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.list-tab.add { border-style: dashed; color: var(--text-dim); }
.tab-n { background: rgba(0,0,0,.12); border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.list-tab.active .tab-n { background: rgba(255,255,255,.25); }
.shop-items { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.shop-check { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border-strong); background: var(--surface); color: var(--primary-ink); font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.shop-item.done .shop-check { background: #10b981; border-color: #10b981; }
.shop-main { flex: 1; min-width: 0; }
.shop-name { font-size: 15px; }
.shop-item.done .shop-name { text-decoration: line-through; color: var(--text-faint); }
#scanWrap { position: relative; border-radius: 12px; overflow: hidden; background: #111; aspect-ratio: 4/3; }
#scanVideo { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid #a3e635; border-radius: 12px; pointer-events: none; }
.scan-result { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 10px; }
.scan-result img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
#shareText { width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; box-sizing: border-box; background: var(--surface); color: var(--text); }
.fam-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.fam-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.fam-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.fam-main { flex: 1; min-width: 0; }
.fam-name { font-size: 14px; font-weight: 600; }

/* ============ Phase 1: Focus modes, Nearby, Inbox, Briefing, Pro ============ */
.focus-sel {
  max-width: 170px; padding: 7px 8px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600;
}
.focus-banner {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent); color: var(--text);
  border-radius: 12px; padding: 8px 12px; font-size: 14px;
}
.focus-banner .mini-btn { margin-left: auto; }
.nav-badge {
  display: inline-block; min-width: 20px; text-align: center;
  background: #4f46e5; color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: 4px;
}
.pro-tag {
  display: inline-block; background: color-mix(in srgb, #f59e0b 22%, var(--surface)); color: var(--text);
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  border-radius: 6px; padding: 2px 6px; vertical-align: middle;
}
.pro-tag.soon { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); color: var(--text); }
.upgrade-cta {
  max-width: 480px; margin: 40px auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px;
}
.upgrade-cta h3 { margin: 0 0 8px; }
/* Nearby */
.nearby-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.nearby-controls { display: flex; gap: 8px; align-items: center; }
.nearby-controls select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border-strong); font-size: 14px; background: var(--surface); color: var(--text); }
.dist-badge { font-size: 12px; font-weight: 700; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
/* Task location */
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.loc-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
/* Saved places picker at the top of the task location editor. */
.loc-saved { width: 100%; margin-bottom: 8px; }
/* Saved places manager in Settings → Schedule preferences. */
.saved-places { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.saved-place-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
}
/* Inbox */
.inbox-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.inbox-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px;
}
.inbox-main { flex: 1; min-width: 0; }
.inbox-text { font-size: 15px; font-weight: 600; color: var(--text); }
.inbox-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.inbox-actions { display: flex; gap: 6px; flex: none; }
.sugg-chip {
  display: inline-block; background: #ecfdf5; color: #065f46;
  border-radius: 999px; padding: 1px 8px; font-weight: 700;
}
/* Briefing */
.brief-player { display: flex; gap: 10px; margin: 12px 0; }
.brief-sec { margin: 14px 0; }
.brief-sec h4 { margin: 0 0 6px; font-size: 14px; }
.brief-row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.brief-time { flex: none; font-weight: 700; color: var(--primary); min-width: 70px; }
.brief-empty { color: var(--text-faint); font-size: 13px; padding: 4px 0; }
/* Focus places */
.place-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid #f1f2f4; font-size: 14px;
}
/* Pro card */
.pro-tier { font-size: 16px; margin-bottom: 10px; }
.feat-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.feat-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.feat-ico { flex: none; width: 22px; text-align: center; }
@media (max-width: 640px) {
  .focus-sel { max-width: 118px; font-size: 12px; }
  .inbox-item { flex-direction: column; }
  .inbox-actions { width: 100%; }
  .inbox-actions .btn { flex: 1; }
}
/* Address autocomplete dropdown */
.ac-drop {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  background: var(--card, #fff); border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 4px; overflow: hidden;
}
.ac-item {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  border: 0; border-bottom: 1px solid #f1f2f4; background: none; cursor: pointer;
}
.ac-item:hover, .ac-item:focus { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.ac-main { display: block; font-weight: 600; font-size: 14px; color: inherit; }
.ac-sub { display: block; font-size: 12px; color: var(--text-dim); }
.ac-foot { padding: 6px 12px; font-size: 11px; color: var(--text-faint); text-align: right; }
/* Navigation chooser */
.nav-app-btn { display: block; width: 100%; margin-bottom: 8px; text-align: left; font-size: 15px; }
.nav-go {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: none; color: var(--text); cursor: pointer; font-size: 16px;
}
.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: #4f46e5; font-size: inherit; text-decoration: underline;
}

/* Paths: guided business tracks (training, certifications, next steps). */
.path-group { margin-bottom: 18px; }
.path-group-head { font-weight: 700; font-size: 15px; margin: 0 0 8px 2px; }
.path-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.path-card { text-align: left; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.path-card:hover { border-color: var(--primary); }
.path-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.path-title { font-weight: 700; font-size: 14px; }
.path-count { font-size: 12px; color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.path-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; margin-bottom: 8px; }
.path-bar.big { height: 12px; margin: 4px 0 10px; }
.path-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s; }
.path-progress-line { margin-bottom: 12px; }
.step-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.step-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.step-row.done { opacity: .6; }
.step-row.done .shop-name { text-decoration: line-through; }
/* Rocky board owner tags */
.owner-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.step-row.done .owner-tag { text-decoration: none; }
.owner-aaron { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }
.owner-rocky { background: #ccfbf1; color: #0f766e; border: 1px solid #14b8a6; }
.step-done-head { font-size: 12px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; margin: 10px 2px 2px; }
