/* ============================================================
   TradesMind Design System — shared.css
   Version 1.1 — 11 May 2026
   Import this file into every page.
   ============================================================ */

/* ── Fonts ──
   Fraunces (serif): headings, splash, marketing copy.
   Inter (sans): UI body — all interactive surfaces.
   Space Mono: numeric / code / token displays. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,400&family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ── Brand Tokens ── */
:root {
  /* Backgrounds */
  --bg:           #0D1F2D;
  --bg-deep:      #060E16;
  --bg-card:      #111D2B;
  --bg-input:     #0A1520;
  --bg-overlay:   rgba(6,14,22,0.85);

  /* Borders */
  --border:       #1E3048;
  --border-light: #1E3A50;

  /* Primary accent — teal — nav, pills, badges, text highlights */
  --teal:         #02C39A;
  --teal-dim:     rgba(2,195,154,0.12);
  --teal-border:  rgba(2,195,154,0.25);
  --teal-glow:    rgba(2,195,154,0.15);

  /* CTA — cyan — all buttons and primary actions.
     CANONICAL VALUE. Do not change to teal — Tim's brief.
     Last touched 11 May 2026 after a teal regression that bit prod. */
  --btn:          #4DD9E8;
  --btn-text:     #0D1F2D;
  --btn-dim:      rgba(77,217,232,0.12);
  --btn-border:   rgba(77,217,232,0.3);
  --btn-glow:     rgba(77,217,232,0.15);

  /* Purple — new features, coming soon, progress */
  --purple:       #7B2FBE;
  --purple-dim:   rgba(123,47,190,0.12);
  --purple-border:rgba(123,47,190,0.2);

  /* Blue — setup states */
  --blue:         #378ADD;
  --blue-dim:     rgba(55,138,221,0.12);
  --blue-border:  rgba(55,138,221,0.2);

  /* Destructive — red — delete, cancel, sign out */
  --red:          #E53E3E;
  --red-bg:       rgba(229,62,62,0.1);
  --red-border:   rgba(229,62,62,0.3);

  /* Amber — warnings, provisional state */
  --amber:        #F59E0B;
  --amber-dim:    rgba(245,158,11,0.15);
  --amber-border: rgba(245,158,11,0.3);

  /* Text */
  --text:         #E8EDF2;
  --text-mid:     #8899AA;
  --text-dim:     #6A7F8A;
  --text-muted:   #4A6070;
  --text-dark:    #2A4A5A;
  --text-faint:   #5A6396;  /* used by .turn .who fallback colour in live VAPI transcripts */

  /* Cyan — accent for the "You" label in live VAPI transcripts.
     Matches the orb gradient outer ring on index.html exactly. */
  --cyan:         #5BD8F0;

  /* Green (briefing card) */
  --green-bg:     #0A2535;
  --green-border: #2ABFCC;

  /* Type stack */
  --font-serif:   'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing */
  --pad:          16px;
  --pad-sm:       12px;
  --pad-xs:       8px;
  --radius:       16px;
  --radius-sm:    12px;
  --radius-xs:    8px;
  --radius-pill:  24px;
  --white:        #FFFFFF;
}

/* ── Base ── */
html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  color: var(--text);
}

/* ── App Shell ── */
.app {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  max-width: 430px;
  min-width: 320px;
  margin: 0 auto;
  height: 100dvh;
}

@media (max-width: 374px) {
  .app {
    font-size: 14px;
  }
  .top-bar, .page-bar {
    padding-top: max(env(safe-area-inset-top), 12px);
    padding-left: 12px;
    padding-right: 12px;
  }
  .scroll-body {
    padding: 8px 10px;
  }
  .fixed-bottom {
    padding-bottom: max(env(safe-area-inset-bottom), 8px);
  }
}

/* Desktop phone shell.
   600px, not 431px: large phones (iPhone 16 Pro Max = 440 CSS px) must get
   the real mobile layout, not this floating desktop frame. */
@media (min-width: 600px) {
  body { background: #040A10; }
  .app {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: min(844px, 95dvh);
    border-radius: 36px;
    border: 2px solid var(--border-light);
    box-shadow: 0 0 80px rgba(0,0,0,0.7);
  }
  .fixed-top { border-radius: 36px 36px 0 0; overflow: hidden; }
  .fixed-bottom { border-radius: 0 0 36px 36px; overflow: hidden; }
}

/* ── Fixed Top ── */
.fixed-top {
  flex-shrink: 0;
  background: var(--bg);
  z-index: 10;
}

/* ── Scrollable Centre ── */
.scroll-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: var(--pad-sm) var(--pad-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scroll-body::-webkit-scrollbar { display: none; }

/* ── Fixed Bottom ── */
.fixed-bottom {
  flex-shrink: 0;
  background: var(--bg-input);
  border-top: 1px solid var(--border);
  z-index: 10;
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(env(safe-area-inset-top), 16px) 18px 8px;
}
.menu-btn {
  width: 34px; height: 34px;
  background: #162B3E;
  border-radius: var(--radius-xs);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; border: none; cursor: pointer;
}
.menu-btn span {
  width: 14px; height: 1.5px;
  background: var(--text-mid);
  border-radius: 2px; display: block;
}
.date-text { font-size: 11px; color: var(--text-mid); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: white;
  border: 1.5px solid var(--teal);
}

/* ── Page Title Bar (for inner pages) ── */
.page-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(env(safe-area-inset-top), 16px) 18px 12px;
  border-bottom: 1px solid var(--border);
}
.back-btn {
  width: 34px; height: 34px;
  background: #162B3E;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; color: var(--text-mid);
  flex-shrink: 0;
}
.page-title {
  font-size: 17px; font-weight: 600; color: var(--text);
  flex: 1;
}
.page-badge {
  font-size: 9px; font-weight: 700;
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Greeting ── */
.greeting {
  padding: 4px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.greeting-label {
  font-size: 9px; color: var(--teal);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px;
}
.greeting-name { font-size: 19px; font-weight: 600; color: white; margin-bottom: 2px; }
.greeting-sub { font-size: 11px; color: var(--text-mid); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: var(--pad);
}
.card-teal {
  background: linear-gradient(135deg, var(--green-bg) 0%, var(--bg-card) 100%);
  border-color: var(--green-border);
}
.card-eyebrow {
  font-size: 9px; color: var(--teal);
  letter-spacing: 1px; text-transform: uppercase;
  font-weight: 700; margin-bottom: 7px;
  display: flex; align-items: center; gap: 5px;
}
.card-dot {
  width: 6px; height: 6px;
  border-radius: 50%; background: var(--teal);
  animation: pulse 2s infinite;
}
.card-title { font-size: 17px; font-weight: 600; color: white; margin-bottom: 5px; }
.card-body { font-size: 11px; color: var(--text-mid); line-height: 1.55; margin-bottom: 12px; }
.card-body span { color: var(--teal); }

/* ── Buttons ── */
.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 700;
  border: none; cursor: pointer;
  transition: opacity 0.15s;
}
.btn:active { opacity: 0.85; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--btn);
  color: var(--btn-text);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}
.btn-sm {
  padding: 10px 16px;
  font-size: 12px;
  width: auto;
}

/* ── Progress bars ── */
.prog-track {
  height: 5px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.prog-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(to right, var(--purple), var(--teal));
}
.prog-track-lg {
  height: 8px; background: #1A2D3F;
  border-radius: 4px; overflow: hidden;
}
.prog-fill-lg {
  height: 100%; border-radius: 4px;
  background: linear-gradient(to right, var(--purple), var(--teal));
}
.prog-track-sm {
  height: 3px; background: #1A2D3F;
  border-radius: 2px; overflow: hidden;
}
.prog-fill-sm {
  height: 100%; border-radius: 2px;
  background: linear-gradient(to right, var(--purple), var(--teal));
}

/* ── Badges ── */
.badge {
  border-radius: 6px; padding: 3px 7px;
  font-size: 8px; font-weight: 800;
  letter-spacing: 0.2px; white-space: nowrap;
}
.badge-live    { background: var(--teal-dim);   color: var(--teal); border: 1px solid var(--teal-border); }
.badge-setup   { background: var(--blue-dim);   color: var(--blue); border: 1px solid var(--blue-border); }
.badge-feed    { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border); }
.badge-coming  { background: var(--purple-dim); color: #9D4EDD; border: 1px solid var(--purple-border); }
.badge-new     { background: var(--btn-dim);    color: var(--btn); border: 1px solid var(--btn-border); }

/* ── Pills ── */
.pill {
  border-radius: var(--radius-pill);
  padding: 3px 9px; font-size: 9px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 3px;
}
.pill-dot { width: 5px; height: 5px; border-radius: 50%; }
.pill-on  { background: var(--teal-dim); border: 1px solid var(--teal-border); color: var(--teal); }
.pill-on .pill-dot { background: var(--teal); }
.pill-off { background: #0E1E2E; border: 1px solid var(--text-dark); color: var(--text-mid); }
.pill-off .pill-dot { background: #3A5A6A; }

/* ── Input dock ── */
.input-dock { padding: 10px 13px 10px; }
.hint-row { display: flex; gap: 6px; margin-bottom: 9px; overflow-x: auto; scrollbar-width: none; }
.hint-row::-webkit-scrollbar { display: none; }
.hint {
  background: #162B3E; border-radius: var(--radius-pill);
  padding: 4px 10px; font-size: 10px;
  color: var(--teal); border: 1px solid rgba(2,195,154,0.2);
  white-space: nowrap; cursor: pointer; flex-shrink: 0;
}
.input-row { display: flex; align-items: center; gap: 8px; }
.text-wrap {
  flex: 1; background: var(--bg-card);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 14px; height: 44px; gap: 8px;
}
.text-inner {
  flex: 1; background: transparent;
  border: none; outline: none;
  font-size: 12px; color: var(--text);
}
.text-inner::placeholder { color: var(--text-muted); }
.send-btn {
  width: 30px; height: 30px;
  border-radius: 50%; background: var(--btn);
  border: none; display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
}
.or-div { font-size: 10px; color: var(--text-dark); }
.orb {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, var(--btn), #0A9AAF);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 7px var(--btn-glow);
  cursor: pointer;
}

/* ── Bottom Nav ── */
.bottom-nav {
  background: var(--bg-input);
  padding: 8px 8px max(env(safe-area-inset-bottom), 12px);
  display: flex; justify-content: space-around;
}
.nav-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px; cursor: pointer;
}
.nav-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); color: var(--text-mid);
}
.nav-icon.active { background: var(--teal-glow); color: var(--teal); }
.nav-icon.dim    { color: #2A3A46; }
.nav-label       { font-size: 9px; color: var(--text-mid); }
.nav-label.active { color: var(--teal); }
.nav-label.dim   { color: #2A3A46; }

/* ── Form elements ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-label { font-size: 11px; color: var(--text-mid); }
.form-input {
  background: #1E2140; border: 1px solid #2A2D4A;
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-size: 14px; color: var(--text);
  outline: none; width: 100%;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--teal); }

/* ── List rows ── */
.list-row {
  display: flex; align-items: flex-start;
  gap: 10px; padding: 11px 12px;
  border-bottom: 1px solid #162230;
}
.list-row:last-child { border-bottom: none; }
.list-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px; margin-top: 1px;
}
.list-icon-teal   { background: var(--teal-dim); }
.list-icon-blue   { background: var(--blue-dim); }
.list-icon-purple { background: var(--purple-dim); }
.list-icon-muted  { background: rgba(255,255,255,0.04); }
.list-body { flex: 1; min-width: 0; }
.list-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 6px; margin-bottom: 3px;
}
.list-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; }
.list-name.dim    { color: var(--text-mid); font-weight: 500; }
.list-name.dimmer { color: var(--text-dim); font-weight: 500; }
.list-sub  { font-size: 9px; color: var(--text-dim); line-height: 1.4; margin-bottom: 6px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.section-label {
  font-size: 9px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  font-weight: 700; padding: 12px 0 6px;
}

/* ── Animations ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* ── Report a Problem Button ── */
.report-btn {
  position: fixed;
  bottom: calc(120px + max(env(safe-area-inset-bottom), 8px));
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  cursor: pointer;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  font-size: 18px;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.report-btn:hover {
  background: var(--teal-dim);
  border-color: var(--teal-border);
  color: var(--teal);
}
@media (min-width: 768px) {
  .report-btn { bottom: 24px; right: 24px; }
}

/* Report modal overlay */
.report-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.report-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  width: 92%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.report-modal h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.report-modal label {
  font-size: 11px;
  color: var(--text-mid);
  display: block;
  margin-bottom: 4px;
}
.report-modal select,
.report-modal textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font-sans);
  outline: none;
}
.report-modal select:focus,
.report-modal textarea:focus {
  border-color: var(--teal);
}
.report-modal select { height: 42px; }
.report-modal textarea { min-height: 100px; resize: vertical; }
.report-modal .btn { margin-top: 4px; }
.report-modal .cancel-link {
  text-align: center;
  font-size: 11px;
  color: var(--text-mid);
  cursor: pointer;
  padding: 6px;
}
.report-modal .cancel-link:hover { color: var(--text); }
.report-modal .confirm-text {
  text-align: center;
  font-size: 13px;
  color: var(--text);
  padding: 20px 0;
  line-height: 1.5;
}
.report-error {
  font-size: 11px;
  color: var(--red);
  text-align: center;
}

/* ── Utility ── */
.text-teal   { color: var(--teal); }
.text-cyan   { color: var(--btn); }
.text-purple { color: var(--purple); }
.text-muted  { color: var(--text-muted); }
.text-mid    { color: var(--text-mid); }
.fw-700      { font-weight: 700; }
.fw-600      { font-weight: 600; }
.text-center { text-align: center; }
.mt-8        { margin-top: 8px; }
.mt-12       { margin-top: 12px; }
.mt-16       { margin-top: 16px; }
.mb-8        { margin-bottom: 8px; }
.mb-12       { margin-bottom: 12px; }
.gap-8       { gap: 8px; }
.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ──────────────────────────────────────────────────────────────────
   Live VAPI transcript — canonical pattern lifted from index.html.

   Used by:
     • /chat       — .turn rows appended into #conversation alongside
                     .bubble-row elements (interleaved chronologically).
                     #transcript itself is not used on /chat.
     • /calendar   — .transcript element (#booking-transcript) appears
                     while a voice-booking call is live, then hides on
                     call-end. Standalone, no bubbles.
     • /           — original canonical (do NOT migrate — it has its
                     own inline copy of these rules with the same vars).

   Visual: small-caps YOU / MAX label per turn, body text below, dark
   panel with subtle border. Cyan for user, teal for Max.
   ────────────────────────────────────────────────────────────────── */
.transcript {
  margin: 0 22px 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  /* Adaptive height — fills available space on tall screens, caps on
     short ones. Was 220px (cramped, only ~4 turns visible). With the
     orb hidden during a call (.body.in-call) the freed space lets the
     transcript breathe. */
  max-height: min(60vh, 560px);
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.55;
}
.transcript:empty::before {
  content: "Listening…";
  color: var(--text-faint);
  font-style: italic;
}
/* WhatsApp-style layout — Max (assistant) bubble left, You (user) bubble
   right. Each turn is a flex column so the small-caps label sits above
   its bubble and aligns to the same side. Cyan tint for user, neutral
   grey for Max. Tail corner (border-bottom-{left,right}-radius: 4px)
   gives the classic speech-bubble shape. */
.turn {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  max-width: 100%;
}
.turn:last-child { margin-bottom: 0; }
.turn.user { align-items: flex-end; }
.turn.max  { align-items: flex-start; }

.turn .who {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 3px;
  padding: 0 6px;
}
.turn.user .who { color: var(--cyan); }
.turn.max  .who { color: var(--teal); }

.turn .text {
  display: inline-block;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  color: var(--text);
  word-wrap: break-word;
}
.turn.user .text {
  background: rgba(91, 216, 240, 0.12);
  border: 1px solid rgba(91, 216, 240, 0.22);
  border-bottom-right-radius: 4px;
}
.turn.max .text {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}

@media (min-width: 768px) {

  /* Reset phone shell — fill the browser */
  body {
    background: var(--bg-deep);
  }

  .app {
    position: fixed;
    inset: 0;
    max-width: 100%;
    width: 100%;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transform: none;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: 1fr;
    grid-template-areas: "sidebar main";
  }

  /* Calendar uses .cal-scroll instead of .scroll-body */
  .cal-scroll {
    grid-area: main;
    overflow-y: auto;
    height: 100dvh;
  }

  /* Sidebar — replaces bottom nav */
  .fixed-bottom {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 220px;
    border-top: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    background: var(--bg);
    padding: 0 0 24px;
    position: relative;
    overflow-y: auto;
  }

  /* Main content area */
  .fixed-top {
    display: none;
  }

  .scroll-body {
    grid-area: main;
    height: 100dvh;
    overflow-y: auto;
    padding: 32px 40px;
    max-width: 860px;
    margin-left: 0;
    margin-right: auto;
    width: 100%;
  }

  /* Sidebar nav container — JS renderDesktopNav renders class-based items */
  #bottom-nav {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    background: transparent;
    border-top: none;
    white-space: normal;
    gap: 2px;
    width: 100%;
    display: flex;
  }

  /* Voice FAB button — pin below nav items, centred in sidebar */
  #bottom-nav > button {
    order: 999 !important;
    margin-top: 16px !important;
    align-self: center !important;
    position: relative !important;
  }

  /* Logo zone rendered by JS — suppress CSS pseudo-element */
  .fixed-bottom::before {
    display: none;
  }

  /* Sidebar footer spacer */
  .fixed-bottom::after {
    content: "";
    flex: 1;
  }

  /* Cards expand on desktop */
  .card {
    border-radius: var(--radius);
  }

  /* Hide mobile-only elements */
  .mobile-only {
    display: none;
  }

  /* Show desktop-only elements */
  .desktop-only {
    display: block;
  }

  /* Logo zone rendered by JS */
  .sidebar-logo {
    padding: 28px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 8px;
    flex-shrink: 0;
  }
  .sidebar-logo .wordmark {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text);
    line-height: 1.1;
  }
  .sidebar-logo .wordmark span,
  .sidebar-logo .wordmark-accent {
    color: var(--teal);
  }
  .sidebar-logo .tagline {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 5px;
  }

  /* Nav item classes — replaces inline styles */
  .desktop-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    margin: 1px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-mid);
    position: relative;
    transition: background 0.15s, color 0.15s;
  }
  .desktop-nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text);
  }
  .desktop-nav-item.active {
    background: rgba(2,195,154,0.10);
    color: var(--teal);
    font-weight: 600;
  }
  .desktop-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--teal);
    border-radius: 0 2px 2px 0;
  }

  /* Nav section dividers */
  .nav-section-gap {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 6px 16px;
    flex-shrink: 0;
    pointer-events: none;
  }

  /* Content frame — centres page content at max 960px in main area */
  .content-wrap {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
  }

  /* Wraps page content at 960px centred —
     add class="desktop-content" to any page's main scrollable div */
  .desktop-content {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    padding: 32px 40px;
    min-height: 100%;
  }

  /* Calendar, chat and pages without scroll-body — constrain main area */
  .app > *:not(.fixed-bottom):not(.fixed-top):not(.scroll-body) {
    max-width: 100%;
  }

  /* Quote, invoice, task edit panels — full width on desktop */
  .edit-sheet,
  .quote-edit-panel,
  .invoice-edit-panel,
  [class*="edit-panel"],
  [class*="edit-sheet"] {
    position: fixed;
    inset: 0 0 0 220px;
    width: calc(100vw - 220px);
    max-width: none;
    height: 100dvh;
    border-radius: 0;
    z-index: 100;
    overflow-y: auto;
    padding: 32px 40px;
    background: var(--bg);
  }


}
