/* Mizufox team app styles.
   Part 1 is the AZNA app stylesheet (azna-zizi/backend/public/index.html, 2026-09-29), trimmed to the
   rules this app uses so the two apps share layout/structure. Part 2 (bottom) is Mizufox-only.
   2026-09-30 (Zai, "so it doesn't match the azna colors"): AZNA's teal accent (#4cbbb5 / rgba(76,187,181,…))
   is swapped for Mizufox's own rose gold (#e3a797, from public/assets/shop.css's --peach) everywhere in
   Part 1 too — every literal teal value in this file, not just the --gold variable most rules don't use.
   The paired dark contrast color for text on a filled accent button (was #08312f) is now Mizufox's own
   dark ink (#292823, matching how the public site pairs --ink text on a --peach button). Left alone: the
   red/purple/amber tag colors (MRKT/CODE/etc.) and the separate violet/green accents used for specific
   sub-views — those aren't "the teal", they're distinct existing colors. */
  :root {
    --ink: #f0f0f0;          /* primary text */
    --ink-soft: #888888;     /* muted text */
    --paper: #0d0d0d;        /* app background */
    --paper-warm: #1a1a1a;   /* raised surfaces / steppers */
    --card: #161616;         /* card background */
    --line: #2a2a2a;         /* borders */
    --gold: #e3a797;         /* accent (Mizufox rose gold) */
    --gold-deep: #e3a797;    /* accent text */
    --modal-accent: #e3a797; /* pop-up accent — follows the active tab */
    --sage: #4a9e6e;         /* approve green */
    --sage-soft: #0e2419;    /* sage tint surface */
    --clay: #d06b54;         /* low-stock / reject */
    --clay-soft: #2e1410;    /* clay tint surface */
    --shadow: 0 1px 3px rgba(0,0,0,.6), 0 10px 30px rgba(0,0,0,.5);
  }
  /* ── Light theme: Cool slate (accents stay teal/violet) ── */
  html[data-theme="light"] {
    --ink: #1a1d21;          /* primary text */
    --ink-soft: #667085;     /* muted text */
    --paper: #eef1f4;        /* app background */
    --paper-warm: #e3e7ec;   /* raised surfaces / steppers / strips */
    --card: #ffffff;         /* card background */
    --line: #dde2e8;         /* borders */
    --sage: #2f9e63;         /* approve green */
    --sage-soft: #e6f4ec;    /* sage tint surface */
    --clay: #c0563f;         /* low-stock / reject */
    --clay-soft: #f6e8e3;    /* clay tint surface */
    --shadow: 0 1px 2px rgba(20,28,40,.06), 0 8px 24px rgba(20,28,40,.10);
  }
  /* White owl logo -> dark in light mode (tile avatars on teal stay untouched) */
  html[data-theme="light"] .brand .owl { filter: invert(1) brightness(.85); }
  /* Native form popups (select dropdowns, date pickers, scrollbars) follow the app theme —
     without this the browser paints them WHITE on the dark theme (Zai hit it in the
     appointment status dropdown on desktop, 2026-07-15). */
  :root { color-scheme: dark; }
  html[data-theme="light"] { color-scheme: light; }
  /* Date/time fields: whole field is clickable (JS opens the picker) and the little
     calendar/clock glyph is recolored TEAL so it's actually visible on both themes
     (brightness(0) forces it black first, then the filter chain lands on ~#e3a797). */
  input[type="date"], input[type="time"], input[type="month"] { cursor: pointer; }
  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="time"]::-webkit-calendar-picker-indicator,
  input[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer; opacity: 1;
    filter: brightness(0) saturate(100%) invert(72%) sepia(32%) saturate(668%) hue-rotate(127deg) brightness(89%) contrast(85%);
  }
  /* Don't highlight the month/day segment inside the field when the picker opens —
     it looked like a random selection (Zai 2026-07-15). */
  input[type="date"]::-webkit-datetime-edit-month-field:focus,
  input[type="date"]::-webkit-datetime-edit-day-field:focus,
  input[type="date"]::-webkit-datetime-edit-year-field:focus,
  input[type="time"]::-webkit-datetime-edit-hour-field:focus,
  input[type="time"]::-webkit-datetime-edit-minute-field:focus,
  input[type="time"]::-webkit-datetime-edit-ampm-field:focus { background: transparent; color: inherit; }
  /* ── Support inbox palette — flips with light/dark ── */
  :root{
    /* Dark = neutral, matches the app's dark theme (no navy tint) */
    --sup-card:var(--card); --sup-inset:var(--paper); --sup-hover:#1e1e1e; --sup-active:#242424;
    --sup-raise:#2b2b2b; --sup-line:var(--line); --sup-line2:#343434; --sup-hair:#212121;
    --sup-text:var(--ink); --sup-muted:var(--ink-soft); --sup-dim:#6a6a6a;
    --sup-accent-tx:#c8f0ec; --sup-accent-soft:#7fd0c9; --sup-av-tx:#e6e6e6;
  }
  html[data-theme="light"]{
    --sup-card:#ffffff; --sup-inset:#f4f6f9; --sup-hover:#eef2f6; --sup-active:#e8f1fb;
    --sup-raise:#e6ebf1; --sup-line:#dde2e8; --sup-line2:#d3dae3; --sup-hair:#e8ebef;
    --sup-text:#1a1d21; --sup-muted:#667085; --sup-dim:#8a94a3;
    --sup-accent-tx:#0d6b64; --sup-accent-soft:#2e8f89; --sup-av-tx:#274b73;
  }
  /* Appearance toggle in Settings */
  .theme-toggle { display: flex; gap: 8px; margin: 2px 0 14px; }
  .theme-toggle button {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-warm);
    color: var(--ink-soft); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s;
  }
  .theme-toggle button i { font-size: 17px; }
  .theme-toggle button.active { color: var(--gold); border-color: var(--gold); background: rgba(227,167,151,0.10); }
  /* Floating pill bottom nav (beta — Settings → Navigation). Mobile only; desktop keeps the rail. */
  .pill-nav {
    /* Own compositing layer (translate3d + will-change): iOS Safari sometimes left the bar painted
       part-way up the screen after the page grew/shrank under it — e.g. opening a Payroll period
       (Zai 2026-09-28). The standard fix for stale fixed-position paints on WebKit. */
    display: none; position: fixed; left: 50%; transform: translate3d(-50%, 0, 0); will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden;
    /* Zai 2026-07-25: sit higher off the bottom, matching Dalia's app. Measured from his
       screenshots, AZNA's bar was 14px up and Dalia's ~42px — this app's safe-area inset
       resolves to 0, so the floor is what actually does the work; the calc keeps it clear
       of the home indicator on any device that DOES report an inset. */
    bottom: max(42px, calc(14px + env(safe-area-inset-bottom, 0px))); z-index: 60;
    align-items: center; gap: 2px; max-width: calc(100vw - 20px);
    background: color-mix(in srgb, var(--card) 97%, transparent);
    border: 1px solid var(--line); border-radius: 999px; padding: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
  }
  .pill-nav button {
    flex: 0 0 auto; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: none; background: transparent; color: var(--ink-soft);
    font-size: 20px; cursor: pointer; transition: background .15s, color .15s, transform .1s;
    position: relative; /* anchors the bell's unread badge */
  }
  .pill-nav button:active { transform: scale(.9); }
  .pill-nav button.active { background: rgba(227,167,151,0.17); color: #e3a797; }
  /* Team members have far fewer icons (3-4), so give them bigger, roomier targets */
  .pill-nav.roomy { gap: 12px; padding: 7px 10px; }
  .pill-nav.roomy button { width: 52px; height: 48px; font-size: 23px; }
  /* …unless the bell + gear push the count to 6 (techs) — tighten so it fits small phones */
  .pill-nav.roomy.dense { gap: 6px; }
  .pill-nav.roomy.dense button { width: 46px; height: 46px; font-size: 21px; }
  .pill-nav .rail-badge { top: 1px; right: 1px; }
  /* Bethesda has its own booking chrome — the pill never shows there, whatever the pref says */
  body.bethesda-mode .pill-nav { display: none !important; }
  /* The bar is position:fixed, so iOS keeps it pinned to the layout viewport while the
     keyboard is up — it sat straight on top of the Support reply he was typing (Zai
     2026-08-01). Step out of the way while any text field has focus; it comes back the
     moment the keyboard does. Structural, not viewport math — see the sheet rule above. */
  body.kb-open .pill-nav { display: none !important; }
  /* The bottom bar is now the nav for EVERYONE (Zai 2026-07-25) — no Classic option, so the
     Navigation picker is gone from Settings for all roles, not just the manager. */
  @media (max-width: 999px) {
    body.pill-nav-on .sectionbar { display: none; }
    body.pill-nav-on .pill-nav { display: inline-flex; }
    body.pill-nav-on #app { padding-bottom: max(100px, calc(72px + env(safe-area-inset-bottom, 0px))); }
  }
  /* ── Team mobile (Zai 2026-07-25): techs/stylists lose the whole top header (owl included)
     so their screen starts at the nav bar. The Updates bell + settings gear move onto the
     bar's ends — pinned (sticky) so they stay put if the pill row ever scrolls. In
     bottom-bar mode the bell + gear join the pill bar ends instead (see renderPillNav). ── */
  @media (max-width: 999px) {
    body.tnav .sectionbar #secbtnNoti { order: -1; left: 0; margin-right: auto; }
    body.tnav .sectionbar #secbtnGearBar {
      order: 99; right: 0; margin-left: auto; padding: 8px 6px 8px 10px;
      background: linear-gradient(to left, var(--paper) 72%, transparent);
    }
    body.tnav .sectionbar #secbtnNoti .rail-badge { left: auto; right: 2px; top: 0; }
    /* Stylist pills stretch to fill the space between bell and gear — fits every phone width */
    body.tnav .sectionbar.is-stylist #secbtnHome { flex: 1 1 auto; min-width: 0; padding-left: 8px; padding-right: 8px; }
    /* Stylist Home (Zai 2026-07-25): the day's content sits centered in the screen; the auto
       margins collapse to zero once the booking list outgrows the viewport, so a busy day
       flows from the top and scrolls like normal */
    /* Announcements view centers the same way (Zai 2026-07-25): auto margins collapse
       to zero once the feed fills the screen, then it top-flows and scrolls */
  }
  /* ── Manager mobile (Zai 2026-07-19): drop the top header, slide the full desktop menu
     in from the left as a drawer; the bottom bar keeps its section icons + a hamburger ── */
  @media (max-width: 999px) {
    body.mnav .topbar { display: none; }
    /* Sub-tab rows live in the drawer (Zai 2026-07-19/20) — EXCEPT Stock's, which he wants
       in both places: switching Value/Products/Back Bar is frequent enough that opening the
       drawer for it is a chore (Zai 2026-07-28). The `.sectionbar.is-manager.in-stock ~`
       rule below still decides when it actually shows. */
    body.mnav .pill-nav { display: inline-flex; }         /* bottom bar always present for the manager */
    body.mnav #app { padding-bottom: max(100px, calc(72px + env(safe-area-inset-bottom, 0px))); }
    .nav-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 94; opacity: 0; pointer-events: none; transition: opacity .26s; }
    body.mnav.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
    /* sectionbar → off-canvas left drawer (id beats pill-nav-on's .sectionbar display:none) */
    body.mnav #sectionbar {
      display: flex !important; position: fixed; top: 0; left: 0; bottom: 0;
      width: 250px; max-width: 84vw; height: 100dvh; z-index: 95;
      flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px;
      padding: 18px 12px calc(18px + env(safe-area-inset-bottom, 0px));
      background: var(--card); border-right: 1px solid var(--line); border-bottom: none;
      overflow-y: auto; overflow-x: hidden;
      transform: translateX(-100%); transition: transform .26s ease;
    }
    body.mnav.nav-open #sectionbar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.6); }
    body.mnav #sectionbar .secbtn { flex: 0 0 auto; width: 100%; justify-content: flex-start; gap: 12px; padding: 11px 13px; border-radius: 12px; border-color: transparent; background: transparent; font-size: 14px; }
    body.mnav #sectionbar .secbtn i { font-size: 20px; width: 24px; text-align: center; flex: 0 0 auto; }
    body.mnav #sectionbar .rail-label { display: inline; }
    body.mnav #sectionbar .rail-caret { display: inline-block; margin-left: auto; font-size: 15px; width: auto; transition: transform .18s; }
    body.mnav #sectionbar .secbtn.active { background: rgba(227,167,151,0.12); border-color: #e3a797; }
    body.mnav #sectionbar #secbtnData { display: none !important; }         /* redundant — Stock → Value covers it */
    /* Owl logo seated at the top of the drawer, exactly like the desktop rail */
    body.mnav #sectionbar .brand {
      position: static; order: -2; flex: 0 0 auto; width: 100%; box-sizing: border-box;
      display: flex; flex-direction: row; justify-content: center; align-items: center;
      padding: 0 0 8px; margin: 0; background: none; border: none; transform: none; pointer-events: none;
    }
    body.mnav #sectionbar .brand .owl { height: 60px; filter: brightness(0) invert(0.188); pointer-events: auto; cursor: pointer; }
    /* NOTI / Mail / To-Do / Roadmap: compact icon-only row under the logo (desktop recipe) */
    body.mnav #sectionbar .rail-quick {
      display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 4px;
      order: -1; width: 100%; box-sizing: border-box;
      padding: 2px 6px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
    }
    body.mnav #sectionbar .rail-quick .secbtn { display: flex; flex: 0 0 auto; width: auto; padding: 9px; gap: 0; justify-content: center; border-radius: 10px; position: relative; }
    body.mnav #sectionbar .rail-quick .rail-label, body.mnav #sectionbar .rail-quick .rail-caret { display: none; }
    body.mnav #sectionbar .rail-quick .secbtn i { font-size: 20px; }
    body.mnav #sectionbar .rail-quick .rail-badge { left: auto !important; right: 3px; top: 1px; }
    body.mnav #sectionbar #secbtnApprove { display: flex !important; }      /* NOTI bell (desktop-rail only otherwise) */
    body.mnav #sectionbar .rail-subitem { padding-left: 28px; font-size: 13px; }
    /* logo + nav centred vertically between top and footer, like the desktop rail */
    body.mnav.nav-open #sectionbar { justify-content: center; padding-bottom: 58px; }
    /* expandable groups (tap header to open, like desktop) */
    
    body.mnav #sectionbar.stock-open .stock-sub,
    body.mnav #sectionbar.mrkt-open .mrkt-sub { display: flex; }
    body.mnav #sectionbar.team-open #secbtnTeam .rail-caret,
    body.mnav #sectionbar.stock-open #secbtnStock .rail-caret,
    body.mnav #sectionbar.mrkt-open #secbtnTraffic .rail-caret,
    body.mnav #sectionbar.booking-open #secbtnBookings .rail-caret { transform: rotate(180deg); }
    body.mnav #sectionbar.team-open #secbtnTeam,
    body.mnav #sectionbar.stock-open #secbtnStock,
    body.mnav #sectionbar.mrkt-open #secbtnTraffic,
    body.mnav #sectionbar.booking-open #secbtnBookings { background: rgba(227,167,151,0.14); border-color: #e3a797; color: #e3a797; }
    /* order matches the desktop rail: owl · quick row · Bookings · Support · MRKT · Sales · Stock · Team */
    body.mnav #sectionbar #secbtnBookings { order: 3; }
    body.mnav #sectionbar #secbtnTraffic, body.mnav #sectionbar .mrkt-sub { order: 4; }
    body.mnav #sectionbar #secbtnSales { order: 5; }
    body.mnav #sectionbar #secbtnFinance { order: 5; }  /* rides right after Sales */
    body.mnav #sectionbar #secbtnStock, body.mnav #sectionbar .stock-sub { order: 6; }
    body.mnav #sectionbar #secbtnTeam { order: 7; }
    /* Footer bar pinned to the drawer's bottom edge, desktop-rail style (the drawer's
       transform contains position:fixed, so this rides along with the slide) */
    body.mnav #sectionbar .rail-foot {
      display: flex; position: fixed; bottom: 0; left: 0; width: 250px; max-width: 84vw; box-sizing: border-box;
      align-items: center; justify-content: space-between; gap: 8px;
      padding: 9px 18px calc(9px + env(safe-area-inset-bottom, 0px)); background: var(--card);
      border-top: 1px solid var(--line);
    }
    body.mnav #sectionbar .rail-foot-btn {
      flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
      width: 40px; height: 40px; border-radius: 10px; background: none; border: none;
      color: var(--ink-soft); cursor: pointer;
    }
    body.mnav #sectionbar .rail-foot-btn i { font-size: 21px; }
    body.mnav #sectionbar #railCollapse { display: none; }  /* collapse has no meaning in a drawer */
    /* Bethesda-style staggered burger in the bottom bar (svg inherits currentColor) */
    .pill-ham svg { display: block; }
  }
  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  /* Cera variant where lining digits are the default — used for chart canvas (which can't do font-variant-numeric) */
  /* Numbers are ALWAYS cap-height ("all caps") everywhere (Zai 2026-09-28). Cera's default digits are old-style
     (lowercase-looking), and any rule setting only `tabular-nums` fell back to them — the feature flag holds
     regardless. Canvas charts can't read this, which is what CeraChart below is for. */
  *, *::before, *::after { font-feature-settings: "lnum" 1 !important; }
  html, body { height: 100%; background: var(--paper); } /* html bg too, or the Android nav-bar/overscroll area shows white */
  /* The page never scrolls sideways — any stray wide element clips instead of letting
     iOS pan the whole site (Zai's To-Do "second pull drags everything" bug, 2026-07-18) */
  html, body { overflow-x: clip; }
  body {
    font-family: 'Cera', ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--paper);
    color: var(--ink);
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: lining-nums; /* uniform cap-height numbers, not old-style */
  }
  button, input, textarea, select { font-family: inherit; font-variant-numeric: inherit; }
  #app { max-width: 480px; margin: 0 auto; min-height: 100%; background: var(--paper); position: relative; display: flex; flex-direction: column; }
  /* Keep the app laid out (just invisible) when "hidden" so the fixed desktop rail
     paints correctly when revealed — avoids the display:none reveal paint glitch. */
  #app.hidden { display: flex !important; visibility: hidden; }

  /* ---------- Header ---------- */
  .topbar {
    padding: 28px 14px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    position: sticky; top: 0; z-index: 20;
    gap: 8px;
  }
  .brand { display: flex; flex-direction: column; align-items: center; gap: 3px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
  .brand .owl { height: 44px; width: auto; display: block; pointer-events: auto; cursor: pointer; }
  .brand .sub { font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ink-soft); }

  /* ---------- Search ---------- */
  .searchwrap { padding: 8px 14px 4px; }
  .search-field { position: relative; flex: 1; }
  .search {
    width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--card); font-size: 15px; color: var(--ink); outline: none;
  }
  .search-field .search { padding-right: 42px; }
  .search:focus { border-color: var(--gold); }

  /* ---------- Category tabs ---------- */
  /* Arrows show whenever there's more row that way (mouse only — touch just swipes), not
     only on hover: the last chips sat off-screen with no hint (Zai 2026-09-23). */
  .cats { display: flex; gap: 8px; padding: 6px 14px 4px; overflow-x: auto; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }

  /* ---------- List ---------- */
  .list { flex: 1; padding: 10px 16px 40px; }
  /* Row = what you touch every day on top, everything else on a bar underneath, with the
     rest behind the pencil (Zai's mockup 2026-07-29) */
  .item {
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 0; position: relative;
  }
  /* Edit / photo / cost-history are icon buttons, not labelled controls */   /* superseded by the icon bar */

  /* Inventory cards: SKU beside photo; counting column centered across both rows. */
  /* Stock item sheet */
  /* Retired shelf toggle on the Products list */
  /* Already counted today — so a count picks up where it left off (Zai 2026-09-23). */
  .item .info { flex: 1; min-width: 0; }
  .item .name { font-size: 15px; font-weight: 600; color: var(--ink); }
  .item .meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
  .item .meta .low { color: var(--clay); font-weight: 600; }

  /* product thumbnail */
  .thumb {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px;
    display: grid; place-items: center; cursor: pointer; user-select: none;
    font-weight: 700; font-size: 16px; color: #fff; letter-spacing: .5px;
    border: 1px solid rgba(255,255,255,.08);
    transition: width .25s ease, height .25s ease, font-size .25s ease, border-radius .25s ease;
    overflow: hidden; position: relative;
  }
  .thumb img { display: none; } /* hidden — image loaded via background-image instead */
  /* The shelf code sits ON TOP of the stepper rather than in its own left-hand column
     (Zai 2026-07-28) — that column cost ~52px of width on every row for one short code. */
  .thumb .hint {
    position: absolute; bottom: 4px; right: 5px; font-size: 9px; font-weight: 600;
    color: rgba(255,255,255,.85); background: rgba(0,0,0,.35); padding: 1px 5px; border-radius: 6px;
    opacity: 0; transition: opacity .2s;
  }

  /* ---------- Approval view ---------- */
  .empty {
    text-align: center; padding: 70px 30px; color: var(--ink-soft);
  }
  .empty .small { font-size: 14px; line-height: 1.5; }
  /* Compact empty state inside the Notifications view so Recent activity sits close */

  /* ---------- Top nav (inside header) ---------- */
  .tab {
    background: none; border: none; cursor: pointer; padding: 6px 10px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--ink-soft); position: relative; border-radius: 10px;
  }
  .tab.active { color: var(--ink); background: var(--paper-warm); }
  .tab svg { width: 20px; height: 20px; }
  .tab .lbl { font-size: 10px; font-weight: 600; letter-spacing: .3px; } /* icon-only in the top bar */
  .tab .badge {
    position: absolute; top: 2px; right: 4px;
    background: var(--clay); color: #fff;
    font-size: 9px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 9px;
    display: grid; place-items: center; padding: 0 3px;
  }

  /* ---------- Section nav (Products / Back Bar / Stylist Back Bar) ---------- */
  .sectionbar {
    display: flex; gap: 10px; padding: 10px 14px 6px; justify-content: safe center;
    background: var(--paper); overflow-x: auto; scrollbar-width: none;
  }
  .sectionbar::-webkit-scrollbar { display: none; }
  /* Every site menu (rail + mobile bar + submenus + gear/collapse) reads in ALL CAPS */
  .secbtn, .rail-gear, .rail-collapse, .rail-subitem { text-transform: uppercase; letter-spacing: .04em; }
  .secbtn {
    position: relative; /* anchor .rail-badge (e.g. Support unread) to the icon, not the screen corner */
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--card); color: var(--ink-soft); cursor: pointer;
    font-size: 12px; font-weight: 600; white-space: nowrap; transition: all .18s;
  }
  /* Section items are real links (href="#section") so they can be middle-clicked or opened
     in a new tab from the context menu (Zai 2026-08-07) — they just mustn't look like it. */
  a.secbtn { text-decoration: none; }
  .secbtn i { font-size: 16px; }
  .secbtn-icon { flex: 0 0 auto; padding: 10px 14px; }
  .secbtn-icon i { font-size: 18px; }
  .secbtn.active { color: #e3a797; border-color: #e3a797; background: rgba(227,167,151,0.08); }
  .secbtn.active i { color: #e3a797; }
  /* Rail labels / submenu only render on the desktop sidebar */
  .rail-label, .rail-caret, .rail-subitem, .stock-group { display: none; }
  /* Stylists get labeled Home/Calendar/Stats/Payroll pills */
  .sectionbar.is-stylist #secbtnHome .rail-label, .sty-nav .rail-label { display: inline; }
  .tech-nav .rail-label { display: inline; }
  /* Stock grouping applies to the manager on BOTH mobile and desktop */
  .sectionbar.is-manager .stock-group { display: flex; }
  .sectionbar.is-manager .mrkt-group { display: flex; }
  .sectionbar.is-manager #secbtnData { display: none; }
  /* Mobile: Stock opens a dropdown row beneath the bar (desktop uses the sidebar submenu) */

  /* Mobile: Bookings opens a sub-tab row beneath the bar (desktop uses the sidebar submenu) */
  /* Mobile: Home opens a sub-tab row (Mail / To-Do / Roadmap) beneath the bar */
  /* Sub-nav pill rows read in ALL CAPS (matches stylist names / column heads) */

  /* Rail-only Approvals button (shown on desktop for managers) */
  #secbtnApprove { display: none; position: relative; }
  /* Manager mobile: the notifications bell sits first in the section nav (replaces Home) */
  #secbtnApprove.nav-notify { display: flex; order: -1; }
  .rail-badge {
    position: absolute; top: 2px; right: 6px; background: var(--clay); color: #fff;
    font-size: 9px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 9px;
    display: grid; place-items: center; padding: 0 3px; border: 2px solid var(--paper);
  }
  /* Zai 2026-08-11: no unread counter on the Mail icon (the count logic still
     runs — delete this rule to bring the bubble back). */
  #railMailBadge { display: none !important; }
  /* Desktop expanded rail: pin the badge to the icon's top-right (like collapsed), not the far end of the wide row. */
  @media (min-width: 1000px) {
    body:not(.rail-collapsed) .sectionbar .rail-badge { left: 25px; right: auto; top: 1px; }
  }

  /* Bethesda front-desk mode: full-bleed booking view — no rail/sectionbar, no topbar,
     on EVERY screen size (mobile too, Zai 2026-07-16). The booking toolbar (☰ / day / + /
     date / power) is the only chrome. */

  /* ---------- Desktop: left icon rail (mobile/tablet unchanged) ---------- */
  @media (min-width: 1000px) {
    #secbtnApprove.show-rail-approve { display: flex; }
    .sectionbar {
      position: fixed; left: 0; top: 0; bottom: 0; width: 212px; height: 100vh;
      flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px;
      padding: 16px 12px; border-right: 1px solid var(--line); border-bottom: none;
      background: var(--card); z-index: 40; overflow-y: auto; overflow-x: hidden;
      transform: translateZ(0); /* own GPU layer — paints immediately, avoids fixed-reveal glitch */
    }
    .sectionbar .secbtn {
      flex: 0 0 auto; width: 100%; font-size: 14px; font-weight: 600; gap: 12px; padding: 11px 13px;
      justify-content: flex-start; border-radius: 12px; border-color: transparent; background: transparent;
    }
    .sectionbar .secbtn i { font-size: 20px; width: 24px; text-align: center; flex: 0 0 auto; }
    .sectionbar .rail-label { display: inline; }
    .sectionbar .rail-caret { display: inline-block; margin-left: auto; font-size: 15px; width: auto; transition: transform .18s; }
    .sectionbar.team-open #secbtnTeam .rail-caret { transform: rotate(180deg); }
    .sectionbar.stock-open #secbtnStock .rail-caret { transform: rotate(180deg); }
    /* Expanded group header gets the full active look (tint + border + accent text) */
    .sectionbar.team-open #secbtnTeam, .sectionbar.team-open #secbtnTeam i { color: #e3a797; }
    .sectionbar.team-open #secbtnTeam { background: rgba(227,167,151,0.14); border-color: #e3a797; }
    .sectionbar.stock-open #secbtnStock, .sectionbar.stock-open #secbtnStock i { color: #e3a797; }
    .sectionbar.stock-open #secbtnStock { background: rgba(227,167,151,0.14); border-color: #e3a797; }
    .sectionbar #secbtnStock.active { background: rgba(227,167,151,0.14); border-color: #e3a797; }
    .sectionbar.is-manager .stock-sub.active { background: rgba(227,167,151,0.14); border-color: #e3a797; color: #e3a797; }
    .sectionbar.is-manager .stock-sub.active i { color: #e3a797; }
    .sectionbar.is-manager.stock-open .stock-sub { display: flex; }
    /* MRKT group: Stats / E-Mail / SEO / Google Ads / Facebook Ads (Zai 2026-07-24) */
    .sectionbar.mrkt-open #secbtnTraffic, .sectionbar.mrkt-open #secbtnTraffic i { color: #e3a797; }
    .sectionbar.mrkt-open #secbtnTraffic { background: rgba(227,167,151,0.14); border-color: #e3a797; }
    .sectionbar #secbtnTraffic.active { background: rgba(227,167,151,0.14); border-color: #e3a797; }
    .sectionbar.is-manager .mrkt-sub.active { background: rgba(227,167,151,0.14); border-color: #e3a797; color: #e3a797; }
    .sectionbar.is-manager .mrkt-sub.active i { color: #e3a797; }
    .sectionbar.is-manager.mrkt-open .mrkt-sub { display: flex; }
    /* Bookings group: expands to Calendar/Services/Customers (monochrome accent, matches the existing Bookings theme) */
    .sectionbar.booking-open #secbtnBookings .rail-caret { transform: rotate(180deg); }
    .sectionbar.booking-open #secbtnBookings, .sectionbar.booking-open #secbtnBookings i { color: #e3a797; }
    .sectionbar.booking-open #secbtnBookings { background: rgba(227,167,151,0.12); border-color: #e3a797; }
    /* Home pills (manager): Mail / To-Do / Roadmap always visible at the top of the
       rail; the owl logo is the Home button (no Home item in the manager rail). */
    .sectionbar.is-manager #secbtnHome.hidden { display: none !important; } /* beat the desktop "always show Home" rule */
    #secbtnHome .rail-caret { display: none; }
    .sectionbar.is-manager .home-sub { display: flex; padding-left: 13px; font-size: 14px; }
    .sectionbar.is-manager .home-sub i { font-size: 20px; }
    .sectionbar.is-manager .home-sub[data-sec="mail"] { margin-top: auto; } /* takes over Home's rail-centering anchor */
    .sectionbar .home-sub { order: 1; } /* desktop uses the sidebar submenu */
    .sectionbar .rail-subitem { padding-left: 30px; font-size: 13px; }
    .sectionbar .rail-subitem i { font-size: 17px; }
    .sectionbar .secbtn:hover { background: var(--paper-warm); }
    .sectionbar .secbtn.active { background: rgba(227,167,151,0.12); border-color: #e3a797; }
    /* Desktop rail order: Home → Approvals → Team(+submenu) → Traffic/Sales → Stock(+submenu) */
    /* One clean split: auto space above the nav (centers it) and auto space above
       the footer (pins avatar/name/gear/collapse to the bottom). Only these two
       anchors — no competing ones — so nothing bunches when the rail collapses. */
    .sectionbar #secbtnHome { order: 1; margin-top: auto; }
    /* Home stays in the desktop rail (it's only hidden on mobile, where the logo goes Home).
       !important is needed to beat the global `.hidden { display:none !important }`. */
    .sectionbar #secbtnHome.hidden { display: flex !important; }
    /* Bethesda front-desk has no Home — override the desktop "always show Home" rule. */
    .sectionbar.is-bethesda #secbtnHome.hidden { display: none !important; }
    /* Stylist rail: Home / Calendar / Payroll group together after Home (which
       carries the centering margin-top:auto). Without explicit order they'd
       default to 0 and float above Home, breaking the layout. */
    .sectionbar.is-stylist #secbtnStyCalendar { order: 2; }
    .sectionbar.is-stylist #secbtnStyStats { order: 3; }    /* Stats sits before Payroll (Zai 2026-07-25) */
    .sectionbar.is-stylist #secbtnStyPayroll { order: 4; }
    .sectionbar #secbtnApprove { order: -1; }   /* NOTI sits first in the rail */
    /* Desktop rail order matches the mobile bar: Support → Traffic → Sales → Stock → Bookings → Team
       (Support's order is the global rule below, set to 3). */
    .sectionbar #secbtnBookings { order: 4; }   /* Support (3) now leads Bookings (Zai 2026-07-24) */ /* sit directly under Bookings */
    .sectionbar #secbtnTraffic { order: 5; }
    .sectionbar .mrkt-sub { order: 5; }   /* sit directly under MRKT */
    .sectionbar #secbtnSales { order: 6; }
    .sectionbar #secbtnFinance { order: 6; }  /* rides right after Sales */
    .sectionbar #secbtnStock { order: 7; }
    .sectionbar [data-sec="data"] { order: 8; }  /* same order as Value; DOM puts it right after (Zai 2026-09-02) */
    .sectionbar [data-sec="products"] { order: 9; }   /* DOM puts it right after Stylist Back Bar */
    .sectionbar #secbtnTeam { order: 12; }
    /* Up/down scroll arrows that appear when the rail overflows */
    .sectionbar.scrollable .rail-arrow { display: flex; }
    .rail-arrow {
      display: none; position: fixed; left: 0; width: 212px; height: 30px;
      align-items: center; justify-content: center; border: none; cursor: pointer;
      background: var(--card); color: var(--ink); font-size: 18px; z-index: 41;
    }
    .rail-arrow.up { top: 0; box-shadow: 0 8px 10px -5px rgba(0,0,0,.55); }
    .rail-arrow.down { bottom: 0; box-shadow: 0 -8px 10px -5px rgba(0,0,0,.55); }
    .rail-arrow.hidden { display: none !important; }
    /* Full-width app right of the rail; sync strip spans edge-to-edge (Last Update hugs far right) */
    #app { max-width: none; margin-left: 212px; margin-right: 0; }
    /* …but center the actual content block at a comfortable max width in the space RIGHT of the rail,
       so it moves over as the menu opens and closes — AZNA's 2026-10-08 fix, brought across (Zai
       2026-10-15: "it isn't really centered with the menu bar popped open"). It used to sit on the
       screen's center, half a rail width left of the page's middle. */
    #app > *:not(#syncStrip):not(#sectionbar):not(.topbar):not(#bookingsSection):not(#planogramSection) {
      max-width: 960px; width: 100%; margin-left: auto; margin-right: auto;
    }
    /* Topbar stays full width so its divider reaches both edges; min-height holds the owl */
    .topbar { min-height: 66px; }
    /* Logout owl circle pinned to the bottom of the rail */
    .sectionbar .rail-user { display: flex; order: 99; margin-top: auto; flex: 0 0 auto; align-items: center; justify-content: center;
      width: 100%; padding: 10px 0; background: none; border: none; cursor: pointer; }
    .rail-user-av { width: 42px; height: 42px; border-radius: 50%; background: #262626; overflow: hidden;
      display: flex; align-items: center; justify-content: center; transition: box-shadow .15s; }
    .rail-user:hover .rail-user-av { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px #676767; }
    .rail-user-av img { width: 60%; height: 60%; object-fit: contain; }
    /* Role label + collapse toggle pinned to the bottom of the rail */
    .sectionbar .rail-role { display: block; order: 100; flex: 0 0 auto; text-align: center; font-size: 11px;
      color: var(--ink-soft); padding: 0 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      text-transform: uppercase; letter-spacing: .06em; }
    .sectionbar .rail-collapse { display: flex; order: 102; flex: 0 0 auto; align-items: center; justify-content: center; gap: 12px; width: 100%;
      padding: 11px 13px; background: none; border: none; color: var(--ink-soft); cursor: pointer;
      font-size: 13px; font-weight: 600; border-radius: 12px; }
    .sectionbar .rail-collapse:hover { background: var(--paper-warm); }
    .sectionbar .rail-collapse i { font-size: 20px; width: 24px; text-align: center; flex: 0 0 auto; transition: transform .18s; }
    /* Collapsed rail = icons only */
    body.rail-collapsed .sectionbar { width: 64px; padding: 16px 8px; }
    body.rail-collapsed .sectionbar .rail-label,
    body.rail-collapsed .sectionbar .rail-caret,
    body.rail-collapsed .sectionbar .rail-role { display: none; }
    body.rail-collapsed .sectionbar .secbtn { justify-content: center; padding: 11px 0; gap: 0; }
    body.rail-collapsed .sectionbar .rail-collapse { justify-content: center; } /* center the chevron in the narrow rail */
    body.rail-collapsed .sectionbar .rail-subitem { padding-left: 0; }
    body.rail-collapsed .sectionbar .rail-collapse { justify-content: center; padding: 11px 0; }
    body.rail-collapsed .sectionbar .rail-collapse i { transform: rotate(180deg); }
    body.rail-collapsed #app { margin-left: 64px; }
    body.rail-collapsed .rail-arrow { width: 64px; }

    /* --- Zai's desktop layout: the owl logo (Home button) is seated INSIDE the rail flow
       (moved there by JS) as the first item, so it centres together with Mail→Team and sits
       right above Mail. No "Connected" strip — offline now surfaces on the bell. --- */
    .topbar { position: relative; min-height: 18px; padding: 0; border-bottom: none; background: transparent; }
    .sectionbar .brand {
      position: static; order: -2; flex: 0 0 auto; width: 100%; box-sizing: border-box;
      flex-direction: row; justify-content: center; align-items: center;
      padding: 0 0 16px; margin: -12px 0 0; background: none; border: none; transform: none; pointer-events: none;   /* owl rides a bit higher (Zai 2026-07-23) */
    }
    .sectionbar .brand .owl { height: 60px; filter: brightness(0) invert(0.188); }   /* recolour the white owl to #303030 */
    .sectionbar { padding-top: 16px; padding-bottom: 58px; }
    /* Centre the logo + nav (Mail→Team) vertically between the top and the footer — center king. */
    .sectionbar.is-manager { justify-content: center; }
    .sectionbar.is-manager .home-sub[data-sec="mail"] { margin-top: 0; }
    /* Same for a stylist's four items (Zai 2026-08-02: "the teams page on desktop is messed
       up"). #secbtnHome carries a margin-top:auto meant to be balanced by .rail-user below
       it — but that owl button is display:none now and the footer row is position:fixed, so
       nothing was left in flow to take the other half. All the slack went above Home and the
       nav sat on the floor, with Payroll tucked under the fixed footer. Centre the column
       and drop the anchor, exactly as the manager rail already does. Techs land on the same
       rail, so this covers every non-manager rail rather than the stylists' alone. */
    .sectionbar:not(.is-manager):not(.is-bethesda) { justify-content: center; }
    .sectionbar:not(.is-manager):not(.is-bethesda) #secbtnHome { margin-top: 0; }
    /* Collapsed rail (64px): smaller centred logo. */
    body.rail-collapsed .sectionbar .brand .owl { height: 38px; }
    body.rail-collapsed .sectionbar { padding-bottom: 128px; }

    /* --- NOTI / Mail / To-Do / Roadmap: a compact icon-only row right under the logo --- */
    .sectionbar .rail-quick {
      display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 4px;
      order: -1; width: 100%; box-sizing: border-box;
      padding: 2px 6px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
    }
    .sectionbar .rail-quick .secbtn {
      flex: 0 0 auto; width: auto; padding: 9px; gap: 0; justify-content: center; border-radius: 10px; position: relative;
    }
    .sectionbar .rail-quick .rail-label, .sectionbar .rail-quick .rail-caret { display: none; }
    .sectionbar .rail-quick .secbtn i { font-size: 20px; }
    .sectionbar .rail-quick .rail-badge { left: auto !important; right: 3px; top: 1px; }
    body.rail-collapsed .sectionbar .rail-quick { flex-direction: column; gap: 4px; border-bottom: none; padding-bottom: 6px; }

    /* --- Bottom footer: three icon buttons — Sign out (left) · Settings (centre) · Collapse (right) --- */
    .sectionbar .rail-foot {
      display: flex; position: fixed; bottom: 0; left: 0; width: 212px; box-sizing: border-box;
      align-items: center; justify-content: space-between; gap: 8px;
      padding: 9px 18px; background: var(--card); border-right: 1px solid var(--line);
      border-top: 1px solid var(--line); z-index: 41;
    }
    .sectionbar .rail-foot-btn {
      flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
      width: 40px; height: 40px; border-radius: 10px; background: none; border: none;
      color: var(--ink-soft); cursor: pointer; transition: background .15s, color .15s;
    }
    .sectionbar .rail-foot-btn i { font-size: 21px; }
    .sectionbar .rail-foot-btn:hover { background: var(--paper-warm); color: var(--ink); }
    .sectionbar #railUser:hover { color: var(--clay); }   /* power = sign out → red on hover */
    .sectionbar #railGearBtn:hover { color: var(--gold); }
    .sectionbar #railCollapse i { transition: transform .18s; }
    body.rail-collapsed .sectionbar .rail-foot { width: 64px; flex-direction: column; padding: 10px 0; gap: 6px; }
    body.rail-collapsed .sectionbar #railCollapse i { transform: rotate(180deg); }
  }
  /* Tablets ("in-between" sizes): fill the screen instead of a narrow centered column. */
  @media (min-width: 560px) and (max-width: 999px) {
    #app { max-width: none; } /* below the rail breakpoint: fill the width, don't cap at 480 */
  }
  @media (min-width: 1000px) and (max-width: 1600px) {
    /* rail layout on a tablet: the content fills the area beside the rail (drop the 960 cap) */
    #app > *:not(#syncStrip):not(#sectionbar):not(.topbar) { max-width: none; }
  }
  .rail-user { display: none; }
  .rail-role { display: none; }
  .rail-collapse { display: none; }
  .rail-foot { display: none; }                 /* desktop-only footer row (shown in the ≥1000px rail) */
  .rail-quick { display: contents; }            /* mobile: unwrap → NOTI/Mail/To-Do/Roadmap behave as before (desktop makes it an icon row) */                 /* "Connected" strip removed — offline surfaces on the bell */
  /* Offline → red dot on the notifications bell glyph (works in the rail and the mobile bar). */
  #secbtnApprove.has-conn-alert i { position: relative; }
  #secbtnApprove.has-conn-alert i::after {
    content: ''; position: absolute; top: -2px; right: -4px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--clay); box-shadow: 0 0 0 2px var(--card);
  }
  /* Settings gear (topbar on mobile, rail on desktop) */
  .rail-gear { display: none; }
  @media (min-width: 1000px) {
    .sectionbar .rail-gear { display: flex; order: 101; flex: 0 0 auto; align-items: center; justify-content: center; gap: 12px; width: 100%;
      background: none; border: none; color: var(--ink-soft); cursor: pointer; padding: 11px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }
    .sectionbar .rail-gear i { font-size: 20px; width: 24px; text-align: center; flex: 0 0 auto; }
    .sectionbar .rail-gear:hover { background: var(--paper-warm); color: var(--gold); }
    body.rail-collapsed .sectionbar .rail-gear { justify-content: center; padding: 11px 0; }
  }
  .rail-arrow { display: none; }

  /* ---------- Manual section view (Back Bar / Stylist) ---------- */
  .sec-view { flex: 1; display: flex; flex-direction: column; }
  .sec-add-btn {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
    background: #e3a797; color: #fff; border: none; cursor: pointer;
    font-size: 22px; font-weight: 400; line-height: 1; display: flex; align-items: center; justify-content: center;
  }
  /* Eufora color order — the cart beside + on Back Bar, and its sheet (Zai 2026-09-23). */
  .eu-foot .modal-actions button:disabled { opacity: .45; cursor: default; }

  /* ---------- Add-item modal ---------- */
  body.sheet-locked { width: 100%; overflow: hidden; }
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
    overscroll-behavior: contain; touch-action: none;
  }
  .modal {
    background: var(--paper-warm); border-radius: 20px 20px 0 0; padding: 24px 20px 36px;
    width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 14px;
  }
  /* Tall detail sheets (commission/pay drill-down, receipts) scroll INSIDE the sheet.
     Sheets are bottom-anchored, so one taller than the screen ran off the TOP with no way
     to reach it (Zai's iPhone: Jasmin's 40-transaction period, 2026-07-22). Cap the sheet
     and scroll the detail area — the name stays up top, Close stays at the bottom. */
  #stylistOverlay .modal, #receiptOverlay .modal { max-height: calc(100vh - 34px); max-height: calc(100dvh - 34px); }
  /* Reusable bottom-sheet behavior (drag handle + slide-up + drag-to-dismiss) */
  /* Full-width top strip so you can grab-and-drag anywhere across the top, not just the pill */
  /* The pill sits 10px from the sheet's top edge on every sheet (Zai 2026-09-24): the strip
     pulls up over the sheet's top padding (24px on .modal, 18px on .dp-sheet) and the pill
     rides at its top. The strip is still a full-width, 30px-tall grab area. */
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .modal-overlay:not(.hidden) .modal { animation: sheetUp .28s cubic-bezier(.32,.72,0,1); }
  .modal h3 { font-size: 17px; font-weight: 700; margin: 0; }
  /* Booking sheets (#bkModal, .pk-sheet) ride this same sheet system but keep their own
     field styling — the generic full-width input rule would blow up their mini fields. */
  .modal:not(#bkModal):not(.pk-sheet) input:not([type=checkbox]):not([type=radio]):not([type=file]) {
    width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--paper); color: var(--ink); font-size: 15px; outline: none; box-sizing: border-box;
    -webkit-appearance: none; appearance: none;
  }
  .modal:not(#bkModal):not(.pk-sheet) input:not([type=checkbox]):not([type=radio]):not([type=file]):focus { border-color: var(--modal-accent); }
  .modal-actions { display: flex; gap: 10px; }
  .modal-actions button { flex: 1; padding: 13px; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; }
  .modal-cancel { background: var(--card); color: var(--ink-soft); border: 1px solid var(--line) !important; }
  .modal-save { background: var(--modal-accent); color: #fff; }
  .modal-photo-label {
    display: flex; align-items: center; justify-content: center;
    padding: 11px; border-radius: 10px; border: 1px dashed var(--line);
    cursor: pointer; font-size: 14px; color: var(--ink-soft); font-weight: 500;
    transition: border-color .15s, color .15s;
  }
  .modal-photo-label:hover { border-color: var(--modal-accent); color: var(--modal-accent); }
  .modal-photo-label.has-photo { border-color: var(--modal-accent); color: var(--modal-accent); }
  .modal-check {
    display: flex; align-items: center; gap: 9px; cursor: pointer;
    font-size: 14px; color: var(--ink-soft); font-weight: 500; padding: 2px 2px;
  }
  .modal-check input { width: 17px; height: 17px; accent-color: var(--modal-accent); cursor: pointer; }
  .modal-select {
    width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--paper); color: var(--ink); font-size: 15px; outline: none;
    box-sizing: border-box; appearance: none; cursor: pointer;
  }
  .modal-select:focus { border-color: var(--modal-accent); }
  /* Category selects open OUR scrollable sheet, never the native dropdown (which
     collapses on scroll). pointer-events:none means the click can't reach the
     select to open it — the wrapper's click handler opens the sheet instead
     (Zai 2026-08-11). The wrapper stays clickable. */
   #modalCategory { pointer-events: none; }
   #modalCatWrap { cursor: pointer; }
  /* This sheet opens ON TOP of the product sheet that summoned it. Both are
     .modal-overlay (z-index 100) and the product sheet sits LATER in the DOM, so
     at equal z-index it painted over the picker — the list opened behind the
     screen you're on (Zai 2026-08-11). Lift it above its parent sheet. */
  .modal-select.flash-required {
    animation: flashRequired .5s ease;
    border-color: var(--clay);
  }
  @keyframes flashRequired {
    0%, 100% { box-shadow: 0 0 0 0 rgba(208,107,84,0); }
    20% { box-shadow: 0 0 0 3px rgba(208,107,84,.5); transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); box-shadow: 0 0 0 3px rgba(208,107,84,.4); }
    80% { transform: translateX(2px); }
  }

  /* ---------- Toast ---------- */
  /* Drops in at the TOP of the screen (Zai 2026-09-28) — at the bottom it sat under the nav bar and pill rows */
  .toast {
    position: fixed; top: calc(env(safe-area-inset-top, 0px) + 16px); left: 50%; transform: translateX(-50%) translateY(-16px);
    width: max-content; max-width: calc(100vw - 32px); text-align: center;
    background: var(--card); color: var(--ink); padding: 11px 18px; border-radius: 20px; font-size: 13px; font-weight: 600; border: 1px solid var(--line);
    opacity: 0; pointer-events: none; transition: all .25s; z-index: 1000; box-shadow: 0 8px 24px rgba(0,0,0,.35);
    display: flex; align-items: center; gap: 8px;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .toast .tdot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); }
  .toast.good { background: color-mix(in srgb, #46c97e 20%, var(--card)); border-color: color-mix(in srgb, #46c97e 60%, transparent); }
  .toast.good .tdot { background: #46c97e; }
  .toast.bad { background: color-mix(in srgb, #e0605a 22%, var(--card)); border-color: color-mix(in srgb, #e0605a 65%, transparent); }
  .toast.bad .tdot { background: #e0605a; }

  .hidden { display: none !important; }


  /* sync status strip */

  /* Login history page */

  /* Sales */
  /* Home dashboard */
  .home-welcome { font-size: 37px; font-weight: 800; color: var(--ink); padding: 14px 16px 0; letter-spacing: -.3px; text-align: center; transition: opacity .3s; }
  /* PAYROLL page title: spaced caps (Zai 2026-07-25); padding-left offsets the trailing letter-space so it centers optically */
  /* Updates (bell) view header — same spaced-caps treatment as the PAYROLL title (Zai 2026-07-25) */
  .home-welcome-lang { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); padding: 2px 16px 6px; transition: opacity .3s; }
  .say-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
    border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); cursor: pointer;
    font-size: 12px; flex: none; padding: 0; transition: background .15s, color .15s, border-color .15s; }
  .say-btn:hover { border-color: var(--ink-soft); }
  .say-btn.playing { background: #e3a797; color: #292823; border-color: #e3a797; }
  /* Manager home dashboard (Option A) */
  /* Split command center: on phones the zone wrappers dissolve (display:contents) so
     everything stacks like before; on desktop it's money left, operations right. */
  .hd-left, .hd-right { display: contents; }
  @media (min-width: 1000px) {
    .hd-herohead { grid-column: 1 / -1; }
    .hd-left, .hd-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  }
  .hd-hero-label { color: var(--ink-soft); font-size: 12px; letter-spacing: .4px; text-align: center; }
  .hd-hero-row { display: flex; align-items: baseline; justify-content: center; gap: 9px; margin-top: 2px; }
  .hd-hero-big { font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
  .hd-hero-delta { font-size: 13px; font-weight: 700; }
  .hd-hero-delta .up, .hd-k-d .up { color: #46c97e; }
  .hd-hero-delta .down, .hd-k-d .down { color: #e5484d; }
  .hd-k-d .flat, .hd-hero-delta .flat { color: var(--ink-soft); }
  .hd-chart { margin: 4px 0 2px; }
  .hd-ranges { display: flex; gap: 8px; justify-content: center; margin: 16px 0 10px; }
  .hd-ranges button { font-size: 11px; color: var(--ink-soft); padding: 5px 14px; border-radius: 100px; border: 1px solid var(--line); background: none; cursor: pointer; }
  .hd-ranges button.active { color: var(--paper); background: var(--ink); border-color: var(--ink); font-weight: 700; }
  .hd-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hd-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; text-align: center; }
  .hd-k-l { color: var(--ink-soft); font-size: 10px; letter-spacing: .5px; }
  .hd-k-v { color: var(--ink); font-size: 20px; font-weight: 800; margin-top: 1px; }
  .hd-k-d { font-size: 11px; font-weight: 700; margin-top: 1px; min-height: 14px; }
  .hd-status { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; font-size: 12px; color: var(--ink); }
  /* ── Manager home v2 (Zai 2026-07-16): status bar · metric cards · pills · chart · INBOX|TODAY ── */
  /* Same 960px content width as the other sections (MRKT/Sales) so Home scales up on desktop (Zai 2026-07-17) */
  .home-dash2 { flex: 1; width: 100%; display: flex; flex-direction: column; gap: 14px; max-width: 960px; margin: 0 auto; }
  /* Status bar = small uppercase spaced line, no card (Zai's pick D, 2026-07-17) */
  .hd2-statusbar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); padding: 4px 0 2px; }
  .hd2-statusbar .hd-sep { color: var(--line); letter-spacing: 0; }
  .hd2-statusbar .hd2-sb-val { color: var(--ink); font-weight: 700; letter-spacing: .06em; }
  /* "N on shift" is a link to the timeclock (Zai 2026-07-29) */
  .hd2-statusbar .hd2-sb-go { cursor: pointer; transition: color .12s; }
  .hd2-statusbar .hd2-sb-go:hover { color: var(--ink); }
  /* Roadmap progress rides the status line (Zai's pick, 2026-08-06): label · hairline · percent,
     the whole chip opens the Roadmap page — which is why Roadmap came out of the nav rail. */
  .hd2-statusbar .hd2-sb-bar { display: inline-block; width: 46px; height: 3px; margin: 0 7px; vertical-align: middle;
        background: var(--line); border-radius: 2px; overflow: hidden; }
  .hd2-statusbar .hd2-sb-bar i { display: block; height: 100%; background: var(--gold); }
  /* The full line is 453px wide — it fits on one row from ~470px up, and drops the roadmap
     chip onto its own row on a phone. Measured at 402px: without this the "|" before it is
     left stranded at the end of row one, so the separator goes when the row breaks. */
  @media (max-width: 469px) { .hd2-statusbar #hdRoadmapSep { display: none; } }
  .hd2-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
  /* Cards select the chart metric below — .active marks the shown one: label goes
     white + bold only, no box (Zai 2026-07-17) */
  .hd2-card { text-align: center; padding: 6px 2px 7px; cursor: pointer; }
  .hd2-card .hd2-c-l { transition: color .15s; }
  .hd2-card.active .hd2-c-l { color: var(--ink); font-weight: 700; }
  .hd2-c-l { color: var(--ink-soft); font-size: 10px; letter-spacing: .4px; }
  .hd2-c-v { color: var(--ink); font-size: 22px; font-weight: 800; margin-top: 3px; letter-spacing: -.5px; }
  /* Sparkline + the period before it (Zai 2026-08-07). The card now reads top to bottom:
     label · number · the shape of the period · the change · what it was. The graph is drawn
     from a 56×18 viewBox and scaled, so it stays legible at the ~75px a phone column gives. */
  .hd2-c-spark { height: 18px; margin-top: 5px; display: flex; justify-content: center; align-items: center; }
  .hd2-c-spark svg { width: 100%; max-width: 88px; height: 18px; overflow: visible; }
  .hd2-c-spark .sl { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .hd2-c-was { font-size: 9.5px; color: var(--ink-soft); margin-top: 2px; min-height: 12px; white-space: nowrap; }
  .hd2-c-d { font-size: 10px; font-weight: 700; margin-top: 4px; min-height: 18px; }
  /* Delta = small tinted pill badges (per the PSD), not bare text */
  .hd2-c-d span { display: inline-block; padding: 2.5px 8px; border-radius: 7px; }
  .hd2-c-d .up { color: #3fbf76; background: rgba(70,201,126,.14); }
  .hd2-c-d .down { color: var(--clay); background: color-mix(in srgb, var(--clay) 14%, transparent); }
  .hd2-c-d .flat { color: var(--ink-soft); background: var(--paper-warm); }
  .hd2-chart { margin: 2px 0; }
  /* Chart legend: current (white) vs previous-period ghost line */
  .hd2-leg { display: flex; gap: 18px; justify-content: center; align-items: center; font-size: 10px; letter-spacing: .4px; color: var(--ink-soft); margin-top: 7px; }
  .hd2-leg .l { display: inline-block; width: 14px; height: 2px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
  .hd2-leg b { color: var(--ink); font-weight: 700; }   /* the totals pop; labels stay soft */
  /* One-liner under the key: metric + the exact dates being compared */
  .hd2-cap { text-align: center; font-size: 10px; letter-spacing: .4px; color: var(--ink-soft); opacity: .75; margin-top: 5px; }
  /* Ranges moved below the chart, just above the Inbox/Today divider (Zai 2026-07-28) */
  .hd2-ranges { margin: 0; }
  /* The key + caption moved below the pills (Zai 2026-08-07). Inside the chart they leaned on
     the chart's own spacing; out here the wrapper owns the gap, and .hd2-leg's old top margin
     would double it. */
  .hd2-legwrap { margin-top: 2px; }
  .hd2-legwrap .hd2-leg { margin-top: 0; }
  /* The greeting took the ranges' old slot, under the status bar. It's the page's own
     .home-welcome type, just tightened up so it sits inside the dashboard's flex gap.
     The negative margin cancels that 14px gap for the pronunciation line ONLY, so it sits
     tucked under the greeting the way it does everywhere else (Zai 2026-07-28) — the space
     below it, down to the metric numbers, is left alone. */
  .hd2-greet { padding: 2px 16px 0; }
  .home-dash2 .home-welcome-lang { padding: 0 16px; margin-top: -14px; }
  /* Two columns with a center hairline; min-width:0 stops long text from bleeding across */
  .hd2-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 8px; position: relative; }
  /* Divider starts right under the sub-heading lines (--hd2-div-top set after render) */
  .hd2-cols::before { content: ''; position: absolute; left: 50%; top: var(--hd2-div-top, 4px); bottom: 10px; width: 1px; background: var(--line); }
  .hd2-col { min-width: 0; }
  /* Column content = a narrower block centered under each heading (Zai's red bars, 2026-07-17).
     min() keeps the inset on mobile too, where the columns are narrower than 220px. */
  /* Rows sit a beat below the headings so INBOX/TODAY read as section titles (Zai) */
  #hdInboxRows, #hdTodayRows { max-width: min(220px, 86%); margin: 18px auto 0; }
  .hd2-h { font-size: 22px; font-weight: 800; letter-spacing: .18em; color: var(--ink); margin-bottom: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
  /* TODAY items = mini to-do cards (tag chip line, check circle + title, red due pill) */
  .hd2-todo2 { display: flex; flex-direction: column; gap: 7px; padding: 11px 2px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); cursor: pointer; }
  .hd2-todo2:last-child { border-bottom: none; }
  .hd2-t-tags { display: flex; gap: 4px; }
  .hd2-t-row { display: flex; align-items: center; gap: 9px; }
  .hd2-todo-title { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hd2-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 8px; padding: 3.5px 9px; }
  .hd2-badge i { font-size: 12px; }
  .hd2-badge.over { color: #e5766b; border-color: color-mix(in srgb, var(--clay) 55%, transparent); background: color-mix(in srgb, var(--clay) 10%, transparent); }
  .hd2-sub { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 2px 0 4px; text-align: center; }
  /* INBOX / TODAY column pills (Zai 2026-08-11): Support|Mail and Due|Sprint */
  .hd2-coltabs { display: flex; gap: 7px; justify-content: center; margin: 4px 0 12px; }
  .hd2-coltabs .chip { background: var(--paper-warm); color: var(--ink-soft); border: 1px solid var(--line);
    border-radius: 999px; padding: 5px 13px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; cursor: pointer; white-space: nowrap; }
  .hd2-coltabs .chip.on { color: var(--gold); border-color: var(--gold); background: rgba(227,167,151,0.08); }
  .hd2-coltabs .chip i { font-style: normal; opacity: .55; margin-left: 4px; font-feature-settings: "lnum" 1; }
  .hd2-loadmore { display: block; margin: 10px auto 0; background: none; border: 1px solid var(--line);
    color: var(--ink-soft); border-radius: 999px; padding: 6px 15px; font-size: 10.5px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; cursor: pointer; font-family: inherit; }
  .hd2-loadmore:hover { color: var(--ink); }
  .hd2-divider { width: 210px; height: 1px; background: var(--line); margin: 20px auto 6px; }
  @media (max-width: 560px) { .hd2-cards { gap: 5px; } .hd2-c-v { font-size: 18px; } .hd2-cols { gap: 12px; } .hd2-h { font-size: 18px; } }
  /* Desktop: KPI cards scale up with the 960px layout (Zai 2026-07-18) */
  @media (min-width: 1000px) {
    .hd2-c-l { font-size: 12px; letter-spacing: .6px; }
    .hd2-c-v { font-size: 32px; margin-top: 5px; }
    .hd2-c-d { font-size: 11px; margin-top: 6px; }
    /* …and the INBOX/TODAY blocks widen to fill the roomier columns (Zai's red lines) */
    #hdInboxRows, #hdTodayRows { max-width: 320px; }
    /* KPI row stays compact — cards cluster near center instead of spreading across all 960px */
    .hd2-cards { max-width: 700px; width: 100%; margin: 0 auto; }
  }
  /* Inbox rows inside the v2 TODAY/INBOX columns: stack sender+subject like the mockup (no card) */
  /* Home INBOX rows (Zai 2026-07-17): stacked — [dot·chip·time] / sender / subject.
     Everything stays inside the 220px block: one line each, longer text cuts off (…). */
  .hd2-col .hd-in-row { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 2px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
  .hd2-col .hd-in-top { display: flex; align-items: center; gap: 7px; }
  .hd2-col .hd-in-dot.read { display: none; }
  /* (White-theme chip trial 2026-07-17 reverted next day — Zai preferred the colors) */
  .hd2-col .hd-in-who { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hd2-col .hd-in-what { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Home mini-inbox (TEAM / MRKT / INVEN) */
  .hd-inbox { background: var(--card); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
  .hd-in-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
  .hd-in-head span:first-child { font-size: 10.5px; letter-spacing: .22em; color: var(--ink-soft); font-weight: 700; }
  .hd-in-badge { background: #e5484d; color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
  .hd-in-row { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); cursor: pointer; }
  .hd-in-row:last-child { border-bottom: none; }
  .hd-in-row:hover { background: var(--paper-warm); }
  .hd-in-dot { width: 7px; height: 7px; border-radius: 50%; background: #e3a797; flex: none; }
  .hd-in-dot.read { background: transparent; }
  .hd-chip { font-size: 9px; font-weight: 800; letter-spacing: .08em; border-radius: 6px; padding: 2.5px 7px; flex: none; }
  .hd-chip-team { background: rgba(227,167,151,.16); color: #e3a797; border: 1px solid rgba(227,167,151,.5); }
  .hd-chip-mrkt { background: rgba(245,127,49,.14); color: #f57f31; border: 1px solid rgba(245,127,49,.5); }
  .hd-chip-inven { background: rgba(58,160,255,.14); color: #3aa0ff; border: 1px solid rgba(58,160,255,.5); }
  .hd-in-who { width: 112px; flex: none; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hd-in-what { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hd-in-when { font-size: 10px; color: var(--ink-soft); opacity: .75; flex: none; }
  .hd-in-row.unread .hd-in-who, .hd-in-row.unread .hd-in-what { color: var(--ink); }
  @media (max-width: 520px) { .hd-in-who { width: 84px; } .hd-in-what { font-size: 11.5px; } }
  /* Home mini cards: roadmap ring + customers count */
  .hd-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hd-mini { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 13px 12px 14px; text-align: center; cursor: pointer; }
  .hd-mini:hover { background: var(--paper-warm); }
  .hd-mini-l { font-size: 9.5px; letter-spacing: .18em; color: var(--ink-soft); text-transform: uppercase; }
  .hd-ringwrap { position: relative; width: 66px; height: 66px; margin: 10px auto 6px; }
  .hd-ringwrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .hd-ringwrap .bg { fill: none; stroke: var(--paper-warm); stroke-width: 6; }
  .hd-ringwrap .fg { fill: none; stroke: #e3a797; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
  .hd-ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; color: var(--ink); }
  .hd-mini-v { font-size: 27px; font-weight: 800; color: var(--ink); margin-top: 16px; }
  .hd-mini-sub { font-size: 11px; color: var(--ink-soft); margin-top: 5px; }
  /* ── To-Do board (Home → To-Do) ─────────────────────────────────────────── */
  /* Tag pages: pill row (ALL / HQ / CODE / INVEN / MRKT) centered, with the + pinned right */
  .todo-toolbar { position: relative; display: flex; align-items: center; justify-content: center; max-width: 860px; margin: 12px auto 16px; padding: 0 52px; }
  /* Phones: the tag row overflows and scrolls — drop the left inset so pills get the room */
  @media (max-width: 560px) { .todo-toolbar { padding-left: 12px; } }
  .todo-tag-tabs { display: flex; gap: 8px; justify-content: safe center; overflow-x: auto; scrollbar-width: none; }
  .todo-tag-tabs::-webkit-scrollbar { display: none; }
  /* Sub-category row (Zai 2026-10-06): the section's groups (PPC · SOCIAL · SEO) as smaller pills under the section
     tabs, each its own colour; the sheet (#todoSubs) opens a group to its items. */
  .todo-sub-tabs { display: flex; flex-wrap: wrap; gap: 6px 6px; justify-content: center; align-items: center; margin: 12px auto 18px; max-width: 980px; }
  .todo-sub-tabs:empty { display: none; }
  .todo-sub-tabs button, .td-subs button { flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; background: transparent; border: 1px solid var(--line);
    color: var(--ink-soft); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px; transition: color .12s, border-color .12s, background .12s; }
  .todo-sub-tabs button i, .td-subs button i { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); flex: none; }
  .todo-sub-tabs button.on, .td-subs button.on { color: var(--st); border-color: color-mix(in srgb, var(--sc) 70%, transparent); border-style: solid;
    background: color-mix(in srgb, var(--sc) 14%, transparent); }
  .td-subs { display: flex; flex-direction: column; gap: 7px; margin: -2px 0 6px; flex-shrink: 0; }
  .td-sub-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
  .td-sub-items { padding-top: 7px; border-top: 1px dashed var(--line); }
  .td-subs:empty { display: none; }
  .tdc-chip.sub { border: 0; padding: 0; gap: 5px; color: var(--st); letter-spacing: .08em; margin-right: 4px; }
  .tdc-chip.sub::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sc); flex: none; }
  .td-subs { display: flex; flex-direction: column; gap: 7px; margin: -2px 0 6px; flex-shrink: 0; }
  .td-sub-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
  .td-sub-items { padding-top: 7px; border-top: 1px dashed var(--line); }
  .todo-tag-tabs button { flex: 0 0 auto; padding: 7px 16px; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; font-family: inherit; transition: color .12s, border-color .12s; }
  /* Add: just the + — opens the full task sheet so details are set up front */
  .todo-add-btn { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: rgba(227,167,151,.15); border: 1px solid #e3a797; color: #e3a797; border-radius: 50%; font-size: 15px; cursor: pointer; font-family: inherit; transition: background .15s, transform .1s; }
  .todo-add-btn:hover { background: rgba(227,167,151,.26); }
  .todo-add-btn:active { transform: translateY(-50%) scale(.9); }
  /* Three live columns (Recurring has its own page now, Zai 2026-07-29) */
  /* Four columns since Recurring joined the board (Zai 2026-07-30). The Recurring PAGE
     overrides this to a single stacked column, one group per tag. */
  /* ── To-Do progress strip (Zai 2026-08-13, idea C3) ──────────────────────────
     One bar in board order — Planning, Sprint, Confirm, Done — with Done anchored at
     the right, so finishing work moves width off the left end and the teal front line
     creeps leftward. Colours are mixed off the accent so both themes hold. */
  /* width:100% — the section is a flex column, and the auto side margins alone would
     cancel the stretch and shrink this to its own content width.
     620px: the bar reads as a summary, not as a rule across the whole board (Zai
     2026-08-13). Bump this one number to make it longer or shorter. */
  .todo-stats { width: 100%; max-width: 620px; margin: 0 auto 34px; padding: 16px 16px 0; display: flex; flex-direction: column; gap: 9px; }
  .todo-stats.hidden { display: none; }
  .ts-track { position: relative; }
  .ts-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--paper-warm); }
  .ts-bar span { display: block; height: 100%; }
  .ts-mark { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); border-radius: 2px; }
  .ts-mark b { position: absolute; top: -17px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
    color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
  /* Cera ships old-style figures, so digits sat short and dropped below the baseline
     next to the caps labels — force the lining set across the whole board (Zai 2026-08-13) */
  #todoSection { font-feature-settings: "lnum" 1; }
  .ts-key { display: flex; gap: 15px; flex-wrap: wrap; font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
  .ts-key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
  /* (The task total used to sit at the right end of the key — dropped everywhere on
     2026-08-14; the segment counts already add up to it.) */
  @media (max-width: 900px) {
    /* 48px sides so the bar stops short of the screen edges rather than running the full
       width, 32px below it so the first task isn't glued to the key line, and the key
       centres under the bar with the total dropped (Zai 2026-08-14). */
    .todo-stats { padding: 12px 48px 0; margin-bottom: 32px; }
    .ts-key { justify-content: center; }
  }
  /* Three columns since Recurring moved to its own tab (Zai 2026-08-13) — at four the
     board left a dead fourth cell on the right and read as though a column had gone missing. */
  .todo-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 16px 26px; max-width: 960px; margin: 0 auto; align-items: start; }
  /* …and that page is a single column, so don't stretch it across the whole width */
  /* The Recurring page sits its tag groups side by side like every other board, not in
     a stack (Zai 2026-07-30). Auto-columns rather than a fixed count because the number
     of groups follows how many tags actually have repeating work. */
  .todo-board.is-recur { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  /* Title + column headings match Dalia's (Zai 2026-07-29) */
  .todo-hd { text-align: center; font-size: 23px; font-weight: 800; letter-spacing: .22em; color: var(--ink); margin: 18px 0 6px; cursor: pointer; user-select: none; }
  /* The heading sits ABOVE the box, on the page, not inside the card */
  .todo-colwrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  /* Confirm's cell also holds the folded-away Completed list */
  .todo-cell { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  /* Once Confirm holds cards, Completed sits right under them — the empty column's
     220px drop zone would otherwise strand it halfway down the page (Zai 2026-08-14) */
  .todo-cell .todo-col.is-filled { min-height: 0; }
  .todo-donebar { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 8px; background: none; border: none; color: var(--ink-soft); font-family: inherit; font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
  .todo-donebar i { font-size: 14px; transition: transform .18s; }
  .todo-donebar.open i { transform: rotate(180deg); }
  .todo-donebar:hover { color: var(--ink); }
  .todo-donebar .n { font-weight: 800; letter-spacing: 0; }
  .done-list.hidden { display: none; }
  .done-list { min-height: 0; }
  /* max-width:100vw — on Zai's iPhone an ancestor inflated to 765px on a 440px screen,
     shrinking the board's scroll range so DONE was unreachable; cap the scrollport to
     the real viewport so the full column range always scrolls (2026-07-19) */
  @media (max-width: 900px) { .todo-board { display: flex; align-items: flex-start; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; max-width: 100vw; gap: 10px; } .todo-board::-webkit-scrollbar { display: none; } .todo-colwrap { flex: 0 0 250px; } .todo-cell { flex: 0 0 250px; } .todo-cell .todo-colwrap, .todo-colwrap .todo-col, .todo-cell .todo-col { flex: 0 0 auto; }
    /* The recurring page scrolls sideways like the others now that it has a group per
       tag, rather than stacking into one long column. */
    .todo-board.is-recur { display: flex; } }
  /* 15px, not 9 — the halo above each card needs room or it lands on the card above it */
  .todo-col { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 220px; display: flex; flex-direction: column; gap: 15px; }
  /* The grey line between tasks is gone (Zai 2026-08-12) — the lit top edge already
     starts each card, so the divider was a third border doing the same job. */
  .todo-card + .todo-card { padding-top: 0; }
  .todo-col.drag-over { border-color: #e3a797; background: color-mix(in srgb, #e3a797 6%, var(--card)); }
  /* Column title centred, count right beside it */
  .todo-col-h { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 2px 4px; }
  /* var(--ink), not a literal white, so the heading still reads on the light theme */
  .todo-col-h .n { font-size: 18.5px; letter-spacing: .16em; font-weight: 800; color: var(--ink); }
  .todo-col-h .c { font-size: 12px; color: var(--ink-soft); background: var(--paper-warm); border-radius: 999px; padding: 3px 10px; }
  /* One box only: the task sits in it. user-select:none — a card is dragged, not read,
     so the browser doesn't start highlighting the title mid-drag (and iOS won't pop the
     copy/lookup callout on the hold-to-lift). */
  .todo-card { background: transparent; border: none; padding: 0; cursor: grab;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
  /* Ring (Zai 2026-08-30, replacing the 08-14 tube — "I don't like the glow anymore"):
     the check circle carries the department colour and the tag's text warms to match;
     the card itself goes flat — no bar, no halo, no bloom. --tdc-d is set per card from
     its first tag; the fallback is the old grey so an untagged card just looks neutral. */
  .tdc-body { position: relative; background: var(--paper-warm); border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; --tdc-d: var(--ink-soft); }
  /* On paper the colour leans dark to stay legible; states declared later (confirm's
     amber, done's green fill) still win by order. */
  .tdc-body .todo-check { border-color: color-mix(in srgb, var(--tdc-d) 85%, #000); }
  /* Dark: a flat graphite card, the colour at full strength on the ring. The :not()
     guards keep confirm's amber ring and done's green fill — this selector carries an
     id, so unlike the paper rule above it would out-rank them. */
  html:not([data-theme="light"]) #todoSection .tdc-body { background: #101013; border-color: #1c1c20; }
  html:not([data-theme="light"]) #todoSection .tdc-body .todo-check:not(.confirm):not(.on) { border-color: var(--tdc-d); }
  .tdc-chips, .todo-top, .tdc-foot { position: relative; z-index: 1; }
  .todo-card .t { font-size: 13.5px; color: var(--ink); line-height: 1.35; }
  /* Chips row — tag, late, priority all the same height */
  .tdc-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
  .tdc-chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; box-sizing: border-box; }
  .tdc-chip i { font-size: 11px; }
  /* Filled tag (Zai 2026-08-31, option D on top of the ring): the department tag is a
     small solid pill in its colour with dark text — the one solid spot of colour on the
     card, next to the coloured ring. --tdc-d inherits from the card body; its ink-soft
     fallback keeps an untagged card's chip neutral (it has no dept chip anyway). */
  /* Category = coloured dot + word (Zai 2026-09-28, option C) — the old solid block put near-black text on dark
     purple/brown and was unreadable. --c base colour, --ct light text for dark mode, --cd dot (lightened for INVEN). */
  .tdc-chip.dept, .todo-tag-chip.dot { border: 0; background: none; padding: 0; gap: 6px; margin-right: 5px; color: var(--ct); letter-spacing: .12em; }
  .tdc-chip.dept::before, .todo-tag-chip.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cd); flex: none; }
  .todo-tag-chip.dot { display: inline-flex; align-items: center; }
  html[data-theme="light"] .tdc-chip.dept, html[data-theme="light"] .todo-tag-chip.dot { color: color-mix(in srgb, var(--c) 68%, #000); }
  html[data-theme="light"] .tdc-chip.dept::before, html[data-theme="light"] .todo-tag-chip.dot::before { background: var(--c); }
  .tdc-chip.late, .tdc-chip.p-high { color: #e5484d; border-color: rgba(229,72,77,.6); border-radius: 999px; }
  .tdc-chip.late { border-radius: 6px; }
  .tdc-chip.soon { color: #f5b13c; border-color: rgba(245,177,60,.6); }
  .tdc-chip.p-low { border-radius: 999px; opacity: .8; }
  /* Priority sits on the right edge of the row, away from the tag/late chips */
  .tdc-chip.p-high, .tdc-chip.p-low { margin-left: auto; }
  /* Footer: steps done on the left, due date on the right */
  .tdc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); }
  .todo-top { display: flex; align-items: flex-start; gap: 9px; }
  .todo-top .t { flex: 1; }
  /* Due date sits right under the task name, lined up with it (Zai 2026-10-13) — the footer keeps the task count. */
  .todo-top .t .tdc-due { display: block; margin-top: 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.2; }
  .todo-check { width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid var(--ink-soft); flex: 0 0 auto; margin-top: 1px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; transition: background .15s, border-color .15s, transform .1s; }
  .todo-check:active { transform: scale(.86); }
  .todo-check.planning:hover, .todo-check.sprint:hover { border-color: #e3a797; background: color-mix(in srgb, #e3a797 28%, transparent); }
  .todo-check.confirm { border-color: #f5b13c; }
  .todo-check.confirm:hover { background: color-mix(in srgb, #f5b13c 32%, transparent); }
  .todo-check.recurring:hover { border-color: #8b7cf6; background: color-mix(in srgb, #8b7cf6 30%, transparent); }
  .todo-check.on { background: #46c97e; border-color: #46c97e; }
  .todo-card.is-done .t { text-decoration: line-through; color: var(--ink-soft); }
  /* Drag to reorder: the card lifts and follows the finger, the others slide aside, and a
     dashed slot shows where it will land. The lift (a touch bigger, a shadow) is on the card's
     body so the card itself only ever carries the movement. */
  .todo-card.dragging { touch-action: none; cursor: grabbing; will-change: transform; }
  .todo-card.dragging .tdc-body { transition: scale .16s ease, box-shadow .16s ease; }
  .todo-card.dragging.lifted .tdc-body { scale: 1.03; box-shadow: 0 16px 34px rgba(0,0,0,.5); }
  .todo-ph { border: 1.5px dashed #e3a797; border-radius: 11px; background: color-mix(in srgb, #e3a797 7%, transparent); }
  .todo-empty { color: var(--ink-soft); font-size: 11.5px; text-align: center; padding: 12px 4px; opacity: .7; }
  .todo-card { cursor: pointer; }   /* whole card opens the detail sheet */
  /* ── To-Do board ground (Zai 2026-08-12, reversed 2026-08-13) ────────────
     The board briefly sat in its own black room lit by two white blooms. Zai pulled
     the ground back to the app's normal dark FOR NOW and kept everything else, so the
     black + bloom rules are gone and the cards below carry the look on their own.
     Dark theme only — in light theme the board keeps the normal paper surfaces. */
  /* The column box goes away so the ground is what the cards sit on */
  html:not([data-theme="light"]) #todoSection .todo-col { background: transparent; border-color: transparent; }
  html:not([data-theme="light"]) #todoSection .todo-col.drag-over { border-color: #e3a797; background: color-mix(in srgb, #e3a797 6%, transparent); }
  /* The card sits on the app's normal raised surface like every other page (Zai
     2026-08-13). It used to be cut down into the black room with a near-black fill and
     an inner shadow, which still read as a glow once the room was gone. */
  /* ── To-Do detail sheet ─────────────────────────────────────────────────── */
  .td-modal { max-height: 90vh; overflow-y: auto; scrollbar-width: none; }   /* scrolls, no visible bar */
  .td-modal::-webkit-scrollbar { display: none; }
  /* keep Delete/Cancel/Save reachable instead of scrolling off the bottom */
  /* Delete / Cancel / Save sit at the END of the sheet, not pinned to the viewport:
     stuck to the bottom they floated over the Notes area and read as a menu hovering
     mid-screen. You scroll to them like everything else now (Zai 2026-07-30). */
  .td-modal .modal-actions { padding-top: 12px; margin-top: 4px; }
  .td-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .td-lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 5px; }
  .td-textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 15px; font-family: inherit; outline: none; box-sizing: border-box; resize: vertical; }
  .td-textarea:focus { border-color: var(--modal-accent); }
  .td-checklist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
  .td-check-item { display: flex; align-items: center; gap: 9px; }
  .td-check-item .box { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ink-soft); flex: 0 0 auto; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
  .td-check-item.on .box { background: #46c97e; border-color: #46c97e; }
  .td-check-item input.step { flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font-size: 14px; outline: none; }
  .td-check-item input.step:focus { border-color: var(--line); background: var(--paper); }
  .td-check-item.on input.step { text-decoration: line-through; color: var(--ink-soft); }
  .td-check-item .rm { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 16px; padding: 2px 6px; flex: 0 0 auto; }
  .td-step-add { display: flex; gap: 8px; align-items: center; }
  .td-step-add input { flex: 1; }
  .td-step-add button { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 20px; cursor: pointer; }
  /* checklist drag-to-reorder */
  .td-check-item { border-radius: 8px; }
  .td-check-item .grip { color: var(--ink-soft); cursor: grab; font-size: 15px; line-height: 1; padding: 0 4px; flex: 0 0 auto; user-select: none; touch-action: none; }
  /* custom repeat panel */
  .td-repeat { margin-top: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .td-rep-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink); }
  .td-repeat .td-rep-num { width: 90px !important; text-align: center; }
  .td-repeat .td-rep-unit { width: auto; min-width: 116px; }
  .td-rep-days { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
  .td-rep-day { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font-size: 13px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .td-rep-day.on { background: #e3a797; border-color: #e3a797; color: #04211f; }
  .td-rep-summary { font-size: 12.5px; color: var(--ink-soft); text-align: center; }
  /* due date + time, and tags */
  .td-due-row { display: flex; flex-direction: column; gap: 6px; }
  .modal .td-due-row input[type=date], .modal .td-due-row input[type=time] { width: 100%; }
  .td-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .td-modal .td-tags-top { margin-bottom: 4px; flex-shrink: 0; }
  .td-clear-date { display: block; margin: 6px auto 0; background: none; border: 0; padding: 4px 8px; color: var(--ink-soft);
    font: inherit; font-size: 12px; letter-spacing: .04em; cursor: pointer; }
  .td-clear-date:hover { color: var(--ink); }
  /* Title wraps onto more lines and the box grows with it (Zai 2026-10-06) — todoTitleFit sizes it; flex-shrink:0 or the sheet squashes it */
  .td-modal .td-title { font-size: 17px; font-weight: 600; resize: none; overflow: hidden; line-height: 1.3; display: block; flex-shrink: 0; }
  /* The whole task sheet reads centred — every label, every field value, the checklist
     steps and the note cards (Zai 2026-07-30). Scoped to .td-modal so no other sheet in
     the app is affected. Date and time inputs need their own line: the value inside a
     native picker doesn't follow a plain text-align on the field. */
  .td-modal .td-lbl { text-align: center; }
  .td-modal #todoTitle,
  .td-modal .modal-select,
  .td-modal .td-textarea,
  .td-modal .td-check-item input.step,
  .td-modal .td-step-add input,
  .td-modal .td-note-b,
  .td-modal .td-note-h .when { text-align: center; }
  .td-modal input[type="date"], .td-modal input[type="time"] { text-align: center; }
  .td-modal input[type="date"]::-webkit-datetime-edit,
  .td-modal input[type="time"]::-webkit-datetime-edit { text-align: center; width: 100%; }
  /* Selects are the same story as the date fields: WebKit ignores a plain text-align
     on the PICKED value (Status/Priority/Repeat sat left while everything else was
     centred — Zai 2026-08-30). text-align-last is the property that actually moves it. */
  .td-modal .modal-select { text-align-last: center; }
  .td-modal .modal-select option { text-align: center; }
  /* The note's date shares its row with edit/delete. Left in the flex flow it would
     centre in the space those buttons DON'T occupy, i.e. visibly off to the left, so
     they come out of the flow and the date centres on the card itself. */
  .td-modal .td-note-h { position: relative; justify-content: center; }
  .td-modal .td-note-h .when { flex: 0 1 auto; }
  .td-modal .td-note-h > button { position: absolute; top: -1px; }
  .td-modal .td-note-h > button[data-nedit] { right: 24px; }
  .td-modal .td-note-h > button[data-ndel]  { right: 0; }
  .td-tag { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font-size: 12px; font-weight: 800; letter-spacing: .05em; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
  .td-tag.on { font-weight: 800; }
  .todo-tag-chip { font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: transparent; border: 1px solid transparent; }
  /* Notes log — one entry per save, newest first */
  .td-note { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--paper); }
  .td-note-h { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
  .td-note-h .when { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); flex: 1; }
  .td-note-h button { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 14px; padding: 2px 4px; }
  .td-note-h button:hover { color: var(--ink); }
  .td-note-b { font-size: 13.5px; color: var(--ink); line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
  .td-notes-empty { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
  /* "Square didn't take it" list — amber, not red: nothing is broken and nothing is lost,
     Zizi already has the change. It's a to-do against the catalogue (Zai 2026-07-31). */
  /* Attach a photo/video to a note — borrows the announcements composer's look */
  /* fit-content + auto margins: the button centres without stretching to full width */
  /* Tag-qualified so it beats the plain .announce-attach further down the sheet, which
     otherwise wins on source order and forces inline-flex back — and an inline-level
     box ignores auto margins, which is why this stayed stuck to the left. */
  button.td-note-attach { display: flex; width: fit-content; margin: 8px auto 0; }
  .td-note-prev { margin: 8px auto 0; }
  .td-note-edit { display: flex; flex-direction: column; gap: 8px; }
  .td-note-edit .row { display: flex; gap: 8px; justify-content: flex-end; }
  .td-note-edit .row button { border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 12px; font-weight: 700; padding: 6px 14px; cursor: pointer; font-family: inherit; }
  .td-note-edit .row button.save { background: #e3a797; border-color: #e3a797; color: #04211f; }
  /* ── Roadmap (Home → Roadmap) ───────────────────────────────────────────── */   /* shared width rule, same as every other page */
  .hd-status .hd-sep { color: var(--line); }
  .hd-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .hd-tile { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--ink-soft); font-size: 10px; transition: transform .1s; }
  .hd-tile i { font-size: 19px; color: var(--ink); }
  .hd-tile:active { transform: scale(.97); }
  /* only add a gap above the buttons when the live timer card is showing above them */
  /* End-of-day scan of the used-items bin (Zai 2026-09-29) — outlined, so Clock In stays the main button */
  /* Tech Home (Zai 2026-09-27): owl → greeting → pronunciation, a wide gap, then a narrower Clock In */
  html[data-theme="light"] .tech-owl { filter: invert(1) brightness(.85); } /* End Break + Clock Out side by side */
  /* Tech home sub-tabs */
  /* Payroll pane */
  /* New inventory buttons (distinct colors, less teal) */
  /* Tech month calendar */ /* light grey ring for today (was green — Zai 2026-09-28) */
  /* Neighbouring months' days: faded numbers; a working day keeps its bright teal ring */
  /* When viewing Products, the whole sales accent goes violet to match the product line */
  /* When viewing Services, the accent goes indigo to match the service line */

  /* Sales "All"/core accent: dark pine green instead of teal (kind views stay violet/amber) */
  #secbtnSales.active { color: #e3a797; border-color: #e3a797; background: rgba(227,167,151,0.12); }
  #secbtnSales.active i { color: #e3a797; }
  .sectionbar #secbtnSales.active { background: rgba(227,167,151,0.14); border-color: #e3a797; }
  /* Finance wears gold — the one section with its own accent (mockup: "Gold D, metal card") */
  #secbtnFinance.active { color: var(--fin-gold); border-color: var(--fin-gold); background: rgba(224,189,125,0.12); }
  #secbtnFinance.active i { color: var(--fin-gold); }
  .sectionbar #secbtnFinance.active { background: rgba(224,189,125,0.14); border-color: var(--fin-gold); }

  /* Data section accent: gold/amber instead of teal */
  #secbtnData.active { color: #e3a797; border-color: #e3a797; background: rgba(227,167,151,0.10); }
  #secbtnData.active i { color: #e3a797; }
  .sectionbar #secbtnData.active { background: rgba(227,167,151,0.14); border-color: #e3a797; }

  /* Stock group + its sections (Products / Back Bar / Stylist / Value) all share the amber accent */
  /* Stock nav button + sub-items + mobile dropdown → amber */
  #secbtnStock.active, #secbtnStock.active i { color: #e3a797; }
  #secbtnStock.active { border-color: #e3a797; background: rgba(227,167,151,0.10); }
  .stock-sub.active, .stock-sub.active i { color: #e3a797; }
  .stock-sub.active { border-color: #e3a797; background: rgba(227,167,151,0.10); }
  /* Traffic tab */
  /* MRKT stat cards: all four on ONE line (compact, centered; "was" gets its own row) */
  /* ── Traffic KPIs, dressed like the Home metric cards (Zai 2026-07-28) ──────────
     No box, white value, delta as a filled pill. Scoped to #trafficSection ON PURPOSE:
     .traffic-kpi is shared with the Sales page (#salesKpis), which he hasn't asked to
     change — drop the scope if he wants Sales to match too. */
  /* MRKT → Bookings wears the same flat KPI dress as the Stats page (Zai 2026-08-02) */
  /* The page reads top to bottom: numbers → trend → what it means in words → where the
     week actually filled up → who filled it → what they came in for. */
  /* Date navigator. The <input type="date"> sits transparently ON the label rather than
     beside it — a styled button that calls showPicker() is a coin toss across iOS versions,
     while an input you can actually tap is not. opacity:0 (not visibility/display) because
     a hidden input can't be tapped, and inset:0 so the whole pill is the target. */
  /* The whole period's bookings, above the tiles that stop at today (Zai 2026-08-06,
     option A of three). Sits on its own line so it reads as the headline the tiles
     break down, not as a fifth tile competing with them. */
  /* Centered like everything else on this page — the tiles, the headline and the card
     headings all sit on the middle line, so left-aligned prose was the odd one out
     (Zai 2026-08-06). Capped so a long sentence breaks into a readable block instead of
     running the full width of a desktop window. */
  /* Heatmap: one column per weekday, one row per hour. Tinted, never solid — a saturated
     block reads as "popping out" against this UI (Zai 2026-07-25). */
  /* One line that scrolls rather than wrapping to a second row (Zai 2026-07-28). `safe
     center` keeps it centred while it fits and only left-aligns once it actually overflows. */

  /* ── Clicky dashboard panels under the chart (Zai 2026-09-03) ──────────────────
     The six lists Clicky shows on its own dashboard — recent visitors, pages, incoming
     links, searches, countries, traffic sources. Box = the Sales KPI tile (var(--card)
     on var(--line), 13px radius); title row = the .k-label voice (caps, .1em tracking)
     with a teal Tabler icon; delta = the KPI .k-fig pill at row size. Two columns on a
     desktop, one on a phone; visitors span the full width. Same 16px gutter as the
     chart wrap above so the cards line up with it. */
  /* Flag: 4x3 SVG in a 20×15 slot; the hairline is a shadow so it never eats into the art.
     No flag known → a globe glyph in the same slot so the labels still line up. */
  /* Same pill as the KPI deltas, row-sized; "new" = nothing in the previous period to compare against */
  /* Recent visitors: time · flag · who · landing page · pages/time. Zai's own visits
     (IP tagged "Me" in Clicky) get a teal star so he can skip himself at a glance. */
  @media (max-width: 520px) {   /* pages count is enough on a phone */
  }

  /* Stats source switcher + the booking funnel (Zai 2026-08-04). Clicky counts everyone
     who OPENED booking; the funnel is the only thing that can say which step lost them. */
  /* Squared, single-sided accent — a left bar with rounded corners reads as a mistake */

  /* ── MRKT → SEO (rank tracker) ─────────────────────────────────────────── */
  /* .sec-view is a flex column, and a flex child never shrinks below its content's
     min width — without min-width:0 the 700px table drags the whole wrap to 720px
     and the right columns get clipped on phones (same mechanism as the To-Do board). */
  /* Cera's default digits are oldstyle (mixed heights); ranks are data — force
     lining figures, same rule as the emails (see azna-email-caps-numbers). */ /* three tiles since Tracked left */
  /* ── Site speed strip (Zai 2026-09-03): PageSpeed scores under the rank tiles ──
     Score bands are Lighthouse's own (90+ good, 50–89 needs work, <50 poor).
     Higher is better here — the opposite of a rank — so ▲ always means faster. */
  html[data-theme="light"] .seo-mainb.off { color: #b3b9c2; border-color: var(--line); }
  /* Only the list shrinks — without flex:none the title/chips rows get vertically
     crushed when history is taller than the sheet (Zai's "its cut off"). */

  /* MRKT section accent: main theme teal (was crimson before the 2026-07-10 re-theme) */
  /* All four Sales panels share one tab row. It scrolls sideways rather than wrapping,
     since the middle tab (TOP BRANDS / TOP SERVICES) only appears on some views and the
     full set doesn't fit a phone. (Zai 2026-07-28) */
  /* The row centres itself while everything fits, and only goes left-aligned once it
     actually overflows — otherwise a short set would sit oddly against the left edge. */   /* its buttons join the row directly, so gap/scroll apply to them too */
  /* Profit has no rankings, so it empties that group — drop the divider with it rather
     than leaving a hairline hanging off the end of the row. */
  /* Receipt modal */
  /* ── MRKT: E-Mail dashboard + coming-soon stubs (Zai 2026-07-24) ── */
  /* No cap of its own: every page is sized by the one shared rule on `#app > *`
     (960px, centred on the screen), so pages can't drift to different widths — this
     one used to stop 200px short of the rest and read as squished (Zai 2026-07-30). */
  .mrkt-soon { min-height: 55vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--ink-soft); }
  .mrkt-soon i { font-size: 44px; color: #e3a797; }
  .mrkt-soon .ms-h { font-size: 18px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
  .mrkt-soon .ms-p { font-size: 13px; }
  #secbtnTraffic.active { color: #e3a797; border-color: #e3a797; background: rgba(227,167,151,0.10); }
  #secbtnTraffic.active i { color: #e3a797; }
  .sectionbar #secbtnTraffic.active { background: rgba(227,167,151,0.14); border-color: #e3a797; }

  /* Date-range picker — bottom sheet (like the add-item modal) */

  /* Team section */
  /* Sits inline right after the STAFF heading (Zai 2026-07-22), not pinned to the far edge */
  /* Roster profile-card grid (Zai's pick A, 2026-07-22) */
  /* Flex-wrap instead of grid so a short last row sits centered (Zai 2026-09-22).
     Up to 5 across on desktop; min-width lets it drop to 4/3/2 on narrower screens. */
  /* On-the-clock round timer dials */   /* sits beside the label (Zai 2026-09-22) */
  /* The clock-in time is the edit handle — dotted underline so it reads as changeable */
  /* Live pay so far this shift (hourly staff only — stylists are commission) */
  /* The row of names the clock-in pill opens, directly under the Staff filter row */

  /* Sale detail — clickable rows + detail sheet */

  /* Warning overlay (too-early clock-in, etc.) */
  /* 1100: the "your shift starts at…" warning is raised FROM the clock sheet, so at 500
     it was landing behind it — the tap just appeared to do nothing on the iPad kiosk. */

  /* Clock-in kiosk (full screen) */
  @keyframes kcpop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

  /* Team sub-page tabs (shown on mobile; desktop uses the sidebar submenu) */
  /* Stylist home: appointment rows + payroll nav */
  /* Equal width for every row + header (parent .tech-pane centers, which would
     otherwise shrink each card to its own content width). */
  /* #styBody is a centred flex column, so any wrapper must claim the width itself or it
     shrinks to its content (the charts block did exactly that). */
  /* Tech Payroll (Zai 2026-09-28): same width + rows as the stylist's */
  /* Editorial agenda (Zai 2026-08-25, "C + A combo"): no boxes — type, hairlines and
     spacing, all centered like the email family. The CUSTOMER is the headline, the
     service drops to a second line in its calendar colour (which retires the dot),
     done rows dim to a whisper, and the next one gets the gold treatment. */
  /* Dead air between appointments, shown as dead air — lunch gets planned around this. */
  /* "2 of 5 done" progress under the TODAY header (the A half of the combo). */
  /* width, not max-width — the parent is a centered flex column, so without a claimed
     width the empty track shrinks to 0 (same trap as the charts block above). */
  /* Visit number — same language as the booking calendar: 1ST in gold, then plain 2, 3, … */
  /* Stylist payroll — Services / Products split cards with icons */
  /* Stylist Home: booking counts for this week / this month (Zai 2026-07-25) — same card
     shell as the Payroll split, just label + number. */
  /* Zai 2026-07-25: the stats strip moved ABOVE the day's list, and the new-vs-returning
     split merged into it as a bar (his option 3A) — which retired the donut card below. */
  /* Tinted, not solid (Zai 2026-07-25 — the saturated fills "popped out" against the dark UI):
     low-opacity wash with the colour carried by the text instead. */
  /* ── Stylist Home charts (Zai 2026-07-25, his picks A/C/D): week bars, service mix,
     new-vs-regulars. All three read the SAME calendar call the counts already make. ── */
  /* STATS range pills — week / month / year (Zai 2026-07-25) */
  /* Clients row: new / returning / retention */
  /* A — bookings per day this week */
  /* A month (28-31 bars) / a year of days needs thinner bars and tighter gaps */
  /* C — service mix */
  /* (D's donut retired 2026-07-25 — the split now rides in the top stats strip as .sty-mix) */
  /* Payroll history list — the wrapper must be full width or its rows shrink to content */
  /* Expanded period detail (services list + product sales) */
  /* teal numbered pager (mirrors .txn-pager but teal active) */
  /* Position filter pills under the Staff header */
  /* Role pills are re-rendered on every filter change; their wrapper lays out as if it
     weren't there, so Clock-in and Add can be static siblings that keep their handlers. */
  /* Clock-in and Add: the same pill as All/Stylist/Tech, sized for a glyph (Zai 2026-08-13) */
  .staff-pills button.pill-act { padding: 6px 12px; display: inline-flex; align-items: center; }
  .staff-pills button.pill-act i { font-size: 15px; line-height: 1; }
  .staff-pills button.pill-act:hover { color: #e3a797; border-color: #e3a797; }
  /* Stylist booking-settings sheet (Team → Roster) */
  /* Time pickers in here use the app's own dropdown, never a native <select>: an
     <option> list is drawn by the OS, so it ignores Cera and paints its own blue
     highlight — the numbers didn't even match the closed field (Zai 2026-07-30).
     Same .time-field / .time-dropdown pair the shift editor already uses. */
  .bk-hour-row .modal-check { margin: 0; flex: none; }

  /* ── Schedule ── */
  .ts-modes { display: flex; gap: 6px; }
  .ts-modes .sched-today.active { background: rgba(227,167,151,0.16); border-color: #e3a797; color: #7adfd8; }
  /* Pay-period summary uses 3 columns (member · hours · pay) */
  .ts-table.period { grid-template-columns: minmax(150px,1.6fr) repeat(2, minmax(96px,1fr)); }
  /* Booked + Shampoo-work rows under the grid (Zai 2026-09-21): how full each day is, and is the tech needed */
  /* 1200: above the clock sheet (.kiosk-overlay, 1000) — it's opaque, so at the old 500
     the time menu opened BEHIND it and tapping the field looked like it did nothing.
     A popover has to outrank anything it can be opened from. (Zai found it 2026-08-13) */
  /* Every <select> in the app opens THIS menu instead of the operating system's. A
     native <option> list is drawn by the OS, so it ignores Cera, paints its own blue
     highlight, and on some screens comes back white on our dark UI (Zai 2026-07-30).
     Only the popup is ours — the closed field keeps whatever styling it already had. */
  /* Same reason as .time-dropdown above — a <select> menu opened from inside an overlay */
  .ts-cell, .ts-member { cursor: pointer; }
  .modal-del { background: rgba(208,107,84,.14); color: var(--clay); border: 1px solid var(--clay) !important; }

  /* ── Stylist detail modal ── */
  /* ── Commission (stylist pay) ── */
  /* Commission drill-down: per-transaction rows grouped by day */
  .ts-table.period [data-pemp] { cursor: pointer; }
  /* ── Timesheets (daily review) ── */
  .ts-scroll { overflow-x: auto; padding: 8px 16px 20px; }
  .ts-table { display: grid; grid-template-columns: minmax(150px,1.4fr) repeat(3, minmax(96px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: max-content; }
  .ts-table > div { background: var(--paper); padding: 11px 12px; display: flex; align-items: center; }
  .ts-h { background: var(--card) !important; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); font-weight: 600; }
  .ts-h.num, .ts-cell.num, .ts-foot.num { justify-content: flex-end; text-align: right; }
  .ts-member { gap: 10px; }
  .ts-member .av { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: #e3a797; }
  .ts-member .nm { font-size: 13px; font-weight: 600; color: var(--ink); }
  .ts-member .role { font-size: 11px; color: var(--ink-soft); }
  .ts-cell { font-size: 13px; color: var(--ink); }
  .ts-cell .worked { color: var(--ink); }
  .ts-cell.active .worked { color: #46c97e; }
  .ts-cell.none { color: var(--ink-soft); }
  .ts-foot { background: var(--card) !important; font-size: 12px; font-weight: 700; color: var(--ink); }
  .ts-foot.lbl { color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; font-size: 11px; }
  /* Scheduled vs worked + on-time (Zai 2026-09-21) */
  .ts-cell.stack { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
  .ts-cell.num.stack { align-items: flex-end; }
  .ts-cell .sub { font-size: 11px; color: var(--ink-soft); line-height: 1.3; }
  .ts-cell .sub.bad { color: var(--clay); }
  .ts-cell .sched-chip { margin-top: 0; }
  .ts-diff.under { color: var(--clay); }
  .ts-diff.over { color: var(--fin-gold); }
  .ts-foot.stack { flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; }
  /* Week view (Zai 2026-09-21): laid out like the Schedule — days across the top, the detail rows underneath each person */
  .ts-table.week { grid-template-columns: 150px repeat(var(--tsw-n, 6), minmax(124px, 1fr)) minmax(140px, .9fr); }
  .ts-table.week .tsw-corner, .ts-table.week .tsw-h { background: var(--card); }
  .ts-table.week .tsw-h { justify-content: center; text-align: center; font-size: 12px; text-transform: none; letter-spacing: 0; padding: 8px 10px; }
  .ts-table.week .tsw-h.today { color: #e3a797; }
  .ts-table.week .tsw-band { grid-column: 1 / -1; background: var(--card); justify-content: space-between; padding: 9px 12px; }
  .ts-table.week .tsw-band .sum { font-size: 12px; color: var(--ink-soft); }
  .ts-table.week .tsw-band .sum b { color: var(--ink); }
  .ts-table.week .tsw-lbl { background: var(--card); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); font-weight: 600; padding: 9px 12px; align-items: flex-start; }
  .ts-table.week .tsw-c { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px; padding: 9px 10px; min-height: 44px; font-size: 12px; color: var(--ink); }
  .ts-table.week .tsw-c.tsw-wk { background: var(--paper-warm); }
  .ts-table.week .tsw-c .ln b { font-weight: 600; }
  .ts-table.week .tsw-c .now { font-style: normal; color: #46c97e; }
  .ts-table.week .tsw-c .sub { font-size: 11px; color: var(--ink-soft); line-height: 1.3; }
  .ts-table.week .tsw-c .sub.bad { color: var(--clay); }
  .ts-table.week .tsw-c .none { color: var(--ink-soft); }
  .ts-table.week .tsw-c .sched-chip { margin-top: 0; }
  .ts-table.week .tsw-empty { grid-column: 1 / -1; padding: 22px 16px; text-align: center; color: var(--ink-soft); font-size: 13px; }
  .ts-table.week .ts-member { cursor: default; display: flex; align-items: center; gap: 10px; }
  /* Desktop: the content column is 960px wide, so the whole week has to fit in it — tighter columns, times wrap only if squeezed */
  @media (min-width: 1000px){
    .ts-table.week { grid-template-columns: 104px repeat(var(--tsw-n, 6), minmax(88px, 1fr)) minmax(108px, .95fr); min-width: calc(212px + var(--tsw-n, 6) * 88px); }
    .ts-table.week .tsw-lbl { padding: 9px 10px; }
    .ts-table.week .tsw-c { padding: 9px 8px; }
  }
  .ts-table.rich.period [data-pemp] { cursor: pointer; }

  /* Announcements (manager compose + sent list) */
  /* Attach + Send share one row to save vertical space (Zai 2026-07-26): attach keeps its
     natural width on the left, Send takes the rest of the row on the right. */
  .announce-attach { display: inline-flex; align-items: center; justify-content: center; gap: 7px; align-self: center; background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); border-radius: 10px; padding: 9px 13px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
  .announce-attach:hover { border-color: #e3a797; color: #e3a797; }
  /* Audience row: a pill per position on the roster, plus People for a hand-picked few.
     Same tinted-selection language as the rest of the app — never a solid fill. */
  .ann-aud { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .ann-aud button { background: var(--card); border: 1px solid var(--line); color: var(--ink-soft);
    border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 600; letter-spacing: .03em;
    text-transform: uppercase; cursor: pointer; font-family: inherit; white-space: nowrap; }
  .ann-aud button:hover { border-color: #e3a797; color: var(--ink); }
  .ann-aud button.on { background: rgba(227,167,151,.16); border-color: #e3a797; color: #e3a797; }
  .ann-people { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .ann-people button { background: none; border: 1px solid var(--line); color: var(--ink-soft);
    border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; font-family: inherit; }
  .ann-people button.on { background: rgba(232,182,76,.16); border-color: #e8b64c; color: #e8b64c; }
  .ann-to { font-size: 11px; color: var(--ink-soft); text-align: center; }
  .ann-item .ann-aud-chip { display: inline-block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; margin-bottom: 6px; }
  .ann-media-preview { position: relative; border-radius: 12px; overflow: hidden; max-width: 320px; align-self: center; }
  .ann-media-preview img, .ann-media-preview video { width: 100%; display: block; max-height: 240px; object-fit: cover; background: #000; }
  .ann-media-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  /* media inside a sent/received announcement card */
  .ann-media { margin-top: 8px; border-radius: 12px; overflow: hidden; max-width: 100%; }
  .ann-media img, .ann-media video { width: 100%; display: block; max-height: 340px; object-fit: contain; background: #000; border-radius: 12px; }
  .ann-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 8px; position: relative; }
  /* ALL announcements read centered (Zai 2026-07-26) — the Updates view and the manager's
     Team › Announce list alike. The title pads BOTH sides by the width of the ✕ delete
     button so it clears it without the padding pulling the text off-centre. */
  .ann-item { text-align: center; }
  .ann-item .at { font-weight: 700; font-size: 14px; color: var(--ink); padding: 0 22px; }
  .ann-item .ab { font-size: 13px; color: var(--ink-soft); margin-top: 3px; white-space: pre-wrap; }
  .ann-item.ann-sched { cursor: pointer; }
  .ann-item.ann-sched:active { background: var(--paper-warm); }
  .ann-item .ad { font-size: 11px; color: var(--ink-soft); margin-top: 6px; }
  .ann-del { position: absolute; top: 10px; right: 10px; background: none; border: none;
    color: var(--ink-soft); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px; }
  .ann-del:hover { color: var(--clay); }
  /* Updates filter pills — All / Updates / Bookings (Zai 2026-07-26) */
  /* Booking-activity chip (new booking / time changed / cancelled …) */
  /* Activity-feed day picker (Zai 2026-09-22): pick a day (or a range) to look at instead of just "recent" */
  /* Same one-line-that-scrolls treatment as the Traffic pills (Zai 2026-07-28) */
  /* Team section accent: purple #e3a797 */
  #secbtnTeam.active, #secbtnTeam.active i { color: #e3a797; }
  #secbtnTeam.active { border-color: #e3a797; background: rgba(227,167,151,0.10); }
  .sectionbar #secbtnTeam.active { background: rgba(227,167,151,0.14); border-color: #e3a797; }
  /* Expandable category rows (Top Brands / Top Services) */
  .sales-empty { padding: 30px 16px; text-align: center; color: var(--ink-soft); font-size: 13px; }

  /* Data tab — category value bars */
  @keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(95,115,85,.5);} 70%{box-shadow:0 0 0 6px rgba(95,115,85,0);} 100%{box-shadow:0 0 0 0 rgba(95,115,85,0);} }

  @media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

  /* ── Lockscreen ─────────────────────────────────────────────── */
  #lockscreen {
    position: fixed; inset: 0; z-index: 999;
    background: #07080b; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 0;
    padding: 6vh 0 8vh; overflow: hidden;
    /* Login is always a dark, branded "loading screen" moment — force dark tokens regardless of theme */
    --ink: #f0f2f5; --ink-soft: #8a9099; --card: rgba(22,25,31,0.55); --line: rgba(255,255,255,0.09); --paper: #07080b; --paper-warm: #14171c; --gold: #cfd6e0;
  }
  #lockscreen.hidden { display: none; }
  /* Animated PS4-style particle background */
  #lsBg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
  #lockscreen > *:not(#lsBg) { position: relative; z-index: 1; }
  #lockscreen .user-tile { backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
  #lockscreen .user-avatar { background: rgba(255,255,255,0.06); }
  .ls-logo { width: 200px; max-width: 62vw; height: auto; margin-bottom: 4px; }
  .ls-title { font-size: 13px; letter-spacing: .4em; color: var(--ink-soft); margin-bottom: 24px; }
  #userSelect { display: flex; flex-direction: column; align-items: center; width: 100%; }
  .ls-greet { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
  .ls-greet-lang { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; margin-bottom: 34px; }
  .user-grid { display: flex; gap: 16px; justify-content: center; align-items: stretch; flex-wrap: wrap; padding: 0 20px; }
  .user-tile {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    background: var(--card); border: 1px solid var(--line); border-radius: 20px;
    padding: 20px 16px; cursor: pointer; width: 150px; box-sizing: border-box;
    transition: border-color .15s, background .15s;
  }
  .user-tile-name { white-space: nowrap; }
  .user-empty { color: var(--ink-soft); font-size: 13px; padding: 20px; } /* don't hold the home header gap open when there's no banner */
  .set-label { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; margin: 10px 2px 6px; }
  .set-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .set-name-row > div { min-width: 0; }
  .set-readonly { padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; }
  .set-log-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-size: 14px; cursor: pointer; }
  .set-log-btn:hover { border-color: var(--gold); }
  .set-log-btn i { font-size: 17px; color: var(--ink-soft); }
  /* Settings sheet heading: spaced caps, same family as the PAYROLL/UPDATES titles (Zai 2026-07-25) */
  .set-head { text-align: center; margin: 2px 0 14px; text-transform: uppercase; letter-spacing: .12em; padding-left: .12em; }
  /* Stylist's own booking link + Copy (Zai 2026-07-26) */
  .set-link-row { display: flex; gap: 8px; align-items: center; }
  .set-link-row input { flex: 1; min-width: 0; font-size: 13px; }
  .set-link-row button { flex: 0 0 auto; padding: 10px 14px; }
  /* Sign out lives inside Settings now (the mobile role pill is gone) */
  .set-signout { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px;
    padding: 13px; border-radius: 12px; border: 1px solid var(--clay); background: rgba(208,107,84,.12);
    color: var(--clay); font-size: 15px; font-weight: 600; cursor: pointer; }
  .set-signout i { font-size: 19px; }
  .set-signout:hover { background: rgba(208,107,84,.2); }   /* logout moved into Settings */
  /* Time-off picker calendar */ /* override global .empty { padding:70px } */
  /* Time-off rows in the manager feed */
  .user-tile:hover { border-color: #676767; background: rgba(255,255,255,0.03); }
  .user-avatar {
    width: 56px; height: 56px; border-radius: 50%; background: #262626;
    overflow: hidden;
    color: var(--ink); font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .user-tile-name { font-size: 14px; font-weight: 600; color: var(--ink); }
  .user-tile-role { font-size: 11px; color: var(--ink-soft); }

  #pinEntry { display: flex; flex-direction: column; align-items: center; gap: 0; }
  #pinEntry.hidden { display: none; }
  .pin-greeting { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 28px; }
  .pin-dots { display: flex; gap: 18px; margin-bottom: 40px; }
  .pin-dot {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--ink-soft); background: transparent; transition: background .12s;
  }
  .pin-dot.filled { background: var(--ink); border-color: var(--ink); }
  .pin-dot.error { border-color: #d06b54; background: #d06b54; }
  @keyframes pinShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 60%{transform:translateX(8px)} }
  .pin-dots.shake { animation: pinShake .35s ease; }
  .pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; margin-bottom: 24px; }
  .pin-key {
    height: 72px; border-radius: 50%; background: var(--card); border: 1px solid var(--line);
    font-size: 24px; font-weight: 500; color: var(--ink); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background .1s;
  }
  .pin-key:active { background: #2a2a2a; }
  .pin-key.del { font-size: 18px; color: var(--ink-soft); }
  .pin-key.empty { background: transparent; border: none; cursor: default; }
  .pin-back { background: none; border: none; color: var(--ink-soft); font-size: 13px; cursor: pointer; margin-top: 4px; }
  .pin-back:hover { color: var(--ink); }

  /* ── Support (omnichannel inbox) ─────────────────────────────────────────── */
  #secbtnSupport.active { color:#e3a797; border-color:#e3a797; background:rgba(227,167,151,0.10); }
  #secbtnSupport.active i { color:#e3a797; }
  .sectionbar #secbtnSupport.active { background:rgba(227,167,151,0.16); border-color:#e3a797; }
  /* Support now lives in the rail-quick row (NOTI · Mail · To-Do · Support) — DOM order places
     it, so the old rail/mobile-bar `order` rules came out with the move (Zai 2026-08-06). */
  /* Bookings (appointments) — black / monochrome theme */
  #secbtnBookings.active { color:#e3a797; border-color:#e3a797; background:rgba(227,167,151,0.08); }
  #secbtnBookings.active i { color:#e3a797; }
  .sectionbar #secbtnBookings.active { background:rgba(227,167,151,0.12); border-color:#e3a797; }
  /* Mobile top-bar order: Bookings → Support → Traffic → Sales → Stock → Team */
  @media (max-width: 999px){
    .sectionbar #secbtnBookings { order: 1; }
    .sectionbar #secbtnTraffic  { order: 3; }
    .sectionbar #secbtnSales    { order: 4; }
    .sectionbar #secbtnFinance  { order: 4; }  /* rides right after Sales */
    .sectionbar #secbtnStock    { order: 5; }
    .sectionbar #secbtnTeam     { order: 6; }
  }
  /* Pages that don't fill the screen sit in the middle of it, on desktop and mobile (Zai 2026-09-21: "center
     it since it has so much space"). On 2026-08-14 this was turned OFF because switching from a tall page to a
     short one made the title slide down the screen and back up — centered again on request. `safe center`
     only centers when there is spare room: a long page still starts at the top and scrolls, and a browser that
     doesn't know `safe` keeps the old top alignment. The Bookings calendar and Planogram are built to fill the
     screen and stay put; Support (2026-09-21: "center this section also") no longer is — its inbox has its own
     height (`calc(100vh - 200px)`, min 440px) shorter than the section, so it now centers in the leftover room
     like everything else. */
  .sec-view { justify-content: flex-start; justify-content: safe center; }
  @media (min-width: 1000px){
    .sec-view {
      min-height: calc(100vh - 44px);
      display: flex; flex-direction: column; justify-content: flex-start; justify-content: safe center;
    }
  }
  /* Team: the tab strip (tablets) stays at the top; the page under it is what centers */ /* last row above the list (Zai 2026-09-29) */
  /* Same badge on the filter row (NEW / OPEN / ✓): unread waiting under that section */ /* no tabs row above it */
  /* Chat tab: iOS-style Online/Offline switch for the website live chat (Zai).
     Sliding white knob; teal pill when online, inset gray when offline. It sits on its
     own bar under the filter row so Chat keeps the same NEW / OPEN / ✓ row as every
     other tab (Zai 2026-09-29). */
  /* Support stats sheet */
  /* Appointments in the contact sheet — same inset-row language as the conversation list.
     Upcoming rows are live (they open the appointment on the calendar); past ones aren't. */
  /* ── Pick several conversations (Zai 2026-08-14) ─────────────────────────────
     The checkbox is always in the row and simply has no width until picking starts, so
     turning it on slides the row across instead of re-rendering it. */
  /* Name row carries the timestamp on its RIGHT (standard mail layout) so the time no longer
     eats a whole line above the name — that gap was what threw the avatar out of line (Zai 2026-07-21). */
  /* "C" = this person is in the customer list. Marks the row as someone we know
     rather than a stranger texting the salon. */
  /* flex:none — leading the row, the tag would otherwise be squeezed by a long name
     instead of the name ellipsing, which is what the row is built to do. */
  /* Full 44px tap target with button chrome — the bare ‹ glyph sat right against the
     name, so back-taps kept opening the contact sheet instead (Zai 2026-08-26). */
  /* No margin-left:auto here — the mail icon already carries it, so the mail/delete/close
     buttons cluster tightly at the right instead of leaving a gap between them. */
  /* Web-chat threads: single End-chat pill replaces the mail/junk/delete cluster */
  /* Inline-rendered email (brand inboxes): full-width, email supplies its own bg */
  @media (max-width:999px){
    /* Height is set precisely in JS (fitSupWrap) from the *visible* viewport so the
       compose/send bar is never cropped in installed-PWA "app mode". dvh is the fallback. */
    /* (Search / mailboxes / status filters were briefly moved under the list here — Zai
       reversed it same day, so they stay at the top of the panel on the phone too.) */
    /* The thread header drops to the bottom, just above the reply bar — done / junk /
       delete / close were a full reach up the screen (Zai 2026-08-14). #supThreadInner is
       a flex column, so order alone moves it; the message list keeps scrolling between. */
  }

  /* ── Portrait lock ─────────────────────────────────────────────────────────
     Installed PWA is locked via the manifest ("orientation":"portrait").
     This guards the browser: on a phone held sideways (landscape + short
     viewport) hide the app and show a "rotate back" prompt instead. */
  @media (orientation: landscape) and (max-height: 480px) {
    body > *:not(#rotateGuard) { display: none !important; }
  }
  /* ── Nav: colour marks the active item, nothing else (Zai 2026-08-14) ─────────
     The pill and outline are gone from every state in the sidebar — the quick icons at
     the top, the section buttons, the expanded group headers and their sub-items. This
     lands as one override because the same tint-and-border rule is written out a dozen
     separate times per section above; kill it here rather than hunt every copy. */
  #sectionbar .secbtn.active, #sectionbar .secbtn.active:hover,
  #sectionbar .rail-subitem.active,
  #sectionbar .stock-sub.active, #sectionbar .mrkt-sub.active,
  #sectionbar.team-open #secbtnTeam, #sectionbar.stock-open #secbtnStock,
  #sectionbar.mrkt-open #secbtnTraffic, #sectionbar.booking-open #secbtnBookings,
  body.mnav #sectionbar .secbtn.active {
    background: transparent !important;
    border-color: transparent !important;
    color: #e3a797;
  }
  /* ── Phone: segmented To-Do board (Zai 2026-08-14, mock 01) ──────────────────
     One stage at a time behind a pill switcher instead of columns running off the side.
     Desktop is untouched; the Recurring page keeps its side-by-side tag groups because
     only the normal board carries .is-seg. */
  .todo-seg { display: none; }
  /* Mock 05's metered stage bar — kept, dormant. The pill switcher below took its place
     at the bottom of the screen (Zai 2026-08-14). */
  .todo-stagebar { display: none !important; }
  /* ── MRKT's page row, stacked on the floating nav (Zai 2026-08-14) ────────────
     Only on the phone, and only while you're inside MRKT — the pill opens Stats and this
     row jumps between Stats / Bookings / E-Mail / SEO / Google Ads / Facebook Ads. */
  .mrkt-subbar { display: none; }
  @media (max-width: 999px) {
    body.pill-nav-on .mrkt-subbar { display: flex; gap: 6px; position: fixed; z-index: 6;
      left: 10px; right: 10px; bottom: var(--stage-lift, 10px); max-width: 620px; margin: 0 auto;
      padding: 4px; border-radius: 999px; overflow-x: auto; scrollbar-width: none;
      background: color-mix(in srgb, var(--paper-warm) 94%, transparent);
      border: 1px solid var(--line); backdrop-filter: blur(10px); }
    body.pill-nav-on .mrkt-subbar.hidden { display: none; }
    .mrkt-subbar::-webkit-scrollbar { display: none; }
    .mrkt-subbar button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
      border: none; background: none; color: var(--ink-soft); font-family: inherit; font-size: 11px;
      font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px;
      border-radius: 999px; cursor: pointer; white-space: nowrap; }
    .mrkt-subbar button.on { color: #e3a797; background: var(--card); }
    .mrkt-subbar button i { font-size: 14px; }
  }
  @media (max-width: 900px) {
    /* The pill switcher lives at the BOTTOM, pinned just above the floating nav rather
       than riding with the content — sticky only holds while its container is on screen,
       which is why it drifted as you scrolled (Zai 2026-08-14). --stage-lift is measured
       off the nav itself so it follows the roomy/dense variants and the safe-area inset. */
    .todo-seg { display: flex; position: fixed; z-index: 6;
      left: 10px; right: 10px; bottom: var(--stage-lift, 10px); width: auto; max-width: 620px; margin: 0 auto; }
    /* The tag row joins it, stacked directly on top (Zai 2026-08-14) — both filters now
       live in the same corner of the screen instead of one at each end. */
    .todo-toolbar { position: fixed; z-index: 6; left: 10px; right: 10px;
      bottom: calc(var(--stage-lift, 10px) + var(--seg-h, 44px) + 8px);
      width: auto; max-width: 620px; margin: 0 auto; padding: 4px 48px 4px 6px;
      background: color-mix(in srgb, var(--paper-warm) 94%, transparent);
      border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(10px); }
    .todo-toolbar .todo-add-btn { right: 8px; }
    /* the last row has to clear both bars */
    .todo-board.is-seg { padding-bottom: calc(var(--stage-lift, 10px) + var(--seg-h, 44px) + 118px); }
    /* ── Mock 06: cards collapse to rows (Zai 2026-08-14) ───────────────────
       One line each, the Tube light turned on its side so it runs down the left edge,
       and roughly twice as many tasks on screen. The date drops off the row — the late
       chip is the only meta that survives, pushed to the right. */
    /* display:flex matters — the card is a plain block on desktop, so flex-direction
       alone left the chips stacked above the title instead of collapsing to one line */
    .todo-board.is-seg .tdc-body { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 11px 12px; }
    /* matches the dark-theme rule's specificity (html:not() + #todoSection), which would
       otherwise keep the halo pointing up off the top edge */
    html:not([data-theme="light"]) #todoSection .todo-board.is-seg .tdc-body {
      box-shadow: -8px 0 18px -6px color-mix(in srgb, var(--tdc-d) 70%, transparent); }
    .todo-board.is-seg .tdc-body::before { inset: 0 auto 0 0; width: 3px; height: auto; border-radius: 3px 0 0 3px; }
    .todo-board.is-seg .tdc-body::after { inset: 0 auto 0 0; width: 56px; height: auto;
      background: linear-gradient(90deg, color-mix(in srgb, var(--tdc-d) 26%, transparent), transparent); }
    .todo-board.is-seg .todo-top { flex: 1; min-width: 0; align-items: center; }
    .todo-board.is-seg .todo-top .t { font-size: 13.5px; }
    .todo-board.is-seg .tdc-chips { order: 2; margin: 0 0 0 auto; flex: 0 0 auto; }
    .todo-board.is-seg .tdc-chip { display: none; }              /* the left bar names the tag */
    .todo-board.is-seg .tdc-chip.late, .todo-board.is-seg .tdc-chip.p-high { display: inline-flex; }
    .todo-board.is-seg .tdc-chip.late i { display: none; }        /* just the number, no clock */
    .todo-board.is-seg .tdc-foot, .todo-board.is-seg .tdc-due { display: none; }
    .todo-board.is-seg .todo-col { gap: 8px; }
    /* pan-y so a vertical scroll still scrolls, and a horizontal drag reaches the swipe */
    .todo-board.is-seg .todo-card { touch-action: pan-y; }
    /* Done is a stage on the phone: show the completed list on its own, without the
       Confirm cards or the fold bar in front of it. */
    .todo-board.is-seg.show-done .todo-cell .todo-col[data-col="confirm"],
    .todo-board.is-seg.show-done .todo-donebar { display: none; }
    /* box only — size and placement are set in the pinned rule above */
    .todo-seg { gap: 6px; background: color-mix(in srgb, var(--paper-warm) 94%, transparent);
      border: 1px solid var(--line); border-radius: 999px; padding: 4px; backdrop-filter: blur(10px); }
    .todo-seg button { flex: 1; min-width: 0; border: none; background: none; color: var(--ink-soft);
      font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
      padding: 8px 0; border-radius: 999px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .todo-seg button.on { background: var(--card); color: #e3a797; }
    .todo-seg button b { opacity: .6; font-weight: 700; margin-left: 4px; }
    /* width:100% — the board carries margin:0 auto and lives in a flex column, so the
       auto side margins cancelled the stretch and it sized to the old 250px column,
       leaving the rows floating in the middle of the screen (Zai 2026-08-14). */
    .todo-board.is-seg { overflow-x: hidden; gap: 0; width: 100%; }
    .todo-board.is-seg > [data-key] { flex: 1 1 100%; min-width: 0; }
    /* rows run the width of the board — the column's own inset just double-padded them */
    .todo-board.is-seg .todo-col { padding: 0; }
    .todo-board.is-seg > [data-key]:not(.is-mcol) { display: none; }
    /* the switcher already names the stage and carries its count */
    .todo-board.is-seg .todo-col-h { display: none; }
    /* the progress strip is back at the top of the phone board (Zai 2026-08-14) */
    .todo-stats { display: flex; margin-top: 12px; }
  }
  #sectionbar .secbtn.active i, #sectionbar .rail-subitem.active i,
  #sectionbar.team-open #secbtnTeam i, #sectionbar.stock-open #secbtnStock i,
  #sectionbar.mrkt-open #secbtnTraffic i, #sectionbar.booking-open #secbtnBookings i { color: #e3a797; }

  /* ══ FINANCE (QuickBooks-fed) — gold accent per the locked mockup ══ */
  :root { --fin-gold: #e0bd7d; --fin-gold-soft: rgba(224,189,125,.13); --fin-in: #4a9e6e; --fin-out: #d06b54; }
  html[data-theme="light"] { --fin-gold: #a97e2f; --fin-gold-soft: rgba(169,126,47,.12); }
  html[data-theme="light"] .fin-hero .big { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--fin-gold); filter: none; }

/* ══════════════════════════════════════════════════════════════════════════
   MIZUFOX — everything below is Mizufox's own, layered on the AZNA styles above.
   Colours, radii and type come from the same variables so both apps read alike.
   ══════════════════════════════════════════════════════════════════════════ */
@font-face { font-family: 'Cera'; font-weight: 300; font-style: normal; font-display: swap; src: url('/assets/fonts/Cera-LIGHT.ttf') format('truetype'); }
@font-face { font-family: 'Cera'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/Cera-REGULAR.ttf') format('truetype'); }
@font-face { font-family: 'Cera'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/Cera-MEDIUM.ttf') format('truetype'); }
@font-face { font-family: 'Cera'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/Cera-BOLD.ttf') format('truetype'); }
@font-face { font-family: 'Cera'; font-weight: 900; font-style: normal; font-display: swap; src: url('/assets/fonts/Cera-BLACK.ttf') format('truetype'); }

/* Lock screen: the Mizufox wordmark sits where AZNA's logo image does */
.ls-word { width: auto; font-size: 52px; font-weight: 300; letter-spacing: .04em; color: #f0f0f0; line-height: 1; margin-bottom: 14px; user-select: none; }
#lockscreen .user-avatar-owl { width: 58%; height: 58%; object-fit: contain; display: block; filter: brightness(0) invert(1); }
.pin-err { min-height: 18px; margin: -26px 0 12px; font-size: 13px; color: var(--clay); text-align: center; max-width: 260px; }

/* The fox is black line art — recolour it like AZNA recolours its owl */
.brand .owl { filter: brightness(0) invert(1); }
html[data-theme="light"] .brand .owl { filter: brightness(0) invert(.12); }
@media (min-width: 1000px) { html[data-theme="light"] .sectionbar .brand .owl { filter: brightness(0) invert(.75); } }

/* Website + Sales groups: same expand/active behaviour as AZNA's MRKT and Stock groups */
@media (min-width: 1000px) {
  .sectionbar.web-open .web-sub, .sectionbar.sales-open .sales-sub { display: flex; }
  .sectionbar.web-open #secbtnWeb .rail-caret, .sectionbar.sales-open #secbtnSales .rail-caret,
  .sectionbar.mrkt-open #secbtnTraffic .rail-caret { transform: rotate(180deg); }
  .sectionbar.web-open #secbtnWeb, .sectionbar.sales-open #secbtnSales { background: rgba(227,167,151,0.14); border-color: #e3a797; }
  .sectionbar.web-open #secbtnWeb, .sectionbar.web-open #secbtnWeb i,
  .sectionbar.sales-open #secbtnSales, .sectionbar.sales-open #secbtnSales i { color: #e3a797; }
  .sectionbar #secbtnWeb.active, .sectionbar #secbtnSales.active { background: rgba(227,167,151,0.14); border-color: #e3a797; }
  .sectionbar .mz-sub.active { background: rgba(227,167,151,0.14); border-color: #e3a797; color: #e3a797; }
  .sectionbar .mz-sub.active i { color: #e3a797; }
}
@media (max-width: 999px) {
  body.mnav #sectionbar.web-open .web-sub, body.mnav #sectionbar.sales-open .sales-sub { display: flex; }
  body.mnav #sectionbar.web-open #secbtnWeb .rail-caret, body.mnav #sectionbar.sales-open #secbtnSales .rail-caret { transform: rotate(180deg); }
  body.mnav #sectionbar.web-open #secbtnWeb, body.mnav #sectionbar.sales-open #secbtnSales { background: rgba(227,167,151,0.14); border-color: #e3a797; color: #e3a797; }
}
.mz-group { display: flex; }

/* ── Pages ── */
.mz-page { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px 40px; display: flex; flex-direction: column; }
.mz-hd { text-align: center; font-size: 23px; font-weight: 800; letter-spacing: .22em; padding-left: .22em; color: var(--ink); margin: 18px 0 4px; }
.mz-cap { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.mz-toolbar { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 2px; flex-wrap: wrap; }
.mz-sec-h { text-align: center; font-size: 13px; font-weight: 800; letter-spacing: .22em; color: var(--ink-soft); margin: 4px 0 2px; }
.mz-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 100px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; cursor: pointer; text-decoration: none; white-space: nowrap; }
.mz-btn:hover { border-color: #e3a797; color: #e3a797; }
.mz-btn.good { border-color: #e3a797; color: #e3a797; background: rgba(227,167,151,0.08); }
.mz-btn i { font-size: 15px; }
.mz-link-btn { background: none; border: none; color: var(--clay); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px; align-self: flex-start; }
.mz-tabs { display: flex; justify-content: center; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.mz-search { padding: 10px 0 2px; }
.mz-search-row { display: flex; gap: 8px; align-items: center; }
.mz-search-row .mz-cat { width: auto; max-width: 42%; flex: 0 0 auto; padding: 11px 12px; font-size: 13px; }
.mz-count { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); text-align: center; padding: 2px 0 4px; }

.mz-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mz-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; text-align: left; }
.mz-row:hover { border-color: color-mix(in srgb, #e3a797 45%, var(--line)); }
.mz-row-slim { padding: 9px 14px; }
.mz-row.unread { border-color: color-mix(in srgb, #e3a797 55%, var(--line)); }
.mz-row-main { flex: 1; min-width: 0; }
.mz-row-t { font-size: 14.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.mz-row-s { font-size: 12px; color: var(--ink-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mz-row-end { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 11.5px; color: var(--ink-soft); text-align: right; }
.mz-row-end > span { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.mz-price { font-size: 14px; color: var(--ink); }
.mz-qty { font-size: 20px; font-weight: 800; color: var(--ink); min-width: 32px; text-align: center; }
.mz-qty.zero { color: var(--clay); }
.mz-chip { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 100px;
  background: var(--paper-warm); color: var(--ink-soft); border: 1px solid var(--line); white-space: nowrap; }
.mz-chip.good { background: rgba(70,201,126,.12); color: #46c97e; border-color: rgba(70,201,126,.35); }
.mz-chip.warn { background: rgba(245,177,60,.12); color: #f5b13c; border-color: rgba(245,177,60,.35); }
.mz-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: contain; background: #fff; flex: 0 0 auto; }
.mz-thumb-empty { display: grid; place-items: center; background: var(--paper-warm); color: var(--ink-soft); font-size: 20px; }
.mz-avatar { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: rgba(227,167,151,0.14); color: #e3a797; font-weight: 800; }
.mz-empty { text-align: center; color: var(--ink-soft); font-size: 13.5px; padding: 36px 14px; border: 1px dashed var(--line); border-radius: 14px; }

.mz-msg .mz-msg-body { display: none; margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.mz-msg.open .mz-msg-body { display: block; }
.mz-msg.open .mz-row-s { white-space: normal; }
.mz-msg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 11.5px; color: var(--ink-soft); white-space: normal; }
.mz-review { align-items: flex-start; cursor: default; }
.mz-review-b { font-size: 13.5px; color: var(--ink); line-height: 1.45; margin-top: 4px; white-space: pre-wrap; }
.mz-review-act { flex-direction: column; }
.mz-stars { color: #f5b13c; font-size: 14px; letter-spacing: 2px; margin-bottom: 2px; }
.mz-stars span { color: var(--line); }

.mz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.mz-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, transform .1s; }
.mz-tile:hover { border-color: #e3a797; }
.mz-tile:active { transform: scale(.98); }
.mz-tile > i { font-size: 26px; color: #e3a797; }
.mz-tile-t { font-size: 14.5px; font-weight: 700; text-align: center; }

.mz-soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin: 8vh auto 0; max-width: 340px; }
.mz-soon-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: #e3a797; font-size: 32px; }
.mz-soon-t { font-size: 15px; font-weight: 800; letter-spacing: .3em; padding-left: .3em; color: var(--ink); margin-top: 6px; }
.mz-soon-l { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

/* Home */
.mz-home { padding: 0 16px 40px; }
.mz-home .hd2-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mz-home .hd2-statusbar a { color: inherit; text-decoration: none; }

/* Editor sheet */
.mz-ed { max-height: 90vh; max-height: 90dvh; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; }
.mz-ed::-webkit-scrollbar { display: none; }
.mz-form { display: flex; flex-direction: column; gap: 14px; }
.mz-form .td-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mz-form textarea.td-textarea { resize: vertical; line-height: 1.45; }
.mz-hint { font-size: 11.5px; color: var(--ink-soft); margin-top: 5px; line-height: 1.4; }
.mz-note { font-size: 13px; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mz-note b { color: var(--ink); }
.mz-secbox { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); margin-bottom: 10px; }
.mz-add-row { background: none; border: 1px dashed var(--line); color: var(--ink-soft); border-radius: 10px; padding: 11px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mz-add-row:hover { border-color: #e3a797; color: #e3a797; }
.mz-ed-img { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mz-ed-img img { width: 140px; height: 140px; object-fit: contain; background: #fff; border-radius: 14px; }
.mz-ed-img .modal-photo-label { width: 100%; }
.mz-ed-err { color: var(--clay); font-size: 13px; text-align: center; min-height: 0; }
.mz-ed-err:empty { display: none; }
.mz-ed .modal-actions { position: sticky; bottom: -36px; background: var(--paper-warm); padding: 12px 0 4px; margin-top: 2px; }
.set-link { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }

@media (max-width: 560px) {
  .mz-home .hd2-cards { gap: 4px; }
  .mz-home .hd2-c-l { font-size: 8.5px; letter-spacing: .2px; }
  .mz-form .td-grid { grid-template-columns: 1fr; }
  .mz-grid { grid-template-columns: 1fr 1fr; }
}

/* To-Do: who's on a task — pills in the sheet, overlapping initials on the card */
.td-who { display: inline-flex; align-items: center; gap: 7px; padding-left: 6px; }
.td-who-av { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 800;
  background: var(--paper-warm); color: var(--ink-soft); border: 1px solid var(--line); }
.td-who.on { color: #4cbbb5; border-color: rgba(76,187,181,.55); }
.td-who.on .td-who-av { background: #4cbbb5; border-color: #4cbbb5; color: #04211f; }
.tdc-who { flex: 0 0 auto; display: inline-flex; margin-left: 4px; align-self: center; }
.tdc-who i { font-style: normal; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800;
  background: color-mix(in srgb, #4cbbb5 22%, var(--card)); color: #7fd6d4; border: 2px solid var(--card); }
.tdc-who i + i { margin-left: -7px; }

/* To-Do note @mentions (2026-10-27): the pick list under the note box + the highlighted name in a note */
.td-mention-menu { display: flex; flex-direction: column; gap: 2px; margin: 6px auto 0; max-width: 260px; padding: 6px;
  background: var(--paper-warm); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.td-mention-menu.hidden { display: none; }
.td-mention-menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.td-mention-menu button.on, .td-mention-menu button:hover { background: rgba(227,167,151,.14); color: #e3a797; }
.td-mention-menu .td-who-av { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px;
  background: #e3a797; color: #292823; flex: none; }
.td-mention-tag { color: #e3a797; font-weight: 700; }
/* Team chat: an @mention from a task note ends with a button to the task */
.tc-task-link { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; border-radius: 10px;
  border: 1px solid rgba(227,167,151,.5); background: rgba(227,167,151,.12); color: #e3a797; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tc-bub.me .tc-task-link { border-color: rgba(41,40,35,.35); background: rgba(41,40,35,.12); color: inherit; }
