/* css/base.css */
    :root {
      --bg: #F4F2FB;
      --surface: #FFFFFF;
      --text: #1B1530;
      --muted: #5E5873;
      --border: #E6E2F3;
      --border-strong: #D9D4EE;
      --soft: #ECE8FA;
      --accent: #4B2EDB;
      --accent-hover: #3A20B5;
      --brand: transparent;
      --brand-hover: transparent;
      --danger: #A3321E;
      --attention: #A3321E;
      --attention-bg: #FFE7DF;
      --attention-strong: #E8492F;
      --ok: #137A4B;
      --ok-bg: #DDF3E7;
      --wait: #7A5300;
      --wait-bg: #FFF4D6;
      --gold: #B45309;
      --sidebar-bg: #0E1117;
      --sidebar-hover: #161B26;
      --sidebar-active: #1A2030;
      --sidebar-text: #AEB7C6;
      --sidebar-muted: #8590A3;
      --sidebar-width: 232px;
      --sidebar-width-collapsed: 72px;
      --radius-sm: 8px;
      --radius: 14px;
      --radius-lg: 20px;
      --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
      --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
      --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
      --st-new: #4B2EDB;
      --st-booked: #7A5300;
      --st-demo: #8B78FF;
      --st-cold: #8A82A6;
      --st-sale: #137A4B;
      --st-turndown: #A3321E;
      --band-bg: #1B1530;
      --band-panel: #241C3D;
      --band-surface: #2A2245;
      --band-line: #4A4268;
      --band-text: #FFFFFF;
      --band-muted: #C9C1F2;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: var(--font-body);
      background: var(--bg);
      color: var(--text);
      line-height: 1.45;
    }

    h1, h2 {
      font-family: var(--font-display);
    }

    .hidden { display: none !important; }

    #loading {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--muted);
    }

    label {
      display: block;
      font: 500 13px var(--font-body);
      color: var(--text);
      margin-bottom: 6px;
    }

    input[type="checkbox"],
    input[type="radio"] {
      accent-color: var(--accent);
    }

    input[type="email"],
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    input[type="number"],
    input[type="text"],
    input[type="tel"],
    input[type="url"],
    input[type="search"],
    input[type="password"],
    input[type="file"],
    input[type="color"],
    select,
    textarea {
      width: 100%;
      padding: 0 12px;
      height: 38px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font: 14px var(--font-body);
      color: var(--text);
      margin-bottom: 16px;
      background: #fff;
    }

    textarea {
      height: auto;
      min-height: 90px;
      padding: 10px 12px;
      resize: vertical;
    }

    input[type="email"]:focus,
    input[type="date"]:focus,
    input[type="time"]:focus,
    input[type="datetime-local"]:focus,
    input[type="number"]:focus,
    input[type="text"]:focus,
    input[type="tel"]:focus,
    input[type="url"]:focus,
    input[type="search"]:focus,
    input[type="password"]:focus,
    input[type="file"]:focus,
    input[type="color"]:focus,
    select:focus,
    textarea:focus {
      outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
      outline-offset: 0;
      border-color: var(--accent);
    }

    input:read-only {
      background: #f4f5f7;
      color: var(--muted);
    }

    button {
      font: inherit;
      cursor: pointer;
      border: none;
      border-radius: 6px;
      padding: 10px 14px;
    }

    button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    main {
      padding: 24px;
      flex: 1;
    }

    input[type="color"] {
      width: 56px;
      height: 40px;
      padding: 4px;
      margin-bottom: 16px;
      cursor: pointer;
    }
/* css/layout.css */
    .page-band {
      position: relative;
      z-index: 0;
      background: var(--band-bg);
      color: var(--band-text);
      padding: 26px 32px 74px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .page-band h1 {
      font-family: var(--font-display);
      font-size: 34px;
      font-weight: 800;
      letter-spacing: -0.025em;
      margin: 0;
      color: #fff;
    }

    .page-band-sub {
      color: var(--band-muted);
      margin-top: 4px;
    }

    /* Back links on the dark band ("‹ Marketing", "Back to Admin" …) */
    .page-band .link-btn {
      color: var(--band-muted);
      font-weight: 600;
      font-size: 14px;
      min-height: 32px;
    }

    .page-band .link-btn:hover,
    .page-band .link-btn:focus-visible {
      color: #fff;
      text-decoration: underline;
    }

    .page-band-row {
      display: flex;
      flex-wrap: wrap;
      gap: 14px 26px;
      align-items: center;
      justify-content: space-between;
    }

    .page-band-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }

    .band-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .band-chip {
      display: inline-flex;
      align-items: center;
      height: 26px;
      padding: 0 10px;
      border-radius: 13px;
      background: var(--band-surface);
      color: #fff;
      font: 800 12px var(--font-body);
      white-space: nowrap;
    }

    .band-btn {
      height: 40px;
      padding: 0 16px;
      border-radius: 20px;
      border: 1.5px solid var(--band-line);
      background: transparent;
      color: #fff;
      font: 700 14px var(--font-body);
    }

    .band-btn.primary {
      background: var(--accent);
      border-color: var(--accent);
      font-weight: 800;
    }

    .band-btn.white {
      background: #fff;
      border-color: #fff;
      color: var(--text);
      font-weight: 800;
    }

    .band-btn.white:hover {
      background: var(--soft);
      border-color: var(--soft);
    }

    .band-chip.is-coral {
      background: var(--attention-strong);
      color: #fff;
    }

    .band-chip.is-green {
      background: var(--ok);
      color: #fff;
    }

    .band-btn:disabled {
      opacity: 0.5;
    }

    .band-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 24px;
      align-items: center;
    }

    .band-tab {
      border: 0;
      background: transparent;
      color: var(--band-muted);
      font-size: 14px;
      padding: 6px 0 10px;
      border-bottom: 2px solid transparent;
    }

    .band-tab .count {
      color: #8590A3;
      margin-left: 4px;
      font-weight: 400;
    }

    .band-tab.active {
      color: #fff;
      font-weight: 600;
      border-bottom-color: color-mix(in srgb, var(--accent) 55%, white);
    }

    .band-search {
      display: flex;
      align-items: center;
      gap: 8px;
      height: 38px;
      padding: 0 14px;
      border-radius: 19px;
      background: var(--band-surface);
      color: var(--band-muted);
      flex: 1 1 220px;
      max-width: 320px;
      margin-left: auto;
    }

    /* placeholders on the dark band in the band's light text colour (the browser's grey is too faint there) */
    .band-search input::placeholder {
      color: var(--band-muted);
      opacity: 1;
    }

    .band-search input {
      border: 0;
      outline: 0;
      background: transparent;
      color: #fff;
      font: inherit;
      font-size: 13px;
      width: 100%;
    }

    .band-select {
      height: 38px;
      width: auto;
      flex: 0 0 auto;
      max-width: 180px;
      border-radius: 19px;
      border: 1px solid var(--band-line);
      background: var(--band-surface);
      color: #fff;
      padding: 0 14px;
      font: 13px var(--font-body);
      appearance: auto;
      color-scheme: dark;
    }

    .band-card {
      position: relative;
      z-index: 1;
      margin: -50px 32px 24px;
      background: var(--surface);
      border-radius: var(--radius-lg);
      box-shadow: 0 1px 2px rgba(27, 21, 48, 0.06), 0 14px 34px rgba(27, 21, 48, 0.10);
      overflow: hidden;
    }

    /* Only the first visible card tucks up into the dark band; a card after it sits below it, never over it
       (Demos: Needs a sale form above the demos list). Hidden cards don't count. */
    .band-card:not(.hidden) ~ .band-card {
      margin-top: 0;
    }

    @media (max-width: 1100px) {
      .page-band {
        padding: 20px 20px 56px;
      }

      .band-card {
        margin: -36px 16px 20px;
      }

      .band-search {
        max-width: none;
      }
    }

    .band-search input,
    .band-search input:focus {
      height: auto;
      margin-bottom: 0;
      padding: 0;
      border: 0;
      border-radius: 0;
      outline: 0;
      background: transparent;
      color: #fff;
      font: inherit;
      font-size: 13px;
    }

    .band-select,
    .band-select:focus {
      height: 38px;
      width: auto;
      flex: 0 0 auto;
      max-width: 180px;
      margin-bottom: 0;
      border-radius: 19px;
      border: 1px solid var(--band-line);
      outline: 0;
      background: var(--band-surface);
      color: #fff;
      padding: 0 14px;
      font: 13px var(--font-body);
      appearance: auto;
      color-scheme: dark;
    }

    #leads-view, #detail-view, #call-lists-view, #call-list-detail-view, #calling-view, #conversations-view, #conversation-thread-view, #calendar-view, #demos-view, #riders-view, #sales-view, #boxes-view, #exhibits-view, #exhibit-view, #offices-view, #office-detail-view, #usage-view, #clients-usage-view, #surveys-view {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 16px 24px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
    }

    header h1 {
      margin: 0;
      font-size: 1.15rem;
    }

    .user-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 0.9rem;
    }

    .app-nav {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }

    .nav-link {
      background: transparent;
      color: var(--muted);
      font-weight: 600;
      padding: 6px 10px;
    }

    .nav-link:hover { color: var(--text); }

    .nav-link.active {
      color: var(--accent);
      box-shadow: inset 0 -2px 0 var(--accent);
      border-radius: 0;
    }

    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 16px;
    }

    .toolbar .status-line { margin: 0; }

    .toolbar-left {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }

    .toolbar-filter {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .toolbar-filter label {
      margin: 0;
      color: var(--muted);
      white-space: nowrap;
    }

    .toolbar-filter select {
      width: auto;
      min-width: 200px;
      margin-bottom: 0;
    }

    #app-sidebar {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: var(--sidebar-width);
      background: var(--sidebar-bg);
      display: flex;
      flex-direction: column;
      padding: 20px 12px;
      gap: 20px;
      overflow: hidden;
      z-index: 10;
    }

    #app-sidebar nav {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
    }

    body.has-sidebar {
      padding-left: var(--sidebar-width);
    }

    .sidebar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 36px;
      padding: 0 4px;
      flex-shrink: 0;
      box-shadow: inset 4px 0 0 var(--brand);
    }

    #app-sidebar .header-logo {
      max-height: 36px;
      max-width: 100%;
    }

    .brand-text {
      color: #fff;
      font-weight: 700;
      font-size: 16px;
    }

    .header-logo:not(.hidden) + .brand-text {
      display: none;
    }

    .side-link {
      display: flex;
      align-items: center;
      gap: 11px;
      width: 100%;
      min-height: 44px;
      padding: 0 12px;
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: var(--sidebar-text);
      font: 500 14px var(--font-body);
      text-align: left;
      cursor: pointer;
    }

    .side-link:hover {
      background: var(--sidebar-hover);
      color: #fff;
    }

    .side-link.active {
      background: var(--sidebar-active);
      color: #fff;
    }

    .side-link.active svg {
      stroke: color-mix(in srgb, var(--accent) 55%, white);
      stroke-width: 1.9;
    }

    #app-sidebar footer {
      flex-shrink: 0;
      margin-top: auto;
      border-top: 1px solid #1F2635;
      padding-top: 14px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    #app-sidebar .user-email {
      color: var(--sidebar-muted);
      font-size: 12px;
      word-break: break-all;
    }

    #app-sidebar .sign-out-btn {
      background: transparent;
      border: 1px solid #2A3345;
      color: var(--sidebar-text);
      border-radius: 8px;
      min-height: 36px;
      padding: 0 12px;
      cursor: pointer;
      font: 500 13px var(--font-body);
    }

    #app-sidebar .sign-out-btn:hover {
      color: #fff;
    }

    header .app-nav,
    header .header-logo,
    header .user-meta {
      display: none !important;
    }

    header {
      padding: 18px 28px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
    }

    header h1 {
      font-size: 1.3rem;
      font-weight: 700;
      letter-spacing: -0.01em;
    }

    .app-nav-btn {
      display: none;
      position: fixed;
      top: 10px;
      left: 10px;
      z-index: 25;
      width: 40px;
      height: 40px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--surface);
      color: var(--text);
      align-items: center;
      justify-content: center;
    }

    #app-nav-scrim {
      display: none;
    }

    #sidebar-expand-btn { display: none; }

    body.sidebar-collapsed {
      padding-left: var(--sidebar-width-collapsed);
    }

    body.sidebar-collapsed #app-sidebar {
      width: var(--sidebar-width-collapsed);
      padding-left: 8px;
      padding-right: 8px;
    }

    body.sidebar-collapsed .side-label,
    body.sidebar-collapsed .brand-text,
    body.sidebar-collapsed #app-sidebar .user-email,
    body.sidebar-collapsed #sidebar-collapse-btn {
      display: none;
    }

    body.sidebar-collapsed #sidebar-expand-btn {
      display: flex;
    }

    body.sidebar-collapsed .side-link {
      justify-content: center;
      padding: 0;
    }

    body.sidebar-collapsed #app-sidebar .header-logo {
      max-width: 44px;
    }

    body.sidebar-collapsed #app-sidebar .sign-out-btn {
      padding: 0 8px;
      font-size: 11px;
    }

    @media (max-width: 767px) {
      .app-nav-btn {
        display: inline-flex;
      }

      body.has-sidebar {
        padding-left: 0;
      }

      body.sidebar-collapsed {
        padding-left: 0;
      }

      #app-sidebar {
        transform: translateX(-100%);
        width: min(280px, 86vw);
        z-index: 40;
        transition: transform 200ms ease;
      }

      body.sidebar-open #app-sidebar {
        transform: translateX(0);
        width: min(280px, 86vw);
      }

      body.sidebar-open #app-nav-scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(14, 17, 23, 0.45);
        z-index: 35;
      }

      body.sidebar-open .side-label,
      body.sidebar-open .brand-text,
      body.sidebar-open #app-sidebar .user-email,
      body.sidebar-open #sidebar-collapse-btn {
        display: revert;
      }

      body.sidebar-open #sidebar-expand-btn {
        display: none;
      }

      body.sidebar-open .side-link {
        justify-content: flex-start;
        padding: 0 12px;
      }
    }

    .band-page {
      padding: 0;
    }

    .band-page .page-band .status-line {
      color: var(--band-muted);
      font-size: 14px;
      margin: 0;
    }

    .band-page .page-band .toolbar-filter {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .band-page .page-band .toolbar-filter label {
      color: var(--band-muted);
      margin: 0;
    }

    .band-page .table-wrap {
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      overflow-x: auto;
    }

    .band-page .table-wrap table th {
      height: 44px;
      padding: 0 12px;
      background: #FAFBFC;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .band-page .table-wrap td {
      height: 56px;
      padding: 8px 12px;
      vertical-align: middle;
      border-bottom: 1px solid #EEF0F3;
    }

    .band-page tbody tr:hover {
      background: #F7F8FA;
    }

    .band-page .band-tab.nav-link,
    .band-page .band-tab.nav-link:hover {
      background: transparent;
      color: var(--band-muted);
      font-weight: 400;
      font-size: 14px;
      padding: 6px 0 10px;
      box-shadow: none;
      border-radius: 0;
      border: 0;
      border-bottom: 2px solid transparent;
    }

    .band-page .band-tab.nav-link.active {
      color: #fff;
      font-weight: 600;
      box-shadow: none;
      border-bottom-color: color-mix(in srgb, var(--accent) 55%, white);
    }

    .band-check {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      height: 38px;
      padding: 0 14px;
      border-radius: 19px;
      border: 1px solid var(--band-line);
      color: #fff;
      font: 500 14px var(--font-body);
      margin: 0;
      cursor: pointer;
    }

    .band-check input {
      accent-color: var(--accent);
      margin: 0;
    }

    .band-empty {
      text-align: center;
      padding: 48px 24px 56px;
    }

    .band-empty-title {
      margin: 0 0 8px;
      font-size: 16px;
      font-weight: 600;
      color: var(--text);
    }

    .band-empty-help {
      margin: 0 auto 20px;
      max-width: 420px;
      color: var(--muted);
      font-size: 14px;
    }

    .view-as-bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 50;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 44px;
      padding: 6px 12px 6px 16px;
      background: #b42318;
      color: #fff;
    }

    .view-as-bar p {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.3;
    }

    .view-as-end {
      flex: 0 0 auto;
      min-height: 44px;
      min-width: 64px;
      padding: 0 16px;
      border: 1px solid #fff;
      border-radius: 8px;
      background: transparent;
      color: #fff;
      font-weight: 700;
    }

    body.is-view-as {
      padding-top: 44px;
    }

    body.is-view-as #app-sidebar {
      top: 44px;
    }

    body.is-view-as .app-nav-btn {
      top: 54px;
    }

    .view-as-expired {
      position: fixed;
      inset: 0;
      z-index: 60;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: var(--bg, #f4f6f8);
    }

    .view-as-expired-card {
      max-width: 420px;
      text-align: center;
    }

    .view-as-expired-card p {
      margin: 0 0 16px;
      font-size: 16px;
    }

    .view-as-expired-card .btn-primary {
      min-height: 44px;
    }

    .view-as-choice {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      font-weight: 600;
    }

    .view-as-role {
      margin: 0 0 14px;
      font-size: 15px;
      font-weight: 700;
    }

    .view-as-modes {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-bottom: 12px;
    }

    .view-as-btn {
      min-height: 44px;
      margin-left: 8px;
    }

    @media (max-width: 1100px) {
      .band-page .page-band {
        padding: 20px 20px 56px;
      }

      .band-page .band-card {
        margin: 16px;
      }

      #callbacks-panel {
        padding: 4px 16px 24px;
      }

      #callbacks-panel .band-card {
        margin: 0;
      }

      .band-page .table-wrap {
        overflow-x: auto;
      }
    }

    .app-tab-bar {
      display: none;
    }

/* RL1: callers (caller role only) get Today, Call Lists, Texts and their own Stats */
body.is-caller-only .side-link:not([data-go="today"]):not([data-go="call-lists"]):not([data-go="conversations"]):not([data-go="stats"]):not(.help-nav):not(.report-nav):not(.find-customer-nav),
body.is-caller-only .app-tab:not([data-go="today"]):not([data-go="conversations"]):not([data-go="more"]) {
  display: none !important;
}

/* RP1: Help and Report a problem are pinned under the scrolling sidebar list, so a long list (or a short screen)
   never hides them; every role sees them, callers included */
#app-sidebar .sidebar-pinned { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 8px; margin-top: -12px; }
/* CA1: Find a customer: in the sidebar for callers (others have Leads search), and on the calling screen for everyone */
body.is-caller-only .side-link.find-customer-nav { display: flex !important; }
.calling-head-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.find-customer { max-width: 520px; }
.find-customer input[type="search"] { width: 100%; margin-top: 4px; }
.find-customer-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 50vh; overflow-y: auto; }
.find-customer-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px;
  border: 1px solid var(--line, #E4E1EE); border-radius: 10px; background: var(--card, #fff); color: var(--ink, #1B1530); cursor: pointer; }
.find-customer-row:hover, .find-customer-row:focus-visible { border-color: var(--violet, #4B2EDB); }
.find-customer-meta { font-size: 13px; color: var(--muted, #6B6580); }

/* OW1: booking texts test mode (Confirmation texts page and Today) */
.test-mode-line {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: var(--radius, 14px);
  border: 1px solid var(--danger);
  background: #FBEDEA;
  color: var(--danger);
  font-weight: 600;
}
.test-mode-line.hidden { display: none; }
/* css/login.css */
    #login-view {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .login-card {
      width: 100%;
      max-width: 400px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 32px 28px;
    }

    .login-card h1 {
      margin: 0 0 6px;
      font-size: 1.4rem;
    }

    .login-card p.sub {
      margin: 0 0 24px;
      color: var(--muted);
      font-size: 0.95rem;
    }

    .login-card .btn-primary { width: 100%; }

    /* RN1: the product name, with TellUS underneath */
    .login-card .login-brand { font-size: 44px; letter-spacing: 0.06em; margin-bottom: 0; }
    .login-card .login-powered { margin: 2px 0 18px; font-size: 13px; color: var(--muted); }

    /* SI2: sign in with the code from the email */
    .login-code-to { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
    .login-code-links {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin: 12px 0 0;
      font-size: 14px;
    }
    #login-code { letter-spacing: 0.2em; font-size: 22px; text-align: center; }

    /* TS2: the email's link opens a one-tap step (scanners that open links don't tap) */
    .login-tap { margin-top: 4px; }
    .login-tap .login-code-links { justify-content: center; }
/* css/two-step.css */
    /* MF1: two-step sign-in (My profile card and the code screen after the email link) */
    #two-step-view {
      position: fixed;
      inset: 0;
      z-index: 2000;
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: var(--bg, #f6f5fa);
    }
    #two-step-view.hidden { display: none !important; }
    body.two-step-gate-on { overflow: hidden; }
    #two-step-view .field-hint { margin: -14px 0 16px; }
    .two-step-gate-foot { margin: 14px 0 0; text-align: center; font-size: 14px; }

    .two-step-card { padding: 22px; }
    .two-step-card h2 { margin: 0 0 10px; }
    .two-step-card > .msg { margin: 12px 0 0; }
    .two-step-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }
    .two-step-row .field-hint { margin: 4px 0 0; max-width: 560px; }
    .two-step-row > button { flex: none; }
    .two-step-state {
      margin: 0;
      font-weight: 600;
      color: var(--muted);
    }
    .two-step-state.on { color: #1f7a4d; }
    .two-step-state.on::before { content: "\2713  "; }

    .two-step-enroll {
      display: flex;
      gap: 24px;
      align-items: flex-start;
    }
    .two-step-qr {
      flex: none;
      width: 184px;
      height: 184px;
      padding: 8px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 10px;
    }
    .two-step-qr img { display: block; width: 100%; height: 100%; }
    .two-step-steps { flex: 1; min-width: 0; }
    .two-step-steps ol { margin: 0 0 10px; padding-left: 20px; }
    .two-step-steps li { margin: 0 0 4px; }
    .two-step-key { margin: 0 0 12px; word-break: break-all; }
    .two-step-key code { font-size: 13px; letter-spacing: 0.04em; }
    .two-step-code {
      max-width: 180px;
      font-size: 20px;
      letter-spacing: 0.2em;
      font-variant-numeric: tabular-nums;
    }
    .login-card .two-step-code { max-width: none; width: 100%; }
    .two-step-actions { display: flex; gap: 10px; margin-top: 10px; }

    @media (max-width: 640px) {
      .two-step-row { flex-direction: column; }
      .two-step-enroll { flex-direction: column; align-items: stretch; }
      .two-step-qr { align-self: center; }
      .two-step-code { max-width: none; width: 100%; }
    }
/* css/components.css */
    button:not(.band-btn):not(.band-tab):not(.detail-action):not(.side-link):not(.sign-out-btn):focus-visible,
    .btn-primary:focus-visible,
    .btn-secondary:focus-visible,
    .btn-ghost:focus-visible {
      outline: 2px solid color-mix(in srgb, var(--accent) 60%, white);
      outline-offset: 2px;
    }

    .btn-primary {
      background: var(--accent);
      color: #fff;
      border: 0;
      height: 42px;
      padding: 0 18px;
      border-radius: 21px;
      font: 800 14px var(--font-body);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      cursor: pointer;
    }

    .btn-primary:hover:not(:disabled) {
      background: var(--accent-hover);
    }

    .btn-secondary {
      background: #fff;
      color: var(--text);
      border: 1.5px solid var(--border-strong);
      height: 42px;
      padding: 0 16px;
      border-radius: 21px;
      font: 700 14px var(--font-body);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      cursor: pointer;
    }

    .btn-secondary:hover:not(:disabled) {
      background: var(--soft);
    }

    .btn-ghost {
      background: transparent;
      color: var(--muted);
      border: 0;
      height: 38px;
      padding: 0 18px;
      border-radius: 19px;
      font: 500 14px var(--font-body);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .btn-ghost:hover:not(:disabled) {
      color: var(--text);
      background: #F3F4F6;
    }

    .btn-danger {
      background: #fff;
      color: #B42318;
      border: 1px solid #F1C0BA;
      height: 38px;
      padding: 0 18px;
      border-radius: 19px;
      font: 500 14px var(--font-body);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .btn-danger:hover:not(:disabled) {
      background: #FEF3F2;
    }

    .msg {
      margin-top: 14px;
      font-size: 0.9rem;
    }

    .msg.error { color: var(--danger); }

    .field-problem {
      color: var(--danger);
      font-size: 13px;
      margin: 4px 0 10px;
    }

    .msg.success { color: var(--ok); }

    .inline-field {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 16px;
    }

    .inline-field input { width: 120px; margin-bottom: 0; }

    .inline-field span { color: var(--muted); }

    .check-col {
      width: 36px;
      text-align: center;
    }

    .actions-col {
      width: 44px;
      text-align: right;
    }

    .row-menu-btn {
      font-size: 1.2rem;
      line-height: 1;
      letter-spacing: 0.08em;
      padding: 4px 8px;
      color: var(--muted);
    }

    .row-menu-btn:hover { color: var(--text); }

    .row-menu {
      position: fixed;
      z-index: 30;
      min-width: 188px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(26, 29, 35, 0.14);
      padding: 6px;
    }

    .row-menu button {
      display: block;
      width: 100%;
      text-align: left;
      background: transparent;
      color: var(--text);
      font-weight: 500;
      padding: 8px 10px;
      border-radius: 6px;
    }

    .row-menu button:hover { background: var(--bg); }

    .status-line {
      margin: 0 0 16px;
      color: var(--muted);
      font-size: 0.95rem;
    }

    .table-wrap {
      overflow-x: auto;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
    }

    th, td {
      text-align: left;
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }

    .table-wrap table th {
      height: 40px;
      padding: 0 12px;
      background: #FAFBFC;
      font-weight: 600;
      font-size: 11px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .table-wrap table td {
      padding: 10px 12px;
      border-bottom: 1px solid #EEF0F3;
    }

    th {
      background: #f8f9fb;
      font-weight: 600;
      font-size: 0.8rem;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      color: var(--muted);
    }

    tbody tr:last-child td { border-bottom: none; }

    .table-wrap table tbody tr:hover { background: #F7F8FA; }

    tbody tr.row-click { cursor: pointer; }

    .empty, .error-banner {
      padding: 24px;
      color: var(--muted);
    }

    .error-banner { color: var(--danger); }

    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      margin-bottom: 16px;
    }

    .card h2 {
      margin: 0 0 14px;
      font-size: 15px;
      font-weight: 600;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      height: 24px;
      padding: 0 10px;
      border-radius: 12px;
      font: 500 12px var(--font-body);
      background: #F1F3F6;
      color: #3B4352;
      border: 1px solid transparent;
      white-space: nowrap;
    }

    .badge-warn {
      background: #fef6e8;
      color: #8a5a12;
      border-color: #ead7b0;
    }

    .cell-with-badge,
    .kv-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .choice-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 16px;
    }

    .choice {
      background: #fff;
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 0.9rem;
      padding: 8px 12px;
    }

    .choice.selected {
      background: color-mix(in srgb, var(--accent) 12%, white);
      color: var(--accent);
      border-color: var(--accent);
      font-weight: 600;
    }

    .badge-muted {
      background: #f3f4f6;
      color: var(--muted);
      border-color: var(--border);
    }

    .badge-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .field-hint {
      color: var(--muted);
      font-size: 0.8rem;
      font-weight: 400;
      margin: -8px 0 16px;
    }

    .chip-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      min-height: 32px;
      margin-bottom: 10px;
    }

    .chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #eef3f8;
      color: var(--accent);
      border: 1px solid #d5e0ec;
      border-radius: 999px;
      padding: 4px 8px 4px 10px;
      font-size: 0.85rem;
      font-weight: 600;
    }

    .chip button {
      background: transparent;
      color: var(--muted);
      padding: 0 4px;
      line-height: 1;
      font-size: 1rem;
    }

    .chip button:hover { color: var(--danger); }

    .add-inline {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .add-inline input {
      margin-bottom: 0;
      flex: 1;
    }

    .add-inline button { flex-shrink: 0; }

    .check-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 16px;
      font-size: 0.95rem;
    }

    .check-row input { margin: 0; }

    .check-row label { margin: 0; font-weight: 500; }

    .list-item {
      border-top: 1px solid var(--border);
      padding: 12px 0;
    }

    .list-item:first-of-type { border-top: none; padding-top: 0; }

    .list-meta {
      color: var(--muted);
      font-size: 0.85rem;
      margin-bottom: 4px;
    }

    .list-body { white-space: pre-wrap; }

    .muted { color: var(--muted); }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(14, 17, 23, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      z-index: 20;
    }

    .modal {
      background: #fff;
      border-radius: 16px;
      border: 1px solid var(--border);
      box-shadow: 0 24px 60px rgba(14, 17, 23, 0.25);
      padding: 24px;
      width: 100%;
      max-width: 520px;
      max-height: 90vh;
      overflow: auto;
    }

    .modal.modal-wide { max-width: 720px; }

    .modal.modal-with-picker {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      max-height: 90vh;
      max-width: 560px;
    }

    .modal.modal-wide.modal-with-picker {
      max-width: 720px;
    }

    .modal.modal-with-picker h2 {
      flex-shrink: 0;
    }

    .modal.modal-with-picker form {
      display: flex;
      flex-direction: column;
      min-height: 0;
      flex: 1 1 auto;
      overflow: hidden;
    }

    .modal.modal-with-picker .modal-with-picker-body {
      flex: 1 1 auto;
      min-height: 0;
      overflow: auto;
    }

    .modal.modal-with-picker .modal-actions {
      flex-shrink: 0;
      margin-top: 0;
      padding-top: 12px;
      border-top: 1px solid var(--border);
      background: #fff;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0 12px;
    }

    .form-grid .full { grid-column: 1 / -1; }

    .map-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px 12px;
      align-items: center;
      margin-bottom: 8px;
    }

    .map-row select { margin-bottom: 0; }

    .progress-track {
      height: 8px;
      background: var(--soft);
      border-radius: 4px;
      overflow: hidden;
      margin: 12px 0 16px;
    }

    .progress-fill {
      height: 100%;
      width: 0%;
      background: var(--accent);
    }

    .modal h2 {
      margin: 0 0 16px;
      font-size: 20px;
      font-weight: 700;
    }

    .modal-section {
      margin: 4px 0 12px;
      font-size: 1rem;
      font-weight: 600;
    }

    .modal-section.split {
      margin-top: 8px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }

    .modal-actions {
      display: flex;
      flex-wrap: wrap; /* d25c89e1: on a narrow phone the buttons wrap instead of running off the edge */
      justify-content: flex-end;
      gap: 8px;
      margin-top: 8px;
    }

    .row-menu {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
      padding: 4px 0;
    }

    .row-menu button {
      padding: 9px 14px;
      font-size: 13px;
      width: 100%;
      text-align: left;
    }

    .row-menu button:hover {
      background: #F3F4F6;
    }

    .status-dot-cell {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
    }

    .status-dot-cell .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .link-btn {
      border: 0;
      background: none;
      color: var(--accent);
      font: 500 13px var(--font-body);
      cursor: pointer;
      padding: 0;
    }

    .modal-sheet {
      padding: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      max-height: min(90vh, 760px);
    }

    .modal-sheet form {
      padding: 16px 20px 0;
      overflow: auto;
    }

    .modal-strip {
      background: var(--band-bg);
      color: #fff;
      padding: 16px 20px;
    }

    .modal-strip h2 {
      margin: 0;
      color: #fff;
    }

    .modal-strip-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .modal-strip-sub {
      margin: 8px 0 0;
      color: var(--band-muted);
      font-size: 13px;
    }

    .modal-strip-close {
      border: 0;
      background: var(--band-surface);
      color: #fff;
      width: 32px;
      height: 32px;
      border-radius: 8px;
    }

    .modal-actions-sticky {
      position: sticky;
      bottom: 0;
      background: #fff;
      padding: 12px 20px 16px;
      margin: 0;
      border-top: 1px solid var(--border);
    }

    .req-tag {
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
    }

    .choice.selected::before {
      content: "✓ ";
    }

    .menu-divider {
      border: 0;
      border-top: 1px solid var(--border);
      margin: 4px 0;
    }

    .row-menu .menu-danger {
      color: var(--danger);
    }

    .app-toast {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 80;
      background: var(--band-bg);
      color: #fff;
      padding: 10px 16px;
      border-radius: 13px;
      font-size: 14px;
      box-shadow: 0 8px 24px rgba(27, 21, 48, 0.2);
    }

    .status-pill {
      display: inline-flex;
      align-items: center;
      height: 26px;
      padding: 0 10px;
      border-radius: 13px;
      font: 800 12px var(--font-body);
      white-space: nowrap;
    }

    .status-pill.violet { background: var(--soft); color: var(--accent); }
    .status-pill.green { background: var(--ok-bg); color: var(--ok); }
    .status-pill.coral { background: var(--attention-bg); color: var(--attention); }
    .status-pill.amber { background: var(--wait-bg); color: var(--wait); }
    .status-pill.grey { background: var(--soft); color: var(--muted); }

    .stat-tile .stat-label {
      margin: 0;
      font: 800 12px var(--font-body);
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .stat-tile .stat-value {
      margin: 4px 0 0;
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 30px;
      line-height: 1.1;
      color: var(--text);
    }

    .stat-tile .stat-pace {
      margin: 6px 0 0;
      font-size: 13px;
      color: var(--muted);
    }

    .sheet-handle { display: none; }

    @media (max-width: 759px) {
      .modal-backdrop.is-sheet {
        align-items: flex-end;
        padding: 0;
      }

      .modal-backdrop.is-sheet .modal {
        width: 100%;
        max-width: none;
        margin: 0;
        max-height: 92vh;
        border-radius: 28px 28px 0 0;
        animation: kit-sheet-in 220ms ease;
      }

      .modal-backdrop.is-sheet .sheet-handle {
        display: block;
        width: 40px;
        height: 5px;
        margin: 10px auto 8px;
        border-radius: 3px;
        background: var(--border-strong);
        flex: none;
        touch-action: none;
      }

      .modal-backdrop.is-sheet .modal.is-dragging {
        animation: none;
        transition: none;
      }

      .btn-primary,
      .btn-secondary,
      .band-btn {
        min-height: 44px;
        height: 44px;
        border-radius: 22px;
      }
    }

    @keyframes kit-sheet-in {
      from { transform: translateY(100%); }
      to { transform: translateY(0); }
    }

    .kit-section { margin: 0 0 28px; }
    .kit-section h2 { margin: 0 0 10px; font-size: 20px; font-weight: 800; }
    .kit-swatches {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
      gap: 10px;
    }
    .kit-swatch {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }
    .kit-swatch i { display: block; height: 48px; }
    .kit-swatch span, .kit-swatch small {
      display: block;
      padding: 0 10px;
    }
    .kit-swatch span { padding-top: 8px; font-size: 12px; font-weight: 700; }
    .kit-swatch small { padding-bottom: 8px; color: var(--muted); font-size: 11px; }
    .kit-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
    .kit-type { display: flex; flex-direction: column; gap: 8px; }
    .kit-type-display { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1.1; }
    .kit-type-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
    .kit-type-body { margin: 0; font-size: 16px; }
    .kit-type-secondary { margin: 0; font-size: 14px; color: var(--muted); }
    .kit-type-label { margin: 0; font: 800 12px var(--font-body); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
    .kit-dark {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      background: var(--band-bg);
      border-radius: var(--radius-lg);
      padding: 16px;
    }
    #styleguide-view .band-card { padding: 20px 22px 8px; }

    /* UI1: a sheet's middle part scrolls inside the window (its coloured header, handle and sticky buttons
       stay put), whatever the middle part is (a form, a list, the Help panel's tabs). */
    .modal-sheet > :not(.modal-strip):not(.sheet-handle):not(.modal-actions):not(.modal-actions-sticky):not(h2) {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    /* LD3: setting the Lead dealer on the lead page */
    #detail-assigned .lead-dealer-change { margin-left: 10px; font-size: 13px; white-space: nowrap; }
    #detail-assigned .lead-dealer-name-btn { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
    #detail-assigned .lead-dealer-name-btn:hover, #detail-assigned .lead-dealer-name-btn:focus-visible { color: #4B2EDB; }
    #detail-assigned .lead-dealer-set { font-size: 14px; }
    #detail-assigned.person-line { flex-wrap: wrap; row-gap: 2px; }
    #detail-assigned .lead-dealer-name-btn { overflow-wrap: normal; word-break: normal; }

    /* BO1: Booked on (Book a demo, Book an Instaset, paper Instant Set sheets, Correct on the lead page) */
    .bo1-field input[type="date"] { width: 100%; min-height: 44px; }
    .bo1-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
    .bo1-paper input[type="date"] { min-height: 32px; margin-left: 4px; }
    .bo1-modal input[type="date"] { width: 100%; min-height: 44px; }

/* CU1 (MPA 7b473801): "Already a customer: bought <date>" on the lead page and the calling card */
.customer-line .customer-sale-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
#calling-customer.customer-line { margin: 4px 0 0; font-weight: 700; color: var(--attention); }

/* 541ba888: while the page is zoomed in, open dialogs cover only what the person sees (js/modal-fit.js) */
html.vv-zoomed .modal-backdrop {
  inset: auto;
  left: var(--vv-left, 0);
  top: var(--vv-top, 0);
  width: var(--vv-width, 100vw);
  height: var(--vv-height, 100vh);
}
html.vv-zoomed .modal-backdrop .modal {
  max-width: 100%;
  max-height: calc(var(--vv-height, 100vh) * 0.92);
  overflow-y: auto;
  overflow-x: hidden;
}
@media (max-width: 759px) {
  /* a phone zooms the page in when a field with small text is tapped: 16 px text keeps it from zooming */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; }
}

    /* DB1: the in-app confirm window above Book a demo (askToConfirm with top: true) */
    #app-confirm-modal.is-top { z-index: 60; }
/* css/avatar.css */
    .person-avatar {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: none;
      border-radius: 50%;
      color: #fff;
      font-weight: 800;
      font-family: var(--font-body);
      overflow: hidden;
      line-height: 1;
      user-select: none;
      letter-spacing: 0.02em;
    }

    .person-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .person-avatar-sm {
      width: 24px;
      height: 24px;
      font-size: 10px;
    }

    .person-avatar-md {
      width: 36px;
      height: 36px;
      font-size: 13px;
    }

    .person-avatar-lg {
      width: 96px;
      height: 96px;
      font-size: 32px;
    }

    .person-line {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      max-width: 100%;
    }

    .person-line-text {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .person-give {
      gap: 8px;
    }

    .sidebar-account {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 44px;
      padding: 4px;
      border: 0;
      border-radius: 12px;
      background: transparent;
      color: inherit;
      text-align: left;
      cursor: pointer;
    }

    .sidebar-account:hover {
      background: rgba(255, 255, 255, 0.06);
    }

    .sidebar-account-copy {
      display: flex;
      flex-direction: column;
      min-width: 0;
      gap: 1px;
    }

    .sidebar-account-name {
      color: #fff;
      font-weight: 700;
      font-size: 14px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sidebar-account-hint {
      color: var(--sidebar-muted);
      font-size: 12px;
    }

    body.sidebar-collapsed .sidebar-account-copy {
      display: none;
    }

    body.sidebar-collapsed .sidebar-account {
      justify-content: center;
      padding: 0;
    }

    #profile-status {
      padding: 22px 22px 0;
    }

    .profile-body {
      padding: 22px;
      display: grid;
      gap: 22px;
    }

    .profile-photo-row {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }

    .profile-photo-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .profile-photo-actions .btn-secondary,
    .profile-photo-actions .btn-ghost,
    .profile-home-actions .btn-primary {
      min-height: 44px;
    }

    .profile-home-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 140px;
      gap: 12px;
      max-width: 520px;
    }

    .profile-share {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .profile-share p {
      margin: 4px 0 0;
    }

    .profile-share .toggle {
      width: 44px;
      height: 44px;
    }

    .profile-share .toggle-slider {
      top: 10px;
      bottom: auto;
      height: 24px;
    }

    .staff-home-line {
      margin: 4px 0 0 32px;
      color: var(--muted);
      font-size: 13px;
    }

    .staff-home-photo {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
      flex-wrap: wrap;
    }

    .photo-crop-backdrop {
      z-index: 90;
    }

    .photo-crop-stage {
      position: relative;
      width: min(280px, 70vw);
      height: min(280px, 70vw);
      margin: 8px auto 14px;
      border-radius: 50%;
      overflow: hidden;
      background: #1B1530;
      touch-action: none;
      cursor: grab;
    }

    .photo-crop-stage img {
      position: absolute;
      max-width: none;
      user-select: none;
      pointer-events: none;
    }

    .photo-crop-zoom {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
    }

    .photo-crop-zoom input {
      flex: 1;
      min-height: 44px;
    }

    .cal-dealer.is-drag-target .person-avatar {
      box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent);
    }

    .cal-col-head .person-line .cal-col-name {
      flex: 1;
      min-width: 0;
    }

    .capture-tag {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .capture-tag.is-on .person-avatar {
      box-shadow: 0 0 0 2px #fff;
    }

    @media (max-width: 759px) {
      .profile-home-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 767px) {
      body.sidebar-open .sidebar-account-copy {
        display: flex;
      }

      body.sidebar-open .sidebar-account {
        justify-content: flex-start;
        padding: 4px;
      }
    }
/* css/leads.css */
    #leads-view {
      background: var(--bg);
    }

    #add-lead-dynamic-fields {
      margin-top: 8px;
      padding-top: 4px;
    }

    .modal-add-lead {
      padding: 0;
      max-width: 720px;
    }

    .modal-add-lead .modal-strip h2 {
      margin: 0;
      color: #fff;
    }

    .modal-add-lead form {
      padding: 0;
    }

    .modal-add-lead .modal-with-picker-body {
      padding: 16px 20px 8px;
    }

    .modal-add-lead .modal-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
      padding: 12px 20px 16px;
    }

    .modal-add-lead .modal-actions button {
      min-height: 44px;
    }

    .add-lead-place {
      display: grid;
      grid-template-columns: 1.4fr 0.7fr 0.8fr;
      gap: 0 12px;
      margin-bottom: 8px;
    }

    .add-lead-place input {
      font-size: 13px;
    }

    .add-lead-match {
      margin: 6px 0 0;
      font-size: 14px;
    }

    .add-lead-check {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      margin: 4px 0 8px;
      font-weight: 500;
    }

    .add-lead-check input {
      width: 18px;
      height: 18px;
      margin: 0;
    }

    .add-lead-fold {
      margin: 4px 0 12px;
    }

    .add-lead-fold summary {
      display: flex;
      align-items: center;
      min-height: 44px;
      cursor: pointer;
      font-weight: 600;
    }

    .add-lead-note textarea {
      width: 100%;
      box-sizing: border-box;
    }

    .source-picker input {
      width: 100%;
      box-sizing: border-box;
    }

    .source-picker-menu {
      position: fixed;
      z-index: 80;
      overflow: auto;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 12px 32px rgba(14, 17, 23, 0.16);
    }

    .source-picker-menu.hidden {
      display: none;
    }

    .source-picker-item {
      display: block;
      width: 100%;
      min-height: 44px;
      padding: 10px 12px;
      border: 0;
      border-bottom: 1px solid var(--border);
      background: #fff;
      text-align: left;
      font: inherit;
      color: inherit;
      cursor: pointer;
    }

    .source-picker-item:last-child {
      border-bottom: 0;
    }

    .source-picker-item:hover,
    .source-picker-item.is-on {
      background: #f6f7f9;
    }

    .source-picker-empty {
      margin: 0;
      padding: 12px;
      color: var(--muted);
      font-size: 14px;
    }

    @media (max-width: 767px) {
      #add-lead-modal {
        padding: 0;
        align-items: stretch;
      }

      #add-lead-modal .modal-add-lead {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
      }

      .modal-add-lead .form-grid,
      .add-lead-place,
      .book-new-grid {
        grid-template-columns: 1fr;
      }

      .add-lead-place .add-lead-city {
        grid-column: auto;
      }

      .modal-add-lead .modal-actions {
        flex-direction: column;
      }

      .modal-add-lead .modal-actions button {
        width: 100%;
      }
    }

    #leads-view .table-wrap ,     .leads-host .table-wrap {
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      overflow-x: auto;
    }

    #leads-view th, .leads-host th {
      height: 40px;
      padding: 0 12px;
      background: #FAFBFC;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    #leads-view td, .leads-host td {
      padding: 8px 12px;
      vertical-align: middle;
      white-space: normal;
      border-bottom: 1px solid #EEF0F3;
    }

    #leads-view .lead-name-cell,
    .leads-host .lead-name-cell,
    #leads-view .lead-source-cell ,     .leads-host .lead-source-cell {
      max-width: 240px;
    }

    .lead-dnc-line {
      margin-top: 4px;
    }

    #leads-view .lead-name,
    .leads-host .lead-name,
    #leads-view .lead-source ,     .leads-host .lead-source {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    #leads-view .lead-source,
    .leads-host .lead-source {
      white-space: normal;
      font-size: 14px;
    }

    #leads-view .lead-name ,     .leads-host .lead-name {
      font-weight: 500;
    }

    #leads-view .lead-name-link ,     .leads-host .lead-name-link {
      display: block;
      width: 100%;
      max-width: 100%;
      margin: 0;
      padding: 0;
      border: 0;
      background: none;
      font: inherit;
      font-weight: 500;
      color: inherit;
      text-align: left;
      cursor: pointer;
    }

    #leads-view .lead-name-link:hover ,     .leads-host .lead-name-link:hover {
      text-decoration: underline;
    }

    #leads-view .lead-name-link:focus-visible ,     .leads-host .lead-name-link:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      border-radius: 2px;
    }

    #leads-view .lead-phone ,     .leads-host .lead-phone {
      font-size: 13px;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
    }

    #leads-view .lead-booked ,     .leads-host .lead-booked {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--muted);
    }

    #leads-view .lead-created ,     .leads-host .lead-created {
      font-size: 12px;
      color: var(--muted);
    }

    #leads-view tbody tr:hover ,     .leads-host tbody tr:hover {
      background: #F7F8FA;
    }

    #leads-view tbody tr.row-selected ,     .leads-host tbody tr.row-selected {
      background: color-mix(in srgb, var(--accent) 7%, white);
    }

    #leads-view tbody tr.row-active ,     .leads-host tbody tr.row-active {
      background: color-mix(in srgb, var(--accent) 10%, white);
    }

    #leads-view tbody tr.row-highlight ,     .leads-host tbody tr.row-highlight {
      background: color-mix(in srgb, var(--accent) 8%, white);
      outline: 2px solid var(--accent);
      outline-offset: -2px;
    }

    #leads-view .att-con-wrap ,     .leads-host .att-con-wrap {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: default;
    }

    /* Att / Con: a phone (tried, with the number of tries) and a tick (reached); faint when not yet */
    #leads-view .att-con-mark ,     .leads-host .att-con-mark {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      color: #B5AECB;
    }

    #leads-view .att-con-mark.on ,     .leads-host .att-con-mark.on { color: var(--accent); }

    #leads-view .att-con-mark.is-reached.on ,     .leads-host .att-con-mark.is-reached.on { color: var(--ok); }

    #leads-view .att-con-count ,     .leads-host .att-con-count {
      font-size: 12px;
      font-weight: 700;
      color: var(--text);
    }

    #leads-view .lead-status-cell ,     .leads-host .lead-status-cell {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    #leads-view .status-dot ,     .leads-host .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    #leads-view .row-menu-btn ,     .leads-host .row-menu-btn {
      width: 32px;
      height: 32px;
      padding: 0;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    /* the row's ⋯ shows on hover (or keyboard focus) where there is a mouse; always on touch screens */
    @media (hover: hover) and (pointer: fine) {
      #leads-view tbody .row-menu-btn ,       .leads-host tbody .row-menu-btn { opacity: 0; }
      #leads-view tbody tr:hover .row-menu-btn,
      #leads-view tbody tr:focus-within .row-menu-btn,
      #leads-view tbody tr.row-active .row-menu-btn,
      .leads-host tbody tr:hover .row-menu-btn,
      .leads-host tbody tr:focus-within .row-menu-btn,
      .leads-host tbody tr.row-active .row-menu-btn { opacity: 1; }
    }

    #leads-view .row-menu-btn:hover ,     .leads-host .row-menu-btn:hover {
      background: #EEF0F3;
      color: var(--text);
    }

    #leads-view select,
    .leads-host select,
    #leads-view input:not([type="checkbox"]) ,     .leads-host input:not([type="checkbox"]) {
      height: 34px;
      font-size: 13px;
      font-family: inherit;
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 0 10px;
    }

    #leads-view .band-select ,     .leads-host .band-select {
      height: 38px;
      width: auto;
      flex: 0 0 auto;
      max-width: 180px;
      border-radius: 19px;
      border: 1px solid var(--band-line);
      background: var(--band-surface);
      color: #fff;
      padding: 0 14px;
      font: 13px var(--font-body);
    }

    #leads-view .band-search input ,     .leads-host .band-search input {
      height: auto;
      border: 0;
      padding: 0;
      background: transparent;
      color: #fff;
      font: inherit;
      font-size: 13px;
      border-radius: 0;
    }

    #leads-view .band-btn ,     .leads-host .band-btn {
      height: 38px;
      padding: 0 16px;
      border-radius: 19px;
      font-size: 14px;
    }

    #create-call-list-btn {
      max-width: min(100%, 320px);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    #leads-view .page-band .toolbar-filter label {
      color: var(--band-muted);
    }

    #leads-view .toolbar-filter select,
    .leads-host .toolbar-filter select,
    #leads-view .toolbar-filter .band-select ,     .leads-host .toolbar-filter .band-select {
      min-width: 200px;
      max-width: none;
    }

    #leads-view .status-line ,     .leads-host .status-line {
      font-size: 13px;
      color: var(--muted);
    }

    #leads-view .band-tab {
      height: auto;
      border: 0;
      border-bottom: 2px solid transparent;
      border-radius: 0;
      padding: 6px 0 10px;
      background: transparent;
    }

    #leads-view .band-tab.active {
      border-bottom-color: color-mix(in srgb, var(--accent) 55%, white);
    }

    #leads-view #leads-status-tabs {
      width: auto;
      flex: 0 1 auto;
    }

    #leads-view #leads-status-more {
      margin-left: 4px;
      width: auto;
      flex: 0 0 auto;
      max-width: 180px;
    }

    #leads-view #leads-flash {
      margin: 12px 16px 0;
    }

    #leads-view .leads-search-tools {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: auto;
      flex-wrap: wrap;
    }

    #leads-view .leads-search-tools .band-search {
      margin-left: 0;
    }

    #leads-view .leads-click-pref {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0;
      color: var(--band-muted);
      font-size: 13px;
      white-space: nowrap;
    }

    #leads-view .leads-click-pref select {
      margin: 0;
    }

    #leads-view .leads-kbd-hint ,     .leads-host .leads-kbd-hint {
      display: none;
      margin: 0;
      padding: 0 16px 12px;
      font-size: 12px;
      color: var(--muted);
    }

    @media (min-width: 1101px) {
      #leads-view .leads-kbd-hint ,       .leads-host .leads-kbd-hint {
        display: block;
      }
    }

    #leads-view main.preview-open .col-city,
    #leads-view main.preview-open .col-booked,
    #leads-view main.preview-open .col-office,
    #exhibit-view main.preview-open .col-city,
    #exhibit-view main.preview-open .col-booked,
    #exhibit-view main.preview-open .col-office {
      display: none;
    }

    #leads-view .band-card .leads-pager,
    .leads-host .band-card .leads-pager,
    #leads-view #leads-pager {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 16px;
      margin-top: 0;
      font-size: 13px;
      color: var(--muted);
    }

    #leads-view .leads-pager-controls ,     .leads-host .leads-pager-controls {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    #leads-view main {
      padding: 0;
      transition: padding-right 280ms cubic-bezier(0.22, 0.8, 0.2, 1);
    }

    #leads-view main.preview-open,
    #exhibit-view main.preview-open {
      padding-right: 420px;
    }

    #leads-view .page-band.leads-band {
      padding-bottom: 0;
    }

    #leads-view .leads-tools {
      background: var(--band-bg);
      padding: 0 32px 74px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    @media (max-width: 1100px) {
      #leads-view .leads-tools {
        padding: 0 20px 56px;
      }
    }

    body.leads-on-exhibit #exhibit-view .leads-tools {
      background: transparent;
      padding: 0;
      gap: 10px;
    }

    body.leads-on-exhibit #exhibit-view .leads-host .band-card {
      margin: 12px 0 0;
      box-shadow: none;
      border-radius: 14px;
      overflow: auto;
    }

    body.leads-on-exhibit #exhibit-view .leads-board {
      margin: 12px 0 0;
    }

    body.leads-on-exhibit #exhibit-view .leads-band-search {
      background: var(--soft);
      color: var(--muted);
    }

    body.leads-on-exhibit #exhibit-view .leads-band-search input,
    body.leads-on-exhibit #exhibit-view .band-search input {
      color: var(--text);
    }

    body.leads-on-exhibit #exhibit-view .leads-view-switch {
      background: var(--soft);
    }

    body.leads-on-exhibit #exhibit-view .leads-views-chip,
    body.leads-on-exhibit #exhibit-view .leads-quick-main,
    body.leads-on-exhibit #exhibit-view .leads-quick-add,
    body.leads-on-exhibit #exhibit-view .leads-filter-chip {
      border-color: var(--border);
      background: #fff;
      color: var(--text);
    }

    body.leads-on-exhibit #exhibit-view .leads-views-chip.is-on {
      background: var(--soft);
      border-color: var(--border);
      color: var(--text);
    }

    body.leads-on-exhibit #exhibit-view .leads-clear-all {
      color: var(--accent);
    }

    body.leads-on-exhibit #create-call-list-btn {
      height: 42px;
      border-radius: 21px;
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }

    #exhibits-view tbody tr.row-click {
      cursor: pointer;
    }

    .lead-booked-history {
      color: var(--muted);
    }

    .leads-view-switch {
      display: flex;
      flex: 0 0 auto;
      gap: 2px;
      padding: 4px;
      border-radius: 999px;
      background: var(--band-surface);
    }

    .leads-view-switch button {
      min-height: 36px;
      padding: 0 14px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: var(--band-muted);
      font: 700 14px var(--font-body);
      cursor: pointer;
    }

    .leads-view-switch button.is-on {
      background: #fff;
      color: var(--text);
    }

    #leads-view.is-board #leads-status-tabs ,     .leads-host.is-board #leads-status-tabs {
      display: none;
    }

    #leads-view.is-board .band-card ,     .leads-host.is-board .band-card {
      display: none;
    }

    .leads-board {
      display: none;
      position: relative;
      z-index: 1;
      gap: 12px;
      margin: -50px 32px 24px;
      overflow-x: auto;
      align-items: flex-start;
      padding-bottom: 12px;
    }

    #leads-view.is-board .leads-board ,     .leads-host.is-board .leads-board {
      display: flex;
    }

    .leads-board-col {
      flex: 0 0 260px;
      width: 260px;
      min-width: 0;
      background: #ECE9F7;
      border-radius: 16px;
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .leads-board-col.is-sale {
      background: #DDF3E7;
    }

    .leads-board-col.is-closed {
      flex-basis: 128px;
      width: 128px;
    }

    .leads-board-col.is-closed.is-open {
      flex-basis: 280px;
      width: 280px;
    }

    .leads-board-col.is-hot {
      box-shadow: inset 0 0 0 2px var(--accent);
    }

    .leads-board-col.is-deny {
      box-shadow: inset 0 0 0 2px var(--coral, #A3321E);
    }

    .board-head {
      display: flex;
      flex-direction: column;
      gap: 2px;
      width: 100%;
      padding: 0;
      border: 0;
      background: transparent;
      text-align: left;
      color: var(--text);
      cursor: default;
    }

    .leads-board-col.is-closed .board-head {
      cursor: pointer;
      min-height: 44px;
    }

    .board-title {
      font-family: var(--font-display);
      font-size: 16px;
      font-weight: 800;
      line-height: 1.2;
    }

    .board-count {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .board-conv {
      min-height: 16px;
      color: var(--accent);
      font-size: 12px;
      font-weight: 800;
    }

    .board-hint {
      display: none;
      margin: 0;
      padding: 10px;
      border: 1.5px dashed var(--accent);
      border-radius: 12px;
      color: var(--accent);
      font-size: 13px;
      font-weight: 700;
      text-align: center;
    }

    .leads-board-col.is-deny .board-hint {
      border-color: #A3321E;
      color: #A3321E;
    }

    .leads-board-col.is-hot .board-hint,
    .leads-board-col.is-deny .board-hint {
      display: block;
    }

    .board-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 0;
    }

    .board-card {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      width: 100%;
      padding: 12px;
      border: 0;
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 1px 2px rgba(27, 21, 48, 0.06);
      text-align: left;
      cursor: pointer;
      -webkit-user-select: none;
      user-select: none;
    }

    .leads-board.is-draggable .board-card {
      cursor: grab;
    }

    .board-card-ghost,
    .board-card-chosen,
    .board-card-lift {
      box-shadow: 0 12px 28px rgba(27, 21, 48, 0.2);
      cursor: grabbing;
    }

    .board-card-ghost {
      opacity: 0.9;
    }

    .board-card strong {
      font-size: 15px;
      font-weight: 800;
    }

    .board-meta {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.3;
    }

    .board-empty,
    .board-error {
      margin: 4px 0;
      color: var(--muted);
      font-size: 13px;
    }

    .board-error {
      color: #A3321E;
    }

    .board-more {
      min-height: 44px;
      border: 0;
      border-radius: 999px;
      background: #fff;
      color: var(--accent);
      font: 700 14px var(--font-body);
      cursor: pointer;
    }

    .board-closed-count {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin: 0;
      font-size: 13px;
    }

    .board-closed-count strong {
      font-variant-numeric: tabular-nums;
    }

    .board-ask {
      position: fixed;
      inset: 0;
      z-index: 40;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      background: rgba(14, 17, 23, 0.5);
    }

    .board-ask-card {
      width: min(420px, 100%);
      padding: 20px;
      border-radius: 20px;
      background: #fff;
      box-shadow: 0 16px 40px rgba(27, 21, 48, 0.18);
    }

    .board-ask-card h2 {
      margin: 0 0 8px;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
    }

    .board-ask-card p {
      margin: 0 0 14px;
      color: var(--muted);
    }

    .board-ask-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .board-ask-actions button {
      min-height: 44px;
    }

    .lead-preview-move-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      width: 100%;
    }

    .lead-preview-move-list button {
      min-height: 44px;
      text-align: left;
    }

    @media (max-width: 1100px) {
      .leads-board {
        margin: -36px 16px 20px;
      }

      .leads-view-switch button {
        min-height: 44px;
      }
    }

    @media (max-width: 759px) {
      .leads-board {
        flex-direction: column;
        overflow-x: hidden;
      }

      .leads-board-col,
      .leads-board-col.is-closed,
      .leads-board-col.is-closed.is-open {
        flex: 1 1 auto;
        width: 100%;
      }
    }

    #leads-view .leads-saved-views ,     .leads-host .leads-saved-views {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      min-width: 0;
    }

    .leads-view-pill {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      height: 32px;
      max-width: 100%;
      padding: 0 4px 0 2px;
      border-radius: 16px;
      background: var(--band-surface);
      color: #fff;
      border: 1.5px solid transparent;
    }

    .leads-view-pill.is-on {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    .leads-view-pill-main,
    .leads-view-pill-more {
      border: 0;
      background: transparent;
      color: inherit;
      font: 700 13px var(--font-body);
    }

    .leads-view-pill-main {
      height: 28px;
      padding: 0 8px;
      border-radius: 14px;
      max-width: 220px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .leads-view-pill-more {
      width: 28px;
      height: 28px;
      border-radius: 14px;
      font-size: 16px;
      line-height: 1;
    }

    .leads-view-office {
      flex: 0 0 auto;
      margin-right: 2px;
    }

    #leads-view .leads-filter-btn ,     .leads-host .leads-filter-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .leads-filter-count {
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border-radius: 9px;
      background: var(--accent);
      color: #fff;
      font: 800 11px var(--font-body);
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .leads-filter-error {
      margin: 8px 0 0;
      color: #ffd2c8;
      font: 700 13px var(--font-body);
    }

    #leads-view .leads-filter-chips ,     .leads-host .leads-filter-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-top: 4px;
    }

    .leads-filter-chip {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      min-height: 32px;
      padding: 0 2px 0 12px;
      border-radius: 16px;
      background: #fff;
      color: var(--text);
      font: 700 13px var(--font-body);
    }

    .leads-filter-chip-main,
    .leads-filter-clear {
      border: 0;
      background: transparent;
      color: inherit;
      font: 700 13px var(--font-body);
    }

    .leads-chip-x {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      width: 32px;
      height: 32px;
      margin: 0 2px 0 4px;
      padding: 0;
      border: 0;
      border-radius: 16px;
      background: transparent;
      color: var(--text);
    }

    .leads-chip-x-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--soft);
      color: var(--text);
    }

    .leads-filter-clear {
      color: var(--band-muted);
      min-height: 32px;
      padding: 0 8px;
    }

    .leads-filter-backdrop {
      position: fixed;
      inset: 0;
      z-index: 64;
      background: rgba(14, 17, 23, 0.45);
    }

    .leads-filter-backdrop.hidden,
    .leads-filter-backdrop:not(.is-on) {
      display: none;
    }

    .leads-filter-panel {
      position: fixed;
      z-index: 65;
      display: flex;
      flex-direction: column;
      gap: 0;
      overflow: auto;
      padding: 16px 16px 18px;
      background: #fff;
      color: var(--text);
      border: 1.5px solid var(--border);
      border-radius: 20px;
      box-shadow: 0 16px 40px rgba(27, 21, 48, 0.18);
    }

    .leads-filter-panel.hidden { display: none; }

    .leads-filter-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }

    .leads-filter-head h2,
    .leads-filter-save h3 {
      margin: 0;
      font-family: var(--font-display);
      font-weight: 800;
    }

    .leads-filter-head h2 { font-size: 22px; }

    .leads-filter-close {
      width: 36px;
      height: 36px;
      border: 0;
      border-radius: 18px;
      background: var(--soft);
      color: var(--text);
      font-size: 22px;
      line-height: 1;
    }

    .leads-filter-panel label {
      display: block;
      margin: 8px 0 4px;
      font-size: 13px;
      font-weight: 700;
    }

    .leads-filter-panel select,
    .leads-filter-panel input[type="text"],
    .leads-filter-panel input[type="search"],
    .leads-filter-panel input[type="number"],
    .leads-filter-panel input[type="date"] {
      width: 100%;
      margin: 0 0 8px;
    }

    .leads-filter-choices {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 10px;
    }

    .leads-filter-choice {
      min-height: 36px;
      padding: 0 12px;
      border-radius: 18px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--text);
      font: 700 13px var(--font-body);
    }

    .leads-filter-choice.is-on {
      background: var(--soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    .leads-filter-checks {
      max-height: 220px;
      overflow: auto;
      margin-bottom: 10px;
      border: 1px solid var(--border);
      border-radius: 14px;
    }

    .leads-filter-panel .leads-filter-check {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      margin: 0;
      padding: 0 10px;
      font-weight: 600;
    }

    .leads-filter-panel .leads-filter-check input {
      width: auto;
      margin: 0;
    }

    .leads-filter-use,
    .leads-filter-add,
    .leads-filter-save-btn {
      width: 100%;
    }

    .leads-filter-use {
      min-height: 40px;
      border: 0;
      background: transparent;
      color: var(--accent);
      font: 700 14px var(--font-body);
      text-align: left;
      padding: 0 10px;
    }

    .leads-filter-empty {
      margin: 8px 10px;
      color: var(--muted);
      font-size: 13px;
    }

    .leads-filter-dates {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .leads-filter-save {
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    .leads-filter-save h3 { font-size: 16px; }

    .leads-filter-panel .leads-filter-share {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      margin-top: 4px;
      font-weight: 600;
    }

    .leads-filter-share input { margin: 0; }

    .leads-filter-panel.is-sheet {
      left: 0;
      right: 0;
      bottom: 0;
      top: auto;
      width: 100%;
      max-height: 88vh;
      border-radius: 20px 20px 0 0;
      padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    #leads-view-menu { z-index: 80; }

    #leads-view-menu input {
      width: calc(100% - 16px);
      margin: 8px;
    }

    #leads-view-menu .leads-view-menu-ask,
    #leads-view-menu .leads-view-menu-error {
      margin: 8px 12px;
      font-size: 13px;
    }

    #leads-view-menu .leads-view-menu-error { color: #a3321e; font-weight: 700; }

    @media (max-width: 759px) {
      #leads-view .leads-filter-btn,
      .leads-host .leads-filter-btn,
      .leads-view-pill,
      .leads-view-pill-main,
      .leads-view-pill-more,
      .leads-filter-chip,
      .leads-chip-x,
      .leads-filter-clear,
      .leads-filter-close,
      .leads-filter-choice,
      .leads-filter-check,
      .leads-filter-add,
      .leads-filter-save-btn,
      .leads-filter-share,
      #leads-view-menu button {
        min-height: 44px;
      }

      .leads-view-pill { height: 44px; border-radius: 22px; }
      .leads-view-pill-main { height: 44px; }
      .leads-chip-x { width: 44px; height: 44px; }
      .leads-filter-close { width: 44px; height: 44px; border-radius: 22px; }
    }

    /* one toolbar row under the title: count · office and the Needs a look pill left, the buttons right */
    .leads-band-title { min-width: 0; }

    #leads-view .leads-band-top {
      align-items: center;
      gap: 12px 24px;
    }

    .leads-band-toolbar-left {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px 14px;
      min-width: 0;
      color: #fff;
      font: 700 15px var(--font-body);
    }

    .leads-band-count-line {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    #leads-view .page-band-actions { gap: 10px; }

    /* every band button the same height; the ⋯ is a round icon button like its neighbours */
    #leads-view #leads-band-actions .band-btn { height: 40px; border-radius: 20px; }

    .band-btn.band-icon-btn {
      width: 40px;
      height: 40px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1.5px solid var(--band-line);
      background: transparent;
      color: #fff;
    }

    #leads-view .band-btn.band-icon-btn,
    #exhibit-view .band-btn.band-icon-btn { width: 40px; padding: 0; }

    .band-btn.band-icon-btn svg { flex: 0 0 auto; }

    .band-btn.band-icon-btn:hover,
    .band-btn.band-icon-btn[aria-expanded="true"] {
      background: var(--band-surface);
      border-color: var(--band-muted);
    }

    /* the tools continue the band; overlapping it by a pixel hides the hairline seam at fractional heights */
    #leads-view .leads-tools { padding-top: 22px; margin-top: -1px; }

    .leads-office-inline {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    .leads-band-sep { color: var(--band-muted); }

    #leads-view .leads-office-inline { flex: 0 0 auto; }

    #leads-view .leads-office-select,
    #leads-view .leads-office-select:focus {
      width: auto;
      min-width: 8.5rem;
      max-width: 240px;
      height: auto;
      min-height: 28px;
      margin: 0;
      padding: 0 18px 0 0;
      border: 0;
      border-radius: 0;
      outline: 0;
      background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%23C9C1F2' stroke-width='1.6' stroke-linecap='round'/></svg>") right center no-repeat;
      color: #fff;
      -webkit-text-fill-color: #fff;
      color-scheme: dark;
      font: 700 14px var(--font-body);
      appearance: none;
      cursor: pointer;
    }

    #leads-view .leads-empty-clear ,     .leads-host .leads-empty-clear {
      display: inline;
      height: auto;
      min-height: 44px;
      margin: 0;
      padding: 8px 4px;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: var(--accent);
      font: 700 14px var(--font-body);
      vertical-align: baseline;
    }

    #leads-view .leads-empty-clear:hover ,     .leads-host .leads-empty-clear:hover { text-decoration: underline; text-underline-offset: 3px; }

    .leads-more-btn { flex: 0 0 auto; }

    .leads-band-search-row { align-items: center; }

    #leads-view .leads-band-search ,     .leads-host .leads-band-search {
      flex: 1 1 auto;
      max-width: none;
      min-width: 0;
      margin-left: 0;
    }

    #leads-view .leads-band-search input ,     .leads-host .leads-band-search input { width: 100%; }

    .leads-filter-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .leads-views-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      max-width: 240px;
      height: 34px;
      padding: 0 12px;
      border-radius: 17px;
      border: 1.5px solid var(--band-line);
      background: var(--band-surface);
      color: #fff;
      font: 700 13px var(--font-body);
    }

    .leads-views-chip span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .leads-views-icon { flex: 0 0 auto; }

    .leads-views-chip.is-on {
      background: #fff;
      border-color: #fff;
      color: var(--text);
    }

    .leads-clear-all {
      border: 0;
      background: transparent;
      color: #fff;
      font: 700 13px var(--font-body);
      height: 34px;
      padding: 0 8px;
    }

    .leads-clear-all:hover { text-decoration: underline; text-underline-offset: 3px; }

    .leads-quick,
    .leads-extra-chips,
    .leads-saved-views {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex: 0 0 auto;
    }

    .leads-quick-main,
    .leads-quick-add,
    .leads-bar-action,
    .leads-filter-chip {
      display: inline-flex;
      align-items: center;
      height: 34px;
      padding: 0 12px;
      border-radius: 17px;
      border: 1.5px solid var(--band-line);
      background: transparent;
      color: #fff;
      font: 700 13px var(--font-body);
      white-space: nowrap;
    }

    .leads-quick.is-on {
      background: #fff;
      border-radius: 17px;
    }

    .leads-quick.is-on .leads-quick-main {
      background: transparent;
      border-color: transparent;
      color: var(--text);
      padding: 0 2px 0 12px;
    }

    .leads-filter-chip {
      background: #fff;
      border-color: #fff;
      color: var(--text);
      padding: 0 2px 0 0;
      gap: 0;
    }

    .leads-filter-chip-main {
      height: 32px;
      padding: 0 2px 0 12px;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      max-width: 240px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .leads-chip-x {
      width: 32px;
      height: 32px;
    }

    .leads-quick-add,
    .leads-bar-action {
      background: var(--band-surface);
      border-color: transparent;
    }

    .leads-filter-divider {
      width: 1px;
      align-self: stretch;
      min-height: 22px;
      background: var(--band-line);
      flex: 0 0 auto;
    }

    #leads-more-menu { z-index: 70; }

    .leads-more-label {
      margin: 8px 12px 2px;
      color: var(--muted);
      font: 700 12px var(--font-body);
    }

    #leads-more-menu [aria-checked="true"]::before {
      content: "✓  ";
    }

    .leads-filter-pop {
      position: fixed;
      z-index: 70;
      display: flex;
      flex-direction: column;
      width: min(360px, calc(100vw - 16px));
      max-height: min(440px, calc(100vh - 24px));
      overflow: auto;
      padding: 12px;
      background: #fff;
      color: var(--text);
      border: 1.5px solid var(--border);
      border-radius: 20px;
      box-shadow: 0 16px 40px rgba(27, 21, 48, 0.18);
    }

    .leads-filter-pop.hidden { display: none; }

    .leads-filter-pop h2 {
      margin: 4px 4px 8px;
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 800;
    }

    .leads-filter-pop-back {
      align-self: flex-start;
      margin: 0 0 6px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--accent);
      font: 700 13px var(--font-body);
    }

    .leads-filter-pop-search,
    .leads-filter-pop input[type="text"],
    .leads-filter-pop input[type="number"],
    .leads-filter-pop input[type="date"],
    .leads-filter-pop input[type="search"] {
      width: 100%;
      margin: 0 0 8px;
    }

    .leads-filter-group {
      margin: 10px 4px 4px;
      color: var(--muted);
      font: 700 12px var(--font-body);
    }

    .leads-filter-field {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      width: 100%;
      min-height: 40px;
      padding: 8px 10px;
      border: 0;
      border-radius: 12px;
      background: transparent;
      color: var(--text);
      font: 700 14px var(--font-body);
      text-align: left;
    }

    .leads-filter-field:hover,
    .leads-filter-field.is-on { background: var(--soft); }

    .leads-filter-field small {
      color: var(--muted);
      font-weight: 600;
    }

    .leads-filter-pop .leads-filter-check {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      margin: 0;
      padding: 0 8px;
      font-weight: 600;
    }

    .leads-filter-pop .leads-filter-check input { width: auto; margin: 0; }

    .leads-filter-opt-count {
      margin-left: auto;
      color: var(--muted);
      font-weight: 700;
    }

    .leads-filter-pop-clear {
      position: sticky;
      bottom: 0;
      z-index: 1;
      align-self: stretch;
      margin: 8px 0 0;
      padding: 10px 4px;
      min-height: 40px;
      border: 0;
      border-top: 1px solid var(--border);
      background: #fff;
      color: var(--accent);
      font: 700 14px var(--font-body);
      text-align: left;
    }

    .leads-view-row {
      display: flex;
      align-items: center;
      gap: 6px;
      min-height: 40px;
    }

    .leads-view-tick {
      flex: 0 0 16px;
      width: 16px;
      color: var(--accent);
      font-weight: 800;
      text-align: center;
    }

    .leads-view-row-main {
      flex: 1 1 auto;
      min-width: 0;
      min-height: 36px;
      padding: 6px 4px;
      border: 0;
      border-radius: 10px;
      background: transparent;
      color: var(--text);
      font: 700 14px var(--font-body);
      text-align: left;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .leads-view-row.is-on .leads-view-row-main { background: var(--soft); }

    .leads-view-row-more {
      flex: 0 0 auto;
      width: 32px;
      height: 32px;
      border: 0;
      border-radius: 16px;
      background: transparent;
      color: var(--muted);
      font: 700 18px var(--font-body);
    }

    .leads-views-save {
      margin-top: 12px;
      width: 100%;
      min-height: 40px;
      border-radius: 20px;
      border: 1.5px solid var(--border);
      background: #fff;
      color: var(--accent);
      font: 700 14px var(--font-body);
    }

    .leads-views-save:disabled {
      color: var(--muted);
      cursor: default;
    }

    .leads-filter-pop .leads-filter-share {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      margin: 4px 0 8px;
      font-weight: 600;
    }

    .leads-filter-pop .leads-filter-share input { width: auto; margin: 0; }

    #leads-view.is-board #leads-quick-status ,     .leads-host.is-board #leads-quick-status { display: none; }

    @media (max-width: 759px) {
      .leads-band-search-row { flex-direction: column; align-items: stretch; }
      .leads-band-search { width: 100%; flex-basis: auto; }
      .leads-view-switch { align-self: flex-start; }

      .leads-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-right: -16px;
        padding-right: 16px;
        -webkit-overflow-scrolling: touch;
      }

      .leads-views-chip,
      .leads-clear-all,
      .leads-quick-main,
      .leads-quick-add,
      .leads-filter-chip,
      .leads-filter-chip-main,
      .leads-chip-x,
      .leads-view-row-main,
      .leads-view-row-more,
      .leads-views-save,
      .leads-filter-field,
      .leads-filter-pop .leads-filter-check,
      .leads-filter-pop-clear,
      #leads-more-menu button {
        min-height: 44px;
      }

      .leads-views-chip,
      .leads-quick-main,
      .leads-quick-add,
      .leads-filter-chip { height: 44px; border-radius: 22px; }

      .leads-chip-x,
      .leads-view-row-more { width: 44px; height: 44px; }

      .leads-filter-pop.is-sheet {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
      }
    }

    @media (pointer: coarse) {
      .leads-chip-x,
      .leads-view-row-more,
      .leads-clear-all,
      .leads-views-chip {
        min-height: 44px;
      }

      .leads-chip-x,
      .leads-view-row-more {
        width: 44px;
        height: 44px;
      }
    }

    /* IN1a: consent at a glance beside a lead's name (Leads list, Board, calling mode) */
    .consent-marker { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 6px; border-radius: 9px;
      font: 800 10.5px var(--font-body); letter-spacing: 0.02em; vertical-align: middle; white-space: nowrap; }
    .consent-marker.is-ok { background: var(--ok-bg); color: var(--ok); }
    .consent-marker.is-stop { background: var(--attention-strong); color: #fff; }
    .consent-marker.is-dnc { background: var(--attention-bg); color: var(--attention); }

    /* LS1: Added and Last contact */
    .leads-sort { border: 0; background: transparent; padding: 0; font: inherit; font-weight: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
    .leads-sort.is-on { color: #4B2EDB; }
    .lead-age { white-space: nowrap; font-variant-numeric: tabular-nums; }
    .col-last-contact.is-never .lead-age { color: var(--muted); }
    .board-added { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
    #leads-view main.preview-open .col-last-contact { display: none; }

    /* EX2: returning customers */
    .returning-tag {
      display: inline-block;
      padding: 1px 8px;
      border-radius: 999px;
      background: #EEEAFD;
      color: var(--accent);
      font-size: 12px;
      font-weight: 600;
      vertical-align: middle;
    }

    /* "2 returning customers need a look": an amber pill on the dark band */
    .leads-needs-look {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 30px;
      padding: 0 14px;
      border: 0;
      border-radius: 15px;
      background: var(--wait-bg);
      color: var(--wait);
      font: 700 13px var(--font-body);
      cursor: pointer;
    }

    .leads-needs-look:hover { background: #FFE9A8; }

    .leads-needs-look:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

    .exhibit-returning {
      margin: 12px 0 0;
      font-size: 14px;
      color: var(--muted);
    }

    .needs-look-card {
      border-left: 4px solid var(--attention);
    }

    .needs-look-card h2 { margin-bottom: 6px; }

    .needs-look-card p { margin: 0 0 10px; }

    .merge-review-rows { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; }

    .merge-review-row { border-top: 1px solid var(--border); padding-top: 12px; }

    .merge-review-label { display: block; margin-bottom: 8px; }

    .merge-review-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

    .merge-review-col {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      overflow-wrap: anywhere;
    }

    .merge-review-col.is-new { border-color: var(--brand); background: #F7F5FF; }

    .merge-review-kicker { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
    /* EX3: close without deciding, decided fields, Undo in the toast, Reopen in Activity */
    .merge-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .merge-review-head h2 { margin: 0; }
    .merge-review-origin { margin: 8px 0 12px; padding: 10px 12px; border-radius: 10px; background: #F4F2FC; }
    .merge-review-origin-line { margin: 2px 0; font-size: 14px; line-height: 1.4; }
    .merge-review-origin .muted { margin: 0; }
    .modal-x { flex: none; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent;
      color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
    .modal-x:hover { background: #F2F0F8; color: var(--text); }
    .modal-x:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
    .merge-review-row.is-done .merge-review-col { opacity: .65; }
    .merge-review-done { margin: 0; font-weight: 600; color: var(--ok); }
    .merge-review-held { margin: 0; font-size: 0.9rem; color: var(--ink, #1B1530); background: #FFF7E6; border-radius: 8px; padding: 6px 10px; }
    .demo-new-address { margin: 8px 0; padding: 10px 12px; border: 1px solid #E8B44C; background: #FFF7E6; border-radius: 10px; }
    .demo-new-address b { display: block; font-family: "Bricolage Grotesque", sans-serif; color: #1B1530; }
    .demo-new-address p { margin: 4px 0 8px; }
    .merge-review-actions .btn-secondary { margin-right: auto; }
    .app-toast-action { margin-left: 10px; padding: 2px 8px; min-height: 0; border: 1px solid rgba(255, 255, 255, .5); border-radius: 8px;
      background: transparent; color: #fff; font: 700 14px var(--font-body); cursor: pointer; }
    .activity-action { display: inline-flex; margin-left: 10px; padding: 4px 10px; min-height: 30px; font-size: 13px; vertical-align: middle; }

    .needs-look-list { display: flex; flex-direction: column; margin: 12px 0; }

    .needs-look-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 0;
      border-top: 1px solid var(--border);
    }

    .needs-look-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

    .intake-rules { display: flex; flex-direction: column; gap: 12px; }

    .setup-card .intake-rules label.intake-rule { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }

    .intake-rule input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; }

    .intake-rule > span { display: flex; flex-direction: column; gap: 2px; }

    @media (max-width: 640px) {
      .merge-review-cols { grid-template-columns: 1fr; }
      .needs-look-item { flex-wrap: wrap; }
      .needs-look-who { flex-basis: 100%; }
    }

    /* Needs a look where people already look (visibility fix): the amber pill beside the name (Leads list, lead
       header) and the line under each waiting field in Details */
    .needs-look-pill {
      display: inline-flex;
      align-items: center;
      height: 22px;
      padding: 0 9px;
      margin-left: 6px;
      border: 0;
      border-radius: 11px;
      background: var(--wait-bg);
      color: var(--wait);
      font: 700 12px var(--font-body);
      white-space: nowrap;
      vertical-align: middle;
    }

    .needs-look-pill.is-button {
      height: 28px;
      padding: 0 12px;
      border-radius: 14px;
      font-size: 13px;
      cursor: pointer;
    }

    .needs-look-pill.is-button:hover { background: #FFE9A8; }

    .needs-look-pill.is-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

    .needs-look-field {
      margin: 6px 0 0;
      padding: 6px 10px;
      border-left: 3px solid var(--gold);
      border-radius: 0 8px 8px 0;
      background: var(--wait-bg);
      color: var(--wait);
      font-size: 13px;
      line-height: 1.4;
    }

    .needs-look-field .link-btn {
      color: var(--wait);
      font-weight: 700;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .merge-review-row.is-focus {
      outline: 2px solid var(--accent);
      outline-offset: 6px;
      border-radius: 8px;
    }

    /* CP1: the "Bought … · no lead yet" filter's fields */
    .cp-filter-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin: 0 0 10px;
      font-size: 13px;
      font-weight: 600;
      color: var(--ink, #1B1530);
    }

    .cp-filter-field select,
    .cp-filter-field input {
      height: 40px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      padding: 0 10px;
      font: inherit;
      font-weight: 400;
      background: #fff;
    }

    /* LC1: Demo cancelled – rebook */
    .leads-demo-cancelled-chip {
      display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px;
      border: 1.5px dashed var(--band-line); background: transparent; color: #fff; font: 700 13px var(--font-body);
      white-space: nowrap; cursor: pointer;
    }
    .leads-demo-cancelled-chip .count { opacity: 0.8; font-weight: 600; }
    .leads-demo-cancelled-chip.is-on { background: #fff; color: var(--text); border-style: solid; border-color: #fff; }

    /* MPA call-list tools (Nov 11): select all on the page / all matching, page size, go to page */
    .leads-select-banner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
      margin: 0 16px 8px;
      padding: 8px 12px;
      border-radius: 10px;
      background: #EEEAFD;
      color: var(--ink, #1B1530);
      font-size: 13px;
    }
    .leads-select-banner.hidden { display: none; }
    .leads-select-link {
      border: 0;
      background: none;
      padding: 0;
      color: var(--violet, #4B2EDB);
      font: inherit;
      font-weight: 600;
      text-decoration: underline;
      cursor: pointer;
    }
    #leads-view .leads-pager-right, .leads-host .leads-pager-right {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 10px 16px;
    }
    .leads-page-size { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
    .leads-page-size.hidden { display: none; }
    .leads-page-size select { width: auto; min-width: 70px; height: 36px; margin: 0; padding: 4px 8px; }
    .leads-page-jump { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
    .leads-page-jump label { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; font-weight: 400; }
    .leads-page-jump input { width: 64px; height: 36px; margin: 0; padding: 4px 8px; }
    @media (max-width: 767px) {
      #leads-view #leads-pager { flex-direction: column; align-items: stretch; }
      #leads-view .leads-pager-right, .leads-host .leads-pager-right { justify-content: flex-start; }
      #leads-view .leads-pager-controls, .leads-host .leads-pager-controls { flex-wrap: wrap; }
    }
    .consent-marker.is-dg { background: #EDE9FE; color: #4B2EDB; }

/* IS6 (dealer plan step 6): a dealer's Leads list on a phone is cards, not the wide table: name and phone, status,
   the demo (next step), last contact and source. Tapping the card opens the lead as before. */
@media (max-width: 640px) {
  table.leads-phone-cards thead,
  table.leads-phone-cards td.check-col,
  table.leads-phone-cards td.col-office,
  table.leads-phone-cards td.col-product,
  table.leads-phone-cards td.col-added,
  table.leads-phone-cards td.col-dealer,
  table.leads-phone-cards td.col-city,
  table.leads-phone-cards td.col-att { display: none; }
  table.leads-phone-cards,
  table.leads-phone-cards tbody { display: block; width: 100%; }
  table.leads-phone-cards tbody tr.row-click {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "name menu" "status status" "booked booked" "last source";
    gap: 4px 12px;
    margin: 0 0 10px;
    padding: 14px 14px 12px;
    border: 1px solid var(--line, #E6E2F2);
    border-radius: 14px;
    background: #fff;
  }
  table.leads-phone-cards tbody tr td { display: block; padding: 0; border: 0 !important; min-width: 0; background: transparent; }
  table.leads-phone-cards td.lead-name-cell { grid-area: name; }
  table.leads-phone-cards td.actions-col { grid-area: menu; align-self: start; }
  table.leads-phone-cards td.col-status { grid-area: status; }
  table.leads-phone-cards td.col-booked { grid-area: booked; font-size: 14px; }
  table.leads-phone-cards td.col-booked.is-none { display: none; }
  table.leads-phone-cards td.col-last-contact { grid-area: last; font-size: 13px; color: var(--muted); }
  table.leads-phone-cards td.lead-source-cell { grid-area: source; font-size: 13px; color: var(--muted); text-align: right; }
  table.leads-phone-cards td.col-booked::before,
  table.leads-phone-cards td.col-last-contact::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
  table.leads-phone-cards tbody tr td.empty { grid-column: 1 / -1; }
}

/* SF1: the survey a lead came from (Leads rows, phone cards, board cards) */
#leads-view .lead-survey-line, .leads-host .lead-survey-line { font-size: 12px; color: var(--muted, #6B6680); margin-top: 2px; white-space: normal; }
.board-survey { display: block; font-size: 12px; color: var(--muted, #6B6680); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* ML2: Merge two leads (js/lead-merge.js) */
    .mlx .mlx-search { width: 100%; margin-top: 10px; }
    .mlx-search-status { margin: 8px 0 0; }
    .mlx-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 10px; }
    .mlx-card {
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 0;
      padding: 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }
    .mlx-card.is-kept { border: 2px solid var(--accent); background: #F7F5FF; }
    .mlx-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .mlx-suggested { padding: 2px 8px; border-radius: 10px; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 700; }
    .mlx-card-name { margin: 0; font-family: var(--font-display); font-size: 18px; color: var(--text); overflow-wrap: anywhere; }
    .mlx-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 14px; }
    .mlx-facts dt { color: var(--muted); }
    .mlx-facts dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
    .mlx-card .btn-primary, .mlx-card .btn-secondary { margin-top: auto; }
    .mlx-open { align-self: flex-start; }
    .mlx-swap { margin-bottom: 6px; }
    .mlx-h { margin: 16px 0 8px; font-family: var(--font-display); font-size: 16px; color: var(--text); }
    .mlx-section { padding: 10px 0; border-top: 1px solid var(--border); }
    .mlx-section p { margin: 4px 0 0; }
    .mlx-warn { margin: 10px 0; padding: 10px 12px; border: 1px solid #E8B44C; border-radius: 10px; background: #FFF7E6; color: var(--text); }
    .mlx-warn ul { margin: 6px 0 0; padding-left: 18px; }
    .mlx-choice { margin: 10px 0; padding: 10px 12px; border: 2px solid var(--accent); border-radius: 10px; }
    .mlx-choice legend { padding: 0 4px; font-weight: 700; }
    .mlx-choice-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; cursor: pointer; }
    .mlx-choice-row input { width: 18px; height: 18px; margin: 0; }
    .mlx-need { margin: 8px 0 0; color: var(--attention); font-weight: 600; }
    .mlx-undone { margin: 8px 0; padding-left: 18px; }
    .mlx-dupes { margin-top: 8px; }
    @media (max-width: 640px) {
      .mlx-cards { grid-template-columns: 1fr; }
    }

    /* 4ddba0c2: same customer, another lead */
    .detail-twin-card { border-left: 4px solid #4B2EDB; }
    .detail-twin-title { margin: 0 0 6px; font-weight: 600; }
    .detail-twin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
    .detail-twin-help { margin: 6px 0 0; font-size: 13px; }

/* 3aa1d7d5: the dealer's notes for the office on a finished demo */
.demo-item-finish-notes { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink, #1B1530); }

/* 36580674: "Show availability" on the lead page: the open times down the right beside the lead (wide screens) or over
   the page (phones and narrow windows) */
.lead-times-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 55;
  width: min(460px, 100vw); box-sizing: border-box;
  background: #fff; border-left: 1px solid var(--border, #e6e3ee);
  box-shadow: -8px 0 24px rgba(27, 21, 48, 0.12);
  padding: 16px; overflow-y: auto;
}
.lead-times-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.lead-times-head h2 { margin: 0; font-size: 18px; }
#lead-times-host .ccal-times.ccal-embedded { margin: 0; position: static; max-height: none; overflow: visible; border: 0; box-shadow: none; padding: 0; background: transparent; }
#detail-times-btn[aria-expanded="true"] { border-color: var(--accent, #4B2EDB); color: var(--accent, #4B2EDB); }
@media (min-width: 1100px) {
  body.lead-times-open #detail-view { padding-right: 460px; box-sizing: border-box; }
}
@media (max-width: 1099px) {
  .lead-times-drawer { width: 100vw; border-left: 0; box-shadow: none; }
}
/* css/metrics-lead-filter.css */
/* SF1 (RMD 4a, 4c): Lead filters for the dealer numbers (Today › Performance, Stats) */
.mlf { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.mlf-btn {
  display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px;
  border: 1px solid var(--line, #E4E1EE); border-radius: 999px; background: #fff;
  color: var(--ink, #1B1530); font: 600 13px var(--font-body, "Figtree", sans-serif); cursor: pointer;
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mlf-btn.is-on { border-color: var(--violet, #4B2EDB); background: #EEEAFD; color: var(--violet, #4B2EDB); }
.mlf-clear { border: 0; background: none; padding: 4px; color: var(--muted, #6B6580); font-size: 13px; cursor: pointer; text-decoration: underline; }
.mlf-clear.hidden, .mlf-pop.hidden { display: none; }
.mlf-pop {
  position: fixed; z-index: 90; top: 0; left: 0; width: min(640px, calc(100vw - 32px));
  max-height: 70vh; overflow: auto; padding: 14px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line, #E4E1EE); box-shadow: 0 12px 32px rgba(27, 21, 48, 0.16); color: var(--ink, #1B1530);
}
.mlf-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mlf-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.mlf-group legend { padding: 0; margin-bottom: 6px; font: 700 12px var(--font-body, "Figtree", sans-serif); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted, #6B6580); }
.mlf-opt { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 14px; font-weight: 400; cursor: pointer; }
.mlf-opt input { width: auto; margin: 0; }
.mlf-note { margin: 10px 0 0; font-size: 12px; color: var(--muted, #6B6580); }
.mlf-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.today-perf-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 10px; }
.today-perf-custom { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted, #6B6580); }
.today-perf-custom.hidden { display: none; }
.today-perf-custom label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.today-perf-custom input { width: auto; height: 34px; margin: 0; padding: 4px 8px; }
#today-perf-clear.hidden { display: none; }
.today-perf-note.hidden { display: none; }
.today-perf-note { margin: 0 0 8px; font-size: 12px; color: var(--muted, #6B6580); }
@media (max-width: 767px) {
  .mlf-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; }
}
.stats-leadfilter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
#stats-clear-filters.hidden { display: none; }
/* css/conversations.css */
    .unread-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
      margin-right: 8px;
      vertical-align: middle;
      flex-shrink: 0;
    }

    .chat-thread {
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-height: min(60vh, 520px);
      overflow-y: auto;
      padding: 14px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
    }

    .chat-row {
      display: flex;
      flex-direction: column;
      max-width: 75%;
    }

    .chat-row.inbound { align-self: flex-start; align-items: flex-start; }

    .chat-row.outbound { align-self: flex-end; align-items: flex-end; }

    .chat-bubble {
      padding: 8px 12px;
      border-radius: 14px;
      white-space: pre-wrap;
      word-break: break-word;
      font-size: 0.95rem;
    }

    .chat-bubble.inbound {
      background: #e8eaee;
      color: var(--text);
      border-bottom-left-radius: 4px;
    }

    .chat-bubble.outbound {
      background: var(--accent);
      color: #fff;
      border-bottom-right-radius: 4px;
    }

    .chat-time {
      font-size: 0.75rem;
      color: var(--muted);
      margin-top: 4px;
    }

    .chat-reply {
      display: flex;
      gap: 8px;
      align-items: flex-end;
      margin-top: 12px;
    }

    .chat-reply textarea {
      margin-bottom: 0;
      min-height: 64px;
      flex: 1;
    }

    .chat-composer {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 12px;
    }

    .chat-composer .chat-reply {
      margin-top: 0;
    }

    .chat-composer .msg.error {
      margin: 0;
      font-size: 13px;
    }

    .composer-consent-panel {
      background: #F6F7F9;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
    }

    .composer-consent-panel p {
      margin: 0 0 8px;
      font-size: 13px;
      color: var(--text);
    }

    .composer-consent-panel .choice-row {
      margin-bottom: 6px;
    }

    .composer-consent-panel .choice {
      min-height: 44px;
    }

    .composer-marketing-link {
      border: 0;
      background: none;
      padding: 0;
      color: var(--muted);
      font: 500 12px var(--font-body);
      cursor: pointer;
      text-decoration: underline;
    }

    .composer-consent-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 8px;
      border-radius: 999px;
      background: #EEF0F3;
      color: var(--text);
      font-size: 12px;
      font-weight: 600;
    }

    .composer-consent-tag button {
      border: 0;
      background: none;
      padding: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1;
    }

    .composer-dnc {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin: 12px 0 0;
      padding: 12px 14px;
      border-radius: 14px;
      background: #FFE7DF;
      color: #A3321E;
      font-weight: 700;
      min-height: 44px;
    }

    .composer-dnc input {
      width: 22px;
      height: 22px;
      margin-top: 1px;
      flex: none;
    }

    .composer-block-notice {
      background: #F0F2F5;
      color: var(--muted);
      border-radius: 10px;
      padding: 12px 14px;
      font-size: 13px;
      margin-top: 12px;
    }

    .consent-badge {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      line-height: 1.3;
      vertical-align: middle;
    }

    .consent-marketing_ok {
      background: #DCFCE7;
      color: #166534;
    }

    .consent-service_only {
      background: #FEF3C7;
      color: #B45309;
    }

    .consent-opted_out {
      background: #FEE2E2;
      color: #B91C1C;
    }

    /* NI1: a non-US number saved as typed: called by hand, never texted */
    .consent-non-us {
      background: #FFEDD5;
      color: #9A3412;
    }

    .consent-dd {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .thread-assign {
      margin-bottom: 16px;
    }

    #thread-consent-badge {
      margin-left: 8px;
      display: inline-flex;
      align-items: center;
    }

    .thread-phone {
      color: var(--muted);
      font-size: 0.9rem;
      font-weight: 400;
      margin-left: 8px;
    }

    .thread-name-btn {
      background: none;
      padding: 0;
      font: inherit;
      font-size: 1.15rem;
      font-weight: 600;
      color: inherit;
      text-align: left;
    }

    .thread-name-btn.editable:hover {
      text-decoration: underline;
    }

    .thread-name-btn:disabled {
      cursor: default;
      opacity: 1;
    }

    .thread-name-edit {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .thread-name-edit input {
      margin-bottom: 0;
      width: 220px;
      font-size: 1rem;
    }

    .chat-delivery { color: var(--muted); }

    .chat-delivery.is-failed {
      color: var(--danger);
      font-weight: 700;
    }

    .composer-credits {
      margin: -2px 0 0;
      font-size: 12px;
      color: var(--muted);
    }

    .composer-credits:empty { display: none; }

    .composer-improve-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .composer-improve-row select {
      width: auto;
      height: 40px;
      margin: 0;
      padding: 0 10px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius-sm);
      background: #fff;
      font: inherit;
    }

    .composer-suggestion {
      margin-top: 8px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--soft);
    }

    .composer-suggestion-label {
      font: 800 12px var(--font-body);
      color: var(--accent);
    }

    .composer-suggestion-text {
      margin: 6px 0 8px;
      white-space: pre-wrap;
    }

    .composer-suggestion-warn {
      margin: 0 0 8px;
      font-size: 13px;
      color: var(--wait);
    }

    /* Conversations inbox (CV1) */
    .inbox-tools {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px 16px;
    }

    .inbox-page .inbox-search {
      margin-left: 0;
      max-width: 340px;
    }

    .inbox-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .inbox-chip {
      min-height: 36px;
      padding: 0 14px;
      border-radius: 18px;
      border: 1.5px solid var(--band-line);
      background: transparent;
      color: #fff;
      font: 700 13px var(--font-body);
      cursor: pointer;
    }

    .inbox-chip.is-on {
      background: #fff;
      border-color: #fff;
      color: var(--text);
    }

    .inbox-layout {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
      gap: 16px;
      margin: -50px 32px 24px;
      align-items: start;
    }

    .inbox-layout > .card {
      margin: 0;
      border-radius: var(--radius-lg);
      box-shadow: 0 1px 2px rgba(27, 21, 48, 0.06), 0 14px 34px rgba(27, 21, 48, 0.10);
    }

    .inbox-list-card {
      padding: 6px;
      max-height: calc(100vh - 180px);
      overflow-y: auto;
    }

    .inbox-list {
      display: flex;
      flex-direction: column;
    }

    .inbox-row {
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: 100%;
      padding: 12px;
      border: 0;
      border-radius: 12px;
      background: transparent;
      text-align: left;
      font: inherit;
      color: var(--text);
      cursor: pointer;
    }

    .inbox-row + .inbox-row { border-top: 1px solid var(--border); }

    .inbox-row:hover { background: var(--bg); }

    .inbox-row.is-selected {
      background: var(--soft);
      border-top-color: transparent;
    }

    .inbox-row.is-selected + .inbox-row { border-top-color: transparent; }

    .inbox-row-top {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .inbox-dot {
      flex: none;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
    }

    .inbox-dot.is-read { background: transparent; }

    .inbox-row-name {
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 600;
    }

    .inbox-row.is-unread .inbox-row-name { font-weight: 800; }

    .inbox-row-time {
      flex: none;
      margin-left: auto;
      font-size: 12px;
      color: var(--muted);
    }

    .inbox-row.is-unread .inbox-row-time {
      color: var(--accent);
      font-weight: 700;
    }

    .inbox-row-preview {
      margin: 0 0 0 16px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      color: var(--muted);
    }

    .inbox-row.is-unread .inbox-row-preview { color: var(--text); }

    .inbox-row-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
      margin-left: 16px;
      font-size: 12px;
    }

    .inbox-row-office {
      color: var(--muted);
      font-weight: 600;
    }

    .inbox-tag {
      display: inline-flex;
      align-items: center;
      height: 22px;
      padding: 0 8px;
      border-radius: 11px;
      font: 700 11px var(--font-body);
      white-space: nowrap;
    }

    .inbox-tag.is-grey { background: var(--bg); color: var(--muted); }
    .inbox-tag.is-violet { background: var(--soft); color: var(--accent); }
    .inbox-tag.is-coral { background: var(--attention-bg); color: var(--attention); }
    .inbox-tag.is-route { background: var(--ok-bg); color: var(--ok); }
    .inbox-tag.is-green { background: var(--ok-bg); color: var(--ok); }
    .inbox-row-top .person-avatar { margin-right: 2px; }
    #inbox-name .person-avatar { vertical-align: middle; margin-right: 4px; }

    /* DT1: Text the team, Text one person */
    .team-text-dialog { max-width: 560px; }
    .team-text-body { display: grid; gap: 8px; padding: 16px 20px 20px; }
    .team-text-body label { font-weight: 700; font-size: 13px; }
    .team-text-body textarea, .team-text-body select, .team-text-body input[type="search"] { width: 100%; }
    .team-text-pick { display: grid; gap: 4px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
    .team-text-pick label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
    .team-text-preview { display: grid; gap: 4px; max-height: 220px; overflow: auto; font-size: 13px; }
    .team-text-person { display: flex; align-items: center; gap: 8px; }
    .team-text-person .why { color: var(--muted); margin-left: auto; text-align: right; }
    .team-text-person.is-skipped .name { color: var(--muted); }
    .team-one-list { display: grid; gap: 2px; max-height: 360px; overflow: auto; }
    .team-one-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
      background: transparent; text-align: left; font: inherit; }
    .team-one-row:hover { background: var(--bg); }
    .team-one-row .why { color: var(--muted); margin-left: auto; font-size: 12px; }
    .team-one-row:disabled { opacity: 0.55; }

    .inbox-more {
      display: block;
      margin: 8px auto 6px;
    }

    .inbox-list-card .band-empty { padding: 28px 16px; }

    .inbox-pane {
      padding: 18px 20px 20px;
      min-height: 420px;
    }

    .inbox-pane-empty {
      padding: 80px 16px;
      text-align: center;
    }

    .inbox-back { display: none; }

    .inbox-head {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px 16px;
    }

    .inbox-head h2 {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 12px;
      margin: 0;
      font-family: var(--font-display);
      font-size: 24px;
      font-weight: 800;
      letter-spacing: -0.02em;
    }

    .inbox-rename {
      font: 600 13px var(--font-body);
      color: var(--muted);
    }

    .inbox-rename-edit {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .inbox-rename-edit input {
      width: 200px;
      margin: 0;
    }

    .inbox-phone {
      margin: 2px 0 0;
      color: var(--muted);
      font-size: 14px;
    }

    .inbox-lead {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 10px 16px;
      margin: 14px 0;
      padding: 12px 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--bg);
    }

    .inbox-lead-main {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
    }

    .inbox-lead-label {
      font: 800 11px var(--font-body);
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .inbox-lead-line {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      font-size: 14px;
    }

    .inbox-lead-none {
      margin: 0;
      font-size: 14px;
    }

    .inbox-lead-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .inbox-lead-finder {
      flex: 1 1 100%;
    }

    .inbox-lead-finder input {
      margin-bottom: 8px;
    }

    .inbox-lead-results {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .inbox-lead-result {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 12px;
      min-height: 44px;
      padding: 8px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      text-align: left;
      font: inherit;
      cursor: pointer;
    }

    .inbox-lead-result:hover { border-color: var(--accent); }

    .inbox-lead-result-name { font-weight: 700; }

    .inbox-lead-result-phone {
      color: var(--muted);
      font-size: 13px;
    }

    .inbox-blocked {
      margin: 0 0 12px;
      padding: 10px 12px;
      border-radius: 10px;
      background: var(--attention-bg);
      color: var(--attention);
      font-size: 14px;
    }

    .inbox-blocked-note { color: var(--text); }

    /* SN2: a customer conversation whose number is a staff member's */
    .inbox-staff-note {
      margin: 0 0 12px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #F4F1FF;
      color: #1B1530;
      font-size: 14px;
    }
    .inbox-staff-note-link {
      padding: 0; border: 0; background: none; cursor: pointer;
      color: #4B2EDB; font: inherit; font-weight: 600; text-decoration: underline;
    }

    .inbox-thread .composer-block-notice {
      margin-top: 12px;
      padding: 10px 12px;
      border-radius: 10px;
      background: var(--attention-bg);
      color: var(--attention);
      font-weight: 700;
    }

    .inbox-phone:empty { display: none; }

    .inbox-thread .chat-thread {
      max-height: calc(100vh - 460px);
      min-height: 220px;
    }

    @media (max-width: 1100px) {
      .inbox-layout { margin: -36px 16px 20px; }
    }

    /* Phones and small tablets: the list first; tap a conversation to open it. */
    @media (max-width: 900px) {
      .inbox-layout { grid-template-columns: minmax(0, 1fr); }

      .inbox-list-card { max-height: none; }

      .inbox-pane { display: none; }

      .inbox-layout.is-thread .inbox-list-card { display: none; }

      .inbox-layout.is-thread .inbox-pane { display: block; }

      .inbox-back {
        display: inline-flex;
        margin: -4px 0 8px;
        color: var(--accent);
        font-weight: 700;
      }

      .inbox-thread .chat-thread { max-height: 60vh; }

      .inbox-page .inbox-search { max-width: none; flex-basis: 100%; }
    }

    /* SV2: a QR code picture going with the text, and pictures in the thread */
    .composer-qr-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 4px 8px 4px 4px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; font-weight: 600; }
    .composer-qr-chip.hidden { display: none; }
    .composer-qr-chip img { width: 40px; height: 40px; border-radius: 6px; }
    .composer-qr-chip button { border: 0; background: none; padding: 0 2px; color: var(--muted); font-size: 16px; line-height: 1; }
    .chat-picture { display: block; max-width: 140px; margin-top: 6px; border-radius: 8px; background: #fff; }
    .chat-picture-tag { display: block; margin-top: 4px; font-size: 12px; opacity: 0.8; }

    /* TX2: Templates in a text box */
    .composer-templates { position: relative; margin: 0 0 6px; }
    .composer-templates:empty { display: none; }
    .composer-templates-btn { font-weight: 600; }
    .composer-templates-menu {
      position: absolute; left: 0; bottom: 100%; z-index: 30; width: min(360px, 90vw); max-height: 320px; overflow-y: auto;
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(27, 21, 48, 0.16);
      padding: 4px; margin-bottom: 4px;
    }
    .composer-templates-menu.hidden { display: none; }
    .composer-templates-menu button {
      display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left;
      border: 0; background: none; padding: 8px 10px; border-radius: 6px; font: inherit; color: var(--text); cursor: pointer;
    }
    .composer-templates-menu button:hover, .composer-templates-menu button:focus-visible { background: var(--soft); }
    .composer-templates-menu span { font-size: 12px; color: var(--muted); }
    .composer-templates-menu .composer-templates-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

    /* TX2: Templates, Picture and Help me write above a text box */
    .composer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0 0 6px; }
    .composer-tools:empty { display: none; }
    .composer-tools .composer-templates { margin: 0; }
    .composer-tools { gap: 6px 8px; }
    .composer-tool-btn {
      display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
      border: 1px solid #D9D2F7; border-radius: 999px; background: #F4F1FF; color: #4B2EDB;
      font: 700 14px var(--font-body); cursor: pointer;
    }
    .composer-tool-btn:hover, .composer-tool-btn:focus-visible { background: #EAE4FF; border-color: #4B2EDB; }
    .composer-tool-btn[aria-expanded="true"] { background: #4B2EDB; border-color: #4B2EDB; color: #fff; }
    .composer-tool-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
    .composer-tools .composer-writer { display: contents; }
    .composer-tools .tw-panel { flex-basis: 100%; margin: 4px 0 2px; }
    .chat-picture-btn { display: block; padding: 0; margin-top: 6px; border: 0; background: none; cursor: zoom-in; border-radius: 8px; }
    .chat-picture-btn .chat-picture { margin-top: 0; width: 160px; max-width: 100%; max-height: 200px; object-fit: cover; }
    .chat-picture-view {
      position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 12px; padding: 48px 16px 24px; background: rgba(27, 21, 48, 0.88);
    }
    .chat-picture-view img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 8px; background: #fff; object-fit: contain; }
    .chat-picture-close {
      position: absolute; top: 10px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%;
      background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
    }
    .chat-picture-open { color: #fff; font-weight: 700; font-size: 14px; }
    .composer-writer:empty { display: none; }
    .tw-panel { margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
    .tw-panel.hidden { display: none; }
    .tw-panel textarea { width: 100%; min-height: 0; margin: 0 0 8px; }
    .tw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
    .tw-chip { min-height: 36px; padding: 0 12px; }
    .tw-status:empty { display: none; }
    .tw-status { margin: 8px 0 0; }
    .tw-note { margin: 8px 0 0; font-size: 12px; }
    .composer-links { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; font-size: 13px; font-weight: 400; color: var(--muted); }
    .composer-links.hidden { display: none; }
    .composer-links input { margin-top: 2px; }

    /* TX2: the picture picker */
    .pic-picker { padding: 16px 20px 18px; display: grid; gap: 12px; }
    .pic-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
    .pic-tab { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 14px; font: 600 14px var(--font-body); cursor: pointer; }
    .pic-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
    .pic-picker-body { min-height: 140px; }
    .pic-drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 28px 16px; border: 2px dashed var(--border-strong); border-radius: var(--radius); cursor: pointer; font-weight: 400; }
    .pic-drop:hover, .pic-drop:focus-within { border-color: var(--accent); background: var(--soft); }
    .pic-keep { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-weight: 400; }
    .pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 340px; overflow-y: auto; }
    .pic-tile { display: grid; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; font: 600 12px var(--font-body); color: var(--text); }
    .pic-tile:hover, .pic-tile:focus-visible { border-color: var(--accent); }
    .pic-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--bg); }
    .pic-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* TX2: Text the team */
    #team-text-tools .composer-templates-menu { top: 100%; bottom: auto; margin: 4px 0 0; }
    .team-text-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; border: 0; padding: 0; margin: 4px 0 0; }
    .team-text-when legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
    .team-text-when label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
    .team-text-when input[type="datetime-local"] { width: auto; margin: 0; }
    .team-text-when input.hidden { display: none; }
    label.team-text-person { font-weight: 400; cursor: pointer; }
    .team-text-person.is-left-out .name { color: var(--muted); text-decoration: line-through; }
    .team-text-add-mobile { font-size: 13px; font-weight: 600; white-space: nowrap; }
    .team-text-save-tpl { margin-right: auto; }
    .team-history-list { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
    .team-history-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
    .team-history-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
    .team-history-head .setup-help { margin: 0; }
    .team-history-body { margin: 0; white-space: pre-wrap; color: var(--text); }
    .team-history-item details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
    .team-history-item details .team-text-person { padding: 4px 0; }
    .team-history-item .btn-ghost { justify-self: start; }

    /* CN1 (Nov 12): Demo & gift consent, the tappable Text consent chip and its history */
    .consent-demo_gift {
      background: #EDE9FE;
      color: #4B2EDB;
    }
    button.consent-badge.is-tappable {
      border: 0;
      cursor: pointer;
      font: inherit;
      font-size: 12px;
      font-weight: 600;
    }
    button.consent-badge.is-tappable:focus-visible {
      outline: 2px solid #4B2EDB;
      outline-offset: 2px;
    }
    .consent-history-list { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; margin: 8px 0; }
    .consent-history-item { border: 1px solid var(--line, #E6E3F0); border-radius: 10px; padding: 10px 12px; background: #fff; }
    .consent-history-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 13px; }
    .consent-history-wording { margin: 6px 0 4px; font-size: 13px; overflow-wrap: anywhere; }
    .consent-history-item .muted { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
    .composer-consent-panel .choice.is-unavailable { opacity: .5; cursor: not-allowed; }
    .map-consent-level { margin: 8px 0; }
    .map-consent-level-label { margin: 0 0 4px; font-weight: 600; font-size: 13px; }
/* css/lead-detail.css */
    .lead-preview-phone-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .detail-heading h2 {
      margin: 0;
      font-size: 1.25rem;
    }

    .detail-office {
      margin: 4px 0 0;
      font-size: 0.9rem;
    }

    .location-maps {
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
      max-width: 100%;
    }

    .location-maps iframe {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      height: 240px;
      border: 0;
      border-radius: 12px;
      display: block;
      background: var(--bg);
    }

    .location-map-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .detail-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
    }

    .detail-top h2 {
      margin: 0;
      font-size: 1.25rem;
    }

    .kv {
      display: grid;
      grid-template-columns: 140px 1fr;
      gap: 8px 12px;
      font-size: 0.95rem;
    }

    .kv dt {
      color: var(--muted);
      font-weight: 600;
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      padding-top: 2px;
    }

    .kv dd { margin: 0; }

    #lead-preview-scrim {
      position: fixed;
      inset: 0;
      z-index: 14;
      background: rgba(14, 17, 23, 0.35);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 200ms linear, visibility 0s linear 200ms;
    }

    #lead-preview-scrim.open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: opacity 200ms linear, visibility 0s linear 0s;
    }

    @media (min-width: 1101px) {
      #lead-preview-scrim {
        display: none;
      }
    }

    #lead-preview {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: 420px;
      max-width: calc(100vw - var(--sidebar-width-collapsed) - 16px);
      background: var(--surface);
      border-left: 1px solid var(--border);
      box-shadow: -8px 0 24px rgba(16, 24, 40, 0.08);
      overflow-y: auto;
      z-index: 15;
      padding: 0;
      display: flex;
      flex-direction: column;
      transform: translateX(100%);
      visibility: hidden;
      pointer-events: none;
      will-change: transform;
      transition: transform 280ms cubic-bezier(0.22, 0.8, 0.2, 1), visibility 0s linear 280ms;
    }

    #lead-preview.open {
      transform: translateX(0);
      visibility: visible;
      pointer-events: auto;
      transition: transform 280ms cubic-bezier(0.22, 0.8, 0.2, 1), visibility 0s linear 0s;
    }

    #lead-preview-content {
      display: flex;
      flex-direction: column;
      gap: 0;
      flex: 1;
      min-height: 0;
      transition: opacity 140ms linear;
    }

    #lead-preview .lead-preview-header {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 12px;
      background: var(--band-bg);
      color: #fff;
      padding: 22px 24px 20px;
    }

    #lead-preview .lead-preview-title-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
    }

    #lead-preview #lead-preview-open-icon,
    #lead-preview #lead-preview-close {
      flex-shrink: 0;
      width: 32px;
      height: 32px;
      padding: 0;
      border: 0;
      background: var(--band-surface);
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
    }

    #lead-preview #lead-preview-open-icon {
      margin-left: auto;
    }

    #lead-preview #lead-preview-close {
      margin-left: 0;
    }

    #lead-preview #lead-preview-open-icon:hover,
    #lead-preview #lead-preview-close:hover {
      color: #fff;
      background: var(--band-line);
    }

    #lead-preview #lead-preview-name {
      margin: 0;
      flex: 1;
      min-width: 0;
      font-size: 26px;
      font-weight: 700;
      line-height: 1.25;
      white-space: normal;
      color: #fff;
    }

    #lead-preview #lead-preview-sub {
      margin: 0;
      color: var(--band-muted);
      font-size: 13px;
    }

    #lead-preview .lead-preview-heading {
      margin: 0 0 6px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--muted);
    }

    #lead-preview .lead-preview-primary {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      gap: 8px;
    }

    #lead-preview #lead-preview-call,
    #lead-preview #lead-preview-text,
    #lead-preview #lead-preview-book {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      height: 44px;
      padding: 0 18px;
      border-radius: 20px;
      font-size: 14px;
      font-weight: 600;
      text-decoration: none;
      white-space: nowrap;
    }

    #lead-preview #lead-preview-call {
      background: var(--accent);
      color: #fff;
      border: 1px solid var(--accent);
    }

    #lead-preview #lead-preview-text,
    #lead-preview #lead-preview-book {
      background: transparent;
      color: #fff;
      border: 1px solid var(--band-line);
    }

    #lead-preview #lead-preview-book.is-preview-primary {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
      order: -1;
    }

    #lead-preview #lead-preview-call.is-preview-secondary {
      background: transparent;
      color: #fff;
      border-color: var(--band-line);
    }

    #lead-preview #lead-preview-status {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      height: 26px;
      padding: 0 12px;
      border-radius: 13px;
      background: var(--band-surface);
      color: #fff;
      width: fit-content;
    }

    #lead-preview .lead-preview-body {
      display: flex;
      flex-direction: column;
      gap: 18px;
      flex: 1;
      padding: 20px 22px 22px;
      background: var(--surface);
    }

    #lead-preview .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    /* the small actions: two even columns, so nothing is left alone on a line */
    #lead-preview .lead-preview-quick {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    #lead-preview .lead-preview-quick button {
      height: 36px;
      font-size: 13px;
      font-weight: 600;
      border-radius: 18px;
      border: 1px solid var(--border-strong);
      background: #fff;
      color: var(--text);
      padding: 4px 10px;
      line-height: 1.2;
      text-align: center;
    }

    /* a narrow preview (phones) lets a label wrap inside its button rather than cutting it off */
    @media (max-width: 480px) {
      #lead-preview .lead-preview-quick button { height: auto; min-height: 40px; }
    }

    #lead-preview .lead-preview-quick button:hover { background: var(--soft); }

    #lead-preview .lead-preview-quick #lead-preview-move,
    #lead-preview .lead-preview-quick .lead-preview-move-list { grid-column: 1 / -1; }

    /* header order: name and where they came from, status, next demo, then Call / Text / Book or Reschedule */
    #lead-preview .lead-preview-title-row { order: 0; }
    #lead-preview #lead-preview-sub { order: 1; }
    #lead-preview .lead-preview-status-row { order: 2; }
    #lead-preview #lead-preview-product { order: 3; }
    #lead-preview #lead-preview-demo { order: 4; margin: 0; }
    #lead-preview #lead-preview-request { order: 5; }
    #lead-preview .lead-preview-primary { order: 6; }
    #lead-preview #lead-preview-route { order: 7; }

    /* amber "No dealer yet" / "Needs a new time" readable on the dark header */
    #lead-preview .lead-preview-header .demo-no-dealer,
    .page-band .demo-no-dealer { color: #FCD34D; }

    #lead-preview .lead-preview-next {
      background: color-mix(in srgb, var(--accent) 9%, white);
      border-radius: var(--radius-lg);
      padding: 12px 14px;
    }

    #lead-preview .lead-preview-next-line,
    #lead-preview .lead-preview-next .muted {
      margin: 0;
    }

    #lead-preview .lead-preview-next-line + .lead-preview-next-line,
    #lead-preview .lead-preview-next-line + .muted {
      margin-top: 6px;
    }

    #lead-preview .lead-preview-details {
      margin: 0;
    }

    #lead-preview .lead-preview-details > div {
      display: grid;
      grid-template-columns: 110px 1fr;
      gap: 8px;
      padding: 4px 0;
      font-size: 13px;
    }

    #lead-preview .lead-preview-details dt {
      margin: 0;
      color: var(--muted);
    }

    #lead-preview .lead-preview-details dd {
      margin: 0;
    }

    #lead-preview .lead-preview-phone {
      font-variant-numeric: tabular-nums;
    }

    #lead-preview .lead-preview-activity-item {
      display: grid;
      grid-template-columns: auto auto 1fr;
      gap: 8px;
      align-items: start;
      font-size: 13px;
      padding: 8px 0;
      border-bottom: 1px solid #EEF0F3;
    }

    #lead-preview .lead-preview-activity-time {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--muted);
      white-space: nowrap;
    }

    #lead-preview .lead-preview-activity-tag {
      font-family: var(--font-mono);
      font-size: 10.5px;
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 2px 6px;
      white-space: nowrap;
    }

    #lead-preview .lead-preview-activity-who {
      margin-top: 2px;
      font-size: 12px;
      color: var(--muted);
    }

    #lead-preview .lead-preview-footer {
      margin-top: auto;
    }

    #lead-preview #lead-preview-open {
      width: 100%;
      border-color: var(--accent);
      color: var(--accent);
      font-weight: 600;
    }

    @media (max-width: 1100px) {
      #lead-preview #lead-preview-close,
      #lead-preview #lead-preview-open-icon,
      #lead-preview .lead-preview-quick button,
      #lead-preview #lead-preview-open {
        min-height: 40px;
        height: auto;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      #lead-preview,
      #lead-preview.open,
      #lead-preview-content,
      #lead-preview-scrim,
      #lead-preview-scrim.open,
      #leads-view main {
        transition: none !important;
      }
    }

    #detail-view {
      background: var(--bg);
      overflow-x: hidden;
    }

    #detail-view > header {
      background: var(--band-bg);
      border-bottom: 0;
      padding: 18px 32px 0;
    }

    #detail-view > header h1 {
      display: none;
    }

    #detail-view #back-btn {
      background: transparent;
      color: var(--band-muted);
      border: 0;
      height: auto;
      padding: 6px 0;
    }

    #detail-view #back-btn:hover {
      color: #fff;
      background: transparent;
    }

    #detail-view main {
      padding: 0;
    }

    #detail-view #detail-msg {
      margin: 0;
      padding: 8px 32px 0;
      background: var(--band-bg);
      color: var(--band-muted);
    }

    #detail-view #detail-msg:empty {
      display: none;
    }

    #detail-view .detail-band {
      position: relative;
      z-index: 0;
      background: var(--band-bg);
      color: #fff;
      padding: 4px 32px 74px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    #detail-view .detail-band-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    #detail-view .detail-band-left {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px 12px;
      min-width: 0;
    }

    #detail-view #detail-name {
      font-family: var(--font-display);
      font-size: 40px;
      font-weight: 800;
      letter-spacing: -0.03em;
      color: #fff;
      margin: 0;
      line-height: 1.05;
    }

    #detail-view .detail-quick-facts {
      margin: 0;
      color: var(--band-muted);
      font-size: 13px;
    }

    #detail-view .detail-quick-facts .fact-phone {
      font-family: var(--font-mono);
      color: #fff;
    }

    .came-from {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 2px 10px;
      min-width: 0;
    }

    .came-from-link,
    .came-from-see {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      margin: 0;
      padding: 0;
      border: 0;
      background: none;
      cursor: pointer;
      font: 700 14px/1.3 var(--font-body);
      text-align: left;
      color: var(--accent);
    }

    .came-from-link:hover,
    .came-from-see:hover {
      color: var(--accent-hover);
    }

    .came-from-how {
      font-size: 14px;
    }

    #detail-view .detail-quick-facts .came-from-link,
    #detail-view .detail-quick-facts .came-from-how,
    #detail-view .detail-quick-facts .came-from-see,
    #lead-preview #lead-preview-sub .came-from-link,
    #lead-preview #lead-preview-sub .came-from-how {
      color: #fff;
    }

    #detail-view .detail-quick-facts .came-from-see {
      color: var(--band-muted);
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    #detail-view .detail-quick-facts .came-from-link:hover,
    #lead-preview #lead-preview-sub .came-from-link:hover {
      color: #fff;
    }

    #detail-view .detail-kv .came-from-see,
    #lead-preview .came-from-see {
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    #lead-preview .lead-preview-details {
      font-size: 14px;
    }

    #detail-view .detail-quick-facts .consent-badge {
      height: 26px;
      padding: 0 10px;
      border-radius: 13px;
      font-weight: 800;
      font-size: 12px;
    }

    #detail-view #detail-status,
    #detail-view #detail-request-pill,
    #detail-view #detail-wait-pill {
      height: 26px;
      padding: 0 10px;
      border-radius: 13px;
      border: 0;
      font: 800 12px var(--font-body);
    }

    #detail-view #detail-request-pill.req-wait-pill {
      background: var(--attention-bg);
      color: var(--attention);
    }

    #detail-view .detail-header-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    /* SA1: survey lead waiting for approval (js/survey-approval.js), a white strip in the dark band */
    #detail-view .detail-survey-approval {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 10px 16px;
      margin-top: 12px;
      padding: 12px 14px;
      border-radius: 14px;
      background: #fff;
      color: var(--ink, #1B1530);
      border-left: 4px solid var(--wait, #B26B00);
    }
    #detail-view .detail-survey-approval.hidden { display: none; }
    #detail-view .detail-survey-approval .survey-approval-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    #detail-view .detail-survey-approval .survey-approval-text .muted { color: #5b5670; }
    #detail-view .detail-survey-approval .survey-approval-actions { display: flex; flex-wrap: wrap; gap: 8px; }

    #detail-view .detail-header-tags .hh-tag {
      background: var(--band-surface);
      color: #fff;
      border: 0;
    }

    #detail-view .card-head-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    #detail-view .card-head-row h2 {
      margin: 0;
    }

    #detail-view .card-head-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .hh-tag {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 999px;
      background: #EEF0F3;
      color: var(--muted);
      font-size: 12px;
    }

    .household-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px 18px;
    }

    .household-item dt {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
      margin-bottom: 4px;
    }

    .household-item dd {
      margin: 0;
      font-size: 14px;
    }

    .spouse-row {
      grid-column: 1 / -1;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px 14px;
      display: flex;
      flex-wrap: wrap;
      gap: 12px 24px;
      align-items: center;
    }

    .spouse-row .spouse-kicker {
      font-size: 11px;
      letter-spacing: 0.06em;
      color: var(--muted);
      width: 100%;
      margin: 0;
    }

    .activity-note-form {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-bottom: 14px;
    }

    .activity-note-form input[type="text"] {
      flex: 1 1 180px;
      margin: 0;
    }

    .activity-tabs {
      display: inline-flex;
      flex-wrap: nowrap;
      align-items: center;
      gap: 0;
      width: auto;
      max-width: 100%;
      padding: 3px;
      border-radius: 10px;
      background: #F0F2F5;
    }

    #activity-tabs .band-tab {
      color: #3A4352;
      font-size: 13px;
      font-weight: 500;
      line-height: 1.2;
      background: transparent;
      border: 0;
      border-bottom: 0;
      padding: 6px 12px;
      border-radius: 8px;
      white-space: nowrap;
    }

    #activity-tabs .band-tab.active {
      background: #fff;
      color: #3A4352;
      font-weight: 700;
      border-bottom: 0;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
    }

    .activity-row {
      display: grid;
      grid-template-columns: 88px 72px 1fr;
      gap: 8px;
      padding: 8px 0;
      border-bottom: 1px solid #EEF0F3;
      font-size: 13px;
    }

    .activity-time {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--muted);
    }

    .activity-kind {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.04em;
      color: var(--muted);
    }

    .demo-booked-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
    }

    .demo-booked-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 14px;
    }

    .demo-booked-owner {
      margin: 8px 0 0;
      color: var(--muted);
    }

    #detail-view #detail-callback-card {
      background: color-mix(in srgb, var(--accent) 9%, white);
      padding: 10px 14px;
    }

    .detail-callback-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .detail-callback-row p {
      margin: 0;
      flex: 1 1 auto;
      min-width: 0;
      font-size: 14px;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }

    #detail-view #detail-callback-card.detail-callback-overdue .detail-callback-row p {
      color: var(--danger);
    }

    .detail-callback-actions {
      display: flex;
      flex-shrink: 0;
      gap: 8px;
    }

    #detail-view #detail-callback-card .btn-primary,
    #detail-view #detail-callback-card .btn-secondary,
    .detail-callback-actions .btn-primary,
    .detail-callback-actions .btn-secondary {
      min-height: 44px;
    }

    #detail-view #detail-outcome-nudge {
      background: #FFF6E5;
      border-color: #F1D3A6;
      padding: 12px 14px;
    }

    .outcome-nudge p {
      margin: 0 0 10px;
      font-size: 14px;
      line-height: 1.4;
    }

    .outcome-nudge-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    #detail-view #detail-outcome-nudge .btn-primary,
    #detail-view #detail-outcome-nudge .btn-secondary,
    .outcome-nudge-actions .btn-primary,
    .outcome-nudge-actions .btn-secondary {
      min-height: 44px;
    }

    .lead-phone-bar {
      display: none;
    }

    .status-close-row {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      width: 100%;
      text-align: left;
      margin-bottom: 8px;
      padding: 12px 14px;
      min-height: 44px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      cursor: pointer;
    }

    .status-close-row.selected {
      border-color: var(--accent);
      background: color-mix(in srgb, var(--accent) 8%, white);
    }

    .status-close-row.current {
      opacity: 0.55;
    }

    .status-close-hint {
      font-size: 12px;
      color: var(--muted);
      font-weight: 400;
    }

    #lead-thread-panel .chat-thread-empty {
      max-height: none;
      padding: 0;
      background: transparent;
      border: 0;
    }

    #detail-view #detail-status {
      display: inline-flex;
      align-items: center;
      width: fit-content;
    }

    #detail-view #detail-office {
      color: var(--band-muted);
      margin: 0;
    }

    /* CB1: "Call from my phone", a separate choice when Call starts a TULOS call (on the dark band) */
    .call-own-phone {
      align-self: center;
      padding: 0 4px;
      color: rgba(255, 255, 255, 0.82);
      font-size: 13px;
      text-decoration: underline;
      text-underline-offset: 3px;
      white-space: nowrap;
      cursor: pointer;
    }
    .call-own-phone:hover { color: #fff; }

    #detail-view .detail-action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    #detail-view .detail-action {
      height: 40px;
      padding: 0 20px;
      border-radius: 20px;
      border: 1px solid var(--band-line);
      background: transparent;
      color: #fff;
      font: 500 14px var(--font-body);
      display: inline-flex;
      align-items: center;
      text-decoration: none;
      cursor: pointer;
    }

    #detail-view .detail-action.primary {
      background: #fff;
      border-color: #fff;
      color: var(--text);
      font-weight: 800;
    }

    #detail-view .detail-action:hover {
      background: var(--band-surface);
    }

    #detail-view .detail-action.primary:hover {
      background: var(--soft);
      border-color: var(--soft);
      color: var(--text);
    }

    #detail-view #detail-book-btn,
    #detail-view #change-status-btn,
    #detail-view #detail-claim-btn,
    #detail-view #detail-assign-shared-btn {
      display: none;
    }

    #detail-view #detail-book-btn.is-band-primary:not(.hidden) {
      display: inline-flex;
      order: -1;
    }

    #detail-view .detail-grid {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      align-items: flex-start;
      margin: -50px 32px 24px;
      min-width: 0;
    }

    #detail-view .detail-main {
      flex: 999 1 480px;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    #detail-view .detail-side {
      flex: 0 0 400px;
      width: 400px;
      max-width: 400px;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    #detail-view section.card {
      background: var(--surface);
      border-radius: var(--radius-lg);
      box-shadow: 0 1px 2px rgba(27, 21, 48, 0.06), 0 14px 34px rgba(27, 21, 48, 0.08);
      padding: 22px;
      border: 1px solid var(--border);
      margin-bottom: 0;
      min-width: 0;
      max-width: 100%;
    }

    #detail-view section.card h2:not(.detail-next-heading) {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
      letter-spacing: -0.02em;
      margin: 0 0 12px;
    }

    #detail-view #demo-booked-when {
      font-family: var(--font-display);
      font-size: 28px;
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1.15;
      margin: 6px 0 0;
      color: var(--text);
    }

    #detail-view .detail-empty {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 14px;
    }

    #detail-view .detail-next-card {
      background: color-mix(in srgb, var(--accent) 9%, white);
      border-radius: var(--radius-lg);
      padding: 14px 16px;
      box-shadow: none;
    }

    #detail-view .detail-next-heading {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.07em;
      color: var(--muted);
      margin: 0 0 8px;
    }

    #detail-view #demo-booked-kicker.demo-passed {
      color: #D97706;
    }

    #detail-view #demo-booked-section.demo-passed {
      border-color: #F1D3A6;
    }

    #demos-section .demo-item {
      padding: 12px 0;
      border-bottom: 1px solid #EEF0F3;
    }

    #demos-section .demo-item:first-child {
      padding-top: 0;
    }

    #demos-section .demo-item:last-child {
      border-bottom: 0;
      padding-bottom: 0;
    }

    .demo-item-top {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
    }

    .demo-item-when {
      font-size: 14px;
      font-weight: 600;
    }

    .demo-item-dealer {
      font-size: 14px;
    }

    .demo-chip {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      line-height: 1.3;
    }

    .demo-chip-scheduled {
      background: #DBEAFE;
      color: #1D4ED8;
    }

    .demo-chip-waiting {
      background: #FEF3C7;
      color: #B45309;
    }

    .demo-chip-sale {
      background: #DCFCE7;
      color: #15803D;
    }

    .demo-chip-done,
    .demo-chip-cancelled,
    .demo-chip-noshow {
      background: #F3F4F6;
      color: #4B5563;
    }

    /* DA1: Mark as duplicate picker (the existing .choice buttons, one per line) */
    .dup-pick-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 16px;
    }

    .dup-pick-list .choice {
      text-align: left;
      line-height: 1.4;
    }

    .demo-issue {
      margin: 6px 0 0;
      font-weight: 800;
    }

    .demo-issue.is-double { color: var(--attention); }
    .demo-issue.is-warn { color: var(--wait); }
    .demo-issue.is-agreed { color: #5E5873; font-weight: 700; }
    .demo-issue.is-session { color: #4B2EDB; font-weight: 700; }

    .demo-issue-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-top: 6px;
    }

    .demo-issue-row .demo-issue { margin: 0; }

    .demo-issue-agree { min-height: 44px; }

    .demo-item-meta,
    .demo-item-reason {
      margin: 4px 0 0;
      font-size: 12px;
    }

    #lead-preview-demo {
      margin: 8px 0 0;
      font-size: 13px;
      color: var(--band-muted);
    }

    #detail-view #demo-booked-by {
      margin: 4px 0 0;
      font-size: 12px;
      color: var(--muted);
    }

    #detail-view .detail-next-card.detail-next-empty-card {
      background: var(--surface);
      padding: 10px 14px;
    }

    #detail-view .detail-next-empty-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: 0;
    }

    #detail-view .detail-next-empty-row span {
      color: var(--muted);
      font-size: 13px;
    }

    #detail-email,
    #detail-email .detail-email-link {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow-wrap: normal;
      word-break: keep-all;
    }

    #detail-email .detail-email-link {
      color: inherit;
      text-decoration: none;
    }

    #detail-email .detail-email-link:hover {
      text-decoration: underline;
    }

    #status-choose-wrap {
      padding: 16px 20px 0;
      overflow: auto;
      min-height: 0;
    }

    #detail-view .detail-next-demo {
      margin: 0;
      font-size: 17px;
      font-weight: 700;
      color: var(--text);
    }

    #detail-view .detail-next-reminder {
      margin: 6px 0 0;
    }

    #detail-view .detail-next-empty {
      margin: 0;
    }

    #detail-view .detail-side > section.card:first-child .kv {
      grid-template-columns: 120px minmax(0, 1fr);
      gap: 8px 12px;
    }

    #detail-view .detail-side > section.card:first-child .kv dt {
      color: var(--muted);
      text-transform: none;
      letter-spacing: 0;
      font-weight: 500;
      font-size: 0.9rem;
      white-space: normal;
      overflow-wrap: normal;
      word-break: normal;
    }

    #detail-view .detail-side > section.card:first-child .kv dd {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    #detail-view .detail-side > section.card:first-child #detail-email {
      overflow-wrap: normal;
      word-break: keep-all;
    }

    #detail-view #detail-phone {
      font-family: var(--font-mono);
    }

    #detail-view .location-maps iframe {
      height: 240px;
      max-width: 100%;
    }

    #detail-view #lead-location-missing {
      margin: 0 0 12px;
      overflow-wrap: anywhere;
    }

    #detail-view #detail-submitted-by a,
    #detail-view #sale-rider-badge {
      cursor: pointer;
    }

    #detail-view #detail-submitted-by a {
      color: var(--accent);
      text-decoration: none;
      font-weight: 500;
    }

    #detail-view .detail-side dd,
    #detail-view .detail-side p {
      overflow-wrap: anywhere;
    }

    #detail-view .detail-side #detail-email,
    #detail-view .detail-side #detail-email .detail-email-link {
      overflow-wrap: normal;
    }

    @media (max-width: 1279px) and (min-width: 760px) {
      #detail-view .detail-side {
        flex-basis: 330px;
        width: 330px;
        max-width: 330px;
      }

      #detail-view .detail-action,
      #detail-view .choice,
      #detail-view .btn-primary,
      #detail-view .btn-secondary {
        min-height: 44px;
      }
    }

    @media (max-width: 1100px) {
      #detail-view .location-maps iframe {
        height: 200px;
      }

      #detail-view .detail-band {
        padding: 4px 20px 64px;
      }

      #detail-view .detail-grid {
        margin: -40px 16px 24px;
      }

      #detail-view > header {
        padding: 18px 20px 0;
      }

      #detail-view .detail-action {
        min-height: 44px;
        height: auto;
      }

      button:not(.band-btn):not(.band-tab):not(.detail-action):not(.side-link):not(.sign-out-btn):not(.app-nav-btn):not(.sidebar-toggle):not(.app-tab):not(.today-name):not(.help-q),
      .btn-primary,
      .btn-secondary,
      .btn-ghost,
      .btn-danger,
      input[type="email"],
      input[type="date"],
      input[type="time"],
      input[type="datetime-local"],
      input[type="number"],
      input[type="text"],
      input[type="tel"],
      input[type="url"],
      input[type="search"],
      input[type="password"],
      select:not(.band-select),
      textarea {
        min-height: 40px;
      }

      textarea {
        height: auto;
      }

      .band-search input {
        min-height: 0;
        height: auto;
      }
    }

    @media (max-width: 1100px) and (min-width: 760px) {
      #detail-view .detail-grid {
        flex-direction: column;
      }

      #detail-view .detail-main,
      #detail-view .detail-side {
        display: contents;
      }

      #detail-view .detail-side {
        width: auto;
        max-width: none;
        flex-basis: auto;
      }

      #demo-booked-section { order: 1; }
      #detail-outcome-nudge { order: 2; }
      #lead-details-section { order: 3; }
      #detail-callback-card { order: 4; }
      #demos-section { order: 5; }
      #detail-next-action-section { order: 6; }
      #lead-conversation-section { order: 7; }
      #shared-survey-section { order: 8; }
      #survey-answers-section { order: 9; }
      #lead-activity-section { order: 10; }
      #referral-survey-card { order: 11; }
      #lead-location-section { order: 12; }
      #sale-form-waiting, #sale-details-section { order: 0; } /* owner Nov 22: right under the SOLD card */
      #lead-referred-section { order: 14; }
    }

    @media (min-width: 760px) {
      #detail-more-log { display: none; }
    }

    @media (max-width: 759px) {
      #detail-view {
        overflow-x: hidden;
      }

      #detail-view > header {
        position: sticky;
        top: 0;
        z-index: 12;
        padding: 12px 16px 0 56px;
      }

      #detail-view .detail-band {
        position: relative;
        top: auto;
        z-index: 0;
        padding: 8px 16px 16px;
        gap: 8px;
      }

      #detail-view #detail-name {
        font-size: 26px;
      }

      #detail-view #demo-booked-when {
        font-size: 22px;
      }

      #demo-booked-section.your-demo #demo-booked-kicker {
        display: none;
      }

      #detail-view .detail-action-row {
        display: none;
      }

      #detail-view .detail-grid {
        flex-direction: column;
        margin: 0 12px 96px;
        /* MPA d25c89e1 (Nov 19): stacked columns take the screen's width. With align-items flex-start and wrap, the
           main column sized itself to its widest content, so with a large phone font it ran off the right edge
           (and #detail-view hides sideways scroll, so it was cut off). */
        flex-wrap: nowrap;
        align-items: stretch;
      }

      #detail-view .detail-main {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
      }

      #detail-view .detail-side {
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
      }

      .household-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      #lead-activity-section .card-head-row {
        flex-direction: column;
        align-items: stretch;
      }

      #activity-tabs.activity-tabs {
        width: 100%;
      }

      #activity-tabs .band-tab {
        flex: 1 1 0;
        text-align: center;
        padding: 8px 6px;
      }

      #lead-thread-panel .chat-thread:not(.chat-thread-empty) .chat-row:not(:last-child) {
        display: none;
      }

      .lead-phone-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        background: #fff;
        border-top: 1px solid var(--border);
        box-shadow: 0 -8px 24px rgba(27, 21, 48, 0.06);
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
      }

      .lead-phone-bar button {
        flex: 1;
        min-height: 48px;
        height: 48px;
        border-radius: 24px;
        border: 1.5px solid var(--border-strong);
        background: #fff;
        color: var(--text);
        font: 800 14px var(--font-body);
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      #phone-bar-log {
        display: none;
      }

      #phone-bar-book {
        flex: 1.3;
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
        min-height: 48px;
      }

      #phone-bar-book.hidden {
        display: none;
      }

      #phone-bar-more {
        flex: 0 0 48px;
        width: 48px;
        padding: 0;
      }

      #demo-booked-section.your-demo .demo-booked-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
      }

      #demo-booked-section.your-demo .demo-booked-actions .btn-primary {
        min-height: 48px;
        height: 48px;
      }

      #detail-view .fold-card > h2,
      #detail-view .fold-card .card-head-row h2 {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      #detail-view .fold-card > h2::after,
      #detail-view .fold-card .card-head-row h2::after {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--muted);
        border-bottom: 2px solid var(--muted);
        transform: rotate(-135deg);
        flex: none;
      }

      #detail-view .fold-card.folded > h2::after,
      #detail-view .fold-card.folded .card-head-row h2::after {
        transform: rotate(45deg);
        margin-top: -4px;
      }

      #survey-answers-section.folded .household-grid > :nth-child(n+3),
      #survey-answers-section.folded #household-unanswered,
      #survey-answers-section.folded .household-extra,
      #lead-activity-section.folded .activity-note-form,
      #lead-activity-section.folded #activity-tabs,
      #lead-activity-section.folded .activity-row:nth-child(n+3),
      #lead-activity-section.folded #activity-show-all-btn,
      #lead-details-section.folded .detail-kv > :not(.fold-peek) {
        display: none;
      }

      #detail-view .detail-callback-row {
        flex-direction: column;
        align-items: stretch;
      }

      #detail-view .detail-callback-actions .btn-primary,
      #detail-view .detail-callback-actions .btn-secondary,
      #detail-view .outcome-nudge-actions .btn-primary,
      #detail-view .outcome-nudge-actions .btn-secondary {
        flex: 1 1 0;
        justify-content: center;
      }

      #lead-location-section h2 {
        cursor: pointer;
      }

      #lead-location-section.folded .location-maps,
      #lead-location-section.folded .location-map-actions,
      #lead-location-section.folded #lead-location-missing,
      #lead-location-section.folded #lead-add-address-btn {
        display: none;
      }
    }

    #contact-modal .modal-strip h2,
    #status-modal .modal-strip h2 {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 22px;
    }

    #contact-modal .modal-strip-close,
    #status-modal .modal-strip-close {
      width: 36px;
      height: 36px;
      border-radius: 18px;
    }

    #contact-modal .choice,
    #status-modal #status-working-options .choice {
      height: 40px;
      padding: 0 15px;
      border-radius: 20px;
      border: 1.5px solid var(--border-strong);
      font-weight: 700;
    }

    #contact-modal .choice.selected,
    #status-modal #status-working-options .choice.selected {
      background: color-mix(in srgb, var(--accent) 12%, white);
      color: var(--accent);
      border-color: var(--accent);
    }

    #status-modal .field-hint {
      font: 800 11px var(--font-body);
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }

    #status-modal .status-close-row {
      border-radius: 14px;
    }

    #status-modal .status-close-row.selected {
      border-color: var(--accent);
      background: color-mix(in srgb, var(--accent) 10%, white);
    }

    .household-extra > dt {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
      margin: 16px 0 8px;
    }

    .shared-chip {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.01em;
      white-space: nowrap;
      vertical-align: middle;
    }

    .shared-chip-open {
      background: #EDE9FE;
      color: #5B21B6;
    }

    .shared-chip-unclaimed {
      background: #E5E7EB;
      color: #4B5563;
    }

    #detail-view .shared-chip-open {
      background: rgba(237, 233, 254, 0.18);
      color: #DDD6FE;
      border: 1px solid rgba(196, 181, 253, 0.45);
    }

    #detail-view .shared-chip-unclaimed {
      background: rgba(255, 255, 255, 0.12);
      color: #D1D5DB;
    }

    .detail-shared-line {
      margin: 6px 0 0;
      font-size: 13px;
    }

    .shared-hours-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .shared-hours-row input {
      width: 88px;
    }

    .demo-booked-more {
      flex-shrink: 0;
      width: 44px;
      height: 44px;
      min-height: 44px;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      color: var(--text);
      font-size: 18px;
      line-height: 1;
    }

    .demo-booked-ask {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      margin-top: 8px;
      padding: 0;
    }

    #lead-preview .lead-preview-status-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    #lead-preview #lead-preview-request-pill {
      height: 26px;
      border-radius: 13px;
    }

    #lead-preview .req-strip {
      width: 100%;
    }

    #detail-view .demo-booked-actions .btn-primary,
    #detail-view .demo-booked-actions .btn-secondary,
    #detail-view #demo-booked-take,
    #detail-view .demo-booked-more,
    #detail-view .demo-booked-ask,
    #detail-view .req-strip .btn-primary,
    #detail-view .req-strip .btn-secondary,
    #detail-view .req-strip .link-btn,
    #lead-preview .req-strip .btn-primary,
    #lead-preview .req-strip .btn-secondary,
    #lead-preview .req-strip .link-btn,
    #demo-booked-menu button {
      min-height: 44px;
    }

    /* IN1b: the ad's parts in the Campaign row */
    .detail-ad-part { line-height: 1.4; }
    .detail-ad-label { color: var(--muted); font-weight: 700; }

    /* IN1b: the address in Details */
    .detail-address { display: inline-flex; flex-direction: column; }
    .detail-address-line { line-height: 1.4; }
    .detail-copy-address { margin-left: 8px; font-size: 13px; }

/* SL1: several sales on one lead */
.sale-list { display: grid; gap: 6px; margin: 4px 0 14px; }
.sale-list-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline;
  width: 100%; text-align: left; padding: 9px 12px; border: 1px solid #E4E1EE; border-radius: 10px;
  background: #fff; color: #1B1530; font: inherit; cursor: pointer;
}
.sale-list-row:hover { border-color: #C9C1F2; }
.sale-list-row.is-on { border-color: #4B2EDB; box-shadow: inset 3px 0 0 #4B2EDB; background: #F6F4FE; }
.sale-list-row.is-cancelled .sale-list-main, .sale-list-row.is-cancelled .sale-list-side { color: #8A849B; text-decoration: line-through; }
.sale-list-main { font-weight: 600; }
.sale-list-side { font-variant-numeric: tabular-nums; }
.sale-list-serial { grid-column: 1 / -1; font-size: 13px; color: #6B6580; }
.add-sale-form label { display: block; margin-top: 10px; }
.add-sale-form input, .add-sale-form select { width: 100%; }
.sale-custom { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ECEAF3; }
.sale-custom-edit { margin-top: 8px; }
.sale-custom-form { display: grid; gap: 10px; }
.sale-custom-field { display: grid; gap: 4px; font-size: 13px; color: #6B6580; }
.sale-custom-field input, .sale-custom-field select { max-width: 320px; }

    /* LP1: while the lead page fills, only the quick header shows */
    #detail-content.is-loading .detail-grid,
    #detail-content.is-loading .detail-action-row {
      visibility: hidden;
      pointer-events: none;
    }

    /* NQ1: Not Qualified on a lead that isn't office-supplied */
    .status-close-row.is-unavailable { opacity: .6; cursor: not-allowed; }

    /* MS1: the Sold card under the name */
    #detail-view section.card.sold-card {
      border-color: color-mix(in srgb, #15803D 30%, white);
      background: color-mix(in srgb, #15803D 5%, white);
    }
    #detail-view .sold-card #sold-kicker { color: #15803D; }
    #detail-view section.card.sold-card.is-cancelled { border-color: var(--border); background: #fff; }
    #detail-view .sold-card.is-cancelled #sold-kicker { color: var(--muted); }
    .sold-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
    .sold-when { margin: 0 0 6px; font-weight: 600; }
    .sold-units { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
    .sold-units li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
    .sold-product { font-weight: 600; color: var(--ink, #1B1530); }
    .sold-serial { color: var(--muted); font-size: 0.92em; overflow-wrap: anywhere; }
    .sold-money { margin: 8px 0 0; }
    .sold-reason { margin: 6px 0 0; }
    .sale-doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
    .sale-docs-list { display: grid; gap: 2px; margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 4px; background: #fff; }
    .sale-docs-row {
      display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
      min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left;
      font: inherit; color: inherit; cursor: pointer;
    }
    .sale-docs-row:hover, .sale-docs-row:focus-visible { background: color-mix(in srgb, var(--accent) 7%, white); }
    .sale-docs-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
    .sale-docs-side { color: var(--muted); font-size: 0.85em; white-space: nowrap; }
    #sold-msg { margin: 10px 0 0; }

/* LF1: Photos and files */
.lead-files .lead-files-head { margin-bottom: 6px; }
.lead-files-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-files-warning { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.lead-files-warning.is-strong { color: #8A4B00; font-weight: 600; }
.lead-files-stage { margin-top: 10px; padding: 12px; border: 1px solid var(--line, #E4E1EE); border-radius: 14px; display: grid; gap: 10px; }
.lead-files-stage.hidden { display: none; }
.lead-files-stage label { display: grid; gap: 4px; font-size: 14px; }
.lead-files-stage-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lead-files-stage-img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: 0 0 64px; }
.lead-files-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.lead-file { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.lead-file-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #F4F1FF; display: grid; place-items: center; text-decoration: none; }
.lead-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead-file-icon { font: 700 13px var(--font-display, "Bricolage Grotesque", sans-serif); color: #4B2EDB; }
.lead-file-info { flex: 1 1 auto; min-width: 0; }
.lead-file-name { margin: 0; font-weight: 600; color: #1B1530; overflow-wrap: anywhere; }
.lead-file-who { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.lead-file-delete { font-size: 13px; padding: 0; margin-top: 2px; }
.lead-files-empty { margin: 10px 0 0; }

/* AD2 b) earlier addresses kept on the lead */
.detail-kept-addresses { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; width: 100%; }
.detail-kept-address { font-size: 12px; color: var(--muted, #6b6880); overflow-wrap: anywhere; }

    /* MPA d25c89e1 (Nov 19): narrow phones and phones with a large font setting. Nothing on the lead page may be
       wider than the screen: header buttons wrap under the title, the bottom bar's buttons shrink, and the activity
       list stacks the time and kind above the text. */
    @media (max-width: 759px) {
      #detail-view .card-head-row { flex-wrap: wrap; }
      #detail-view .card-head-row > * { min-width: 0; }
      #detail-view .card-head-actions { flex-wrap: wrap; }
      .lead-phone-bar button { min-width: 0; padding-left: 6px; padding-right: 6px; }
    }
    @media (max-width: 359px) {
      .activity-row { grid-template-columns: auto 1fr; }
      .activity-row > :nth-child(3) { grid-column: 1 / -1; }
      .lead-phone-bar { gap: 6px; padding-left: 8px; padding-right: 8px; }
      .lead-phone-bar button { font-size: 13px; }
    }

/* owner Nov 22 (sale-panel-tidy): Sale details sit under the SOLD card in the main column, in groups:
   The sale, Demo details, Paperwork, Dealer notes (then Other details). Empty answers hide behind "Show N empty". */
#sale-details-section .detail-top h2 { margin: 0; }
.sale-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px 28px; margin-top: 6px; }
.sale-groups.hidden { display: none; }
.sale-group { min-width: 0; }
.sale-group:only-child { max-width: 560px; }
.sale-group-title { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid #ECEAF3; font: 700 12px var(--font-body, inherit); text-transform: uppercase; letter-spacing: .05em; color: #6B6580; }
.sale-rows { margin: 0; display: grid; gap: 8px; }
.sale-row { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.sale-row dt { margin: 0; color: #6B6580; font-size: 14px; line-height: 1.35; }
.sale-row dd { margin: 0; min-width: 0; color: var(--ink, #1B1530); font-weight: 600; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.sale-row-note { margin: 4px 0 0; font-weight: 400; font-size: 14px; color: #4A4560; }
.sale-empty-val { color: #8A849B; font-weight: 400; }
.sale-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sale-item-name { font-weight: 700; }
.sale-item-serial { font-weight: 400; color: #6B6580; font-variant-numeric: tabular-nums; }
.sale-yn { display: inline-flex; align-items: center; gap: 6px; }
.sale-yn-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 800; line-height: 1; }
.sale-yn.is-yes .sale-yn-mark { background: #DCFCE7; color: #15803D; }
.sale-yn.is-no .sale-yn-mark { background: #FDECEC; color: #B42318; }
.sale-yn.is-no { color: #4A4560; font-weight: 500; }
.sale-group-notes { grid-column: 1 / -1; }
.sale-notes { margin: 0; white-space: pre-wrap; font-size: 15px; line-height: 1.45; color: var(--ink, #1B1530); }
.sale-notes.is-empty { color: #8A849B; }
.sale-empty-toggle { display: inline-block; margin-top: 12px; font-size: 14px; }
.sale-empty-toggle.hidden { display: none; }
@media (max-width: 759px) {
  .sale-row { grid-template-columns: minmax(88px, 33%) minmax(0, 1fr); gap: 10px; }
  .sale-item-serial { white-space: nowrap; }
}

    /* CD1: the cancellation period on the SOLD card (js/sale-cancel-by.js) */
    .sold-cancel-by { margin: 0 0 6px; font-size: 14px; }
    /* SB1: more than one Rainbow at one demo */
    .sold-demo-sales { margin: 0 0 6px; font-size: 14px; color: #1B1530; }
    .sb-modal { max-width: 520px; }
    .sb-choice { display: block; width: 100%; text-align: left; margin: 0 0 10px; padding: 14px 16px; border: 1px solid #DAD6EA;
      border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: #1B1530; }
    .sb-choice:hover, .sb-choice:focus-visible { border-color: #4B2EDB; box-shadow: 0 0 0 3px rgba(75, 46, 219, 0.12); }
    .sb-choice strong { display: block; font-size: 16px; margin-bottom: 4px; }
    .sb-choice span { display: block; font-size: 14px; color: #5B5670; }
    .sb-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
    .sb-form .sb-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
    .sb-form .msg, .sb-form .modal-actions { grid-column: 1 / -1; }
    @media (max-width: 520px) { .sb-form { grid-template-columns: 1fr; } }
    .sold-cancel-line { margin: 0; color: #3D3657; }
    .sold-cancel-by.is-over .sold-cancel-line { color: #1F6B40; font-weight: 600; }
    .sold-cancel-by.is-missing .sold-cancel-line { color: #7A5300; }
    .sold-cancel-acts { display: inline-flex; gap: 10px; }
    .sold-cancel-form { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px solid #ECE9F5; border-radius: 10px; background: #FBFAFE; }
    .sold-cancel-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: #1B1530; }
    .sold-cancel-form input { font: inherit; padding: 7px 9px; border: 1px solid #CFC9E0; border-radius: 8px; }
    .sold-cancel-form-acts { display: flex; gap: 8px; }
    .sold-cancel-log { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: #3D3657; display: grid; gap: 3px; }
/* css/sales.css */
    #sale-details-section.sale-cancelled h2 {
      color: var(--muted);
    }

    .invoice-mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border: 1px solid #d5e0ec;
      border-radius: 4px;
      color: var(--accent);
      background: #eef3f8;
      font-size: 0.75rem;
      font-weight: 700;
      line-height: 1;
    }

    .match-results {
      max-height: 280px;
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: 8px;
      margin-bottom: 16px;
    }

    .match-result {
      display: block;
      width: 100%;
      text-align: left;
      background: #fff;
      border: none;
      border-bottom: 1px solid var(--border);
      border-radius: 0;
      padding: 10px 12px;
    }

    .match-result:last-child { border-bottom: none; }

    .match-result:hover { background: #f8fafc; }

    .match-result-meta {
      display: block;
      color: var(--muted);
      font-size: 0.85rem;
      font-weight: 500;
    }

    #sale-details-section #cancel-sale-btn,
    #sale-details-section #match-contact-btn,
    #sale-details-section #assign-dealer-btn,
    #sale-details-section #make-rider-btn,
    #sale-details-section #remove-rider-btn {
      display: none !important;
    }

/* TAX1: the sales tax check before the sale form */
.tax-modal { position: relative; max-width: 520px; }
.tax-modal h2 { margin: 0 0 8px; }
.tax-close { position: absolute; top: 10px; right: 12px; }
.tax-line { margin: 0 0 6px; }
.tax-address { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #F4F1FF; font-weight: 700; color: #1B1530; }
.tax-result { margin: 0 0 6px; font-size: 16px; line-height: 1.45; }
.tax-result strong { color: #4B2EDB; }
.tax-failed { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; background: var(--wait-bg, #FFF4E0); color: var(--wait, #8A5A00); font-weight: 600; }
.tax-fallback { margin: 0 0 10px; }
.tax-fallback a { font-weight: 700; }
.tax-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0 0 8px; }
.tax-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.tax-field:first-child { grid-column: 1 / -1; }
.tax-actions { flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 480px) { .tax-edit { grid-template-columns: 1fr; } }
.sale-tax-settings { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.sale-tax-settings input[type=url], .sale-tax-settings input[type=number] { max-width: 420px; }
.sale-form-tax { margin: 8px 0 14px; }
.sale-form-tax select { max-width: 420px; }
.sale-form-tax-rate { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; }
.sale-form-tax-rate input[type=number] { width: 110px; }

    /* MS1: Invoice, Warranty and All (n) on each sale row */
    .sales-docs-cell { position: relative; }
    /* on the desktop table: three small links, one under the other (the table has no room for buttons side by side) */
    .sale-doc-actions.is-compact { margin-top: 0; gap: 2px; flex-direction: column; align-items: flex-start; }
    .sale-doc-actions.is-compact .sale-doc-btn {
      padding: 1px 0; min-height: 0; height: auto; line-height: 1.3; border: 0; border-radius: 0; background: none; box-shadow: none;
      color: var(--accent); font-size: 0.8rem; font-weight: 600; white-space: nowrap; text-decoration: underline;
      text-underline-offset: 2px;
    }
    .sale-doc-actions.is-compact .sale-doc-btn:hover { color: var(--ink, #1B1530); }
    .sale-docs-pop {
      position: fixed; z-index: 60; width: 320px; margin-top: 0;
      max-height: min(360px, 60vh); overflow: auto; box-shadow: 0 10px 30px rgba(27, 21, 48, 0.16);
    }
    .sales-docs-cell .msg { margin: 4px 0 0; font-size: 0.8rem; white-space: normal; }
/* ST3: Get tax rate: the tax for the typed price; Finish up's end-of-demo buttons */
.tax-amount { margin: 4px 0 8px; font-size: 16px; }
.tax-amount strong { color: #1B1530; font-size: 18px; }
.finish-up-tools { margin: 0 0 10px; flex-wrap: wrap; gap: 8px; }

/* WF1 (owner Dec 3): the tax windows open over Finish up (z-index 60) */
.tax-backdrop { z-index: 70; }
/* css/pickers.css */
    .dealer-picker {
      position: relative;
    }

    .dealer-picker-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 8px;
    }

    .dealer-picker-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 999px;
      background: #EEF0F3;
      font-size: 13px;
      font-weight: 600;
    }

    .dealer-picker-chip button {
      border: 0;
      background: none;
      padding: 0 2px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1;
      min-height: 0;
    }

    .dealer-picker-field {
      position: relative;
    }

    .dealer-picker-field input[type="search"] {
      width: 100%;
      margin: 0;
      padding-right: 36px;
    }

    .dealer-picker-field input[type="search"]::-webkit-search-cancel-button,
    .dealer-picker-sheet-head input[type="search"]::-webkit-search-cancel-button {
      -webkit-appearance: none;
      appearance: none;
      display: none;
    }

    .dealer-picker-clear {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      border: 0;
      background: none;
      color: var(--muted);
      font-size: 18px;
      line-height: 1;
      min-height: 32px;
      min-width: 32px;
      padding: 0;
    }

    .dealer-picker-menu {
      position: fixed;
      z-index: 80;
      display: flex;
      flex-direction: column;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(14, 17, 23, 0.12);
      overflow: hidden;
    }

    .dealer-picker-menu.hidden {
      display: none;
    }

    .dealer-picker-sheet-head {
      display: none;
      flex-shrink: 0;
      padding: 12px 12px 8px;
      border-bottom: 1px solid var(--border);
    }

    .dealer-picker-sheet-head input[type="search"] {
      width: 100%;
      margin: 0;
    }

    .dealer-picker-menu.is-sheet {
      border-radius: 16px 16px 0 0;
      box-shadow: 0 -8px 32px rgba(14, 17, 23, 0.18);
    }

    .dealer-picker-menu.is-sheet .dealer-picker-sheet-head {
      display: block;
    }

    .dealer-picker-tools {
      display: flex;
      gap: 14px;
      padding: 8px 12px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }

    .dealer-picker-results {
      flex: 1 1 auto;
      min-height: 0;
      overflow: auto;
    }

    .dealer-picker-item {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-height: 44px;
      padding: 8px 12px;
      border: 0;
      border-radius: 0;
      background: #fff;
      text-align: left;
    }

    .dealer-picker-item.is-active,
    .dealer-picker-item:hover {
      background: #F6F7F9;
    }

    .dealer-picker-item-name {
      flex: 1 1 auto;
      min-width: 4.5em;
    }

    /* A long detail (e.g. Today › Performance's "Myself" / "Call team") wraps beside the name instead of sliding over it */
    .dealer-picker-item-role {
      flex: 0 1 auto;
      min-width: 0;
      max-width: 55%;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.25;
      text-align: right;
    }

    .dealer-picker-tick {
      flex-shrink: 0;
      color: var(--accent);
      font-weight: 700;
    }

    .dealer-picker-empty {
      padding: 12px;
      color: var(--muted);
      font-size: 13px;
    }

    .dtp {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .dtp-body {
      display: flex;
      gap: 20px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .dtp-cal {
      width: 278px;
      flex: 0 0 auto;
    }

    .dtp-cal-nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }

    .dtp-cal-title {
      font-weight: 600;
      font-size: 15px;
    }

    .dtp-nav-btn {
      width: 32px;
      height: 32px;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 8px;
      cursor: pointer;
      font-size: 18px;
      line-height: 1;
      color: var(--text);
    }

    .dtp-week,
    .dtp-grid {
      display: grid;
      grid-template-columns: repeat(7, 38px);
      gap: 2px;
      justify-content: center;
    }

    .dtp-weekday {
      text-align: center;
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      padding: 4px 0;
    }

    .dtp-day {
      width: 38px;
      height: 38px;
      border: 0;
      background: transparent;
      border-radius: 8px;
      cursor: pointer;
      font: 500 13px var(--font-body);
      color: var(--text);
    }

    .dtp-day.is-outside {
      color: #AEB7C6;
    }

    .dtp-day.is-today {
      box-shadow: inset 0 0 0 2px var(--accent);
    }

    .dtp-day.is-selected {
      background: var(--accent);
      color: #fff;
      box-shadow: none;
    }

    .dtp-day.is-focus:not(.is-selected) {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }

    .dtp-day.is-disabled,
    .dtp-day:disabled {
      color: #C5CAD3;
      opacity: 0.45;
      cursor: default;
      background: transparent;
      box-shadow: none;
    }

    .modal .dtp-body {
      flex-direction: column;
    }

    .modal .dtp-cal,
    .calling-panel .dtp-cal {
      width: 100%;
    }

    .modal .dtp-week,
    .modal .dtp-grid,
    .calling-panel .dtp-week,
    .calling-panel .dtp-grid {
      width: 100%;
      grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .modal .dtp-day,
    .calling-panel .dtp-day {
      width: 100%;
    }

    .dtp-time {
      min-width: 220px;
      flex: 1 1 220px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .dtp-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .dtp-chip,
    .dtp-slot {
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 999px;
      padding: 6px 10px;
      font: 500 12px var(--font-body);
      cursor: pointer;
      color: var(--text);
    }

    .dtp-slot {
      border-radius: 8px;
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      display: inline-flex;
      align-items: baseline;
      justify-content: center;
      gap: 0;
    }

    .dtp-slot-time {
      font-variant-numeric: tabular-nums;
    }

    .dtp-ampm {
      font-size: 12px;
      font-weight: 500;
      color: var(--muted);
    }

    .dtp-chip.is-on,
    .dtp-slot.is-on {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }

    .dtp-slot.is-on .dtp-ampm {
      color: rgba(255, 255, 255, 0.88);
    }

    .dtp-slots {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
    }

    .dtp-other-link {
      align-self: flex-start;
    }

    .dtp-other {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .dtp-select {
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 10px;
      font: 500 14px var(--font-body);
      background: #fff;
    }

    .dtp-colon {
      font-family: var(--font-mono);
      color: var(--muted);
    }

    .dtp-collapsed {
      margin: 8px 0 12px;
      font-size: 14px;
      line-height: 1.4;
    }

    .dtp-change {
      min-height: 44px;
      padding: 0 6px;
    }

    .dtp-summary {
      margin: 0;
      font-size: 13px;
      color: var(--muted);
    }

    .dtp-trigger {
      width: 100%;
      text-align: left;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 8px;
      padding: 10px 12px;
      font: 500 14px var(--font-body);
      cursor: pointer;
      min-height: 44px;
    }

    .dtp-sheet-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(14, 17, 23, 0.45);
      z-index: 90;
      display: flex;
      align-items: flex-end;
    }

    .dtp-sheet-backdrop.hidden {
      display: none;
    }

    .dtp-sheet {
      width: 100%;
      max-height: 92vh;
      overflow: auto;
      background: #fff;
      border-radius: 16px 16px 0 0;
      padding: 4px 16px 20px;
      box-shadow: 0 -12px 40px rgba(14, 17, 23, 0.2);
    }

    .dtp-handle {
      width: 40px;
      height: 4px;
      border-radius: 4px;
      background: #D0D5DD;
      margin: 8px auto 12px;
    }

    .dtp-sheet-title {
      margin: 0 0 12px;
      font-size: 18px;
    }

    .dtp-days-row {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 8px;
    }

    .dtp-day-tile {
      flex: 0 0 68px;
      min-height: 72px;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      cursor: pointer;
    }

    .dtp-day-tile.is-on {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }

    .dtp-day-tile-top {
      font-size: 11px;
      font-weight: 600;
    }

    .dtp-day-tile-num {
      font-size: 20px;
      font-weight: 700;
    }

    .dtp-cal-link {
      margin-bottom: 4px;
    }

    .dtp-set-btn {
      width: 100%;
      margin-top: 12px;
      min-height: 48px;
    }

    .dtp-phone .dtp-chip,
    .dtp-phone .dtp-slot,
    .dtp-phone .dtp-day-tile {
      min-height: 44px;
    }

    .dtp-phone .dtp-cal {
      width: 100%;
    }

    .dtp-phone .dtp-week,
    .dtp-phone .dtp-grid {
      width: 100%;
      grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .dtp-phone .dtp-day {
      width: 100%;
      height: 44px;
    }

    @media (max-width: 767px) {
      .dtp-body {
        flex-direction: column;
      }
    }

    #book-demo-modal {
      z-index: 40;
      padding: 16px;
    }

    .modal-book-demo {
      width: min(760px, calc(100vw - 32px));
      max-width: 760px;
      max-height: min(90vh, 800px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      padding: 0;
    }

    .book-demo-body {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: 16px 20px;
    }

    #book-demo-note {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      resize: vertical;
      overflow-x: hidden;
      overflow-y: auto;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .modal-book-demo .modal-actions-sticky {
      position: static;
      flex: 0 0 auto;
    }

    .book-demo-current {
      margin: 0 0 12px;
      color: var(--muted);
      font-size: 14px;
    }

    .book-demo-request {
      margin: 0 0 12px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #fff6e8;
      color: #6b4a00;
      font-size: 14px;
      font-weight: 600;
    }

    .book-demo-request {
      margin: 0 0 12px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #f4f6fb;
      font-size: 14px;
      font-weight: 600;
    }

    /* BW1: customer history before booking (earlier demo, cold, cancelled 2+ times) */
    .book-demo-history {
      margin: 0 0 12px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #fff6e8;
      border: 1px solid #f0d49a;
      color: #5a3e00;
      font-size: 14px;
    }
    .book-demo-history.is-asking { border-color: #c98a00; box-shadow: 0 0 0 3px rgba(201, 138, 0, 0.18); }
    .book-demo-history-title { margin: 0 0 4px; font-weight: 700; }
    .book-demo-history ul { margin: 0; padding-left: 18px; }
    .book-demo-history li + li { margin-top: 2px; }
    .book-demo-history-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

    .book-demo-fixed-when {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px 12px;
      margin: 0 0 12px;
      font-size: 15px;
      font-weight: 600;
    }

    #book-demo-change-time {
      font-weight: 500;
      min-height: 44px;
      padding: 0 2px;
    }

    #book-demo-modal .choice,
    #no-show-modal .btn-primary,
    #no-show-modal .btn-ghost,
    #no-show-save {
      min-height: 44px;
    }

    #book-demo-pending {
      margin-bottom: 8px;
    }

    /* 0aca8cbc follow-up: one-tap reasons above the Reason box */
    .book-demo-quick-reasons {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 4px 0 8px;
    }
    .book-demo-quick-reasons .chip-btn { min-height: 36px; }

    #book-demo-pending textarea,
    #no-show-note {
      width: 100%;
      min-height: 72px;
    }

    #no-show-who {
      margin: 0 0 12px;
      font-weight: 600;
    }

    .book-demo-summary {
      margin: 8px 0 16px;
      font-weight: 600;
      font-size: 14px;
    }

    .book-demo-day-line {
      margin: 8px 0 0;
      font-size: 14px;
      line-height: 1.4;
    }

    .book-demo-overlap {
      margin: 4px 0 0;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.4;
      color: #B45309;
    }

    #book-demo-modal .dtp-summary {
      display: none;
    }

    #book-demo-modal .dtp-body {
      flex-wrap: nowrap;
      flex-direction: row;
      align-items: flex-start;
    }

    #book-demo-modal .dtp-cal {
      width: 278px;
      flex: 0 0 278px;
    }

    #book-demo-modal .dtp-week,
    #book-demo-modal .dtp-grid {
      width: auto;
      grid-template-columns: repeat(7, 36px);
    }

    #book-demo-modal .dtp-day {
      width: 36px;
      height: 36px;
    }

    #book-demo-modal .dtp-time {
      min-width: 0;
      flex: 1 1 240px;
    }

    #book-demo-modal .dtp-slots {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    @media (max-width: 767px) {
      #book-demo-modal.modal-backdrop {
        align-items: flex-end;
      }

      .modal-book-demo {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
      }

      #book-demo-modal .dtp-body {
        flex-direction: column;
        flex-wrap: wrap;
      }

      #book-demo-modal .dtp-cal,
      #book-demo-modal .dtp-time {
        width: 100%;
        flex: 1 1 auto;
        max-height: none;
      }

      #book-demo-modal .dtp-week,
      #book-demo-modal .dtp-grid {
        width: 100%;
        grid-template-columns: repeat(7, minmax(0, 1fr));
      }

      #book-demo-modal .dtp-day {
        width: 100%;
      }

      .book-demo-footer {
        flex-direction: column-reverse;
        align-items: stretch;
      }

      #book-demo-modal .book-demo-footer .btn-primary,
      #book-demo-modal .book-demo-footer .btn-ghost {
        width: 100%;
        margin: 0;
        min-height: 44px;
      }

      #book-demo-note,
      #book-demo-dealer-search {
        min-height: 44px;
      }
    }

    .addr-ac-menu {
      position: fixed;
      z-index: 80;
      display: flex;
      flex-direction: column;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(14, 17, 23, 0.12);
      overflow: hidden;
      max-width: calc(100vw - 16px);
    }

    .addr-ac-menu.hidden {
      display: none;
    }

    .addr-ac-list {
      flex: 1 1 auto;
      min-height: 0;
      overflow: auto;
    }

    .addr-ac-item {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 2px;
      width: 100%;
      min-height: 44px;
      padding: 8px 12px;
      border: 0;
      border-radius: 0;
      background: #fff;
      text-align: left;
      cursor: pointer;
    }

    .addr-ac-item.is-active,
    .addr-ac-item:hover {
      background: #F6F7F9;
    }

    .addr-ac-main {
      font-weight: 600;
      line-height: 1.3;
    }

    .addr-ac-sub {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.3;
    }

    .addr-ac-note {
      flex-shrink: 0;
      padding: 6px 12px 8px;
      border-top: 1px solid var(--border);
      color: var(--muted);
      font-size: 11px;
    }

    .addr-ac-problem {
      padding: 10px 12px;
      color: var(--muted);
      font-size: 13px;
    }

    /* HQ1: Book a demo for a lead: household questions not answered yet */
    .book-demo-household { margin: 0 0 12px; }

    .book-demo-household-line {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
    }

    .book-demo-household-list {
      margin-top: 8px;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
    }

    .book-demo-household-list .survey-field { margin-bottom: 12px; }
/* css/surveys.css */
    .survey-field {
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .survey-field:last-child { border-bottom: none; }

    .survey-field-label {
      color: var(--muted);
      font-weight: 600;
      font-size: 0.85rem;
      margin-bottom: 8px;
    }

    .survey-field .choice-row { margin-bottom: 0; }

    .survey-field input[type="text"] {
      margin-bottom: 0;
      max-width: 420px;
    }

    .survey-checks {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 16px;
    }

    .survey-checks .check-row { margin: 0; }

    .survey-copy-row,
    .survey-link-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin: 8px 0 12px;
    }

    .survey-copy-row input,
    .survey-link-row input {
      flex: 1 1 180px;
      min-width: 0;
    }

    .survey-funnel {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin: 12px 0;
    }

    .survey-funnel div {
      min-width: 72px;
      display: flex;
      flex-direction: column;
    }

    .survey-funnel strong {
      font-size: 22px;
    }

    .survey-funnel span {
      color: var(--muted);
      font-size: 12px;
    }

    .survey-nudge {
      background: #FFF6E5;
      border: 1px solid #F5D9A6;
      border-radius: 10px;
      padding: 10px 12px;
      margin: 0 0 12px;
    }

    .survey-qr {
      margin: 8px 0;
    }

    .survey-qr-lg canvas,
    .survey-qr-lg img {
      width: 220px !important;
      height: 220px !important;
    }

    .survey-results-page {
      min-height: 100vh;
      background: var(--bg);
      padding: 24px 16px 48px;
    }

    .survey-results-main {
      max-width: 420px;
      margin: 0 auto;
    }

    .survey-results-office {
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-size: 12px;
      color: var(--muted);
    }

    .survey-results-tools {
      display: flex;
      gap: 8px;
      margin: 12px 0;
    }

    .survey-friends {
      list-style: none;
      padding: 0;
      margin: 16px 0;
    }

    .survey-friends li {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }

    .stage-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      color: #fff;
      flex: 0 0 12px;
    }

    .dot-filled { background: #8A94A6; }

    .dot-booked { background: #D97706; }

    .dot-demo { background: #16A34A; }

    .dot-sale { background: #16A34A; }

    .map-table {
      width: 100%;
      border-collapse: collapse;
    }

    .map-table th,
    .map-table td {
      text-align: left;
      vertical-align: top;
      padding: 10px 8px;
      border-bottom: 1px solid var(--border);
      /* Nov 24 (NEO survey): the site-wide th, td rule is nowrap; here a long question or answer pushed the Goes to
         column (the dropdowns) past the form page's panel, which clips, so nothing could be matched */
      white-space: normal;
      overflow-wrap: anywhere;
    }

    #form-map-body { overflow-x: auto; }

    .map-goes select {
      width: 100%;
      max-width: 100%;
      margin-bottom: 8px;
    }

    .map-value-row {
      display: flex;
      gap: 8px;
      align-items: center;
      margin: 4px 0;
    }

    .map-value-row span {
      flex: 1;
      font-size: 13px;
    }

    /* CV1: the answer, with a note under it (near match, no match, not on the form) */
    .map-value-row .map-value-words { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
    .map-value-row .map-value-words span { flex: none; }
    .map-value-row .map-value-note { font-size: 12px; color: var(--muted); }
    .map-value-row.unmatched .map-value-note { color: #92400E; font-weight: 600; }
    .map-value-row select { flex: 0 1 50%; min-width: 0; }
    .map-values-head { margin: 4px 0; font-size: 12px; }
    .map-unoffered { margin: 6px 0; padding: 6px 8px; border-radius: 8px; background: #F4F1FF; color: #3B2A99; font-size: 13px; }

    .map-value-row.unmatched {
      background: #FEF3C7;
      border-radius: 8px;
      padding: 4px 8px;
    }

    .map-unmatched-link {
      color: #B45309;
    }

    .map-cell {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
    }

    .map-extras {
      margin-top: 20px;
    }

    .map-extras summary {
      cursor: pointer;
      font-weight: 600;
      margin-bottom: 8px;
    }

    .map-row-focus td {
      background: #FEF3C7;
    }

    .map-add-answer {
      display: flex;
      gap: 8px;
      margin-top: 8px;
    }

    .map-add-answer input {
      flex: 1;
    }

    #share-survey-search-results .choice {
      display: block;
      width: 100%;
      margin: 6px 0;
      text-align: left;
    }

    #referral-survey-card .btn-primary,
    #lead-preview-survey-card .btn-primary,
    #shared-survey-section #shared-survey-share-btn {
      min-height: 44px;
    }

    .referral-blurb,
    .referral-summary {
      margin: 0 0 12px;
      font-size: 14px;
      line-height: 1.4;
    }

    .referral-summary {
      color: var(--muted);
    }

    #shared-survey-section .card-head-row {
      align-items: center;
    }

    #shared-survey-section .card-head-row h2 {
      margin: 0;
    }

    .surveys-page {
      padding: 8px 8px 20px;
    }

    .surveys-block {
      padding: 16px 16px 8px;
    }

    .surveys-block h2 {
      margin: 0 0 12px;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .surveys-v1-card {
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 14px 8px;
      margin: 0 0 12px;
    }

    .surveys-v1-name {
      min-height: 44px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--accent);
      font: inherit;
      font-weight: 700;
      text-align: left;
      cursor: pointer;
    }

    .surveys-v1-stats {
      margin: 0 0 8px;
    }

    .surveys-v1-people h3 {
      margin: 8px 0 4px;
      font-size: 14px;
    }

    .surveys-v1-people ul {
      margin: 0 0 8px;
      padding-left: 18px;
    }

    .surveys-v1-people li {
      margin: 0 0 4px;
    }

    #surveys-view {
      overflow-x: clip;
    }

    /* IN3: sale form mapping and the prefilled link */
    .sale-map-intro h3,
    .sale-prefill h3 {
      margin: 0 0 6px;
      font: 700 18px var(--font-display);
      color: var(--text);
    }
    .sale-map-intro p,
    .sale-prefill > p { margin: 0 0 12px; }
    .sale-map-intro { padding: 20px 20px 4px; }
    .sale-prefill {
      margin-top: 24px;
      padding: 20px;
      border-top: 1px solid var(--border);
    }
    .sale-prefill .map-table { margin: 0 -20px 12px; width: calc(100% + 40px); }
    .sale-prefill input[type="url"],
    .sale-prefill .map-table input[type="text"] { width: 100%; max-width: 420px; }
    .sale-prefill-products { display: grid; gap: 4px; margin: 4px 0 14px; }
    .sale-prefill-preview { margin-top: 8px; }

    /* IN3: Admin › Incoming data */
    .incoming-list { display: grid; margin-top: 12px; }
    .incoming-row { border-top: 1px solid var(--border); }
    .incoming-row:first-child { border-top: 0; }
    .incoming-row > summary {
      display: grid;
      grid-template-columns: auto 150px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      padding: 12px 4px;
      cursor: pointer;
      list-style: none;
    }
    .incoming-row > summary::-webkit-details-marker { display: none; }
    .incoming-row > summary:hover { background: var(--bg); }
    .incoming-when { color: var(--muted); font-size: 13px; padding-top: 3px; }
    .incoming-what { display: grid; gap: 2px; min-width: 0; }
    .incoming-what .muted { font-size: 13px; }
    .incoming-msg { font-size: 14px; overflow-wrap: anywhere; }
    .incoming-body { padding: 0 4px 16px; }
    .incoming-body .action-row { margin-bottom: 10px; }
    .incoming-fields { width: 100%; border-collapse: collapse; font-size: 13px; }
    .incoming-fields th,
    .incoming-fields td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
    .incoming-fields th { color: var(--muted); font-weight: 700; border-top: 0; }
    .incoming-fields td:first-child { width: 38%; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
    @media (max-width: 640px) {
      .incoming-row > summary { grid-template-columns: auto minmax(0, 1fr); }
      .incoming-when { grid-column: 2; padding-top: 0; }
      .incoming-what { grid-column: 1 / -1; }
    }

    /* IN3: demos marked Sale waiting for their sale form */
    .needs-sale-form { padding: 18px 22px 8px; }
    .needs-sale-form-row:last-child { padding-bottom: 12px; }
    @media (max-width: 640px) { .needs-sale-form { padding: 16px 16px 6px; } }
    .needs-sale-form h3 { margin: 0 0 4px; font: 700 18px var(--font-display); color: var(--text); }
    .needs-sale-form-head p { margin: 0 0 10px; }
    .needs-sale-form-row {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      padding: 10px 0;
      border-top: 1px solid var(--border);
    }
    .needs-sale-form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .sale-form-waiting { border-left: 4px solid var(--st-sale); }
    .sale-form-waiting-line { margin: 0 0 10px; }

    /* SV2: share tools, full-screen QR, dealer cards */
    .survey-qr-lg svg { width: 220px; height: 220px; display: block; }
    .sv2-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
    .sv2-tools-note:empty { display: none; }
    #share-survey-picture-wrap { margin: 12px 0 4px; }
    .sv2-qr-full {
      position: fixed;
      inset: 0;
      z-index: 2000;
      background: #fff;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 24px 16px;
      text-align: center;
    }
    .sv2-qr-full h2 { margin: 0; font: 800 26px/1.15 var(--font-display), sans-serif; color: var(--text); }
    .sv2-qr-full-sub { margin: 0; color: var(--muted); font-size: 16px; }
    .sv2-qr-full-code svg { width: min(78vw, 62vh, 520px); height: min(78vw, 62vh, 520px); display: block; }
    .sv2-qr-full-link { margin: 0; font-weight: 600; color: var(--accent); word-break: break-all; }
    .sv2-qr-full-close { position: absolute; top: 16px; right: 16px; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; }
    .sv2-card-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 8px; }
    .sv2-card-qr svg { width: 200px; height: 200px; display: block; border: 1px solid var(--border); border-radius: 12px; }
    .sv2-card-side { flex: 1; min-width: 240px; }
    .sv2-card-opens { margin: 10px 0 0; }
    .profile-mycard { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--border); }
    .profile-calendar { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--border); }
    .profile-calendar .dcal-new { margin-top: 12px; }
    .profile-calendar .dcal-url { width: 100%; box-sizing: border-box; font-size: 14px; }
    .profile-calendar .dcal-actions { flex-wrap: wrap; gap: 8px; margin-top: 8px; }
    .dealer-cards-card { margin-top: 16px; }
    .dealer-cards-card select { max-width: 420px; }
    .dealer-cards-routing { border: 0; padding: 0; margin: 16px 0 8px; }
    .dealer-cards-routing legend { font-weight: 600; margin-bottom: 6px; }
    .dealer-cards-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
    @media (max-width: 600px) {
      .sv2-card-layout { flex-direction: column; align-items: stretch; }
      .sv2-card-qr { align-self: center; }
      .sv2-card-side { min-width: 0; width: 100%; }
    }
    #share-survey-actions.survey-link-row { display: block; }

    /* CF1: Cognito fields, readiness and missed entries */
    .cf-list { display: flex; flex-direction: column; gap: 4px; max-width: 360px; }
    .cf-list-meta { margin: 0; font-size: 12px; }
    .cf-list-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
    .cf-list-note { font-size: 12px; }
    .cf-ready { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; }
    .cf-ready-line { margin: 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; }
    .cf-ready-line.amber { background: var(--wait-bg); color: var(--wait); }
    .cf-ready-line.grey { background: var(--soft); color: var(--muted); }
    .map-cell .cf-ready { margin: 2px 0; }
    .map-cell .cf-ready-line { font-size: 12px; padding: 4px 8px; }
    #cognito-add-modal .survey-copy-row input { min-width: 0; }

    /* SD1: a survey form's link prefill (mapping page) */
    .survey-prefill { margin-top: 24px; padding: 20px; border-top: 1px solid var(--border); }
    .survey-prefill h3 { margin: 0 0 6px; font: 700 18px var(--font-display); color: var(--text); }
    .survey-prefill > p { margin: 0 0 12px; }
    .survey-prefill-row { display: grid; grid-template-columns: minmax(180px, 320px) minmax(0, 300px) auto; gap: 8px 12px; align-items: center; margin: 0 0 8px; }
    .survey-prefill-row label { font-size: 14px; color: var(--text); }
    .survey-prefill-row input { width: 100%; }
    @media (max-width: 640px) { .survey-prefill-row { grid-template-columns: 1fr; } }

/* H2: several units on one sale form */
.sale-units-mode { margin: 12px 0 16px; padding: 12px 14px; border-radius: 14px; background: #F7F5FC; display: flex; flex-direction: column; gap: 6px; }
.sale-units-mode-title { margin: 0; font-weight: 700; font-size: 14px; color: #1B1530; }
.sale-units-mode .check-row { display: flex; gap: 8px; align-items: flex-start; min-height: 32px; }
.sale-units-mode .field-hint { margin: 2px 0 0; }
.sale-units { margin: 0; padding-left: 18px; }
.sale-units li { margin: 2px 0; }

    /* Add a form / Edit form: the Saved confirmation at the top of the box */
    .add-form-saved { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px;
      border-radius: 12px; background: #E9F7EF; border: 1px solid #A7DDBE; color: #14532D; }
    /* FP1: the class sets display:flex, which beat [hidden]: the old "Saved: changes to <other form>" stayed up */
    .add-form-saved[hidden] { display: none; }
    .add-form-saved svg { flex: none; margin-top: 1px; color: #1E8E5A; }
    .add-form-saved strong { display: block; font-size: 15px; }
    .add-form-saved span { display: block; font-size: 13px; margin-top: 2px; }

    /* YS1: Your surveys at the top of the Surveys page */
    .surveys-forms-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
    .surveys-form-row { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: #fff; }
    .surveys-form-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
    .surveys-form-main strong { font-size: 15px; color: var(--text, #1B1530); overflow-wrap: anywhere; }
    .surveys-form-state { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
    .surveys-form-state.is-ready { background: #E9F7EF; color: #14532D; }
    .surveys-form-state.is-wait { background: #EEF2FF; color: #3B2A99; }
    .surveys-form-state.is-match { background: #FEF3C7; color: #92400E; }
    .surveys-form-state.is-off { background: #F1F1F4; color: var(--muted); }
    .surveys-form-meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
    .surveys-share-how { margin: 12px 0 4px; font-size: 14px; color: var(--text, #1B1530); }
    .surveys-forms-link { margin: 4px 0 8px; min-height: 36px; font-weight: 700; }

    /* SV2 Share a survey: survey picker, already-shared lines, sharing settings, order, Sharers filters */
    .share-survey-pick { margin-bottom: 12px; }
    .share-survey-pick select { width: 100%; max-width: 420px; }
    .share-survey-shared { margin: 4px 0 12px; }
    .share-survey-shared-list { margin: 4px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted, #5b5670); }
    .share-survey-shared-list li { margin: 2px 0; }
    .add-form-share { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
    .add-form-share-to { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
    .add-form-share-chosen { margin: 4px 0 8px 4px; }
    .add-form-share-list { display: flex; flex-wrap: wrap; gap: 4px 16px; max-height: 180px; overflow-y: auto; }
    .share-order-card { margin-top: 16px; }
    .share-order-list { list-style: none; margin: 8px 0 0; padding: 0; }
    .share-order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
    .share-order-row strong { display: block; }
    .share-order-meta { font-size: 13px; }
    .share-order-acts { display: flex; gap: 6px; flex-shrink: 0; }
    .sv2-sharers-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
    .sv2-sharers-filter { display: flex; align-items: center; gap: 6px; font-size: 14px; }
    .sv2-sharers-filter select { max-width: 220px; }
    .map-consent-warn { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: #FFF6E5; color: #7A4B00; font-size: 14px; }
    /* CW1: the mapping table doesn't wrap; the consent notes under a box must, or they run off a phone screen */
    .map-goes .map-consent-warn, .map-goes p.muted { white-space: normal; min-width: 220px; max-width: 420px; }
    /* SB1: fills from one sharer's links */
    .sv2-sharers-filter span { white-space: nowrap; }
    .sb1-fills { margin-top: 14px; }
    .sb1-fills h3 { font-family: "Bricolage Grotesque", sans-serif; font-size: 16px; margin: 0 0 8px; color: #1B1530; }
    .sb1-fills .link-btn { margin-top: 8px; }

    /* SS1: Share a survey: words and language switches */
    .share-words-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
    .share-words-row .seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: #fff; }
    .share-words-row .seg-btn { border: 0; background: transparent; padding: 7px 12px; font: inherit; font-size: 14px; color: #1B1530; cursor: pointer; min-height: 36px; }
    .share-words-row .seg-btn.active { background: #4B2EDB; color: #fff; }
    .share-script-full { position: fixed; inset: 0; z-index: 1200; background: #1B1530; color: #fff; padding: 24px 16px; overflow: auto; }
    .share-script-full p { font-size: 22px; line-height: 1.5; white-space: pre-wrap; max-width: 720px; margin: 16px auto; }
    .share-script-full button { display: block; margin: 0 auto; }
    .add-form-share-words { margin: 12px 0; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
    .add-form-share-words summary { cursor: pointer; font-weight: 600; }
    .add-form-share-words textarea { width: 100%; box-sizing: border-box; }

/* SS2: the survey link's preview picture (Admin › Forms › Edit) */
.add-form-share-image-wrap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #e7e4f0); }
.add-form-share-image-title { margin: 0 0 4px; font-weight: 700; }
.add-form-share-image { display: block; width: 100%; max-width: 280px; aspect-ratio: auto; border-radius: 10px; border: 1px solid var(--line, #e7e4f0); margin: 8px 0; }
.add-form-share-image-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.add-form-share-image-pick { cursor: pointer; }
    /* RA1 Reply alerts (My profile and Admin) */
    .ra-choices { display: grid; gap: 8px; margin: 12px 0; }
    .ra-choice { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
    .ra-choice input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
    .ra-actions:empty { display: none; }

/* SP1: named share posts (Admin › Forms › Sharing) and the post page link in Share a survey */
.add-form-share-fallback.is-folded { margin: 10px 0; border: 1px solid var(--line, #E6E3EF); border-radius: 10px; padding: 8px 12px; }
.add-form-share-fallback > summary { cursor: pointer; font-weight: 600; }
.add-form-share-posts { margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--line, #E6E3EF); }
.sp-list { display: grid; gap: 12px; margin: 8px 0; }
.sp-post { border: 1px solid var(--line, #E6E3EF); border-radius: 14px; padding: 12px; background: #fff; display: grid; gap: 6px; }
.sp-post-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-post textarea, .sp-post input[type="text"] { width: 100%; }
.share-survey-post-page { margin: 10px 0; }

    /* OW1: Dealer cards, one white card per dealer */
    .dealer-cards-into { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 4px; }
    .dealer-cards-into label { font-weight: 700; margin: 0; }
    .dealer-cards-into select { flex: 1 1 220px; max-width: 420px; margin: 0; }
    /* MC2: the office's short name for sharing */
    .share-name-row { margin: 12px 0 8px; padding: 12px 14px; border: 1px solid #E6E1F5; border-radius: 12px; background: #FAF9FF; }
    .share-name-row label { font-weight: 700; margin: 0 0 6px; display: block; }
    .share-name-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .share-name-line input { flex: 1 1 200px; max-width: 320px; margin: 0; }
    .share-name-row .field-hint { margin: 6px 0 0; }
    /* owner Nov 22: the section gets the same inner padding as the other white cards (.fm-group), and the grid fits it */
    #forms-dealer-cards.dealer-cards-card { padding: 18px 20px 20px; }
    #forms-dealer-cards > h2 { margin-top: 0; }
    .dealer-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 8px; min-width: 0; }
    .dc-tile { display: grid; gap: 12px; min-width: 0; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 1px 2px rgba(27, 21, 48, .04); }
    .dc-tile-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .dc-tile-name { font: 700 16px var(--font-heading, var(--font-body)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dc-tile-mid { display: flex; align-items: center; gap: 14px; }
    .dc-tile-qr { width: 84px; height: 84px; flex: none; border: 1px solid var(--border); border-radius: 10px; padding: 4px; background: #fff; }
    .dc-tile-qr svg { width: 100%; height: 100%; display: block; }
    .dc-tile-qr.is-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; color: var(--muted); }
    .dc-tile-qr-icon { width: 36px; height: 36px; opacity: .35; color: var(--ink, #1B1530); }
    .dc-tile-qr-caption { font-size: 10.5px; line-height: 1.2; color: var(--muted); }
    .dc-tile-num { display: grid; }
    .dc-tile-big { font: 800 30px/1 var(--font-heading, var(--font-body)); color: var(--ink, #1B1530); }
    .dc-tile-small { color: var(--muted); font-size: 13px; }
    /* Open and Print keep their size; Text fills the rest of the row, or the whole next row when it doesn't fit.
       Every card in a row has the same width, so every card lays out the same way. */
    .dc-tile-acts { display: flex; flex-wrap: wrap; gap: 8px; }
    .dc-tile-acts > button { flex: 0 0 auto; margin: 0; }
    .dc-tile-acts > .dc-tile-text { flex: 1 1 auto; }
    @media (max-width: 640px) { .dealer-cards-grid { grid-template-columns: 1fr; } }
    @media (max-width: 520px) { #forms-dealer-cards.dealer-cards-card { padding: 14px 14px 16px; } }
    .ow-th { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
    .surveys-share-how summary { cursor: pointer; list-style: none; }
    .surveys-share-how summary::-webkit-details-marker { display: none; }
    .surveys-share-how ol { margin: 8px 0 0 20px; padding: 0; display: grid; gap: 4px; }
    .sb1-open-leads { margin: 10px 12px 0 0; }

/* NM1: the finance company named with a filled-in approval code, under the "goes to" choice */
.sale-map-goes { display: flex; flex-direction: column; gap: 6px; }
.sale-map-goes .sale-map-company { font-size: 13px; }
.sale-map-goes .sale-map-company[hidden] { display: none; }
/* css/forms-page.css */
    /* FP1 Forms page (owner Nov 20): one white card per form, grouped; a form's own page with tabs.
       Design kit: ink #1B1530, violet #4B2EDB, Bricolage Grotesque headings, Figtree text, dark band, white cards. */

    /* the list sits up into the dark band like a band-card */
    .fm-list {
      position: relative;
      z-index: 1;
      margin: -50px 32px 24px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .fm-list:empty { display: none; }
    #forms-view .fm-list:not(:empty) ~ .band-card { margin-top: 0; }
    .fm-empty { padding: 20px; }

    .fm-group {
      background: var(--surface);
      border-radius: var(--radius-lg);
      box-shadow: 0 1px 2px rgba(27, 21, 48, 0.06), 0 14px 34px rgba(27, 21, 48, 0.10);
      padding: 18px 20px 20px;
      min-width: 0;
    }
    .fm-group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
    .fm-group-title { margin: 0; font: 800 22px var(--font-display); color: var(--text); }
    .fm-group-count { font-size: 13px; color: var(--muted); }

    .fm-cards {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
      gap: 14px;
      align-items: start;
    }

    .fm-card {
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
      padding: 16px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }
    .fm-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .fm-card-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .fm-card-name {
      padding: 0;
      border: 0;
      background: none;
      text-align: left;
      color: var(--text);
      font: 800 17px var(--font-display);
      line-height: 1.25;
      overflow-wrap: anywhere;
      cursor: pointer;
    }
    .fm-card-name:hover { color: var(--accent); }
    .fm-card-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
    .fm-card-sentence { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text); }
    .fm-card-stats { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }

    .fm-pill {
      display: inline-flex;
      align-items: center;
      flex: none;
      height: 26px;
      padding: 0 10px;
      border-radius: 13px;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }
    .fm-pill-ok { background: var(--ok-bg); color: var(--ok); }
    .fm-pill-setup { background: var(--soft); color: var(--accent); }
    .fm-pill-look { background: var(--wait-bg); color: var(--wait); }
    .fm-pill-off { background: #EFEDF5; color: var(--muted); }

    /* the single next thing */
    .fm-next {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      padding: 10px 12px;
      border-radius: 12px;
      background: var(--soft);
    }
    .fm-card-look .fm-next { background: var(--wait-bg); }
    .fm-next-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; }
    .fm-next-label { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
    .fm-next-text { font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }

    .fm-card-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .fm-card-acts .btn-small, .fm-check-acts .btn-small, .fm-next .btn-small, .fm-ov-tools .btn-small {
      min-height: 36px;
      padding: 6px 14px;
      border-radius: 18px;
      font-size: 13px;
    }
    .fm-check-note:empty { display: none; }
    .fm-check-note { font-size: 13px; }

    /* "…" menu */
    .fm-more { position: relative; }
    .fm-more > summary { list-style: none; }
    .fm-more > summary::-webkit-details-marker { display: none; }
    .fm-more-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      border-radius: 18px;
      border: 1.5px solid var(--border-strong);
      font-weight: 800;
      color: var(--text);
      cursor: pointer;
      user-select: none;
    }
    .fm-more[open] .fm-more-btn { background: var(--soft); }
    .fm-more-menu {
      position: absolute;
      right: 0;
      bottom: calc(100% + 6px);
      z-index: 5;
      min-width: 220px;
      padding: 6px;
      border-radius: 12px;
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: 0 10px 28px rgba(27, 21, 48, 0.16);
      display: flex;
      flex-direction: column;
    }
    .fm-more-item {
      padding: 10px 12px;
      border: 0;
      border-radius: 8px;
      background: none;
      text-align: left;
      font: 600 14px var(--font-body);
      color: var(--text);
      cursor: pointer;
    }
    .fm-more-item:hover, .fm-more-item:focus-visible { background: var(--soft); }
    .fm-more-item:disabled { opacity: .5; }

    /* the checklist */
    .fm-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
    .fm-check.compact { gap: 6px; padding-top: 2px; }
    .fm-check li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
    .fm-mark {
      flex: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 11px;
      font-size: 12px;
      font-weight: 800;
      border: 2px solid var(--border-strong);
      color: transparent;
    }
    .fm-check.compact .fm-mark { width: 18px; height: 18px; font-size: 10px; border-width: 1.5px; }
    .fm-check li.done .fm-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
    .fm-check li.todo .fm-mark { border-color: var(--accent); }
    .fm-check li.info .fm-mark { border-color: var(--border-strong); color: var(--muted); font-style: italic; font-family: Georgia, serif; }
    .fm-check-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
    .fm-check-title { font-size: 14px; font-weight: 700; color: var(--text); }
    .fm-check.compact .fm-check-title { font-size: 13px; font-weight: 600; }
    .fm-check.compact li.done .fm-check-title { color: var(--muted); font-weight: 500; }
    .fm-check-detail { font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
    .fm-check-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
    .fm-check .sr-only, .fm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

    .fm-copy { display: flex; gap: 8px; align-items: center; margin-top: 6px; min-width: 0; }
    .fm-copy input {
      flex: 1;
      min-width: 0;
      height: 38px;
      margin: 0;
      padding: 0 10px;
      border-radius: 10px;
      border: 1px solid var(--border-strong);
      background: var(--bg);
      font: 12px var(--font-mono);
      color: var(--text);
    }

    /* a form's page */
    .fm-band-main { min-width: 0; }
    #form-map-view .page-band h1 { overflow-wrap: anywhere; }
    #fm-band-pill .fm-pill { height: 30px; font-size: 13px; padding: 0 12px; }
    .fm-panel-body { padding: 20px 24px 24px; }
    .fm-panel-title { margin: 0 0 12px; font: 800 20px var(--font-display); color: var(--text); }
    #fm-panel-settings form, #fm-panel-sharing .fm-panel-body { max-width: 760px; }
    .fm-save-row { margin-top: 16px; }
    .fm-ov-head { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
    .fm-ov-sentence { margin: 0 0 8px; font-size: 17px; line-height: 1.5; color: var(--text); max-width: 760px; }
    .fm-ov-sec { padding: 18px 0; border-bottom: 1px solid var(--border); }
    .fm-ov-sec:last-child { border-bottom: 0; padding-bottom: 0; }
    .fm-ov-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
    .fm-ov-sec-head .fm-panel-title { margin: 0; }
    .fm-ov-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
    .fm-ov-meta { margin: 8px 0 0; font-size: 13px; }
    .fm-check li.fm-hi { margin: 0 -10px; padding: 10px; border-radius: 12px; background: var(--soft); }
    .fm-post { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
    .fm-copy-text {
      flex: 1;
      min-width: 0;
      padding: 9px 10px;
      border-radius: 10px;
      border: 1px solid var(--border-strong);
      background: var(--bg);
      font: 12px/1.45 var(--font-mono);
      color: var(--text);
      overflow-wrap: anywhere;
      word-break: break-all;
      user-select: all;
    }
    .fm-readonly-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 14px; line-height: 1.45; }
    .fm-readonly #form-map-body :is(input, select, textarea, button) { pointer-events: none; }
    .fm-req { display: flex; flex-direction: column; gap: 6px; }
    .fm-req textarea { resize: vertical; }
    .fm-connect-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.45; max-width: 760px; }
    .fm-entries .form-entry-row:first-child { border-top: 0; }
    .fm-share-place { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
    .fm-share-place p { margin: 0 0 8px; }
    .fm-share-place p:last-child { margin-bottom: 0; }
    #fm-panel-sharing .add-form-share-words > summary { font-weight: 700; margin: 12px 0 6px; }

    /* Share a survey order at the top of the Surveys group */
    .fm-order-slot:empty { display: none; }
    .fm-share-order {
      margin: 0 0 16px;
      padding: 12px 16px;
      border-radius: var(--radius);
      background: var(--bg);
    }
    .fm-share-order .share-order-list { margin-top: 4px; }
    .fm-share-order .share-order-row:first-child { border-top: 0; }
    .fm-sub { margin: 0; font: 800 16px var(--font-display); color: var(--text); }
    .fm-order-details > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
    .fm-order-details > summary::-webkit-details-marker { display: none; }
    .fm-order-details > summary::after { content: "Change"; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); }
    .fm-order-details[open] > summary::after { content: "Close"; }
    .fm-order-names { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
    .fm-order-details[open] > .field-hint { margin-top: 8px; }
    #forms-view > main > .fm-share-order.hidden { display: none; }

    /* Add a form: the steps */
    .fm-steps { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: fmstep; }
    .fm-steps li {
      counter-increment: fmstep;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px 4px 4px;
      border-radius: 14px;
      background: var(--bg);
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
    }
    .fm-steps li::before {
      content: counter(fmstep);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      border-radius: 10px;
      background: var(--border);
      color: var(--text);
      font-size: 11px;
      font-weight: 800;
    }
    .fm-steps li.on { background: var(--soft); color: var(--accent); }
    .fm-steps li.on::before { background: var(--accent); color: #fff; }
    .fm-steps li.done::before { content: "✓"; background: var(--ok); color: #fff; }
    .fm-step-btn { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
    .fm-wizard-title { margin: 0; font: 800 17px var(--font-display); }
    .fm-wizard-body { padding-bottom: 18px; }
    .fm-wizard-body .muted { margin: 0 0 10px; font-size: 13px; }
    #form-map-view .fm-wizard:not(.hidden) ~ .band-card { margin-top: 0; }

    @media (max-width: 1100px) {
      .fm-list { margin: -36px 16px 20px; }
      .fm-panel-body { padding: 16px; }
    }
    @media (max-width: 520px) {
      .fm-group { padding: 14px 14px 16px; }
      .fm-card { padding: 14px; }
      .fm-card-top { flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
      .fm-more-menu { right: auto; left: 0; }
      #form-map-view .page-band-row { flex-wrap: wrap; }
      #fm-tabs { gap: 16px; }
      .fm-copy { flex-wrap: wrap; }
      .fm-copy-text { flex-basis: 100%; }
    }

    /* OW1: the drop area in Ask TellUS for a new form */
    .fm-req-label { font-weight: 700; font-size: 14px; margin-top: 4px; }
    .fm-drop { display: grid; gap: 6px; }
    .fm-drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
    .fm-drop-zone { display: grid; justify-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--accent); text-align: center; cursor: pointer; font-weight: 400; transition: background .15s, border-color .15s; }
    .fm-drop-zone:hover, .fm-drop-zone.is-over, .fm-drop-input:focus-visible + .fm-drop-zone { border-color: var(--accent); background: var(--soft); }
    .fm-drop-title { color: var(--text); font: 700 15px var(--font-body); }
    .fm-drop-hint { color: var(--muted); font-size: 13px; }
    .fm-drop-chosen { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
    .fm-drop-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--bg); flex: none; }
    .fm-drop-pdf { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 10px; background: var(--soft); color: var(--accent); font: 800 14px var(--font-body); flex: none; }
    .fm-drop-words { display: grid; min-width: 0; flex: 1; }
    .fm-drop-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .fm-drop-size { color: var(--muted); font-size: 13px; }
    .fm-drop-remove { flex: none; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
    .fm-drop-remove:hover { border-color: var(--accent); color: var(--accent); }
    .fm-drop-err { margin: 0; color: var(--danger, #B42318); font-size: 13px; }

    /* OW1: an office's form page */
    .fm-ov-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
    .fm-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 8px 0 12px; }
    .fm-num { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
    .fm-num-head { display: flex; align-items: center; gap: 6px; }
    .fm-num-label { font: 700 12px var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
    .fm-num-value { font: 800 30px/1 var(--font-heading, var(--font-body)); color: var(--text); }
    .fm-att { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
    .fm-att-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
    .fm-att-words { display: grid; gap: 2px; min-width: 0; }
    .fm-att-empty { padding: 18px; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok); font-weight: 700; }
    @media (max-width: 560px) { .fm-att-item { flex-direction: column; align-items: stretch; } }

    /* OW1: the small "?" beside a number or column heading (one-line meaning; tap on a phone) */
    .ow-tip { position: relative; display: inline-flex; vertical-align: middle; }
    .ow-tip-btn { width: 18px; height: 18px; padding: 0; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: 700 11px/1 var(--font-body); cursor: pointer; text-transform: none; letter-spacing: 0; }
    .ow-tip-btn:hover, .ow-tip-btn:focus-visible { border-color: var(--accent); color: var(--accent); }
    .ow-tip-pop { display: none; position: absolute; z-index: 30; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 240px; padding: 8px 10px; border-radius: 10px; background: var(--text); color: #fff; font: 400 13px/1.35 var(--font-body); text-transform: none; letter-spacing: 0; white-space: normal; text-align: left; box-shadow: 0 6px 18px rgba(27,21,48,.18); }
    .ow-tip.is-open .ow-tip-pop, .ow-tip-btn:hover + .ow-tip-pop, .ow-tip-btn:focus-visible + .ow-tip-pop { display: block; }
    /* a phone-size rule in lead-detail.css gives every button min-height 40px; the ? stays small (tap area via padding around) */
    .ow-tip .ow-tip-btn { min-height: 18px !important; min-width: 18px; height: 18px; width: 18px; flex: none; box-shadow: none; }
/* css/finance.css */
    /* FN1: Finance (js/finance/) */
    .finance-body { padding: 20px; display: grid; gap: 16px; }
    .finance-placeholder h2 { margin: 0 0 4px; font: 700 22px var(--font-display); color: var(--text); }
    .finance-placeholder p { margin: 0; color: var(--muted); }
    .finance-support-banner {
      padding: 12px 14px;
      border-radius: var(--radius-sm);
      background: var(--wait-bg);
      color: var(--wait);
    }
    .finance-support-banner p { margin: 0 0 8px; }
    .finance-edit-support { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .finance-edit-support input { flex: 1 1 260px; min-width: 0; }
    .finance-edit-support .msg { flex-basis: 100%; margin: 0; }
    .finance-body h3 { margin: 8px 0 0; font: 700 18px var(--font-display); color: var(--text); }
    .finance-table { width: 100%; border-collapse: collapse; font-size: 14px; }
    .finance-table th,
    .finance-table td { text-align: left; padding: 8px; border-top: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
    .finance-table th { color: var(--muted); font-weight: 700; border-top: 0; }
    .fa-card { display: grid; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
    .fa-card:last-child { border-bottom: 0; }
    .fa-card h2 { margin: 0; font: 700 20px var(--font-display); color: var(--text); }
    .fa-card > p { margin: 0; }
    .fa-form { display: grid; gap: 10px; max-width: 560px; }
    .fa-field { display: grid; gap: 4px; font-weight: 600; }
    .fa-field input, .fa-field select { width: 100%; }
    .fa-inline { display: flex; flex-wrap: wrap; gap: 8px; max-width: none; }
    .fa-inline select { flex: 1 1 260px; min-width: 0; }
    .fa-support-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }

    /* Leads switched off (a Finance-only office), and Finance-only people: no Leads menu items */
    body.leads-off .side-link[data-go="today"],
    body.leads-off .side-link[data-go="demos"],
    body.leads-off .side-link[data-go="availability"],
    body.leads-off .side-link[data-go="leads"],
    body.leads-off .side-link[data-go="conversations"],
    body.leads-off .side-link[data-go="calendar"],
    body.leads-off .side-link[data-go="riders"],
    body.leads-off .side-link[data-go="surveys"],
    body.leads-off .side-link[data-go="sales"],
    body.leads-off .side-link[data-go="stats"],
    body.leads-off .side-link[data-go="call-lists"],
    body.leads-off .side-link[data-go="boxes"],
    body.leads-off .side-link[data-go="exhibits"],
    body.leads-off [data-go="today"],
    body.leads-off [data-go="leads"],
    body.leads-off [data-go="calendar"],
    body.finance-only .side-link:not(.finance-nav):not(.help-nav):not(.report-nav),
    body.finance-only [data-go]:not(.finance-nav):not([data-go="more"]) { display: none !important; }

    /* FN2: Finance › Figures (test) */
    .fc-section { display: grid; gap: 10px; }
    .fc-section > p { margin: 0; }
    .fc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
    .fc-tile { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
    .fc-tile.strong { border-color: var(--accent); background: var(--soft); }
    .fc-tile-label { font-size: 13px; color: var(--muted); font-weight: 600; }
    .fc-tile-value { font: 700 22px var(--font-display); color: var(--text); margin-top: 2px; }
    .fc-tile-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
    .fc-table-wrap { overflow-x: auto; }
    .fc-table { min-width: 640px; }
    .fc-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .fc-table tr.fc-planned td { color: var(--muted); font-style: italic; }
    .fc-table tr.fc-release td { background: var(--ok-bg); }
    .fc-table tr.fc-next td { background: var(--soft); }
    .fc-pot-detail { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
    .fc-pot-detail h4 { margin: 0; font: 700 16px var(--font-display); color: var(--text); }
    .fc-machines { font-weight: 600; }
    .fc-pick { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
    .fc-hint { font-size: 13px; }

    /* FN3: Finance › Ledger and Add a deposit / payment */
    #finance-ledger-view, #finance-entry-view, #finance-view, #finance-pots-view, #finance-bank-view, #finance-accounts-view {
      --fl-bank: #1F4373; --fl-bank-bg: #EEF3FA; --fl-bank-bg2: #E4ECF7; --fl-bank-head: #23467A;
      --fl-cash: #0B5A3B; --fl-cash-bg: #E8F5EE; --fl-cash-bg2: #DCEFE5; --fl-cash-head: #0E5A3E;
      --fl-set: #7A5300; --fl-set-bg: #FFF4D6;
    }
    .fl-body { gap: 18px; }
    .fl-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .fl-tile { background: #fff; border: 1px solid var(--border); border-top: 6px solid; border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
    .fl-tile.bank { border-top-color: var(--fl-bank); }
    .fl-tile.pots { border-top-color: #C77A12; }
    .fl-tile.cash { border-top-color: var(--fl-cash); }
    .fl-tile-label { font-weight: 700; font-size: 14px; }
    .fl-tile.bank .fl-tile-label, .fl-tile.bank .fl-tile-value { color: var(--fl-bank); }
    .fl-tile.pots .fl-tile-label, .fl-tile.pots .fl-tile-value { color: var(--fl-set); }
    .fl-tile.cash .fl-tile-label, .fl-tile.cash .fl-tile-value { color: var(--fl-cash); }
    .fl-tile-value { font: 700 28px var(--font-display); margin: 2px 0; font-variant-numeric: tabular-nums; }
    .fl-tile-sub { font-size: 13px; color: var(--muted); }

    .fl-coming { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
    .fl-coming-list { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 360px; align-items: center; }
    .fl-chip { background: var(--soft); color: var(--text); border: 0; border-radius: 8px; padding: 8px 12px; font: 14px var(--font-body); text-align: left; }
    button.fl-chip { cursor: pointer; }
    button.fl-chip:hover { background: var(--border-strong); }
    .fl-coming-after { font-size: 14px; }
    .fl-coming-after strong { font: 700 18px var(--font-display); color: var(--fl-cash); margin-left: 4px; }

    .fl-filters { display: flex; flex-wrap: wrap; gap: 8px; }
    .fl-filter { border: 1px solid var(--border-strong); background: #fff; color: var(--text); border-radius: 999px; padding: 8px 14px; font: 600 14px var(--font-body); cursor: pointer; min-height: 40px; }
    .fl-filter.on { background: var(--text); border-color: var(--text); color: #fff; }

    .fl-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; background: #fff; }
    .fl-table { min-width: 980px; }
    .fl-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 118px 118px 124px 130px 168px; align-items: stretch; }
    .fl-c { padding: 14px; min-width: 0; }
    .fl-c.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .fl-head { background: var(--text); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
    .fl-head .fl-c { padding: 12px 14px; }
    .fl-head .fl-c2, .fl-head .fl-c3, .fl-head .fl-c4, .fl-head .fl-c5 { text-align: right; }
    .fl-head .bank { background: var(--fl-bank-head); }
    .fl-head .cash { background: var(--fl-cash-head); }
    .fl-item { border-top: 1px solid var(--border); }
    .fl-item.odd { background: #FAF9FD; }
    .fl-item.needs { background: #FFF8E8; }
    .fl-item.short { background: #FFF1EC; }
    .fl-date { font-weight: 600; white-space: nowrap; }
    .fl-desc { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
    .fl-title { font-weight: 700; font-size: 15px; color: var(--text); text-align: left; overflow-wrap: anywhere; }
    button.fl-title { padding: 0; }
    .fl-sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
    .fl-sub.warn { color: var(--danger); font-weight: 700; }
    .fl-toggle { margin-top: 4px; padding: 5px 10px; border: 1px solid var(--border-strong); background: #fff; border-radius: 6px; font: 600 13px var(--font-body); color: var(--text); cursor: pointer; min-height: 32px; }
    .fl-c.amount { font-weight: 700; font-size: 16px; }
    .fl-c.amount.in { color: var(--ok); }
    .fl-c.pots { font-weight: 600; color: var(--muted); }
    .fl-c.pots.down { color: var(--fl-set); }
    .fl-c.pots.up { color: var(--ok); }
    .fl-row .fl-c.bank { background: var(--fl-bank-bg); color: var(--fl-bank); }
    .fl-row .fl-c.cash { background: var(--fl-cash-bg); color: var(--fl-cash); font-weight: 700; font-size: 16px; }
    .fl-item.odd .fl-c.bank { background: var(--fl-bank-bg2); }
    .fl-item.odd .fl-c.cash { background: var(--fl-cash-bg2); }
    .fl-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
    .fl-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 11px; font: 700 12px var(--font-body); white-space: nowrap; border: 2px solid transparent; }
    .fl-pill.cleared { background: var(--ok); color: #fff; }
    .fl-pill.uncleared { border-color: #6E6787; color: #4A4460; background: #fff; }
    .fl-pill.needs { background: #9A5B05; color: #fff; }
    button.fl-pill.needs { cursor: pointer; min-height: 32px; }
    .fl-pill.short { background: #A3321E; color: #fff; }
    .fl-pill.released { background: var(--ok-bg); color: var(--ok); }
    .fl-empty { padding: 18px 16px; margin: 0; }
    .fl-break { padding: 0 14px 16px 98px; }
    .fl-break-card { max-width: 560px; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #fff; }
    .fl-break-head { padding: 9px 14px; background: var(--soft); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
    .fl-break-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 14px; }
    .fl-break-line.total { border-top: 2px solid var(--border-strong); }
    .fl-break-line.short { background: #FFF1EC; }
    .fl-break-line.short .fl-break-amt { color: var(--danger); }
    .fl-break-amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .fl-break-foot { padding: 9px 14px; border-top: 2px solid var(--border-strong); font-size: 13px; color: var(--muted); }
    .fl-howto { margin: 0; font-size: 14px; color: var(--muted); }

    /* the forms */
    .fl-entry-body { padding: 0 24px 32px; }
    .fl-form-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; max-width: 1100px; margin-top: -32px; position: relative; }
    .fl-form-main { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
    .fl-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
    .fl-card h2 { margin: 0; font: 700 18px var(--font-display); color: var(--text); }
    .fl-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
    .fl-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
    .fl-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
    .fl-field { min-width: 0; }
    .fl-field input { margin-bottom: 4px; }
    .fl-field .field-hint { margin: 0 0 8px; }
    .fl-label { display: block; font: 500 13px var(--font-body); margin-bottom: 6px; }
    .fl-money { font-weight: 600; font-variant-numeric: tabular-nums; }
    .fl-pillset { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
    .fl-choice { position: relative; display: inline-flex; align-items: center; margin: 0; padding: 9px 15px; border: 1px solid var(--border-strong); border-radius: 999px; background: #fff; cursor: pointer; font: 500 14px var(--font-body); min-height: 40px; box-sizing: border-box; }
    .fl-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
    .fl-choice.on { background: var(--text); border-color: var(--text); color: #fff; font-weight: 700; }
    .fl-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
    .fl-check { display: flex; gap: 8px; align-items: center; font: 600 14px var(--font-body); margin: 0; }
    .fl-check input { width: 18px; height: 18px; }
    .fl-cancel { background: var(--bg); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
    .fl-cancel-line { margin: 0; font-size: 13px; }
    .fl-setaside-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 4px 16px; }
    .fl-setaside-top p { margin: 0 0 10px; }
    .fl-machines { width: 80px !important; text-align: center; }
    .fl-sa-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--border); }
    .fl-sa-name { display: flex; flex-direction: column; min-width: 0; }
    .fl-sa-hint { font-size: 13px; color: var(--muted); }
    .fl-sa-row input { width: 150px; margin: 0; text-align: right; }
    .fl-draw { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--muted); }
    .fl-draw.used { background: var(--fl-cash-bg); color: var(--text); }
    .fl-draw.manual { background: #fff; border: 1px solid var(--border); color: var(--text); }
    .fl-draw.manual input { width: 130px; margin: 0; text-align: right; }
    .fl-draw-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
    .fl-draw-body { display: flex; flex-direction: column; gap: 8px; }
    .fl-draw-body input[type="search"] { margin-bottom: 4px; }
    .fl-draw-note { margin: 0; font-size: 13px; }
    .fl-shortfall { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FFF1EC; color: var(--danger); font-weight: 700; }
    .fl-effect { flex: 1 1 280px; min-width: 0; background: var(--band-bg); color: #fff; border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 16px; }
    .fl-effect h2 { margin: 0 0 4px; font: 700 18px var(--font-display); color: #fff; }
    .fl-eff-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--band-line); }
    .fl-eff-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .fl-eff-val.set { color: #F2C77E; }
    .fl-eff-val.cash, .fl-eff-big strong.cash { color: #8FE0BE; }
    .fl-eff-val.short { color: #FFB59F; }
    .fl-eff-box { background: var(--band-panel); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; margin-top: 6px; }
    .fl-eff-label { font-size: 13px; color: var(--band-muted); margin-top: 4px; }
    .fl-eff-big { font-size: 15px; font-variant-numeric: tabular-nums; }
    .fl-eff-big s { color: var(--band-muted); }
    .fl-eff-big strong { font: 700 22px var(--font-display); }
    .fl-eff-muted { margin: 0; font-size: 13px; color: var(--band-muted); }
    .fl-eff-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FFE7DF; color: #8A2412; font-weight: 600; }
    .fl-save { margin-top: 8px; background: #fff; color: var(--text); border: 0; border-radius: 10px; padding: 14px; font: 700 15px var(--font-body); cursor: pointer; min-height: 48px; }
    .fl-save:disabled { opacity: .55; cursor: not-allowed; }
    .fl-effect .msg { margin: 0; color: #FFB59F; }
    .fl-cancel-btn { color: var(--band-muted) !important; align-self: center; }
    .fl-delete { border-top: 1px solid var(--band-line); margin-top: 8px; padding-top: 10px; display: grid; gap: 8px; }
    .fl-delete p { margin: 0; font-size: 14px; }
    .fl-delete-btn { color: #FFB59F !important; justify-self: start; }
    .fl-delete-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

    /* FN3s: Finance settings and first-time set-up */
    .fs-body { padding: 0 24px 32px; }
    .fs-cards { display: flex; flex-direction: column; gap: 16px; max-width: 900px; margin-top: -32px; position: relative; }
    .fs-readonly { margin: 0 0 12px; }
    .fs-intro { margin: 0; font-size: 14px; color: var(--muted); }
    .fs-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 14px; }
    .fs-facts dt { color: var(--muted); }
    .fs-facts dd { margin: 0; font-weight: 600; }
    .fs-list { display: flex; flex-direction: column; gap: 8px; }
    .fs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
    .fs-row.archived { background: var(--bg); }
    .fs-row-main { flex: 1 1 220px; min-width: 0; }
    .fs-row-title { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .fs-row-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
    .fs-row-acts { display: flex; flex-wrap: wrap; gap: 6px; }
    .fs-row .fs-msg { flex-basis: 100%; }
    .fs-msg { margin: 0; }
    .fs-msg:empty { display: none; }
    .fs-tag { font: 600 12px var(--font-body); padding: 2px 8px; border-radius: 999px; background: #EEEAFD; color: var(--accent); }
    .fs-cards .btn-small { padding: 6px 12px; min-height: 34px; font-size: 13px; }
    .fs-cards .fs-move { min-width: 34px; padding: 6px 0; }
    .fs-cards .btn-danger-outline { background: #fff; color: #B42318; border: 1px solid #F1B5AE; border-radius: 999px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
    .fs-form { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 2px solid var(--accent); border-radius: 12px; background: #fff; }
    .fs-form h3 { margin: 0 0 4px; font: 700 16px var(--font-display); }
    .fs-form select, .fs-rules select { width: 100%; }
    .fs-archived summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); padding: 4px 0; }
    .fs-archived .fs-row { margin-top: 8px; }
    .fs-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; counter-reset: fs-step; }
    .fs-steps li { counter-increment: fs-step; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font: 600 13px var(--font-body); color: var(--muted); }
    .fs-steps li::before { content: counter(fs-step) ". "; }
    .fs-steps li.on { background: var(--accent); border-color: var(--accent); color: #fff; }
    .fs-steps li.done { color: var(--text); }
    .fs-setup-pot { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
    .fs-setup-pot.on { border-color: var(--accent); }
    .fs-add-inline { display: flex; gap: 8px; align-items: center; }
    .fs-add-inline input { flex: 1; margin: 0; }
    .fs-start { position: static; }
    .fs-start h3 { margin: 0 0 4px; font: 700 17px var(--font-display); color: #fff; }

    @media (max-width: 760px) {
      .fs-body { padding: 0 12px 24px; }
      .fs-facts { grid-template-columns: 1fr; gap: 2px; }
      .fs-facts dd { margin-bottom: 8px; }
      .fl-tiles { gap: 8px; }
      .fl-tile { padding: 10px 10px; border-top-width: 5px; }
      .fl-tile-label { font-size: 12px; }
      .fl-tile-value { font-size: 18px; }
      .fl-tile-sub { display: none; }
      .fl-table-wrap { overflow: visible; border: 0; background: transparent; }
      .fl-table { min-width: 0; display: grid; gap: 10px; }
      .fl-head { display: none; }
      .fl-item, .fl-item.odd { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
      .fl-row { grid-template-columns: 1fr 1fr; }
      .fl-row .fl-c { padding: 8px 12px; }
      .fl-c0 { grid-column: 1 / -1; padding-bottom: 0 !important; color: var(--muted); font-size: 13px; }
      .fl-c1 { grid-column: 1 / -1; }
      .fl-c6 { grid-column: 1 / -1; padding-bottom: 12px !important; }
      .fl-c.num { text-align: left; }
      .fl-c.num::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
      .fl-row .fl-c.bank::before { color: var(--fl-bank); }
      .fl-row .fl-c.cash::before { color: var(--fl-cash); }
      .fl-break { padding: 0 12px 12px; }
      .fl-entry-body { padding: 0 12px 24px; }
      .fl-form-layout { margin-top: -24px; }
      .fl-grid3 { grid-template-columns: 1fr 1fr; }
      .fl-grid3 .fl-field:last-child { grid-column: 1 / -1; }
      .fl-grid2 { grid-template-columns: 1fr; }
      .fl-effect { position: static; }
      .fl-sa-row input, .fl-draw.manual input { width: 130px; }
    }

    /* set-up's last step: progress while it saves */
    .fs-progress { margin: 12px 0 0; padding: 14px 16px; border-radius: 12px; background: #F4F1FF; border: 1px solid #DCD6EE; }
    .fs-progress-head { margin: 0 0 10px; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 17px; color: #1B1530; }
    .fs-progress-bar { height: 8px; border-radius: 999px; background: #E3DEF5; overflow: hidden; }
    .fs-progress-fill { display: block; height: 100%; width: 6%; border-radius: 999px; background: #4B2EDB; transition: width 0.4s ease; }
    .fs-progress-step { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
    .fs-progress-step::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border: 2px solid #4B2EDB; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: fs-spin 0.8s linear infinite; }
    @keyframes fs-spin { to { transform: rotate(360deg); } }
    @media (prefers-reduced-motion: reduce) { .fs-progress-fill { transition: none; } .fs-progress-step::after { animation: none; } }

    /* FN4: Finance home */
    .fh { display: flex; flex-direction: column; gap: 18px; }
    .fh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
    .fh-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
    .fh-card h2 { margin: 0; font: 700 18px var(--font-display); color: var(--text); }
    .fh-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
    .fh-label { font-weight: 700; font-size: 15px; color: var(--muted); }
    .fh-sub { color: var(--muted); font-size: 14px; }
    .fh-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

    .fh-cash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
    .fh-cash-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
    .fh-big { font: 700 52px/1.05 var(--font-display); color: var(--fl-cash); font-variant-numeric: tabular-nums; }
    .fh-big.neg, .fh-mid.neg { color: #B4232C; }
    .fh-mid { font: 700 28px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
    .fh-warn { margin: 8px 0 0; background: var(--fl-set-bg); color: var(--fl-set); padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
    .fh-after { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
    .fh-made { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
    .fh-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; gap: 2px; background: #fff; margin: 6px 0 6px; }
    .fh-seg { display: block; height: 100%; }
    .fh-seg.set { background: #C77A12; }
    .fh-seg.out { background: #8A82A6; }
    .fh-seg.free { background: var(--fl-cash); }
    .fh-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #F0EDF8; }
    .fh-line.strong { font-weight: 700; }
    .fh-line.total { border-bottom: 0; font-weight: 800; color: var(--fl-cash); padding-top: 9px; }
    .fh-machines .fh-line.total, .fh-held .fh-line.total { color: var(--text); }
    .fh-pots { padding: 0 0 4px 14px; font-size: 14px; color: var(--muted); border-bottom: 1px solid #F0EDF8; }
    .fh-pots .fh-line { border-bottom: 0; padding: 3px 0; }

    .fh-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
    .fh-today { display: flex; flex-direction: column; gap: 8px; }
    .fh-done { margin: 0; color: var(--muted); }
    .fh-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px;
      border: 0; background: #F6F4FC; color: var(--text); font: inherit; }
    button.fh-item { cursor: pointer; }
    button.fh-item:hover { background: #EEEAFB; }
    .fh-item.warn { background: var(--fl-set-bg); }
    .fh-item-n { font-weight: 800; color: var(--muted); min-width: 14px; }
    .fh-item.warn .fh-item-n { color: var(--fl-set); }
    .fh-item-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .fh-item-sub { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }

    .fh-count { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #F0EDF8; }
    .fh-count.small { padding-left: 14px; font-size: 14px; }
    .fh-count-head { margin-top: 8px; font-weight: 700; font-size: 14px; color: var(--muted); }
    .fh-ctl { display: inline-flex; align-items: center; gap: 8px; }
    .fh-step { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #DCD6EE; background: #fff; font-size: 20px; color: var(--text); cursor: pointer; }
    .fh-step:hover { background: #F6F4FC; }
    .fh-step:disabled { opacity: 0.6; }
    .fh-count-n { min-width: 32px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
    .fh-count-n.paid { color: var(--fl-set); min-width: 120px; }

    .fh-acc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F0EDF8; }
    .fh-acc-words { flex: 1; display: flex; flex-direction: column; min-width: 0; }
    .fh-acc .fh-num { font-weight: 700; }
    .fh-held .fh-sub { margin: 6px 0 0; }
    .fh-more { margin-top: 4px; }

    @media (max-width: 860px) {
      .fh-cash, .fh-two { grid-template-columns: 1fr; gap: 18px; }
      .fh-big { font-size: 44px; }
    }
    @media (max-width: 520px) {
      .fh-card { padding: 16px; }
      .fh-acc { flex-wrap: wrap; }
      .fh-acc .btn-small { margin-left: auto; }
      .fh-count-n.paid { min-width: 44px; }
    }
    .fh-acc .btn-small { padding: 6px 12px; min-height: 34px; font-size: 13px; }

    /* FN5: Finance › Pots */
    .fh-pot-link { font: inherit; color: inherit; text-align: left; text-decoration: underline; text-decoration-color: #C9C2E2; text-underline-offset: 3px; }
    .fp-body { display: flex; flex-direction: column; gap: 18px; }
    .fp { display: flex; flex-direction: column; gap: 18px; }
    .fp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
    .fp-card { display: flex; flex-direction: column; gap: 4px; text-align: left; background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
      padding: 16px 18px; cursor: pointer; font: inherit; color: var(--text); min-width: 0; }
    .fp-card:hover { border-color: #C9C2E2; }
    .fp-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(75, 46, 219, 0.12); }
    .fp-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
    .fp-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    .fp-card-name { font: 700 17px var(--font-display); }
    .fp-card-big { font: 700 30px var(--font-display); color: var(--fl-set); font-variant-numeric: tabular-nums; }
    .fp-card-sub { color: var(--muted); font-size: 13px; }
    .fp-detail { display: flex; flex-direction: column; gap: 14px; }
    .fp-msg { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 12px;
      background: var(--fl-cash-bg); color: var(--fl-cash); font-weight: 600; }
    .fp-msg.error { background: #FDECEC; color: #9B1C24; }
    .fp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
    .fp-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
    .fp-total { font: 700 22px var(--font-display); color: var(--fl-set); }
    .fp-lead { margin: 0 0 8px; }
    .fp-sa { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid #F0EDF8; }
    .fp-sa.next { background: var(--fl-set-bg); border-radius: 12px; padding: 12px 14px; border-top-color: transparent; margin-bottom: 4px; }
    .fp-sa-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .fp-sa-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .fp-sa-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 600; }
    .fp-date { color: var(--muted); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .fp-what { font: inherit; color: inherit; text-align: left; }
    button.fp-what { text-decoration: underline; text-decoration-color: #C9C2E2; text-underline-offset: 3px; }
    .fp-sa-amt { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
    .fp-left { font-weight: 800; font-size: 16px; }
    .fp-next { background: var(--fl-set); color: #fff; }
    .fp-release { align-self: flex-start; padding: 6px 12px; min-height: 34px; font-size: 13px; }
    .fp-confirm { background: #F6F4FC; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
    .fp-confirm-q { margin: 0; font-weight: 700; }
    .fb-addall { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
    .fb-addall > .fp-confirm { flex: 1 1 100%; }
    .fp-confirm .fh-sub { margin: 0; }
    .fp-note-label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
    .fp-note-label input { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid #DCD6EE; border-radius: 10px; color: var(--text); }
    .fp-confirm-row { display: flex; gap: 8px; flex-wrap: wrap; }
    .fp-used-toggle { background: none; border: 0; padding: 0; font: 700 18px var(--font-display); color: var(--text); cursor: pointer; text-align: left; }
    .fp-used-toggle:disabled { color: var(--muted); cursor: default; }
    .fp-used .fp-sa.done { color: var(--muted); }
    .fp-used .fp-sa.done .fp-sa-line { font-weight: 500; }
    .fp-used .fp-sa:first-of-type { margin-top: 8px; }
    .fp-act h2 { margin-bottom: 10px; }
    .fp-table-wrap { overflow-x: auto; }
    .fp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
    .fp-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); }
    .fp-table td { padding: 9px 8px; border-bottom: 1px solid #F0EDF8; vertical-align: top; }
    .fp-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .fp-what-cell { display: flex; flex-direction: column; gap: 2px; }
    /* keep the app's tap height, but start the words at the top so they line up with the date */
    .fp-what-cell .link-btn { display: inline-flex; align-items: flex-start; align-self: flex-start; padding: 0; text-align: left; line-height: inherit; }
    .fp-ch.up { color: var(--fl-cash); font-weight: 700; }
    .fp-ch.down { color: var(--fl-set); font-weight: 700; }
    .fp-bal { font-weight: 800; }
    .fp-acc { color: var(--fl-bank); }
    .fp-row.moved_in, .fp-row.moved_out { background: #F7F9FC; }
    .fp-table caption.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    @media (max-width: 860px) {
      .fp-cols { grid-template-columns: 1fr; }
    }
    @media (max-width: 520px) {
      .fp-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
      .fp-card { padding: 12px; }
      .fp-card-big { font-size: 22px; }
      .fp-table th:nth-child(1), .fp-table td:nth-child(1) { white-space: nowrap; }
      .fp-table { font-size: 13px; }
    }

    /* FN6: Finance › Bank check */
    .fb { display: flex; flex-direction: column; gap: 16px; }
    .fb-card h2 { margin: 0; }
    .fb-lead { margin: 0 0 12px; }
    .fb-h3 { margin: 16px 0 6px; font: 700 16px var(--font-display); }
    .fb-account { max-width: 360px; }
    .fb-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
    .fb-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
    .fb-field input, .fb-field select { font: inherit; font-size: 15px; font-weight: 500; padding: 9px 11px; border: 1px solid #DCD6EE; border-radius: 10px; color: var(--text); background: #fff; min-height: 42px; }
    .fb-form .fb-field input[type="text"] { width: 160px; }
    .fb-field input, .fb-field select { margin: 0; width: 100%; }
    .fb-form .fb-field { width: auto; }
    .fp-table-wrap + .fb-form, .fp-table-wrap + .fh-sub + .fb-form { margin-top: 14px; }
    .fb-msg { flex-basis: 100%; margin: 0; }
    .fb-msg:empty { display: none; }
    .fb-file { display: inline-flex; position: relative; }
    .fb-file-btn { display: inline-flex; align-items: center; cursor: pointer; }
    .fb-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
    .fb-file:focus-within .fb-file-btn { outline: 3px solid var(--accent); outline-offset: 2px; }
    .fb-verdict { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; margin-bottom: 12px; }
    .fb-verdict.ok { background: var(--fl-cash-bg); color: var(--fl-cash); }
    .fb-verdict.off { background: var(--fl-set-bg); color: var(--fl-set); }
    .fb-verdict-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
      font: 800 22px var(--font-display); color: #fff; background: var(--fl-set); }
    .fb-verdict.ok .fb-verdict-icon { background: var(--fl-cash); }
    .fb-verdict-words { display: flex; flex-direction: column; gap: 3px; font-weight: 600; }
    .fb-verdict-big { font: 700 26px var(--font-display); }
    .fb-break { max-width: 560px; }
    .fb-diff.off { color: var(--fl-set); font-weight: 800; }
    .fb-diff.ok { color: var(--fl-cash); font-weight: 800; }
    .fb-list { display: flex; flex-direction: column; }
    .fb-row { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-top: 1px solid #F0EDF8; }
    .fb-row:first-child { border-top: 0; }
    .fb-row .fp-date { min-width: 52px; }
    .fb-row-words { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .fb-row.old .fh-item-sub { color: var(--fl-set); font-weight: 600; }
    .fb-amt { font-weight: 800; }
    .fb-amt.in { color: var(--fl-cash); }
    .fb-row .fp-what.link-btn { display: inline-flex; align-items: flex-start; align-self: flex-start; padding: 0; text-align: left; }
    .fb-line { padding: 10px 0; border-top: 1px solid #F0EDF8; display: flex; flex-direction: column; gap: 8px; }
    .fb-line .fb-row { border-top: 0; padding: 0; }
    .fb-line.done { color: var(--muted); }
    .fb-line-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 64px; }
    .fb-line-acts .btn-small, .fb-cands .btn-small, .fb-line .btn-small { padding: 6px 12px; min-height: 34px; font-size: 13px; }
    .fb-line .fp-release { margin-left: 64px; }
    .fb-cands { margin-left: 64px; background: #F6F4FC; border-radius: 12px; padding: 10px 14px; }
    .fb-cands .fb-row { border-top-color: #E7E2F5; }
    .fb-line .fp-confirm { margin-left: 64px; }
    .fb-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
    .fb-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; align-self: end; min-height: 42px; }
    .fb-read { font-weight: 700; margin: 6px 0 10px; }
    .fb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
    .fb-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; }
    .fb-edit { margin-top: 12px; }
    .fb-edit summary { cursor: pointer; font-weight: 700; color: var(--accent); }
    .fb-edit .fb-form { margin-top: 10px; }
    .fb-delete { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
    .fb-delete summary { color: var(--muted); }
    @media (max-width: 520px) {
      .fb-line-acts, .fb-cands, .fb-line .fp-confirm { margin-left: 0; padding-left: 0; }
      .fb-line .fp-release { margin-left: 0; }
      .fb-verdict-big { font-size: 22px; }
      .fb-form .fb-field input[type="text"] { width: 140px; }
    }

    /* FN7: Accounts, and another account's own ledger */
    .fl-tiles-side { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
    .fl-side .fl-table { min-width: 720px; }
    .fl-side .fl-row { grid-template-columns: 84px minmax(0, 1fr) 118px 124px 168px; }
    .fl-side .fl-c3, .fl-side .fl-c5 { display: none; }
    .fh-acc-link.link-btn { display: inline-flex; align-self: flex-start; min-height: 0; padding: 0; font-weight: 700; text-align: left; }
    .fh-held-all { margin-top: 10px; }
    .fa-totals .fh-line.total { color: var(--text); }
    .fa { display: flex; flex-direction: column; gap: 18px; }
    .fa-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 6px; }
    .fa-fig { display: flex; flex-direction: column; gap: 2px; background: #F6F4FC; border-radius: 12px; padding: 12px 14px; }
    .fa-fig.pot { background: var(--fl-set-bg); }
    .fa-fig-label { font-weight: 700; font-size: 14px; color: var(--muted); }
    .fa-fig-value { font: 700 26px var(--font-display); font-variant-numeric: tabular-nums; }
    .fa-intro { margin: -4px 0 6px; }
    .fa-acc { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid #F0EDF8; }
    .fa-acc-top { display: flex; align-items: flex-start; gap: 14px; }
    .fa-acc-words { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
    .fa-acc-name { font: 700 17px var(--font-display); overflow-wrap: anywhere; }
    .fa-acc-bal { font: 700 24px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
    .fa-updated { font-size: 13px; font-weight: 600; color: var(--fl-cash); }
    .fa-updated.stale { color: var(--fl-set); }
    .fa-pot-line { margin: 0; }
    .fa-acts { display: flex; flex-wrap: wrap; gap: 8px; }
    .fa-acts .btn-small, .fa-update .btn-small { padding: 6px 12px; min-height: 34px; font-size: 13px; }
    .fa-msg { margin: 0; }
    .fa-form { display: grid; grid-template-columns: 160px 170px minmax(0, 1fr); gap: 0 12px; }
    .fa-form input { margin: 0; }
    .fa-history { background: #F6F4FC; border-radius: 12px; padding: 6px 14px; }
    .fa-history .fb-row { border-top-color: #E7E2F5; align-items: center; }
    .fa-history .fb-row:first-child { border-top: 0; }
    .fa-remove.link-btn { min-height: 0; padding: 0 0 0 6px; font-size: 13px; color: var(--danger); }
    .fa-archived summary { cursor: pointer; font-weight: 700; color: var(--muted); }
    .fa-archived .fh-acc .btn-small { padding: 6px 12px; min-height: 34px; font-size: 13px; }
    .fa-foot { margin: 0; }
    .fa-foot .link-btn { min-height: 0; padding: 0; }
    @media (max-width: 760px) {
      .fl-side .fl-table { min-width: 0; }
      .fl-side .fl-row { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 520px) {
      .fa-form { grid-template-columns: 1fr 1fr; }
      .fa-form .fl-field:last-child { grid-column: 1 / -1; }
      .fa-acc-bal { font-size: 20px; }
      .fa-fig-value { font-size: 22px; }
    }

    /* FN9: money already set aside when Finance started (Settings › Main checking) */
    .fs-opening { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #E7E3F3); }
    .fs-opening:empty { display: none; }
    .fs-sub-head { font-size: 15px; margin: 0 0 4px; }
    .fs-opening .btn-small { margin-top: 6px; }

    /* FN9: release window's effect panel, the "Update its balance now?" prompt, tracking choices */
    .fp-confirm .fp-effect { position: static; flex: none; padding: 14px 16px; margin: 4px 0; }
    .fp-confirm .fp-effect h3 { margin: 0; font: 700 15px var(--font-display); color: #fff; }
    .fp-confirm input[type="text"] { width: 100%; max-width: 220px; }
    .fl-ask-balance { display: flex; flex-direction: column; gap: 10px; color: #fff; }
    .fl-ask-balance h3 { margin: 0; font: 700 18px var(--font-display); color: #fff; }
    .fl-ask-balance p { margin: 0; }
    .fl-ask-balance .fl-ask-q { font-weight: 700; }
    .fl-ask-row { display: flex; flex-wrap: wrap; gap: 8px; }
    .fs-tracking-why { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
    .fs-tracking-why .field-hint { margin: 0; opacity: .75; }
    .fs-tracking-why .fs-chosen { opacity: 1; }

    /* ---------- FN10: move between pots, History and Undo, Check my books ---------- */
    .fp-move-btn { align-self: flex-start; margin: 0 0 8px; }
    .fp-move { margin-bottom: 10px; }
    .fp-move-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
    .fp-note-label select { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid #DCD6EE; border-radius: 10px; color: var(--text); background: #fff; min-width: 0; }
    .fp-move .fl-effect, .fc-effect { position: static; flex: none; }
    .fp-move .fp-note-label input, .fp-move .fp-note-label select, .fc .fp-note-label input { width: 100%; max-width: none; box-sizing: border-box; }
    .fl-eff-error { overflow-wrap: anywhere; }
    .fhx-link { font-size: 13px; font-weight: 600; color: var(--primary, #4B2EDB); align-self: flex-start; padding: 2px 0; }
    .fp-msg .fhx-link { color: inherit; text-decoration: underline; }
    .fl-break-line .fhx-link { margin-left: 8px; }

    .fhx-modal { max-width: 640px; width: 100%; }
    .fhx-head { margin: 0 0 4px; font: 700 20px var(--font-display); }
    .fhx-what { margin: 0 0 12px; color: var(--muted); }
    .fhx-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
    .fhx-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
    .fhx-item.undone { background: #F7F6FA; color: var(--muted); }
    .fhx-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
    .fhx-when { font-weight: 700; font-variant-numeric: tabular-nums; }
    .fhx-who { color: var(--muted); }
    .fhx-pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #EFEBFB; color: #4B2EDB; }
    .fhx-lines { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
    .fhx-lines.on-dark { color: #fff; }
    .fhx-why { margin: 0; font-size: 13px; color: var(--muted); }
    .fhx-effect { position: static; flex: none; margin-top: 6px; }
    .fhx-deps { margin: 0; padding-left: 18px; color: #fff; }

    .fc { display: flex; flex-direction: column; gap: 14px; }
    .fc-summary h2 { margin: 0 0 4px; }
    .fc-summary.clear { border-color: #BFE3CF; background: #F1FAF5; }
    .fc-item { display: flex; flex-direction: column; gap: 8px; border-left: 4px solid #6E6787; }
    .fc-item.problem { border-left-color: #9A5B05; }
    .fc-item.dismissed { border-left-color: #C9C2E2; opacity: .85; margin-top: 10px; }
    .fc-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
    .fc-title { margin: 0; font: 700 17px var(--font-display); }
    .fc-text { margin: 0; line-height: 1.5; }
    .fc-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
    .fc-ai { background: #F6F4FC; border-radius: 12px; padding: 12px 14px; }
    .fc-ai-head { font-weight: 700; font-size: 13px; color: #4B2EDB; margin-bottom: 4px; }
    .fc-ai-p { margin: 0 0 6px; line-height: 1.5; }
    .fc-home-btn { display: inline-flex; align-items: center; gap: 8px; }
    .fc-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #9A5B05; color: #fff;
      font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
    .fc-badge.clear { background: #1E7A4C; }
    @media (max-width: 520px) {
      .fp-move-grid { grid-template-columns: minmax(0, 1fr); }
      .fc-actions .btn-small { flex: 1 1 auto; }
    }
/* css/people.css */
/* CU1: people on a customer (lead page), per-person conversations, Rider programmes, sale form Customer 2 */
.people-card .card-head-row { margin-bottom: 4px; }
.people-hint { margin: 0 0 8px; font-size: 13px; }
.person-row { padding: 12px 0; border-top: 1px solid var(--border, #E6E3EF); }
.person-row:first-of-type { border-top: 0; }
.person-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.person-name { font-size: 15px; color: #1B1530; overflow-wrap: anywhere; }
.person-consent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 4px; }
.person-phones { list-style: none; margin: 4px 0; padding: 0; font-size: 14px; }
.person-phones li { padding: 2px 0; overflow-wrap: anywhere; }
.person-phones a { color: #4B2EDB; text-decoration: none; font-variant-numeric: tabular-nums; }
.person-phones a:hover, .person-phones a:focus-visible { text-decoration: underline; }
.person-email { margin: 2px 0 0; font-size: 14px; color: #6B6580; overflow-wrap: anywhere; }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.person-form, .person-rider-form { margin-top: 10px; padding: 12px; border-radius: 12px; background: #F7F6FB; }
.person-form h3 { margin: 0 0 8px; font: 700 16px var(--font-display); color: #1B1530; }
.person-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 12px; }
.person-form-grid .setup-field { margin: 0; }
.person-form-grid input, .person-form-grid select { width: 100%; min-width: 0; }
.person-phone-list { display: flex; flex-direction: column; gap: 6px; }
.person-phone-edit { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.person-phone-edit input, .person-phone-edit select { min-width: 0; width: 100%; }
.person-main { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.person-form .check-row { margin-top: 10px; }
@media (max-width: 520px) {
  .person-phone-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.lead-convo-people { margin: 0 0 10px; }

/* Admin › Rider programmes, and the sale form mapping */
.rp-unmapped, .sale-map-programme { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 0; border-top: 1px solid var(--border, #E6E3EF); }
.rp-unmapped b, .sale-map-programme b { overflow-wrap: anywhere; }
.rp-unmapped select, .sale-map-programme select { max-width: 100%; }
.sale-map-programmes h3 { margin: 18px 0 6px; font: 700 16px var(--font-display); color: #1B1530; }
.sale-map-add { margin: 12px 0 16px; }
.sale-map-add > label { display: block; font-weight: 600; margin-bottom: 4px; }
.sale-map-add-line { display: flex; flex-wrap: wrap; gap: 8px; }
.sale-map-add-line input { flex: 1 1 220px; min-width: 0; }
.sale-map-add .muted { margin: 6px 0 0; font-size: 13px; }
/* css/calendar.css */
    #calendar-view .band-chip {
      height: auto;
      min-height: 28px;
      padding: 4px 12px;
      font-size: 14px;
      line-height: 1.2;
    }

    .cal-band-title {
      min-width: 0;
    }

    .cal-nav-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 8px;
    }

    .cal-period {
      margin: 0;
      color: #fff;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
      line-height: 1.2;
    }

    .cal-nav-btn {
      min-width: 44px;
      min-height: 44px;
      padding: 0 14px;
      font-size: 18px;
    }

    #cal-today-btn {
      min-height: 44px;
    }

    .cal-switch {
      display: flex;
      background: #2A2245;
      border-radius: 24px;
      padding: 3px;
    }

    .cal-switch-btn {
      min-height: 44px;
      border: 0;
      border-radius: 22px;
      background: transparent;
      color: #C9C1F2;
      font: 700 14px var(--font-body);
      padding: 0 14px;
      cursor: pointer;
    }

    .cal-switch-btn.is-on {
      background: #fff;
      color: #1B1530;
    }

    .cal-switch-btn:hover:not(.is-on) {
      color: #fff;
    }

    #calendar-view .page-band-sub {
      font-size: 14px;
    }

    .cal-stage {
      position: relative;
      z-index: 1;
      margin: -50px 32px 32px;
      min-width: 0;
    }

    .cal-stage.is-phone-week {
      touch-action: pan-y;
    }

    .cal-split {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 280px;
      gap: 16px;
      align-items: start;
    }

    .cal-week-card,
    .cal-day-card,
    .cal-month-card,
    .cal-side,
    .cal-tray-card,
    .cal-empty {
      background: #fff;
      border-radius: 20px;
      min-width: 0;
    }

    .cal-week-card,
    .cal-month-card {
      padding: 8px;
    }

    .cal-day-card,
    .cal-side,
    .cal-tray-card {
      padding: 14px 16px;
    }

    .cal-empty {
      padding: 28px 20px;
      text-align: center;
    }

    .cal-empty-title {
      margin: 0 0 6px;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
    }

    .cal-empty-help {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
    }

    .cal-week {
      display: grid;
      grid-template-columns: 168px repeat(7, minmax(0, 1fr));
      min-width: 0;
    }

    .cal-wh,
    .cal-dealer,
    .cal-cell {
      border-bottom: 1px solid #EFECF7;
      border-right: 1px solid #EFECF7;
      min-width: 0;
    }

    .cal-wh {
      padding: 10px 8px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
    }

    .cal-wh.is-today {
      color: var(--accent);
    }

    .cal-dealer {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px;
    }

    .cal-av {
      width: 36px;
      height: 36px;
      border-radius: 18px;
      color: #fff;
      font: 800 14px var(--font-body);
      display: flex;
      align-items: center;
      justify-content: center;
      flex: none;
    }

    .cal-dealer-name {
      font-size: 14px;
      font-weight: 800;
      line-height: 1.25;
    }

    .cal-slots-line {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 4px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 700;
    }

    .cal-slots {
      flex: 1;
      height: 6px;
      border-radius: 3px;
      background: var(--soft);
      overflow: hidden;
      min-width: 36px;
    }

    .cal-slots > span {
      display: block;
      height: 100%;
      background: var(--accent);
    }

    .cal-slots > span.is-over {
      background: var(--attention-strong);
    }

    .cal-cell {
      min-height: 92px;
      padding: 6px;
      display: flex;
      flex-direction: column;
      gap: 5px;
      box-sizing: border-box;
    }

    .cal-cell.is-off {
      background: repeating-linear-gradient(135deg, #F4F2FB 0 6px, #fff 6px 12px);
    }

    .cal-off {
      margin-top: auto;
      color: var(--muted);
      font-size: 14px;
      font-weight: 700;
    }

    .cal-cell.is-fit-ok {
      background: #F0FAF4;
      outline: 2px solid #137A4B;
      outline-offset: -2px;
      border-radius: 10px;
    }

    .cal-cell.is-fit-warn {
      background: #FFF4D6;
      outline: 2px solid #E8B931;
      outline-offset: -2px;
      border-radius: 10px;
    }

    .cal-cell.is-fit-no {
      background: #F4F2FB;
      outline: 2px solid #D9D4EE;
      outline-offset: -2px;
      border-radius: 10px;
    }

    .cal-ev,
    .cal-mline,
    .cal-day-row,
    .cal-prow-main,
    .cal-mmore,
    .cal-mday {
      cursor: pointer;
    }

    .cal-ev {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 6px;
      width: 100%;
      box-sizing: border-box;
      min-height: 44px;
      border: 0;
      border-radius: 10px;
      padding: 8px;
      background: #ECE8FA;
      color: #3A20B5;
      text-align: left;
    }

    .cal-ev:hover,
    .cal-mline:hover,
    .cal-day-row:hover,
    .cal-prow-main:hover,
    .cal-mday:hover {
      filter: brightness(0.97);
    }

    .cal-ev.is-sale {
      background: #DDF3E7;
      color: #137A4B;
    }

    .cal-ev.is-clash,
    .cal-block.is-clash,
    .cal-ev.is-double,
    .cal-block.is-double,
    .cal-mline.is-double {
      box-shadow: inset 0 0 0 2px var(--attention-strong);
    }

    .cal-ev.is-warn,
    .cal-block.is-warn,
    .cal-mline.is-warn {
      border: 2px dashed #C4841D;
    }

    .cal-issue-tag {
      display: inline-flex;
      align-items: center;
      flex: none;
      margin-top: 2px;
      padding: 1px 6px;
      border-radius: 8px;
      font: 800 11px/1.4 var(--font-body);
      white-space: nowrap;
    }

    .cal-issue-tag.is-double {
      background: var(--attention-bg);
      color: var(--attention);
    }

    .cal-issue-tag.is-warn {
      background: var(--wait-bg);
      color: var(--wait);
    }

    .cal-issue-tag.is-agreed {
      background: #F4F2FB;
      color: #5E5873;
    }

    /* an office session within its places (not a clash) */
    .cal-issue-tag.is-session {
      background: #EEEAFD;
      color: #4B2EDB;
    }

    .cal-ev-main,
    .cal-block-time,
    .cal-block-name,
    .cal-mline,
    .cal-day-row-main,
    .cal-prow-when {
      font: 800 15px/1.3 var(--font-body);
    }

    .cal-ev-main {
      flex: 1;
      min-width: 0;
    }

    .cal-go {
      flex: none;
      font-size: 18px;
      font-weight: 800;
      line-height: 1.1;
      opacity: 0.75;
    }

    .cal-drag {
      cursor: grab;
    }

    .cal-drag-lift,
    .cal-drag-ghost {
      box-shadow: 0 8px 18px rgba(27, 21, 48, 0.18);
      transform: rotate(-2deg);
      z-index: 40;
    }

    .cal-daystrip {
      display: flex;
      gap: 6px;
      margin-bottom: 10px;
      overflow: hidden;
    }

    .cal-daystrip button {
      flex: 1;
      min-height: 44px;
      border: 0;
      border-radius: 14px;
      background: #fff;
      color: var(--text);
      font: 800 14px var(--font-body);
      cursor: pointer;
    }

    .cal-daystrip button.is-on {
      background: var(--accent);
      color: #fff;
    }

    .cal-phone-row + .cal-phone-row {
      border-top: 1px solid #EFECF7;
    }

    .cal-tray {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .cal-tray-card.is-dark {
      background: #1B1530;
      color: #fff;
    }

    .cal-kicker {
      margin: 0 0 8px;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: 0.05em;
    }

    .cal-tray-card.is-dark .cal-kicker {
      color: #C9C1F2;
    }

    .cal-tray-card .cal-kicker {
      color: var(--muted);
    }

    .cal-tray-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .cal-tray-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
      border: 1.5px solid #E6E2F3;
      border-radius: 14px;
      padding: 12px 14px;
      background: #fff;
      color: #1B1530;
      text-align: left;
      font-size: 14px;
    }

    .cal-tray-item strong {
      font-size: 15px;
    }

    .cal-tray-item:hover {
      border-color: var(--accent);
    }

    .cal-tray-meta {
      color: var(--muted);
      font-size: 14px;
    }

    .cal-tray-hint,
    .cal-tray-empty {
      margin: 0;
      font-size: 14px;
      color: var(--muted);
    }

    .cal-tray-card.is-dark .cal-tray-hint,
    .cal-tray-card.is-dark .cal-tray-empty {
      color: #C9C1F2;
    }

    .cal-tray-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 6px;
    }

    .cal-tray-actions .btn-primary,
    .cal-tray-actions .btn-secondary,
    .cal-prow-actions .btn-primary,
    .cal-prow-actions .btn-secondary {
      min-height: 44px;
    }

    .cal-month-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px;
      gap: 16px;
      align-items: start;
    }

    .cal-mhead,
    .cal-mgrid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 8px;
    }

    .cal-mhead {
      margin-bottom: 8px;
    }

    .cal-mhead span {
      padding: 0 6px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
    }

    .cal-mgrid {
      background: #F4F2FB;
      padding: 8px;
      border-radius: 14px;
    }

    .cal-mday {
      background: #fff;
      border-radius: 14px;
      min-height: 108px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      box-sizing: border-box;
      border: 1.5px solid transparent;
      text-align: left;
    }

    .cal-mday.outside {
      background: transparent;
    }

    .cal-mday.is-selected {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px #DCD5FB;
    }

    .cal-mday.is-clash,
    .cal-mday.is-double {
      box-shadow: inset 0 0 0 2px var(--attention-strong);
    }

    .cal-mday.is-selected.is-clash,
    .cal-mday.is-selected.is-double {
      box-shadow: inset 0 0 0 2px var(--attention-strong), 0 0 0 3px #DCD5FB;
    }

    .cal-mday.is-warn {
      border: 2px dashed #C4841D;
    }

    .cal-mday-top {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .cal-mnum {
      font-size: 14px;
      font-weight: 800;
    }

    .cal-mday.outside .cal-mnum {
      color: #B5AFC8;
    }

    .cal-mday.is-today .cal-mnum {
      color: var(--accent);
    }

    .cal-mdot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
    }

    .cal-mdot.sale { background: #137A4B; }
    .cal-mdot.open { background: #E8492F; }

    .cal-mline,
    .cal-mmore {
      border: 0;
      background: transparent;
      padding: 0;
      text-align: left;
      color: var(--text);
    }

    .cal-mline.is-clash {
      color: var(--attention);
    }

    .cal-mline {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px;
    }

    .cal-mmore {
      color: var(--accent);
      font: 800 14px var(--font-body);
      min-height: 32px;
    }

    .cal-mslots {
      margin-top: auto;
      color: var(--muted);
      font-size: 14px;
      font-weight: 700;
    }

    .cal-mslots .cal-slots {
      margin-bottom: 4px;
    }

    .cal-side h2 {
      margin: 2px 0 8px;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
    }

    .cal-prow {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 10px 0;
      border-top: 1px solid #EFECF7;
    }

    .cal-prow-main {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      width: 100%;
      border: 0;
      background: transparent;
      padding: 0;
      text-align: left;
      color: var(--text);
    }

    .cal-prow-meta,
    .cal-prow-dealer {
      font-size: 14px;
      color: var(--muted);
      font-weight: 600;
    }

    .cal-prow .status-pill {
      height: 28px;
      font-size: 14px;
    }

    .cal-prow-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .cal-open-day {
      width: 100%;
      min-height: 44px;
      margin-top: 8px;
    }

    .cal-sheet-close {
      align-self: flex-end;
      min-height: 44px;
      margin-bottom: 4px;
    }

    .cal-sheet-scrim {
      position: fixed;
      inset: 0;
      background: rgba(27, 21, 48, 0.45);
      z-index: 28;
    }

    .cal-day-list {
      display: flex;
      flex-direction: column;
    }

    .cal-day-row {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      width: 100%;
      min-height: 44px;
      border: 0;
      border-bottom: 1px solid #EFECF7;
      background: transparent;
      padding: 12px 4px;
      text-align: left;
      color: var(--text);
    }

    .cal-day-row-main {
      flex: 1;
      min-width: 0;
    }

    .cal-day-row-meta {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font: 600 14px/1.3 var(--font-body);
    }

    .cal-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 14px;
      margin: 0 0 12px;
      padding: 0;
      list-style: none;
      font-size: 14px;
      font-weight: 700;
      color: var(--muted);
    }

    .cal-legend li {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .cal-flag {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
    }

    .cal-flag.upcoming { background: #4B2EDB; }
    .cal-flag.open { background: #E8B931; }
    .cal-flag.sale { background: #137A4B; }
    .cal-flag.demo { background: #8B78FF; }
    .cal-flag.other { background: #8A82A6; }

    .cal-day-layout {
      display: grid;
      grid-template-columns: 72px minmax(0, 1fr);
      column-gap: 8px;
      width: 100%;
      min-width: 0;
    }

    .cal-hours-shared {
      position: sticky;
      left: 0;
      z-index: 2;
      height: 1040px;
      margin-top: 52px;
      background: #fff;
    }

    .cal-cols {
      display: grid;
      grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
      gap: 8px;
      min-width: 0;
    }

    .cal-col-head {
      min-height: 44px;
      margin: 0 0 8px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 2px;
      min-width: 0;
    }

    .cal-col-name,
    .cal-col-sub {
      margin: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      line-height: 1.25;
    }

    .cal-col-name {
      font-size: 15px;
      font-weight: 800;
    }

    .cal-col-name.none {
      color: var(--wait);
    }

    .cal-col-sub {
      color: var(--muted);
      font-size: 14px;
      font-weight: 600;
    }

    .cal-hours-local {
      display: none;
    }

    .cal-hour {
      position: absolute;
      left: 0;
      right: 0;
      transform: translateY(-50%);
      font-size: 14px;
      font-weight: 700;
      color: var(--muted);
      line-height: 1;
      white-space: nowrap;
    }

    .cal-track {
      position: relative;
      height: 1040px;
      background-color: #F4F2FB;
      background-image: linear-gradient(to bottom, #E6E2F3 1px, transparent 1px);
      background-size: 100% 80px;
      border-bottom: 1px solid #E6E2F3;
      border-radius: 14px;
    }

    .cal-block {
      position: absolute;
      z-index: 2;
      overflow: hidden;
      border: 0;
      border-radius: 10px;
      padding: 6px 22px 6px 8px;
      background: #ECE8FA;
      color: #3A20B5;
      text-align: left;
      cursor: pointer;
      min-height: 44px;
      display: flex;
      flex-direction: column;
      gap: 1px;
    }

    .cal-block:hover {
      filter: brightness(0.97);
    }

    .cal-block .cal-go {
      position: absolute;
      top: 6px;
      right: 6px;
    }

    .cal-block.upcoming,
    .cal-block.open {
      background: #ECE8FA;
      color: #3A20B5;
    }

    .cal-block.open {
      background: #FFF4D6;
      color: #7A5300;
    }

    .cal-block.sale {
      background: #DDF3E7;
      color: #137A4B;
    }

    .cal-block.demo {
      background: #ECE8FA;
      color: #3A20B5;
    }

    .cal-block.other {
      background: #F4F2FB;
      color: #5E5873;
    }

    .cal-block-time,
    .cal-block-name,
    .cal-block-city {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .cal-block-city {
      font: 600 14px/1.3 var(--font-body);
      opacity: 0.9;
    }

    .cal-overlap {
      display: inline-flex;
      align-self: flex-start;
      height: 18px;
      padding: 0 6px;
      border-radius: 9px;
      background: #1B1530;
      color: #fff;
      font-size: 14px;
      font-weight: 800;
      line-height: 18px;
    }

    .cal-day-scroll {
      min-width: 0;
      max-width: 100%;
      overflow-x: hidden;
    }

    #cal-day {
      min-width: 0;
      max-width: 100%;
    }

    .cal-more-popover {
      position: fixed;
      z-index: 40;
      min-width: 240px;
      max-width: min(360px, calc(100vw - 16px));
      max-height: 70vh;
      overflow: auto;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: 0 8px 24px rgba(27, 21, 48, 0.16);
      padding: 8px;
    }

    .cal-more-row {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 8px 4px;
      border-bottom: 1px solid #EFECF7;
      font-size: 14px;
    }

    .cal-more-row:last-child {
      border-bottom: 0;
    }

    .cal-more-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .cal-more-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .cal-more-actions button {
      min-height: 44px;
    }

    #cal-event-menu button {
      min-height: 44px;
    }

    #cal-event-menu.has-requests {
      min-width: 280px;
      max-width: min(360px, calc(100vw - 16px));
    }

    #cal-event-menu .req-strip {
      margin-top: 6px;
    }

    #cal-event-menu .req-strip .btn-primary,
    #cal-event-menu .req-strip .btn-secondary {
      width: auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      min-height: 44px;
      height: auto;
      padding: 0 18px;
      border-radius: 22px;
    }

    button.band-chip {
      border: 0;
      cursor: pointer;
      min-height: 44px;
      height: auto;
      padding: 0 14px;
    }

    button.band-chip.is-open {
      outline: 2px solid #fff;
      outline-offset: 2px;
    }

    .band-chip.is-amber {
      background: var(--wait-bg);
      color: var(--wait);
    }

    .cal-issue-panel {
      position: relative;
      z-index: 2;
      margin: -36px 32px 16px;
      background: #fff;
      border-radius: 16px;
      padding: 14px 16px 6px;
    }

    #calendar-shell.has-issue-panel .cal-stage {
      margin-top: 0;
    }

    .cal-issue-panel h2 {
      margin: 0 0 4px;
      font-family: var(--font-display);
      font-size: 18px;
    }

    .cal-issue-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 16px;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-top: 1px solid #EFECF7;
    }

    .cal-issue-copy {
      min-width: 0;
      flex: 1 1 220px;
    }

    .cal-issue-name,
    .cal-issue-why {
      margin: 0;
    }

    .cal-issue-name {
      font-weight: 800;
    }

    .cal-issue-why.is-double {
      color: var(--attention);
      font-weight: 800;
    }

    .cal-issue-why.is-warn {
      color: var(--wait);
      font-weight: 800;
    }

    .cal-issue-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .cal-issue-actions .btn-primary,
    .cal-issue-actions .btn-secondary {
      min-height: 44px;
    }

    .band-chip.is-soft {
      background: #2A2245;
      color: #FFB4A2;
    }

    @media (max-width: 1100px) {
      .cal-stage {
        margin: -36px 16px 24px;
      }

      .cal-issue-panel {
        margin: -24px 16px 12px;
      }

      .cal-split,
      .cal-month-layout {
        grid-template-columns: 1fr;
      }

      .cal-week {
        grid-template-columns: 132px repeat(7, minmax(0, 1fr));
      }
    }

    @media (max-width: 759px) {
      .cal-stage {
        margin: -28px 12px 24px;
      }

      .cal-issue-panel {
        margin: -16px 12px 12px;
      }

      .cal-period {
        font-size: 18px;
      }

      .cal-switch-btn {
        padding: 0 10px;
      }

      .cal-mline,
      .cal-mmore,
      .cal-mslots {
        display: none;
      }

      .cal-mday {
        min-height: 52px;
        padding: 8px;
      }

      .cal-month-layout {
        display: block;
      }

      .cal-side {
        display: none;
      }

      .cal-side.is-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        max-height: 78vh;
        overflow: auto;
        margin: 0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 30px rgba(27, 21, 48, 0.2);
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
      }

      body.has-app-tabs .cal-side.is-open {
        bottom: 96px;
      }

      .cal-day-layout {
        display: block;
        width: 100%;
      }

      .cal-hours-shared {
        display: none;
      }

      .cal-cols {
        display: flex;
        flex-direction: column;
        gap: 18px;
      }

      .cal-col-body {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 6px;
      }

      .cal-hours-local {
        display: block;
        position: relative;
        height: 1040px;
      }
    }

    /* ---------- CA1: week by dealer (G-Calendar-Week) ---------- */
    @media (min-width: 1101px) {
      .cal-split { grid-template-columns: minmax(0, 1fr) 300px; }
    }

    .cal-week-card { padding: 0; overflow: hidden; }

    .cal-week-scroll { overflow-x: auto; }

    .cal-week { grid-template-columns: 200px repeat(7, minmax(96px, 1fr)); }

    .cal-week .cal-wh {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #fff;
      border-bottom: 1.5px solid var(--border);
      font-size: 13px;
    }

    .cal-week .cal-dealer {
      position: sticky;
      left: 0;
      z-index: 1;
      background: #fff;
      border-right: 1.5px solid var(--border);
    }

    .cal-week .is-alt,
    .cal-week .cal-dealer.is-alt { background: #FAF9FD; }

    .cal-week .cal-cell { min-height: 72px; gap: 4px; cursor: pointer; }

    .cal-week .cal-cell.is-today { box-shadow: inset 0 3px 0 var(--accent); }

    .cal-week .cal-cell.is-off { background: #F7F6FB; }

    .cal-dealer-text { min-width: 0; }

    .cal-dealer-name { font-size: 15px; }

    .cal-dealer-sub {
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .cal-avail {
      align-self: flex-start;
      padding: 4px 6px;
      border-radius: 8px;
      font: 700 12px/1.3 var(--font-body);
    }

    .cal-avail.is-free,
    .cal-avail.is-partly { background: #EAF7F0; color: #137A4B; }

    .cal-avail.is-full { background: var(--attention-bg); color: var(--attention); }

    .cal-avail.is-off,
    .cal-avail.is-unknown { background: #F1EFF6; color: #6F6886; }

    .cal-slot {
      flex-direction: column;
      gap: 1px;
      min-height: 0;
      padding: 5px 7px;
      font-size: 13px;
      line-height: 1.25;
      color: var(--text);
    }

    .cal-slot-time { font-size: 13px; font-weight: 800; }

    .cal-slot-who {
      display: flex;
      align-items: center;
      gap: 2px;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .cal-slot-who .product-dot { margin-right: 4px; }

    .cal-slot.is-needs-outcome {
      background: var(--wait-bg);
      box-shadow: inset 0 0 0 1.5px #E8A400;
    }

    .cal-slot-tag {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      color: var(--wait);
    }

    .cal-week-filters {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      padding: 12px 14px;
      border-bottom: 1.5px solid var(--border);
    }

    .cal-filter-chip {
      min-height: 34px;
      padding: 0 12px;
      border-radius: 17px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--text);
      font: 700 13px var(--font-body);
      cursor: pointer;
    }

    .cal-filter-chip.is-on {
      background: var(--product, var(--accent));
      border-color: var(--product, var(--accent));
      color: #fff;
    }

    .cal-filter-spacer { flex: 1; }

    .cal-filter-count {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .cal-week-help {
      margin: 0;
      padding: 10px 14px;
      color: var(--muted);
      font-size: 13px;
    }

    /* Popovers: Who's free and Give to… */
    .cal-pop {
      position: absolute;
      z-index: 60;
      padding: 12px 14px 10px;
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 12px 32px rgba(27, 21, 48, 0.22);
      box-sizing: border-box;
    }

    .cal-pop-close {
      position: absolute;
      top: 6px;
      right: 8px;
      width: 32px;
      height: 32px;
      border: 0;
      background: none;
      color: var(--muted);
      font-size: 20px;
      cursor: pointer;
    }

    .cal-pop-title {
      margin: 0 32px 8px 0;
      font-weight: 800;
      font-size: 14px;
    }

    .cal-pop-empty {
      margin: 0 0 6px;
      color: var(--muted);
      font-size: 14px;
    }

    .cal-pop-line {
      display: flex;
      flex-direction: column;
      padding: 6px 0;
      border-top: 1px solid var(--border);
      font-size: 14px;
    }

    .cal-pop-line span { color: var(--muted); font-size: 13px; }

    .cal-give-option {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 48px;
      padding: 6px 8px;
      border: 0;
      border-radius: 10px;
      background: none;
      text-align: left;
      font: inherit;
      cursor: pointer;
    }

    .cal-give-option:hover,
    .cal-give-option:focus-visible { background: var(--soft); }

    .cal-give-text { display: flex; flex-direction: column; min-width: 0; }

    .cal-give-text b { font-size: 14px; }

    .cal-give-text span { color: var(--muted); font-size: 12px; }

    .cal-give-option.is-warn .cal-give-text span { color: var(--wait); }

    .cal-pop-other { margin-top: 6px; font-size: 13px; }

    /* Tray */
    .cal-tray-day {
      margin: 6px 0 0;
      color: #C9C1F2;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .cal-tray-best { font-size: 12px; color: #C9C1F2; }

    .cal-fix-line {
      display: block;
      width: 100%;
      margin: 0 0 6px;
      min-height: 36px;
      padding: 0 12px;
      border: 0;
      border-radius: 18px;
      font: 800 13px var(--font-body);
      text-align: left;
      cursor: pointer;
    }

    .cal-fix-line.is-coral { background: var(--attention-bg); color: var(--attention); }

    .cal-fix-line.is-amber { background: var(--wait-bg); color: var(--wait); }

    .cal-fix-why {
      margin: 0 0 8px;
      color: var(--muted);
      font-size: 13px;
    }

    .cal-key-line {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 13px;
    }

    .cal-jump input {
      height: 40px;
      margin: 0;
      padding: 0 10px;
      border-radius: 20px;
      border: 1.5px solid var(--band-line);
      background: transparent;
      color: #fff;
      font: 700 13px var(--font-body);
      color-scheme: dark;
    }

    /* ---------- CA1: month heat map (G-Calendar-Month) ---------- */
    .cal-mday.cal-heat {
      align-items: flex-start;
      gap: 0;
      min-height: 104px;
      cursor: pointer;
    }

    .cal-heat.is-heat-0 { background: #fff; }
    .cal-heat.is-heat-1 { background: #ECE8FA; }
    .cal-heat.is-heat-2 { background: #D3C9F7; }
    .cal-heat.is-heat-3 { background: #9F8CEF; color: #fff; }
    .cal-heat.is-heat-4 { background: #5B3FDF; color: #fff; }

    .cal-heat.outside { opacity: 0.45; }

    .cal-heat.is-heat-3 .cal-mnum,
    .cal-heat.is-heat-4 .cal-mnum,
    .cal-heat.is-heat-3 .cal-heat-sub,
    .cal-heat.is-heat-4 .cal-heat-sub { color: #fff; }

    .cal-heat-count {
      margin-top: 6px;
      font-family: var(--font-display);
      font-size: 26px;
      font-weight: 800;
      line-height: 1;
    }

    .cal-heat-noun { font-size: 12px; font-weight: 700; }

    .cal-heat-sub { margin-top: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }

    .cal-heat.is-needs { box-shadow: inset 0 0 0 2.5px var(--attention-strong); }

    .cal-heat-needs {
      margin-top: 4px;
      padding: 1px 6px;
      border-radius: 8px;
      background: var(--attention-strong);
      color: #fff;
      font-size: 11px;
      font-weight: 800;
    }

    .cal-heat-legend {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 14px;
      padding: 10px 8px 4px;
      color: var(--muted);
      font-size: 13px;
    }

    .cal-heat-ramp { display: inline-flex; gap: 2px; }

    .cal-heat-ramp i {
      width: 18px;
      height: 12px;
      border-radius: 3px;
      border: 1px solid var(--border);
    }

    .cal-heat-ramp .is-heat-0 { background: #fff; }
    .cal-heat-ramp .is-heat-1 { background: #ECE8FA; }
    .cal-heat-ramp .is-heat-2 { background: #D3C9F7; }
    .cal-heat-ramp .is-heat-3 { background: #9F8CEF; }
    .cal-heat-ramp .is-heat-4 { background: #5B3FDF; }

    .cal-heat-key-needs {
      padding: 2px 8px;
      border-radius: 8px;
      box-shadow: inset 0 0 0 2px var(--attention-strong);
      color: var(--text);
      font-weight: 700;
    }

    .cal-heat-note { flex-basis: 100%; }

    @media (max-width: 1100px) {
      .cal-week { grid-template-columns: 160px repeat(7, minmax(92px, 1fr)); }
    }

    @media (max-width: 759px) {
      .cal-mday.cal-heat { min-height: 64px; padding: 6px; }
      .cal-heat-count { font-size: 18px; }
      .cal-heat-noun,
      .cal-heat-sub,
      .cal-heat-needs { display: none; }
      .cal-jump { display: none; }
    }

    /* DT1: an offer by text on a Needs a dealer demo */
    .cal-tray-offer { font-size: 12px; color: var(--accent); font-weight: 700; margin-top: 4px; }
    .cal-tray-offer.is-ended { color: var(--attention); }

    /* ---------- CD1: Day view for big teams ---------- */
    .cal-day-filters { flex-wrap: wrap; align-items: center; }
    .cal-day-level { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
    .cal-day-level select { min-height: 34px; border-radius: 999px; padding: 0 10px; border: 1px solid #DCD6EE; font: inherit; color: #1B1530; background: #fff; }
    .cal-day-layout-switch { display: inline-flex; gap: 4px; }

    .cal-day-nohours {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
      margin: 0 0 12px; padding: 12px 14px; border-radius: 12px;
      background: #F4F1FF; border: 1px solid #DCD6EE; color: #1B1530;
    }
    .cal-day-nohours p { margin: 0; font-weight: 700; }

    /* both layouts scroll sideways; the hours and the names stay put */
    .cal-day-scroll.is-cols,
    .cal-day-scroll.is-rows {
      overflow: auto;
      max-height: 75vh;
      overscroll-behavior: contain;
      border: 1px solid #ECE8F6;
      border-radius: 12px;
      background: #fff;
    }
    .cal-day-scroll.is-cols .cal-day-layout {
      width: 100%;
      min-width: calc(80px + var(--cols) * var(--col-min, 200px));
      column-gap: 0;
    }
    .cal-day-scroll.is-cols .cal-hours-shared { z-index: 4; padding-right: 8px; }
    .cal-day-scroll.is-cols .cal-cols {
      grid-template-columns: repeat(var(--cols), minmax(var(--col-min, 200px), 1fr));
      gap: 0;
    }
    .cal-day-scroll.is-cols .cal-col { border-left: 1px solid #F0EDF8; padding: 0 4px; min-width: 0; }
    .cal-day-scroll.is-cols .cal-col-head {
      position: sticky; top: 0; z-index: 3; background: #fff;
      min-height: 52px; margin: 0; padding: 6px 4px; box-sizing: border-box;
      border-bottom: 1px solid #ECE8F6;
    }
    .cal-day-scroll.is-cols .cal-hours-shared { margin-top: 52px; }
    .cal-col-head.is-lane, .cal-dr-name.is-lane { background: #F7F5FF; }
    .cal-col.is-lane .cal-track { background: #FBFAFF; }

    /* demo cards: two short lines */
    .cal-day-card-block {
      display: flex; flex-direction: column; justify-content: flex-start; gap: 1px;
      padding: 4px 6px; overflow: hidden; text-align: left;
    }
    .cal-card-head, .cal-card-tail {
      display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      font-size: 13px; line-height: 16px;
    }
    .cal-card-head { font-weight: 800; }
    .cal-card-head .product-badge { margin-right: 4px; vertical-align: middle; }
    .cal-card-tail { font-weight: 600; opacity: 0.9; }

    /* dealers down the side: one row each, the day running across */
    .cal-day-rows {
      display: grid;
      grid-template-columns: 200px var(--track-w);
      width: max-content;
      min-width: 100%;
    }
    .cal-dr-corner, .cal-dr-name {
      position: sticky; left: 0; z-index: 3; background: #fff;
      border-right: 1px solid #ECE8F6; box-sizing: border-box;
    }
    .cal-dr-corner {
      top: 0; z-index: 5; padding: 8px 10px; font-size: 13px; font-weight: 800;
      color: var(--muted); border-bottom: 1px solid #ECE8F6;
    }
    .cal-dr-ruler {
      position: sticky; top: 0; z-index: 2; height: 34px; background: #fff;
      border-bottom: 1px solid #ECE8F6;
    }
    .cal-dr-tick {
      position: absolute; top: 8px; transform: translateX(-50%);
      font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap;
    }
    .cal-dr-tick:first-child { transform: none; padding-left: 4px; }
    .cal-dr-tick:last-child { transform: translateX(-100%); padding-right: 4px; }
    .cal-dr-name { margin: 0; min-height: 52px; padding: 6px 10px; border-bottom: 1px solid #F0EDF8; justify-content: center; }
    .cal-dr-name.is-alt { background: #FCFBFF; }
    .cal-dr-track {
      position: relative; border-bottom: 1px solid #F0EDF8;
      background-image: linear-gradient(to right, #F0EDF8 1px, transparent 1px);
      background-size: 120px 100%;
    }
    .cal-dr-track.is-alt { background-color: #FCFBFF; }
    .cal-dr-track.is-lane { background-color: #FBFAFF; }
    .cal-dr-track .cal-shade.is-across,
    .cal-dr-track .cal-unconfirmed.is-across,
    .cal-dr-track .cal-timeoff.is-across { top: 0; bottom: 0; height: auto; right: auto; }
    .cal-block.is-across { position: absolute; box-sizing: border-box; }

    /* phones: the day as a list by time */
    .cal-day-timeline { display: flex; flex-direction: column; gap: 8px; }
    .cal-day-item {
      display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 2px 10px;
      width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px;
      border: 1px solid #ECE8F6; background: #fff; color: #1B1530; font: inherit; cursor: pointer;
    }
    .cal-day-item-time { grid-row: span 3; font-weight: 800; font-size: 15px; }
    .cal-day-item .cal-card-head, .cal-day-item .cal-card-tail { font-size: 15px; line-height: 20px; }
    .cal-day-item-dealer { font-size: 14px; color: var(--muted); font-weight: 600; }
    .cal-day-item.needs { border-color: #E8B931; }
    /* NEO 3723f2ea (Nov 20): on phones the card's fill shows the result, as on desktop (green sale, violet demo, grey other) */
    .cal-day-item.sale { background: #DDF3E7; }
    .cal-day-item.demo { background: #ECE8FA; }
    .cal-day-item.other { background: #F4F2FB; }
    .cal-block.is-across { min-height: 0; }

    /* Day view: cards never spill (each line cut short, the rest on tap); short cards show their warning as the border */
    .cal-day-card-block .cal-issue-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .cal-day-card-block.is-short .cal-issue-tag { display: none; }
    .cal-day-card-block.is-short { gap: 0; padding-top: 3px; padding-bottom: 3px; }
    .cal-col-sub.is-full { color: var(--wait); }
    .cal-col-sub.is-over { color: #B4232C; }
    .cal-load-label { cursor: help; }

    /* an office session's customers */
    .cal-pop-sub { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
    .cal-session-row { padding: 8px 0; border-top: 1px solid #F0EDF8; }
    .cal-session-row .cal-attend-meta { margin: 2px 0 6px; }
    .cal-session-row .cal-attend-actions { display: flex; flex-wrap: wrap; gap: 6px; }
/* css/admin.css */
    .service-area-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px 24px;
    }

    .service-area-grid h3 {
      margin: 0 0 10px;
      font-size: 0.9rem;
    }

    @media (max-width: 700px) {
      .service-area-grid { grid-template-columns: 1fr; }
    }

    .logo-row {
      display: flex;
      align-items: flex-end;
      gap: 12px;
      margin-bottom: 8px;
    }

    .logo-preview {
      display: block;
      width: 80px;
      height: 80px;
      object-fit: contain;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      margin: 0;
    }

    .toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .toggle-row:last-child { border-bottom: none; }

    .toggle-row > span,
    .toggle-row .module-name {
      font-weight: 600;
      font-size: 0.95rem;
    }

    .toggle-row .field-hint {
      margin: 4px 0 0;
      font-weight: 400;
    }

    .coming-soon {
      display: inline-block;
      margin-left: 8px;
      padding: 1px 6px;
      border-radius: 999px;
      background: #EEF0F3;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      vertical-align: middle;
    }

    .toggle input:disabled + .toggle-slider {
      opacity: 0.55;
      cursor: not-allowed;
    }

    .module-tiles {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 14px 16px 8px;
    }

    .module-tile {
      min-width: 120px;
      flex: 1 1 120px;
      max-width: 180px;
      background: #FAFBFC;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
    }

    .module-tile-count {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
    }

    .module-tile-label {
      margin-top: 2px;
      font-size: 12px;
      color: var(--muted);
    }

    .offices-bulk-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      padding: 8px 16px 14px;
      font-size: 13px;
      color: var(--text);
    }

    .offices-bulk-bar select {
      width: auto;
      margin-bottom: 0;
      min-width: 160px;
    }

    .module-dot {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 2px solid var(--border);
      background: #fff;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      cursor: pointer;
    }

    .module-dot.on {
      background: var(--accent);
      border-color: var(--accent);
    }

    .module-dot:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }

    .toggle {
      position: relative;
      width: 44px;
      height: 24px;
      flex-shrink: 0;
    }

    .toggle input {
      opacity: 0;
      width: 0;
      height: 0;
      position: absolute;
    }

    .toggle-slider {
      position: absolute;
      inset: 0;
      background: #c5cbd3;
      border-radius: 999px;
      cursor: pointer;
    }

    .toggle input:checked + .toggle-slider {
      background: var(--accent);
    }

    .toggle-slider::before {
      content: "";
      position: absolute;
      height: 18px;
      width: 18px;
      left: 3px;
      top: 3px;
      background: #fff;
      border-radius: 50%;
      transition: transform 0.15s ease;
    }

    .toggle input:checked + .toggle-slider::before {
      transform: translateX(20px);
    }

    .sidebar-toggle {
      background: transparent;
      border: 1px solid #2A3345;
      color: var(--sidebar-text);
      border-radius: var(--radius);
      min-height: 36px;
      padding: 0 12px;
      cursor: pointer;
      font: 500 13px var(--font-body);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .create-office-wrap {
      margin-bottom: 14px;
    }

    .create-office-fixed {
      margin: 0 0 4px;
      font-weight: 600;
    }

    .usage-meter h1 {
      margin: 0 0 4px;
    }

    .usage-used-line {
      font-size: 18px;
      font-weight: 600;
      margin: 12px 0 8px;
    }

    .usage-chip {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 999px;
      background: #EEF0F3;
      font-size: 12px;
      font-weight: 600;
    }

    .usage-chip-amber {
      background: #FEF3C7;
      color: #B45309;
    }

    .usage-chip-red {
      background: #FEE2E2;
      color: #B91C1C;
    }

    .usage-bar {
      height: 10px;
      background: #EEF0F3;
      border-radius: 999px;
      overflow: hidden;
      margin: 10px 0 16px;
    }

    .usage-bar-fill {
      height: 100%;
      background: #2B4EFF;
      border-radius: 999px;
    }

    .usage-bar-fill.is-warn { background: #D97706; }

    .usage-bar-fill.is-over { background: #DC2626; }

    .usage-stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 12px;
    }

    .usage-stats .muted {
      display: block;
      font-size: 12px;
    }

    .usage-heads-up {
      background: #FFFBEB;
      border: 1px solid #F59E0B;
      border-radius: 10px;
      padding: 10px 12px;
    }

    #usage-body {
      padding: 24px;
    }

    #usage-view .page-band h1,
    #usage-body h1 {
      font-size: 20px;
      margin: 0 0 8px;
    }

    .usage-section {
      margin-top: 28px;
    }

    .usage-section h2 {
      margin: 0 0 12px;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .usage-split {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-top: 20px;
    }

    .usage-split .usage-section {
      margin-top: 0;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 16px;
    }

    .usage-meter .btn-secondary {
      margin-top: 12px;
      min-height: 44px;
    }

    .usage-type-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .usage-type-list li {
      display: flex;
      justify-content: space-between;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
    }

    .usage-chart {
      display: flex;
      align-items: flex-end;
      justify-content: flex-start;
      gap: 18px;
      min-height: 140px;
      margin-top: 12px;
    }

    .usage-chart-col {
      flex: 0 0 auto;
      width: 56px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
      font-size: 11px;
      color: var(--muted);
    }

    .usage-chart-value {
      font-size: 11px;
      font-weight: 600;
      color: var(--text);
    }

    .usage-chart-stack {
      display: flex;
      flex-direction: column-reverse;
      justify-content: flex-start;
      width: 28px;
      height: 140px;
    }

    .usage-chart-base {
      background: #2B4EFF;
      border-radius: 4px 4px 0 0;
    }

    .usage-chart-over {
      background: #D97706;
    }

    .usage-extra {
      color: #B45309;
      font-weight: 600;
    }

    .usage-margin-neg {
      color: #B91C1C;
      font-weight: 600;
    }

    @media (max-width: 800px) {
      .usage-split {
        grid-template-columns: 1fr;
      }
    }

    .hub-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 16px;
    }

    .hub-tile {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      text-align: left;
      padding: 16px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #fff;
      cursor: pointer;
      color: inherit;
      font: inherit;
      width: 100%;
    }

    .hub-tile:hover {
      border-color: #c5cad3;
      box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    }

    .hub-tile-icon {
      flex: 0 0 auto;
      width: 40px;
      height: 40px;
      border-radius: 10px;
      background: #F3F5F8;
      color: #334155;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .hub-tile-body {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .hub-tile-body strong {
      font-size: 15px;
      font-weight: 650;
    }

    .hub-tile-desc,
    .hub-tile-status {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.35;
    }

    .hub-tile-status {
      font-weight: 550;
      color: #475569;
    }

    .system-emails-choose-title {
      margin: 0 0 16px;
      font-size: 16px;
      font-weight: 600;
    }

    .system-emails-layout {
      display: grid;
      grid-template-columns: 1fr;
      gap: 24px;
      align-items: start;
    }

    .system-emails-settings {
      min-width: 0;
    }

    .system-email-card {
      padding: 24px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
    }

    .system-email-card h2 {
      margin: 0 0 6px;
      font-size: 20px;
    }

    .system-email-card-desc {
      margin: 0 0 18px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.4;
    }

    .system-email-group {
      margin: 20px 0 4px;
      font-size: 11px;
      font-weight: 650;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .system-email-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 8px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }

    .system-email-footer .btn-primary {
      margin-left: auto;
    }

    .system-email-dirty {
      font-size: 13px;
      color: #9a6700;
    }

    .system-email-footnote {
      margin: 10px 0 0;
      font-size: 13px;
      color: var(--muted);
      line-height: 1.4;
    }

    .system-email-preview-card {
      padding: 20px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      min-width: 0;
    }

    .system-email-updating {
      margin: 8px 0 0;
      font-size: 13px;
      color: var(--muted);
    }

    .system-email-subject {
      font-weight: 600;
      margin: 12px 0 8px;
      word-break: break-word;
    }

    .system-email-frame {
      display: block;
      width: 100%;
      height: 80px;
      max-height: 900px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
    }

    #booking-preview-results {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin: 6px 0 10px;
    }

    @media (min-width: 1100px) {
      .system-emails-layout {
        grid-template-columns: 480px minmax(0, 1fr);
      }

      .system-emails-preview {
        position: sticky;
        top: 16px;
        align-self: start;
      }
    }

    #office-detail-view:not(.hidden) {
      display: block;
      min-height: 0;
    }

    .setup-page {
      overflow-x: hidden;
    }

    .setup-stack {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin: -50px 32px 32px;
      min-width: 0;
    }

    .setup-stack > form,
    #office-extra {
      display: flex;
      flex-direction: column;
      gap: 16px;
      min-width: 0;
    }

    .setup-page .setup-card {
      padding: 22px 24px;
      margin: 0;
    }

    .setup-page .card h2,
    .lq-panel h2 {
      margin: 0 0 8px;
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 22px;
      letter-spacing: -0.02em;
    }

    .setup-page .card h2 + .setup-help {
      margin: 0 0 16px;
    }

    .setup-page .setup-card label {
      display: block;
      margin: 16px 0 6px;
    }

    .setup-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 16px;
      min-width: 0;
    }

    .setup-card > .setup-field:first-of-type,
    .setup-card > h2 + .setup-field,
    .setup-card > h2 + .setup-help + .setup-list,
    .setup-add > .setup-field,
    .lq-panel form > .setup-field:first-of-type {
      margin-top: 0;
    }

    .setup-page .setup-field > label,
    .setup-page .form-grid label,
    .setup-page .toggle-row label,
    .lq-panel .setup-field > label,
    .lq-panel .toggle-row label {
      margin: 0;
    }

    .setup-page .setup-card input,
    .setup-page .setup-card select,
    .setup-page .setup-field input,
    .setup-page .setup-field select,
    .lq-panel input,
    .lq-panel select {
      height: 44px;
      min-height: 44px;
      margin-bottom: 0;
      max-width: 100%;
    }

    .setup-page input[type="color"] {
      width: 64px;
      height: 44px;
      padding: 4px;
    }

    .setup-page .field-hint,
    .setup-help,
    .setup-count {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 400;
      line-height: 1.4;
    }

    .setup-page .setup-field .field-hint,
    .setup-page .form-grid .field-hint,
    .setup-count {
      margin-top: 4px;
    }

    .setup-page .form-grid {
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .setup-page .form-grid > div,
    .setup-page .service-area-grid > div {
      min-width: 0;
    }

    .setup-page .shared-hours-row input,
    #office-bookings-card .shared-hours-row input {
      width: 96px;
      max-width: 40%;
      flex: 0 0 96px;
      margin-bottom: 0;
    }

    .setup-page .shared-hours-row span {
      white-space: nowrap;
    }

    .setup-page .toggle-row .field-hint,
    .setup-page .toggle-row .setup-help,
    .lq-panel .toggle-row .setup-help {
      margin: 4px 0 0;
    }

    .setup-actions {
      display: flex;
      justify-content: flex-end;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 20px;
    }

    .setup-actions .btn-primary,
    .setup-actions .btn-secondary,
    .setup-actions .btn-ghost,
    .setup-page .toolbar .btn-secondary {
      min-height: 44px;
      height: 44px;
    }

    .setup-page .toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }

    .setup-page .staff-card {
      padding: 20px 24px 24px;
    }

    .setup-page .table-wrap {
      overflow-x: hidden;
    }

    .setup-page .staff-table th,
    .setup-page .staff-table td {
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .setup-page .toggle,
    .lq-panel .toggle,
    .lq-row .toggle,
    .ls-survey .toggle {
      width: 44px;
      height: 44px;
    }

    .setup-page .toggle .toggle-slider,
    .lq-panel .toggle .toggle-slider,
    .lq-row .toggle .toggle-slider,
    .ls-survey .toggle .toggle-slider {
      inset: auto;
      top: 10px;
      left: 0;
      width: 44px;
      height: 24px;
    }

    .setup-list {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .setup-row {
      display: flex;
      align-items: flex-start;
      gap: 16px;
      padding: 14px 0;
      border-bottom: 1px solid var(--border);
      min-width: 0;
    }

    .setup-row > .toggle {
      margin-top: 2px;
    }

    .setup-row:last-child { border-bottom: 0; }

    .setup-row.is-off .setup-row-name { color: var(--muted); }

    .setup-row-main {
      flex: 1 1 180px;
      min-width: 0;
    }

    .setup-row-name {
      font-weight: 700;
      overflow-wrap: anywhere;
    }

    .setup-row-main .setup-help {
      margin-top: 4px;
    }

    .setup-row-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
    }

    .setup-add {
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid var(--border);
    }

    .ls-name {
      width: 100%;
    }

    .ls-survey {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 44px;
      margin-top: 8px;
      font-size: 13px;
    }

    .lq-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
    }

    .lq-row,
    .lq-option {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px 16px;
      min-width: 0;
      padding: 14px 16px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
    }

    .lq-row.is-off { background: #F7F5FC; }

    .lq-row.is-dragging,
    .lq-option.is-dragging { outline: 2px solid var(--accent); }

    .lq-drag {
      min-width: 44px;
      min-height: 44px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--muted);
      cursor: grab;
      font-size: 18px;
      line-height: 1;
    }

    .lq-main { flex: 1 1 220px; min-width: 0; }

    .lq-label {
      font-weight: 700;
      overflow-wrap: anywhere;
    }

    .lq-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 4px;
      color: var(--muted);
      font-size: 13px;
    }

    .lq-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }

    .lq-chip {
      display: inline-flex;
      align-items: center;
      min-height: 26px;
      padding: 0 10px;
      border-radius: 13px;
      background: var(--soft);
      color: var(--text);
      font: 700 12px var(--font-body);
    }

    .lq-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: auto;
    }

    .lq-edit,
    .lq-add-office,
    .lq-option-remove,
    #lq-add-option {
      min-height: 44px;
    }

    .lq-empty {
      margin: 0;
      color: var(--muted);
    }

    .lq-option { padding: 8px; }

    .lq-option input {
      flex: 1 1 140px;
      min-width: 0;
    }

    .lq-scrim {
      position: fixed;
      inset: 0;
      z-index: 40;
      background: rgba(27, 21, 48, 0.35);
    }

    .lq-panel {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      z-index: 41;
      width: min(440px, 100%);
      max-width: 100%;
      overflow-x: hidden;
      overflow-y: auto;
      padding: 22px 24px 32px;
      background: #fff;
      box-shadow: -12px 0 32px rgba(27, 21, 48, 0.16);
    }

    .lq-panel-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
    }

    .lq-panel-head h2 {
      margin: 0;
      overflow-wrap: anywhere;
    }

    .lq-panel-close {
      width: 44px;
      height: 44px;
      border: 0;
      border-radius: 22px;
      background: var(--soft);
      color: var(--text);
      font-size: 22px;
      line-height: 1;
    }

    #lq-options-wrap .setup-help { margin-bottom: 8px; }

    #lq-add-option { margin-top: 10px; }

    #lq-form-msg,
    #ls-msg { margin-top: 12px; }

    .setup-msg { margin: 0; }

    @media (max-width: 760px) {
      .setup-stack {
        margin: -28px 16px 24px;
      }

      .setup-page .form-grid,
      .setup-page .service-area-grid {
        grid-template-columns: 1fr;
      }

      .setup-page .page-band-actions,
      .setup-page .toolbar-filter {
        width: 100%;
      }

      .setup-page .toolbar-filter {
        flex-wrap: wrap;
      }

      .setup-page .band-select {
        width: 100%;
        max-width: none;
        flex: 1 1 160px;
      }

      .setup-row {
        flex-wrap: wrap;
        align-items: flex-start;
      }

      .setup-row-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
      }

      .lq-panel { width: 100%; }

      .setup-page .staff-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
      }

      .setup-page .staff-table,
      .setup-page .staff-table tbody,
      .setup-page .staff-table tr,
      .setup-page .staff-table td {
        display: block;
        width: 100%;
      }

      .setup-page .staff-table tr {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
      }

      .setup-page .staff-table td {
        height: auto;
        border: 0;
        padding: 4px 0;
      }

      .setup-page .staff-table td[data-label]:not([data-label=""])::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
      }
    }

    .twilio-check-result {
      margin-top: 14px;
      display: grid;
      gap: 8px;
    }

    .twilio-check-result p {
      margin: 0;
      overflow-wrap: anywhere;
    }

    .v1-steps,
    .v1-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .v1-steps {
      margin-bottom: 16px;
    }

    .v1-step,
    .v1-actions button,
    .v1-file input,
    .v1-row select,
    .v1-row input[type="text"],
    .v1-check {
      min-height: 44px;
    }

    .v1-step {
      padding: 8px 14px;
      border-radius: 999px;
      border: 1px solid var(--border-strong);
      background: transparent;
      color: inherit;
    }

    .v1-step.is-on {
      background: var(--text);
      color: var(--surface);
      border-color: var(--text);
    }

    .v1-note,
    .v1-error {
      margin: 0 0 12px;
      overflow-wrap: anywhere;
    }

    .v1-error {
      color: var(--danger, #9b2c2c);
    }

    .v1-file,
    .v1-row {
      display: grid;
      gap: 8px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
      min-width: 0;
    }

    .v1-file strong,
    .v1-row strong,
    .v1-group-title {
      overflow-wrap: anywhere;
    }

    .v1-row label,
    .v1-file label {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .v1-row select,
    .v1-row input[type="text"],
    #v1-office {
      width: 100%;
      max-width: 100%;
      min-height: 44px;
    }

    .v1-check {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .v1-actions {
      margin-top: 16px;
    }

    .v1-report {
      display: grid;
      gap: 6px;
      margin-top: 16px;
    }

    .v1-report p {
      margin: 0;
      overflow-wrap: anywhere;
    }

    #import-v1-view .progress-track {
      margin-top: 12px;
    }

    #import-v1-view,
    #import-v1-body {
      max-width: 100%;
      overflow-x: hidden;
    }

    #import-v1-view input,
    #import-v1-view select,
    #import-v1-view button {
      max-width: 100%;
    }

    /* Texting allowance (TX5): Admin › Texting usage, TellUS office settings and alerts */
    .allow-banner {
      margin: 0 0 16px;
      padding: 10px 14px;
      border-radius: 10px;
      background: var(--wait-bg);
      color: var(--wait);
      font-weight: 600;
    }

    .allow-banner.is-full {
      background: var(--attention-bg);
      color: var(--attention);
    }

    .allow-split {
      display: grid;
      grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
      gap: 16px;
    }

    .allow-card {
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 16px 18px;
    }

    .allow-card h2 {
      margin: 0 0 8px;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .allow-headline {
      margin: 0 0 6px;
      font-family: var(--font-display);
      font-size: 24px;
      font-weight: 800;
      letter-spacing: -0.02em;
    }

    .usage-bar-fill.allow-fill { background: var(--accent); }

    .allow-stats {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 12px 16px;
    }

    .allow-stat {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .allow-stat-label {
      font-size: 12px;
      color: var(--muted);
    }

    .allow-stat-value { font-size: 18px; }

    .allow-stat-help {
      font-size: 12px;
      color: var(--muted);
    }

    .allow-note {
      margin: 12px 0 0;
      font-size: 14px;
    }

    .allow-free {
      display: inline-flex;
      align-items: center;
      height: 24px;
      padding: 0 10px;
      margin-bottom: 8px;
      border-radius: 12px;
      background: var(--ok-bg);
      color: var(--ok);
      font: 800 12px var(--font-body);
    }

    .allow-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      font-size: 13px;
      color: var(--text);
    }

    .allow-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .allow-swatch {
      width: 10px;
      height: 10px;
      border-radius: 2px;
    }

    .allow-swatch.is-service,
    .allow-bar.is-service { background: #0D9488; }

    .allow-swatch.is-marketing,
    .allow-bar.is-marketing { background: var(--accent); }

    .allow-chart {
      display: flex;
      align-items: flex-end;
      gap: 18px;
      min-height: 150px;
      margin-top: 12px;
      padding-bottom: 4px;
      border-bottom: 1px solid var(--border);
      overflow-x: auto;
    }

    .allow-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      flex: 0 0 auto;
    }

    .allow-bars {
      display: flex;
      align-items: flex-end;
      gap: 2px;
      height: 120px;
    }

    .allow-bar {
      width: 14px;
      border-radius: 4px 4px 0 0;
    }

    .allow-col-label {
      font-size: 12px;
      color: var(--muted);
    }

    .allow-table { margin-top: 12px; }

    .allow-table summary {
      cursor: pointer;
      font-size: 13px;
      color: var(--accent);
      font-weight: 600;
    }

    .allow-table table {
      margin-top: 8px;
      font-size: 13px;
    }

    #usage-body > .btn-secondary { margin-top: 16px; }

    .billing-usage-line {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 12px 16px;
      margin: 4px 0 16px;
      padding: 12px 14px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--bg);
    }

    .billing-to-bill {
      margin: 8px 0 4px;
      font-weight: 600;
      color: var(--ink, #1B1530);
    }

    .billing-sub {
      margin: 20px 0 8px;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .billing-add {
      margin-top: 20px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }

    .billing-add-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .billing-add-row input {
      margin: 0;
      width: auto;
      flex: 1 1 140px;
    }

    .billing-add-row input[type="number"] { flex: 0 0 120px; }

    .texting-alerts-card { margin: 24px 32px; }

    .texting-alerts-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .texting-alert {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
    }

    .texting-alert.is-dismissed { opacity: 0.6; }

    .texting-alert-main {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
      min-width: 0;
    }

    .texting-alert-main p {
      flex: 1 1 100%;
      margin: 0;
    }

    .texting-alert-main .muted { font-size: 12px; }

    .composer-credits.is-warn { color: var(--wait); font-weight: 600; }

    .mk-paused-pill { margin-left: 6px; }

    @media (max-width: 760px) {
      .allow-split { grid-template-columns: minmax(0, 1fr); }
      .texting-alerts-card { margin: 0 16px 20px; }
    }

    /* GL1: Connect intakes and Login email */
    .gl-intake {
      margin-top: 16px;
      padding: 14px 16px;
      border: 1px solid var(--border);
      border-radius: 14px;
    }

    .gl-intake h3 {
      margin: 0 0 6px;
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 800;
    }

    .gl-last {
      margin: 0 0 8px;
      font-size: 14px;
    }

    .gl-last.is-failed { color: var(--attention); }

    .gl-last-real {
      display: block;
      font-size: 13px;
      color: var(--muted);
    }

    .gl-copy-row,
    .login-link-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
      margin: 6px 0;
    }

    .login-link-bar:empty { display: none; }

    .login-link-bar { padding: 12px 16px 0; }

    .setup-card .login-link-bar { padding: 0 0 8px; }

    .gl-copy-label {
      flex: 0 0 104px;
      font: 700 12px var(--font-body);
      color: var(--muted);
    }

    .gl-copy-value {
      flex: 1 1 260px;
      min-width: 0;
      padding: 6px 8px;
      border-radius: 8px;
      background: var(--bg);
      font: 13px var(--font-mono);
      overflow-wrap: anywhere;
    }

    .gl-copy-btn {
      min-height: 36px;
      padding: 0 12px;
    }

    .gl-fields { margin: 8px 0; }

    .gl-fields summary,
    .allow-table summary {
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      color: var(--accent);
    }

    .gl-field-list {
      display: grid;
      grid-template-columns: max-content 1fr;
      gap: 4px 14px;
      margin: 8px 0 0;
      font-size: 13px;
    }

    .gl-field-list dt { font-family: var(--font-mono); }

    .gl-field-list dd {
      margin: 0;
      color: var(--muted);
    }

    .gl-example-head {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 8px;
    }

    .gl-example pre {
      margin: 6px 0 0;
      padding: 10px 12px;
      border-radius: 10px;
      background: var(--bg);
      font: 12px var(--font-mono);
      overflow-x: auto;
    }

    .gl-test {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      margin-top: 12px;
    }

    .gl-test-result { flex: 1 1 100%; }

    .gl-test-result .msg { margin: 0 0 6px; }

    .gl-test-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .gl-form {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    .gl-form-head {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }

    .gl-test-lead {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 0;
      border-top: 1px solid var(--border);
      font-size: 14px;
    }

    .gl-login-flags {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px 8px;
      margin-top: 4px;
    }

    .gl-login-note {
      font-size: 12px;
      color: var(--muted);
    }

    @media (max-width: 640px) {
      .gl-copy-label { flex-basis: 100%; }
      .gl-field-list { grid-template-columns: minmax(0, 1fr); }
    }

    /* RL1: roles as ticks, and the staff list grouped by role */
    .role-ticks {
      border: 0;
      margin: 4px 0 10px;
      padding: 0;
      display: grid;
      gap: 8px;
    }
    .role-ticks legend {
      font-weight: 600;
      margin-bottom: 6px;
      padding: 0;
    }
    .role-tick {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      cursor: pointer;
      margin: 0;
    }
    .role-tick input { margin-top: 3px; flex: 0 0 auto; }
    .role-tick-copy { display: grid; gap: 2px; }
    .role-tick-name { font-weight: 700; color: var(--text); }
    .role-tick-line { font-size: 13px; color: var(--muted); font-weight: 400; }
    .role-tick:has(input:checked) { border-color: var(--accent); }
    .role-tick:has(input:disabled) { cursor: default; opacity: 0.7; }
    .role-ticks + .field-hint { margin-top: 0; }
    .staff-group-row td {
      font-family: "Bricolage Grotesque", sans-serif;
      font-weight: 700;
      color: var(--text);
      background: var(--soft);
      padding-top: 10px;
      padding-bottom: 10px;
    }

    /* DT1: mobile and work texts on the Staff page */
    .staff-texts-line { font-size: 12px; color: var(--muted); margin-top: 2px; }
    .staff-texts-tag { font-weight: 700; }
    .staff-texts-tag.is-on { color: var(--ok); }
    .staff-texts-tag.is-stopped { color: var(--attention); }
    .work-texts-check { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-weight: 600; }

/* SF1: Staff list filters */
.staff-filter-bar { display: grid; gap: 10px; padding: 4px 0 14px; }
.staff-filter-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.staff-filter-state { margin: 0; }
.staff-filter-search { flex: 1 1 220px; max-width: 360px; }
.staff-filter-selects { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.staff-filter-select { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #6B6580; }
.staff-filter-select select { min-width: 150px; }
.staff-filter-help summary { cursor: pointer; color: #4B2EDB; font-size: 14px; }
.staff-filter-help .setup-help { margin: 6px 0 0; max-width: 72ch; }
@media (max-width: 640px) {
  .staff-filter-search { max-width: none; }
  .staff-filter-select { flex: 1 1 45%; }
  .staff-filter-select select { min-width: 0; width: 100%; }
}

/* FI1: a form's entries */
.form-entries-modal { max-width: 720px; }
.form-entries-body { display: grid; gap: 0; max-height: 60vh; overflow-y: auto; }
.form-entry-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid #ECEAF3; flex-wrap: wrap; }
.form-entry-row:first-child { border-top: 0; }
.form-entry-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.form-entry-error { color: #B42318; font-size: 13px; }
.form-entry-actions { display: flex; gap: 8px; }
.map-consent-text { width: 100%; margin-top: 6px; }

    /* AD2: Admin home */
    .ah-search { margin-left: 0; max-width: 420px; }
    .ah-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #FFF7E6; color: #7A4B00; font-size: 14px; }
    /* the same side margins as other pages' cards, overlapping the band like them */
    #admin-hub-view .page-band { padding-bottom: 58px; gap: 14px; }
    .ah-home { position: relative; z-index: 1; display: grid; gap: 16px; margin: -40px 32px 24px; min-width: 0; }
    .ah-home > * { min-width: 0; }
    .ah-note { position: relative; z-index: 1; }
    #admin-hub-view .ah-note:not(.hidden) { margin: -40px 32px 14px; }
    #admin-hub-view .ah-note:not(.hidden) + .ah-home { margin-top: 0; }
    @media (max-width: 1100px) {
      .ah-home { margin: -30px 16px 20px; }
      #admin-hub-view .ah-note:not(.hidden) { margin: -30px 16px 12px; }
    }
    .ah-empty { color: var(--muted); margin: 8px 0; }
    .ah-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
    .ah-section { padding: 18px 18px 8px; min-width: 0; }
    .ah-section h2 { font-family: "Bricolage Grotesque", var(--font-heading, sans-serif); font-size: 17px; margin: 0 0 6px; color: #1B1530; }
    .ah-row {
      display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, max-content) 14px; gap: 12px; align-items: center;
      box-sizing: border-box; width: 100%; max-width: 100%; padding: 12px 6px; border: 0; border-top: 1px solid #ECEAF3; background: transparent;
      text-align: left; color: inherit; font: inherit; cursor: pointer;
    }
    .ah-section h2 + .ah-row { border-top: 0; }
    .ah-row:hover { background: #F7F6FB; }
    .ah-row:focus-visible { outline: 2px solid #4B2EDB; outline-offset: -2px; border-radius: 8px; }
    .ah-row-icon { width: 36px; height: 36px; border-radius: 10px; background: #F1EEFC; color: #4B2EDB; display: flex; align-items: center; justify-content: center; }
    .ah-row-icon svg { width: 19px; height: 19px; }
    .ah-row-body { display: grid; gap: 2px; min-width: 0; }
    .ah-row-body strong { font-size: 15px; font-weight: 650; color: #1B1530; }
    .ah-row-desc { font-size: 13px; color: var(--muted); line-height: 1.35; }
    .ah-row-status { font-size: 13px; color: #475569; font-weight: 550; text-align: right; max-width: 220px; min-width: 0; display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; overflow-wrap: anywhere; }
    .ah-section { box-sizing: border-box; overflow: hidden; }
    .ah-row-status.is-attention { color: #8A5300; }
    .ah-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #F2A000; }
    .ah-row-chev { color: #A9A3BC; font-size: 20px; line-height: 1; }
    .ah-setup { padding: 18px; }
    .ah-setup-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
    .ah-setup-head h2 { font-family: "Bricolage Grotesque", var(--font-heading, sans-serif); font-size: 18px; margin: 0; color: #1B1530; }
    .ah-setup-count { color: var(--muted); font-size: 14px; }
    .ah-setup-hide { margin-left: auto; }
    .ah-setup .setup-help { margin: 6px 0 10px; }
    .ah-setup-bar { height: 6px; border-radius: 3px; background: #ECEAF3; overflow: hidden; margin-bottom: 12px; }
    .ah-setup-bar span { display: block; height: 100%; background: #4B2EDB; border-radius: 3px; }
    .ah-setup-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
    .ah-setup-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
    .ah-setup-list li.is-done span:last-child, .ah-setup-list li.is-waiting span:last-child { color: var(--muted); }
    .ah-setup-list li.is-waiting .ah-tick { background: #FFF1D6; border-color: #F2C46B; color: #8A5300; }
    .ah-setup-done { margin-top: 12px; }
    .ah-setup-done summary { cursor: pointer; color: #146C3A; font-weight: 600; font-size: 14px; }
    .ah-setup-done .ah-setup-list { margin-top: 10px; }
    .ah-tick { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #C9C1F2; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; }
    .ah-setup-list li.is-done .ah-tick { background: #1F9D55; border-color: #1F9D55; }
    @media (max-width: 860px) {
      .ah-sections, .ah-setup-list { grid-template-columns: minmax(0, 1fr); }
    }
    @media (max-width: 520px) {
      .ah-row { grid-template-columns: 32px minmax(0, 1fr) 12px; }
      .ah-row-status { grid-column: 2 / 3; grid-row: 2; justify-content: flex-start; text-align: left; max-width: none; }
      .ah-row-chev { grid-row: 1 / span 2; grid-column: 3; }
      .ah-search { max-width: none; }
    }
    .ah-explain { max-width: 72ch; }
    .ah-help-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); background: transparent; color: #fff; font: 600 12px var(--font-body, sans-serif); cursor: pointer; vertical-align: middle; padding: 0; }
    .ah-help-btn:hover { background: rgba(255,255,255,0.15); }
    .ah-help-panel { margin: 0 0 16px; padding: 14px 18px; }
    .ah-help-panel p { margin: 0 0 8px; max-width: 80ch; line-height: 1.5; }
    .ah-help-panel p:last-child { margin-bottom: 0; }

    /* HP1: help */
    .help-line { max-width: 76ch; }
    .help-q { width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; opacity: 0.85; font: 600 12px var(--font-body, sans-serif); cursor: pointer; vertical-align: middle; padding: 0; line-height: 20px; }
    /* a bigger round "?" on touch-size screens (it is not stretched into a tall pill) */
    @media (max-width: 1100px) { .help-q { width: 28px; height: 28px; line-height: 26px; } }
    .help-q:hover, .help-q[aria-expanded="true"] { opacity: 1; background: rgba(127, 127, 127, 0.15); }
    .help-show-me { font-size: 13px; margin-left: 4px; }
    .page-band .help-show-me { color: #CFC6FF; }
    .help-panel-inline { position: relative; z-index: 2; margin: 0; padding: 16px 18px; color: #1B1530; max-width: 860px; }
    header + .help-panel-inline, .calling-head + .help-panel-inline { margin: 8px 16px 12px; }
    .help-line { white-space: normal; }
    .help-line .help-show-me { white-space: nowrap; }
    .help-panel-inline p { margin: 0 0 8px; max-width: 80ch; line-height: 1.5; }
    .help-panel-close { margin-top: 2px; }
    .help-nav { position: relative; }
    .help-nav-dot { position: absolute; top: 6px; left: 26px; width: 8px; height: 8px; border-radius: 50%; background: #F2A000; box-shadow: 0 0 0 2px var(--sidebar-bg, #1B1530); }
    .help-modal { max-width: 640px; }
    .help-tabs { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
    .help-tab { border: 1px solid rgba(255,255,255,0.35); background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; position: relative; }
    .help-tab.is-on { background: #fff; color: #1B1530; }
    .help-tab.has-dot::after { content: ""; position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: #F2A000; }
    .help-body { padding: 16px 18px 20px; }
    .help-body input[type="search"], .help-body textarea { width: 100%; box-sizing: border-box; }
    .help-results { display: grid; gap: 10px; margin-top: 12px; }
    .help-result { border: 1px solid #ECEAF3; border-radius: 10px; padding: 10px 12px; }
    .help-result.is-new { border-color: #F2C46B; background: #FFFBF2; }
    .help-result h3 { margin: 0 0 4px; font-size: 15px; color: #1B1530; }
    .help-result p { margin: 0 0 6px; line-height: 1.45; font-size: 14px; }
    .help-news-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
    .help-news-date { font-size: 12px; color: var(--muted); }
    .help-new-pill { font-size: 11px; font-weight: 700; color: #8A5300; background: #FFF1D6; border-radius: 999px; padding: 1px 8px; }
    .help-ask-form { display: grid; gap: 8px; }
    .help-ask-form button { justify-self: start; }
    .help-ask-note { font-size: 13px; margin: 8px 0 0; }
    .help-firstday { padding: 18px; margin: -40px 32px 16px; position: relative; z-index: 1; }
    @media (max-width: 1100px) { .help-firstday { margin: -30px 16px 14px; } }
    .help-firstday-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
    .help-firstday-head h2 { margin: 0; font-family: "Bricolage Grotesque", var(--font-heading, sans-serif); font-size: 18px; color: #1B1530; }
    .help-firstday-head .link-btn { margin-left: auto; }
    .help-firstday > .muted { margin: 6px 0 10px; }
    .help-firstday-role { font-size: 14px; margin: 12px 0 6px; color: #4B2EDB; }
    .help-firstday-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
    .help-firstday-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
    .help-firstday-list li.is-done span:last-child { color: var(--muted); }
    .help-firstday-list li.is-done .ah-tick { background: #1F9D55; border-color: #1F9D55; }
    @media (max-width: 700px) { .help-firstday-list { grid-template-columns: minmax(0, 1fr); } }
    .help-tour-offer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; margin-top: 8px; }
    .page-band .help-tour-offer .link-btn { color: #CFC6FF; }
    .help-tour-shade { position: fixed; inset: 0; z-index: 9998; background: rgba(27, 21, 48, 0.35); }
    .help-tour-ring { position: fixed; z-index: 9999; border-radius: 10px; box-shadow: 0 0 0 3px #4B2EDB, 0 0 0 9999px rgba(27, 21, 48, 0.25); pointer-events: none; transition: all 0.18s ease; }
    .help-tour-tip { position: fixed; z-index: 10000; background: #fff; color: #1B1530; border-radius: 12px; padding: 14px 16px; box-shadow: 0 12px 30px rgba(27, 21, 48, 0.25); box-sizing: border-box; }
    .help-tour-tip p { margin: 4px 0 10px; line-height: 1.45; }
    .help-tour-count { font-size: 12px; color: #6B6580; }
    .help-tour-acts { display: flex; justify-content: flex-end; gap: 8px; }
    @media (max-width: 640px) { .help-line-text { display: block; } }
    .help-panel-inline .link-btn { color: #4B2EDB; }

    /* TZ1: the office time zone check */
    .office-tz-warn { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--wait-bg); color: var(--wait); font-size: 14px; }

    /* Calls settings: call results that start a route */
    .va-rules-list { display: grid; gap: 6px; margin: 8px 0 12px; }
    .va-rule-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      font-size: 14px;
    }
    .va-rule-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .va-rule-form select {
      height: 42px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      padding: 0 10px;
      font: inherit;
      background: #fff;
      min-width: 0;
    }
    .va-rule-arrow { color: var(--muted); }

    /* TX2: Admin › Text templates */
    .tt-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
    .tt-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--border); }
    .tt-row:first-child { border-top: 0; }
    .tt-row.is-off { opacity: 0.6; }
    .tt-row-main { min-width: 0; flex: 1; }
    .tt-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .tt-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--text); }
    .tt-row-body { margin: 6px 0 0; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
    .tt-row-actions { display: flex; gap: 4px; flex: none; }
    .tt-modal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; padding: 16px 20px; }
    .tt-editor input[type="text"], .tt-editor select, .tt-editor textarea { width: 100%; }
    .tt-editor label { display: block; margin-top: 12px; }
    .tt-editor .voice-check { display: flex; }
    .tt-sub { font-size: 15px; margin: 18px 0 4px; }
    .tt-button-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 6px; margin: 6px 0; }
    .tt-editor .tt-button-row input, .tt-editor .tt-button-row select { margin: 0; }
    .tt-options { margin-top: 14px; }
    .tt-preview-side { position: sticky; top: 0; align-self: start; }
    .tt-preview-side .tt-sub { margin-top: 0; }
    .tt-delete { margin-right: auto; color: var(--danger); }
    @media (max-width: 760px) {
      .tt-modal-layout { grid-template-columns: 1fr; }
      .tt-button-row { grid-template-columns: 1fr 1fr; }
      .tt-row { flex-direction: column; }
    }

    /* TX2: Admin › Images */
    .img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
    .img-card { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
    .img-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg); }
    .img-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .img-card .setup-help { margin: 0; font-size: 12px; }
    .img-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
    .img-rename { display: flex; gap: 6px; }
    .img-rename input { margin: 0; min-width: 0; flex: 1; }
    .img-ai-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
    .img-ai-card h2 { margin: 0 0 4px; font-size: 18px; }
    .img-ai-card .setup-help { margin: 0; max-width: 560px; }
    #office-settings-referral-mode .check-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }

    /* LS2: what a lead source counts as */
    .ls-kind { margin-top: 8px; max-width: 280px; }
    .ls-kind label { font-size: 12px; font-weight: 600; color: var(--muted, #6b6680); }
    .ls-kind select {
      width: 100%;
      height: 40px;
      padding: 0 10px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius-sm);
      background: #fff;
      font: inherit;
    }
    .ls-kind.is-unset select { border-color: #d9a400; }

/* SR1 rename or merge a lead source */
.ls-rename-btn { align-self: flex-start; margin-top: 6px; padding: 0; font-size: 13px; font-weight: 600; color: var(--violet, #4B2EDB); background: none; border: 0; cursor: pointer; }
.ls-rename-btn:hover { text-decoration: underline; }
.ls-alias { margin-top: 4px; }
.ls-rename-dialog { width: min(520px, calc(100vw - 32px)); }
.ls-rename-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.ls-rename-body > p { margin: 0; }
.ls-rename-body label { font-weight: 600; font-size: 13px; }
.ls-rename-body input[type="text"] { height: 40px; padding: 0 12px; border: 1px solid var(--border, #E4E1EE); border-radius: 10px; font: inherit; }
.ls-rename-preview { background: #F4F1FF; border: 1px solid #DCD3FF; border-radius: 12px; padding: 10px 12px; }
.ls-rename-preview p { margin: 0 0 6px; font-size: 14px; line-height: 1.4; }
.ls-rename-preview p:last-child { margin-bottom: 0; color: var(--muted, #5B5670); font-size: 13px; }
.ls-rename-preview.hidden { display: none; }

    /* TellUS › Offices (owner Nov 13): modules not built yet */
    .module-soon { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #EEEAFD; color: #4B2EDB; font-size: 12px; font-weight: 600; cursor: help; }
    th.module-col-soon { color: var(--muted); }
    .module-tile.is-soon { opacity: 0.6; }
    .toggle-row.is-soon .module-name::after { content: " · Coming soon"; color: #4B2EDB; font-weight: 600; }

    /* TX1: texts paused until the number's verification is finished (Conversations, lead text box, booking texts) */
    .texting-paused {
      margin: 8px 0 12px;
      padding: 10px 14px;
      border-radius: 10px;
      border: 1px solid var(--attention);
      background: var(--attention-bg);
      color: var(--attention);
      font-weight: 600;
      line-height: 1.4;
    }
    .page-band .texting-paused { margin: 10px 0 0; max-width: 720px; }
    .today-slim-warn.texting-paused-warn {
      border-color: var(--attention);
      background: var(--attention-bg);
      color: var(--attention);
      font-weight: 600;
    }

/* SD1 Choose dealer */
.sale-dealer-body { display: grid; gap: 10px; }
.sale-dealer-suggest { justify-self: start; }
.sale-dealer-remember { align-items: flex-start; }

    /* RO1: Lead Type per form (Admin › Lead sources) */
    .flt-actions { flex-wrap: wrap; }
    .flt-input { width: 220px; max-width: 100%; }
    .flt-type { font-weight: 600; }
    @media (max-width: 600px) {
      .flt-row { flex-direction: column; }
      .flt-actions { margin-left: 0; width: 100%; }
      .flt-input { flex: 1 1 160px; width: auto; }
    }

/* Office settings › Bookings: the way to Booking defaults (Dec 1 tidy-up) */
.office-booking-more { margin-top: 16px; padding-top: 12px; border-top: 1px solid #ECE9F5; }
.office-booking-more .field-hint { margin: 0 0 8px; }
/* css/country-readiness.css */
    /* CY1: country, data hosting and the Country readiness panel */

    .cr-flag {
      display: inline-flex;
      flex: none;
      border-radius: 3px;
      overflow: hidden;
      box-shadow: 0 0 0 1px rgba(27, 21, 48, 0.14);
      line-height: 0;
    }

    .cr-flag.is-region {
      box-shadow: none;
      border-radius: 50%;
      color: var(--accent);
    }

    .cr-badge {
      display: inline-flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .cr-badge-name {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
      color: var(--text);
    }

    .cr-badge-host {
      font-size: 12px;
      color: var(--muted);
    }

    .cr-badge.is-compact .cr-badge-name {
      gap: 6px;
      font-size: 13px;
      white-space: nowrap;
    }

    .cr-badge.is-compact .cr-badge-host {
      font-size: 11px;
      white-space: nowrap;
    }

    /* The office page picker */
    .cr-picker-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .cr-picker-row select {
      flex: 1 1 auto;
      min-width: 0;
    }

    .cr-picker-flag {
      display: inline-flex;
      flex: none;
    }

    .cr-host-line {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--soft);
      color: var(--accent);
      font-size: 12px;
      font-weight: 600;
    }

    .cr-host-line::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--ok);
    }

    /* The panel */
    .cr-section {
      margin-top: 20px;
    }

    .cr-section-head {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      justify-content: space-between;
      gap: 8px 16px;
      padding: 18px 20px 4px;
    }

    .cr-section-head h2 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 700;
      letter-spacing: -0.01em;
      color: var(--text);
    }

    .cr-section-head p {
      margin: 4px 0 0;
      font-size: 13px;
      color: var(--muted);
    }

    .cr-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .cr-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 12px;
      padding: 14px 20px 20px;
    }

    .cr-card {
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
      padding: 16px 16px 14px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }

    .cr-card::before {
      content: "";
      position: absolute;
      inset: 0 0 auto 0;
      height: 3px;
      background: var(--border-strong);
    }

    .cr-card.is-live::before { background: var(--ok); }
    .cr-card.is-preparing::before { background: var(--accent); }

    .cr-card.is-live {
      border-color: #CDEBDA;
      background: linear-gradient(180deg, #F5FBF7 0%, var(--surface) 70%);
    }

    .cr-card.is-preparing {
      border-color: var(--border-strong);
      background: linear-gradient(180deg, #F7F5FE 0%, var(--surface) 70%);
    }

    .cr-card-head {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .cr-card-head h3 {
      margin: 0;
      flex: 1 1 auto;
      min-width: 0;
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 700;
      color: var(--text);
    }

    .cr-status {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 3px 9px;
      border-radius: 999px;
      font-size: 11.5px;
      font-weight: 700;
      white-space: nowrap;
    }

    .cr-status::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
    }

    .cr-status.is-live { background: var(--ok-bg); color: var(--ok); }
    .cr-status.is-preparing { background: var(--soft); color: var(--accent); }
    .cr-status.is-planned { background: #F1EFF6; color: var(--muted); }

    .cr-card-meta {
      margin: -2px 0 0;
      font-size: 12.5px;
      color: var(--muted);
    }

    .cr-progress {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .cr-progress-bar {
      flex: 1 1 auto;
      height: 6px;
      border-radius: 999px;
      background: #EEEBF6;
      overflow: hidden;
    }

    .cr-progress-bar span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: var(--accent);
    }

    .cr-card.is-live .cr-progress-bar span { background: var(--ok); }

    .cr-progress-count {
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
    }

    .cr-checks {
      list-style: none;
      margin: 2px 0 0;
      padding: 0;
      display: grid;
      gap: 7px;
    }

    .cr-checks li {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      font-size: 13px;
      color: var(--text);
    }

    .cr-mark {
      flex: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      margin-top: 1px;
      border-radius: 50%;
      border: 1.5px solid var(--border-strong);
      background: var(--surface);
    }

    .cr-checks li.is-done .cr-mark {
      border-color: var(--ok);
      background: var(--ok);
      color: #FFFFFF;
    }

    .cr-card.is-preparing .cr-checks li.is-todo .cr-mark {
      border-style: dashed;
      border-color: #B9AEEF;
    }

    .cr-checks li.is-todo { color: var(--muted); }

    .cr-check-text {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .cr-check-text small {
      font-size: 11.5px;
      color: var(--muted);
      overflow-wrap: anywhere;
    }

    .cr-checks .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
    }

    @media (max-width: 640px) {
      .cr-grid { padding: 12px 14px 16px; grid-template-columns: 1fr; }
      .cr-section-head { padding: 16px 14px 2px; }
    }
/* css/riders.css */
    #riders-view .band-card .leads-pager,
    #riders-view #riders-pager {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 16px;
      margin-top: 0;
      font-size: 13px;
      color: var(--muted);
    }

    #riders-view .rider-name {
      font-weight: 500;
    }

    #riders-view .rider-phone {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--muted);
    }

/* RP2 (Nov 17): Riders › Progress as cards (js/rider-office.js) */
.rprog-list { padding: 16px; }
.rprog-list.hidden { display: none; }
.rprog-summary { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.rprog-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rprog-empty { color: var(--muted); font-size: 14px; margin: 4px 0; }
.rprog-card {
  background: #FFFFFF;
  border: 1px solid #E6E2F0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.rprog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rprog-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rprog-name { font-family: var(--font-display); font-size: 17px; color: #1B1530; }
.rprog-sub { font-size: 12px; color: var(--muted); }
.rprog-track {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: #3920B0;
  background: #F1EDFF;
  border-radius: 999px;
  padding: 3px 10px;
}
.rprog-track.is-none { color: #7A5300; background: #FFF4D6; }
.rprog-next-box { background: #F6F4FB; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rprog-next-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rprog-next-label { font-size: 14px; font-weight: 700; color: #1B1530; }
.rprog-days { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rprog-days.is-soon { color: #B45309; font-weight: 700; }
.rprog-need { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: 10px; font-size: 13px; }
.rprog-need.is-done { color: #2E7D4F; font-weight: 600; }
.rprog-bar { display: block; height: 6px; background: #E0DCEB; border-radius: 3px; overflow: hidden; }
.rprog-bar > span { display: block; height: 100%; background: #4B2EDB; }
.rprog-need.is-done .rprog-bar > span { background: #2E7D4F; }
.rprog-split { margin: 0; font-size: 13px; color: #3D3657; }
.rprog-split .is-replace { color: #B45309; }
.rprog-sees { color: var(--muted); }
.rprog-won { display: flex; flex-wrap: wrap; gap: 6px; }
/* RK1: the Rider's demos and the office's "Count this show anyway" */
.rprog-shows { border-top: 1px solid #ECE9F5; padding-top: 8px; }
.rprog-shows > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #4B2EDB; min-height: 32px; display: flex; align-items: center; }
.rprog-shows-list { display: grid; gap: 6px; margin-top: 6px; }
.rprog-show { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: #1B1530; }
.rprog-show-name { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.rprog-show-state { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #F4F2FA; color: #3D3657; }
.rprog-show-state.is-ok { background: #E7F5EC; color: #1F6B40; }
.rprog-show-state.is-no { background: #FDF1E4; color: #9A4A07; }
.rprog-show-state.is-anyway { background: #F1EDFF; color: #3920B0; }
.rprog-chip { font-size: 12px; font-weight: 600; color: #2E6B47; background: #E7F3EC; border-radius: 999px; padding: 3px 10px; }
.rprog-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid #F0EDF6; padding-top: 10px; }
.rprog-track-sel { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid #CFC9E0; border-radius: 8px; background: #fff; }

/* RP2: Admin › Rider programmes: versions as cards (js/rider-programmes.js) */
.rpb-programme { margin-top: 14px; }
.rpb-programme-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.rpb-programme-head h3 { margin: 0; font-family: var(--font-display); font-size: 18px; }
.rpb-version { border: 1px solid #E6E2F0; border-radius: 14px; padding: 14px 16px; margin-top: 10px; background: #FFFFFF; }
.rpb-version.is-live { border: 2px solid #4B2EDB; }
.rpb-version.is-editing { background: #FBFAFE; }
.rpb-version-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rpb-version-head b { font-family: var(--font-display); font-size: 16px; }
.rpb-status { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: #F4F2F8; color: #5E5878; }
.rpb-status.is-live { background: #4B2EDB; color: #fff; }
.rpb-status.is-draft, .rpb-status.is-approved { background: #FFF4D6; color: #7A5300; }
.rpb-from { font-size: 12px; color: var(--muted); }
.rpb-group { margin: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5E5878; }
.rpb-tiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.rpb-tile { border: 1px solid #E6E2F0; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.rpb-tile.is-gift { border-left: 4px solid #2E7D4F; }
.rpb-tile.is-cash { border-left: 4px solid #4B2EDB; }
.rpb-tile.is-bonus { border-left: 4px solid #B45309; }
.rpb-tile-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rpb-kind { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rpb-tile-need, .rpb-tile-prize, .rpb-tile-note { margin: 0; font-size: 13px; }
.rpb-tile-prize { font-weight: 600; }
.rpb-tile-note { color: var(--muted); font-size: 12px; }
.rpb-retired { margin-top: 10px; }
.rpb-retired summary, .rpb-rules-view summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #4B2EDB; }
.rpb-rules-view { margin-top: 10px; }
.rpb-rules { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 760px) { .rpb-rules { grid-template-columns: 1fr 1fr; } }
.rpb-rules-text { white-space: pre-line; margin: 0; font-size: 13px; line-height: 1.5; background: #F6F4FB; border-radius: 10px; padding: 10px 12px; }
.rpb-rules textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 8px; border: 1px solid #CFC9E0; border-radius: 8px; }

.rpb-edit-sec { margin-top: 16px; }
.rpb-edit-sec h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 15px; }
.rpb-edit-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.rpb-edit-card { border: 1px solid #E6E2F0; border-radius: 12px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.rpb-edit-card.rpb-level { border-left: 4px solid #2E7D4F; }
.rpb-edit-card.rpb-level.is-cash { border-left-color: #4B2EDB; }
.rpb-edit-card.rpb-level.is-bonus { border-left-color: #B45309; }
.rpb-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: #5E5878; min-width: 0; }
.rpb-field[hidden] { display: none !important; }
.rpb-field input, .rpb-field select, .rpb-need input, .rpb-need select {
  font: inherit; font-size: 14px; font-weight: 400; color: #1B1530;
  padding: 7px 9px; border: 1px solid #CFC9E0; border-radius: 8px; background: #fff; width: 100%; box-sizing: border-box;
}
.rpb-two, .rpb-three { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .rpb-two { grid-template-columns: 1fr 1fr; } .rpb-three { grid-template-columns: 1fr 1fr 1fr; } }
.rpb-days { max-width: 220px; }
.rpb-needs { display: flex; flex-direction: column; gap: 6px; }
.rpb-needs[hidden], .rpb-need[hidden] { display: none !important; }
.rpb-need { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.rpb-need input { width: 80px; }
.rpb-need select { width: auto; flex: 1 1 200px; }
.rpb-need-and { font-size: 12px; font-weight: 700; color: #5E5878; min-width: 56px; }
.rpb-prizes { display: flex; flex-direction: column; gap: 6px; }
.rpb-prize { display: grid; gap: 8px; grid-template-columns: 1fr; align-items: end; background: #F6F4FB; border-radius: 10px; padding: 8px; }
@media (min-width: 760px) { .rpb-prize { grid-template-columns: 150px 2fr 1fr 1fr auto; } }
.rpb-level-acts { display: flex; gap: 8px; justify-content: flex-end; }
.rpb-qualify-own { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }

/* Rider spots (unchanged look, moved here from rider-page.css) */
.rpb-spots-grid { display: grid; gap: 8px; margin-top: 8px; }
.rpb-spot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.rpb-spot .muted { font-size: 13px; }
.rpb-dealers { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.rpb-dealers label { font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.rpb-edit-card [hidden], .rpb-version [hidden], .rprog-card [hidden] { display: none !important; }

/* RS1: Admin > Rider programmes: questions for friends, script and tips (js/rider-programmes.js rpfFriendsCard) */
.rpf-h4 { margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: #1B1530; }
.rpf-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.rpf-q { border: 1px solid #E6E2F0; border-radius: 12px; padding: 10px; background: #FFFFFF; display: flex; flex-direction: column; gap: 8px; }
.rpf-q-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 0.8fr) auto auto; gap: 8px; align-items: center; }
.rpf-q-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rpf-q-choices[hidden] { display: none; }
.rpf-q input[type="text"], .rpf-q select { width: 100%; min-width: 0; margin: 0; }
.rpf-req { display: flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; margin: 0; }
.rpf-script { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rpf-script textarea { width: 100%; }
@media (max-width: 720px) {
  .rpf-q-top { grid-template-columns: 1fr 1fr; }
  .rpf-q-top input[type="text"] { grid-column: 1 / -1; }
  .rpf-q-choices, .rpf-script { grid-template-columns: 1fr; }
}

/* RPL1 (Nov 27): TellUS › Offices › office: Rider pages live + onboarding checklist */
.rpl-list-title { margin: 14px 0 6px; font-weight: 600; color: #1B1530; }
.rpl-list { list-style: none; margin: 0 0 14px; padding: 0; }
.rpl-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 6px 0; border-top: 1px solid #ECE9F5; }
.rpl-item:first-child { border-top: 0; }
.rpl-check { display: inline; cursor: pointer; font-weight: 400; margin: 0; }
.rpl-check input { accent-color: #4B2EDB; margin-right: 4px; }
.rpl-when { font-size: 13px; }
.rpl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#rider-link-btn.is-muted { opacity: 0.7; }

/* RR2 (Nov 30): reward requests (js/rider-requests.js) */
.rrq-status { flex: none; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #F4F2FA; color: #3D3657; white-space: nowrap; }
.rrq-status.is-new { background: #FFF4D6; color: #7A5300; }
.rrq-status.is-ok { background: #F1EDFF; color: #3920B0; }
.rrq-status.is-done { background: #E7F3EC; color: #2E6B47; }
.rrq-status.is-no { background: #FDECEC; color: #A12C2C; }
.rrq-status.is-reached { background: #EEEAFD; color: #4B2EDB; }
.rrq-section { margin-bottom: 18px; }
.rrq-section-title { font-family: var(--font-display); font-size: 16px; color: #1B1530; margin: 0 0 8px; }
.rrq-list { display: grid; gap: 8px; }
.rrq-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid #E6E2F0; border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; min-height: 44px; }
.rrq-row:hover { border-color: #4B2EDB; }
.rrq-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rrq-row-name { font-size: 15px; color: #1B1530; }
.rrq-row-level { font-size: 14px; color: #3D3657; overflow-wrap: anywhere; }
.rrq-row-sub { font-size: 12px; color: var(--muted); }
.rrq-card { max-width: 760px; }
.rrq-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rrq-card-head h2 { margin: 0; overflow-wrap: anywhere; }
.rrq-card-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.rrq-msg, .rrq-note { margin: 8px 0 0; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #F6F4FB; color: #1B1530; }
.rrq-h { font-family: var(--font-display); font-size: 15px; margin: 16px 0 8px; color: #1B1530; }
.rrq-checklist { display: grid; gap: 10px; }
.rrq-item { border: 1px solid #ECE9F5; border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.rrq-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rrq-item-title { font-size: 14px; color: #1B1530; }
.rrq-state { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rrq-state.is-ok { background: #E7F5EC; color: #1F6B40; }
.rrq-state.is-problem { background: #FDECEC; color: #A12C2C; }
.rrq-state.is-na { background: #F4F2FA; color: #3D3657; }
.rrq-item-note { margin: 0; font-size: 13px; color: #3D3657; }
.rrq-evidence { display: grid; gap: 4px; }
.rrq-ev { margin: 0; font-size: 13px; color: #3D3657; overflow-wrap: anywhere; }
.rrq-ev.is-row { padding-left: 8px; }
.rrq-ev.is-muted { color: var(--muted); }
.rrq-ev.is-warn { color: #9A4A07; }
.rrq-ev-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; padding: 4px 0; border-top: 1px dashed #ECE9F5; }
.rrq-ev-name { flex: 1 1 180px; min-width: 0; color: #1B1530; overflow-wrap: anywhere; }
.rrq-ev-tag { font-size: 12px; color: var(--muted); }
.rrq-ev-tag.is-warn { color: #9A4A07; font-weight: 600; }
.rrq-ev-reason { font-size: 12px; color: #3920B0; overflow-wrap: anywhere; }
.rrq-approval-sel, .rrq-check-note { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid #CFC9E0; border-radius: 8px; background: #fff; }
.rrq-check { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rrq-check-note { flex: 1 1 180px; min-width: 0; }
.rrq-check-btn.is-on { background: #4B2EDB; color: #fff; border-color: #4B2EDB; }
.rrq-decide { border-top: 1px solid #ECE9F5; margin-top: 14px; padding-top: 4px; display: grid; gap: 10px; }
.rrq-field { display: grid; gap: 4px; font-size: 13px; }
.rrq-field-label { font-weight: 600; color: #1B1530; }
.rrq-field textarea, .rrq-field input, .rrq-field select { font: inherit; padding: 8px 10px; border: 1px solid #CFC9E0; border-radius: 8px; width: 100%; box-sizing: border-box; }
.rrq-picks { border: 1px solid #ECE9F5; border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rrq-picks legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.rrq-decide-acts { flex-wrap: wrap; }
.rrq-history { margin-top: 12px; font-size: 13px; }
.rrq-history > summary { cursor: pointer; color: #4B2EDB; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.rrq-history-line { margin: 4px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rrq-prog { display: grid; gap: 6px; }
.rrq-prog-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.rrq-prog-name { flex: 1 1 140px; min-width: 0; color: #1B1530; overflow-wrap: anywhere; }
.sale-approval-row { display: flex; gap: 8px; align-items: center; }
.sale-approval-row input { width: 90px; }
.rpb-tile-counts { color: #3920B0; }
.rrq-ev-row select.rrq-approval-sel { width: auto; flex: none; }

/* RLT1: Text link confirm box and the TellUS switches */
.rlt-modal { max-width: 560px; }
.rlt-label { display: block; font-size: 12px; font-weight: 600; color: #6b6585; margin-bottom: 4px; }
.rlt-bubble { margin: 0; padding: 10px 12px; border-radius: 12px; background: #f1eeff; color: #1B1530; white-space: pre-wrap; word-break: break-word; }
.rlt-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0; }
.rlt-facts dt { font-weight: 600; color: #6b6585; }
.rlt-facts dd { margin: 0; }
.rlt-rules { padding: 8px 12px; border-radius: 10px; }
.rlt-rules p { margin: 0 0 4px; }
.rlt-rules ul { margin: 0; padding-left: 18px; }
.rlt-rules.is-ok { background: #e9f8ef; color: #17633a; }
.rlt-rules.is-no { background: #fff3e6; color: #8a4b00; }
.rlt-switches { margin-top: 14px; padding-top: 12px; border-top: 1px solid #ece9f5; display: grid; gap: 6px; }
.rlt-last { color: #6b6585; }
.rlt-modal .rlt-body { display: grid; gap: 10px; margin: 0; padding: 0; position: static; }
.rlt-modal .rlt-body > * { margin: 0; }

/* RRP1 Riders report */
.rrp-head h2 { margin: 0 0 4px; }
.rrp-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.rrp-tile { background: #fff; border: 1px solid #ece9f5; border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; }
.rrp-tile-label { font-size: 12px; color: #6b6585; display: flex; align-items: center; gap: 4px; }
.rrp-tile-num { font-family: "Bricolage Grotesque", sans-serif; font-size: 24px; color: #1B1530; }
.rrp-owed, .rrp-prog { background: #fff; border: 1px solid #ece9f5; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; overflow-x: auto; }
.rrp-owed h3, .rrp-prog h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.rrp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rrp-table th, .rrp-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #f1eff7; vertical-align: top; }
.rrp-table th { font-size: 12px; color: #6b6585; font-weight: 600; white-space: nowrap; }
.rrp-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rrp-total td { font-weight: 700; border-top: 2px solid #ece9f5; }

/* CB1: what Paid waits for */
.rrq-paywait { background: #FFF8EC; border: 1px solid #F1DDB4; border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.rrq-paywait-title { margin: 0; font-weight: 700; color: #1B1530; }
.rrq-paywait-line { margin: 0; font-size: 14px; color: #1B1530; overflow-wrap: anywhere; }
/* RC1: the levels in one cash request */
.rrq-cashparts { background: #F6F4FC; border: 1px solid #E6E2F0; border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; margin: 8px 0; }
.rrq-cashpart { margin: 0; font-size: 14px; color: #1B1530; }
.rrq-cashtotal { font-weight: 700; }

/* RG1: the gifts a Rider chose, with photos, on the office's request card */
.rrq-gifts { margin: 12px 0; }
.rrq-gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.rrq-gift { margin: 0; border: 1px solid #E4E1EE; border-radius: 12px; background: #fff; overflow: hidden; text-align: center; }
.rrq-gift img, .rrq-gift-blank { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #F4F2FA; }
.rrq-gift-blank { display: flex; align-items: center; justify-content: center; font: 600 28px "Bricolage Grotesque", sans-serif; color: #4B2EDB; }
.rrq-gift figcaption { padding: 6px 8px; font-size: 13px; color: #1B1530; }

/* RG1: gift photos in the programme builder */
.rpb-photos { margin-top: 18px; border-top: 1px solid #E6E2F0; padding-top: 14px; }
.rpb-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.rpb-photo { border: 1px solid #E6E2F0; border-radius: 12px; padding: 8px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.rpb-photo-pic { aspect-ratio: 1 / 1; border-radius: 8px; background: #F1EDFF; color: #4B2EDB; display: flex; align-items: center; justify-content: center; font: 700 28px "Bricolage Grotesque", sans-serif; overflow: hidden; }
.rpb-photo-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rpb-photo-name { margin: 0; font-size: 13px; font-weight: 600; color: #1B1530; }
.rpb-photo-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* VF1: Riders › Verify (js/rider-verify.js) */
.rv-wrap { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .rv-wrap { grid-template-columns: 1fr; } }
.rv-queue, .rv-detail { background: #fff; border: 1px solid #E6E2F0; border-radius: 14px; padding: 14px; min-width: 0; }
.rv-h { margin: 0 0 8px; font-family: "Bricolage Grotesque", sans-serif; font-size: 17px; color: #1B1530; }
.rv-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rv-queue-list { display: grid; gap: 6px; }
.rv-queue-row { border-radius: 10px; }
.rv-queue-btn { width: 100%; text-align: left; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid #ECE9F5; border-radius: 10px; background: #FBFAFE; cursor: pointer; font: inherit; color: #1B1530; min-height: 44px; }
.rv-queue-btn:hover { border-color: #CFC6F5; }
.rv-queue-row.is-active .rv-queue-btn { border-color: #4B2EDB; background: #F1EDFF; }
.rv-queue-name { font-weight: 700; overflow-wrap: anywhere; }
.rv-queue-why { display: flex; flex-wrap: wrap; gap: 4px; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-chip { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #F4F2FA; color: #3D3657; white-space: nowrap; }
.rv-chip.is-violet { background: #F1EDFF; color: #3920B0; }
.rv-chip.is-ok { background: #E7F3EC; color: #2E6B47; }
.rv-chip.is-warn { background: #FFF4D6; color: #7A5300; }
.rv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; border-bottom: 1px solid #F0EDF6; padding-bottom: 12px; margin-bottom: 12px; }
.rv-name { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; color: #1B1530; }
.rv-sub { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.rv-head-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv-sec { margin-top: 16px; }
.rv-h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #1B1530; }
.rv-levels { display: grid; gap: 8px; }
.rv-level { border: 1px solid #ECE9F5; border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
.rv-level-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; font-weight: 600; }
.rv-state { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #F4F2FA; color: #3D3657; white-space: nowrap; }
.rv-state.is-ok { background: #E7F5EC; color: #1F6B40; }
.rv-state.is-warn { background: #FFF4D6; color: #7A5300; }
.rv-state.is-no { background: #FDF1E4; color: #9A4A07; }
.rv-state.is-muted { background: #F4F2FA; color: #6B6585; }
.rv-need { margin: 0; font-size: 13px; color: #3D3657; }
.rv-items { display: grid; gap: 8px; }
.rv-item { border: 1px solid #ECE9F5; border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.rv-item-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; }
.rv-item-when { font-size: 12px; color: var(--muted); }
.rv-facts { margin: 0; font-size: 13px; color: #3D3657; overflow-wrap: anywhere; }
.rv-item-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv-decided { font-size: 13px; color: #3D3657; }
.rv-look { font-size: 13px; color: #7A5300; background: #FFF8E6; border-radius: 8px; padding: 6px 10px; }
.rv-history { margin: 0; padding-left: 18px; font-size: 13px; color: #3D3657; display: grid; gap: 4px; }
.rrq-verify-line { margin: 0 0 8px; }
.rv-queue-list, .rv-levels, .rv-items { list-style: none; margin: 0; padding: 0; }

/* RP2 Riders › Progress redesign (js/rider-progress.js): chips, short rows, detail panel, ⋯ menu */
.rprog-list.rpg { padding: 16px; }
.rpg-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.rpg-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1.5px solid #D9D4EE; background: #fff; color: #1B1530; font: 700 13px var(--font-body, Figtree, sans-serif); white-space: nowrap; cursor: pointer; }
.rpg-chip b { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #ECE8FA; color: #4B2EDB; font-size: 12px; }
.rpg-chip.is-on { background: #4B2EDB; border-color: #4B2EDB; color: #fff; }
.rpg-chip.is-on b { background: #fff; color: #4B2EDB; }
.rpg-chip.is-alert:not(.is-on) b { background: #FDE7E4; color: #B3261E; }
.rpg-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.rpg-list, .rpg-detail { background: #fff; border-radius: 18px; border: 1px solid #ECE9F5; min-width: 0; }
.rpg-detail { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.rpg-sort { margin: 0; padding: 10px 14px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rpg-pick { padding: 18px; }
.rpg-row { display: flex; align-items: center; gap: 4px; border-top: 1px solid #EFECF7; padding-right: 8px; }
.rpg-row:first-of-type { border-top: 0; }
.rpg-row.is-open { background: #F4F1FF; box-shadow: inset 3px 0 0 #4B2EDB; }
.rpg-row-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 6px 12px 14px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.rpg-av { width: 40px; height: 40px; border-radius: 20px; background: #4B2EDB; color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.rpg-mid { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rpg-name { font-weight: 800; font-size: 15px; color: #1B1530; }
.rpg-meta { font-size: 13px; color: #5E5873; }
.rpg-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 10px; background: #ECE8FA; color: #4B2EDB; margin-right: 6px; vertical-align: 1px; }
.rpg-goal { font-size: 13px; color: #1B1530; margin-top: 3px; overflow-wrap: anywhere; }
.rpg-bar { display: block; height: 6px; border-radius: 3px; background: #ECE8FA; max-width: 260px; overflow: hidden; margin-top: 3px; }
.rpg-bar > i { display: block; height: 100%; background: #4B2EDB; border-radius: 3px; }
.rpg-flag, .rpg-st { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 13px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.f-red { background: #FDE7E4; color: #B3261E; }
.f-amber { background: #FFF1D6; color: #8A5A00; }
.f-violet { background: #ECE8FA; color: #4B2EDB; }
.f-grey { background: #F0EEF5; color: #5E5873; }
.f-green { background: #E3F4EC; color: #1E7A4E; }
.rpg-dots { flex: none; width: 40px; height: 40px; border-radius: 20px; border: 0; background: transparent; font-size: 20px; line-height: 1; color: #5E5873; cursor: pointer; }
.rpg-dots:hover, .rpg-dots.is-on { background: #ECE8FA; color: #4B2EDB; }
.rpg-det-head { padding: 18px 20px 14px; border-bottom: 1px solid #EFECF7; }
.rpg-back { display: none; border: 0; background: none; color: #4B2EDB; font-weight: 700; font-size: 14px; padding: 0 0 8px; cursor: pointer; }
.rpg-det-sub { margin: 0; font-size: 13px; color: #5E5873; }
.rpg-det-name { margin: 4px 0 2px; font-family: var(--font-display); font-size: 22px; color: #1B1530; }
.rpg-det-next { margin: 8px 0 0; font-size: 14px; color: #1B1530; }
.rpg-det-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.rpg-sect { padding: 14px 20px; border-bottom: 1px solid #EFECF7; }
.rpg-sect h4 { margin: 0 0 8px; font: 800 12px var(--font-body, Figtree, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: #5E5873; }
.rpg-sect .rprog-shows { border-top: 0; padding-top: 0; }
.rpg-lvl { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid #F3F1F8; }
.rpg-lvl:first-of-type { border-top: 0; }
.rpg-num { width: 28px; height: 28px; border-radius: 14px; background: #ECE8FA; color: #4B2EDB; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rpg-num.is-done { background: #4B2EDB; color: #fff; }
.rpg-lvl-mid { min-width: 0; }
.rpg-lvl-t { font-weight: 700; font-size: 14px; color: #1B1530; overflow-wrap: anywhere; }
.rpg-lvl-s { font-size: 13px; color: #5E5873; margin-top: 2px; }
.rpg-lvl-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rpg-lnk { border: 0; background: none; color: #4B2EDB; font-weight: 700; font-size: 13px; padding: 4px 0; cursor: pointer; min-height: 32px; }
.rpg-note { font-size: 13px; color: #8A5A00; background: #FFF8E8; border-radius: 10px; padding: 6px 10px; margin-top: 6px; }
.rpg-note.is-plain { color: #3D3657; background: #F6F4FB; }
.rpg-hist > summary { cursor: pointer; font: 800 12px var(--font-body, Figtree, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: #5E5873; min-height: 32px; display: flex; align-items: center; }
.rpg-hist-line { margin: 4px 0; font-size: 13px; color: #4A4462; }
.rpg-hist-line b { color: #1B1530; font-weight: 700; }
.rpg-menu { position: fixed; z-index: 50; width: 260px; background: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(27, 21, 48, .22); padding: 6px; }
.rpg-menu.is-sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 20px 20px 0 0; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
.rpg-menu-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 44px; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; font: 600 14px var(--font-body, Figtree, sans-serif); color: #1B1530; cursor: pointer; }
.rpg-menu-item:hover { background: #F4F1FF; }
.rpg-menu-item small { color: #5E5873; font-weight: 600; }
.rpg-menu-sep { height: 1px; background: #EFECF7; margin: 4px 6px; }
.rpg-dialog { max-width: 460px; }
.rpg-dialog .rpg-select, .rpg-dialog input, .rpg-dialog textarea { width: 100%; font: inherit; margin: 6px 0 10px; }
.rpg-dialog-sub { font-weight: 700; margin: 8px 0 0; }
.rpg-dialog-list { margin: 6px 0 12px; padding-left: 18px; font-size: 14px; line-height: 1.5; }
@media (max-width: 767px) {
  .rprog-list.rpg { padding: 12px 0; }
  .rpg-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .rpg-wrap { grid-template-columns: 1fr; }
  .rpg-wrap .rpg-detail { display: none; position: static; max-height: none; }
  .rpg-wrap.has-open .rpg-list { display: none; }
  .rpg-wrap.has-open .rpg-detail { display: block; }
  .rpg-back { display: inline-block; }
  .rpg-row-main { grid-template-columns: 36px minmax(0, 1fr); padding: 11px 4px 11px 12px; gap: 10px; }
  .rpg-row-main .rpg-flag { grid-column: 2; justify-self: start; }
  .rpg-av { width: 36px; height: 36px; }
  .rpg-det-head, .rpg-sect { padding-left: 14px; padding-right: 14px; }
  .rpg-lvl { grid-template-columns: 28px minmax(0, 1fr); }
  .rpg-lvl-right { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .rpg-st, .rpg-lvl-right .rrq-status { white-space: normal; }
}
.rpg-det-head .rpg-back { color: #4B2EDB; }
/* css/rider-booking-setup.css */
/* BS1 (Nov 18): Admin › How customers and Riders book (js/rider-booking-setup.js), to docs/designs/riders/Settings.dc.html */
.rbs-page { margin: 0; padding: 0; min-height: 100vh; background: #F6F4FB; color: #1B1530; font-family: Figtree, sans-serif; }
.rbs-band { background: #1B1530; color: #FFFFFF; padding: 28px 24px; }
.rbs-band-in { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.rbs-back { margin: 0 0 2px; font-size: 13px; }
.rbs-back .link-btn { color: #CFC6F7; padding: 0; background: none; border: 0; font: inherit; cursor: pointer; }
.rbs-back .link-btn:hover { color: #FFFFFF; }
.rbs-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #CFC6F7; }
.rbs-band h1 { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: 30px; font-weight: 700; line-height: 1.15; color: #FFFFFF; }
.rbs-band-sub { margin: 0; font-size: 15px; color: #D8D3EA; line-height: 1.45; }
.rbs-wrap { max-width: 1160px; margin: 0 auto; padding: 24px; box-sizing: content-box; }
.rbs-status { margin: 0 0 12px; font-size: 14px; color: #5E5878; }
.rbs-status[hidden] { display: none; }
.rbs-body { display: flex; flex-direction: column; gap: 20px; }

.rbs-card { background: #FFFFFF; border: 1px solid #E6E2F0; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; box-sizing: border-box; }
.rbs-card h2 { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 700; color: #1B1530; }
.rbs-card h3 { margin: 4px 0 0; font-size: 15px; font-weight: 700; color: #1B1530; }
.rbs-card-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.rbs-aside, .rbs-help { font-size: 13px; color: #5E5878; }
.rbs-help { margin: 0; line-height: 1.5; }
.rbs-help.is-error, .rbs-msg.is-error { color: #B42318; }
.rbs-msg { margin: 0; font-size: 13px; color: #1B6B4A; }
.rbs-msg[hidden] { display: none; }
.rbs-warn { margin: 0; font-size: 13px; color: #8A4B00; background: #FFF6E5; border: 1px solid #F3DDB3; border-radius: 10px; padding: 10px 12px; }
.rbs-small { font-size: 12px; color: #5E5878; }
.rbs-page select,
.rbs-page input[type="time"],
.rbs-page input[type="date"],
.rbs-page input[type="number"] {
  font-family: Figtree, sans-serif; font-size: 14px; height: 40px; min-height: 0; border: 1px solid #CFC9E0; border-radius: 10px;
  padding: 0 10px; background: #FFFFFF; color: #1B1530; box-sizing: border-box; margin: 0;
}
.rbs-page select { width: 100%; }
.rbs-page select:disabled { color: #5E5878; background: #F6F4FB; }
.rbs-page input[type="number"] { width: 72px; }
.rbs-page input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: #4B2EDB; }
.rbs-page .btn-primary, .rbs-page .btn-ghost { min-height: 40px; border-radius: 10px; }
.rbs-page .rbs-danger { color: #B42318; }

/* Booking by channel */
.rbs-chan-table { display: flex; flex-direction: column; }
.rbs-chan-grid { display: grid; grid-template-columns: 2.2fr 1.6fr 1.6fr 1.6fr; gap: 14px; align-items: center; }
.rbs-chan-th { padding: 0 0 10px; border-bottom: 1px solid #E6E2F0; font-size: 12px; font-weight: 700; color: #5E5878; text-transform: uppercase; letter-spacing: 0.03em; }
.rbs-chan-row { padding: 14px 0; border-bottom: 1px solid #F0EDF6; }
.rbs-chan-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rbs-chan-name { font-size: 15px; font-weight: 700; }
.rbs-chan-desc { font-size: 13px; color: #5E5878; }
.rbs-chan-row.is-later .rbs-chan-name { color: #5E5878; }
.rbs-later { grid-column: 2 / span 3; height: 40px; display: flex; align-items: center; padding: 0 12px; border: 1px dashed #D3CEE2; border-radius: 10px; background: #F6F4FB; color: #8A84A0; font-size: 14px; font-weight: 600; }
.rbs-rider { background: #F4FBF8; border: 1px solid #CDE8DC; border-radius: 12px; padding: 14px 16px; }
.rbs-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rbs-cell-label { display: none; font-size: 12px; font-weight: 700; color: #5E5878; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.rbs-fixed { font-size: 14px; color: #3D3657; }
.rbs-ticks { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.rbs-tick { display: inline-flex; gap: 10px; align-items: center; font-size: 14px; color: #1B1530; font-weight: 400; margin: 0; }
.rbs-tick.is-later { color: #5E5878; }
.rbs-lock { display: flex; gap: 10px; align-items: center; color: #5E5878; }
.rbs-lock-icon { font-size: 15px; }
.rbs-foot { margin: 0; font-size: 13px; color: #5E5878; line-height: 1.5; }

/* Usual week and rules */
.rbs-row { display: flex; flex-wrap: wrap; gap: 20px; }
.rbs-week-card { flex: 999 1 560px; }
.rbs-rules-card { flex: 1 1 300px; }
.rbs-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.rbs-day { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rbs-day-name { font-size: 12px; font-weight: 700; color: #5E5878; }
.rbs-day-spots { display: flex; flex-direction: column; gap: 6px; }
.rbs-spot { background: #F1EDFF; color: #3920B0; border: 1px solid transparent; border-radius: 8px; padding: 6px; font: 600 12px/1.3 Figtree, sans-serif; text-align: left; cursor: pointer; min-height: 0; }
.rbs-spot:hover { border-color: #B9ACF5; }
.rbs-spot:disabled { cursor: default; border-color: transparent; }
.rbs-spot.is-on { background: #4B2EDB; color: #FFFFFF; }
.rbs-spot.is-off { background: #EEEBF5; color: #8A84A0; text-decoration: line-through; }
.rbs-spot-add { background: none; border: 1px dashed #CFC9E0; border-radius: 8px; padding: 5px 6px; font: 600 12px/1.3 Figtree, sans-serif; color: #4B2EDB; cursor: pointer; text-align: left; min-height: 0; }
.rbs-spot-add.is-on { border-color: #4B2EDB; background: #F1EDFF; }
.rbs-editor { border-top: 1px solid #F0EDF6; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.rbs-editor-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rbs-copy { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: #F6F4FB; border-radius: 10px; padding: 10px 12px; }
.rbs-rules { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.rbs-rule { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rbs-rule select { width: auto; min-width: 120px; height: 36px; font-weight: 700; }
.rbs-rule strong { white-space: nowrap; }
.rbs-pick input[type="date"] { width: auto; }

/* Office hours */
.rbs-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 8px 32px; }
.rbs-hours-row input[type="time"] { width: 100%; min-width: 0; }
.rbs-hours-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.rbs-hours-row.is-closed input[type="time"] { opacity: 0.45; }
.rbs-hours-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid #F0EDF6; padding-top: 14px; }
.rbs-step { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 0; }
.rbs-step select { width: auto; }

/* Close a day */
.rbs-pick { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rbs-pick-label { font-size: 15px; font-weight: 700; }
.rbs-dayview { display: flex; flex-direction: column; gap: 8px; }
.rbs-dayhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: #3D3657; }
.rbs-slot { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #E6E2F0; border-radius: 12px; font-size: 14px; }
.rbs-slot.is-full { border-color: #F3C5C0; background: #FFF7F6; }
.rbs-slot.is-closed { background: #F6F4FB; color: #8A84A0; border-style: dashed; }
.rbs-slot-what { color: #3D3657; }
.rbs-slot.is-closed .rbs-slot-what { color: #8A84A0; }
.rbs-slot-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.rbs-confirm { background: #F1EDFF; border: 1px solid #CFC6F7; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.rbs-confirm p { margin: 0; line-height: 1.45; }
.rbs-confirm-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.rbs-changes { display: flex; flex-direction: column; gap: 6px; }
.rbs-change { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; font-size: 14px; padding: 6px 0; border-bottom: 1px solid #F0EDF6; }

@media (max-width: 720px) {
  .rbs-band { padding: 20px 16px 22px; }
  .rbs-band h1 { font-size: 26px; }
  .rbs-band-sub { font-size: 14px; }
  .rbs-wrap { padding: 16px; }
  .rbs-body { gap: 16px; }
  .rbs-card { padding: 16px; gap: 12px; }
  .rbs-row { gap: 16px; }
  .rbs-week-card, .rbs-rules-card { flex: 1 1 100%; }
  .rbs-chan-th { display: none; }
  .rbs-chan-grid { grid-template-columns: 1fr; gap: 10px; }
  .rbs-chan-row { grid-template-columns: 1fr; }
  .rbs-later { grid-column: auto; }
  .rbs-cell-label { display: block; }
  .rbs-week { grid-template-columns: 1fr; gap: 0; }
  .rbs-day { flex-direction: row; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid #F0EDF6; }
  .rbs-day:last-child { border-bottom: 0; }
  .rbs-day-name { width: 36px; flex: 0 0 36px; padding-top: 6px; }
  .rbs-day-spots { flex-direction: row; flex-wrap: wrap; }
  .rbs-hours { grid-template-columns: minmax(0, 1fr); }
  .rbs-hours-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px 8px; padding-bottom: 6px; }
  .rbs-hours-row > .rbs-tick { grid-column: 1 / -1; }
  .rbs-tick.is-later { display: block; line-height: 1.45; }
  .rbs-tick.is-later input { vertical-align: -3px; margin-right: 6px; }
  .rbs-slot { grid-template-columns: 1fr; gap: 6px; }
  .rbs-slot-acts { justify-content: flex-start; }
  .rbs-change { grid-template-columns: 1fr auto; }
  .rbs-change span { grid-column: 1; }
}
/* css/spots.css */
/* SV2 (Nov 18): Demos › Spots (js/spots-week.js). Boards: docs/designs/booking-engine/spots-v2/. */
.spw-page { margin: 0; padding: 0; min-height: 100vh; background: #F3F2F8; color: #1B1530; font-family: Figtree, sans-serif; }
.spw-band { background: #1B1530; color: #FFFFFF; padding: 28px 40px 24px; }
.spw-band-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.spw-band-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.spw-kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #CFC6F7; }
.spw-band h1 { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 36px; line-height: 1.1; color: #FFFFFF; }
.spw-band-sub { margin: 0; font-size: 15px; color: #D8D3EA; line-height: 1.45; }
.spw-band-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spw-band-btn, .spw-round { height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid #5B5480; background: transparent; color: #FFFFFF; font: 700 15px Figtree, sans-serif; cursor: pointer; white-space: nowrap; }
.spw-band-btn:hover, .spw-round:hover { border-color: #CFC6F7; }
.spw-band-btn.is-primary { background: #4B2EDB; border-color: #4B2EDB; font-weight: 800; }
.spw-band-btn.is-primary:hover { background: #3A20B5; }
.spw-round { width: 44px; padding: 0; font-size: 18px; font-weight: 800; }
.spw-wrap { padding: 20px 40px 40px; }
.spw-status { margin: 0 0 12px; font-size: 14px; color: #4A4660; }
.spw-status[hidden] { display: none; }
.spw-body { display: flex; flex-direction: column; gap: 16px; }
.spw-small { font-size: 12px; font-weight: 600; color: #4A4660; line-height: 1.4; }
.spw-small.is-warn { color: #A12B2B; font-weight: 700; }
.spw-strong { font-weight: 800; }
.spw-help { margin: 0; font-size: 14px; color: #4A4660; }
.spw-card { background: #FFFFFF; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 2px rgba(27,21,48,0.06); min-width: 0; box-sizing: border-box; }
.spw-card h2 { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 20px; }
.spw-note p { margin: 0; color: #4A4660; }

/* legend */
.spw-legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; font-size: 13px; font-weight: 700; color: #4A4660; }
.spw-legend.is-small { gap: 14px; font-size: 12px; }
.spw-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.spw-legend-grow { flex: 1; }
.spw-swatch { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid; box-sizing: border-box; }
.spw-swatch.is-open { background: #E7F4EC; border-color: #8CC6A2; }
.spw-swatch.is-one { background: #FFF1D6; border-color: #E5B864; }
.spw-swatch.is-release { background: #ECE8FB; border-color: #B4A8EE; }
.spw-swatch.is-closed { background: #E9E7EF; border-color: #C9C5D6; }

/* week */
.spw-week-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.spw-grid-wrap { flex: 999 1 720px; min-width: 0; overflow-x: auto; padding-bottom: 2px; }
.spw-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); gap: 8px; }
.spw-day { background: #FFFFFF; border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 360px; box-shadow: 0 1px 2px rgba(27,21,48,0.06); box-sizing: border-box; }
.spw-day.is-closed { background: #F0EEF5; }
.spw-day.is-today { box-shadow: inset 0 0 0 2px #CFC6F7; }
.spw-day-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px; }
.spw-day-name { display: flex; flex-direction: column; }
.spw-dow { font-size: 13px; font-weight: 800; color: #4A4660; }
.spw-num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 24px; }
.spw-day-act { height: 32px; padding: 0 10px; border-radius: 16px; border: 1.5px solid #D9D4EE; background: #FFFFFF; color: #3A20B5; font: 700 12px Figtree, sans-serif; cursor: pointer; white-space: nowrap; }
.spw-day-act:hover { border-color: #4B2EDB; }
.spw-closed-box { border: 1.5px dashed #C9C5D6; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #4A4660; }
.spw-closed-box strong { font-size: 14px; font-weight: 800; color: #1B1530; }
.spw-day-note { padding: 0 2px; }
.spw-spot { width: 100%; text-align: left; border-radius: 14px; border: 2px solid #8CC6A2; background: #E7F4EC; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-family: Figtree, sans-serif; color: #1B1530; cursor: pointer; box-sizing: border-box; }
.spw-spot.is-one { background: #FFF1D6; border-color: #E5B864; }
.spw-spot.is-release, .spw-spot.is-full { background: #ECE8FB; border-color: #B4A8EE; }
.spw-spot.is-closed { background: #E9E7EF; border-color: #C9C5D6; }
.spw-spot.is-past { background: #FFFFFF; border-color: #E4E0F0; opacity: 0.8; }
.spw-spot.is-sel { border-color: #1B1530; }
.spw-spot:focus-visible { outline: 3px solid #4B2EDB; outline-offset: 2px; }
.spw-spot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 6px; }
.spw-spot-time { font-weight: 800; font-size: 16px; white-space: nowrap; }
.spw-spot-tag { font-size: 12px; font-weight: 800; color: #235A39; }
.spw-spot.is-one .spw-spot-tag { color: #6E3A00; }
.spw-spot.is-release .spw-spot-tag, .spw-spot.is-full .spw-spot-tag { color: #2A1E7A; }
.spw-spot.is-closed .spw-spot-tag, .spw-spot.is-past .spw-spot-tag { color: #4A4660; }
.spw-spot-line { font-size: 12px; font-weight: 700; color: #4A4660; }
.spw-spot-flag { font-size: 11px; font-weight: 800; color: #3A20B5; }
.spw-dots { display: flex; gap: 3px; }
.spw-dot { flex: 1; height: 8px; border-radius: 4px; background: #E2DEEE; min-width: 8px; }
.spw-legend .spw-dot { flex: none; width: 18px; }
.spw-dot.is-booked { background: #4B2EDB; }
.spw-dot.is-held { background: #8B78E6; }
.spw-dot.is-shown { background: #B9AEF0; }
.spw-dot.is-hidden { background: #E2DEEE; }

/* side panel */
.spw-panel { flex: 0 1 320px; min-width: 280px; max-width: 340px; background: #FFFFFF; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 2px rgba(27,21,48,0.06); box-sizing: border-box; scroll-margin-top: 12px; }
.spw-panel h2 { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 26px; }
.spw-panel-head { display: flex; flex-direction: column; gap: 2px; }
.spw-panel-day { font-size: 13px; font-weight: 800; color: #4A4660; }
.spw-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.spw-tile { background: #F6F5FB; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.spw-tile.is-violet { background: #F1EEFD; }
.spw-tile-label { font-size: 12px; font-weight: 800; color: #4A4660; }
.spw-tile.is-violet .spw-tile-label { color: #3A20B5; }
.spw-tile-num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 26px; }
.spw-tile.is-violet .spw-tile-num { color: #2A1E7A; }
.spw-list { display: flex; flex-direction: column; gap: 6px; }
.spw-list-head { font-size: 13px; font-weight: 800; color: #4A4660; }
.spw-list-row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; border-bottom: 1px solid #ECE9F5; padding-bottom: 6px; align-items: baseline; }
.spw-list-row .spw-small { text-align: right; }
.spw-release { background: #1B1530; color: #FFFFFF; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.spw-release-head { font-size: 13px; font-weight: 800; color: #CFC6F7; }
.spw-panel-acts { display: flex; flex-direction: column; gap: 8px; }
.spw-pill { height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid #D9D4EE; background: #FFFFFF; color: #1B1530; font: 700 14px Figtree, sans-serif; cursor: pointer; }
.spw-pill:hover { border-color: #4B2EDB; }
.spw-pill.is-primary { border: 0; background: #4B2EDB; color: #FFFFFF; font-weight: 800; }
.spw-pill.is-primary:hover { background: #3A20B5; }
.spw-pill.is-danger { border-color: #E8C4C4; color: #A12B2B; }
.spw-pill.is-danger-fill { border: 0; background: #A12B2B; color: #FFFFFF; font-weight: 800; }
.spw-pill:disabled { opacity: 0.45; cursor: not-allowed; }
.spw-link { background: none; border: 0; padding: 2px 0; color: #4B2EDB; font: 700 13px Figtree, sans-serif; cursor: pointer; text-align: left; }
.spw-link:hover { color: #3A20B5; text-decoration: underline; }

/* standby */
.spw-standby { border: 1.5px solid #E5B864; background: #FFF9EC; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.spw-standby .spw-small, .spw-standby-title { color: #6E3A00; }
.spw-standby-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.spw-standby-title { font-size: 15px; font-weight: 800; }
.spw-sb-card { background: #FFFFFF; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.spw-sb-card .spw-small { color: #4A4660; }
.spw-sb-top { display: flex; justify-content: space-between; gap: 8px; }
.spw-sb-who { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.spw-call { font-size: 13px; font-weight: 800; white-space: nowrap; color: #4B2EDB; }
.spw-sb-btns, .spw-sb-add { display: flex; flex-wrap: wrap; gap: 6px; }
.spw-chip { height: 36px; padding: 0 12px; border-radius: 18px; border: 1.5px solid #D9D4EE; background: #FFFFFF; color: #1B1530; font: 700 12px Figtree, sans-serif; cursor: pointer; }
.spw-chip.is-primary { border: 0; background: #4B2EDB; color: #FFFFFF; font-weight: 800; }
.spw-chip.is-danger { color: #A12B2B; }
.spw-chip.is-dashed { border-style: dashed; color: #3A20B5; }
.spw-sb-add .spw-chip { flex: 1; min-width: 130px; height: 40px; border-radius: 20px; font-size: 13px; font-weight: 800; }
.spw-chip.is-amber { border-color: #E5B864; color: #6E3A00; }
.spw-chip.is-brown { border: 0; background: #6E3A00; color: #FFFFFF; }
.spw-sb-find { display: flex; flex-direction: column; gap: 6px; }
.spw-sb-find input, .spw-input { height: 40px; border-radius: 12px; border: 1.5px solid #D9D4EE; padding: 0 12px; font: 600 14px Figtree, sans-serif; color: #1B1530; background: #FFFFFF; box-sizing: border-box; width: 100%; }
.spw-sb-results { display: flex; flex-direction: column; gap: 4px; }
.spw-sb-pick { text-align: left; border: 1px solid #ECE9F5; background: #FFFFFF; border-radius: 10px; padding: 8px 10px; font: 700 13px Figtree, sans-serif; color: #1B1530; cursor: pointer; }
.spw-sb-pick:hover { border-color: #4B2EDB; }

/* add / close / send: two columns */
.spw-two { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.spw-two > .spw-preview { flex: 999 1 640px; }
.spw-two > .spw-form { flex: 1 1 360px; max-width: 460px; }
.spw-two.is-close > .spw-form, .spw-two.is-send > .spw-form { flex: 999 1 520px; max-width: none; }
.spw-closed-side, .spw-send-side { flex: 1 1 320px; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.spw-field { display: flex; flex-direction: column; gap: 8px; }
.spw-field-label { font-size: 13px; font-weight: 800; color: #4A4660; padding: 0; }
.spw-seg { display: flex; background: #F1EFF7; border-radius: 22px; padding: 4px; gap: 4px; }
.spw-seg-btn { flex: 1; height: 38px; border-radius: 19px; border: 0; background: transparent; color: #4A4660; font: 700 14px Figtree, sans-serif; cursor: pointer; }
.spw-seg-btn[aria-pressed="true"] { background: #FFFFFF; color: #1B1530; box-shadow: 0 1px 2px rgba(27,21,48,0.12); }
.spw-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.spw-daychip { height: 38px; min-width: 50px; padding: 0 12px; border-radius: 19px; border: 1.5px solid #D9D4EE; background: #FFFFFF; color: #1B1530; font: 700 13px Figtree, sans-serif; cursor: pointer; }
.spw-daychip[aria-pressed="true"] { background: #4B2EDB; border-color: #4B2EDB; color: #FFFFFF; }
.spw-timechip { height: 38px; padding: 0 6px 0 14px; border-radius: 19px; background: #F1EEFD; color: #2A1E7A; font: 800 13px Figtree, sans-serif; display: inline-flex; align-items: center; gap: 4px; }
.spw-x { width: 28px; height: 28px; border-radius: 14px; border: 0; background: transparent; color: #2A1E7A; font: 800 16px Figtree, sans-serif; cursor: pointer; }
.spw-x:hover { background: #E0D9FB; }
.spw-addtime { display: inline-flex; gap: 6px; align-items: center; }
.spw-addtime input { height: 38px; border-radius: 12px; border: 1.5px solid #D9D4EE; padding: 0 8px; font: 600 13px Figtree, sans-serif; color: #1B1530; }
.spw-select { height: 44px; border-radius: 12px; border: 1.5px solid #D9D4EE; padding: 0 12px; font: 700 15px Figtree, sans-serif; color: #1B1530; background: #FFFFFF; max-width: 100%; }
.spw-close-date { font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; font-weight: 800; height: 50px; }
.spw-steppers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.spw-stepper { background: #F6F5FB; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.spw-stepper.is-violet { background: #F1EEFD; }
.spw-stepper.is-violet .spw-field-label { color: #3A20B5; }
.spw-stepper-row { display: flex; align-items: center; gap: 10px; }
.spw-step { width: 36px; height: 36px; border-radius: 18px; border: 1.5px solid #D9D4EE; background: #FFFFFF; color: #1B1530; font: 800 18px Figtree, sans-serif; cursor: pointer; }
.spw-step-num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 28px; min-width: 28px; text-align: center; }
.spw-rules { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.spw-rules legend { margin-bottom: 8px; }
.spw-rule { display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 1.5px solid #E4E0F0; background: #FFFFFF; border-radius: 14px; padding: 12px; font-family: Figtree, sans-serif; color: #1B1530; cursor: pointer; width: 100%; box-sizing: border-box; }
.spw-rule.is-on { border-color: #4B2EDB; background: #F7F5FF; }
.spw-radio { width: 16px; height: 16px; border-radius: 8px; border: 2px solid #B4A8EE; background: #FFFFFF; flex: none; margin-top: 2px; box-sizing: border-box; }
.spw-rule.is-on .spw-radio { border-color: #4B2EDB; background: #4B2EDB; box-shadow: inset 0 0 0 3px #FFFFFF; }
.spw-rule-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; flex: 1; min-width: 0; }
.spw-rule-days { align-self: flex-start; margin-left: 26px; width: auto; max-width: calc(100% - 26px); }
.spw-form-foot { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #ECE9F5; padding-top: 14px; }
.spw-foot-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.spw-foot-btns .spw-pill { flex: 1; min-width: 140px; }

/* add: preview */
.spw-preview-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.spw-mini-wrap { overflow-x: auto; }
.spw-mini-grid { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 8px; min-width: 680px; }
.spw-mini-day { background: #FFFFFF; border: 2px solid transparent; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 0 0 1px #ECE9F5; min-height: 220px; }
.spw-mini-day.is-affected { border-color: #4B2EDB; }
.spw-mini-day.is-closed { background: #F0EEF5; }
.spw-mini-name { font-size: 13px; font-weight: 800; }
.spw-mini-tag { font-size: 11px; font-weight: 800; color: #3A20B5; min-height: 14px; }
.spw-mini-day:not(.is-affected) .spw-mini-tag { color: #4A4660; }
.spw-mini-spot { border-radius: 10px; border: 1.5px solid #8CC6A2; background: #E7F4EC; padding: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.spw-mini-spot.is-one { background: #FFF1D6; border-color: #E5B864; }
.spw-mini-spot.is-release { background: #ECE8FB; border-color: #B4A8EE; }
.spw-mini-spot .spw-small { font-size: 11px; }
.spw-custline { background: #1B1530; color: #FFFFFF; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.spw-custline .spw-small { color: #D8D3EA; }

/* close */
.spw-closetime { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1.5px solid #BFE0CB; background: #F2FAF5; border-radius: 14px; padding: 12px 14px; font: 600 14px Figtree, sans-serif; color: #1B1530; cursor: pointer; text-align: left; }
.spw-closetime-state { font-size: 13px; font-weight: 800; color: #235A39; }
.spw-closetime.is-on { border-color: #E8C4C4; background: #FDF3F3; }
.spw-closetime.is-on .spw-closetime-state { color: #A12B2B; }
.spw-closetime:disabled { cursor: default; opacity: 0.7; }
.spw-bookedbox { background: #F2FAF5; border: 1.5px solid #BFE0CB; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.spw-bookedbox.is-some { background: #FFF9EC; border-color: #E5B864; }
.spw-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; cursor: pointer; }
.spw-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #4B2EDB; flex: none; }
.spw-closed-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid #ECE9F5; padding-bottom: 10px; }
.spw-closed-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }

/* send */
.spw-sendchip { height: 44px; padding: 0 14px; border-radius: 22px; border: 1.5px solid #D9D4EE; background: #FFFFFF; color: #1B1530; font: 700 14px Figtree, sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.spw-sendchip[aria-pressed="true"] { background: #4B2EDB; border-color: #4B2EDB; color: #FFFFFF; }
.spw-sendchip-left { font-size: 12px; font-weight: 800; opacity: 0.85; }
.spw-aud { align-items: center; }
.spw-aud-count { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 24px; color: #2A1E7A; }
.spw-skipline { background: #F6F5FB; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; color: #4A4660; line-height: 1.45; }
.spw-bubble { background: #ECE8FB; border-radius: 18px 18px 18px 6px; padding: 14px; font-size: 15px; line-height: 1.45; color: #1B1530; }

@media (max-width: 900px) {
  .spw-panel { max-width: none; flex-basis: 100%; }
  .spw-two > .spw-form, .spw-closed-side, .spw-send-side { max-width: none; flex-basis: 100%; }
}
@media (max-width: 760px) {
  .spw-band { padding: 22px 16px 18px; }
  .spw-band h1 { font-size: 28px; }
  .spw-band-actions { width: 100%; }
  .spw-band-btn { flex: 1 1 auto; padding: 0 14px; font-size: 14px; }
  .spw-wrap { padding: 16px 16px 32px; }
  .spw-legend-grow { display: none; }
  .spw-legend-note { flex-basis: 100%; }
  .spw-grid-wrap { overflow: visible; }
  .spw-grid { grid-template-columns: 1fr; min-width: 0; }
  .spw-day { min-height: 0; }
  .spw-mini-grid { grid-template-columns: 1fr; min-width: 0; }
  .spw-mini-day { min-height: 0; }
  .spw-steppers { grid-template-columns: 1fr 1fr; }
  .spw-card { padding: 16px; }
  .spw-close-date { font-size: 17px; width: 100%; }
}

/* SV2 fix (owner Nov 18): each time has its own Real places and Customers see */
.spw-trow { display: grid; grid-template-columns: 72px 1fr 1fr 28px; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid #EEECF4; }
.spw-trow.is-head { border-top: 0; padding: 0 0 2px; font: 700 11px Figtree, sans-serif; color: #6B6680; text-transform: uppercase; letter-spacing: .04em; }
.spw-trow-time { font: 700 15px Figtree, sans-serif; color: #1B1530; }
.spw-trow-step { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 6px; border-radius: 12px; background: #F6F5FA; }
.spw-trow-step.is-violet { background: #ECE8FB; }
.spw-trow-step .spw-step-num { min-width: 20px; text-align: center; font: 700 16px Figtree, sans-serif; }
.spw-trow-note { grid-column: 2 / -1; margin-top: -2px; }
.spw-cust-time { display: block; }
@media (max-width: 420px) {
  .spw-trow { grid-template-columns: 58px 1fr 1fr 24px; gap: 6px; }
  .spw-trow-step { gap: 4px; padding: 3px 4px; }
}
.spw-trow .spw-step { width: 30px; height: 30px; font-size: 16px; }

/* SV2 Month view (owner Nov 18) */
.spw-view-switch { flex: 0 0 auto; background: rgba(255,255,255,0.12); }
.spw-view-switch .spw-seg-btn { color: #FFFFFF; padding: 0 16px; height: 34px; }
.spw-view-switch .spw-seg-btn[aria-pressed="true"] { background: #FFFFFF; color: #1B1530; }
.spw-mdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid; box-sizing: border-box; flex: 0 0 auto; }
.spw-mdot.is-open { background: #E7F4EC; border-color: #4F9A6B; }
.spw-mdot.is-one { background: #FFE2A6; border-color: #C9921F; }
.spw-mdot.is-release { background: #ECE8FB; border-color: #8C7BE6; }
.spw-mdot.is-full { background: #4B2EDB; border-color: #4B2EDB; }
.spw-mdot.is-closed { background: #E9E7EF; border-color: #C9C5D6; }
.spw-mdot.is-past { background: #FFFFFF; border-color: #D9D5E5; }
.spw-month { padding: 12px; }
.spw-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.spw-month-dow { font: 700 12px Figtree, sans-serif; color: #6B6680; text-transform: uppercase; letter-spacing: .04em; padding: 0 4px 2px; }
.spw-mday { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 96px; padding: 8px; border-radius: 12px; border: 1.5px solid #ECE9F3; background: #FFFFFF; text-align: left; cursor: pointer; font: inherit; color: #1B1530; }
.spw-mday:hover { border-color: #B4A8EE; }
.spw-mday:focus-visible { outline: 2px solid #4B2EDB; outline-offset: 2px; }
.spw-mday.is-out { background: #FAF9FC; opacity: 0.55; }
.spw-mday.is-closed { background: #F0EEF5; }
.spw-mday.is-today { border-color: #4B2EDB; box-shadow: inset 0 0 0 1px #4B2EDB; }
.spw-mday-head { display: flex; align-items: center; gap: 6px; width: 100%; }
.spw-mday-dow { display: none; font: 700 13px Figtree, sans-serif; color: #6B6680; }
.spw-mday-num { font: 800 16px "Bricolage Grotesque", Figtree, sans-serif; }
.spw-mday-today { margin-left: auto; font: 700 10px Figtree, sans-serif; color: #FFFFFF; background: #4B2EDB; border-radius: 8px; padding: 2px 6px; }
.spw-mday-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.spw-mday-reason { font: 600 12px Figtree, sans-serif; color: #4A4660; }
.spw-mday-line { margin-top: auto; font: 600 11px Figtree, sans-serif; color: #4A4660; }
.spw-mday-line.is-none { color: #8A859C; }
@media (max-width: 760px) {
  .spw-month { padding: 4px 12px; }
  .spw-month-grid { display: block; }
  .spw-month-dow, .spw-mday.is-out { display: none; }
  .spw-mday { width: 100%; min-height: 0; display: grid; grid-template-columns: 76px 1fr; grid-template-areas: "head dots" "head line" "head reason"; align-items: center; gap: 4px 10px; border: 0; border-bottom: 1px solid #EEECF4; border-radius: 0; padding: 12px 2px; }
  .spw-mday.is-today { box-shadow: none; border-left: 3px solid #4B2EDB; padding-left: 8px; }
  .spw-mday-head { grid-area: head; flex-wrap: wrap; }
  .spw-mday-dow { display: inline; }
  .spw-mday-dots { grid-area: dots; }
  .spw-mday-line { grid-area: line; margin-top: 0; }
  .spw-mday-reason { grid-area: reason; }
  .spw-mday-today { margin-left: 0; }
  .spw-mdot { width: 12px; height: 12px; }
  .spw-mday.is-closed .spw-mday-reason { grid-area: dots; }
}

/* SV2 polish (owner Nov 18): Which weeks (3 choices), dates from–until, tap-to-add times, the coverage box */
.spw-seg-3 .spw-seg-btn { font-size: 13px; padding: 0 6px; white-space: nowrap; }
.spw-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spw-range-box { display: flex; flex-direction: column; gap: 6px; }
.spw-range-box .spw-input { height: 44px; font-weight: 700; }
.spw-chip.is-on, .spw-chip[aria-pressed="true"] { background: #F1EEFD; border-color: #B4A8EE; color: #2A1E7A; }
.spw-addhead { margin-top: 6px; }
.spw-timechips { gap: 6px; }
.spw-tchip { height: 34px; padding: 0 12px; border-radius: 17px; border: 1.5px solid #D9D4EE; background: #FFFFFF; color: #1B1530; font: 700 13px Figtree, sans-serif; cursor: pointer; white-space: nowrap; }
.spw-tchip:hover { border-color: #4B2EDB; }
.spw-tchip.is-on { background: #F1EEFD; border-color: #B4A8EE; color: #2A1E7A; cursor: default; }
.spw-tchip.is-dashed { border-style: dashed; color: #3A20B5; }
.spw-hidden-time { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.spw-hidden-time.is-open { position: static; width: auto; height: 34px; opacity: 1; pointer-events: auto; border-radius: 12px; border: 1.5px solid #D9D4EE; padding: 0 8px; font: 600 13px Figtree, sans-serif; color: #1B1530; }
.spw-copy { height: 40px; font-size: 14px; align-self: flex-start; }
.spw-cover { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px 16px; background: #F6F5FB; border-radius: 14px; padding: 12px 14px; }
.spw-cover-item { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.spw-cover-label { font: 800 11px Figtree, sans-serif; color: #6B6680; text-transform: uppercase; letter-spacing: .04em; }
.spw-cover-note { grid-column: 1 / -1; }

/* week: the panel carries the detail the day card dropped */
.spw-panel-detail { display: flex; flex-direction: column; gap: 4px; }
.spw-panel-tag { align-self: flex-start; font: 800 12px Figtree, sans-serif; padding: 3px 10px; border-radius: 10px; background: #E7F4EC; color: #235A39; }
.spw-panel-tag.is-one { background: #FFF1D6; color: #6E3A00; }
.spw-panel-tag.is-release, .spw-panel-tag.is-full { background: #ECE8FB; color: #2A1E7A; }
.spw-panel-tag.is-closed, .spw-panel-tag.is-past { background: #E9E7EF; color: #4A4660; }
.spw-spot-tag { font-size: 12px; font-weight: 800; }

/* month (Nov 10 board, Spots v2) */
.spw-month-row { align-items: flex-start; }
.spw-month-row > .spw-month { flex: 999 1 720px; min-width: 0; }
.spw-month .spw-mday { min-height: 104px; gap: 4px; border-color: #CFC9E8; }
.spw-month .spw-mday.is-busy { background: #FFF6E6; border-color: #E2B45E; }
.spw-month .spw-mday.is-full { background: #F1EEFD; border-color: #B4A8EE; }
.spw-month .spw-mday.is-closed { background: #F1F0F5; border-color: #E0DCEE; }
.spw-month .spw-mday.is-past { opacity: 0.55; }
.spw-month .spw-mday.is-out { background: #FAFAFC; border-color: #ECE9F5; opacity: 0.45; }
.spw-mday-flag { font: 800 11px Figtree, sans-serif; color: #5A5670; line-height: 1.25; }
.spw-mday-flag.is-standby { color: #A3281D; }
.spw-mday-flag.is-waiting { color: #3D2DB0; }
.spw-mday-flag.is-closed { color: #5A5670; }
.spw-mday-line { margin-top: auto; font: 700 12px Figtree, sans-serif; color: #1B1530; }
.spw-mbar { display: block; width: 100%; height: 6px; border-radius: 3px; background: #ECE9F5; overflow: hidden; }
.spw-mbar-fill { display: block; height: 100%; border-radius: 3px; background: #3C8A5A; }
.spw-mday.is-busy .spw-mbar-fill { background: #D98A00; }
.spw-mday.is-full .spw-mbar-fill { background: #4B2EDB; }
.spw-mday-open { font: 800 12px Figtree, sans-serif; color: #2F6B45; }
.spw-mday.is-busy .spw-mday-open { color: #8A4B00; }
.spw-mday.is-full .spw-mday-open { color: #3A20B5; }
.spw-month-hint { padding: 2px 4px 0; }
.spw-month-panel .spw-help { font-size: 14px; line-height: 1.45; }
.spw-month-change { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #ECE9F5; background: transparent; padding: 8px 0; font: inherit; color: #1B1530; cursor: pointer; }
.spw-month-change:hover .spw-strong { color: #3A20B5; }
@media (max-width: 760px) {
  .spw-month .spw-mday { grid-template-columns: 76px 1fr; grid-template-areas: "head line" "head bar" "head open" "head flag"; border: 0; border-bottom: 1px solid #EEECF4; border-radius: 0; background: transparent; min-height: 0; }
  .spw-month .spw-mday.is-busy, .spw-month .spw-mday.is-full { background: transparent; }
  .spw-month .spw-mday.is-closed { background: #F6F5FA; }
  .spw-month .spw-mday-head { grid-area: head; }
  .spw-month .spw-mday-line { grid-area: line; }
  .spw-month .spw-mbar { grid-area: bar; }
  .spw-month .spw-mday-open { grid-area: open; }
  .spw-month .spw-mday-flag { grid-area: flag; }
  .spw-month .spw-mday.is-closed .spw-mday-flag { grid-area: line; }
  .spw-range { grid-template-columns: 1fr; }
  .spw-cover { grid-template-columns: 1fr; }
  /* Save / Cancel stay at the bottom of the pop-out on a phone */
  .spw-form .spw-form-foot { position: sticky; bottom: 0; z-index: 5; background: #FFFFFF; margin: 0 -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 16px rgba(27,21,48,0.08); border-radius: 0 0 16px 16px; }
  .spw-seg-3 .spw-seg-btn { font-size: 12px; }
}
/* rows fit the form: time, two steppers and × (no overflow at 320px of row) */
.spw-trow { grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr) 28px; gap: 6px 8px; }
.spw-trow-step { gap: 4px; padding: 3px 4px; }
/* the "Other time…" picker input stays out of the layout until opened */
.spw-timechips { position: relative; }
.spw-hidden-time { left: 0; top: 0; max-width: 1px; min-width: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.spw-hidden-time.is-open { max-width: 160px; clip-path: none; border: 1.5px solid #D9D4EE; padding: 0 8px; }
@media (max-width: 760px) {
  /* above the app's bottom tab bar (72px) */
  .spw-form .spw-form-foot { bottom: 72px; }
}

/* Dec 4: Spots v2 inside Admin › How customers and Riders book (js/rider-booking-setup.js .rbs-spots holder).
   The page already has its dark band, so here the Spots header is a light card header. */
.rbs-spots { background: #FFFFFF; border: 1px solid #E6E2F0; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rbs-spots .spw-band { background: transparent; color: #1B1530; padding: 0; }
.rbs-spots .spw-kicker { color: #4B2EDB; }
.rbs-spots .spw-band h1 { color: #1B1530; font-size: 26px; }
.rbs-spots .spw-band-sub { color: #5E5878; }
.rbs-spots .spw-band-btn, .rbs-spots .spw-round { color: #1B1530; border-color: #D9D4EA; background: #FFFFFF; }
.rbs-spots .spw-band-btn:hover, .rbs-spots .spw-round:hover { border-color: #4B2EDB; }
.rbs-spots .spw-band-btn.is-primary { color: #FFFFFF; background: #4B2EDB; border-color: #4B2EDB; }
.rbs-spots .spw-view-switch { background: #EEEAF8; }
.rbs-spots .spw-view-switch .spw-seg-btn { color: #1B1530; }
.rbs-spots .spw-view-switch .spw-seg-btn[aria-pressed="true"] { background: #FFFFFF; color: #1B1530; box-shadow: 0 1px 2px rgba(27,21,48,0.12); }
@media (max-width: 760px) { .rbs-spots { padding: 14px; } }
/* css/rider-page.css */
/* RP1 / RP2: the Rider's own page (/r/rp_<token>) and the in-app "Preview as this Rider" (js/rider-page.js).
   R1 to docs/designs/riders/Rider.dc.html: phone-first, a 480px column on a wide screen. */
.rpg-page {
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1B1530;
  background: #F6F4FB;
  min-height: 100vh;
}
.rpg-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.rpg-overlay.hidden { display: none; }
body.rpg-preview-open { overflow: hidden; }
body.rpg-public #loading { display: none; }

.rpg-r1 {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #F6F4FB;
  color: #1B1530;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.35;
}
.rpg-r1 * { box-sizing: border-box; }
.rpg-r1 h1, .rpg-r1 h2, .rpg-r1 p { margin: 0; }
.rpg-r1 button { min-height: 0 !important; }  /* RS1: lead-detail.css gives every phone button min-height 40px */

.rpg-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  background: #FFF4D6;
  color: #7A5300;
  font-size: 13px;
  font-weight: 600;
}
.rpg-preview-close {
  flex: none;
  border: 1px solid currentColor;
  background: #fff;
  color: #7A5300;
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  cursor: pointer;
}

/* the dark band */
.rpg-band {
  background: #1B1530;
  color: #FFFFFF;
  padding: 18px max(20px, calc(50% - 220px)) 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border-bottom: 0;
  gap: 8px;
}
.rpg-band-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rpg-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #CFC6F7;
  min-width: 0;
}
.rpg-lang {
  flex: none;
  background: transparent;
  color: #CFC6F7;
  border: 1px solid rgba(207, 198, 247, .45);
  border-radius: 999px;
  padding: 3px 10px;
  font: 600 12px/1.4 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}
.rpg-lang:hover { color: #FFFFFF; border-color: #FFFFFF; }
.rpg-headline {
  font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.15;
  color: #FFFFFF;
}
.rpg-band-sub { font-size: 14px; color: #D8D3EA; }

/* the body column */
.rpg-body { flex: 1 0 auto; width: 100%; max-width: 480px; margin: 0 auto; padding-bottom: 18px; }
.rpg-sec { padding: 16px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.rpg-sec + .rpg-sec { padding-top: 14px; }
.rpg-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rpg-sec-title { font-size: 15px; font-weight: 700; font-family: inherit; }
.rpg-sec-note { font-size: 12px; color: #5E5878; }
.rpg-small { font-size: 12px; color: #5E5878; line-height: 1.4; }

/* what you can win */
.rpg-ladder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rpg-gift {
  background: #FFFFFF;
  border: 1px solid #E6E2F0;
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.rpg-gift-tile {
  width: 100%;
  height: 76px;
  border-radius: 10px;
  background: #F4F2F8;
  border: 1px dashed #C9C3DA;
  color: #5E5878;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rpg-gift-name { font-size: 12px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.rpg-gift-state { font-size: 11px; font-weight: 700; color: #5E5878; }
.rpg-gift-days { font-size: 11px; color: #5E5878; margin-top: -4px; }
.rpg-gift.is-won { border: 2px solid #2E7D4F; }
.rpg-gift.is-won .rpg-gift-tile { background: #E7F3EC; border-color: #8CC5A3; color: #2E6B47; }
.rpg-gift.is-won .rpg-gift-state { color: #2E7D4F; }
.rpg-gift.is-next { border: 2px solid #4B2EDB; }
.rpg-gift.is-next .rpg-gift-tile { background: #F1EDFF; border-color: #A797F0; color: #3920B0; }
.rpg-gift.is-next .rpg-gift-state { color: #4B2EDB; }
.rpg-gift.is-gone { opacity: .6; }

.rpg-segs { display: flex; gap: 4px; }
.rpg-segs span { flex: 1 1 0; height: 8px; border-radius: 4px; background: #E0DCEB; }
.rpg-segs span.is-won { background: #2E7D4F; }
.rpg-segs span.is-on { background: #4B2EDB; }
.rpg-next-prize { margin-top: -2px; }

/* the Rider's cash programme */
.rpg-cash {
  background: #FFFFFF;
  border: 1px solid #E6E2F0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rpg-cash.is-done { border: 2px solid #2E7D4F; }
/* RK1: shown count reached, the office will be in touch to finish */
.rpg-cash.is-finish { border: 2px solid #4B2EDB; }
.rpg-gift.is-finish .rpg-gift-state { font-weight: 600; }
.rpg-cash.is-gone { opacity: .65; }
.rpg-cash-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rpg-cash-track { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4B2EDB; }
.rpg-cash-days { font-size: 12px; color: #5E5878; white-space: nowrap; }
.rpg-cash-amount { font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif; font-size: 28px; font-weight: 700; line-height: 1.1; }
.rpg-cash-won { font-size: 13px; font-weight: 700; color: #2E7D4F; }
/* RC1: the cash levels added together, one request after the cash period */
.rpg-cash-total {
  margin-top: 10px;
  background: #F6F4FC;
  border: 1px solid #E6E2F0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rpg-cash-total-line { font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif; font-size: 17px; font-weight: 700; color: #1B1530; margin: 0; }
.rpg-cash-total .rpg-reward { margin-top: 4px; }
.rpg-need-wrap { display: flex; flex-direction: column; gap: 4px; }
.rpg-need { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.rpg-need.is-done { color: #2E7D4F; font-weight: 600; }
.rpg-need-ok { font-weight: 700; }
.rpg-bar { height: 6px; background: #E0DCEB; border-radius: 3px; overflow: hidden; }
.rpg-bar-fill { height: 100%; background: #4B2EDB; border-radius: 3px; }
.rpg-need.is-done + .rpg-bar .rpg-bar-fill { background: #2E7D4F; }
.rpg-split { font-size: 13px; color: #3D3657; }
.rpg-replace { color: #B45309; }
.rpg-bonus { border-top: 1px solid #F0EDF6; padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.rpg-bonus-line { font-size: 13px; font-weight: 600; }
.rpg-bonus-earned { font-size: 13px; font-weight: 700; color: #2E7D4F; }

/* the friends */
.rpg-friends { background: #FFFFFF; border: 1px solid #E6E2F0; border-radius: 14px; display: flex; flex-direction: column; }
.rpg-friend { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #F0EDF6; }
.rpg-friend:last-child { border-bottom: 0; }
.rpg-friend-name { font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.rpg-friend-empty { padding: 12px 14px; font-size: 14px; color: #5E5878; }
.rpg-chip { font-size: 12px; font-weight: 700; text-align: right; flex: none; max-width: 62%; }
.rpg-chip.is-ok { color: #2E7D4F; }
.rpg-chip.is-violet { color: #4B2EDB; }
.rpg-chip.is-wait { color: #B45309; }
.rpg-chip.is-warn { color: #B45309; }
.rpg-chip.is-grey { color: #5E5878; }

/* how it works, the office */
.rpg-how { margin: 14px 20px 0; background: #FFFFFF; border: 1px solid #E6E2F0; border-radius: 14px; padding: 10px 14px; }
.rpg-how summary { cursor: pointer; font-size: 14px; font-weight: 700; color: #4B2EDB; }
.rpg-rules { white-space: pre-line; font-size: 13px; line-height: 1.5; color: #3D3657; margin-top: 8px !important; }
.rpg-foot { font-size: 12px; color: #5E5878; text-align: center; padding: 14px 20px 0; }

/* one big button */
.rpg-cta {
  position: sticky;
  bottom: 0;
  padding: 14px max(20px, calc(50% - 220px)) 22px;
  background: #FFFFFF;
  border-top: 1px solid #E6E2F0;
}
.rpg-cta-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: #4B2EDB;
  color: #FFFFFF;
  font: 700 17px/1 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}
.rpg-cta-btn:hover { background: #3920B0; }

/* RS1 (Nov 18): each friend opens a card */
.rpg-r1 button.rpg-friend.is-link {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid #F0EDF6;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 44px !important;
}
.rpg-r1 button.rpg-friend.is-link:last-child { border-bottom: 0; }
.rpg-r1 button.rpg-friend.is-link:hover { background: #FAF9FD; }
.rpg-r1 button.rpg-friend.is-link:focus-visible { outline: 2px solid #4B2EDB; outline-offset: -2px; }
.rpg-friend-right { display: flex; align-items: center; gap: 8px; min-width: 0; justify-content: flex-end; }
.rpg-friend-right .rpg-chip { max-width: none; }
.rpg-friend-go { font-size: 20px; line-height: 1; color: #A39DB8; flex: none; }
.rpg-back {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  color: #CFC6F7;
  font: 600 13px/1.4 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}
.rpg-back:hover { color: #FFFFFF; }
.rpg-card-page .rpg-band { gap: 4px; padding-top: 16px; padding-bottom: 18px; }
.rpg-fcard { background: #FFFFFF; border: 1px solid #E6E2F0; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.rpg-fstatus { font-size: 17px; font-weight: 700; }
.rpg-fstatus.is-ok { color: #2E7D4F; }
.rpg-fstatus.is-violet { color: #4B2EDB; }
.rpg-fstatus.is-wait, .rpg-fstatus.is-warn { color: #B45309; }
.rpg-fstatus.is-grey { color: #5E5878; }
.rpg-fline { font-size: 14px; color: #3D3657; }
.rpg-fcounts { font-size: 14px; font-weight: 600; color: #5E5878; }
.rpg-fcounts.is-ok { color: #2E7D4F; }
.rpg-fdl { margin: 2px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; font-size: 15px; }
.rpg-fdl dt:not(:first-child) { margin-top: 7px; }
.rpg-fdl dt { color: #5E5878; font-weight: 600; font-size: 12px; }
.rpg-fdl dd { margin: 0; overflow-wrap: anywhere; }
.rpg-facts { display: flex; flex-direction: column; gap: 10px; }
.rpg-fbtn {
  height: 48px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #CFC9E0;
  background: #FFFFFF;
  color: #1B1530;
  font: 700 16px/1 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}
.rpg-fbtn:hover { border-color: #4B2EDB; }
.rpg-fbtn:disabled { opacity: 0.55; cursor: default; }
.rpg-fbtn[hidden] { display: none; }
.rpg-fbtn.is-danger { color: #A12B2B; border-color: #E8C4C4; }
.rpg-fbtn.is-danger-solid { background: #A12B2B; border-color: #A12B2B; color: #FFFFFF; }
.rpg-fconfirm { background: #FBECEC; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: #6B1E1E; }
.rpg-fconfirm[hidden] { display: none; }
.rpg-fpair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rpg-fmsg { font-size: 14px; font-weight: 600; color: #A12B2B; }
.rpg-flash { background: #E8F5EC; color: #1E5E37; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }

/* RS1: help, phone-first: two big buttons */
.rpg-help-btns { display: grid; grid-template-columns: 1fr; gap: 10px; }
.rpg-help-btns.is-two { grid-template-columns: 1fr; }  /* phone-first: one big button per row */
.rpg-help-btn {
  min-height: 64px;
  border-radius: 14px;
  border: 1px solid #CFC9E0;
  background: #FFFFFF;
  color: #1B1530;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.rpg-help-btn:hover { border-color: #4B2EDB; color: #1B1530; }
.rpg-help-icon { width: 38px; height: 38px; border-radius: 19px; background: #F1EDFF; color: #4B2EDB; display: flex; align-items: center; justify-content: center; flex: none; }
.rpg-help-words { display: flex; flex-direction: column; min-width: 0; }
.rpg-help-label { font-size: 15px; font-weight: 700; line-height: 1.2; }
.rpg-help-sub { font-size: 12px; color: #5E5878; }
.rpg-ask .rpg-rules { font-size: 14px; }

/* SV2 (Nov 18): "Open this week" on the Rider's page (docs/designs/booking-engine/spots-v2/SpotsSendTimes.dc.html) */
.rpg-open { background: #1B1530; color: #FFFFFF; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.rpg-open-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 18px; }
.rpg-open-row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: 6px; font-size: 15px; font-weight: 700; }
.rpg-open-left { color: #CFC6F7; font-weight: 800; font-size: 13px; }
.rpg-open-left.is-one { color: #FFD58A; }
.rpg-open-go { margin-top: 4px; height: 44px; border-radius: 22px; border: 0; background: #4B2EDB; color: #FFFFFF; font: 800 15px Figtree, sans-serif; cursor: pointer; }
.rpg-open-go:disabled { opacity: 0.6; cursor: default; }

/* RR3 (Nov 30): Your rewards: each reached level, its request status, picks and the Request button */
.rpg-rewards { display: flex; flex-direction: column; gap: 10px; }
.rpg-reward {
  background: #FFFFFF;
  border: 1px solid #E6E2F0;
  border-left: 4px solid #4B2EDB;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.rpg-reward.is-done { border-left-color: #2E7D4F; }
.rpg-reward-name { font: 700 17px/1.25 "Bricolage Grotesque", "Figtree", system-ui, sans-serif; color: #1B1530; overflow-wrap: anywhere; }
.rpg-reward-status { font-size: 14px; font-weight: 600; color: #1B1530; margin: 0; overflow-wrap: anywhere; }
.rpg-reward-status.is-warn { color: #A12B2B; }
.rpg-verify { font-style: italic; }
.rpg-pick { display: flex; flex-direction: column; gap: 6px; }
.rpg-pick-label { font-size: 14px; font-weight: 600; color: #1B1530; margin: 0; }
.rpg-pick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rpg-r1 button.rpg-pick-chip {
  min-height: 40px;
  padding: 8px 14px;
  border: 1.5px solid #D7D0EE;
  border-radius: 999px;
  background: #FFFFFF;
  color: #1B1530;
  font: 600 14px/1.2 "Figtree", system-ui, sans-serif;
  cursor: pointer;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
.rpg-r1 button.rpg-pick-chip.is-on { border-color: #4B2EDB; background: #EEEAFD; color: #4B2EDB; }
.rpg-r1 button.rpg-pick-chip:disabled { cursor: default; opacity: 0.6; }
.rpg-units { display: flex; align-items: center; gap: 8px; }
.rpg-units-select { min-height: 40px; padding: 6px 10px; border: 1.5px solid #D7D0EE; border-radius: 10px; font: 600 15px "Figtree", system-ui, sans-serif; }
.rpg-r1 button.rpg-reward-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #4B2EDB;
  color: #FFFFFF;
  font: 700 16px/1.2 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}
.rpg-r1 button.rpg-reward-btn:hover { background: #3920B0; }
.rpg-r1 button.rpg-reward-btn:disabled { background: #B9AEEA; cursor: default; }
.rpg-reward.is-closed { border-left-color: #B8B2C8; }


/* RG1 (owner Dec 2): reached but not confirmed by the office yet: plain colours, no ticks */
.rpg-gift.is-reached { border: 2px solid #1B1530; }
.rpg-gift.is-reached .rpg-gift-tile { background: #F4F2F8; border-color: #C9C3DA; border-style: solid; color: #1B1530; }
.rpg-gift.is-reached .rpg-gift-state { color: #1B1530; }
.rpg-cash-line { font-size: 13px; font-weight: 600; color: #1B1530; margin: 0; }
.rpg-cash-total.is-ok { background: #E7F3EC; border-color: #8CC5A3; }
.rpg-pair-note { margin: 2px 0 0; }

/* RG1: the gift picker (photo grid) */
.rpg-picker { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #E6E2F0; padding-top: 10px; }
.rpg-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .rpg-pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rpg-r1 button.rpg-pick-tile {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px;
  background: #FFFFFF; border: 2px solid #E6E2F0; border-radius: 12px; cursor: pointer;
  font: inherit; color: #1B1530; text-align: center; min-width: 0;
}
.rpg-r1 button.rpg-pick-tile.is-on { border-color: #4B2EDB; background: #F1EDFF; }
.rpg-r1 button.rpg-pick-tile:disabled { cursor: default; }
.rpg-r1 button.rpg-pick-tile.is-taken { opacity: .5; background: #F4F2F8; }
.rpg-pick-pic {
  display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; border-radius: 8px;
  background: #F1EDFF; color: #4B2EDB; font: 700 26px "Bricolage Grotesque", "Figtree", system-ui, sans-serif; overflow: hidden;
}
.rpg-pick-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rpg-pick-name { font-size: 13px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.rpg-pick-taken { font-size: 11px; color: #5E5878; }
.rpg-pick-count { font-size: 13px; font-weight: 600; color: #4B2EDB; margin: 0; }
.rpg-pick-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* RG1: the gift picker and its open button hide properly (display rules above would otherwise win over [hidden]) */
.rpg-r1 .rpg-picker[hidden], .rpg-r1 button.rpg-reward-btn[hidden] { display: none; }
/* css/rider-book.css */
/* R2 Book a friend / R3 Sent to the office (js/rider-book.js), to docs/designs/riders/RiderBook.dc.html and
   RiderSent.dc.html. Phone-first; on a wide screen the page stays a 480px column. */
.rbk-page {
  --rbk-ink: #1B1530;
  --rbk-violet: #4B2EDB;
  --rbk-violet-dark: #3920B0;
  --rbk-label: #5E5878;
  --rbk-line: #CFC9E0;
  --rbk-soft-line: #E6E2F0;
  --rbk-body: #3D3657;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #F6F4FB;
  color: var(--rbk-ink);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.4;
}
.rbk-page * { box-sizing: border-box; }
/* the app's base.css styles every main, label, input and select; undo that here */
.rbk-page main.rbk-main { padding: 0; }
.rbk-page label { display: flex; margin: 0; font: inherit; color: inherit; }
.rbk-page .rbk-input { margin: 0; }
/* the app's global input / button sizes (base.css and others) must not resize the Rider's form (RS1: R2 sizes) */
/* lead-detail.css gives every button min-height 40px on phones with a very specific :not() chain: undo it here */
.rbk-page button { min-height: 0 !important; }
.rbk-page input.rbk-input, .rbk-page select.rbk-input {
  height: 40px;
  min-height: 0;
  padding: 0 10px;
  border-radius: 10px;
  border-color: var(--rbk-line);
  font: 400 15px/1.2 "Figtree", system-ui, sans-serif;
}
.rbk-page select.rbk-input { padding: 0 8px; }
.rbk-page textarea.rbk-input { min-height: 60px; padding: 8px 10px; border-radius: 10px; font: 400 15px/1.35 "Figtree", system-ui, sans-serif; }
.rbk-page label.rbk-tick { display: flex; font-size: 13px; line-height: 1.4; color: var(--rbk-body); }
.rbk-page > * { width: 100%; max-width: 480px; margin-left: auto; margin-right: auto; }
.rbk-page > .rbk-band, .rbk-page > .rbk-preview { max-width: none; }

.rbk-preview {
  background: #FFF4D6;
  color: #7A5300;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  text-align: center;
}

/* dark band */
.rbk-band {
  background: #1B1530;
  color: #FFFFFF;
  padding: 16px max(20px, calc(50% - 220px)) 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.rbk-band-sent { padding-top: 18px; padding-bottom: 22px; gap: 6px; }
.rbk-back {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: #CFC6F7;
  font: 600 13px/1.4 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}
.rbk-back:hover { color: #FFFFFF; }
.rbk-title {
  margin: 0;
  font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.15;
  color: #FFFFFF;
}
.rbk-band-sent .rbk-title { font-size: 26px; }
.rbk-sub { margin: 0; font-size: 14px; color: #D8D3EA; }
.rbk-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #CFC6F7;
}

/* the form */
.rbk-main { flex: 1 0 auto; display: flex; flex-direction: column; }
.rbk-form { flex: 1 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 0; }
.rbk-form > .rbk-tick { margin-bottom: 14px; }
.rbk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rbk-grid-zip { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.rbk-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rbk-label { font-size: 12px; font-weight: 600; color: var(--rbk-label); }
.rbk-section { margin: 2px 0 0; }
.rbk-input {
  height: 40px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--rbk-line);
  border-radius: 10px;
  padding: 0 10px;
  font: 400 15px/1.2 "Figtree", system-ui, sans-serif;
  color: var(--rbk-ink);
  background: #FFFFFF;
}
textarea.rbk-input { height: auto; min-height: 60px; padding: 8px 10px; resize: vertical; }
.rbk-select { padding: 0 8px; }
.rbk-input:focus, .rbk-chip:focus-visible, .rbk-primary:focus-visible, .rbk-secondary:focus-visible, .rbk-back:focus-visible {
  outline: 2px solid var(--rbk-violet);
  outline-offset: 1px;
}
.rbk-more { font-size: 13px; color: var(--rbk-label); }
.rbk-more > summary { cursor: pointer; font-weight: 600; color: var(--rbk-violet); padding: 2px 0; }
.rbk-more[open] > summary { margin-bottom: 8px; }
.rbk-more > .rbk-field { margin-top: 8px; }

/* chips: the "If you know" answers and the times */
.rbk-chip {
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--rbk-line);
  background: #FFFFFF;
  color: var(--rbk-ink);
  font: 600 14px/1 "Figtree", system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.rbk-chip.is-on { background: var(--rbk-violet); border-color: var(--rbk-violet); color: #FFFFFF; }
.rbk-chip-sm { height: 32px; padding: 0 11px; border-radius: 16px; font-size: 13px; }
.rbk-chip-sm.is-no.is-on { background: #A12B2B; border-color: #A12B2B; }
.rbk-checks { display: flex; flex-direction: column; gap: 6px; }
.rbk-check { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rbk-check-label { font-size: 14px; font-weight: 600; }
.rbk-check-chips { display: flex; gap: 6px; }
.rbk-check-chips.rbk-q-chips { flex-wrap: wrap; }

/* RS1: "If you know" says why; the programme's questions for friends */
.rbk-section-head { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
.rbk-section-head .rbk-section { margin: 0; }
.rbk-help { margin: 0; font-size: 12px; color: var(--rbk-label); }
.rbk-questions { display: flex; flex-direction: column; gap: 10px; }
.rbk-question { display: flex; flex-direction: column; gap: 6px; }
.rbk-optional { font-size: 12px; font-weight: 500; color: var(--rbk-label); }

/* RS1: the address as one block */
.rbk-page fieldset.rbk-address { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rbk-address > legend { padding: 0; margin: 0 0 3px; }
.rbk-grid-addr { grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.8fr) minmax(0, 1.1fr); gap: 8px; }
.rbk-field.rbk-sublabel > .rbk-label { font-size: 11px; font-weight: 600; color: #8A84A0; }
.rbk-known-note { background: #FFF4E0; color: #8A4B00; border-radius: 10px; padding: 8px 10px; }

/* RS1: the time picker (C1, docs/designs/riders/Main.dc.html): dated days, then equal time chips */
.rbk-picker { display: flex; flex-direction: column; gap: 8px; }
.rbk-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rbk-day {
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--rbk-line);
  background: #FFFFFF;
  color: var(--rbk-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  cursor: pointer;
  font-family: "Figtree", system-ui, sans-serif;
}
.rbk-day.is-on { background: var(--rbk-violet); border-color: var(--rbk-violet); color: #FFFFFF; }
.rbk-day-dow { font-size: 12px; font-weight: 600; line-height: 1.2; }
.rbk-day-num { font-size: 20px; font-weight: 700; line-height: 1.1; }
.rbk-day-mon { font-size: 11px; font-weight: 500; line-height: 1.2; }
.rbk-days-nav { display: flex; justify-content: space-between; min-height: 18px; }
.rbk-days-nav[hidden] { display: none; }
.rbk-days-nav .rbk-link[hidden] { visibility: hidden; display: inline; }
.rbk-day-head { margin: 2px 0 0; }
.rbk-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rbk-slot {
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--rbk-line);
  background: #FFFFFF;
  color: var(--rbk-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 4px;
  cursor: pointer;
  font-family: "Figtree", system-ui, sans-serif;
}
.rbk-slots.is-parts .rbk-slot { height: 48px; }
.rbk-slot-time { font-size: 16px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.rbk-slot-left { font-size: 12px; font-weight: 600; line-height: 1.2; color: #5E5878; }
.rbk-slot.is-on { background: var(--rbk-violet); border-color: var(--rbk-violet); color: #FFFFFF; }
.rbk-slot.is-on .rbk-slot-left { color: #E4DEFF; }
.rbk-day:focus-visible, .rbk-slot:focus-visible, .rbk-link:focus-visible { outline: 2px solid var(--rbk-violet); outline-offset: 1px; }
.rbk-summary { margin: 0; font-size: 14px; color: var(--rbk-label); text-align: center; }
.rbk-summary.is-set { color: var(--rbk-ink); font-weight: 600; }
.rbk-edit-time { background: #FFFFFF; border: 1px solid var(--rbk-soft-line); border-radius: 10px; padding: 8px 10px; }

/* RS1: how to ask your friend (the office's script) */
.rbk-how { background: #FFFFFF; border: 1px solid var(--rbk-soft-line); border-radius: 12px; padding: 10px 12px; }
.rbk-how > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--rbk-violet); }
.rbk-script { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--rbk-body); white-space: pre-line; }
.rbk-hint { margin: 0; font-size: 13px; color: var(--rbk-label); }
.rbk-link {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  color: var(--rbk-violet);
  font: 600 13px/1.4 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}

.rbk-tick {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #FFFFFF;
  border: 1px solid var(--rbk-soft-line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--rbk-body);
  cursor: pointer;
}
.rbk-tick-box { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--rbk-violet); }

/* the bar at the bottom (stays in view on a phone) */
.rbk-foot {
  position: sticky;
  bottom: 0;
  margin: auto -20px 0;
  padding: 14px 20px 20px;
  border-top-width: 1px;
  background: #FFFFFF;
  border-top: 1px solid var(--rbk-soft-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}
.rbk-foot-sent { position: static; margin: 18px auto 0; padding: 14px 20px 22px; gap: 8px; }
.rbk-primary {
  height: 52px;
  border-radius: 12px;
  border: 0;
  background: var(--rbk-violet);
  color: #FFFFFF;
  font: 700 17px/1 "Figtree", system-ui, sans-serif;
  cursor: pointer;
  width: 100%;
}
.rbk-primary:hover { background: var(--rbk-violet-dark); }
.rbk-primary:disabled { opacity: 0.55; cursor: default; }
.rbk-secondary {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--rbk-line);
  background: #FFFFFF;
  color: var(--rbk-ink);
  font: 600 15px/1 "Figtree", system-ui, sans-serif;
  cursor: pointer;
  width: 100%;
}
.rbk-foot-note { margin: 0; font-size: 12px; color: var(--rbk-label); text-align: center; }
.rbk-msg { margin: 0; font-size: 14px; font-weight: 600; color: #A12B2B; text-align: center; }

.rbk-card {
  background: #FFFFFF;
  border: 1px solid var(--rbk-soft-line);
  border-radius: 14px;
  padding: 14px 16px;
}
.rbk-note { margin: 14px 20px; font-size: 15px; }

/* R3 */
.rbk-page main.rbk-sent-main { padding: 18px 20px 0; gap: 12px; }
.rbk-sent-card { display: flex; flex-direction: column; gap: 8px; }
.rbk-sent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rbk-sent-name { font-size: 17px; font-weight: 700; }
.rbk-badge-wait {
  font-size: 12px;
  font-weight: 700;
  color: #B45309;
  background: #FEF3E2;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.rbk-sent-line { margin: 0; font-size: 14px; color: var(--rbk-body); }
.rbk-sent-ok { margin: 0; font-size: 13px; font-weight: 600; color: #2E7D4F; }
.rbk-sent-known { margin: 0; font-size: 13px; color: #8A4B00; background: #FFF4E0; border-radius: 8px; padding: 6px 8px; }
.rbk-h2 { margin: 0; font-family: "Figtree", system-ui, sans-serif; font-size: 15px; font-weight: 700; color: var(--rbk-ink); }
.rbk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rbk-step { display: flex; gap: 12px; align-items: flex-start; }
.rbk-step-n {
  width: 26px;
  height: 26px;
  border-radius: 13px;
  background: var(--rbk-violet);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rbk-step-text { font-size: 14px; line-height: 1.45; }
.rbk-prize { background: #F1EDFF; border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.rbk-prize-pic {
  width: 64px;
  height: 56px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px dashed #A797F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rbk-violet-dark);
  flex-shrink: 0;
}
.rbk-prize-text { margin: 0; font-size: 14px; line-height: 1.4; color: var(--rbk-violet-dark); }

/* in the app's Rider preview overlay the page scrolls inside the overlay */
.rpg-overlay .rbk-page { min-height: 100%; }

/* SV2 (Nov 18): full spot times ("Full · ask the office") and standby (docs/designs/booking-engine/spots-v2/RiderStandby.dc.html) */
.rbk-slot.is-full { background: #FFF9EC; border-color: #E5B864; }
.rbk-slot.is-full .rbk-slot-left { color: #6E3A00; font-weight: 700; }
.rbk-slot.is-full.is-on { background: #FFF9EC; border-color: #1B1530; color: #1B1530; box-shadow: inset 0 0 0 1px #1B1530; }
.rbk-slot.is-full.is-on .rbk-slot-left { color: #6E3A00; }
.rbk-fullbox { margin: 12px 0 0; border: 1.5px solid #E5B864; background: #FFF9EC; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.rbk-fullbox[hidden] { display: none; }
.rbk-fullbox p { margin: 0; color: #6E3A00; font-size: 14px; line-height: 1.45; }
.rbk-fullbox-title { font-weight: 800; font-size: 15px !important; }
.rbk-fullbox-or { font-size: 13px !important; font-weight: 600; }
.rbk-primary.is-standby { background: #6E3A00; border-color: #6E3A00; }
.rbk-badge-wait.is-standby { background: #FFF1D6; color: #6E3A00; }
/* css/rider-queue.css */
/* O1 Rider bookings to check (js/rider-office.js openRiderQueue), to docs/designs/riders/Queue.dc.html:
   a full-screen page over the app with the dark band, the waiting / done today counts and one white card per request. */
.rq-screen {
  position: fixed;
  inset: 0;
  z-index: 2500;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #F6F4FB;
  color: #1B1530;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.4;
}
.rq-screen.hidden { display: none; }
.rq-screen * { box-sizing: border-box; }
body.rq-screen-open { overflow: hidden; }

.rq-band { position: relative; background: #1B1530; color: #FFFFFF; padding: 28px 24px; }
.rq-band-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.rq-band-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 420px; }
.rq-band-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rq-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #CFC6F7; }
.rq-title {
  margin: 0;
  font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  color: #FFFFFF;
}
.rq-sub { margin: 0; font-size: 15px; color: #D8D3EA; }
.rq-band-right { display: flex; align-items: flex-end; gap: 12px; }
.rq-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  font: 600 13px/1.2 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}
.rq-close:hover { background: rgba(255, 255, 255, 0.16); }
.rq-counts { display: flex; gap: 10px; }
.rq-count {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  min-width: 92px;
}
.rq-count-n { font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif; font-size: 24px; font-weight: 700; line-height: 1.2; }
.rq-count-label { font-size: 12px; color: #D8D3EA; }

.rq-body { max-width: 1208px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.rq-card {
  background: #FFFFFF;
  border: 1px solid #E6E2F0;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.rq-empty-card { font-size: 15px; color: #5E5878; }
.rq-who { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rq-who-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rq-friend { font-size: 18px; font-weight: 700; }
.rq-rel { font-size: 13px; color: #5E5878; }
.rq-line { margin: 0; font-size: 14px; color: #3D3657; }
.rq-comment { color: #5E5878; font-style: italic; }
.rq-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rq-chip { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 10px; background: #F1EDFF; color: #3920B0; }
.rq-chip.is-no { background: #FBECEC; color: #A12B2B; }
.rq-chip.is-unsure { background: #F1F0F5; color: #5E5878; }
.rq-screen .rq-known { margin: 0; font-size: 13px; color: #8A4B00; background: #FFF4E0; border-radius: 8px; padding: 6px 9px; }
.rq-vouch { margin: 0; font-size: 13px; font-weight: 600; }
.rq-vouch.is-ok { color: #2E7D4F; }
.rq-vouch.is-warn { color: #B45309; }

.rq-when { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rq-when-label { font-size: 12px; font-weight: 700; color: #5E5878; text-transform: uppercase; letter-spacing: 0.03em; }
.rq-when-time { font-size: 16px; font-weight: 700; }
.rq-hold { font-size: 13px; color: #5E5878; }
.rq-hold.is-gone { color: #B45309; font-weight: 600; }
.rq-hold.is-standby { color: #6E3A00; font-weight: 700; } /* SV2 */
.rq-sent { font-size: 12px; color: #5E5878; }

.rq-acts { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rq-btn { font-family: "Figtree", system-ui, sans-serif; cursor: pointer; border-radius: 10px; }
.rq-btn:disabled { opacity: 0.6; cursor: default; }
.rq-btn-primary { height: 42px; border: none; background: #4B2EDB; color: #FFFFFF; font-weight: 700; font-size: 15px; }
.rq-btn-primary:hover { background: #3920B0; }
.rq-btn-pair { display: flex; gap: 8px; }
.rq-btn-pair .rq-btn { flex: 1 1 0; height: 40px; font-weight: 600; font-size: 14px; background: #FFFFFF; }
.rq-btn-secondary { border: 1px solid #CFC9E0; color: #1B1530; }
.rq-btn-secondary:hover { border-color: #4B2EDB; }
.rq-btn-decline { border: 1px solid #E8C4C4; color: #A12B2B; }
.rq-btn-decline:hover { background: #FBECEC; }
.rq-open {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 2px 0;
  color: #4B2EDB;
  font: 600 13px/1.4 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}
.rq-btn:focus-visible, .rq-open:focus-visible, .rq-close:focus-visible { outline: 2px solid #8B78FF; outline-offset: 2px; }
.rq-foot { margin: 0; font-size: 13px; color: #5E5878; line-height: 1.5; }

@media (max-width: 640px) {
  .rq-band { padding: 18px 16px 20px; }
  .rq-band-inner { align-items: stretch; }
  .rq-band-text { flex-basis: 100%; padding-right: 64px; }
  .rq-band-right { width: 100%; }
  .rq-counts { width: 100%; }
  .rq-count { flex: 1 1 0; }
  .rq-title { font-size: 25px; }
  .rq-sub { font-size: 14px; }
  .rq-body { padding: 16px; gap: 12px; }
  .rq-card { padding: 16px; gap: 14px; }
  .rq-who, .rq-when, .rq-acts { flex-basis: 100%; }
}

/* RS1: answers to the programme's questions for friends; the Rider's corrections */
.rq-answers { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 10px; font-size: 13px; }
.rq-answers dt { color: #5E5878; font-weight: 600; }
.rq-answers dd { margin: 0; color: #1B1530; font-weight: 600; overflow-wrap: anywhere; }
.rq-edited { font-size: 12px; color: #B45309; }
/* css/qualify.css */
/* QR1: the Qualified checks (Book a demo, Finish panel, Record outcome, lead page card, Office settings) */
.qr-block {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; margin: 10px 0;
}
/* an empty block (no checks, or not loaded) stays out of sight: display:flex above outranked [hidden] */
.qr-block[hidden] { display: none; }
.qr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qr-title { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; color: #1B1530; font-size: 16px; }
.qr-help, .qr-foot { margin: 0; font-size: 13px; color: var(--muted); }
.qr-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.qr-pill.is-yes { background: #E7F6EE; color: #146C43; }
.qr-pill.is-no { background: #FDECEC; color: #A61B1B; }
.qr-pill.is-open { background: #EFEBFF; color: #4B2EDB; }
.qr-list { display: flex; flex-direction: column; gap: 6px; }
.qr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qr-words { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.qr-label { font-weight: 600; color: #1B1530; }
.qr-hint { font-size: 12px; color: var(--muted); }
.qr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.qr-chip { min-height: 40px; min-width: 64px; }
.qr-card-line { margin: 6px 0 10px; }
#lead-qualify-card .qr-head { justify-content: space-between; }
.qr-modal { max-width: 560px; width: calc(100% - 32px); }
.qr-modal-body { padding: 4px 20px 0; }

/* Office settings › Qualified */
.qr-admin-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.qr-admin-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.qr-admin-row.is-off .qr-admin-label { color: var(--muted); text-decoration: line-through; }
.qr-admin-row input[type="text"] { min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); font: inherit; min-width: 0; }
.qr-admin-label { flex: 2 1 180px; }
.qr-admin-es { flex: 1 1 140px; }
.qr-admin-tag { font-size: 12px; font-weight: 600; color: #4B2EDB; }
.qr-admin-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.qr-admin-add > input { flex: 1 1 220px; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); font: inherit; min-width: 0; }
.qr-admin-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }

/* Riders: qualified split and the "already in TULOS" flag */
.rprog-split { display: block; font-size: 12px; color: var(--muted); }
.rprog-split .is-replace { color: #A61B1B; font-weight: 600; }
.rq-known { margin: 4px 0 0; font-size: 13px; color: #8A4B00; background: #FFF4E0; border-radius: 8px; padding: 4px 8px; }
.status-qualify { padding: 8px 20px 0; }
.rprog-split-replace.is-replace { color: #A61B1B; font-weight: 600; }

/* Admin › Rider programmes: a version's qualified settings */
.rpb-qualify { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; margin: 12px 0; background: #fff; }
.rpb-qualify legend { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; color: #1B1530; padding: 0 6px; }
.rpb-qualify .setup-check { display: flex; align-items: center; gap: 6px; min-height: 40px; }
.rpb-qualify-own { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-left: 22px; }

/* NEO f581b51c (Nov 19): the Yes / No / Not sure buttons had no look of their own (plain grey), so a pick looked
   like nothing happened. Same chips as Record outcome's "Still working the lead" choices. */
.qr-chip {
  padding: 0 15px; border-radius: 20px; border: 1.5px solid var(--border-strong); background: #fff;
  color: #1B1530; font: inherit; font-weight: 700; cursor: pointer;
}
.qr-chip:hover { border-color: var(--accent); }
.qr-chip.selected { background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent); border-color: var(--accent); }

/* NEO f581b51c: Record outcome had two small scrolling boxes, so the checks after the first two (Owner, the office's
   own) were hidden inside one. The whole screen now scrolls as one; its header and buttons stay put. */
#status-modal .modal-sheet { overflow-y: auto; overscroll-behavior: contain; }
#status-modal .modal-sheet > .modal-strip { position: sticky; top: 0; z-index: 2; }
#status-modal .modal-sheet > #status-qualify-wrap,
#status-modal .modal-sheet > #status-choose-wrap,
#status-modal .modal-sheet > #status-early-confirm,
#status-modal .modal-sheet > #status-sale-confirm,
#status-modal .modal-sheet > #status-survey-wrap,
#status-modal .modal-sheet > #status-modal-msg { flex: 0 0 auto; overflow: visible; }
/* css/boxes.css */
    .call-list-status,
    .exhibit-status,
    .box-status {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
    }

    .call-list-status .status-dot,
    .exhibit-status .status-dot,
    .box-status .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    #exhibits-lifecycle-filter {
      min-width: 140px;
    }

    .entity-quiet-note {
      font-size: 12px;
      margin-top: 2px;
    }

    #exhibit-view .page-band h1 {
      margin-top: 8px;
    }

    #exhibit-view #exhibit-back-btn {
      color: var(--band-muted);
      font: 600 14px var(--font-body);
      min-height: 44px;
    }

    #exhibit-view #exhibit-back-btn:hover {
      color: #fff;
    }

    #exhibit-view .page-band-sub {
      font-size: 17px;
    }

    .exhibit-page-body {
      position: relative;
      z-index: 1;
      margin: -50px 32px 32px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .exhibit-page-body > .card {
      margin-bottom: 0;
    }

    .exhibit-worth-head {
      display: flex;
      align-items: baseline;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 4px;
    }

    .exhibit-worth-head h2,
    .exhibit-leads-card h2,
    .exhibit-side h3 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
    }

    .exhibit-side h3 {
      font-size: 18px;
      margin-bottom: 8px;
    }

    #exhibit-worth-sub {
      color: var(--muted);
      font-size: 14px;
    }

    .exhibit-funnel,
    .exhibit-money {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
    }

    .exhibit-money {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      margin-top: 10px;
    }

    .exhibit-tile {
      background: #fff;
      border: 1.5px solid var(--border);
      border-radius: 16px;
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .exhibit-tile .stat-label {
      text-transform: none;
      letter-spacing: 0;
      font-weight: 700;
    }

    .exhibit-tile .stat-value {
      font-size: 28px;
    }

    .exhibit-tile.is-sold {
      background: var(--ok-bg);
      border-color: #BFE6CF;
    }

    .exhibit-tile.is-sold .stat-value {
      color: var(--ok);
    }

    .exhibit-bar {
      height: 10px;
      margin: 6px 0 2px;
      border-radius: 5px;
    }

    .exhibit-tile.is-sold .exhibit-bar {
      background: #DDF3E7;
    }

    .exhibit-tile.is-sold .progress-fill {
      background: var(--ok);
    }

    .exhibit-cost-nudge .btn-primary {
      margin-top: 8px;
      align-self: flex-start;
    }

    .exhibit-page-cols {
      display: grid;
      grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
      gap: 16px;
      align-items: start;
    }

    .exhibit-leads-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }

    .exhibit-leads-head-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .exhibit-side {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .exhibit-dealer-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 0;
      border-top: 1px solid #EFECF7;
      font-size: 14px;
    }

    .exhibit-dealer-row:first-child {
      border-top: 0;
    }

    .exhibit-dealer-row b {
      flex: 1;
      min-width: 0;
    }

    .exhibit-dealer-row span {
      color: var(--muted);
      white-space: nowrap;
    }

    .exhibit-dealer-av {
      width: 34px;
      height: 34px;
      border-radius: 17px;
      color: #fff;
      font-weight: 800;
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex: none;
    }

    .exhibit-compare-row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      font-size: 14px;
    }

    .exhibit-compare-row.is-self span:last-child {
      color: var(--ok);
      font-weight: 800;
    }

    .band-btn.is-soon {
      position: relative;
      opacity: 0.45;
    }

    .band-btn.is-soon .soon-tip {
      display: none;
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      z-index: 5;
      background: #fff;
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 6px 10px;
      font: 700 12px var(--font-body);
      white-space: nowrap;
      box-shadow: 0 8px 18px rgba(27, 21, 48, 0.12);
    }

    .band-btn.is-soon:hover .soon-tip,
    .band-btn.is-soon:focus .soon-tip {
      display: block;
    }

    @media (max-width: 1100px) {
      .exhibit-page-body {
        margin: -36px 16px 20px;
      }

      .exhibit-funnel,
      .exhibit-money {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .exhibit-page-cols {
        display: flex;
        flex-direction: column;
      }
    }

    @media (max-width: 759px) {
      .exhibit-funnel,
      .exhibit-money {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .exhibit-paper-row {
      display: flex;
      align-items: center;
      width: 100%;
      min-height: 44px;
      padding: 8px 0;
      border: 0;
      border-top: 1px solid var(--border);
      background: transparent;
      text-align: left;
      font: 600 14px var(--font-body);
      color: var(--text);
    }

    #paper-view .page-band h1 {
      margin-top: 8px;
    }

    #paper-view #paper-back-btn {
      color: var(--band-muted);
      font: 600 14px var(--font-body);
      min-height: 44px;
    }

    #paper-view #paper-back-btn:hover {
      color: #fff;
    }

    .paper-page-body {
      position: relative;
      z-index: 1;
      margin: -50px 32px 32px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      min-width: 0;
    }

    .paper-page-body > .card {
      margin-bottom: 0;
    }

    .paper-reading {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 88px;
      font-weight: 700;
    }

    .paper-reading p {
      margin: 0;
    }

    .paper-spinner {
      width: 22px;
      height: 22px;
      border: 3px solid var(--border-strong);
      border-right-color: var(--accent);
      border-radius: 50%;
      animation: paper-spin 0.7s linear infinite;
      flex: none;
    }

    @keyframes paper-spin {
      to { transform: rotate(360deg); }
    }

    .paper-grid {
      display: grid;
      grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
      gap: 16px;
      align-items: start;
      min-width: 0;
    }

    .paper-sheets {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .paper-sheet-tab {
      min-height: 44px;
      padding: 0 14px;
      border: 0;
      border-radius: 22px;
      background: var(--soft);
      color: var(--accent);
      font: 800 13px var(--font-body);
    }

    .paper-sheet-tab.is-on {
      background: var(--band-bg);
      color: #fff;
    }

    .paper-photo {
      margin-top: 12px;
      min-height: 220px;
      max-height: 520px;
      border-radius: 14px;
      background: #FBFAF5;
      border: 1.5px solid #E8E4D6;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .paper-photo img {
      width: 100%;
      height: auto;
      max-height: 520px;
      object-fit: contain;
      display: block;
    }

    .paper-photo-note {
      margin: 12px 0 0;
      font-size: 13px;
      color: var(--muted);
    }

    .paper-rows-head {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 6px;
    }

    .paper-rows-head h2 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
    }

    .paper-rows-spacer {
      flex: 1;
    }

    .paper-tagged {
      font-size: 14px;
      color: var(--muted);
    }

    .paper-head,
    .paper-person-main {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr);
      gap: 8px 10px;
      align-items: center;
      min-width: 0;
    }

    .paper-head {
      display: none;
    }

    .paper-person {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 12px 0;
      border-top: 1px solid #EFECF7;
      min-width: 0;
    }

    .paper-cell input,
    .paper-cell select,
    .paper-more-field input,
    .paper-more-field select {
      width: 100%;
      min-height: 44px;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      padding: 7px 10px;
      background: #fff;
      color: var(--text);
      font: 500 14px var(--font-body);
    }

    .paper-cell {
      min-width: 0;
    }

    .paper-cell[data-slot="name"] {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 8px;
    }

    .paper-cell.is-unclear input,
    .paper-cell.is-unclear select,
    .paper-more-field.is-unclear input,
    .paper-more-field.is-unclear select {
      border-color: #F2B8A6;
      background: #FFF4EF;
    }

    .paper-person.is-out .paper-cell input,
    .paper-person.is-out .paper-cell select,
    .paper-person.is-out .paper-dash,
    .paper-person.is-out .paper-chip,
    .paper-person.is-out .paper-other {
      color: #9A94AE;
    }

    .paper-check {
      width: 44px;
      height: 44px;
      border: 0;
      border-radius: 10px;
      background: var(--accent);
      color: #fff;
      font: 800 16px var(--font-body);
    }

    .paper-check.is-off {
      background: #fff;
      border: 1.5px solid var(--border-strong);
      color: transparent;
    }

    .paper-person.is-out .paper-check.is-off {
      background: var(--border-strong);
    }

    .paper-mobile-label,
    .paper-field-label,
    .paper-more-field > span {
      display: block;
      margin-bottom: 4px;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.04em;
      color: var(--muted);
    }

    .paper-note {
      display: flex;
      align-items: flex-start;
      flex-wrap: wrap;
      gap: 6px;
      min-width: 0;
      overflow: visible;
      font-size: 14px;
    }

    .paper-note-status {
      flex: 1 1 100%;
      min-width: 0;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      white-space: normal;
      line-height: 1.35;
      font-weight: 700;
    }

    .paper-note-status.is-clamped {
      cursor: pointer;
    }

    .paper-note-chips {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      gap: 6px;
      min-width: 0;
      overflow: visible;
    }

    .paper-note-chips::-webkit-scrollbar {
      display: none;
    }

    .paper-note-chips .paper-chip,
    .paper-chip {
      flex: none;
      max-width: 100%;
      height: auto;
      min-height: 32px;
      padding: 6px 10px;
      border-radius: 16px;
      border: 1px solid var(--border);
      background: #F4F2FB;
      color: #5E5873;
      font: 700 12px/1.3 var(--font-body);
      white-space: normal;
      text-align: left;
    }

    .paper-chip.coral {
      background: var(--attention-bg);
      color: var(--attention);
      border-color: #F2B8A6;
    }

    .paper-extras {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
      padding-left: 54px;
    }

    /* PS1: referral and Instant Set sheets: referrer, dealer and demo under each person */
    .paper-link-line {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px 14px;
      min-width: 0;
      padding: 2px 0 6px 54px;
      color: var(--muted);
      font: 500 13px var(--font-body);
    }

    .paper-link-bit b {
      color: var(--ink, #1B1530);
      font-weight: 700;
    }

    .paper-link-bit.is-amber {
      color: var(--wait);
    }

    /* IL1: an Instant Set row whose customer's demo wasn't found */
    .paper-link-bit.is-bad,
    .paper-link-bit.is-bad b {
      color: #b42318;
    }

    .paper-instaset-from {
      display: contents;
    }

    .paper-instaset-pick {
      flex-basis: 100%;
      display: grid;
      gap: 8px;
      margin-top: 6px;
      padding: 10px 12px;
      border: 1px solid #f3c8c2;
      border-radius: 10px;
      background: #fff8f7;
    }

    .paper-instaset-pick-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .paper-link-bit input[type="date"],
    .paper-link-bit input[type="time"] {
      display: inline-block;
      width: auto;
      min-height: 36px;
      margin-left: 4px;
      padding: 4px 8px;
      font: 600 13px var(--font-body);
    }

    .paper-link-warn {
      color: var(--wait);
    }

    .paper-answer-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .paper-unmatched-line {
      align-self: flex-start;
      min-height: 44px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--accent);
      font: 700 14px var(--font-body);
      text-align: left;
    }

    button.paper-other-line {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      width: 100%;
      height: auto;
      min-height: 0;
      max-height: none;
      margin: 0;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: var(--muted);
      font: 500 13px/1.35 var(--font-body);
      text-align: left;
      overflow: hidden;
      white-space: normal;
    }

    input.paper-other {
      width: 100%;
      height: 28px;
      min-height: 28px;
      margin: 0;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: var(--muted);
      font: 500 13px var(--font-body);
      text-overflow: ellipsis;
    }

    input.paper-other:focus {
      outline: none;
      border: 0;
      border-bottom: 1px solid var(--border);
    }

    .paper-popover {
      position: fixed;
      z-index: 70;
      max-height: min(70vh, 360px);
      overflow: auto;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: 0 8px 24px rgba(27, 21, 48, 0.14);
      padding: 8px;
    }

    .paper-popover-kicker {
      margin: 4px 8px 8px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .paper-popover-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-height: 240px;
      overflow: auto;
    }

    .paper-popover-choice,
    .paper-popover-back,
    .paper-popover-quiet {
      width: 100%;
      min-height: 44px;
      padding: 0 12px;
      border: 0;
      border-radius: 10px;
      background: transparent;
      color: var(--text);
      font: 700 14px var(--font-body);
      text-align: left;
    }

    .paper-popover-choice:hover,
    .paper-popover-back:hover,
    .paper-popover-choice.is-on {
      background: var(--soft);
    }

    .paper-popover-choice.is-on {
      color: var(--accent);
    }

    .paper-popover-quiet {
      color: var(--muted);
      margin-top: 4px;
    }

    .paper-popover-input {
      width: 100%;
      min-height: 44px;
      margin-bottom: 6px;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      padding: 7px 10px;
      font: 500 14px var(--font-body);
    }

    .paper-popover-name {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }

    .paper-popover-list + .paper-popover-name,
    .paper-popover-list + .paper-popover-input {
      margin-top: 8px;
    }

    textarea.paper-popover-input {
      min-height: 88px;
      resize: vertical;
    }

    .paper-popover-check {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      padding: 0 12px;
      font-weight: 700;
    }

    .paper-photo-tools {
      display: flex;
      gap: 8px;
      margin-top: 10px;
    }

    .paper-rotate {
      min-height: 44px;
      padding: 0 14px;
      border-radius: 22px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--text);
      font: 700 14px var(--font-body);
    }

    .paper-photo-canvas {
      max-width: 100%;
      max-height: 480px;
      width: auto;
      height: auto;
      display: block;
    }

    #paper-band-actions .band-btn {
      min-height: 44px;
    }

    .paper-note-bad { color: var(--attention); font-weight: 700; }
    .paper-note-wait { color: var(--wait); font-weight: 700; }
    .paper-note-ok { color: var(--ok); font-weight: 700; }
    .paper-note-muted { color: var(--muted); }

    .paper-alts {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 6px 0 8px;
    }

    .paper-alt {
      min-height: 44px;
      padding: 0 12px;
      border-radius: 22px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--accent);
      font: 700 13px var(--font-body);
    }

    .paper-more {
      grid-column: 1 / -1;
      background: var(--bg);
      border-radius: 14px;
      padding: 4px 12px 8px;
    }

    .paper-more summary {
      min-height: 44px;
      display: flex;
      align-items: center;
      cursor: pointer;
      font-weight: 700;
    }

    .paper-more-body {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding-bottom: 8px;
    }

    .paper-dash {
      display: flex;
      align-items: center;
      min-height: 44px;
      color: var(--muted);
    }

    .paper-foot {
      margin: 12px 0 0;
      padding: 12px 14px;
      background: var(--bg);
      border-radius: 14px;
      font-size: 14px;
    }

    .paper-file {
      display: block;
      width: 100%;
      min-height: 44px;
    }

    #paper-upload-form .modal-with-picker-body > * + * {
      margin-top: 16px;
    }

    .paper-upload-summary {
      margin: 0;
      font-weight: 700;
      color: var(--text);
    }

    .paper-upload-pair {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 16px;
      align-items: start;
    }

    .paper-upload-field > label {
      display: block;
      margin-bottom: 6px;
    }

    #paper-upload-form .paper-upload-field select,
    #paper-upload-form .paper-upload-field input,
    #paper-upload-dealer-picker input {
      margin-bottom: 0;
    }

    .paper-upload-help {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }

    .paper-drop {
      position: relative;
    }

    .paper-file-input {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      border: 0;
    }

    .paper-drop-hit {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      width: 100%;
      min-height: 128px;
      padding: 16px;
      border: 1.5px dashed var(--border-strong);
      border-radius: 16px;
      background: var(--bg);
      color: var(--text);
      cursor: pointer;
    }

    .paper-drop.is-over .paper-drop-hit {
      border-color: var(--accent);
      background: #fff;
    }

    .paper-drop-icon {
      color: var(--accent);
    }

    .paper-drop-title {
      font-weight: 700;
    }

    .paper-drop-sub {
      color: var(--muted);
      font-size: 13px;
    }

    .paper-thumbs {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 12px;
    }

    .paper-thumb {
      position: relative;
      width: 72px;
      height: 72px;
    }

    .paper-thumb img {
      width: 72px;
      height: 72px;
      object-fit: cover;
      border-radius: 12px;
      display: block;
      background: var(--bg);
    }

    button.paper-thumb-x {
      position: absolute;
      top: -6px;
      right: -6px;
      width: 44px;
      height: 44px;
      min-height: 44px;
      padding: 0;
      border: 0;
      border-radius: 22px;
      background: transparent;
      color: transparent;
    }

    button.paper-thumb-x::after {
      content: "×";
      position: absolute;
      top: 0;
      right: 0;
      width: 22px;
      height: 22px;
      border-radius: 11px;
      background: var(--text);
      color: #fff;
      font: 700 16px/22px var(--font-body);
      text-align: center;
    }

    .paper-upload-count {
      margin: 8px 0 0;
      font-weight: 700;
      font-size: 14px;
    }

    /* NEO (Nov 18): photo tips, the teach-first prompt and the how-to card */
    .paper-photo-tips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      list-style: none;
      margin: 10px 0 0;
      padding: 0;
    }

    .paper-photo-tips li {
      padding: 4px 10px;
      border-radius: 999px;
      background: #F1EEFC;
      color: #1B1530;
      font-size: 13px;
    }

    .paper-howto {
      margin-top: 10px;
      font-size: 14px;
    }

    .paper-howto summary {
      cursor: pointer;
      color: #4B2EDB;
      font-weight: 600;
      min-height: 32px;
      display: flex;
      align-items: center;
    }

    .paper-howto ol {
      margin: 6px 0 0;
      padding-left: 20px;
      line-height: 1.45;
    }

    .paper-howto li + li {
      margin-top: 4px;
    }

    .paper-teach-ask,
    .paper-teach-intro {
      margin-top: 12px;
      padding: 14px 16px;
      border-radius: 14px;
      border: 1.5px solid #4B2EDB;
      background: #F6F4FE;
    }

    .paper-teach-intro {
      margin: 0 0 14px;
    }

    .paper-teach-ask-title {
      margin: 0;
      font: 700 16px "Bricolage Grotesque", var(--font-body);
      color: #1B1530;
    }

    .paper-teach-ask-sub {
      margin: 6px 0 0;
      font-size: 14px;
      line-height: 1.45;
      color: #1B1530;
    }

    .paper-teach-ask-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
    }

    .paper-form-save.is-teaching {
      border: 1.5px solid #4B2EDB;
      border-radius: 14px;
      padding: 14px 16px;
      background: #F6F4FE;
    }

    .paper-teach-next {
      margin-top: 8px;
    }

    .paper-map-margin {
      display: flex;
      gap: 10px;
      align-items: flex-start;
      margin: 0 0 12px;
      padding: 10px 12px;
      border-radius: 12px;
      background: #F6F4FE;
      cursor: pointer;
      font-size: 14px;
      line-height: 1.4;
    }

    .paper-map-margin input {
      width: 18px;
      height: 18px;
      margin: 2px 0 0;
      flex: none;
    }

    .paper-map-margin strong,
    .paper-map-margin span span {
      display: block;
    }

    .paper-map-margin span span {
      color: var(--muted);
      margin-top: 2px;
    }

    #paper-upload-submit:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }

    #paper-upload-exhibit-lock {
      display: none;
    }

    @media (max-width: 700px) {
      .paper-upload-pair {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    #paper-retry-btn {
      align-self: flex-start;
      min-height: 44px;
    }

    .paper-form-save {
      margin-top: 16px;
      padding: 14px;
      background: var(--bg);
      border-radius: 14px;
    }

    .paper-form-save h3,
    .paper-form-lead {
      margin: 0 0 10px;
      font-size: 16px;
      font-weight: 700;
    }

    .paper-form-using {
      margin: 12px 0 0;
      color: var(--text);
      font-size: 14px;
      font-weight: 700;
    }

    .paper-reread {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 12px;
      align-items: center;
      margin-top: 12px;
    }

    .paper-reread label {
      font-weight: 700;
    }

    .paper-reread select {
      flex: 1 1 180px;
      min-height: 44px;
      margin: 0;
    }

    .paper-band-form:not([hidden]) {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 12px;
      align-items: center;
    }

    #paper-band-form .link-btn {
      min-height: 44px;
    }

    .paper-form-save-row {
      display: flex;
      flex-wrap: wrap;
      gap: 12px 16px;
      align-items: center;
    }

    .paper-form-save-row .paper-map-input {
      flex: 1 1 200px;
      margin: 0;
    }

    .paper-form-review {
      min-height: 44px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--accent);
      font: 700 14px var(--font-body);
    }

    .paper-map-frame {
      display: flex;
      gap: 16px;
      align-items: flex-start;
      margin-top: 8px;
    }

    .paper-map-frame.has-sample .paper-map-table-wrap {
      flex: 1 1 auto;
      min-width: 0;
    }

    .paper-map-sample {
      width: 180px;
      max-height: 360px;
      object-fit: contain;
      object-position: top;
      border-radius: 12px;
      background: var(--bg);
      flex: none;
    }

    .paper-map-head,
    .paper-map-row {
      display: grid;
      grid-template-columns: 10px minmax(0, 1.2fr) minmax(140px, 0.9fr) 44px;
      gap: 8px;
      align-items: center;
    }

    .paper-map-row .paper-map-dot { grid-column: 1; grid-row: 1; }
    .paper-map-row .paper-map-label { grid-column: 2; grid-row: 1; }
    .paper-map-row .paper-map-goes { grid-column: 3; grid-row: 1; }
    .paper-map-row .paper-map-x { grid-column: 4; grid-row: 1; }

    .paper-map-head {
      min-height: 28px;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.04em;
      color: var(--muted);
    }

    .paper-map-row {
      min-height: 44px;
      border-top: 1px solid var(--border);
    }

    .paper-map-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: transparent;
    }

    .paper-map-dot.is-on {
      background: #E8492F;
    }

    .paper-map-label,
    .paper-map-x,
    .paper-map-chip {
      min-height: 44px;
    }

    .paper-map-label {
      width: 100%;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--text);
      font: 600 14px var(--font-body);
      text-align: left;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .paper-map-goes select {
      width: 100%;
      margin: 0;
      min-height: 44px;
    }

    .paper-map-chips {
      grid-column: 2 / 4;
      grid-row: 2;
      display: flex;
      flex-flow: row wrap;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    .paper-map-chip {
      width: auto;
      max-width: 100%;
      flex: 0 1 auto;
      height: auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding: 4px 8px;
      border-radius: 14px;
      border: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      font: 700 12px/1.3 var(--font-body);
      text-align: left;
    }

    .paper-map-x {
      width: 44px;
      height: 44px;
      padding: 0;
      border: 0;
      border-radius: 22px;
      background: transparent;
      color: var(--muted);
      font: 700 20px var(--font-body);
    }

    .paper-note-full {
      margin: 4px 8px;
      font-size: 14px;
      line-height: 1.4;
    }

    @media (max-width: 800px) {
      .paper-map-frame {
        flex-direction: column;
      }

      .paper-map-sample {
        width: 120px;
      }

      .paper-map-head,
      .paper-map-row {
        grid-template-columns: 10px minmax(0, 1fr) 44px;
      }

      .paper-map-row .paper-map-goes {
        grid-column: 2;
        grid-row: 2;
      }

      .paper-map-row .paper-map-chips {
        grid-column: 2 / 4;
        grid-row: 3;
      }

      .paper-map-row .paper-map-x {
        grid-column: 3;
        grid-row: 1;
      }

      .paper-map-row .paper-map-label {
        grid-column: 2;
        grid-row: 1;
      }

      .paper-map-head span:nth-child(3),
      .paper-map-head span:nth-child(4) {
        display: none;
      }
    }

    .paper-map-item {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 12px 0;
      border-top: 1px solid var(--border);
    }

    .paper-map-input,
    .paper-map-item select,
    #paper-forms-editor > input,
    #paper-forms-editor select,
    #paper-upload-form-select {
      min-height: 44px;
      margin-bottom: 0;
    }

    .paper-map-option {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 8px;
      align-items: center;
    }

    .paper-map-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .paper-map-actions .btn-secondary,
    .paper-map-actions .btn-ghost,
    .paper-map-actions .btn-primary,
    .paper-map-item .btn-secondary,
    .paper-map-item .btn-ghost,
    .paper-form-save .btn-primary {
      min-height: 44px;
    }

    .paper-form-card {
      display: flex;
      gap: 12px;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .paper-form-card-body {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
      min-width: 0;
    }

    .paper-form-sample {
      width: 72px;
      height: 96px;
      object-fit: cover;
      border-radius: 10px;
      background: var(--bg);
      flex: none;
    }

    .paper-form-sample-empty {
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: 12px;
      color: var(--muted);
      padding: 6px;
    }

    .paper-form-sample-edit {
      width: 120px;
      height: 160px;
      margin-bottom: 12px;
    }

    #paper-forms-editor {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    @media (min-width: 901px) {
      .paper-head,
      .paper-person-main {
        grid-template-columns: 44px minmax(140px, 1.3fr) minmax(120px, 1fr) minmax(72px, 0.55fr) minmax(140px, 1.4fr);
        align-items: start;
      }

      .paper-head {
        display: grid;
        padding: 0 6px 4px;
        border-top: 0;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.05em;
        color: var(--muted);
      }

      .paper-person {
        padding: 10px 6px;
      }

      .paper-mobile-label {
        display: none;
      }

      .paper-note,
      .paper-cell[data-slot="name"],
      .paper-cell[data-slot="phone"],
      .paper-cell[data-slot="zip"] {
        grid-column: auto;
      }
    }

    @media (max-width: 900px) {
      .paper-page-body {
        margin: -36px 16px 24px;
      }

      .paper-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .paper-cell[data-slot="phone"],
      .paper-cell[data-slot="zip"],
      .paper-note {
        grid-column: 1 / -1;
      }

      .paper-extras,
      .paper-link-line {
        padding-left: 0;
      }
    }

    .kiosk-link-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 44px;
      padding: 8px 0;
      border-top: 1px solid var(--border);
    }

    .kiosk-link-row div {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .kiosk-link-row span {
      color: var(--muted);
      font-size: 13px;
    }

    .kiosk-link-row .btn-secondary {
      min-height: 44px;
      flex: none;
    }

    .kiosk-qr-dialog {
      text-align: center;
    }

    .kiosk-qr-host {
      display: flex;
      justify-content: center;
      margin: 12px 0 16px;
      min-height: 240px;
    }

    .kiosk-qr-host img,
    .kiosk-qr-host canvas {
      width: 240px;
      height: 240px;
    }

    .kiosk-qr-pick-label,
    #kiosk-qr-pick {
      display: block;
      width: 100%;
      text-align: left;
    }

    #kiosk-qr-pick.hidden,
    .kiosk-qr-pick-label.hidden {
      display: none;
    }

    .kiosk-qr-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
    }

    .kiosk-qr-actions .btn-secondary {
      min-height: 44px;
    }

    #kiosk-start-pin {
      height: 56px;
      font-size: 28px;
      font-weight: 800;
      letter-spacing: 0.35em;
      text-align: center;
      -webkit-text-security: disc;
      text-security: disc;
    }

    #kiosk-start-go {
      min-height: 48px;
      margin-top: 8px;
    }

    body.view-capture {
      background: var(--bg);
    }

    .capture-head {
      background: #1B1530;
      color: #fff;
      padding: 16px 28px;
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .capture-head-main { flex: 1; min-width: 0; }

    .capture-kicker {
      margin: 0;
      font-size: 14px;
      color: #C9C1F2;
      font-weight: 700;
    }

    .capture-head h1 {
      margin: 0;
      color: #fff;
      font-family: var(--font-display);
      font-size: 28px;
      font-weight: 800;
    }

    .capture-count {
      text-align: right;
    }

    .capture-count b {
      display: block;
      font-family: var(--font-display);
      font-size: 34px;
      font-weight: 800;
      line-height: 1;
    }

    .capture-count span {
      font-size: 13px;
      color: #C9C1F2;
      font-weight: 700;
    }

    .capture-exit {
      min-height: 44px;
      border-radius: 22px;
      border: 1.5px solid #4A4268;
      background: transparent;
      color: #fff;
      font: 700 14px var(--font-body);
      padding: 0 16px;
      cursor: pointer;
    }

    .capture-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
      gap: 20px;
      padding: 22px 28px 32px;
    }

    .capture-card {
      background: #fff;
      border-radius: 24px;
      padding: 22px 24px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .capture-card h2 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 26px;
      font-weight: 800;
    }

    .capture-side {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .capture-row {
      display: grid;
      gap: 12px;
    }

    .capture-row.two { grid-template-columns: 1fr 1fr; }
    .capture-row.phone { grid-template-columns: 1.4fr 1fr; }

    .capture-card label {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 15px;
      font-weight: 700;
      color: var(--muted);
    }

    .capture-card input:not([type="checkbox"]) {
      height: 56px;
      border-radius: 14px;
      border: 2px solid var(--border-strong);
      background: #fff;
      font: 600 20px var(--font-body);
      color: var(--text);
      padding: 0 16px;
    }

    .capture-label {
      font-size: 15px;
      font-weight: 700;
      color: var(--muted);
    }

    .capture-tags {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .capture-tag {
      min-height: 48px;
      border-radius: 24px;
      border: 2px solid var(--border-strong);
      background: #fff;
      font: 700 16px var(--font-body);
      padding: 0 18px;
      color: var(--text);
      cursor: pointer;
    }

    .capture-tag.is-on {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }

    .capture-consent {
      flex-direction: row !important;
      align-items: center;
      gap: 10px !important;
      font-size: 16px !important;
      font-weight: 600 !important;
      color: var(--text) !important;
    }

    .capture-consent input {
      width: 26px;
      height: 26px;
      margin: 0;
      accent-color: var(--accent);
      flex: none;
    }

    .capture-save,
    .capture-switch {
      min-height: 44px;
      border: 0;
      color: #fff;
      font-weight: 800;
      cursor: pointer;
    }

    .capture-save {
      height: 68px;
      border-radius: 34px;
      background: var(--accent);
      font-size: 22px;
      margin-top: 4px;
    }

    .capture-save:disabled { opacity: 0.7; }

    .capture-hand {
      flex-direction: row;
      align-items: center;
      gap: 16px;
    }

    .capture-hand b {
      font-family: var(--font-display);
      font-size: 20px;
    }

    .capture-hand p {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 15px;
      font-weight: 500;
    }

    .capture-qr {
      width: 120px;
      height: 120px;
      flex: none;
      cursor: pointer;
    }

    .capture-qr img,
    .capture-qr canvas {
      width: 120px;
      height: 120px;
    }

    .capture-switch {
      margin-top: 10px;
      height: 44px;
      border-radius: 22px;
      background: #1B1530;
      font-size: 15px;
      padding: 0 18px;
    }

    .capture-today-row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 0;
      border-top: 1px solid #EFECF7;
      font-size: 16px;
    }

    .capture-today-row span { color: var(--muted); }

    .capture-offline-note,
    .capture-waiting {
      margin: 8px 0 0;
      font-size: 14px;
      color: var(--muted);
      font-weight: 600;
    }

    .capture-waiting {
      background: #fff;
      border-radius: 999px;
      padding: 10px 14px;
      align-self: flex-start;
    }

    @media (max-width: 900px) {
      .capture-grid { grid-template-columns: 1fr; padding: 16px; }
      .capture-head { flex-wrap: wrap; padding: 16px; }
      .capture-hand { flex-direction: column; align-items: flex-start; }
    }

    @media (max-width: 560px) {
      .capture-row.two,
      .capture-row.phone { grid-template-columns: 1fr; }
      .capture-head h1 { font-size: 24px; }
    }

    /* EX1: Merge into… (exhibits) */
    .exhibit-merge-body {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 16px 20px 20px;
    }

    .exhibit-merge-body label {
      font-weight: 700;
      font-size: 13px;
    }

    .exhibit-merge-body .field-hint {
      margin: 0;
    }

    .exhibit-merge-body select {
      width: 100%;
    }

    .exhibit-merge-preview {
      border: 1px solid #E6E2F2;
      border-radius: 10px;
      padding: 12px 14px;
      background: #F8F7FC;
      font-size: 14px;
      line-height: 1.5;
      color: #1B1530;
    }

    .exhibit-merge-preview:empty {
      display: none;
    }

    .exhibit-merge-preview ul {
      margin: 6px 0 0;
      padding-left: 18px;
    }

    .exhibit-merge-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 6px;
    }

    /* Link referrer (lead page) */
    .link-referrer-btn {
      font-size: 13px;
      margin-left: 6px;
    }

    .link-referrer-body {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 16px 20px 20px;
    }

    .link-referrer-body label {
      font-weight: 700;
      font-size: 13px;
    }

    .link-referrer-body .field-hint {
      margin: 0;
    }

    .link-referrer-body input[type="search"] {
      width: 100%;
    }

    .link-referrer-results {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-height: 320px;
      overflow: auto;
    }

    .link-referrer-result {
      display: grid;
      grid-template-columns: 1fr auto;
      grid-template-areas: "name pill" "meta pill";
      align-items: center;
      gap: 2px 10px;
      text-align: left;
      border: 1px solid #E6E2F2;
      border-radius: 10px;
      background: #fff;
      padding: 10px 12px;
      min-height: 44px;
      cursor: pointer;
      color: #1B1530;
    }

    .link-referrer-result:hover,
    .link-referrer-result:focus-visible {
      border-color: #4B2EDB;
    }

    .link-referrer-name {
      grid-area: name;
      font-weight: 700;
    }

    .link-referrer-meta {
      grid-area: meta;
      font-size: 13px;
      color: #6B6580;
    }

    .link-referrer-result .status-pill {
      grid-area: pill;
    }

    /* RM1: Match typed referrers */
    .referral-match-entry {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid #E6E2F2;
    }

    #referral-match-filter {
      min-width: 220px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.3);
      padding: 8px 14px;
    }

    .referral-match-body {
      display: grid;
      grid-template-columns: minmax(240px, 340px) 1fr;
      gap: 16px;
      align-items: start;
    }

    .referral-match-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-height: 70vh;
      overflow: auto;
    }

    .referral-match-name {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      text-align: left;
      border: 1px solid transparent;
      border-radius: 8px;
      background: none;
      padding: 8px 10px;
      min-height: 40px;
      cursor: pointer;
      color: #1B1530;
      font: inherit;
    }

    .referral-match-name:hover {
      background: #F4F2FB;
    }

    .referral-match-name.is-chosen {
      border-color: #4B2EDB;
      background: #F4F2FB;
    }

    .referral-match-count {
      font-weight: 700;
      color: #4B2EDB;
      font-variant-numeric: tabular-nums;
    }

    .referral-match-candidates {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin: 12px 0;
    }

    .referral-match-candidate {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      border: 1px solid #E6E2F2;
      border-radius: 10px;
      padding: 10px 12px;
    }

    .referral-match-candidate.is-likely {
      border-color: #4B2EDB;
      background: #F8F7FC;
    }

    .referral-match-cand-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .referral-match-cand-name {
      font-weight: 700;
      text-align: left;
    }

    .referral-match-cand-meta,
    .referral-match-cand-why {
      font-size: 13px;
      color: #6B6580;
    }

    .referral-match-cand-why {
      color: #4B2EDB;
    }

    .referral-match-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    @media (max-width: 760px) {
      .referral-match-body {
        grid-template-columns: 1fr;
      }

      .referral-match-list {
        max-height: 40vh;
      }

      #referral-match-filter {
        min-width: 0;
        width: 100%;
      }
    }

    /* CL3: Archive / Move back / Delete on finished call lists */
    #call-lists-body td:last-child { text-align: right; }
    #call-lists-body td:last-child > button { margin: 2px 0 2px 6px; white-space: nowrap; }
    #call-lists-body .call-list-delete-btn { color: #B42318; }
    #call-lists-body .call-list-delete-btn:hover:not(:disabled) { border-color: #B42318; }
/* css/call-lists.css */
    #call-list-detail-view .header-left {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px 16px;
    }

    .call-list-title-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin-top: 10px;
    }

    .call-list-title-row h1 {
      margin: 0;
    }

    .call-list-band-bar {
      max-width: 420px;
      margin: 8px 0 6px;
    }

    .call-list-progress-cell {
      min-width: 160px;
    }

    .call-list-progress-cell > span:first-child {
      display: block;
      font-size: 12px;
      margin-bottom: 6px;
      white-space: normal;
      line-height: 1.3;
    }

    .call-list-progress-bar,
    .call-list-band-bar {
      height: 6px;
      background: #D0D4DC;
      border-radius: 3px;
      overflow: hidden;
    }

    .page-band .call-list-band-bar {
      background: var(--band-line);
    }

    #callbacks-panel {
      padding: 8px 32px 32px;
    }

    .callback-group {
      margin: 0 0 22px;
    }

    .callback-group-title {
      display: block;
      margin: 0 0 8px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #5A6373;
      line-height: 1.3;
    }

    .callback-group-overdue .callback-group-title {
      color: #B42318;
    }

    #callbacks-panel .band-card {
      margin: 0;
    }

    .callback-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      justify-content: space-between;
      align-items: flex-start;
      padding: 12px 16px;
      border-bottom: 1px solid var(--border);
    }

    .callback-row:last-child { border-bottom: 0; }

    .callback-row-main {
      min-width: 0;
      flex: 1 1 220px;
    }

    .callback-meta {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .callback-row-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .callback-call-btn {
      text-decoration: none;
    }

    a.callback-call-btn.disabled {
      pointer-events: none;
      opacity: 0.5;
    }

    @media (max-width: 767px) {
      .callback-row {
        flex-direction: column;
      }
      .callback-call-btn {
        min-height: 44px;
        width: 100%;
      }
      .callback-row-actions { width: 100%; }
      .callback-row-actions .btn-secondary { flex: 1 1 auto; min-height: 44px; }
    }

    .on-list-muted {
      color: var(--muted);
    }

    .call-list-scope {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 12px;
    }

    .call-list-scope-opt {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      margin: 0;
      padding: 0 12px;
      border: 1.5px solid var(--border-strong);
      border-radius: 14px;
      font-weight: 700;
    }

    .call-list-scope-opt input { margin: 0; }

    .call-list-warn {
      margin: 0 0 12px;
      padding: 10px 12px;
      border-radius: 14px;
      background: #fff4d6;
      color: #7a5300;
      font-weight: 700;
    }

    .call-list-skip-note {
      display: block;
      margin-top: 4px;
      color: #A3321E;
      font-size: 13px;
      font-weight: 700;
    }

/* e48ee5b0: the spouse's name under the lead's name on a call list */
.call-list-spouse { display: block; font-size: 12px; color: var(--muted, #6b6880); font-weight: 400; margin-top: 2px; }

/* c75099da (MPA): the spouse's name on call-back rows */
.callback-spouse { font-size: 12px; color: var(--muted, #6b6880); font-weight: 400; }

/* 6d993292 (MPA): the customer's other leads, on the calling screen */
.calling-twins { margin: 8px 0 4px; padding: 8px 10px; border-left: 4px solid #4B2EDB; background: #f4f1ff; border-radius: 6px; font-size: 13px; }
.calling-twins-title { margin: 0 0 4px; font-weight: 600; color: #1B1530; }
.calling-twins-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: #4a4560; }
/* css/today.css */
    #today-perf-slot {
      position: relative;
      z-index: 1;
      margin: 0 32px 16px;
    }

    #today-perf-slot.is-open {
      margin-top: -50px;
    }

    #today-perf-slot-dealer {
      margin: 0;
    }

    .today-perf {
      margin-bottom: 0;
    }

    .today-perf-head {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 12px 16px;
      margin-bottom: 16px;
    }

    .today-perf-head h2 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
    }

    .today-perf-tools {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }

    .today-perf-dealer {
      width: 200px;
      min-width: 160px;
    }

    .today-perf-dealer .dealer-picker-chips {
      display: none;
    }

    .today-perf-dealer .dealer-picker-field input[type="search"] {
      min-height: 40px;
      font-size: 14px;
    }

    .today-perf-switch {
      display: inline-flex;
      padding: 4px;
      border-radius: 999px;
      background: var(--soft);
      gap: 2px;
    }

    .today-perf-switch button {
      min-height: 36px;
      padding: 0 14px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: var(--muted);
      font: 700 14px var(--font-body);
      cursor: pointer;
    }

    .today-perf-switch button.is-on {
      background: #fff;
      color: var(--text);
      box-shadow: 0 1px 2px rgba(27, 21, 48, 0.08);
    }

    .today-perf-nums {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 12px 16px;
    }

    .today-perf-num-label {
      margin: 0;
      font-size: 14px;
      font-weight: 700;
      color: var(--muted);
    }

    .today-perf-num-value {
      margin: 2px 0 0;
      font-family: var(--font-display);
      font-size: 32px;
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 1.1;
    }

    .today-perf-num-delta {
      margin: 4px 0 0;
      font-size: 14px;
    }

    .today-perf-rates {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      margin-top: 16px;
    }

    .today-perf-rate {
      border-radius: 14px;
      padding: 12px 14px;
      background: var(--ok-bg);
    }

    .today-perf-rate.is-bad {
      background: var(--attention-bg);
    }

    .today-perf-rate.is-shy {
      background: var(--soft);
    }

    .today-perf-rate-value {
      margin: 0;
      font-family: var(--font-display);
      font-size: 28px;
      font-weight: 800;
      line-height: 1.1;
      color: var(--ok);
    }

    .today-perf-rate.is-bad .today-perf-rate-value {
      color: var(--attention);
    }

    .today-perf-rate.is-shy .today-perf-rate-value,
    .today-perf-rate.is-shy .today-perf-rate-label,
    .today-perf-rate.is-shy .today-perf-rate-formula {
      color: var(--muted);
    }

    .today-perf-rate-label {
      margin: 4px 0 0;
      font-size: 15px;
      font-weight: 700;
    }

    .today-perf-rate-formula {
      margin: 2px 0 0;
      font-size: 14px;
      color: var(--muted);
    }

    .today-right-now:empty {
      display: none;
    }

    .today-stat-btns {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 16px;
    }

    .today-stat-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 44px;
      padding: 8px 16px;
      border-radius: 22px;
      border: 1.5px solid var(--band-line);
      background: var(--band-surface);
      color: #fff;
      font: 700 15px/1.2 var(--font-body);
      text-align: left;
      cursor: pointer;
    }

    .today-stat-btn svg {
      flex: 0 0 auto;
    }

    .today-stat-btn:hover {
      background: #342a52;
    }

    .today-stat-btn.is-coral {
      background: var(--attention-strong);
      border-color: var(--attention-strong);
    }

    .today-stat-btn.is-coral:hover {
      background: #c73b24;
    }

    .today-stat-btn.is-green {
      background: var(--ok);
      border-color: var(--ok);
    }

    .today-stat-btn.is-green:hover {
      background: #0f6240;
    }

    .today-stat-up { color: var(--ok); }

    .today-stat-down { color: var(--st-turndown); }

    .today-stat-same { color: var(--muted); }

    #today-view .stat-tile .stat-label,
    #today-view .stat-tile .stat-pace {
      font-size: 14px;
    }

    .today-section {
      padding: 8px 32px 40px;
    }

    .today-section-title {
      font-size: 16px;
      margin: 0 0 12px;
    }

    .today-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
      gap: 14px;
    }

    .today-dealer-stack {
      position: relative;
      z-index: 1;
      margin: -40px 32px 24px;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    /* The first-day card (help.js) takes the tuck under the band; the dealer's cards then sit below it, not over it */
    .help-firstday ~ .today-dealer-stack { margin-top: 0; }

    /* Dealer Today (owner Nov 12): the "confirm your availability" banner sits between the band and the cards. It takes
       the tuck under the band itself (same side margins as the cards), and the cards then start below it, not over it.
       After the first-day card it just follows it. The office Today's banner (#today-confirm-office) is unchanged. */
    #today-confirm-dealer:not(.hidden) {
      position: relative;
      z-index: 1;
      margin: -40px 32px 14px; /* lines up with the cards; on phones the stack adds 16px padding (below) */
    }
    .help-firstday ~ #today-confirm-dealer:not(.hidden) { margin-top: 0; }
    #today-confirm-dealer:not(.hidden) ~ .today-dealer-stack { margin-top: 0; }
    @media (max-width: 1100px) {
      #today-confirm-dealer:not(.hidden) { margin: -36px 32px 6px; }
      .help-firstday ~ #today-confirm-dealer:not(.hidden) { margin-top: 0; }
    }
    /* Dealer Today on a phone: the help line's "?" stays at the end of the line, not alone on its own line
       (admin.css makes the help text a block under 640px on every page; the office Today keeps that). */
    @media (max-width: 640px) {
      #today-dealer .help-line-text { display: inline; }
    }

    .today-dealer-empty-line {
      margin: 0 0 14px;
      font-size: 16px;
      line-height: 1.4;
      color: var(--text);
    }

    .today-dealer-empty-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .today-dealer-empty-actions .btn-primary,
    .today-dealer-empty-actions .btn-secondary {
      min-height: 44px;
    }

    .today-card {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 16px;
    }

    .today-card-urgent {
      border-color: #DC2626;
    }

    .today-card-warn {
      border-color: #D97706;
    }

    .today-card-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 12px;
    }

    .today-card-head h3 {
      margin: 0;
      font-size: 16px;
    }

    .today-card-sub {
      margin: 4px 0 0;
      font-size: 14px;
      color: var(--muted);
    }

    .today-count {
      min-width: 28px;
      height: 28px;
      padding: 0 8px;
      border-radius: 14px;
      background: #EEF0F3;
      color: #171B24;
      font-size: 14px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .today-count-new {
      background: #FDECEC;
      color: #B91C1C;
    }

    .today-count-warn {
      background: #FEF3E2;
      color: #B45F06;
    }

    .today-rows {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .today-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      font-size: 14px;
      min-width: 0;
    }

    .today-row-main {
      flex: 1 1 11rem;
      min-width: 11rem;
    }

    .today-name-line {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .today-name {
      border: 0;
      background: none;
      padding: 0;
      text-align: left;
      font: 600 16px var(--font-body);
      color: var(--text);
      cursor: pointer;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .today-name:hover { color: var(--accent); }

    .today-name.is-static,
    .today-name.is-static:hover {
      cursor: default;
      color: var(--text);
    }

    .today-leads-note {
      flex-shrink: 0;
      font-size: 14px;
      font-weight: 500;
      color: var(--muted);
    }

    .today-status-chip {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      color: var(--muted);
    }

    .today-status-chip .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }

    .today-row.is-open,
    .today-demo-row.is-open {
      cursor: pointer;
      border-radius: 14px;
    }

    .today-row.is-open {
      margin: 0 -10px;
      padding: 8px 10px;
    }

    .today-row.is-open:hover,
    .today-demo-row.is-open:hover,
    .today-list-row:hover {
      background: var(--soft);
    }

    .today-chevron {
      flex: 0 0 auto;
      margin-left: 4px;
      color: #8A84A3;
      font-size: 20px;
      font-weight: 600;
      line-height: 1;
    }

    .today-row-detail {
      margin: 2px 0 0;
      font-size: 14px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .today-office {
      color: var(--muted);
      font-size: 14px;
      font-weight: 400;
    }

    .today-older-line {
      margin-top: 12px;
    }

    .today-older-btn {
      border: 0;
      background: none;
      padding: 0;
      font: 700 15px var(--font-body);
      color: var(--accent);
      cursor: pointer;
      text-align: left;
    }

    .today-older-btn:hover { text-decoration: underline; }

    .today-muted,
    .today-preview {
      color: var(--muted);
      font-size: 14px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .today-mono {
      font-family: var(--font-mono);
      font-size: 14px;
    }

    .today-pill-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      padding: 0 16px;
      border-radius: 22px;
      border: 1.5px solid var(--accent);
      background: #fff;
      color: var(--accent);
      font: 700 15px var(--font-body);
      cursor: pointer;
    }

    .today-pill-link:hover {
      background: var(--soft);
      text-decoration: underline;
    }

    #today-view .link-btn {
      color: var(--accent);
      font-size: 15px;
      font-weight: 700;
    }

    #today-view .link-btn:hover {
      text-decoration: underline;
    }

    .today-overdue { color: var(--st-turndown); }

    .today-row-btn {
      white-space: nowrap;
      min-height: 44px;
    }

    .wait-overdue {
      color: #B91C1C;
      font-weight: 600;
    }

    .today-row-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      justify-content: flex-end;
      align-items: center;
    }

    .today-card-foot {
      margin-top: 12px;
    }

    .today-card-foot-links {
      display: flex;
      flex-wrap: wrap;
      gap: 12px 16px;
    }

    .today-progress {
      height: 4px;
      background: #D0D4DC;
      border-radius: 2px;
      overflow: hidden;
      margin-top: 8px;
    }

    .today-next-card .today-next-time {
      font-size: 22px;
      font-weight: 700;
      margin: 4px 0 8px;
      letter-spacing: -0.03em;
    }

    .today-next-name {
      font-size: 18px;
      margin-bottom: 4px;
    }

    .today-next-actions {
      display: flex;
      gap: 10px;
      margin-top: 14px;
    }

    .today-next-actions .btn-primary,
    .today-next-actions .btn-secondary {
      flex: 1;
      text-align: center;
      text-decoration: none;
    }

    .today-skel .today-skel-bars {
      height: 72px;
      border-radius: 8px;
      background: linear-gradient(90deg, #f0f2f5 0%, #e6e9ee 50%, #f0f2f5 100%);
      background-size: 200% 100%;
      animation: today-skel 1.2s ease-in-out infinite;
    }

    @keyframes today-skel {
      0% { background-position: 100% 0; }
      100% { background-position: -100% 0; }
    }

    .today-office-cols {
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
      gap: 16px;
      align-items: start;
      padding: 0 32px 40px;
    }

    .today-office-cols .card {
      margin-bottom: 0;
    }

    .today-office-cols .card h2 {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
      margin: 0;
    }

    .today-office-side {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    #today-view .page-band-sub {
      margin-top: 12px;
    }

    .today-band-line {
      margin: 14px 0 0;
      font-family: var(--font-body);
      font-size: 20px;
      font-weight: 500;
      color: var(--band-muted);
    }

    #today-needs.today-needs-card {
      max-height: min(72vh, 760px);
      overflow-x: hidden;
      overflow-y: auto;
      padding-top: 0;
    }

    .today-needs-sticky {
      position: sticky;
      top: 0;
      z-index: 2;
      min-width: 0;
      background: var(--surface);
      padding-top: 20px;
    }

    .today-needs-head {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 12px;
      margin-bottom: 8px;
    }

    .today-needs-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      min-width: 0;
      max-width: 100%;
      padding-bottom: 8px;
    }

    .today-needs-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 44px;
      padding: 0 14px;
      border-radius: 999px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--text);
      font: 700 14px var(--font-body);
      white-space: nowrap;
      cursor: pointer;
    }

    .today-needs-chip.is-on {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }

    .today-needs-chip .today-needs-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #E8492F;
      flex: 0 0 auto;
    }

    .today-needs-focus h3 {
      margin: 8px 0 4px;
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
    }

    .today-needs-focus h3 span {
      margin-left: 8px;
      color: var(--muted);
      font-family: var(--font-body);
      font-size: 16px;
      font-weight: 700;
    }

    .today-needs-focus p {
      margin: 0 0 8px;
      color: var(--muted);
    }

    #today-needs.is-filtered .today-card-head {
      display: none;
    }

    #today-needs.is-filtered #today-needs-all .today-card {
      display: none;
    }

    #today-needs.is-filtered #today-needs-all .today-card.is-shown {
      display: block;
      border-top: 0;
      padding-top: 0;
    }

    @media (max-width: 767px) {
      .today-office-cols > #today-needs {
        width: 100%;
        min-width: 0;
      }

      .today-needs-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
      }
    }

    .today-needs-head .link-btn {
      font-weight: 700;
      font-size: 15px;
    }

    .today-need {
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 18px 0;
      border-top: 1px solid #E6E2F3;
    }

    .today-need-num {
      width: 28px;
      height: 28px;
      border-radius: 14px;
      background: var(--soft);
      color: var(--accent);
      font: 800 14px var(--font-body);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .today-need-title {
      font-size: 16px;
      font-weight: 800;
      line-height: 1.3;
    }

    .today-need-detail {
      margin-top: 2px;
      font-size: 14px;
      color: var(--muted);
      line-height: 1.35;
    }

    .today-need-detail.is-hot {
      color: var(--attention);
      font-weight: 700;
    }

    .today-need-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .today-needs-empty {
      margin: 12px 0 0;
      color: var(--muted);
    }

    .today-load-fail {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 15px;
    }

    .today-load-fail .link-btn {
      min-height: 44px;
      padding: 0 4px;
      font-weight: 700;
    }

    .today-perf-note {
      margin: 0;
      color: var(--muted);
      font-size: 16px;
    }

    #today-needs-all {
      margin-top: 8px;
    }

    #today-needs-all .today-card {
      background: transparent;
      border: 0;
      border-radius: 0;
      border-top: 1px solid #EFECF7;
      padding: 12px 0 4px;
    }

    #today-month-goal:empty {
      display: none;
    }

    #today-month-goal:not(:empty) {
      margin-top: 12px;
    }

    #today-month-goal {
      margin-bottom: 14px;
    }

    #today-month-goal .stat-value {
      font-size: 30px;
    }

    #today-month-goal .progress-track {
      margin: 8px 0 0;
      height: 12px;
      border-radius: 6px;
    }

    #today-month-goal .progress-fill {
      border-radius: 6px;
    }

    .today-month-stats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 14px;
    }

    .today-month-stats .stat-tile {
      margin: 0;
      padding: 12px 14px;
      box-shadow: none;
    }

    .today-month-stats .stat-value {
      font-size: 26px;
    }

    .today-set-goal {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      margin-top: 8px;
      font-weight: 700;
    }

    .today-demo-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      padding: 10px;
      margin: 0 -10px;
      border-top: 1px solid #EFECF7;
    }

    .today-demo-main {
      flex: 1 1 160px;
      min-width: 0;
    }

    .today-demo-time {
      font-weight: 800;
      font-variant-numeric: tabular-nums;
    }

    .today-demo-dealer {
      color: var(--muted);
      font-size: 14px;
    }

    .today-list-row {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      margin: 0;
      padding: 10px 8px;
      border: 0;
      border-top: 1px solid #EFECF7;
      border-radius: 14px;
      background: transparent;
      text-align: left;
      cursor: pointer;
    }

    .today-list-main {
      flex: 1 1 auto;
      min-width: 0;
    }

    .today-list-name {
      font: 600 16px var(--font-body);
      color: var(--text);
    }

    .today-list-row .today-progress {
      max-width: 220px;
    }

    .today-more-wrap {
      position: relative;
      flex: 0 0 auto;
    }

    .today-more {
      width: 44px;
      height: 44px;
      padding: 0;
      border-radius: 22px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--text);
      font: 800 18px var(--font-body);
      line-height: 1;
    }

    .today-more-menu {
      position: absolute;
      right: 0;
      top: calc(100% + 4px);
      z-index: 5;
      min-width: 168px;
      padding: 6px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: 0 8px 24px rgba(27, 21, 48, 0.12);
    }

    .today-more-menu button {
      display: block;
      width: 100%;
      min-height: 44px;
      padding: 0 12px;
      border: 0;
      border-radius: 10px;
      background: none;
      text-align: left;
      font: 700 14px var(--font-body);
      color: var(--text);
    }

    .today-more-menu button:hover {
      background: var(--soft);
    }

    .today-demos-empty {
      margin: 12px 0 0;
      color: var(--muted);
    }

    @media (max-width: 1100px) {
      #today-perf-slot {
        margin: 0 16px 16px;
      }

      #today-perf-slot.is-open {
        margin-top: -36px;
      }

      .today-perf-nums {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .today-office-cols {
        padding: 0 16px 32px;
      }
      .today-section {
        padding: 8px 16px 32px;
      }
      .today-dealer-stack {
        margin: -36px 16px 20px;
      }
    }

    @media (max-width: 767px) {
      body.has-app-tabs .app-nav-btn {
        display: none;
      }

      .app-tab-bar {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 18;
        background: #fff;
        border-top: 1px solid var(--border);
        padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
        justify-content: space-around;
      }

      body.has-app-tabs .app-tab-bar {
        display: flex;
      }

      body.has-app-tabs {
        padding-bottom: 72px;
      }

      .app-tab {
        flex: 1;
        min-height: 52px;
        border: 0;
        background: none;
        color: var(--muted);
        font: 500 11px var(--font-body);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        position: relative;
      }

      .app-tab.active {
        color: var(--accent);
      }

      .app-tab-badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 18px);
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 8px;
        background: var(--st-turndown);
        color: #fff;
        font-size: 10px;
        line-height: 16px;
        text-align: center;
      }

      .today-office-cols {
        display: flex;
        flex-direction: column;
      }

      .today-office-side {
        display: contents;
      }

      #today-needs { order: 1; }
      #today-month-card { order: 2; }
      #today-demos-card { order: 3; }
      #today-recent-lists { order: 4; }

      .today-need {
        grid-template-columns: 30px minmax(0, 1fr);
      }

      .today-need-actions {
        grid-column: 1 / -1;
      }

      .today-need-actions .btn-primary,
      .today-need-actions .btn-secondary,
      .today-more,
      #today-needs-all .today-row-btn {
        min-height: 44px;
      }

      .today-row {
        display: flex;
        flex-wrap: wrap;
      }

      .today-next-actions {
        flex-direction: column;
      }
    }

    .today-slim-warn {
      margin: 0 20px 12px;
      padding: 10px 14px;
      border: 1px solid var(--wait);
      background: var(--wait-bg);
      color: var(--wait);
      border-radius: 14px;
    }

    .app-tab.app-tab-demos { display: none; }

    @media (max-width: 759px) {
      .today-stat-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
      }

      .today-perf-nums {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .today-perf-rates {
        grid-template-columns: 1fr;
      }

      .today-perf-dealer {
        width: 100%;
      }

      body.is-dealer.has-app-tabs .app-tab-bar {
        left: 16px;
        right: 16px;
        bottom: 18px;
        height: 64px;
        padding: 0 8px;
        border: 0;
        border-radius: 32px;
        background: var(--band-bg);
        box-shadow: 0 10px 24px rgba(27, 21, 48, 0.25);
      }

      body.is-dealer.has-app-tabs {
        padding-bottom: 104px;
      }

      body.is-dealer .app-tab {
        color: #ABA3C9;
        font-weight: 700;
        min-height: 48px;
        min-width: 44px;
      }

      body.is-dealer .app-tab.active {
        color: #fff;
      }

      body.is-dealer .app-tab.app-tab-demos { display: flex; }
      body.is-dealer .app-tab[data-go="calendar"] { display: none; }

      body.is-dealer .app-toast { bottom: 108px; }
    }

    .today-slim-warn.is-full {
      border-color: var(--attention);
      background: var(--attention-bg);
      color: var(--attention);
    }

    /* SA1: survey leads waiting more than 24 hours at the 8 AM check */
    .today-slim-warn.is-overdue {
      border-color: var(--attention);
      background: var(--attention-bg);
      color: var(--attention);
    }

    /* SA1b: nothing waiting for approval: a quiet strip */
    .today-slim-warn.is-quiet {
      border-color: var(--border);
      background: var(--surface, #fff);
      color: var(--muted, #5b5670);
    }

    .today-slim-warn.is-quiet .link-btn {
      font-weight: 500;
    }

    .today-slim-warn .link-btn {
      color: inherit;
      font-weight: 600;
      text-align: left;
      white-space: normal;
    }

    /* Imported history: one calm card above Needs you (js/today-import.js) */
    .today-import {
      margin: 0 32px 16px;
      border: 1px solid var(--border);
    }

    .today-import-top {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
    }

    .rbo-tidy-shown { margin: 0 4px; }
    .today-import.rbo-tidy-card { margin: 0; }

    .today-import-head h2 {
      margin: 0;
      font-size: 18px;
    }

    .today-import-sub {
      margin: 4px 0 8px;
      font-size: 14px;
      color: var(--muted);
    }

    .today-import-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 0;
      border-top: 1px solid var(--border);
    }

    .today-import-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .today-import-text span {
      font-size: 14px;
      color: var(--muted);
    }

    .today-import-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .today-import-q {
      font-weight: 600;
    }

    .today-import-done {
      display: flex;
      align-items: center;
      gap: 8px;
      padding-top: 8px;
      font-size: 14px;
      color: var(--muted);
    }

    .today-import-msg {
      margin: 8px 0 0;
      color: #B4232C;
      font-size: 14px;
    }

    @media (max-width: 1100px) {
      .today-import {
        margin: 0 16px 16px;
      }
    }

    @media (max-width: 640px) {
      .today-import-row {
        flex-direction: column;
        align-items: stretch;
      }

      .today-import-actions {
        flex-wrap: wrap;
      }
    }

    /* Office Today (owner Nov 13): a banner that sits between the band and the cards (today the Cold requests banner,
       class today-top-banner) takes the tuck under the band itself, and whatever follows it (the first-day card,
       Right now, Performance) starts below it instead of sliding up over it. The same goes for the first-day card:
       Right now and Performance start below it. */
    #today-office > .page-band + .today-top-banner {
      position: relative;
      z-index: 3;
      margin: -40px 32px 14px;
    }
    #today-office > .today-top-banner ~ .help-firstday,
    #today-office > .today-top-banner ~ #today-right-now:not(:empty),
    #today-office > .today-top-banner ~ #today-perf-slot.is-open,
    #today-office > .help-firstday ~ #today-right-now:not(:empty),
    #today-office > .help-firstday ~ #today-perf-slot.is-open {
      margin-top: 0;
    }
    @media (max-width: 1100px) {
      #today-office > .page-band + .today-top-banner { margin: -30px 16px 14px; }
    }

    /* IL2 Needs Booked from */
    .instaset-unlinked-list {
      display: grid;
      gap: 10px;
      max-height: 60vh;
      overflow-y: auto;
    }

    .instaset-unlinked-item {
      display: grid;
      gap: 8px;
      padding: 12px;
      border: 1px solid var(--line, #e6e3ef);
      border-radius: 12px;
      background: #fff;
    }

    .instaset-unlinked-who {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .instaset-unlinked-who .link-btn {
      justify-self: start;
      font-weight: 700;
    }

    .instaset-unlinked-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .instaset-unlinked-picker {
      display: grid;
      gap: 8px;
    }

    .instaset-unlinked-done {
      margin: 0;
      color: var(--ok, #1f7a4d);
      font-weight: 600;
    }

    /* OV1: the owner's view (js/today-owner.js) */
    .today-owner {
      margin: 0 32px 16px;
      border: 1px solid var(--border);
    }
    .owner-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .owner-head h2 { margin: 0; font-family: var(--font-display); font-size: 18px; }
    .owner-cols {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
    }
    .owner-col {
      min-width: 0;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }
    .owner-col-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
    }
    .owner-col-head h3 { margin: 0; font-family: var(--font-display); font-size: 15px; }
    .owner-col-date { color: var(--muted); font-size: 13px; }
    .owner-sum { margin: 4px 0 8px; color: var(--muted); font-size: 13px; }
    .owner-sum.is-warn { color: var(--wait); font-weight: 600; }
    .owner-empty { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
    .owner-rows { display: flex; flex-direction: column; }
    .owner-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 7px 0;
      border-top: 1px solid var(--border);
      min-width: 0;
    }
    .owner-row-time {
      flex: 0 0 62px;
      color: var(--muted);
      font-size: 13px;
      font-variant-numeric: tabular-nums;
    }
    .owner-row-main {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
    }
    .owner-row-main .today-name { text-align: left; max-width: 100%; }
    .owner-row-dealer {
      color: var(--muted);
      font-size: 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .owner-row .status-pill { flex: 0 0 auto; white-space: nowrap; }
    .owner-row-confirm {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 2px 8px;
      font-size: 12px;
      color: var(--muted);
    }
    .owner-confirm-tag { font-weight: 600; }
    .owner-confirm-tag.is-yes { color: var(--ok); }
    .owner-confirm-tag.is-no { color: var(--wait); }
    .owner-confirm-btn { font-size: 12px; padding: 0; min-height: 0; }
    .owner-row-btn { flex: 0 0 auto; padding: 4px 10px; font-size: 13px; min-height: 30px; }
    .owner-more { margin-top: 6px; align-self: flex-start; }
    .owner-day + .owner-day { margin-top: 10px; }
    .owner-day-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      margin-top: 8px;
    }
    .owner-day-head strong { font-size: 14px; }
    .owner-day-head .owner-sum { margin: 0; }
    @media (max-width: 1100px) {
      .owner-cols { grid-template-columns: 1fr; }
    }
    @media (max-width: 759px) {
      .today-owner { margin: 0 16px 16px; }
      .owner-col { padding: 10px; }
      .owner-row { gap: 8px; }
      .owner-row-time { flex-basis: 54px; font-size: 12px; }
      .owner-row-btn { padding: 3px 8px; font-size: 12px; min-height: 28px; }
      .owner-row .status-pill { font-size: 11px; }
    }

    /* GA1: row actions on "Your demos at a glance" and the Needs a new time list */
    .owner-row { flex-wrap: wrap; }
    .owner-row-main { flex-basis: 120px; }
    .owner-row-acts { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
    .owner-row-small { padding: 4px 10px; font-size: 13px; min-height: 30px; text-decoration: none; display: inline-flex; align-items: center; }
    .owner-menu { position: relative; display: inline-flex; }
    .owner-menu.owner-act-narrow { display: none; }
    .owner-menu-btn { min-height: 30px; min-width: 34px; padding: 2px 8px; font-size: 16px; line-height: 1; }
    .owner-menu-list {
      position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 170px;
      background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 10px;
      box-shadow: 0 10px 28px rgba(27, 21, 48, 0.16); padding: 6px; display: flex; flex-direction: column;
    }
    .owner-menu-list.hidden { display: none; }
    .owner-menu-item {
      display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 8px;
      background: none; color: var(--ink, #1B1530); font: 600 14px/1.2 var(--font-body); text-align: left;
      text-decoration: none; cursor: pointer;
    }
    .owner-menu-item:hover, .owner-menu-item:focus-visible { background: var(--violet-soft, #efebff); outline: none; }
    .today-stat-btn.glance-wait-tile strong { font-weight: 800; }
    .today-stat-btn.glance-wait-tile.is-amber { border-color: #f2b544; }
    .glance-wait { max-width: 640px; width: calc(100vw - 32px); }
    .glance-wait-help { margin: 4px 0 12px; }
    .glance-wait-list { max-height: min(60vh, 560px); overflow-y: auto; }
    .glance-wait-row {
      display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0;
    }
    .glance-wait-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .glance-wait-main .today-name { text-align: left; max-width: 100%; }
    .glance-wait-sub { color: var(--muted); font-size: 12px; }
    /* phone: one main button plus the ⋯ menu; everything you tap is at least 44 px */
    @media (max-width: 759px) {
      .owner-act-wide { display: none; }
      .owner-menu.owner-act-narrow { display: inline-flex; }
      .owner-row-acts .owner-row-btn, .owner-menu-btn { min-height: 44px; font-size: 14px; padding: 6px 12px; }
      .owner-menu-btn { min-width: 44px; font-size: 18px; }
      .owner-menu-item { min-height: 44px; }
      .owner-confirm-btn { min-height: 44px; padding: 0 4px; font-size: 13px; }
      .owner-row { flex-wrap: wrap; }
      .owner-row-acts { margin-left: auto; }
      .glance-wait-row { flex-wrap: wrap; }
      .glance-wait-row .owner-row-acts { width: 100%; justify-content: flex-start; }
      .glance-wait-list { max-height: none; overflow: visible; }
    }

    /* SA2: survey approvals, one at a time, under the Today strip (js/survey-approval.js) */
    .sa-queue {
      margin: 0 20px 12px;
      padding: 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--text);
    }
    .sa-queue-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 13px;
    }
    .sa-queue-name {
      margin: 0;
      font-family: var(--font-display);
      font-size: 18px;
    }
    .sa-queue-name button { font: inherit; color: var(--text); text-align: left; }
    .sa-queue-lines { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
    .sa-queue-answers {
      margin: 10px 0 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 4px;
      font-size: 14px;
    }
    .sa-queue-answers li span { color: var(--muted); }
    .sa-queue-acts {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
    }
    .sa-queue-done { margin: 0; color: var(--muted); }
    @media (max-width: 759px) {
      .sa-queue-acts > button { flex: 1 1 auto; }
    }

/* 8f56b57a: the Sets tile opens the list of demos set in the period */
.today-perf-num.is-link { cursor: pointer; }
.today-perf-num.is-link:hover .today-perf-num-label,
.today-perf-num.is-link:focus-visible .today-perf-num-label { color: var(--violet, #4B2EDB); text-decoration: underline; }
.today-perf-num.is-link:focus-visible { outline: 2px solid var(--violet, #4B2EDB); outline-offset: 2px; border-radius: 10px; }
.today-sets-modal { max-width: 640px; width: calc(100vw - 32px); }
.today-sets-list { display: flex; flex-direction: column; gap: 6px; max-height: min(60vh, 520px); overflow-y: auto; margin: 4px 0 12px; }
.today-sets-row { flex-shrink: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; width: 100%; padding: 10px 12px;
  border: 1px solid var(--line, #E4E1EE); border-radius: 12px; background: #fff; color: var(--ink, #1B1530); font: inherit; text-align: left; cursor: pointer; }
.today-sets-row:hover { background: #f7f5fe; }
.today-sets-name { font-weight: 600; grid-column: 1; }
.today-sets-meta { grid-column: 1; font-size: 13px; color: var(--muted, #6b6680); }
.today-sets-state { grid-column: 2; grid-row: 1 / span 2; font-size: 12px; font-weight: 600; color: var(--muted, #6b6680);
  padding: 2px 8px; border-radius: 999px; background: #f1eff6; }
.today-calls-count { font-size: 14px; font-weight: 700; color: var(--ink, #1B1530); }
/* 6c97812b: a Needs you item about one lead opens it from its title */
.today-need-link { display: block; padding: 0; border: 0; background: none; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.today-need-link:hover, .today-need-link:focus-visible { text-decoration: underline; color: var(--accent, #4B2EDB); }
/* 6c97812b: a Needs you item about one lead opens it from its title */
.today-need-link { display: block; padding: 0; border: 0; background: none; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.today-need-link:hover, .today-need-link:focus-visible { text-decoration: underline; color: var(--accent, #4B2EDB); }
/* PC1: a person's calls (Today › Performance › Calls) */
.today-calls-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.today-calls-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line, #E4E1EE); border-radius: 12px;
  background: #fff; color: var(--ink, #1B1530); font: inherit; text-align: left; }
.today-calls-stat.is-link { cursor: pointer; }
.today-calls-stat.is-link:hover, .today-calls-stat.is-link:focus-visible { background: #f7f5fe; border-color: var(--violet, #4B2EDB); }
.today-calls-stat.is-link .today-calls-stat-label { color: var(--violet, #4B2EDB); text-decoration: underline; }
.today-calls-stat-value { font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; font-weight: 700; }
.today-calls-stat-label { font-size: 12px; color: var(--muted, #6b6680); }
.today-calls-hours { margin: 0 0 6px; font-size: 14px; }
.today-calls-note { margin: 0 0 8px; }
.today-calls-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.today-calls-chips .choice { padding: 6px 10px; font-size: 13px; }
.today-calls-booked { background: #e9f7ef; color: #1f7a45; }
.today-calls-foot:empty { display: none; }
@media (max-width: 480px) {
  .today-calls-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-sets-modal .modal-actions { flex-wrap: wrap; }
}

    /* RG1: Riders whose reached gift closes within a week */
    .today-gift-windows-list {
      margin: 6px 0 0;
      padding-left: 18px;
      font-size: 13px;
      color: var(--ink, #1B1530);
    }

/* 541ba888: on a 320 px phone the Today/7 days/This month/Custom switch was 5 px wider than the screen, so the page
   slid sideways; it now fits (smaller side padding) and may never be wider than its card */
@media (max-width: 400px) {
  .today-perf-tools, .today-perf-switch { max-width: 100%; }
  .today-perf-switch button { padding: 0 9px; }
}

/* 7db432d2: Call these in calling mode, under a Needs you group's heading */
.today-needs-focus .today-needs-call-these { margin: 2px 0 10px; }

/* DB1: "Double-booked: reschedule one": each customer opens the lead */
.today-double-booked-row .link-btn { display: inline; padding: 0; min-height: 0; }
/* css/calling.css */
    /* The call block keeps a max width and sits centred on wide screens; the dark header spans the full width
       but its content lines up with the same width. The width follows what is open (queue, Text panel). */
    #calling-view {
      background: var(--bg);
      --calling-max: 1264px;
      --calling-gutter: max(24px, calc((100% - var(--calling-max)) / 2 + 24px));
    }
    #calling-view:has(.calling-layout.queue-folded) { --calling-max: 968px; }
    #calling-view:has(.calling-layout.text-open) { --calling-max: 1680px; }
    #calling-view:has(.calling-layout.text-open.queue-folded) { --calling-max: 1404px; }

    .calling-head {
      background: var(--band-bg);
      color: var(--band-text);
      padding: 16px var(--calling-gutter) 20px;
      display: flex;
      gap: 16px;
      align-items: flex-start;
      justify-content: space-between;
    }

    .calling-head h1 {
      margin: 0;
      font-size: 22px;
      color: #fff;
    }

    .calling-head-main { flex: 1; min-width: 0; }

    .calling-head .page-band-sub {
      color: var(--band-muted);
    }

    .calling-exit-btn {
      flex-shrink: 0;
      height: 38px;
      padding: 0 14px;
      border-radius: 19px;
      border: 1px solid #8B93A1;
      background: transparent;
      color: #fff;
      font: 500 14px var(--font-body);
      cursor: pointer;
    }

    .calling-exit-btn:hover {
      border-color: #fff;
    }

    .calling-bar {
      height: 6px;
      background: var(--band-line);
      border-radius: 3px;
      overflow: hidden;
      margin: 8px 0;
    }

    .call-progress-bar {
      display: flex;
      flex-direction: row;
      align-items: stretch;
    }

    .call-progress-reached,
    .call-progress-tried {
      display: block;
      height: 100%;
      width: 0;
      flex: 0 0 auto;
    }

    .call-progress-reached { background: var(--accent); }

    .call-progress-tried { background: color-mix(in srgb, var(--accent) 38%, #fff); }

    .calling-tabs {
      margin-top: 12px;
      padding: 3px;
    }

    #calling-tabs .band-tab {
      color: #3A4352;
      font-size: 13px;
      font-weight: 500;
      line-height: 1.2;
      background: transparent;
      border: 0;
      border-bottom: 0;
      padding: 6px 12px;
      border-radius: 8px;
      white-space: nowrap;
    }

    #calling-tabs .band-tab.active {
      background: #fff;
      color: #3A4352;
      font-weight: 700;
      border-bottom: 0;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
    }

    .calling-skip-note {
      margin: 8px auto 0;
      max-width: var(--calling-max);
      padding: 0 24px;
      box-sizing: border-box;
      font-size: 13px;
      color: var(--muted);
    }

    #calling-dnc-note {
      color: #A3321E;
      font-weight: 700;
    }

    /* The queue sits beside the card (no empty space between them) and can fold away; the lead card takes the rest,
       and the Text panel opens as a third column beside the call. The block is centred (max width above). */
    .calling-layout {
      display: grid;
      grid-template-columns: 280px minmax(0, 1fr);
      gap: 16px;
      padding: 16px 24px 88px;
      align-items: start;
      width: 100%;
      max-width: var(--calling-max);
      margin: 0 auto;
      box-sizing: border-box;
    }

    .calling-layout.queue-folded { grid-template-columns: minmax(0, 1fr); }
    .calling-layout.queue-folded .calling-queue { display: none; }
    .calling-layout.text-open { grid-template-columns: 280px minmax(0, 1fr) minmax(320px, 400px); }
    .calling-layout.text-open.queue-folded { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); }

    .calling-main { min-width: 0; }
    .calling-card { max-width: 920px; }

    .calling-queue-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 10px;
    }

    .calling-queue-head h2 { margin: 0; }

    .calling-queue-open {
      margin: 0 0 10px;
      height: 36px;
      padding: 0 14px;
      border-radius: 18px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      font: 600 13px var(--font-body);
      color: var(--ink, #1B1530);
      cursor: pointer;
    }

    .calling-top-actions {
      display: flex;
      gap: 10px;
      flex-shrink: 0;
    }

    .btn-secondary.calling-text-btn {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
      min-width: 96px;
      height: 56px;
      min-height: 56px;
      padding: 6px 14px;
      margin: 0;
      line-height: 1.1;
    }

    .calling-text-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

    .calling-text-panel {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
      position: sticky;
      top: 12px;
      display: flex;
      flex-direction: column;
      max-height: calc(100vh - 140px);
      min-width: 0;
    }

    .calling-text-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .calling-text-head h2 { margin: 0; font-size: 16px; }

    .calling-text-quick {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 10px 0;
    }

    .calling-text-thread {
      flex: 1 1 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }

    .calling-text-thread .chat-thread { flex: 1 1 auto; min-height: 160px; max-height: 46vh; overflow-y: auto; }

    .calling-route-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      margin-top: 12px;
    }

    .calling-route-pick { position: relative; }

    .calling-route-menu {
      position: absolute;
      z-index: 30;
      top: calc(100% + 4px);
      left: 0;
      min-width: 240px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(27, 21, 48, 0.14);
      padding: 6px;
    }

    .calling-route-item {
      display: block;
      width: 100%;
      text-align: left;
      border: 0;
      background: transparent;
      padding: 10px 12px;
      min-height: 40px;
      border-radius: 8px;
      font: inherit;
      cursor: pointer;
    }

    .calling-route-item:hover { background: var(--soft); }

    .calling-route-in { font-size: 13px; color: var(--muted); }

    .calling-route-added { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px; white-space: nowrap; }
    /* the undo bar is dark: the route's own Undo link needs a light colour to be read */
    .calling-undo .calling-route-added .link-btn { color: #fff; font-weight: 600; text-decoration: underline; }

    .calling-history { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
    .calling-history h3 { margin: 0 0 8px; font-size: 14px; }

    .calling-history-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: grid;
      gap: 8px;
      font-size: 14px;
    }

    .calling-history-list li { display: grid; gap: 2px; }
    .calling-history-when { font-size: 12px; color: var(--muted); }

    .calling-fold-mark { margin-left: auto; transition: transform 0.15s; color: var(--muted); }
    .calling-household[open] .calling-fold-mark { transform: rotate(90deg); }

    @media (min-width: 768px) and (max-width: 1599px) {
      /* not enough room for three columns: the Text panel takes the queue's place */
      .calling-layout.text-open { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
      .calling-layout.text-open .calling-queue { display: none; }
    }

    .calling-queue {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
    }

    .calling-queue h2 {
      margin: 0 0 10px;
      font-size: 14px;
    }

    .calling-queue-item {
      display: flex;
      gap: 8px;
      align-items: flex-start;
      width: 100%;
      border: 0;
      background: none;
      text-align: left;
      padding: 8px;
      border-radius: 8px;
      cursor: pointer;
    }

    .calling-queue-item.done {
      opacity: 0.72;
    }

    .calling-queue-item.current {
      background: #EEF2FF;
      opacity: 1;
    }

    .calling-mark {
      flex-shrink: 0;
      width: 18px;
      height: 18px;
      margin-top: 2px;
      border-radius: 50%;
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      line-height: 1;
    }

    .calling-mark-empty {
      border: 1.5px solid #C5CAD3;
      background: transparent;
      color: transparent;
    }

    .calling-mark-done {
      border: 1.5px solid var(--ok);
      background: var(--ok);
      color: #fff;
    }

    .calling-queue-text {
      display: flex;
      flex-direction: column;
      min-width: 0;
      font-size: 13px;
      color: var(--muted);
    }

    .calling-queue-text strong {
      color: var(--text);
      font-size: 14px;
    }

    .calling-queue-item.done .calling-queue-text strong {
      color: var(--muted);
    }

    .calling-queue-more {
      margin: 8px 8px 0;
      font-size: 13px;
      color: var(--muted);
    }

    .calling-card {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 20px;
    }

    .calling-card-top {
      display: flex;
      flex-wrap: wrap;
      gap: 12px 16px;
      align-items: flex-start;
      justify-content: space-between;
    }

    .calling-card-id {
      min-width: 0;
      flex: 1 1 220px;
    }

    .calling-card-id-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .calling-card-top h2 {
      margin: 0;
      font-size: 26px;
    }

    /* 6ae16e1a: "Referred by Jane Smith · Neighbor" next to the customer's name */
    .calling-referrer {
      display: inline-flex;
      align-items: center;
      padding: 3px 10px;
      border-radius: 999px;
      background: #EEEAFD;
      color: #4B2EDB;
      font-size: 13px;
      font-weight: 600;
      /* 39c1f572: never cut off; a long name or relationship wraps onto the next line */
      max-width: 100%;
      white-space: normal;
      overflow-wrap: anywhere;
      line-height: 1.35;
    }

    #calling-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }

    .calling-fact-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 12px 16px;
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
    }

    .calling-fact-label {
      display: block;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 4px;
    }

    .calling-fact-row p {
      margin: 0;
      font-size: 14px;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* CD1: the last demo can be long (date · result · dealer), so it wraps */
    .calling-fact-row #calling-last-demo { white-space: normal; }

    .calling-card > label[for="calling-notes"] {
      margin-top: 16px;
    }

    a.btn-primary.calling-call-btn {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
      width: auto;
      min-width: 132px;
      height: 56px;
      min-height: 56px;
      padding: 6px 14px;
      text-decoration: none;
      margin: 0;
      flex-shrink: 0;
      line-height: 1.1;
    }

    .calling-call-btn svg {
      flex-shrink: 0;
    }

    .calling-call-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .calling-call-number {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 500;
    }

    .calling-outcomes {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 12px;
    }

    .calling-out {
      position: relative;
      text-align: left;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 12px;
      padding: 12px 36px 12px 12px;
      min-height: 64px;
      cursor: pointer;
    }

    .calling-out strong { display: block; }

    .calling-out span {
      display: block;
      font-size: 12px;
      color: var(--muted);
      margin-top: 4px;
    }

    .calling-out kbd,
    .calling-secondary kbd {
      position: absolute;
      top: 8px;
      right: 8px;
      font: 600 11px var(--font-mono);
      color: var(--muted);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 1px 5px;
    }

    .calling-secondary {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-top: 14px;
    }

    .calling-secondary #calling-skip-btn { position: relative; padding-right: 36px; }

    .calling-up-next {
      display: none;
      margin: 14px 0 0;
      font-weight: 600;
    }

    .calling-panel {
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px;
      margin: 12px 0;
      background: #F8F9FB;
    }

    .calling-panel-title { font-weight: 600; margin: 0 0 10px; }

    .calling-panel-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

    .calling-empty {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 32px;
      text-align: center;
    }

    .calling-empty-actions {
      display: flex;
      gap: 10px;
      justify-content: center;
      margin-top: 16px;
    }

    #calling-outcome-nudge .btn-primary,
    #calling-outcome-nudge .btn-secondary {
      min-height: 44px;
    }

    .calling-outcome-nudge {
      position: fixed;
      left: 16px;
      right: 16px;
      bottom: 16px;
      z-index: 31;
      width: min(520px, calc(100% - 32px));
      margin: 0 auto;
      background: #fff;
      border: 1px solid #F1D3A6;
      border-radius: 14px;
      padding: 12px 14px;
      box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
    }

    .calling-undo {
      position: fixed;
      left: 50%;
      transform: translateX(-50%);
      bottom: 20px;
      z-index: 30;
      background: #171B24;
      color: #fff;
      border-radius: 12px;
      padding: 10px 12px 10px 16px;
      display: flex;
      gap: 12px;
      align-items: center;
      box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    }

    .calling-phone-link {
      font-family: var(--font-mono);
      color: inherit;
      text-decoration: none;
    }

    @media (max-width: 767px) {
      .calling-head { padding: 12px 16px 16px; flex-wrap: wrap; }
      /* Exit sits on its own top row beside the menu button; the list name and tabs get the full width */
      .calling-head-main { flex-basis: 100%; order: 2; }
      .calling-exit-btn { order: 1; margin-left: auto; }
      .calling-tabs { margin-top: 10px; }
      .calling-layout {
        grid-template-columns: 1fr;
        padding: 12px 16px 96px;
      }
      .calling-queue { display: none; }
      .calling-queue-open { display: none; }
      .calling-layout.text-open { grid-template-columns: 1fr; }
      .calling-text-panel {
        position: fixed;
        inset: 0;
        z-index: 60;
        border-radius: 0;
        max-height: none;
        padding: 16px;
      }
      .calling-text-thread .chat-thread { max-height: none; }
      .calling-top-actions { width: 100%; }
      .calling-top-actions > * { flex: 1 1 0; }
      .calling-top-actions > .calling-call-btn { flex-grow: 2; }
      .btn-secondary.calling-text-btn { flex-direction: row; gap: 8px; font-size: 16px; margin: 4px 0 0; }
      .calling-call-number { white-space: nowrap; }
      a.btn-primary.calling-call-btn {
        width: 100%;
        min-width: 0;
        gap: 2px;
        height: 56px;
        min-height: 56px;
        font-size: 16px;
        margin: 4px 0 0;
      }
      .calling-fact-row {
        grid-template-columns: minmax(0, 1fr);
      }
      .calling-out { min-height: 64px; }
      .calling-out kbd,
      .calling-secondary kbd { display: none; }
      .calling-up-next { display: block; }
      body.view-calling .calling-undo { bottom: 16px; }
      .calling-outcome-nudge {
        bottom: calc(16px + env(safe-area-inset-bottom));
      }
      #calling-outcome-nudge .btn-primary,
      #calling-outcome-nudge .btn-secondary,
      .calling-outcome-nudge .outcome-nudge-actions .btn-primary,
      .calling-outcome-nudge .outcome-nudge-actions .btn-secondary {
        flex: 1 1 0;
        min-height: 44px;
        justify-content: center;
      }
    }

    .calling-skip-reason {
      flex: 1 1 220px;
      min-width: 0;
      max-width: 320px;
      height: 38px;
      margin: 0;
    }

    /* HQ1: household questions alongside the call */
    .calling-household {
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 0 14px;
      margin: 12px 0;
      background: #fff;
    }

    .calling-household summary {
      display: flex;
      align-items: center;
      gap: 6px;
      min-height: 44px;
      cursor: pointer;
      font-weight: 600;
    }

    .calling-household summary .muted { font-weight: 400; font-size: 14px; }

    .calling-household-fields { padding-bottom: 12px; }

    .calling-household-fields .survey-field { margin-bottom: 12px; }

    .hq-status { min-height: 1.2em; margin: 4px 0 0; font-size: 13px; }

/* 36580674: the open times beside the call (the same third column as the Text panel; on a phone it opens over the call) */
#calling-view:has(.calling-layout.times-open) { --calling-max: 1680px; }
#calling-view:has(.calling-layout.times-open.queue-folded) { --calling-max: 1404px; }
.calling-layout.times-open { grid-template-columns: 280px minmax(0, 1fr) minmax(340px, 440px); }
.calling-layout.times-open.queue-folded { grid-template-columns: minmax(0, 1fr) minmax(340px, 460px); }
.calling-times-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.calling-times-panel { overflow-y: auto; }
.calling-times-host .ccal-times.ccal-embedded { margin: 0; position: static; max-height: none; overflow: visible; border: 0; box-shadow: none; padding: 0; background: transparent; }
@media (min-width: 768px) and (max-width: 1599px) {
  .calling-layout.times-open { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
  .calling-layout.times-open .calling-queue { display: none; }
}
@media (max-width: 767px) {
  .calling-layout.times-open { grid-template-columns: 1fr; }
  .calling-times-panel { position: fixed; inset: 0; z-index: 60; border-radius: 0; max-height: none; padding: 16px; }
}
    /* ad72db33: the last demo's notes (the RBO reason) under the Last demo line */
    .calling-last-demo-notes { display: inline-block; margin-top: 2px; white-space: pre-wrap; color: #5b5670; font-size: 0.92em; }
/* css/demo-sheet.css */
/* DM1: the demo sheet. Full screen on a phone, a panel on the right on bigger screens.
   Dark band at the top, white cards below (design kit). The Finish panel (z-index 60) opens on top of it. */
.demo-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(14, 17, 23, 0.5);
  display: flex;
  justify-content: flex-end;
}

.demo-sheet {
  width: min(480px, 100%);
  height: 100%;
  overflow-y: auto;
  background: var(--bg, #F6F5FA);
  display: flex;
  flex-direction: column;
  outline: none;
  box-shadow: -8px 0 32px rgba(16, 24, 40, 0.2);
}

.demo-sheet-head {
  position: relative;
  background: var(--band-bg, #1B1530);
  color: #fff;
  padding: 20px 64px 44px 24px;
}

.demo-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.demo-sheet-close:hover { border-color: #fff; }
.demo-sheet-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.demo-sheet-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--band-muted, #C9C4DD);
}

.demo-sheet-kicker.demo-moment-home,
.demo-sheet-kicker.demo-moment-door { color: #B9F5D0; }
.demo-sheet-kicker.demo-moment-late,
.demo-sheet-kicker.demo-moment-outcome { color: #FFD59A; }

.demo-sheet-title {
  margin: 0;
  font: 700 24px/1.2 var(--font-display, "Bricolage Grotesque", sans-serif);
  letter-spacing: -0.02em;
  color: #fff;
  overflow-wrap: anywhere;
}

.demo-sheet-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--band-muted, #C9C4DD);
}

.demo-sheet-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -28px;
  padding: 0 16px 24px;
}

.demo-sheet-main {
  width: 100%;
  min-height: 56px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(75, 46, 219, 0.28);
}

.demo-sheet-tools {
  display: flex;
  gap: 8px;
}

.demo-sheet-tools > * {
  flex: 1 1 0;
  box-sizing: border-box;
  height: 48px;
  min-height: 48px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin: 0;
}

/* Directions etc. without the big button: the first tool row sits on the band, so it gets the card look */
.demo-sheet-body > .demo-sheet-tools:first-child { background: #fff; padding: 10px; border-radius: 16px; border: 1px solid var(--border); }

.demo-sheet-tools [aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.demo-sheet-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}

.demo-sheet-card-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.demo-sheet-strong { margin: 0 0 2px; font-size: 17px; font-weight: 700; color: var(--text, #1B1530); }
.demo-sheet-line { margin: 2px 0 0; font-size: 15px; color: var(--text, #1B1530); overflow-wrap: anywhere; }
.demo-sheet-mono { font-family: var(--font-mono, monospace); }
.demo-sheet-warn { color: #A3321E; font-weight: 700; }
.demo-sheet-mini { margin: 12px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.demo-sheet-people { margin: 0; padding: 0; list-style: none; }
.demo-sheet-people li { padding: 4px 0; font-size: 15px; }

.demo-sheet-note + .demo-sheet-note { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.demo-sheet-note p { margin: 2px 0 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-sheet-note-when { font-size: 12px; color: var(--muted); }

.demo-sheet-loading { margin: 0; color: var(--muted); font-size: 14px; }

.demo-sheet-foot { display: flex; justify-content: center; padding-top: 4px; }
.demo-sheet-foot .btn-secondary { min-height: 44px; min-width: 160px; }

@media (max-width: 767px) {
  .demo-sheet { width: 100%; box-shadow: none; }
  .demo-sheet-head { padding: 16px 64px 40px 16px; padding-top: max(16px, env(safe-area-inset-top)); }
  .demo-sheet-body { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* Today › Next up: the big button for the moment, then Call / Text / Directions / Details */
.today-next-main { width: 100%; min-height: 52px; font-size: 17px; font-weight: 700; margin-top: 14px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.today-next-tools { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.today-next-tools > * { flex: 1 1 0; box-sizing: border-box; height: 44px; min-height: 44px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; margin: 0; white-space: nowrap; }
.today-next-tools [aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.today-next-kicker.demo-moment-home, .today-next-kicker.demo-moment-door { color: #137A4B; }
.today-next-kicker.demo-moment-late, .today-next-kicker.demo-moment-outcome { color: #A15C00; }
.today-next-facts { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.today-demo-state { color: var(--muted); }
.today-demo-state.demo-moment-home, .today-demo-state.demo-moment-door { color: #137A4B; font-weight: 600; }
.today-demo-state.demo-moment-late, .today-demo-state.demo-moment-outcome { color: #A15C00; font-weight: 600; }

/* Performance folds away on phones (dealer's My day); always open on bigger screens */
.today-perf-fold { display: none; }
@media (max-width: 767px) {
  .today-perf-fold {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border);
    background: #fff; color: var(--text, #1B1530); font: 700 15px var(--font-body, sans-serif); cursor: pointer;
  }
  .today-perf-fold-mark { transition: transform 0.15s; color: var(--muted); }
  .today-dealer-perf.is-open .today-perf-fold-mark { transform: rotate(90deg); }
  .today-dealer-perf:not(.is-open) #today-perf-slot-dealer { display: none; }
  .today-dealer-perf.is-open #today-perf-slot-dealer { margin-top: 10px; }
}
.today-next-name-btn { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left;
  cursor: pointer; letter-spacing: inherit; overflow-wrap: anywhere; }
.today-next-name-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.today-next-name-btn:focus-visible { outline: 3px solid var(--accent, #4B2EDB); outline-offset: 2px; border-radius: 4px; }
.today-next-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.today-next-top .today-card-sub { margin: 0; }
.today-next-details { flex: none; min-height: 32px; font-weight: 700; }
.demo-sheet-change { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-sheet-change > * { min-height: 44px; margin: 0; }
/* Demos today on a phone: the row's one button and its arrow stay on the same line as the name */
@media (max-width: 767px) {
  #today-d-demos .today-row { flex-wrap: nowrap; align-items: center; }
  #today-d-demos .today-row-actions { flex: none; }
  /* WF1 (owner Dec 3): the state ("In the home since 3:02", "Done · needs the outcome") wraps instead of being cut,
     and the row's button stays inside the card */
  #today-d-demos .today-row-main { flex: 1 1 auto; min-width: 0; }
  #today-d-demos .today-row-detail { white-space: normal; overflow: visible; text-overflow: clip; }
  #today-d-demos .today-name { white-space: normal; overflow-wrap: anywhere; }
  #today-d-demos .today-row-actions .btn-primary { white-space: nowrap; }
}
/* Next up and Demos today side by side on wide screens, stacked on phones; the row hides when both are empty */
.today-dealer-top { align-items: start; }
.today-dealer-top:not(:has(> :not([hidden]):not(.hidden))) { display: none; }

/* IS6: the demo sheet's quick texts and in-home buttons, sized for a thumb */
.demo-sheet-quick,
.demo-sheet-extras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 0; }
.demo-sheet-quick-btn,
.demo-sheet-extra-btn { min-height: 48px; width: 100%; }

/* R1d one-handed polish (Nov 20): 48px tap targets on phones */
@media (max-width: 640px) {
  .demo-sheet-close { width: 48px; height: 48px; border-radius: 24px; }
  .demo-sheet-foot .btn-secondary { min-height: 48px; }
}

/* DG1: the demo's gift (demo sheet, Finish panel) and Admin › Demo gifts */
.dg-line { margin: 10px 0; padding: 10px 12px; border: 1px solid #e4e0f5; border-radius: 10px; background: #fff; }
.dg-gift { margin: 0; color: #1B1530; }
.dg-label { color: #5b5670; }
.dg-why { color: #5b5670; font-size: 0.92em; }
.dg-change-row { display: inline-flex; gap: 6px; align-items: center; margin-left: 4px; }
.dg-given { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.dg-modal { max-width: 640px; }
.dg-section { margin: 14px 0; padding-top: 10px; border-top: 1px solid #ece9f7; }
.dg-section h3 { font-family: "Bricolage Grotesque", sans-serif; margin: 0 0 6px; color: #1B1530; }
.dg-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.dg-row.is-off .dg-name { color: #8a859c; }
.dg-name { flex: 1 1 200px; min-width: 0; }
.dg-on { display: inline-flex; align-items: center; gap: 4px; font-size: 0.92em; }
.dg-rule { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1eff8; flex-wrap: wrap; }
.dg-rule-words { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.dg-rule-name { font-weight: 600; color: #1B1530; }
.dg-rule-now { color: #4B2EDB; }
.dg-rule-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dg-select, .dg-date { max-width: 200px; }

/* DG1 item 2: the gift in the calendar's demo menu and on Today's glance */
.cal-event-gift .dg-line { margin: 0 0 6px; padding: 6px 10px; font-size: 13px; }
.cal-event-gift .dg-gift { margin: 0; }
.owner-row-gift { display: block; font-size: 13px; color: #4A4560; margin-top: 2px; }
.owner-row-gift .dg-why { color: #6B6585; }

/* RA1: who is riding along on a demo (demo sheet, calendar menu, lead page demo card) */
.rda-line { margin: 10px 0; padding: 10px 12px; border: 1px solid #e4e0f5; border-radius: 10px; background: #fff; }
.rda-line.rda-compact { margin: 0 0 6px; padding: 6px 10px; font-size: 13px; }
.rda-text { margin: 0; color: #1B1530; }
.rda-label { color: #5b5670; }
.rda-change-row { display: inline-flex; gap: 6px; align-items: center; margin-left: 4px; flex-wrap: wrap; }
.rda-select { max-width: 200px; }
.cal-event-gift .rda-line { margin: 0 0 6px; padding: 6px 10px; font-size: 13px; }

/* RA1 (owner Dec 4): the calendar menu for the person riding along: whose demo it is and Directions only */
.cal-menu-riding-only > :not(#cal-event-riding):not(#cal-event-directions) { display: none !important; }
#cal-event-directions {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 600;
  color: var(--violet, #4B2EDB);
  text-decoration: none;
}
#cal-event-directions:hover { background: rgba(75, 46, 219, 0.08); }
/* css/offline.css */
    /* R1c poor signal: the amber "Waiting to send" marks and the bar at the top while saves are on the phone */
    .offline-mark {
      margin: 10px 0 4px;
      padding: 10px 12px;
      border-radius: var(--radius-sm);
      background: var(--wait-bg);
      color: var(--wait);
      font-weight: 600;
      font-size: 0.95rem;
    }
    .offline-mark p { margin: 0; }
    .offline-mark.is-failed { background: var(--attention-bg); color: var(--attention); }
    .offline-mark-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
    .offline-bar {
      position: fixed;
      left: 50%;
      transform: translateX(-50%);
      top: calc(env(safe-area-inset-top, 0px) + 8px);
      z-index: 2000;
      max-width: min(560px, calc(100vw - 24px));
      padding: 8px 14px;
      border-radius: 999px;
      background: var(--wait-bg);
      color: var(--wait);
      border: 1px solid #F1D48A;
      box-shadow: 0 6px 18px rgba(27, 21, 48, 0.14);
      font-weight: 600;
      font-size: 0.9rem;
    }
    .offline-bar p { margin: 0; }
    .offline-bar.is-failed {
      border-radius: var(--radius);
      background: var(--attention-bg);
      color: var(--attention);
      border-color: #F3B9A8;
    }
    .offline-bar-item { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(163, 50, 30, 0.2); font-weight: 500; }
    .offline-bar-item .offline-mark-actions { margin-top: 6px; }
    .instaset-waiting { color: var(--wait); font-weight: 600; }
/* css/dealer-app.css */
/* R1b Dealer release 1 part b: install and notifications cards on the dealer's Today */
.today-dealer-app {
  display: grid;
  gap: 10px;
  margin: 0 20px 14px;
}

.dealer-app-card {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line, #e6e3ef);
  box-shadow: 0 1px 2px rgba(27, 21, 48, 0.06);
}

.dealer-app-card h3 {
  margin: 0;
  font: 700 16px var(--font-heading, "Bricolage Grotesque", sans-serif);
  color: var(--ink, #1B1530);
}

.dealer-app-card p {
  margin: 0;
}

.dealer-app-card .btn-primary {
  min-height: 48px;
  width: 100%;
}

.dealer-app-card .link-btn {
  min-height: 40px;
}

/* R1d one-handed polish (Nov 20): 48px tap targets on phones */
@media (max-width: 640px) {
  .dealer-app-card .link-btn { min-height: 48px; }
}
/* css/demos.css */
#demos-view,
#calendar-view {
  overflow-x: clip;
  max-width: 100%;
}

#demos-view .page-band-sub {
  color: #fff;
  font-size: 15px;
}

.bk-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.bk-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.bk-field-grow {
  flex: 1 1 220px;
}

.bk-field select,
.bk-field input {
  width: 100%;
  min-width: 160px;
  height: 44px;
  margin: 0;
  border-radius: 8px;
}

.bk-field-grow input {
  min-width: 0;
}

.bk-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.bk-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.demos-tabs-row {
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  max-width: 100%;
}

.demos-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
}

.demos-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 500 14px var(--font-body);
  cursor: pointer;
}

.demos-tab.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.demos-tab .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef0f3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.demos-tab.active .count {
  background: color-mix(in srgb, var(--accent) 14%, white);
  color: var(--accent);
}

.demos-today {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  min-width: 0;
}

.demos-today-main {
  min-width: 0;
  padding: 4px 0 8px;
}

.demos-today-main h2,
.demos-panel h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.demos-today-main h2 {
  padding: 14px 16px 8px;
}

/* PR1: "6 appointments · 3 going ahead" under Today's demos */
.demos-today-counts {
  margin: -4px 16px 8px;
  font-size: 13px;
  color: var(--muted);
}

.demos-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-left: 1px solid var(--border);
  background: #f6f7f9;
}

.demos-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.demos-panel h2 {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.demos-panel-list {
  display: flex;
  flex-direction: column;
}

.demos-panel-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.demos-panel-row:last-child {
  border-bottom: 0;
}

.demos-panel-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.demos-panel-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.demos-panel-actions,
.demo-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.demos-panel-actions .btn-secondary,
.demos-panel-actions .btn-primary,
.demo-row-actions .btn-secondary,
.demo-row-actions .btn-primary,
.demo-row-actions a.btn-secondary,
#demos-export-btn,
.demos-pager .btn-secondary {
  min-height: 44px;
  height: auto;
}

.demos-list-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.demos-seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f6f7f9;
}

.demos-seg button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 600 13px var(--font-body);
  cursor: pointer;
}

.demos-seg button[aria-pressed="true"] {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.demos-range-label,
.demos-list-filters .bk-field span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.demos-range {
  min-width: 168px;
}

.demos-select {
  min-height: 44px;
  margin: 0;
  min-width: 160px;
}

#demos-rows {
  padding: 4px 0 8px;
}

.demo-day {
  margin: 12px 16px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.demo-clash-why {
  color: #b42318;
  font-weight: 600;
}

.demo-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.req-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.req-row.is-muted {
  color: var(--muted);
}

.req-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
  flex: 1 1 220px;
}

.req-row-main p {
  flex: 1 1 100%;
  margin: 0;
}

.req-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.req-row-actions .btn-secondary,
.req-row-actions .btn-primary,
.demo-request .btn-secondary {
  min-height: 44px;
}

.req-wait {
  font-weight: 700;
}

.req-cant-run {
  margin: 0;
  color: #b42318;
  font-weight: 700;
}

#req-ask-save[aria-busy="true"]::before,
.req-withdraw[aria-busy="true"]::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: req-spin 0.7s linear infinite;
}

@keyframes req-spin {
  to { transform: rotate(360deg); }
}

.req-muted,
.req-why,
.req-note {
  color: var(--muted);
}

.req-kind,
.req-state {
  font-size: 13px;
  font-weight: 700;
}

.req-asked {
  font-weight: 600;
  color: var(--text);
}

.req-office {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.req-left.is-urgent,
.req-avail.is-clash {
  color: #b42318;
  font-weight: 700;
}

.req-card-list .req-row {
  padding-left: 0;
  padding-right: 0;
}

#req-ask-modal textarea,
#req-decline-modal textarea {
  width: 100%;
}

.demo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.demo-row-main {
  min-width: min(100%, 180px);
  flex: 1 1 180px;
}

.demo-name {
  background: none;
  border: 0;
  padding: 0;
  min-height: 44px;
  font: 600 15px var(--font-body);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.demo-name:hover {
  color: var(--accent);
}

.demo-name.is-static,
.demo-name.is-static:hover {
  cursor: default;
  color: var(--text);
}

.demo-phone {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.demo-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  flex: 2 1 240px;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
}

.demo-meta-bit {
  color: var(--muted);
}

.demo-no-dealer {
  color: #b45309;
  font-weight: 600;
}

.demo-moved {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef0f3;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.demo-row-actions {
  margin-left: auto;
  margin-top: 0;
}

.demos-table th,
.demos-table td {
  white-space: normal;
}

.demos-table .demo-name {
  font-size: 14px;
  min-height: 0;
}

.demos-table.is-roomy td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.demos-table.is-compact td {
  padding-top: 6px;
  padding-bottom: 6px;
}

.demos-table tr.demos-group td {
  background: #f6f7f9;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.demos-group-count {
  color: var(--muted);
  font-weight: 600;
}

.demos-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 16px;
}

.demos-pager p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.demos-pager-controls {
  display: flex;
  gap: 8px;
}

.book-demo-find {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.book-lead-results {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
}

.book-lead-results:empty {
  display: none;
}

.book-lead-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.book-lead-hit:last-child {
  border-bottom: 0;
}

.book-lead-hit:hover,
.book-lead-hit.is-on,
.book-lead-hit:focus-visible {
  background: #f6f7f9;
  outline: none;
}

.book-lead-hit.is-picked {
  background: #eef3f8;
}

.book-lead-hit strong {
  font-size: 15px;
  line-height: 1.3;
}

.book-lead-hit span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}

.book-lead-more {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--accent);
  font: 600 14px var(--font-body);
  text-align: left;
  cursor: pointer;
}

.book-lead-more:hover,
.book-lead-more:focus-visible {
  background: #f6f7f9;
}

.book-lead-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.book-lead-add {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  padding: 0;
  font-size: 14px;
}

.book-new-person {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfc;
}

.book-new-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.book-new-grid .full {
  grid-column: 1 / -1;
}

.book-new-grid input,
.book-new-person .source-picker input {
  width: 100%;
  box-sizing: border-box;
}

.book-new-match {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
}

@media (max-width: 900px) {
  .demos-today {
    grid-template-columns: 1fr;
  }

  .demos-side {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 767px) {
  #demos-view #demos-table-wrap {
    overflow-x: visible;
  }

  .demos-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .demos-table,
  .demos-table tbody,
  .demos-table tr,
  .demos-table td {
    display: block;
    width: 100%;
  }

  .demos-table tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }

  .demos-table tr.demos-group {
    padding: 10px 16px;
    background: #f6f7f9;
  }

  .demos-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .demos-table tr.demos-group td {
    display: block;
    text-align: left;
    background: transparent;
  }

  .demos-table tr.demos-group td::before {
    content: none;
  }

  .demos-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    text-align: left;
  }

  .demos-table td.demos-customer {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* Demos tables: fixed columns on every tab so rows line up */
.demos-grid-wrap {
  overflow-x: auto;
}

.demos-grid {
  width: 100%;
  min-width: 940px;
  table-layout: fixed;
  border-collapse: collapse;
}

.demos-grid col.dg-time { width: 124px; }
.demos-grid col.dg-dealer { width: 150px; }
.demos-grid col.dg-status { width: 150px; }
.demos-grid col.dg-consent { width: 116px; }
.demos-grid col.dg-actions { width: 272px; }

.demos-grid th,
.demos-grid td {
  vertical-align: top;
  overflow-wrap: anywhere;
  text-align: left;
}

.demos-grid td.dg-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  overflow: hidden;
}

.demos-grid td.dg-time .dg-time-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demos-grid td.dg-place .dg-product {
  margin-right: 6px;
  vertical-align: middle;
}

.demos-grid td.dg-status > span {
  display: block;
}

.demos-grid td.dg-status > span + span {
  margin-top: 4px;
  width: fit-content;
}

.demos-grid th.dg-actions,
.demos-grid td.dg-actions {
  text-align: right;
}

.demos-grid td.dg-actions .demo-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

.demos-grid .btn-small {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
}

.demo-no-address {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
}

.demos-grid .demo-clash-why {
  color: #b45309;
  font-size: 13px;
}

@media (max-width: 767px) {
  .demos-grid {
    min-width: 0;
    table-layout: auto;
  }

  .demos-grid colgroup {
    display: none;
  }

  .demos-grid tbody tr:not(.demos-group) {
    margin: 0 0 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
  }

  .demos-grid td.dg-time {
    font-size: 15px;
    font-weight: 800;
  }

  .demos-grid td.dg-time .dg-time-line {
    display: inline;
  }

  .demos-grid td.dg-time .dg-time-line + .dg-time-line::before {
    content: " · ";
  }

  /* the customer leads the card: no label, name and phone on the left */
  .demos-grid td.dg-customer {
    display: block;
    text-align: left;
    padding-bottom: 6px;
  }

  .demos-grid td.dg-customer::before {
    content: none;
  }

  .demos-grid td.dg-status > span {
    display: inline;
  }

  .demos-grid td.dg-actions {
    display: block;
    padding-top: 8px;
  }

  .demos-grid td.dg-actions::before {
    content: none;
  }

  .demos-grid td.dg-actions .demo-row-actions {
    justify-content: flex-start;
  }

  .demos-grid td.dg-actions .demo-row-actions:empty {
    display: none;
  }
}

.demos-office-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 16px;
}

.demos-office-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 14px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
}

.demos-office-card-name {
  font-size: 16px;
  font-weight: 700;
}

.demos-office-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.demos-office-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.demos-office-stat strong {
  font-size: 18px;
  line-height: 1.1;
}

.demos-office-stat span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.demos-office-none {
  margin: 0;
  padding: 20px 16px 24px;
  color: var(--text);
}

.demos-office-none .link-btn {
  min-height: 44px;
}

.req-heading {
  margin: 12px 16px 0;
  font-size: 16px;
}

.demos-panel > .req-heading {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.req-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.req-row.is-muted {
  color: var(--muted);
}

.req-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
  flex: 1 1 220px;
}

.req-row-main p,
.req-demo,
.req-note,
.req-left,
.req-avail {
  flex: 1 1 100%;
  margin: 0;
}

.req-row-actions,
.demo-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.demo-request {
  margin-top: 10px;
}

.req-row-actions .btn-secondary,
.req-row-actions .btn-primary,
.demo-request .btn-secondary,
.demo-request .btn-primary {
  min-height: 44px;
}

.req-wait,
.req-state {
  font-weight: 700;
}

.req-muted,
.req-why {
  color: var(--muted);
  font-size: 14px;
}

.req-kind {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.req-left.is-urgent,
.req-avail.is-clash {
  color: #b42318;
  font-weight: 700;
}

.req-card-list .req-row {
  padding-left: 0;
  padding-right: 0;
}

.req-card-list .req-row:last-child,
.demos-panel .req-row:last-child {
  border-bottom: 0;
}

.req-count-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fef6e8;
  color: #8a5a12;
  border: 1px solid color-mix(in srgb, var(--st-booked) 45%, #ead7b0);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.req-strip {
  margin-top: 10px;
  background: #fef6e8;
  border: 1px solid #ead7b0;
  border-radius: 10px;
  color: var(--text);
}

.req-strip-row {
  padding: 10px 12px;
}

.req-strip-row + .req-strip-row {
  border-top: 1px solid #ead7b0;
}

.req-strip-title,
.req-strip-note,
.req-strip .req-left,
.req-strip-avail {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.req-strip-title {
  font-weight: 600;
  color: var(--text);
}

.req-strip-note,
.req-strip .req-left,
.req-strip-avail {
  margin-top: 4px;
  color: #6b5424;
  font-size: 13px;
}

.cust-time-btn {
  height: auto;
  min-height: 44px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  padding: 8px 14px;
}

.modal-cust-time {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
  padding: 0;
}

.cust-time-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
}

.cust-time-body label {
  display: block;
  margin-top: 12px;
}

#cust-time-reason {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
}

#cust-time-modal .choice {
  min-height: 44px;
}

.cust-time-run {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 8px;
}

.cust-time-run.is-single {
  grid-template-columns: 1fr;
}

.cust-time-run button {
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: 600 15px var(--font-body);
  text-align: left;
  cursor: pointer;
}

.cust-time-run button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  border-color: var(--accent);
}

.cust-time-effect {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.4;
}

.cust-time-foot {
  flex: 0 0 auto;
  padding: 0 20px 16px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.cust-time-passed,
.book-demo-past {
  color: #D97706;
  font-weight: 600;
  margin: 0 0 12px;
}

#cust-time-modal .cust-time-effect {
  margin: 12px 0 0;
}

#cust-time-modal .book-demo-footer {
  margin-top: 8px;
}

@media (max-width: 767px) {
  #cust-time-modal.modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-cust-time {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }

  .cust-time-run {
    grid-template-columns: 1fr;
  }

  #cust-time-modal .book-demo-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  #cust-time-modal .book-demo-footer .btn-primary,
  #cust-time-modal .book-demo-footer .btn-ghost {
    width: 100%;
    margin: 0;
    min-height: 44px;
  }
}

.req-fit {
  flex: 1 1 100%;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.req-fit.is-ok {
  color: var(--ok);
}

.req-fit.is-warn {
  color: #8a5a12;
}

.req-fit.is-hard {
  color: #b42318;
}

.req-strip-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.req-strip .btn-primary,
.req-strip .btn-secondary,
.req-strip .link-btn,
.demo-booked-ask,
.demo-booked-more,
#demo-booked-menu button {
  min-height: 44px;
}

.req-strip .link-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 2px;
}

.req-wait-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--st-booked);
  color: #fff;
  border: 0;
  font: 600 12px var(--font-body);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .demos-office-cards {
    grid-template-columns: 1fr;
  }
}

/* FR1: an office visit the customer arrived for */
.arrived-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #E7F6EC; color: #146C3A; font-size: 13px; font-weight: 600; }
.arrived-tag .arrived-undo { font-size: 12px; font-weight: 500; }

/* MPA1: Needs a new time: a note and "Make a call list" above the rows; the waiting lines stack under the reason */
.demos-waiting-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 12px;
}
.demos-waiting-bar p { margin: 0; }
.demos-grid .dg-status .demo-meta-bit,
.demos-grid .dg-status .wait-overdue { display: block; }
@media (max-width: 767px) {
  .demos-waiting-bar .btn-small { width: 100%; min-height: 44px; }
}

/* MP1: booked date under the demo date, and Confirmed by phone */
.dg-booked-line { color: var(--muted); font-size: 12px; font-weight: 500; }
.demo-confirmed { display: inline-block; margin-top: 2px; color: #067647; font-weight: 600; font-size: 12px; }

/* 4b: Clear all filters, at the end of the filter row */
.demos-clear { flex: 0 0 auto; align-self: flex-end; padding-bottom: 10px; white-space: nowrap; }
.demos-clear.hidden { display: none; }

/* PD1 Demos › Past demos */
.past-demos { display: flex; flex-direction: column; gap: 10px; }
.past-demos-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.past-demos-dates { display: none; gap: 10px; }
.past-demos-dates.is-custom { display: flex; }
.past-demos-dates input[type="date"] { min-height: 40px; }
.past-demos-filters #past-demos-export { margin-left: auto; }
.past-demos-status { margin: 0; font-size: 14px; }
.past-demos-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.past-demos-table th { text-align: left; font-size: 12px; font-weight: 600; color: #6B6680; text-transform: uppercase; letter-spacing: 0.03em; padding: 8px 10px; border-bottom: 1px solid #EEEAF6; }
.past-demos-table td { padding: 10px; border-bottom: 1px solid #F1EEF8; vertical-align: top; }
.past-demos-table .pd-when span, .past-demos-table .pd-sub { display: block; }
.past-demos-table .pd-time, .past-demos-table .pd-sub { color: #6B6680; font-size: 13px; }
.past-demos-table .pd-result .status-pill { white-space: nowrap; }
.past-demos-more { align-self: center; }
@media (max-width: 640px) {
  .past-demos-filters .bk-field { flex: 1 1 140px; }
  .past-demos-filters #past-demos-export { margin-left: 0; width: 100%; }
  .past-demos-table thead { display: none; }
  .past-demos-table, .past-demos-table tbody, .past-demos-table tr, .past-demos-table td { display: block; width: 100%; }
  #demos-past.past-demos { padding: 0 16px 16px; }
  .past-demos-dates.is-custom { width: 100%; }
  .past-demos-dates .bk-field { flex: 1 1 0; min-width: 0; }
  .past-demos-dates input[type="date"] { width: 100%; min-width: 0; box-sizing: border-box; }
  #demos-past .past-demos-table tr { padding: 10px 0; border-bottom: 1px solid #EEEAF6; }
  #demos-past .past-demos-table td { border: 0; padding: 2px 0; min-height: 0; }
  #demos-past .past-demos-table td.pd-when { font-weight: 600; }
  #demos-past .past-demos-table .pd-when span { display: inline; }
  #demos-past .past-demos-table .pd-time::before { content: " · "; }
  .past-demos-table td.pd-booked::before { content: "Booked by "; color: #6B6680; }
}

/* CD1 (MPA e712cdf3): Call ▾ on each upcoming demo row */
.demos-call {
  position: relative;
  display: inline-flex;
}

.demo-row-actions .demos-call .demos-call-main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.demo-row-actions .demos-call .demos-call-more {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
  min-width: 36px;
  padding-left: 8px;
  padding-right: 8px;
}

.demos-call-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line, #e4e1ee);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(27, 21, 48, 0.16);
  text-align: left;
}

.demos-call-menu.hidden {
  display: none;
}

.demos-call-item {
  display: block;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink, #1B1530);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.demos-call-item:hover,
.demos-call-item:focus-visible {
  background: #f3f0fd;
}

.demos-call-item.hidden {
  display: none;
}

@media (max-width: 720px) {
  .demos-call-menu {
    left: 0;
    right: auto;
  }
}
/* css/availability.css */
    #availability-view .band-card,
    #team-availability-view .band-card {
      padding: 24px;
    }

    #availability-view .band-card + .band-card,
    #team-availability-view .band-card:not(.hidden) + .band-card {
      margin-top: 0;
    }

    .avail-day {
      display: grid;
      grid-template-columns: 112px 44px minmax(0, 1fr);
      gap: 8px 12px;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }

    .avail-day-main {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 12px;
      align-items: center;
      min-width: 0;
    }

    .avail-day-name {
      font-weight: 600;
    }

    .avail-blocks {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      min-width: 0;
    }

    .avail-day.is-off .avail-blocks {
      display: none;
    }

    .avail-block {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .avail-dash {
      color: var(--muted);
    }

    #availability-view .avail-time,
    #avail-off-modal .avail-time,
    #availability-view .avail-icon-btn,
    #availability-view .avail-delete,
    #availability-view .avail-copy-btn,
    #avail-save-btn,
    #avail-add-off-btn,
    #avail-off-save,
    #avail-off-whole,
    #avail-off-part {
      min-height: 44px;
    }

    #avail-add-off-btn {
      color: var(--text);
      background: #fff;
      border: 1px solid var(--border);
      padding: 0 16px;
    }

    .avail-time {
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 8px;
      padding: 8px 12px;
      font: 500 14px var(--font-body);
      font-variant-numeric: tabular-nums;
      color: var(--text);
      cursor: pointer;
    }

    .avail-icon-btn,
    .avail-copy-btn {
      border: 0;
      background: transparent;
      color: var(--accent);
      font: 600 14px var(--font-body);
      padding: 8px 4px;
      cursor: pointer;
    }

    .avail-day-cap {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
      white-space: nowrap;
    }

    .avail-day-cap input {
      width: 64px;
      min-height: 44px;
      margin: 0;
      flex: 0 0 auto;
    }

    #availability-view .toggle.avail-toggle {
      width: 44px;
      height: 44px;
    }

    #availability-view .toggle.avail-toggle .toggle-slider {
      top: 10px;
      bottom: 10px;
    }

    .avail-limit {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      margin-top: 16px;
      font-weight: 600;
    }

    .avail-limit input {
      width: 72px;
      min-height: 44px;
      margin: 0;
    }

    .avail-off-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
    }

    .avail-off-head h2 {
      margin: 0;
      font-size: 18px;
    }

    .avail-off-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 8px 0;
      border-top: 1px solid var(--border);
    }

    .avail-off-row p {
      margin: 0;
    }

    .avail-empty {
      color: var(--muted);
      margin: 8px 0 0;
    }

    .avail-time-menu {
      position: fixed;
      z-index: 90;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 8px;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
      max-height: 280px;
      overflow: auto;
      box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    }

    .avail-time-menu .dtp-slot {
      min-height: 44px;
    }

    .avail-time-menu.is-sheet {
      border-radius: 16px 16px 0 0;
      max-height: 70vh;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .avail-copy-menu {
      position: fixed;
      z-index: 90;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: 260px;
      max-height: min(80vh, 520px);
      overflow: auto;
      box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    }

    .avail-copy-choice,
    .avail-copy-day {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 44px;
      margin: 0;
      padding: 8px 10px;
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: var(--text);
      font: 600 14px var(--font-body);
      text-align: left;
      cursor: pointer;
    }

    .avail-copy-choice:hover,
    .avail-copy-day:hover {
      background: #f4f6f8;
    }

    .avail-copy-picks {
      border-top: 1px solid var(--border);
      margin-top: 4px;
      padding-top: 4px;
    }

    .avail-copy-apply {
      width: 100%;
      min-height: 44px;
      margin-top: 4px;
    }

    .avail-copy-menu.is-sheet {
      left: 0;
      right: 0;
      bottom: 0;
      top: auto;
      width: 100%;
      border-radius: 16px 16px 0 0;
      max-height: 85vh;
    }

    .team-show-all {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 44px;
      margin: 0 0 12px;
      font-weight: 600;
      cursor: pointer;
    }

    .avail-off-modes {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }

    .avail-off-modes button {
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 999px;
      padding: 8px 14px;
      font: 600 14px var(--font-body);
      cursor: pointer;
    }

    .avail-off-modes button[aria-pressed="true"] {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }

    .avail-off-dates {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .avail-off-label {
      display: block;
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 4px;
    }

    #avail-off-times {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 12px;
    }

    .team-avail-table {
      width: 100%;
      border-collapse: collapse;
    }

    .team-avail-table th {
      text-align: left;
      font-size: 12px;
      color: var(--muted);
      font-weight: 600;
      padding: 8px;
    }

    .team-avail-table td {
      padding: 12px 8px;
      border-top: 1px solid var(--border);
      vertical-align: top;
    }

    .team-avail-table tbody tr {
      cursor: pointer;
    }

    .team-avail-table tbody tr:hover {
      background: #f7f8fa;
    }

    .team-defaults {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 12px;
    }

    .team-defaults label,
    #team-booking-form > #team-booking-defaults > label,
    #office-bookings-card label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      margin: 12px 0 4px;
    }

    .team-defaults label {
      margin-top: 0;
    }

    .team-defaults select,
    .team-defaults input,
    #team-booking-unconfirmed,
    #team-booking-remind,
    #office-bookings-card select,
    #office-bookings-card input {
      width: 100%;
      min-height: 44px;
    }

    .team-defaults .field-hint {
      margin: 6px 0 0;
    }

    .cal-shade {
      position: absolute;
      left: 0;
      right: 0;
      background: rgba(20, 24, 33, 0.07);
      pointer-events: none;
      z-index: 0;
    }

    .cal-timeoff {
      position: absolute;
      left: 3px;
      right: 3px;
      z-index: 1;
      pointer-events: none;
      overflow: hidden;
      border-radius: 6px;
      background: repeating-linear-gradient(-45deg, rgba(90, 98, 112, 0.18), rgba(90, 98, 112, 0.18) 6px, rgba(255, 255, 255, 0.65) 6px, rgba(255, 255, 255, 0.65) 12px);
      color: #3d4450;
      font-size: 11px;
      font-weight: 600;
      padding: 4px 6px;
    }

    .cal-load-label.is-full,
    .cal-load-count.is-full,
    .cal-col-sub .is-full {
      color: #d97706;
    }

    .cal-load-off {
      color: #9a6700;
      font-weight: 600;
    }

    .book-demo-avail {
      margin: 8px 0 0;
      padding: 8px 10px;
      border-radius: 8px;
      background: #fff6e8;
      color: #9a6700;
      font-size: 14px;
    }

    .dealer-picker-item-role.is-warn {
      color: #d97706;
      font-weight: 600;
    }

    #availability-view .page-band-actions,
    #today-dealer .page-band-actions,
    #demos-view .page-band-actions {
      flex-wrap: wrap;
    }

    #team-availability-view .table-wrap {
      overflow-x: hidden;
    }

    #availability-view,
    #team-availability-view {
      overflow-x: hidden;
    }

    .avail-week-card {
      margin-bottom: 16px;
    }

    .avail-week-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px 12px;
      margin-bottom: 8px;
    }

    .avail-week-head h2 {
      margin: 0;
      font-size: 18px;
      min-width: 0;
    }

    .avail-week-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
    }

    .avail-week-actions .btn-secondary,
    .avail-week-actions .link-btn {
      height: auto;
      min-height: 44px;
      padding: 0 12px;
      font-size: 14px;
      font-weight: 600;
    }

    .avail-date {
      display: grid;
      grid-template-columns: 124px 44px minmax(0, 1fr) auto;
      gap: 8px 12px;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }

    .avail-date-main {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 12px;
      align-items: center;
      min-width: 0;
      grid-column: 3;
      grid-row: 1;
    }

    .avail-date-name {
      grid-column: 1;
      grid-row: 1;
      font-weight: 600;
      white-space: nowrap;
    }

    .avail-date > .toggle {
      grid-column: 2;
      grid-row: 1;
    }

    .avail-date > .avail-chip {
      grid-column: 4;
      grid-row: 1;
      justify-self: end;
    }

    .avail-date.is-past .avail-date-name,
    .avail-date.is-past .avail-date-main,
    .avail-date.is-past .avail-chip,
    .avail-date.is-past .toggle {
      opacity: 0.55;
    }

    .avail-date.is-past .avail-time,
    .avail-date.is-past .avail-icon-btn,
    .avail-date.is-past .toggle,
    .avail-date.is-past .avail-day-cap input {
      pointer-events: none;
    }

    .avail-chip {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 8px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      background: #fff6e8;
      color: #9a6700;
    }

    .avail-chip.is-confirmed {
      background: #e7f6ee;
      color: #0f7a3a;
    }

    .avail-chip.is-clash {
      background: #fdecec;
      color: #b42318;
    }

    .avail-clash {
      grid-column: 1 / -1;
      margin: 0;
      color: #b42318;
      font-size: 14px;
      font-weight: 600;
    }

    .avail-chip.is-off,
    .avail-chip.is-time-off {
      background: #eef0f3;
      color: #5c6570;
    }

    .avail-date.is-off .avail-blocks {
      display: none;
    }

    .avail-diff,
    .avail-booked {
      grid-column: 1 / -1;
      margin: 0;
    }

    .avail-diff {
      color: var(--muted);
      font-size: 13px;
    }

    .avail-diff .link-btn {
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
      text-decoration: underline;
      min-height: 44px;
      padding: 0 4px;
    }

    .avail-booked {
      color: var(--muted);
      font-size: 14px;
    }

    .avail-booked .link-btn {
      min-height: 44px;
      padding: 0 2px;
      font-size: 14px;
    }

    .avail-booked-item {
      white-space: nowrap;
    }

    .today-confirm {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: 0 0 16px;
      padding: 16px;
      border: 1px solid #f0d7a6;
      border-radius: 12px;
      background: #fff6e8;
    }

    .today-confirm p {
      margin: 0;
      font-weight: 600;
    }

    .today-confirm .btn-secondary {
      min-height: 44px;
    }

    #team-avail-card .band-tab {
      color: var(--text);
      font-size: 14px;
      font-weight: 600;
      min-height: 44px;
    }

    #team-avail-card .band-tab.active {
      color: var(--text);
      border-bottom-color: var(--accent);
    }

    .team-date-key {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 16px;
      margin: 0 0 12px;
      padding: 0;
      list-style: none;
    }

    .team-date-key li {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      font-weight: 600;
    }

    .team-date-swatch {
      width: 16px;
      height: 16px;
      border-radius: 4px;
      flex: 0 0 auto;
    }

    .team-date-swatch.is-yes {
      background: #d9f2e4;
    }

    .team-date-swatch.is-open {
      background: #fdecc8;
    }

    .team-date-swatch.is-off {
      background: #e6eaee;
    }

    .team-date-swatch.is-timeoff {
      background: repeating-linear-gradient(-45deg, rgba(90, 98, 112, 0.18), rgba(90, 98, 112, 0.18) 4px, rgba(255, 255, 255, 0.85) 4px, rgba(255, 255, 255, 0.85) 8px);
    }

    .team-date-swatch.is-clash {
      background: #fff;
      box-shadow: inset 0 0 0 2px #d92d20;
    }

    .team-date-wrap {
      overflow: hidden;
      max-width: 100%;
    }

    .team-date-scroll {
      overflow-x: auto;
      max-width: 100%;
    }

    .team-date-table {
      border-collapse: collapse;
      width: max-content;
    }

    .team-date-table th,
    .team-date-table td {
      padding: 4px;
      text-align: center;
      font-size: 12px;
      font-weight: 600;
    }

    .team-date-table th.is-today,
    .team-date-table td.is-today {
      background: #eef2ff;
    }

    .team-date-table th.is-today {
      color: var(--accent);
    }

    .team-date-name {
      text-align: left;
      text-transform: none;
      font-weight: 600;
      min-width: 160px;
      max-width: 220px;
      position: sticky;
      left: 0;
      background: #fff;
      z-index: 1;
      white-space: normal;
    }

    .team-date-person {
      display: block;
      text-align: left;
      text-transform: none;
      font-weight: 600;
    }

    .team-date-unconfirmed {
      display: block;
      margin-top: 2px;
      color: #9a6700;
      font-size: 12px;
      font-weight: 600;
      text-align: left;
      text-transform: none;
      white-space: normal;
    }

    .team-date-copy {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      margin-top: 4px;
      text-align: left;
    }

    .team-date-cell {
      position: relative;
      min-width: 112px;
      height: 44px;
      padding: 0 8px;
      border: 0;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      cursor: pointer;
    }

    td.is-today .team-date-cell {
      box-shadow: inset 0 0 0 2px #2b4eff;
    }

    .team-date-cell.is-yes {
      background: #d9f2e4;
      color: #145c32;
    }

    .team-date-cell.is-open {
      background: #fdecc8;
      color: #6b4a00;
    }

    .team-date-cell.is-off {
      background: #e6eaee;
      color: #3a4352;
    }

    .team-date-cell.is-timeoff {
      color: #3d4450;
      background: repeating-linear-gradient(-45deg, rgba(90, 98, 112, 0.18), rgba(90, 98, 112, 0.18) 6px, rgba(255, 255, 255, 0.85) 6px, rgba(255, 255, 255, 0.85) 12px);
    }

    .team-date-cell.is-clash {
      color: #b42318;
      box-shadow: inset 0 0 0 2px #d92d20;
    }

    td.is-today .team-date-cell.is-clash {
      box-shadow: inset 0 0 0 2px #d92d20;
    }

    .avail-day-on-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      font-weight: 600;
    }

    .avail-day-state {
      margin: 0 0 4px;
      font-weight: 600;
    }

    .avail-day-changed {
      margin: 0 0 12px;
      color: var(--muted);
      font-size: 14px;
    }

    .avail-day-demo {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 4px 12px;
      align-items: center;
      padding: 8px 0;
      border-top: 1px solid var(--border);
    }

    .avail-day-demo-main {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
    }

    .avail-day-demo .link-btn,
    .avail-day-demo .btn-secondary {
      min-height: 44px;
    }

    .avail-day-clash {
      grid-column: 1 / -1;
      margin: 0 0 12px;
      color: #b42318;
      font-size: 14px;
      font-weight: 600;
    }

    #book-demo-modal.modal-backdrop {
      z-index: 30;
    }

    #avail-day-modal .toggle.avail-toggle {
      width: 44px;
      height: 44px;
    }

    #avail-day-modal .toggle.avail-toggle .toggle-slider {
      top: 10px;
      bottom: 10px;
    }

    #avail-day-modal .avail-time,
    #avail-day-modal .avail-icon-btn,
    #avail-day-save,
    #avail-confirm-all,
    #avail-tab-dates,
    #avail-tab-week {
      min-height: 44px;
    }

    .cal-unconfirmed {
      position: absolute;
      left: 0;
      right: 0;
      z-index: 0;
      pointer-events: none;
      background: repeating-linear-gradient(-45deg, rgba(217, 119, 6, 0.16), rgba(217, 119, 6, 0.16) 6px, rgba(255, 246, 232, 0.2) 6px, rgba(255, 246, 232, 0.2) 12px);
    }

    .cal-shade.is-off {
      background: rgba(90, 98, 112, 0.16);
    }

    .book-demo-avail.is-block {
      background: #fff1f0;
      color: #b42318;
    }

    @media (max-width: 767px) {
      .avail-day {
        grid-template-columns: 1fr 44px;
      }

      .avail-day-main {
        grid-column: 1 / -1;
      }

      .avail-off-dates,
      .team-defaults {
        grid-template-columns: 1fr;
      }

      .team-avail-table thead {
        display: none;
      }

      .team-avail-table,
      .team-avail-table tbody,
      .team-avail-table tr,
      .team-avail-table td {
        display: block;
        width: 100%;
      }

      .team-avail-table tr {
        padding: 8px 0 12px;
        border-top: 1px solid var(--border);
      }

      .team-avail-table td {
        border: 0;
        padding: 2px 0;
      }

      .team-avail-table td:first-child {
        font-weight: 700;
      }

      .avail-date {
        grid-template-columns: minmax(0, 1fr) 44px auto;
      }

      .avail-date > .avail-chip {
        grid-column: 3;
        grid-row: 1;
      }

      .avail-date-main,
      .avail-diff,
      .avail-clash,
      .avail-booked {
        grid-column: 1 / -1;
        grid-row: auto;
      }
    }
/* css/availability-glance.css */
    /* AV2: Demos › Availability at a glance (js/availability-glance.js) */

    #availability-glance-view {
      overflow-x: clip;
      max-width: 100%;
    }

    #availability-glance-view .page-band-sub {
      color: #fff;
      font-size: 15px;
    }

    #availability-glance-view .band-tab {
      min-height: 44px;
    }

    #aag-message {
      padding: 20px;
    }

    #aag-card {
      padding: 0;
      overflow: hidden;
    }

    .aag-pager {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-right: auto;
    }

    .aag-pager .btn-secondary {
      min-height: 44px;
    }

    .aag-page-btn {
      min-width: 44px;
      font-size: 20px;
      line-height: 1;
      padding: 0 10px;
    }

    .aag-range-label {
      min-width: 120px;
      text-align: center;
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 700;
      color: var(--text);
    }

    .aag-print-area {
      padding: 14px 16px 18px;
    }

    .aag-print-title {
      display: none;
      margin: 0 0 8px;
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
    }

    .aag-summary-line {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      margin: 0 0 12px;
      font-weight: 600;
      color: var(--text);
    }

    .aag-own-note {
      margin: 12px 0 0;
    }

    .aag-scroll {
      overflow-x: auto;
      max-width: 100%;
    }

    .aag-table {
      border-collapse: collapse;
      width: 100%;
    }

    .aag-week-table {
      width: max-content;
      min-width: 100%;
    }

    .aag-table th,
    .aag-table td {
      padding: 8px;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: top;
      font-size: 13px;
    }

    .aag-table thead th {
      font-size: 12px;
      font-weight: 700;
      color: var(--muted);
      white-space: nowrap;
    }

    .aag-week-table thead th:not(.aag-name),
    .aag-week-table td {
      text-align: center;
      padding: 4px;
    }

    .aag-table th.is-today,
    .aag-table td.is-today {
      background: var(--soft);
    }

    .aag-table thead th.is-today {
      color: var(--accent);
    }

    .aag-name {
      min-width: 150px;
      max-width: 220px;
      position: sticky;
      left: 0;
      background: var(--surface);
      z-index: 1;
      font-weight: 600;
      text-transform: none;
      letter-spacing: normal;
    }

    .aag-table thead th.aag-name {
      text-transform: uppercase;
    }

    .aag-person {
      display: block;
      font-weight: 700;
      color: var(--text);
    }

    .aag-person-sub {
      display: block;
      font-size: 12px;
      font-weight: 500;
      color: var(--muted);
    }

    .aag-person-open {
      display: block;
      margin-top: 2px;
      font-size: 12px;
      font-weight: 600;
      color: var(--wait);
    }

    .aag-hours {
      font-weight: 600;
      white-space: nowrap;
    }

    .aag-booked-count {
      display: block;
      font-weight: 600;
      white-space: nowrap;
    }

    .aag-demo-list {
      margin: 4px 0 0;
      padding: 0;
      list-style: none;
      color: var(--muted);
      font-size: 12px;
    }

    .aag-state {
      white-space: nowrap;
    }

    .aag-chip {
      display: inline-block;
      margin: 0 4px 4px 0;
      padding: 3px 8px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }

    .aag-chip.is-yes,
    .aag-cell.is-yes,
    .aag-swatch.is-yes {
      background: #d9f2e4;
      color: #145c32;
    }

    .aag-chip.is-open,
    .aag-cell.is-open,
    .aag-swatch.is-open {
      background: #fdecc8;
      color: #6b4a00;
    }

    .aag-chip.is-off,
    .aag-cell.is-off,
    .aag-swatch.is-off {
      background: #e6eaee;
      color: #3a4352;
    }

    .aag-chip.is-timeoff,
    .aag-cell.is-timeoff,
    .aag-swatch.is-timeoff {
      color: #3d4450;
      background: repeating-linear-gradient(-45deg, rgba(90, 98, 112, 0.18), rgba(90, 98, 112, 0.18) 6px, rgba(255, 255, 255, 0.85) 6px, rgba(255, 255, 255, 0.85) 12px);
    }

    .aag-chip.is-full {
      background: var(--soft);
      color: var(--accent);
    }

    .aag-chip.is-clash,
    .aag-swatch.is-clash {
      background: #fff;
      color: #b42318;
      box-shadow: inset 0 0 0 2px #d92d20;
    }

    .aag-cell {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 2px;
      min-width: 112px;
      min-height: 52px;
      padding: 6px 8px;
      border-radius: 8px;
      font-size: 12px;
      line-height: 1.25;
    }

    .aag-cell.is-clash {
      box-shadow: inset 0 0 0 2px #d92d20;
    }

    td.is-today .aag-cell:not(.is-clash) {
      box-shadow: inset 0 0 0 2px var(--accent);
    }

    .aag-cell-hours {
      font-weight: 700;
    }

    .aag-cell-booked {
      font-weight: 500;
    }

    .aag-cell-flag {
      font-weight: 700;
      color: var(--accent);
    }

    .aag-key {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 16px;
      margin: 0 0 12px;
      padding: 0;
      list-style: none;
    }

    .aag-key li {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      font-weight: 600;
    }

    .aag-swatch {
      width: 16px;
      height: 16px;
      border-radius: 4px;
    }

    /* AV2 extras: dealers free (Day: a strip of hourly slots; Week: a last row) */
    .aag-free {
      margin: 0 0 14px;
    }

    .aag-free-label {
      margin: 0 0 8px;
      font-size: 13px;
      color: var(--muted);
    }

    .aag-free-label strong {
      color: var(--text);
      font-weight: 700;
    }

    .aag-free-strip {
      display: flex;
      gap: 6px;
      margin: 0;
      padding: 0 0 4px;
      list-style: none;
      overflow-x: auto;
      max-width: 100%;
    }

    .aag-free-slot {
      flex: 0 0 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      min-width: 64px;
      padding: 6px 8px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface);
      font-size: 12px;
      line-height: 1.25;
    }

    .aag-free-time {
      font-weight: 600;
      color: var(--muted);
      white-space: nowrap;
    }

    .aag-free-count {
      font-weight: 700;
      white-space: nowrap;
    }

    .aag-free-slot.is-some,
    .aag-free-day.is-some .aag-free-count {
      color: #145c32;
    }

    .aag-free-slot.is-some {
      background: #d9f2e4;
      border-color: #d9f2e4;
    }

    .aag-free-slot.is-none .aag-free-count,
    .aag-free-day.is-none .aag-free-count {
      color: var(--muted);
    }

    .aag-free-slot.is-past {
      opacity: 0.55;
    }

    .aag-free-hint {
      margin: 6px 0 0;
    }

    .aag-summary .aag-free-hint {
      margin: 0 0 10px;
    }

    .aag-table tfoot th,
    .aag-table tfoot td {
      border-top: 2px solid var(--border);
      border-bottom: 0;
    }

    .aag-free-day {
      font-size: 15px;
      font-weight: 700;
      vertical-align: middle;
    }

    .aag-week-table td.aag-free-day {
      padding: 8px 4px;
    }

    body.aag-printing .aag-free-slot {
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }

    @media (max-width: 640px) {
      .aag-pager {
        width: 100%;
        margin-right: 0;
      }

      .aag-range-label {
        flex: 1 1 auto;
      }

      .aag-name {
        min-width: 120px;
      }
    }

    /* Print: only the table area, landscape, with a title line */
    @media print {
      @page {
        size: landscape;
        margin: 12mm;
      }

      body.aag-printing * {
        visibility: hidden;
      }

      body.aag-printing #aag-print-area,
      body.aag-printing #aag-print-area * {
        visibility: visible;
      }

      body.aag-printing #aag-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
      }

      body.aag-printing .aag-print-title {
        display: block;
      }

      body.aag-printing .aag-scroll {
        overflow: visible;
      }

      body.aag-printing .aag-week-table {
        width: 100%;
      }

      body.aag-printing .aag-name {
        position: static;
      }

      body.aag-printing .aag-cell,
      body.aag-printing .aag-chip,
      body.aag-printing .aag-swatch,
      body.aag-printing .aag-table td.is-today {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
      }

      body.aag-printing .aag-cell {
        min-width: 0;
      }
    }
/* css/callbacks-calendar.css */
    /* CS1: Call with the calendar (js/callbacks-calendar.js). Wide screens: calls left (45%), open times right (55%).
       Below 1100px: one column with Calls / Times tabs. */

    #call-calendar-view {
      overflow-x: clip;
      max-width: 100%;
    }

    #call-calendar-view .page-band-sub {
      color: #fff;
      font-size: 15px;
    }

    #call-calendar-view .band-tab {
      min-height: 44px;
    }

    .ccal-grid {
      display: block;
    }

    .ccal-grid.show-calls .ccal-times,
    .ccal-grid.show-times .ccal-calls {
      display: none;
    }

    .ccal-list-card {
      padding: 0;
      overflow: hidden;
    }

    .ccal-group-title {
      margin: 0;
      padding: 10px 16px;
      background: var(--soft);
      border-bottom: 1px solid var(--border);
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
    }

    .ccal-group.is-overdue .ccal-group-title {
      color: var(--danger, #B42318);
    }

    .ccal-row {
      cursor: pointer;
    }

    .ccal-row:hover {
      background: var(--soft);
    }

    .ccal-row.is-selected {
      background: var(--soft);
      box-shadow: inset 4px 0 0 var(--accent);
    }

    .ccal-row:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: -2px;
    }

    .ccal-times {
      padding: 14px 16px 18px;
    }

    .ccal-times-head {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 8px;
    }

    .ccal-times-title {
      margin: 0;
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
    }

    /* CS2: "Booking for: name · town zip" at the top of the right side */
    .ccal-for {
      margin: 0 0 12px;
      padding: 10px 12px;
      border-radius: 10px;
      background: var(--soft);
      font-size: 15px;
      color: var(--text);
      overflow-wrap: anywhere;
    }

    .ccal-for.is-empty {
      color: var(--muted);
    }

    .ccal-for-label {
      color: var(--muted);
    }

    .ccal-pager {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .ccal-pager .btn-secondary {
      min-height: 44px;
    }

    #ccal-prev {
      min-width: 44px;
      font-size: 20px;
      line-height: 1;
      padding: 0 10px;
    }

    .ccal-day {
      padding: 10px 0;
      border-top: 1px solid var(--border);
    }

    .ccal-day:first-child {
      border-top: 0;
    }

    .ccal-day-title {
      margin: 0 0 8px;
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
    }

    .ccal-day .field-hint {
      margin: 0;
    }

    .ccal-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .ccal-chip {
      display: inline-flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      min-height: 44px;
      padding: 6px 12px;
      border: 1px solid var(--border-strong);
      border-radius: 10px;
      background: var(--surface);
      color: var(--text);
      font: inherit;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
    }

    .ccal-chip:hover,
    .ccal-chip.is-open {
      border-color: var(--accent);
      color: var(--accent);
    }

    .ccal-chip.has-booked {
      border-style: dashed;
    }

    .ccal-chip-near {
      font-size: 12px;
      font-weight: 500;
      color: var(--muted);
    }

    .ccal-chooser {
      flex-basis: 100%;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      padding: 10px 12px;
      border-radius: 10px;
      background: var(--soft);
    }

    .ccal-chooser-title {
      flex-basis: 100%;
      margin: 0;
      font-weight: 600;
      color: var(--text);
    }

    .ccal-dealer {
      display: inline-flex;
      flex-direction: column;
      align-items: flex-start;
      min-height: 44px;
    }

    .ccal-note {
      padding: 8px 0;
    }

    #ccal-rule {
      margin: 10px 0 0;
    }

    #call-calendar-view .callback-row-actions .btn-secondary,
    #call-calendar-view .callback-call-btn {
      min-height: 44px;
    }

    .today-ccal-btn {
      min-height: 44px;
    }

    /* CS2: Morning / Afternoon / Evening blocks, shaded by how many dealers are free */
    .ccal-blocks {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .ccal-block {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
      min-height: 64px;
      min-width: 0;
      padding: 8px 10px;
      border: 1px solid var(--border-strong);
      border-radius: 10px;
      background: var(--surface);
      color: var(--text);
      font: inherit;
      text-align: left;
      cursor: pointer;
    }

    .ccal-block.is-past {
      opacity: 0.7;
    }

    .ccal-block:disabled {
      cursor: default;
      color: var(--muted);
      background: var(--soft);
      border-style: dashed;
    }

    .ccal-block.lvl-1 { background: #F1EEFD; }
    .ccal-block.lvl-2 { background: #DCD5FA; }
    .ccal-block.lvl-3 { background: #C3B7F6; }

    .ccal-block:not(:disabled):hover,
    .ccal-block.is-open {
      border-color: var(--accent);
      box-shadow: inset 0 0 0 1px var(--accent);
    }

    .ccal-block-title {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 700;
    }

    .ccal-block-main {
      font-size: 13px;
      font-weight: 600;
    }

    .ccal-block-near {
      font-size: 12px;
      color: #3B3552;
      overflow-wrap: anywhere;
    }

    .ccal-block-times {
      margin-top: 8px;
    }

    .ccal-day.is-fill-day .ccal-day-title {
      color: var(--accent);
    }

    .ccal-tools {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 6px;
    }

    .ccal-tool-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 12px;
    }

    .ccal-cover-note {
      margin: 0;
    }

    /* CS2: filters (both the Call-backs page and Call with the calendar) */
    .cbq-filters {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 8px 12px;
      padding: 12px 16px;
      overflow: visible;
      box-sizing: border-box;
    }

    /* the filters are the card that tucks into the dark band; the list's card sits below them */
    #ccal-filters:not(:empty) + #ccal-list > .band-card {
      margin-top: 0;
    }

    #ccal-filters .cbq-filters {
      margin-bottom: 12px;
    }

    #callbacks-filters .cbq-filters {
      margin: 0 0 12px;
    }

    .cbq-toggle {
      display: none;
      min-height: 44px;
    }

    .cbq-field {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
      flex: 1 1 140px;
      max-width: 220px;
    }

    .cbq-field-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
    }

    /* 04bc7bc0: "Usually covered by" picks several dealers (a fold-out list of tick boxes) */
    .cbq-multi {
      position: relative;
    }

    /* above the list card below it (both z-index 1), below windows (20) and the incoming-call box (19) */
    .cbq-filters.cbq-has-open {
      z-index: 18;
    }

    .cbq-multi-summary {
      display: flex;
      align-items: center;
      min-height: 44px;
      padding: 0 32px 0 12px;
      box-sizing: border-box;
      border: 1px solid var(--line, #d9d6e3);
      border-radius: 8px;
      background: #fff;
      cursor: pointer;
      list-style: none;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      position: relative;
    }

    .cbq-multi-summary::-webkit-details-marker {
      display: none;
    }

    .cbq-multi-summary::after {
      content: "";
      position: absolute;
      right: 12px;
      top: 50%;
      width: 7px;
      height: 7px;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: translateY(-70%) rotate(45deg);
      opacity: 0.6;
    }

    .cbq-multi-list {
      position: absolute;
      z-index: 15;
      top: calc(100% + 4px);
      left: 0;
      min-width: 100%;
      max-height: 320px;
      overflow-y: auto;
      padding: 6px;
      box-sizing: border-box;
      background: #fff;
      border: 1px solid var(--line, #d9d6e3);
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(27, 21, 48, 0.14);
    }

    .cbq-multi-row {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      min-height: 40px;
      padding: 0 8px;
      border-radius: 6px;
      white-space: nowrap;
      cursor: pointer;
    }

    .cbq-multi-row:hover {
      background: rgba(75, 46, 219, 0.06);
    }

    .cbq-field .cbq-multi-row input[type="checkbox"] {
      flex: none;
      width: 18px;
      height: 18px;
      min-height: 0;
      margin: 0;
      accent-color: #4B2EDB;
    }

    .cbq-multi-row span {
      flex: 1 1 auto;
      text-align: left;
    }

    .cbq-multi-any {
      min-height: 40px;
      padding: 0 8px;
    }

    .cbq-field select,
    .cbq-field input {
      width: 100%;
      min-width: 0;
      min-height: 44px;
      box-sizing: border-box;
    }

    /* wide screens: Mine and Clear lead the first row, so they never sit alone on a row of their own */
    @media (min-width: 768px) {
      .cbq-check,
      .cbq-clear {
        order: -1;
      }
    }

    .cbq-check {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 44px;
      font-weight: 600;
    }

    .cbq-clear {
      min-height: 44px;
    }

    .cbq-fill-note {
      margin: 0 32px 12px;
      padding: 8px 12px;
      border-radius: 10px;
      background: var(--soft);
      color: var(--text);
    }

    .cbq-more-row {
      /* never the scroll anchor, or each new page keeps it in view and the next page loads at once */
      overflow-anchor: none;
      display: flex;
      justify-content: center;
      padding: 10px 16px;
    }

    .cbq-more {
      min-height: 44px;
    }

    .cbq-loading {
      padding: 12px 0;
    }

    /* CS2: the map once someone is chosen */
    .ccal-map-wrap {
      margin-top: 14px;
      padding-top: 10px;
      border-top: 1px solid var(--border);
    }

    .ccal-map-head {
      margin: 0 0 8px;
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
    }

    .ccal-map-canvas {
      position: relative;
      height: 280px;
      border-radius: 10px;
      overflow: hidden;
      background: var(--soft);
    }

    .ccal-map-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 14px;
      margin: 8px 0 0;
      padding: 0;
      list-style: none;
      font-size: 13px;
      color: var(--muted);
    }

    .ccal-map-legend li {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .ccal-map-foot {
      margin: 6px 0 0;
    }

    .ccal-pin-key,
    .ccal-pin {
      display: inline-block;
      box-sizing: border-box;
    }

    .ccal-pin-key {
      width: 12px;
      height: 12px;
      border-radius: 50%;
    }

    .ccal-pin.is-lead,
    .ccal-pin-key.is-lead {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #4B2EDB;
      border: 3px solid #fff;
      box-shadow: 0 0 0 2px #4B2EDB;
    }

    /* the legend is a plain key (nothing to switch): solid shapes, no ring or box that reads as a tick box */
    .ccal-pin-key.is-lead {
      width: 12px;
      height: 12px;
      border: 0;
      box-shadow: none;
    }

    .ccal-pin.is-home,
    .ccal-pin-key.is-home {
      width: 14px;
      height: 14px;
      border-radius: 3px;
      background: #1B1530;
      border: 2px solid #fff;
    }

    .ccal-pin-key.is-home {
      width: 12px;
      height: 12px;
      border: 0;
    }

    .ccal-pin.is-home,
    .ccal-pin.is-lead {
      cursor: pointer;
    }

    .ccal-pin.is-demo {
      padding: 2px 6px;
      border-radius: 6px;
      background: #fff;
      border: 1px solid #1B1530;
      color: #1B1530;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
    }

    .ccal-pin-key.is-demo {
      width: auto;
      height: auto;
      padding: 1px 5px;
      border-radius: 6px;
      background: #fff;
      border: 1px solid #1B1530;
      color: #1B1530;
      font-size: 10px;
      font-weight: 700;
      line-height: 1.4;
      white-space: nowrap;
    }

    .ccal-map-canvas .maplibregl-popup-content {
      padding: 8px 10px;
      font: 600 13px/1.35 var(--font-body, inherit);
      color: #1B1530;
    }

    @media (min-width: 1100px) {
      .ccal-tabs-row {
        display: none;
      }

      .ccal-grid,
      .ccal-grid.show-calls,
      .ccal-grid.show-times {
        display: grid;
        grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
        gap: 16px;
        align-items: start;
      }

      .ccal-grid.show-calls .ccal-times,
      .ccal-grid.show-times .ccal-calls {
        display: block;
      }

      .ccal-times {
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
      }

      .ccal-see-times {
        display: none;
      }
    }

    @media (max-width: 767px) {
      .cbq-toggle {
        display: inline-flex;
        align-items: center;
      }

      .cbq-filters.is-folded > :not(.cbq-toggle) {
        display: none;
      }

      .cbq-field {
        flex: 1 1 calc(50% - 6px);
        max-width: none;
      }

      .ccal-block {
        padding: 6px 8px;
      }

      .cbq-fill-note {
        margin: 0 16px 12px;
      }

      .ccal-map-canvas {
        height: 240px;
      }

      /* the rows stack on a phone (call-lists.css); the name and details take only their own height */
      .ccal-row .callback-row-main {
        flex: 0 0 auto;
      }

      .ccal-row .callback-row-actions .btn-secondary {
        flex: 1 1 0;
      }
    }
/* css/stats.css */
    .stats-stage {
      position: relative;
      z-index: 1;
      margin: -50px 32px 32px;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .stats-periods {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
    }

    .stats-period,
    .stats-nav-btn,
    .stats-help,
    .stats-sort,
    .stats-sort-bar button {
      min-height: 44px;
    }

    .stats-period {
      border: 0;
      border-radius: 22px;
      background: #2A2245;
      color: #C9C1F2;
      font: 700 14px var(--font-body);
      padding: 0 14px;
      cursor: pointer;
    }

    .stats-period.is-on {
      background: #fff;
      color: #1B1530;
    }

    .stats-nav-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .stats-range {
      margin: 0;
      color: #fff;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
      line-height: 1.2;
    }

    .stats-nav-btn {
      min-width: 44px;
      padding: 0 14px;
      border-radius: 22px;
      border: 1.5px solid var(--band-line);
      background: transparent;
      color: #fff;
      font-size: 18px;
      cursor: pointer;
    }

    .stats-nav-btn:disabled {
      opacity: 0.35;
      cursor: default;
    }

    .stats-custom {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 10px;
    }

    .stats-custom label {
      display: flex;
      flex-direction: column;
      gap: 4px;
      color: #C9C1F2;
      font: 700 12px var(--font-body);
    }

    .stats-custom input {
      min-height: 44px;
      border-radius: 12px;
      border: 1px solid var(--band-line);
      background: #241C3D;
      color: #fff;
      padding: 0 12px;
      color-scheme: dark;
    }

    .stats-notes {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .stats-notes:empty {
      display: none;
    }

    .stats-note {
      margin: 0;
      padding: 12px 14px;
      border-radius: 14px;
      background: #FFF4D6;
      color: #7A5300;
      font: 600 14px var(--font-body);
    }

    .stats-note button {
      border: 0;
      background: none;
      color: #7A5300;
      font: 800 14px var(--font-body);
      text-decoration: underline;
      cursor: pointer;
      min-height: 44px;
      padding: 0 2px;
    }

    .stats-tiles,
    .stats-ratios {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
      gap: 12px;
    }

    .stats-tiles .stat-tile,
    .stats-ratios .stat-tile {
      margin: 0;
    }

    .stats-ratio-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
    }

    .stats-help {
      flex: none;
      width: 44px;
      height: 44px;
      margin: -8px -8px 0 0;
      border-radius: 22px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--muted);
      font: 800 16px var(--font-body);
      cursor: pointer;
    }

    .stats-help[aria-expanded="true"] {
      background: var(--soft);
      color: var(--accent);
      border-color: var(--soft);
    }

    .stats-formula {
      display: none;
      margin: 8px 0 0;
      color: var(--text);
      font: 600 13px var(--font-body);
    }

    .stats-ratio.is-open .stats-formula {
      display: block;
    }

    .stats-ratio.is-shy .stat-value,
    .stats-num.is-shy {
      color: var(--muted);
    }

    .stats-shy {
      margin: 6px 0 0;
      color: var(--muted);
      font: 700 12px var(--font-body);
    }

    .stats-table-card {
      padding: 8px 8px 16px;
    }

    .stats-table-card h2 {
      margin: 12px 12px 4px;
    }

    .stats-sort {
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      letter-spacing: inherit;
      text-transform: inherit;
      cursor: pointer;
      padding: 0;
    }

    .stats-sort.is-on {
      color: var(--text);
    }

    .stats-person {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .stats-person-copy {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .stats-person-name {
      font-weight: 700;
      color: var(--text);
    }

    .stats-late {
      color: #A3321E;
      font: 700 12px var(--font-body);
    }

    .stats-detail td {
      background: #F7F5FC;
      white-space: normal;
    }

    .stats-detail-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 12px 16px;
      padding: 8px 4px;
    }

    .stats-detail-grid p {
      margin: 0;
    }

    .stats-detail-label {
      color: var(--muted);
      font: 800 11px var(--font-body);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .stats-detail-value {
      font: 700 16px var(--font-display);
      color: var(--text);
    }

    .stats-detail-value.is-shy {
      color: var(--muted);
    }

    .stats-sort-bar,
    .stats-cards {
      display: none;
    }

    .stats-empty {
      margin: 8px 12px 12px;
      color: var(--muted);
    }

    .stats-card {
      width: 100%;
      text-align: left;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
      padding: 12px;
      cursor: pointer;
    }

    .stats-card-metrics {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px 12px;
      margin-top: 10px;
    }

    @media (max-width: 1100px) {
      .stats-stage {
        margin: -36px 16px 24px;
      }
    }

    @media (max-width: 759px) {
      .stats-stage {
        margin: 16px 16px 24px;
      }

      .stats-table-wrap {
        display: none;
      }

      .stats-sort-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 4px 8px 8px;
      }

      .stats-sort-bar button {
        border: 1.5px solid var(--border-strong);
        border-radius: 22px;
        background: #fff;
        color: var(--muted);
        font: 700 13px var(--font-body);
        padding: 0 12px;
        cursor: pointer;
      }

      .stats-sort-bar button.is-on {
        background: var(--soft);
        color: var(--accent);
        border-color: var(--soft);
      }

      .stats-cards {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 8px 8px;
      }
    }

    .stats-callers-sub {
      margin: 0 12px 10px;
      font-size: 13px;
    }

    /* IN1b: By ad */
    .stats-ad-campaign td { font-weight: 800; }
    .stats-ad-row td:first-child { padding-left: 28px; color: var(--muted); }

/* SA2: Sales page */
.sales-band-row { flex-wrap: wrap; gap: 12px; }
.sales-filter-bar { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 6px; }
.sales-filters { display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: flex-end; flex: 1 1 auto; min-width: 0; }
.sales-filter { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #6B6580; flex: 1 1 0; min-width: 84px; }
.sales-filter-wide { flex-grow: 2; min-width: 140px; }
.sales-filter-range { display: flex; gap: 6px; }
.sales-filter-range input { width: 50%; min-width: 0; }
.sales-help-btn { border-color: #C9C1F2; color: #4B2EDB; flex: 0 0 auto; margin-top: 18px; }
.sales-help-btn:hover { background: #F1EEFC; }
.sales-help { margin: 0 18px 10px; padding: 12px 14px; border-radius: 10px; background: #F7F6FB; font-size: 14px; }
.sales-help p { margin: 0 0 6px; max-width: 80ch; }
.sales-sort { border: 0; background: transparent; font: inherit; font-weight: 650; color: inherit; cursor: pointer; padding: 0; text-align: left; }
.sales-sort.is-on { color: #4B2EDB; }
.sales-table td.num { font-variant-numeric: tabular-nums; }
.sales-more-row { display: flex; justify-content: center; padding: 12px 0 18px; }
.sales-more-row:has(> .hidden:only-child) { display: none; }
.sales-band-row .band-search { flex: 1 1 220px; min-width: 0; }
.sales-needs-notice { flex: 0 1 auto; gap: 5px; flex-wrap: wrap; min-height: 36px; padding: 6px 14px; font-size: 13px; white-space: normal; text-align: left; }
.sales-needs-notice u { text-underline-offset: 2px; }
.sales-filters-toggle { display: none; }
.sales-filter select { min-width: 0; width: 100%; }
.sales-clear { flex: 0 0 auto; align-self: flex-end; padding-bottom: 10px; white-space: nowrap; }
.sales-empty:not(.hidden) { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sales-empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (max-width: 640px) {
  .sales-filter-bar { flex-wrap: wrap; padding: 12px 14px 6px; }
  .sales-filters-toggle { display: inline-flex; align-items: center; min-height: 40px; }
  .sales-help-btn { margin-top: 0; margin-left: auto; order: 2; }
  .sales-filters { display: none; flex: 1 1 100%; order: 3; }
  .sales-filter-bar.is-open .sales-filters { display: flex; }
  .sales-filter { flex: 1 1 45%; min-width: 0; }
  .sales-clear { order: 1; align-self: center; padding-bottom: 0; }
}

/* Side panel (Sales: needs a sale form) */
.side-panel { position: fixed; inset: 0; z-index: 40; }
.side-panel-backdrop { position: absolute; inset: 0; background: rgba(27, 21, 48, 0.45); }
.side-panel-sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw);
  background: #fff; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(27, 21, 48, 0.18);
}
.side-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; background: #1B1530; color: #fff; }
.side-panel-title { margin: 0; font: 700 20px var(--font-display); color: #fff; }
.side-panel-close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.side-panel-close:hover, .side-panel-close:focus-visible { background: rgba(255, 255, 255, 0.24); }
.side-panel-body { padding: 14px 20px 24px; overflow-y: auto; flex: 1 1 auto; }
.side-panel-body .needs-sale-form-help { margin: 0 0 10px; font-size: 14px; }
.side-panel-body .needs-sale-form-main { min-width: 0; overflow-wrap: anywhere; }
.stats-sales-by-pick { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 6px 0 12px; font-size: 14px; }
.stats-sales-by-pick select { margin-left: 6px; }

    /* CP1: Cross-sell stays readable on phones: each row becomes a small block, labels from data-label */
    @media (max-width: 759px) {
      .stats-table-wrap.stats-stack { display: block; }
      .stats-stack thead { display: none; }
      .stats-stack table, .stats-stack tbody, .stats-stack tr, .stats-stack td { display: block; width: 100%; }
      .stats-stack tr { padding: 10px 8px; border-top: 1px solid var(--border); }
      .stats-table-card .stats-stack td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; min-height: 0; height: auto; }
      .stats-stack td:first-child { font-weight: 800; }
      .stats-stack td:not(:first-child)::before { content: attr(data-label); color: var(--muted); }
    }

/* MP1: Bookings by person */
.stats-bookings-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stats-bookings-top h2 { margin: 0; }
.stats-bookings-month th { text-align: left; background: var(--surface-2, #f4f2fb); font-weight: 600; padding-top: 10px; }
/* OW1 (owner Nov 22): "Sets" heading with its ? */
.stats-sets-head { flex: 1 1 240px; }
.stats-sets-head .stats-ratio-top { justify-content: flex-start; align-items: center; }
.stats-sets-head .stats-help { margin: 0; }

    /* DB1: the office line under the double-booking card's dealers */
    .stats-total-row td { font-weight: 700; }
/* css/marketing.css */
    /* Admin › Marketing: routes list, route editor, results (boards H-Marketing, H-Route-Builder, H-Results) */

    .mk-layout {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px;
      gap: 18px;
      align-items: start;
      margin: -50px 32px 32px;
      min-width: 0;
    }

    .mk-results {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin: -50px 32px 32px;
      min-width: 0;
    }

    .mk-results .mk-layout { margin: 0; }
    .mk-results .card { margin: 0; }

    .mk-side {
      display: flex;
      flex-direction: column;
      gap: 16px;
      min-width: 0;
    }

    .mk-layout .card { margin: 0; }

    .mk-field-label {
      display: block;
      margin-bottom: 6px;
      font-weight: 700;
      font-size: 14px;
    }

    .setup-page .setup-field textarea,
    .mk-text-edit textarea {
      width: 100%;
      min-height: 44px;
      padding: 10px 12px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      font: inherit;
      font-size: 15px;
      line-height: 1.4;
      resize: vertical;
      background: #fff;
      color: var(--text);
    }

    /* Routes list */

    .mk-routes { padding: 4px 0; }

    .mk-route-head,
    .mk-route-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 84px repeat(4, 76px);
      gap: 12px;
      align-items: center;
      padding: 14px 20px;
    }

    .mk-route-head {
      font: 800 12px var(--font-body);
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--muted);
      border-bottom: 1px solid var(--border);
    }

    .mk-route-row {
      width: 100%;
      border: 0;
      border-bottom: 1px solid var(--border);
      background: transparent;
      text-align: left;
      font: inherit;
      color: inherit;
      cursor: pointer;
      min-height: 44px;
    }

    .mk-route-row:last-child { border-bottom: 0; }
    .mk-route-row:hover { background: var(--bg); }

    .mk-route-main {
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
    }

    .mk-route-name {
      font-size: 16px;
      overflow-wrap: anywhere;
    }

    .mk-route-trigger {
      font-size: 13px;
      color: var(--muted);
    }

    .mk-route-num {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 18px;
    }

    .mk-route-num.is-sale { color: var(--ok); }

    .mk-num-label { display: none; }

    .mk-kind-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 4px;
    }

    .mk-kind {
      display: inline-flex;
      align-items: center;
      height: 22px;
      padding: 0 8px;
      border-radius: 11px;
      font: 800 11px var(--font-body);
      letter-spacing: 0.04em;
      text-transform: uppercase;
      background: var(--soft);
      color: var(--accent);
    }

    .mk-kind.is-call_task { background: var(--wait-bg); color: var(--wait); }
    .mk-kind.is-email { background: #DFF2EE; color: #0F766E; }
    .mk-kind.is-wait { background: var(--bg); color: var(--muted); }
    .mk-kind.is-start { background: var(--accent); color: #fff; }

    .mk-empty { padding: 20px; }

    .mk-template-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .mk-template {
      display: flex;
      flex-direction: column;
      gap: 2px;
      width: 100%;
      min-height: 44px;
      padding: 10px 12px;
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      background: #fff;
      text-align: left;
      font: inherit;
      color: inherit;
      cursor: pointer;
    }

    .mk-template:hover { border-color: var(--accent); }
    .mk-template .setup-help { margin: 0; }

    .mk-safeguards ul {
      margin: 0;
      padding: 0;
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 7px;
      font-size: 14px;
      line-height: 1.35;
    }

    .mk-safeguards li::before {
      content: "✓ ";
      color: var(--ok);
      font-weight: 800;
    }

    /* Route editor */

    .mk-flow {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      padding: 20px;
    }

    #re-steps {
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }

    .mk-step {
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 16px;
      background: #fff;
      min-width: 0;
    }

    .mk-step.is-wait {
      align-self: center;
      width: min(100%, 420px);
      background: var(--bg);
    }

    .mk-step.is-open { border-color: var(--accent); }

    .mk-trigger {
      background: var(--band-bg);
      border-color: var(--band-bg);
      color: #fff;
    }

    .mk-trigger .setup-field label,
    .mk-trigger .mk-field-label { color: #fff; }

    .mk-trigger .setup-help { color: var(--band-muted); }

    .mk-trigger .setup-field { margin-top: 12px; }

    .mk-step-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .mk-step-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 2px;
    }

    .mk-step-btn {
      min-width: 44px;
      min-height: 44px;
      padding: 0 10px;
      font-weight: 700;
    }

    .mk-step-btn:disabled { opacity: 0.35; }

    .mk-step-summary {
      margin: 6px 0 0;
      font-size: 14px;
      line-height: 1.4;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    .mk-step > .setup-help { margin: 4px 0 0; }

    .mk-line {
      align-self: center;
      width: 2px;
      height: 18px;
      background: var(--border-strong);
    }

    .mk-no-steps { text-align: center; margin: 8px 0; }

    .mk-add-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-top: 18px;
      padding: 12px;
      border: 1.5px dashed var(--border-strong);
      border-radius: var(--radius);
    }

    .mk-add-label {
      font-weight: 800;
      color: var(--accent);
    }

    .mk-chip-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .mk-chip {
      min-height: 36px;
      padding: 0 12px;
      border-radius: 18px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--text);
      font: 700 13px var(--font-body);
      cursor: pointer;
    }

    .mk-chip.is-on {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }

    .mk-wait-edit {
      display: flex;
      gap: 8px;
      margin-top: 10px;
    }

    .mk-wait-edit input,
    .mk-wait-edit select {
      height: 44px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      padding: 0 12px;
      font: inherit;
      background: #fff;
    }

    .mk-wait-edit input { width: 96px; }

    .mk-text-edit {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 10px;
    }

    .mk-text-edit > label { font-weight: 700; font-size: 14px; }

    .mk-step .setup-field { margin-top: 10px; }

    .mk-step .setup-field input {
      width: 100%;
      height: 44px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      padding: 0 12px;
      font: inherit;
    }

    .mk-check {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 44px;
      font-size: 14px;
    }

    .mk-preview {
      padding: 12px 14px;
      border-radius: var(--radius);
      background: var(--soft);
    }

    .mk-preview-text {
      margin: 0 0 6px;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      font-size: 15px;
      line-height: 1.4;
    }

    .mk-preview .setup-help { margin: 0; }

    /* Results */

    .mk-tiles {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
    }

    .mk-tiles .mk-tile { margin: 0; padding: 16px; }
    .mk-tile.is-good { background: #F2FBF6; border-color: #BFE6CF; }
    .mk-tile.is-good .stat-value { color: var(--ok); }

    .mk-funnel {
      display: grid;
      grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 56px;
      gap: 12px;
      align-items: center;
      padding: 7px 0;
      font-size: 14px;
    }

    .mk-funnel strong { text-align: right; }

    .mk-bar {
      height: 12px;
      border-radius: 6px;
      background: var(--bg);
      overflow: hidden;
    }

    .mk-bar-fill { height: 100%; background: var(--accent); }
    .mk-bar-fill.is-green { background: var(--ok); }
    .mk-bar-fill.is-grey { background: var(--border-strong); }

    .mk-reason {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
    }

    .mk-reason:last-child { border-bottom: 0; }

    .mk-lead-link {
      font-weight: 700;
      text-align: left;
    }

    @media (max-width: 1100px) {
      .mk-layout { grid-template-columns: minmax(0, 1fr); }
      .mk-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }

    @media (max-width: 759px) {
      .mk-layout,
      .mk-results { margin: -50px 16px 24px; }

      .mk-results .mk-layout { margin: 0; }

      .mk-route-head { display: none; }

      .mk-route-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 14px 16px;
      }

      .mk-route-main { grid-column: 1 / -1; }
      .mk-route-status { grid-column: 1 / -1; }

      .mk-num-label {
        display: block;
        font: 700 11px var(--font-body);
        color: var(--muted);
      }

      .mk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

      .mk-funnel { grid-template-columns: minmax(0, 1fr) 64px 40px; }

      .mk-flow { padding: 16px; }
    }

    /* AU2: summary sentence, wait options, routes on a lead, calling-mode shortcut */

    .mk-band-summary {
      margin: 10px 0 0;
      max-width: 760px;
      color: #fff;
      font-size: 15px;
      line-height: 1.45;
    }

    .mk-route-trigger { line-height: 1.4; }

    .mk-wait-edit {
      flex-wrap: wrap;
      align-items: center;
    }

    .mk-wait-edit input[type="time"] { width: 160px; }
    .mk-wait-edit .hidden { display: none; }
    .mk-wait-note { flex-basis: 100%; margin: 0; }

    #mk-settings-card .mk-check {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      margin: 0;
      font-weight: 500;
    }

    #mk-settings-card .mk-check input { margin: 0; flex: none; }

    .route-status-card { padding: 16px 20px; }

    .route-status-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 8px 12px;
    }

    .route-status-now {
      margin: 0;
      font-weight: 700;
      color: var(--accent);
      overflow-wrap: anywhere;
    }

    .route-status-label {
      margin: 12px 0 4px;
      font: 800 12px var(--font-body);
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .route-status-past {
      margin: 2px 0;
      font-size: 13px;
      color: var(--muted);
      overflow-wrap: anywhere;
    }

    .route-status-inline {
      margin: 10px 0 0;
      padding: 10px 12px;
      border-radius: var(--radius);
      background: var(--soft);
      font-size: 14px;
    }

    .route-status-inline .route-status-row .btn-secondary { height: 36px; }

    .calling-undo-routes {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    #route-add-modal .mk-template-list { margin: 12px 0; }

    .app-confirm { max-width: 420px; }
    .app-confirm h2 { margin: 0 0 6px; }

    /* AU3: describe a route, AI notes, improve this message */

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
    }

    .mk-wide { grid-column: 1 / -1; }

    #re-describe textarea {
      width: 100%;
      min-height: 88px;
      padding: 10px 12px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      font: inherit;
      font-size: 15px;
      line-height: 1.4;
      resize: vertical;
    }

    #re-describe .setup-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
      margin-top: 12px;
    }

    .mk-ai-notes { border-color: var(--accent); }
    .mk-ai-summary { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }

    .mk-note-list {
      margin: 0 0 12px;
      padding-left: 20px;
      font-size: 14px;
      line-height: 1.45;
    }

    .mk-warning { color: var(--attention); }
    p.mk-warning { margin: 4px 0; font-size: 14px; }

    .mk-improve {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .mk-improve-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .mk-improve-row select {
      height: 44px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      padding: 0 12px;
      font: inherit;
      background: #fff;
    }

    .mk-suggestion {
      padding: 12px 14px;
      border: 1.5px solid var(--accent);
      border-radius: var(--radius);
      background: #fff;
    }

    .mk-suggestion.hidden { display: none; }
/* css/products.css */
    /* Products (PR1): badges, chips, Admin › Products, Can work */

    .product-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 22px;
      padding: 0 9px 0 8px;
      border-radius: 11px;
      background: color-mix(in srgb, var(--product, #4B2EDB) 12%, white);
      color: var(--product, #4B2EDB);
      font: 800 11px var(--font-body);
      letter-spacing: 0.02em;
      white-space: nowrap;
      vertical-align: middle;
    }

    .product-badge::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--product, #4B2EDB);
    }

    .product-badge.on-band {
      background: color-mix(in srgb, var(--product, #4B2EDB) 30%, #241C3D);
      color: #fff;
    }

    .product-badge.on-band::before { background: #fff; }

    .product-dot {
      display: inline-block;
      flex: none;
      width: 8px;
      height: 8px;
      margin-right: 5px;
      border-radius: 50%;
      background: var(--product, #4B2EDB);
      vertical-align: middle;
    }

    .today-name-line .product-badge,
    .lead-name-cell .product-badge { margin-left: 6px; }

    .col-product { white-space: nowrap; }

    .lead-preview-product { margin-top: 8px; }

    /* Leads: All · Rainbow · Hydration */
    .leads-product-chips {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-right: 6px;
    }

    .leads-product-chip {
      min-height: 32px;
      padding: 0 12px;
      border-radius: 16px;
      border: 1.5px solid var(--border-strong);
      background: #fff;
      color: var(--text);
      font: 700 13px var(--font-body);
      cursor: pointer;
    }

    .leads-product-chip.is-on {
      background: var(--product, var(--accent));
      border-color: var(--product, var(--accent));
      color: #fff;
    }

    /* Lead page */
    .detail-product-select {
      height: 36px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius-sm);
      padding: 0 10px;
      font: inherit;
      background: #fff;
    }

    .product-also-card { padding: 14px 20px; }

    .product-also-line {
      margin: 0 0 6px;
      font-size: 14px;
    }

    /* CP1: "This customer" strip on the lead page */
    .cp-strip-head h3 {
      margin: 0 0 8px;
      font-family: "Bricolage Grotesque", sans-serif;
      font-size: 15px;
      color: var(--ink, #1B1530);
    }

    .cp-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 10px;
    }

    .cp-strip-item {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      padding: 6px 12px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      background: #fff;
      font: inherit;
      font-size: 14px;
      color: var(--ink, #1B1530);
      text-align: left;
    }

    button.cp-strip-item { cursor: pointer; }
    button.cp-strip-item:hover { border-color: var(--accent); }
    .cp-strip-item.is-this { background: var(--surface-soft, #F6F4FE); border-style: dashed; }

    /* CP1: "Also: Rainbow owner" beside a name on Leads and in the preview */
    .cp-also-tag {
      display: inline-block;
      margin-left: 6px;
      padding: 1px 8px;
      border-radius: 999px;
      background: #EEF0FF;
      color: #3B23B8;
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
      vertical-align: middle;
    }

    .product-also-add {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .product-also-add select {
      height: 42px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius);
      padding: 0 12px;
      font: inherit;
      background: #fff;
    }

    /* Admin › Products */
    .pr-row { align-items: center; }

    .pr-swatch {
      flex: none;
      width: 22px;
      height: 22px;
      border-radius: 50%;
    }

    .pr-name {
      width: 100%;
      max-width: 320px;
      height: 40px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius-sm);
      padding: 0 10px;
      font: 700 15px var(--font-body);
      background: #fff;
    }

    .pr-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      margin-top: 8px;
    }

    .pr-colour,
    .pr-sale-form {
      height: 36px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius-sm);
      padding: 0 8px;
      font: inherit;
      background: #fff;
    }

    .pr-btn {
      min-width: 44px;
      min-height: 44px;
      padding: 0 10px;
      font-weight: 700;
    }

    .pr-btn:disabled { opacity: 0.35; }

    /* Staff */
    .staff-can-work {
      margin-top: 4px;
      font-size: 13px;
      color: var(--muted);
    }

    .can-work-list {
      display: flex;
      flex-direction: column;
      margin: 4px 0 8px 26px;
    }

    /* Intake settings */
    .product-setting { margin-top: 8px; }

    .product-setting select,
    #add-form-product,
    #entity-product,
    #kiosk-product,
    #add-lead-product {
      width: 100%;
      max-width: 320px;
      height: 40px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius-sm);
      padding: 0 10px;
      font: inherit;
      background: #fff;
    }

    .kiosk-product-wrap { margin: 12px 0; }

    #call-list-product-warn {
      margin: 8px 0 0;
      color: var(--wait);
      background: var(--wait-bg);
      padding: 8px 10px;
      border-radius: var(--radius-sm);
      font-size: 13px;
    }

    .stats-products { margin-top: 10px; }
/* css/batting-order.css */
    /* CA2: Find a dealer, Admin › Batting order, Admin › Dealer levels (G-Find-Dealer, G-Batting-Order) */

    .find-dealer-sheet { max-width: 760px; }

    .find-dealer-body {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 4px 2px 8px;
      max-height: min(72vh, 760px);
      overflow-y: auto;
    }

    .fd-premium {
      padding: 10px 12px;
      border-radius: 12px;
      background: #FFF4D6;
      color: #5E3E00;
      font-size: 14px;
    }

    .fd-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .fd-override {
      margin-left: auto;
      font-size: 13px;
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .fd-count { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }

    .fd-list { display: flex; flex-direction: column; gap: 10px; }

    .fd-card {
      display: grid;
      grid-template-columns: 28px 40px minmax(0, 1fr) auto;
      align-items: start;
      gap: 12px;
      padding: 12px 14px;
      border: 1.5px solid var(--border);
      border-radius: 16px;
      background: #fff;
    }

    .fd-card.is-first {
      border-color: #E8A400;
      background: #FFFBEF;
    }

    .fd-card.is-unavailable { background: #F7F6FB; }

    .fd-rank {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
      color: var(--muted);
      text-align: center;
      line-height: 40px;
    }

    .fd-main { min-width: 0; }

    .fd-first {
      display: block;
      margin-bottom: 2px;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.04em;
      color: #7A5300;
    }

    .fd-name {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 8px;
      font-size: 16px;
    }

    .fd-level {
      display: inline-flex;
      align-items: center;
      height: 22px;
      padding: 0 8px;
      border-radius: 11px;
      background: color-mix(in srgb, var(--level, #4B2EDB) 14%, white);
      color: var(--level, #4B2EDB);
      font: 800 11px var(--font-body);
      letter-spacing: 0.02em;
    }

    .fd-level.is-none { background: var(--bg); color: var(--muted); }

    .fd-reason { margin: 4px 0 0; font-size: 14px; font-weight: 600; }

    .fd-day { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

    .fd-nums {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 14px;
      margin-top: 6px;
      font-size: 12px;
      color: var(--muted);
    }

    .fd-num b { color: var(--text); font-size: 13px; }

    .fd-side {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
    }

    .fd-score {
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
      line-height: 1;
    }

    .fd-score-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }

    .fd-missing summary {
      cursor: pointer;
      font-size: 14px;
      font-weight: 700;
      color: var(--accent);
    }

    .fd-missing-line {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 10px;
      padding: 6px 0;
      border-top: 1px solid var(--border);
      font-size: 14px;
    }

    .fd-missing-line span { color: var(--muted); }

    /* Admin › Batting order */
    .bo-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 360px;
      gap: 16px;
      align-items: start;
      margin: -50px 32px 24px;
      position: relative;
      z-index: 1;
    }

    .bo-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

    .bo-side { position: sticky; top: 16px; }

    .bo-total { margin: 0 0 10px; font-weight: 800; color: var(--ok); }

    .bo-total.is-off { color: var(--attention); }

    .bo-slider {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(120px, 1fr) 52px;
      align-items: center;
      gap: 12px;
      padding: 10px 0;
      border-top: 1px solid var(--border);
    }

    .setup-page .setup-card .bo-slider .bo-slider-label { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; }

    .setup-page .setup-card .bo-slider .bo-slider-label input { width: auto; margin: 3px 0 0; flex: none; accent-color: var(--accent); }

    .bo-slider-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

    .bo-slider-label b { font-size: 15px; }

    .bo-slider-label span span { font-size: 12px; color: var(--muted); font-weight: 500; }

    .bo-slider.is-off { grid-template-columns: minmax(0, 1fr); }

    .bo-slider.is-off .bo-slider-label b { color: var(--muted); font-weight: 600; }

    .bo-slider input[type="range"] { width: 100%; margin: 0; accent-color: var(--accent); }

    .bo-slider-value { font-weight: 800; text-align: right; }

    .bo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }

    .bo-newrule input { max-width: 120px; }

    .setup-page .setup-card .bo-check { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; font-size: 14px; }

    .setup-page .setup-card .bo-check input { width: auto; margin: 3px 0 0; flex: none; }

    .bo-prev-row {
      display: grid;
      grid-template-columns: 22px 32px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 8px 0;
      border-top: 1px solid var(--border);
    }

    .bo-prev-row.is-hidden { grid-template-columns: 22px minmax(0, 1fr); opacity: 0.7; }

    .bo-prev-row .fd-rank { line-height: 1; font-size: 16px; }

    .bo-prev-text { display: flex; flex-direction: column; min-width: 0; }

    .bo-prev-text .fd-name { font-size: 14px; }

    .bo-prev-why { font-size: 12px; color: var(--muted); }

    .bo-msg { margin: 0 32px 24px; }

    /* CA2b: tiers */
    .bo-tab-add { opacity: 0.8; }

    .bo-tier-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }

    .setup-page .setup-card .bo-tier-name { flex: 1 1 220px; max-width: 320px; margin: 0; }

    .bo-tier-tools { display: flex; flex-wrap: wrap; gap: 6px; }

    .bo-small { height: 32px; padding: 0 12px; font-size: 13px; }

    .setup-card .bo-sub-h { margin: 18px 0 6px; font-size: 15px; }

    .bo-match { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 8px; }

    .setup-page .setup-card .bo-match select { width: auto; margin: 0; height: 34px; }

    .bo-rules { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }

    .bo-rule { padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; }

    .bo-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

    .bo-rule-head .bo-small { height: 28px; padding: 0 10px; font-size: 16px; }

    .bo-rule .bo-chips { margin: 8px 0 4px; }

    .setup-page .setup-card .bo-rule select,
    .setup-page .setup-card .bo-rule input[type="text"] { margin: 8px 0 0; }

    .setup-page .setup-card .bo-add-rule,
    .setup-page .setup-card .bo-copy { width: auto; max-width: 100%; margin: 0 0 8px; }

    .bo-check-table { width: 100%; border-collapse: collapse; font-size: 14px; }

    .bo-check-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 6px; }

    .bo-check-table td { padding: 8px 6px; border-top: 1px solid var(--border); }

    .bo-check-table th:not(:first-child), .bo-check-table td:not(:first-child) { text-align: right; }

    .bo-check-table tr.is-on td { background: color-mix(in srgb, var(--accent) 6%, white); }

    /* The tier badge: Find a dealer, the calendar and the tray */
    .bo-tier-badge {
      display: inline-flex;
      align-items: center;
      height: 20px;
      padding: 0 8px;
      border-radius: 10px;
      background: #FFF1C7;
      color: #6B4500;
      font: 800 11px var(--font-body);
      letter-spacing: 0.02em;
      white-space: nowrap;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .bo-tier-badge[data-tier="2"] { background: #EDE7FF; color: #3A22B0; }
    .bo-tier-badge[data-tier="3"] { background: #DDF3EC; color: #0B5E49; }
    .bo-tier-badge[data-tier="4"] { background: #FFE4E0; color: #8E2A1C; }
    .bo-tier-badge.is-standard { background: var(--bg); color: var(--muted); }

    .fd-tier { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

    .fd-tier.is-standard { background: var(--bg); color: var(--text); }

    .cal-tier-badge { height: 16px; padding: 0 6px; font-size: 10px; align-self: flex-start; }

    .cal-tray-tier { margin-top: 4px; align-self: flex-start; font-weight: 700; }

    /* Admin › Dealer levels and the Staff page */
    .dl-step {
      flex: none;
      width: 24px;
      text-align: center;
      font-weight: 800;
      color: var(--muted);
    }

    .dl-row .setup-row-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

    .dl-row .pr-name { flex: 1 1 200px; max-width: 280px; margin: 0; }

    .dl-row .pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }

    .dl-row .pr-colour { width: auto; margin: 0; }

    .dl-row.is-off .pr-name { color: var(--muted); }

    .setup-card .dl-row .dl-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; white-space: nowrap; }

    .dl-row .dl-check input { width: auto; margin: 0; }

    .dl-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 8px 0 12px; }

    .dl-empty p { margin: 0; }

    .staff-level {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 6px;
      font-size: 13px;
      color: var(--muted);
    }

    .staff-level select {
      width: auto;
      height: 32px;
      margin: 0;
      padding: 0 8px;
      border: 1.5px solid var(--border-strong);
      border-radius: var(--radius-sm);
      background: #fff;
      font: inherit;
    }

    .book-demo-find { margin: 6px 0 2px; font-size: 13px; }

    @media (max-width: 1100px) {
      .bo-layout { grid-template-columns: minmax(0, 1fr); margin: -36px 16px 20px; }
      .bo-side { position: static; }
      .bo-msg { margin: 0 16px 20px; }
    }

    @media (max-width: 640px) {
      .fd-card { grid-template-columns: 24px minmax(0, 1fr); }
      .fd-card > .person-avatar { display: none; }
      .fd-side { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 6px; }
      .fd-score-label { margin: 0 auto 0 0; }
      .fd-side .btn-primary, .fd-side button { align-self: center; }
      .find-dealer-body { padding: 4px 14px 12px; }
      .bo-slider { grid-template-columns: minmax(0, 1fr) 52px; }
      .bo-slider input[type="range"] { grid-column: 1 / -1; grid-row: 2; }
    }

    /* DT1: Offer by text */
    .fd-offer { border: 1.5px solid var(--accent); border-radius: 14px; padding: 12px 14px; margin: 10px 0; display: grid; gap: 8px; background: var(--soft); }
    .fd-offer h3 { margin: 0; font-size: 15px; }
    .fd-offer-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
    .fd-offer .btn-primary { justify-self: start; }
/* css/booking-texts.css */
    /* CA3: confirmation state on the calendar, Admin › Confirmation texts (G-Confirm-Text) */

    .cal-confirm {
      display: inline-flex;
      align-items: center;
      align-self: flex-start;
      height: 18px;
      padding: 0 6px;
      border-radius: 9px;
      font: 800 10px var(--font-body);
      letter-spacing: 0.03em;
      text-transform: uppercase;
      white-space: nowrap;
      background: var(--bg);
      color: var(--muted);
    }

    .cal-confirm.is-sent,
    .cal-confirm.is-queued { background: #EEEAFD; color: var(--accent); }
    .cal-confirm.is-confirmed { background: var(--ok-bg); color: var(--ok); }
    .cal-confirm.is-needs-call { background: var(--attention-bg); color: var(--attention); }
    .cal-confirm.is-not-sent { background: #FFF4D6; color: #7A5300; }

    .cal-block .cal-confirm { margin-top: 2px; }

    .cal-event-confirm {
      margin: 0;
      padding: 8px 12px;
      max-width: 280px;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      font-weight: 600;
      color: var(--muted);
    }

    .cal-event-confirm.is-confirmed { color: var(--ok); }
    .cal-event-confirm.is-needs-call { color: var(--attention); }
    .cal-event-confirm.is-not-sent { color: #7A5300; }

    .ct-wording textarea { width: 100%; resize: vertical; font: inherit; }

    .ct-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }

    .ct-field {
      height: 26px;
      padding: 0 9px;
      border: 1.5px solid var(--border);
      border-radius: 13px;
      background: #fff;
      color: var(--text);
      font: 600 12px var(--font-body);
      cursor: pointer;
    }

    .ct-field:hover { border-color: var(--accent); color: var(--accent); }

    .ct-reset { font-size: 12px; margin-left: 4px; }

    .ct-prev-title { margin: 14px 0 6px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.03em; text-transform: uppercase; }

    .ct-bubble {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-width: 92%;
      padding: 10px 12px;
      border-radius: 16px 16px 16px 4px;
      background: #F1EFF7;
      font-size: 14px;
      line-height: 1.4;
    }

    .ct-bubble-photo {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 64px;
      border-radius: 10px;
      background: #E2DEF0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .ct-reply {
      margin: 8px 0 8px auto;
      width: fit-content;
      padding: 6px 14px;
      border-radius: 16px 16px 4px 16px;
      background: var(--accent);
      color: #fff;
      font-weight: 800;
    }
/* css/cancel-demo.css */
    /* CX1: the Cancel demo window and the tray's Cancel link */
    .modal-cancel-demo .cancel-demo-label {
      margin: 14px 0 8px;
      font-weight: 600;
      font-size: 0.9rem;
      color: var(--text);
    }

    .modal-cancel-demo .choice-row {
      margin-bottom: 8px;
    }

    .modal-cancel-demo textarea {
      width: 100%;
    }

    .modal-cancel-demo .cancel-demo-callback {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 14px;
      margin-top: 12px;
    }

    .modal-cancel-demo .cancel-demo-callback .check-row,
    .modal-cancel-demo #cancel-demo-text-wrap {
      margin: 0;
    }

    .modal-cancel-demo #cancel-demo-text-wrap {
      margin-top: 12px;
    }

    .modal-cancel-demo .cancel-demo-callback input[type="date"] {
      width: auto;
      margin: 0;
    }

    .modal-cancel-demo .cancel-demo-effect {
      margin: 14px 0 0;
      font-size: 0.85rem;
      color: var(--muted);
    }

    .modal-cancel-demo .cancel-demo-effect:empty {
      display: none;
    }

    .modal-cancel-demo .btn-danger:disabled {
      opacity: 0.5;
      cursor: default;
    }

    .cal-tray-actions .cal-tray-cancel {
      margin-left: auto;
      color: var(--muted);
      font-size: 0.82rem;
    }

    .cal-tray-actions .cal-tray-cancel:hover {
      color: var(--danger);
    }
/* css/cold-reasons.css */
    /* B2: Cold reason window, Cold requests (Today) */
    .modal.cold-reason, .modal.cold-requests { max-width: 520px; }
    .cold-reason-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
    .cold-reason-list .status-close-row { width: 100%; text-align: left; }
    .cold-reason-sub { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
    .cold-reason-sub input { width: 100%; }
    .today-cold-requests { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px; padding: 14px 18px; }
    .today-cold-requests p { margin: 0; font-weight: 600; }
    .cold-requests-list { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; max-height: 60vh; overflow-y: auto; }
    .cold-request-row { border: 1px solid var(--line, #e6e3ef); border-radius: 12px; padding: 12px; }
    .cold-request-row .muted { margin: 4px 0 8px; }
    .cold-request-actions { display: flex; gap: 8px; justify-content: flex-end; }
    #office-settings-cold-mode .check-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }

/* RN1: Office settings › Demo results */
.rn-list { display: grid; gap: 10px; margin: 8px 0 12px; }
.rn-row { border: 1px solid var(--line, #E4E1EE); border-radius: 12px; padding: 10px 12px; background: #fff; }
.rn-row.is-off { opacity: 0.6; }
.rn-row-top { display: flex; gap: 10px; align-items: center; }
.rn-row-top .rn-name { flex: 1; min-width: 0; }
.rn-always { font-size: 12px; color: var(--muted, #6B6880); white-space: nowrap; }
.rn-switch { white-space: nowrap; margin: 0; }
.rn-means { margin: 6px 0 0; }
.rn-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
/* css/sent-us.css */
    /* RR2: Sent us (who this person referred) */
    .sent-us-card .detail-top { display: flex; align-items: center; gap: 10px; }
    .sent-us-total { margin: 4px 0 0; font-weight: 600; color: var(--ink, #1B1530); }
    .sent-us-total-second { font-weight: 500; color: var(--muted, #6b6680); }
    .sent-us-note { margin: 6px 0 0; font-size: 13px; }
    .sent-us-list { margin-top: 12px; border-top: 1px solid var(--border, #e6e3ef); }
    .sent-us-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 6px 16px;
      padding: 10px 0;
      border-bottom: 1px solid var(--border, #e6e3ef);
    }
    .sent-us-child { padding-left: 22px; position: relative; font-size: 14px; }
    .sent-us-child::before { content: "↳"; position: absolute; left: 4px; top: 10px; color: var(--muted, #6b6680); }
    .sent-us-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .sent-us-who .link-btn { text-align: left; font-weight: 600; }
    .sent-us-meta { font-size: 13px; color: var(--muted, #6b6680); }
    .sent-us-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; }
    .sent-us-sale { font-weight: 600; color: var(--violet, #4B2EDB); }
    .sent-us-more { margin-top: 12px; }

/* HH1 + RR4: the direct referrer with their relationship on one line, then the collapsed chain above them */
.referrer-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.referrer-relationship { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 14px; color: var(--muted); }
.referrer-relationship strong { color: var(--text); font-weight: 600; }
.referrer-keep { white-space: nowrap; }
.referrer-chain { margin-top: 6px; }
.referrer-chain-toggle { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 32px; padding: 0; border: 0;
  background: none; font: inherit; font-size: 13px; color: var(--muted); text-align: left; cursor: pointer; }
.referrer-chain-more { color: var(--accent, #4B2EDB); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.referrer-chain-toggle:focus-visible { outline: 2px solid var(--accent, #4B2EDB); outline-offset: 2px; border-radius: 4px; }
.referrer-chain-list { margin: 4px 0 2px; padding: 0 0 0 4px; list-style: none; border-left: 2px solid var(--border); }
.referrer-chain-list li { display: flex; flex-direction: column; padding: 5px 0 5px 12px; font-size: 14px; }
.referrer-chain-list li .link-btn { align-self: flex-start; text-align: left; font-weight: 600; }
.referrer-chain-meta { font-size: 12px; color: var(--muted); }
.referrer-relationship-input { min-height: 36px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; font: inherit; width: 200px; max-width: 100%; }
/* css/referral-stats.css */
    /* RR3: Referrals card on Stats */
    .stats-ref-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
    .stats-ref-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--soft); gap: 2px; flex-wrap: wrap; }
    .stats-ref-switch button {
      min-height: 36px;
      padding: 0 14px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: var(--muted);
      font: 700 14px var(--font-body);
      cursor: pointer;
    }
    .stats-ref-switch button.is-on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(27, 21, 48, 0.08); }
    .stats-ref-total { margin: 10px 0 2px; font-weight: 700; color: var(--text); }
    .stats-ref-badge { margin-left: 6px; }
    .stats-ref-typed { margin-left: 6px; font-size: 12px; color: var(--muted); }
    @media (max-width: 600px) {
      .stats-ref-switch { display: flex; width: 100%; flex-wrap: nowrap; }
      .stats-ref-switch button { flex: 1 1 0; padding: 0 6px; font-size: 13px; white-space: nowrap; }
    }
/* css/import-rbo.css */
    /* IM2: TellUS › Offices › office › Import from RBO */
    .rbo-body {
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin: -50px 32px 32px;
      position: relative;
      z-index: 1;
      max-width: 980px;
    }

    .rbo-steps {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 0;
      padding: 10px 12px;
      list-style: none;
      background: #fff;
      border-radius: 14px;
      box-shadow: 0 1px 2px rgba(27, 21, 48, 0.06);
    }

    .rbo-steps li {
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 700;
      color: var(--muted);
    }

    .rbo-steps li.is-on { background: var(--accent); color: #fff; }

    .rbo-steps li.is-done { color: var(--ok); }

    .rbo-drop {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 120px;
      margin: 10px 0;
      border: 2px dashed var(--border-strong);
      border-radius: 16px;
      background: var(--bg);
      cursor: pointer;
      text-align: center;
      padding: 16px;
    }

    .rbo-drop.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, white); }

    .rbo-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

    .rbo-files { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }

    .rbo-file {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
      align-items: center;
      gap: 10px;
      padding: 8px 0;
      border-top: 1px solid var(--border);
      font-size: 14px;
    }

    .rbo-file.is-unknown span { color: var(--attention); }

    .rbo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }

    .rbo-small { height: 32px; padding: 0 12px; font-size: 13px; }

    .rbo-map-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(200px, 320px);
      align-items: center;
      gap: 12px;
      padding: 8px 0;
      border-top: 1px solid var(--border);
    }

    .rbo-map-row.is-sub { padding-left: 18px; border-top-style: dashed; }

    .rbo-map-label { display: flex; flex-direction: column; min-width: 0; }

    .rbo-map-label b { font-size: 14px; overflow-wrap: anywhere; }

    .rbo-map-label span { font-size: 12px; color: var(--muted); }

    .setup-page .setup-card .rbo-map-row select { width: 100%; margin: 0; }

    .rbo-answer { margin-bottom: 8px; }

    .rbo-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 10px 0; }

    .rbo-stat {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 12px 14px;
      border: 1.5px solid var(--border);
      border-radius: 14px;
    }

    .rbo-stat b { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }

    .rbo-stat span { font-weight: 700; font-size: 13px; }

    .rbo-stat small { color: var(--muted); font-size: 12px; }

    .rbo-problem summary { cursor: pointer; font-weight: 700; padding: 6px 0; }

    .rbo-problem p { margin: 2px 0 2px 16px; }

    .rbo-progress { height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; margin: 12px 0; }

    .rbo-progress span { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }

    .rbo-history-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
      align-items: center;
      gap: 10px;
      padding: 8px 0;
      border-top: 1px solid var(--border);
    }

    .rbo-history-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

    .rbo-pill {
      display: inline-flex;
      align-items: center;
      height: 20px;
      padding: 0 8px;
      border-radius: 10px;
      font: 800 11px var(--font-body);
      background: var(--bg);
      color: var(--muted);
    }

    .rbo-pill.is-done { background: #DDF3EC; color: #0B5E49; }
    .rbo-pill.is-failed { background: #FFE4E0; color: #8E2A1C; }
    .rbo-pill.is-running { background: #FFF1C7; color: #6B4500; }

    @media (max-width: 760px) {
      .rbo-body { margin: -36px 16px 24px; }
      .rbo-map-row, .rbo-file, .rbo-history-row { grid-template-columns: minmax(0, 1fr); }
    }

    .setup-page .setup-card .rbo-check,
    .rbo-check {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin: 8px 0;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
    }

    .rbo-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }

    .rbo-body h3 { margin: 14px 0 4px; font-size: 15px; }

    .rbo-map-pair { display: flex; flex-direction: column; gap: 6px; }

    .setup-page .setup-card .rbo-map-pair select { width: 100%; margin: 0; }

    /* IM1: history only */
    .rbo-history-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 8px 0 4px;
      border-radius: 12px; background: var(--soft); cursor: pointer; }
    .rbo-history-opt input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
    .rbo-history-opt span { display: flex; flex-direction: column; gap: 2px; }
    .rbo-history-opt small { color: var(--muted); font-size: 13px; }

    /* IM2: three choices for a re-import, and the review list */
    .rbo-mode { border: 0; padding: 0; margin: 8px 0 4px; display: flex; flex-direction: column; gap: 8px; }
    .rbo-mode legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
    .rbo-mode .rbo-history-opt { margin: 0; background: #FFFFFF; border: 1.5px solid var(--border-strong); }
    .rbo-mode .rbo-history-opt.is-on { background: var(--soft); border-color: var(--accent); }
    .rbo-review { margin-top: 16px; }
    .rbo-review h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 18px; }
    .rbo-review-list { list-style: none; margin: 8px 0 0; padding: 0; }
    .rbo-review-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
    .rbo-review-list li:first-child { border-top: 0; }
    .rbo-review-list .btn-secondary { min-height: 36px; padding: 0 14px; flex-shrink: 0; }

    /* RB2: the details run, field by field */
    .rbo-field-list { margin: 6px 0 12px; padding-left: 18px; columns: 2 280px; column-gap: 24px; font-size: 13px; color: #3a3550; }
    .rbo-field-list li { break-inside: avoid; margin: 2px 0; }
/* css/competitions.css */
/* CP1 Competitions: Today card, board, list pop-up and Admin › Competitions (js/competitions.js) */
.today-competition {
  margin: 0 32px 16px;
  border: 1px solid var(--border);
}
.today-dealer-stack .today-competition { margin: 0 0 16px; }

.cp-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cp-card-titles h2 { margin: 0; font-size: 20px; }
.cp-kicker {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4B2EDB;
}
.cp-sub, .cp-prize, .cp-foot { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.cp-prize { color: var(--text, #1B1530); }
.cp-foot { margin-top: 10px; font-size: 13px; }
.cp-winner { margin: 8px 0 0; font-weight: 700; color: #1B1530; }
.cp-me-line {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(75, 46, 219, .08);
  color: #4B2EDB;
  font-weight: 700;
}

.cp-board { list-style: none; margin: 10px 0 0; padding: 0; }
.cp-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-top: 1px solid var(--border);
}
.cp-row:first-child { border-top: 0; }
.cp-row.is-me { background: rgba(75, 46, 219, .06); border-radius: 8px; }
.cp-row.cp-gap { border-top: 2px dashed var(--border); }
.cp-rank { font-weight: 700; text-align: center; color: var(--muted); }
.cp-row.is-top .cp-rank { color: #1B1530; }
.cp-row.is-top-1 .cp-rank { color: #4B2EDB; font-size: 18px; }
.cp-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-value { font-weight: 700; font-size: 18px; min-width: 32px; text-align: right; }
button.cp-value { padding: 2px 6px; }
.cp-more { margin-top: 6px; }

.cp-modal { max-width: 560px; }
.cp-modal-body { max-height: 60vh; overflow: auto; }
.cp-items { list-style: none; margin: 0; padding: 0; }
.cp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.cp-item:first-child { border-top: 0; }
.cp-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp-item-name { text-align: left; font-weight: 700; padding: 0; }
.cp-item-detail { font-size: 13px; color: var(--muted); }
.cp-item-n { font-weight: 700; }

/* Admin › Competitions */
.cp-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-list-head h2 { margin: 0; }
.cp-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.cp-list-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp-list-text span { font-size: 14px; color: var(--muted); }
.cp-list-text .cp-winner { color: #1B1530; margin: 0; }
.cp-list-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cp-form-grid { display: flex; flex-direction: column; gap: 12px; }
.cp-dates { display: flex; gap: 12px; flex-wrap: wrap; }
.cp-who-pick { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 0; }
.cp-who-pick legend { font-weight: 700; padding: 0 4px; }
.cp-who-choices { display: flex; gap: 16px; flex-wrap: wrap; }
.cp-who-list { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.cp-radio, .cp-check { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; }
.cp-radio input, .cp-check input { width: auto; min-height: 0; height: 18px; }
.cp-count { margin: 8px 0 0; font-weight: 700; }

@media (max-width: 720px) {
  .today-competition { margin: 0 16px 16px; }
  .cp-list-row { flex-direction: column; align-items: stretch; }
  .cp-list-actions { justify-content: flex-start; }
}
/* css/booked-goal.css */
/* BG1 Monthly booked goal: Today card and Admin › Products box (js/booked-goal.js) */
.today-booked-goal { margin: 0 32px 16px; border: 1px solid var(--border); }
.today-dealer-stack .today-booked-goal { margin: 0 0 16px; }
.bg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bg-head h2 { margin: 0; font-size: 20px; }
.bg-sub { margin: 0; font-size: 13px; color: var(--muted); }
.bg-row { margin-top: 12px; }
.bg-line { margin: 0 0 6px; font-size: 15px; color: var(--text); }
.bg-line strong { font-weight: 700; }
.bg-bar { position: relative; height: 10px; border-radius: 999px; background: var(--soft); overflow: visible; }
.bg-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bg-fill.is-on-pace { background: var(--ok); }
.bg-pace { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--text); opacity: .55; transform: translateX(-1px); }
.bg-setting-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bg-setting-name { min-width: 140px; font-weight: 600; }
.bg-setting-row input { width: 120px; }
.bg-setting-note { font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .today-booked-goal { margin: 0 16px 16px; }
}
/* css/follow-up-prompt.css */
    /* FR1: "Set a follow-up reminder?" bar (js/follow-up-prompt.js). A white card above the toast, not a window. */
    .fu-prompt {
      position: fixed;
      left: 50%;
      bottom: 76px;
      transform: translateX(-50%);
      z-index: 79;
      width: min(560px, calc(100vw - 32px));
      background: #fff;
      color: var(--ink, #1B1530);
      border: 1px solid rgba(75, 46, 219, 0.25);
      border-radius: 16px;
      padding: 14px 16px;
      box-shadow: 0 10px 30px rgba(27, 21, 48, 0.18);
    }
    .fu-prompt-q {
      margin: 0;
      font-family: "Bricolage Grotesque", sans-serif;
      font-weight: 700;
      font-size: 16px;
    }
    .fu-prompt-why { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
    .fu-prompt-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .fu-prompt-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
    .fu-prompt-pick input { min-height: 36px; }
    .fu-prompt-msg { margin: 8px 0 0; color: var(--danger); font-size: 13px; }
    body.is-dealer .fu-prompt { bottom: 160px; }
/* css/voice.css */
    /* VC1: calls through the office number */
    .voice-bar,
    .voice-incoming {
      position: fixed;
      right: 20px;
      bottom: 20px;
      /* above the page and the tab bar, below windows (modal-backdrop is 20) */
      z-index: 19;
      display: flex;
      align-items: center;
      gap: 14px;
      max-width: min(440px, calc(100vw - 32px));
      padding: 12px 14px;
      border-radius: 16px;
      background: #1B1530;
      color: #fff;
      box-shadow: 0 12px 32px rgba(27, 21, 48, 0.28);
      font-size: 14px;
    }

    /* IC1 (MPA 9aeb5a01 / 80abffe4, Dec 2): the incoming call sits above windows too (modal-backdrop 20, calling
       panels up to 90), so Answer can be pressed while e.g. "How did the call go?" is open; full-screen screens
       (two-step sign-in, offline: 2000) stay above it */
    .voice-incoming { bottom: 90px; background: #4B2EDB; z-index: 1100; }

    /* IC1: on a call when another comes in: a notice only (the others' TULOS rings) */
    .voice-busy-note {
      position: fixed; right: 20px; bottom: 90px; z-index: 1100;
      max-width: min(400px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 14px;
      background: #1B1530; color: #fff; box-shadow: 0 12px 32px rgba(27, 21, 48, 0.28);
      font-size: 13px; display: flex; align-items: flex-start; gap: 10px;
    }
    .voice-busy-note b { font-family: var(--font-display); font-size: 14px; display: block; }
    .voice-busy-note .link-btn { color: #fff; flex: none; }

    .voice-bar.is-error { background: #8E2A1C; }

    .voice-bar-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }

    .voice-bar-main b { font-family: var(--font-display); font-size: 15px; }

    .voice-bar-main span { opacity: 0.9; overflow-wrap: anywhere; }

    /* MPA problem report, Nov 9: the customer's name opens their lead */
    button.voice-bar-main.voice-open {
      appearance: none; border: 0; margin: 0; padding: 4px 8px; border-radius: 10px;
      background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
    }
    button.voice-bar-main.voice-open:hover { background: rgba(255, 255, 255, 0.12); }
    button.voice-bar-main.voice-open:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    button.voice-bar-main.voice-open b { text-decoration: underline; text-underline-offset: 3px; }
    .voice-open-hint { font-size: 12px; opacity: 0.85; }
    .voice-bar, .voice-incoming { flex-wrap: wrap; }
    .voice-nomatch { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
      padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
    .voice-nomatch span { flex: 1 1 auto; font-size: 13px; opacity: 0.9; }

    .voice-bar-actions { display: flex; gap: 8px; flex: none; }

    .voice-small { height: 32px; padding: 0 12px; font-size: 13px; }

    .voice-result { max-width: 520px; }

    .voice-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }

    .voice-result-btn.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }

    .voice-result-when label,
    .voice-result-notes { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; margin: 8px 0; }

    .voice-result-notes textarea { font: inherit; }

    .chat-row.call { align-items: center; }

    .call-bubble {
      display: flex;
      flex-direction: column;
      gap: 6px;
      background: var(--bg, #F4F2FA) !important;
      color: var(--ink, #1B1530) !important;
      border: 1px dashed var(--border-strong, #CFC8E8);
      font-size: 13px;
    }

    .call-bubble.is-missed { border-color: #E2725B; }

    .voice-play audio { width: 220px; height: 32px; }

    .setup-page .setup-card .voice-check,
    .voice-check {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin: 8px 0;
      font-size: 14px;
      cursor: pointer;
    }

    .setup-page .setup-card .voice-check input,
    .voice-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }

    .setup-page .setup-card .voice-check span { font-weight: 600; }

    .voice-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

    .office-voice-box { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }

    .profile-calls { margin-top: 18px; }

    .voice-usage-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }

    .voice-usage-table th,
    .voice-usage-table td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--border); }

    .voice-conv-call { margin-left: 8px; height: 32px; padding: 0 12px; }

    @media (max-width: 760px) {
      .voice-bar, .voice-incoming { left: 16px; right: 16px; bottom: 76px; max-width: none; }
      .voice-incoming, .voice-busy-note { bottom: 150px; }
      .voice-busy-note { left: 16px; right: 16px; max-width: none; }
      .voice-two { grid-template-columns: minmax(0, 1fr); }
    }

/* VC1b: browser-calls readiness on TellUS › Offices › Twilio connection */
.voice-key-line { margin: 4px 0 10px; font-size: 14px; padding-left: 10px; border-left: 3px solid #d6d3e0; }
.voice-key-line.is-ready { border-left-color: #1f9d55; }
.voice-key-line.is-missing { border-left-color: #c77700; }

/* VC1c: Check browser calls */
.voice-check-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.voice-check-list li { display: flex; gap: 8px; padding: 4px 0; }
.voice-check-mark { width: 16px; flex: none; font-weight: 700; }
.voice-check-list .is-good .voice-check-mark { color: #1f9d55; }
.voice-check-list .is-bad .voice-check-mark { color: #c0392b; }
.voice-check-list .is-unknown .voice-check-mark { color: #c77700; }

    /* VC1d: Admin › Calls sub-headings */
    .setup-page .setup-card .voice-sub { margin: 18px 0 4px; font-size: 15px; }

/* CT2 caller trust (TellUS Control › Offices): four steps, labels above the boxes, two columns / one on a phone */
.office-trust-box .trust-title { margin: 0 0 4px; font: 700 18px var(--font-display); color: var(--text); }
.trust-steps { display: grid; gap: 14px; margin-top: 12px; }
.trust-step { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 16px 18px 18px; }
.trust-step-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.trust-step-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font: 700 14px var(--font-display);
}
.trust-step-words { min-width: 0; }
.office-trust-box .trust-step-title { margin: 2px 0 0; font: 700 16px var(--font-display); color: var(--text); }
.trust-step-sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

.trust-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trust-status-row { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.trust-status-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trust-status-name { font-weight: 600; font-size: 14px; min-width: 0; }
.trust-status-why { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.trust-status-why.is-bad { color: var(--danger); }
.trust-status-when { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.trust-chip {
  flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px;
  background: var(--soft); color: var(--muted); font: 700 12px var(--font-body); white-space: nowrap;
}
.trust-chip.is-ok { background: var(--ok-bg); color: var(--ok); }
.trust-chip.is-wait { background: var(--wait-bg); color: var(--wait); }
.trust-chip.is-bad { background: var(--attention-bg); color: var(--danger); }
.trust-chip.is-off { background: var(--bg); color: var(--muted); }

.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.trust-field, .office-trust-box label.trust-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.trust-field.is-wide { grid-column: 1 / -1; }
.trust-label { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.trust-field input, .trust-field select, .trust-field textarea { width: 100%; box-sizing: border-box; margin: 0; }
.trust-field textarea { resize: vertical; font: inherit; }
.trust-field input[hidden] { display: none; }
.trust-ein-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 44px; font-size: 14px; }
.trust-count { align-self: flex-end; text-align: right; font-size: 12px; color: var(--muted); }
.trust-count.is-over { color: var(--danger); font-weight: 700; }
.trust-field input[aria-invalid="true"] { border-color: var(--danger); }
.trust-hint.trust-save-note { color: var(--danger); }

.trust-group { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.trust-group-title {
  padding: 0; margin: 0 0 10px; font: 700 12px var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.trust-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.trust-actions-top { margin: 0 0 16px; }
.trust-ok-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; }
.trust-ok-text { min-width: 0; }
.trust-ok-line + .trust-ok-form, .trust-hint + .trust-ok-form { margin-top: 14px; }
.trust-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.trust-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trust-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.trust-check[hidden] { display: none; }
.trust-check-mark {
  flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; background: var(--attention-bg); color: var(--danger);
}
.trust-check.is-done .trust-check-mark { background: var(--ok-bg); color: var(--ok); }
.trust-check-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trust-check-detail { font-size: 13px; color: var(--danger); }
.trust-flag { margin: 10px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--wait-bg); color: var(--wait); font-size: 13px; }

@media (max-width: 760px) {
  .trust-step { padding: 14px; }
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .trust-actions .btn-primary, .trust-actions .btn-secondary { width: 100%; }
}

/* NR2 10DLC (Nov 21): the office's texting registration card and the TellUS template */
.office-a2p-box { margin-top: 18px; }
.a2p-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.a2p-counted { display: flex; flex-direction: column; gap: 4px; }
.a2p-app { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.a2p-app dt { font-weight: 600; color: var(--text); }
.a2p-app dd { margin: 0; color: var(--text); }
.a2p-image-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.a2p-image-row a { overflow-wrap: anywhere; }
.a2p-move ul { margin: 12px 0; padding-left: 20px; font-size: 14px; }
.a2p-move-wrap { max-height: 320px; overflow: auto; margin-top: 8px; }
.a2p-flags { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.a2p-preview h4 { margin: 14px 0 4px; font: 700 14px var(--font-display); }
.a2p-preview p { margin: 0 0 6px; font-size: 14px; }
.a2p-offer { margin: 12px 0; }
@media (max-width: 640px) {
  .a2p-app { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .a2p-app dd { margin-bottom: 8px; }
}
.office-a2p-box label.check-row, .a2p-tpl-card label.check-row { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 14px; }
.office-a2p-box label.check-row input, .a2p-tpl-card label.check-row input { width: auto; margin: 0; flex: 0 0 auto; }

/* AG1 (Nov 23): the 10DLC screens as guided pages: "Next:" at the top, four numbered steps with done / to do */
.a2p-next {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 12px 0 4px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--soft); border-left: 4px solid var(--accent);
}
.a2p-next-line { margin: 0; flex: 1 1 260px; font-size: 15px; color: var(--text); }
.a2p-next-line strong { font-family: var(--font-display); color: var(--accent); }
.a2p-step-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.a2p-step-says { font-size: 13px; color: var(--muted); }
.trust-step.is-done .trust-step-num { background: var(--ok); }
.a2p-todo { margin-bottom: 4px; }
.a2p-where { font-size: 13px; color: var(--muted); }
.a2p-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.a2p-hand, .a2p-app-box, .a2p-status-box { margin-top: 14px; }
.a2p-hand summary, .a2p-app-box summary, .a2p-status-box summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); }
.a2p-app-box .a2p-app, .a2p-status-box .trust-status { margin-top: 10px; }
.a2p-after .trust-step-title { margin: 0; font: 700 16px var(--font-display); color: var(--text); }
.a2p-tpl-guide { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin: 12px 0; }
.a2p-tpl-step .trust-group-title { margin-bottom: 8px; }
.a2p-tpl-step .trust-checklist + .trust-checklist { margin-top: 8px; }
@media (max-width: 760px) {
  .a2p-tpl-guide { grid-template-columns: minmax(0, 1fr); }
  .a2p-next .btn-primary { width: 100%; }
}

/* CR2 step 1: Admin › Calls › Call-back rules */
.va-rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 10px; }
.va-rule-row label { margin: 0; }
.setup-page .setup-card .va-rule-row select { width: auto; min-width: 120px; }
.va-today-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #EEEAFB; color: #4B2EDB; font-size: 12px; font-weight: 600; white-space: nowrap; }
.setup-page .setup-card .voice-check .va-today-tag { font-weight: 600; }
.va-rule-fixed { margin-top: 12px; font-weight: 600; color: #1B1530; }

/* CR2 step 2: what saving a Stop after / Drop overdue rule would move */
.va-cr2-preview { border: 1px solid #d9d3f5; background: #f6f4ff; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.va-cr2-preview .va-cr2-big { font-weight: 600; color: #1B1530; margin: 0 0 6px; }
.va-cr2-preview .setup-actions { margin-top: 8px; }
#va-callback-rules .msg .btn-link { background: none; border: 0; padding: 0; color: #4B2EDB; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* CR2 step 2: Call Lists › Not reached */
#not-reached-panel .nr-name { background: none; border: 0; padding: 0; color: #4B2EDB; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
#not-reached-panel .nr-name:hover { text-decoration: underline; }
#not-reached-panel .nr-actions { text-align: right; white-space: nowrap; }
#not-reached-panel .nr-more { display: block; margin: 12px auto 4px; }
/* css/finish-panel.css */
/* BC1 (M1): the Finish panel ("How did it go?"), phone first: a sheet from the bottom on phones */
.finish-backdrop { z-index: 60; }
.finish-modal { max-width: 480px; display: flex; flex-direction: column; gap: 4px; }
.finish-title { margin: 0; font: 700 22px var(--font-display, "Bricolage Grotesque", sans-serif); color: #1B1530; }
.finish-who { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.finish-body { display: flex; flex-direction: column; gap: 12px; }
.finish-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.finish-choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 72px; padding: 10px 6px; border-radius: 14px; border: 2px solid var(--border);
  background: #fff; color: #1B1530; font: inherit; cursor: pointer; text-align: center;
}
.finish-choice strong { font-size: 17px; }
.finish-choice span { font-size: 12px; color: var(--muted); line-height: 1.25; }
.finish-choice:focus-visible { outline: 3px solid #4B2EDB; outline-offset: 2px; }
.finish-choice.selected { border-color: #4B2EDB; background: #F4F1FF; }
.finish-choice.finish-sale.selected { border-color: #1E8E5A; background: #E9F7EF; }
.finish-label { font-weight: 700; font-size: 14px; color: #1B1530; margin: 0; }
.finish-hint { font-size: 12px; color: var(--muted); }
.finish-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.finish-reason {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: #fff; color: #1B1530; font: inherit; font-weight: 600; cursor: pointer;
}
.finish-reason.selected { border-color: #4B2EDB; background: #4B2EDB; color: #fff; }
.finish-instasets { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #F7F5FC; }
.finish-inst-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.finish-stepper { display: flex; align-items: center; gap: 6px; flex: none; }
.finish-step { width: 44px; height: 44px; padding: 0; font-size: 22px; line-height: 1; border-radius: 12px; }
.finish-count { min-width: 32px; text-align: center; font: 700 22px var(--font-display, sans-serif); color: #1B1530; }
.finish-notes { width: 100%; min-height: 72px; resize: vertical; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); box-sizing: border-box; }
.finish-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.finish-save { flex: 1 1 220px; min-height: 48px; font-size: 16px; }
.finish-actions .btn-secondary { min-height: 48px; }
.today-row-actions .finish-slot, .today-next-actions .finish-slot { display: contents; }
@media (max-width: 759px) {
  .finish-modal { padding: 4px 16px 20px; }
  .finish-choice { min-height: 80px; }
}

/* SV3: Send survey link in the Finish panel and Record outcome; the survey link dialog opens above the Finish panel */
.finish-survey { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 4px; }
.status-survey { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 0; }
.status-survey-hint { margin: 0; font-size: 13px; color: var(--muted, #6b6880); }
#share-survey-modal.modal-backdrop { z-index: 70; }
.finish-survey .btn-secondary, .status-survey .btn-secondary { white-space: nowrap; flex-shrink: 0; }

/* TR2: Start a trial in How did it go? (four choices: two by two on phones) */
.finish-choices.has-trial { grid-template-columns: repeat(4, 1fr); }
.finish-choice.finish-trial.selected { border-color: #E0832F; background: #FFF4EA; }
.finish-trial-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: #FFF8F1; border: 1px solid #F3D9C0; }
.finish-trial-row { display: flex; flex-direction: column; gap: 6px; }
.finish-trial-days { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.finish-trial-input { min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); font: inherit; background: #fff; box-sizing: border-box; }
.finish-trial-days .finish-trial-input { width: 84px; }
.finish-trial-row select.finish-trial-input { width: 100%; }
.finish-trial-out { margin: 0; }
.finish-trial-out.is-full { color: #9A3412; }
/* TR3: home or office trial, and the office trial's visit rows */
.finish-trial-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.finish-trial-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 8px 12px; border-radius: 12px; border: 1px solid #F3D9C0; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.finish-trial-kind span { font-size: 13px; color: var(--muted); }
.finish-trial-kind.selected { border-color: #E0832F; background: #FFF4EA; box-shadow: inset 0 0 0 1px #E0832F; }
.finish-trial-visits { list-style: decimal; margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.finish-trial-visit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.finish-trial-visit input[type="date"] { width: 160px; }
.finish-trial-visit input[type="time"] { width: 120px; }
.finish-trial-places { min-width: 96px; }
.finish-trial-visit.is-full .finish-trial-places { color: #9A3412; font-weight: 700; }
.finish-trial-visit.is-full input { border-color: #E9A178; }
.finish-trial-remove { min-height: 44px; }
.finish-trial-add { align-self: flex-start; min-height: 44px; }
.finish-trial-refill { min-height: 44px; }
@media (max-width: 759px) {
  .finish-choices.has-trial { grid-template-columns: repeat(2, 1fr); }
  .finish-trial-visit input[type="date"] { flex: 1 1 140px; width: auto; }
  .finish-trial-visit input[type="time"] { flex: 0 1 110px; width: auto; }
}

/* EC1: end-of-demo consent hand-over screen and the Settings card */
.ec-screen { position: fixed; inset: 0; z-index: 1300; background: #fff; overflow-y: auto; display: flex; justify-content: center; }
.ec-inner { width: 100%; max-width: 560px; padding: 32px 20px 40px; display: grid; gap: 16px; align-content: start; }
.ec-title { margin: 12px 0 0; font: 700 28px/1.15 var(--font-display, "Bricolage Grotesque", sans-serif); color: #1B1530; }
.ec-sub { margin: 0; color: var(--muted); font-size: 17px; }
.ec-phone { display: grid; gap: 6px; font-weight: 600; color: #1B1530; }
.ec-phone input { font-size: 20px; padding: 12px 14px; }
.ec-box { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 2px solid #E4E1EE; border-radius: 16px; cursor: pointer; }
.ec-box input { flex: 0 0 26px; width: 26px; height: 26px; margin: 2px 0 0; accent-color: #4B2EDB; }
.ec-box:has(input:checked) { border-color: #4B2EDB; background: #F4F1FF; }
.ec-words { font-size: 16px; line-height: 1.45; color: #1B1530; }
.ec-box + .ec-box { margin-top: 10px; }
.ec-box-title { margin: 14px 0 6px; font-size: 15px; }
.ec-links { margin: 0; font-size: 15px; }
.ec-acts { display: grid; gap: 10px; margin-top: 8px; }
.ec-big { min-height: 52px; font-size: 18px; }
.ec-chip { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.ec-chip.is-wait { background: var(--wait-bg, #FFF4E0); color: var(--wait, #8A4B00); }
.ec-chip.is-ok { background: #E3F5EA; color: #1E7A46; }
.ec-hint-strong { font-weight: 600; color: #1B1530; }
.ec-wording { width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; }
.ec-preview { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.ec-setting-acts { display: flex; flex-wrap: wrap; gap: 8px; }
/* FU1: Finish up checklist and reminder */
.finish-up-list { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 8px; }
.finish-up-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line, #E4E1EE); border-radius: 14px; background: #fff; }
.finish-up-mark { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: #EFEBFF; color: #4B2EDB; }
.finish-up-row.is-done .finish-up-mark { background: #E3F5EA; color: #1E7A46; }
.finish-up-row.is-skipped .finish-up-mark { background: #F1F0F5; color: var(--muted); }
.finish-up-name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: #1B1530; }
.finish-up-state { font-weight: 400; color: var(--muted); font-size: 14px; }
.finish-up-acts { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.finish-up-foot { display: flex; justify-content: flex-end; }
.finish-up-reminder { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 10px 0; padding: 10px 14px; border: 1px solid #4B2EDB; background: #F4F1FF; border-radius: 14px; color: #1B1530; }
.finish-up-reminder.hidden { display: none; }
.finish-up-reminder .finish-up-open { font-weight: 600; color: #4B2EDB; text-align: left; }
.finish-up-reminder .finish-up-dismiss { margin-left: auto; color: var(--muted); }
.today-finish-up { margin: 0 20px 12px; }
.today-finish-up .finish-up-reminder { margin: 0 0 8px; }
.today-dealer-stack .today-finish-up { margin: 0 0 16px; }
.finish-up-who { color: var(--muted); }

/* FC1: the office asks for YES cards and Instasets before finishing */
.yes-none { margin-right: 6px; }
.yes-none.selected { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.finish-no-inst { margin: 4px 0 8px; font-size: 14px; }
.finish-counts-hint { margin: 8px 0 0; color: var(--wait); font-weight: 600; }

/* R1d one-handed polish (Nov 20): on phones every control a dealer taps is at least 48px tall, 8px apart */
@media (max-width: 640px) {
  .finish-reason, .finish-actions .btn-secondary, .finish-trial-input { min-height: 48px; }
  .finish-step { width: 48px; height: 48px; }
}
/* css/instaset-sheet.css */
/* IS3 Book an Instaset sheet, "Demos booked from this one", and IS2 Booked from (Add / Edit lead) */
.instaset-backdrop { z-index: 70; }
.instaset-modal { max-width: 480px; display: flex; flex-direction: column; gap: 4px; }
.instaset-steps { display: flex; gap: 6px; list-style: none; margin: 4px 0 8px; padding: 0; counter-reset: is-step; }
.instaset-step { flex: 1; font-size: 13px; color: #6B6680; padding: 6px 8px; border-radius: 10px; background: #F7F5FC; counter-increment: is-step; }
.instaset-step::before { content: counter(is-step) " "; font-weight: 700; }
.instaset-step.is-on { background: #4B2EDB; color: #fff; }
.instaset-step.is-done { color: #1B1530; }
.instaset-field { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.instaset-field input { width: 100%; min-height: 44px; }
.instaset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.instaset-grid-3 { grid-template-columns: 2fr 1fr 1fr; }
.instaset-q { margin-top: 12px; }
.instaset-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.instaset-choices .chip-btn { min-height: 44px; min-width: 72px; }
.instaset-noqual { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #FDF1F1; color: #8A1F1F; }
.instaset-noqual p { margin: 4px 0 0; }
.instaset-slot.is-warn { color: #9A5B00; }
.instaset-booked { padding: 10px 12px; border-radius: 14px; background: #F7F5FC; display: flex; flex-direction: column; gap: 6px; }
.instaset-booked-list { margin: 0; padding-left: 18px; font-size: 14px; }
.instaset-booked-list li { margin: 2px 0; }
.instaset-book-btn { align-self: flex-start; min-height: 44px; }
.booked-from-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.booked-from-demos { margin: 6px 0 10px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 600px) {
  .instaset-modal { padding: 4px 16px 20px; }
  .instaset-grid-3 { grid-template-columns: 1fr 1fr; }
  .instaset-grid-3 .instaset-field:first-child { grid-column: 1 / -1; }
}

/* IS7 Instaset labels: lead page (under the name, and each demo), Demos lists, calendar, demo sheet */
.instaset-label { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; font-size: 13px; line-height: 1.4; }
.instaset-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px; background: #EEEAFD; color: #4B2EDB;
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
}
.instaset-from { color: #4A4560; }
.instaset-from-link {
  background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 600; color: #4B2EDB; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.instaset-from-link:hover, .instaset-from-link:focus-visible { color: #3A20B5; }
.instaset-label.is-short { font-size: 12px; }
/* the lead page band is dark */
#detail-view .detail-instaset-line { margin: 4px 0 0; }
#detail-view .detail-instaset-line .instaset-tag,
.demo-sheet-instaset .instaset-tag { background: #4B2EDB; color: #fff; }
#detail-view .detail-instaset-line .instaset-from,
.demo-sheet-instaset .instaset-from { color: #C9C4DA; }
#detail-view .detail-instaset-line .instaset-from-link,
.demo-sheet-instaset .instaset-from-link { color: #fff; }
.demo-item-instaset { margin: 4px 0 0; }
.demos-instaset { display: block; margin-top: 2px; }
.cal-card-head .instaset-tag { font-size: 10px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
.cal-event-instaset { margin: 0; padding: 8px 12px 6px; border-bottom: 1px solid #EEEAF6; }
.demo-sheet-instaset { margin: 2px 0 6px; }
@media (max-width: 600px) {
  .instaset-from-link { min-height: 32px; }
}
/* IP1: pick a free dealer (Who runs it) */
.instaset-picker { margin: 12px 0 4px; }
.instaset-dealer-search { width: 100%; box-sizing: border-box; margin: 4px 0 8px; padding: 10px 12px; border: 1px solid var(--line, #E4E1EE);
  border-radius: 10px; font: inherit; }
.instaset-dealer-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.instaset-dealer { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 10px 12px; min-height: 48px;
  border: 1px solid var(--line, #E4E1EE); border-radius: 12px; background: #fff; color: var(--ink, #1B1530); font: inherit; text-align: left; cursor: pointer; }
.instaset-dealer:hover { background: #f7f5fe; }
.instaset-dealer.is-on { border-color: var(--violet, #4B2EDB); box-shadow: 0 0 0 2px rgba(75, 46, 219, .18); background: #f4f1ff; }
.instaset-dealer.is-busy { background: #f6f5f9; color: #8a8599; }
.instaset-dealer.is-busy.is-on { background: #efecfb; color: var(--ink, #1B1530); }
.instaset-dealer-name { font-weight: 600; }
.instaset-dealer-detail { font-size: 13px; color: var(--muted, #6b6680); }
.instaset-dealer-sep { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--muted, #6b6680); }
.instaset-dealer-more { margin-top: 8px; }
.instaset-nofree { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: #fff7e6; border: 1px solid #f3d9a4; }
.instaset-nofree p { margin: 0 0 8px; }

/* R1d one-handed polish (Nov 20): 48px tap targets on phones */
@media (max-width: 640px) {
  .instaset-field input, .instaset-choices .chip-btn, .instaset-book-btn { min-height: 48px; }
}

/* fb1ebfe9: referrals a demo produced (Demos list, demo card) */
.demo-referrals { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: #EEEAFD; color: #4B2EDB; font-size: 12px; font-weight: 600; }
.demo-referrals-none { background: #F1F0F5; color: #6B6680; }
.demo-sheet-referrals { margin: 6px 0 0; }
/* acd2f7e1: "Survey shared: opened 43 · 6 leads" on a demo; tapping it goes to the Shared survey card */
.demo-survey-line { display: inline-block; margin-top: 4px; margin-left: 4px; padding: 2px 8px; border: 0; border-radius: 999px; background: #E6F4EC; color: #1E6B43; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-align: left; }
.demo-survey-line:hover, .demo-survey-line:focus-visible { background: #D3EDDF; text-decoration: underline; }
.demo-item-survey .demo-survey-line { margin-left: 0; }
.demo-survey-flash { box-shadow: 0 0 0 3px #4B2EDB; transition: box-shadow .3s; }
/* css/yes-cards.css */
/* YC1: YES cards — the editor (Finish panel, after Record outcome, from the demo), Today's figure, the people list */
.yes-editor { display: flex; flex-direction: column; gap: 8px; }
.yes-modal .yes-editor { margin-bottom: 12px; }
.yes-people { display: flex; flex-direction: column; gap: 6px; }
.yes-person {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: #fff;
}
.yes-person-name { font-weight: 600; color: #1B1530; }
.yes-person-phone { color: var(--muted); font-size: 14px; }
.yes-person .link-btn { margin-left: auto; }
.yes-person.is-removed .yes-person-name, .yes-person.is-removed .yes-person-phone { text-decoration: line-through; opacity: 0.6; }
.yes-new { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; align-items: center; }
.yes-new input { min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); font: inherit; min-width: 0; box-sizing: border-box; }
.yes-new-remove { width: 44px; height: 44px; padding: 0; font-size: 20px; }
.yes-add { align-self: flex-start; min-height: 36px; font-weight: 600; color: #4B2EDB; }
.yes-msg { margin: 0; }
.today-perf-yes { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: #4B2EDB; }
.yes-people-name { font-weight: 600; }
.yes-dnc { margin-left: 6px; }
.yes-people-more { font-size: 13px; }
.leads-yes-btn { white-space: nowrap; }
@media (max-width: 759px) {
  .yes-new { grid-template-columns: 1fr 1fr auto; }
  .yes-new input[type="tel"] { grid-column: 1 / 3; }
}

/* YC2 (MPA 42245712): ask for names right after the count; demos counted without names; sale-form buyers */
.yes-ask { margin: 0; font-size: 14px; color: #4B2EDB; background: #F1EEFD; border-radius: 10px; padding: 8px 12px; }
.yes-unnamed h2 { margin: 0 0 4px; }
.yes-unnamed-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.yes-unnamed-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.yes-unnamed-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.yes-unnamed-what { font-weight: 600; color: #1B1530; }
.yes-unnamed-meta { font-size: 13px; }
.yes-from-sale { margin-left: 6px; }
.yes-retry { display: flex; justify-content: flex-start; }
@media (max-width: 560px) {
  .yes-unnamed-row { flex-direction: column; align-items: stretch; }
}
/* css/webhooks.css */
/* WH1: Admin › Outbound webhooks */
.wh-card.is-off { opacity: 0.92; }
.wh-on { background: #E9F7EF; color: #1E7A4C; }
.wh-hint { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.wh-sample { margin: 0; padding: 10px 12px; border-radius: 10px; background: #F7F5FC; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.wh-checks { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wh-checks legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.wh-check { display: flex; align-items: flex-start; gap: 8px; min-height: 32px; font-size: 14px; cursor: pointer; }
.wh-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.wh-source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; }
.wh-log { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.wh-log-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wh-log-top h3 { margin: 0; font-size: 15px; }
.wh-st { font-weight: 600; font-size: 13px; }
.wh-st-sent { color: #1E7A4C; }
.wh-st-failed { color: #B42318; }
.wh-st-queued, .wh-st-sending { color: var(--muted); }
/* css/tellus-control.css */
/* TC1: Report a problem (every screen), Problems and ideas (offices), TellUS Control (health board and report queue) */
.report-nav { position: relative; }

/* the report window */
.pr-modal { max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.pr-title { margin: 0; font-family: "Bricolage Grotesque", system-ui, sans-serif; color: var(--text); }
.pr-news { align-self: flex-start; font-weight: 600; color: var(--accent); }
.pr-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-kind { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.pr-kind.is-on { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.pr-label { font-weight: 600; color: var(--text); }
.pr-modal textarea { width: 100%; box-sizing: border-box; min-height: 110px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong); font: inherit; resize: vertical; }
.pr-shot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pr-file { cursor: pointer; }
.pr-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pr-thumb { display: flex; align-items: center; gap: 10px; width: 100%; }
.pr-thumb img { max-width: 180px; max-height: 120px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; }
.pr-attached { font-size: 13px; color: var(--muted); }
.pr-attached summary { cursor: pointer; }
.pr-attached-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; word-break: break-word; }
.pr-err { color: var(--danger); }
.pr-msg:empty { display: none; }
.pr-mine { align-self: flex-start; font-size: 14px; }

/* the office's page */
.pr-top { display: flex; gap: 10px; flex-wrap: wrap; }
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pr-card h2 { margin-top: 0; }
.pr-updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pr-updates li { display: grid; gap: 2px; }
.pr-update-body { color: var(--muted); font-size: 14px; }
.pr-update-date { color: var(--muted); font-size: 12px; }
.pr-item { border-top: 1px solid var(--border); padding: 10px 0; }
.pr-item:first-of-type { border-top: 0; }
.pr-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.pr-item-head::-webkit-details-marker { display: none; }
.pr-item-text { flex: 1 1 240px; min-width: 0; color: var(--text); }
.pr-item.is-fresh { background: var(--soft); margin: 0 -12px; padding: 10px 12px; border-radius: 12px; }
.pr-fresh { font-size: 12px; font-weight: 700; color: var(--accent); }
.pr-item-body { padding: 8px 0 0; }
.pr-desc { white-space: pre-wrap; margin: 0 0 6px; }
.pr-meta { font-size: 13px; margin: 0 0 8px; }
.pr-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pr-st-new { background: var(--soft); color: var(--accent); }
.pr-st-looking { background: var(--wait-bg); color: var(--wait); }
.pr-st-fixing { background: #FFE9D6; color: #9A4A00; }
.pr-st-fixed { background: var(--ok-bg); color: var(--ok); }
.pr-st-closed { background: #EEEDF2; color: var(--muted); }
.pr-kind-tag { font-size: 12px; color: var(--muted); font-weight: 600; }
.pr-thread { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.pr-thread li { padding: 8px 12px; border-radius: 12px; background: #F7F6FB; }
.pr-thread li.is-tellus { background: var(--soft); }
.pr-thread li.is-internal { background: #FFF8E6; border: 1px dashed #E8C66A; }
.pr-thread li p { margin: 4px 0 0; white-space: pre-wrap; }
.pr-note-when { margin-left: 8px; font-size: 12px; color: var(--muted); }
.pr-reply { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.pr-reply textarea { flex: 1 1 260px; min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border-strong); font: inherit; }

/* TellUS Control */
.tc-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.tc-card h2, .tc-detail h2, .tc-report h2 { margin: 0 0 10px; }
.tc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tc-table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tc-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tc-table td.tc-wrap { min-width: 220px; word-break: break-word; }
.tc-office { font-weight: 600; white-space: nowrap; }
.tc-office > * { vertical-align: middle; }
.tc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; flex: none; }
.tc-dot.tc-green { background: #1F9D61; }
.tc-dot.tc-amber { background: #F2A000; }
.tc-dot.tc-red { background: #E8492F; }
.tc-cell { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; text-align: left; }
.tc-cell.tc-green { color: var(--muted); }
.tc-cell.tc-amber { background: var(--wait-bg); border-color: #F3D27A; }
.tc-cell.tc-red { background: var(--attention-bg); border-color: #F2A894; font-weight: 600; }
.tc-cell:hover { border-color: var(--accent); }
.tc-test { margin-top: 12px; }
.tc-test summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.tc-detail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tc-detail-head h2 { margin: 0; flex: 1; }
.tc-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 0 0 12px; }
.tc-figures > div { padding: 8px 10px; border-radius: 10px; background: #F7F6FB; }
.tc-figures > div.has-value { background: var(--soft); }
.tc-figures dt { font-size: 12px; color: var(--muted); }
.tc-figures dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-family: "Bricolage Grotesque", system-ui, sans-serif; }
.tc-errors { margin: 0 0 12px; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; word-break: break-word; }
.tc-record-links { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tc-chip { min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.tc-chip.is-on { border-color: var(--accent); background: var(--soft); color: var(--accent); font-weight: 600; }
.tc-reg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.tc-tax { display: flex; align-items: center; margin: 12px 0 0; font-size: 14px; }
.tc-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tc-tab { min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tc-tab.is-on { background: #1B1530; border-color: #1B1530; color: #fff; }
.tc-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.tc-filter { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tc-filter select { min-height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); padding: 4px 8px; font: inherit; color: var(--text); background: #fff; max-width: 260px; }
.tc-queue { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
.tc-list { display: grid; gap: 8px; }
.tc-row { display: grid; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font: inherit; cursor: pointer; }
.tc-row.is-on, .tc-row:hover { border-color: var(--accent); }
.tc-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-row-office { font-weight: 700; color: var(--text); font-size: 13px; }
.tc-row-when { margin-left: auto; font-size: 12px; color: var(--muted); }
.tc-row-text { color: var(--text); font-size: 14px; }
.tc-row-meta { color: var(--muted); font-size: 12px; }
.tc-report { position: static; }
/* PR2: the reports as a table, the detail under it */
.tc-report-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.tc-report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tc-report-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tc-report-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text); }
.tc-report-table tbody tr:last-child td { border-bottom: 0; }
.tc-report-table tr.tc-row { display: table-row; cursor: pointer; border: 0; border-radius: 0; padding: 0; }
.tc-report-table tr.tc-row:hover td { background: #F6F4FF; }
.tc-report-table tr.tc-row.is-on td { background: #EEEAFE; }
.tc-report-table tr.tc-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tc-report-table tr.is-new td:first-child { box-shadow: inset 3px 0 0 #4B2EDB; }
.tc-report-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tc-report-table .tc-has-errs { color: var(--danger); font-weight: 700; }
.tc-report-table .tc-center { text-align: center; }
.tc-nowrap { white-space: nowrap; }
.tc-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; max-width: 320px; }
.tc-report-links { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 6px 0 10px; font-size: 14px; }
/* PR2: new reports on the TellUS menu item */
.side-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #4B2EDB; color: #fff; font: 700 11px/20px var(--font-body); text-align: center; }
.side-count[hidden] { display: none; }
body.sidebar-collapsed .side-link { position: relative; }
body.sidebar-collapsed .side-count { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
.tc-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin: 8px 0; font-size: 14px; }
.tc-meta dt { font-size: 12px; color: var(--muted); }
.tc-meta dd { margin: 0; word-break: break-word; }
.tc-errs { margin: 10px 0; font-size: 14px; }
.tc-errs summary { cursor: pointer; font-weight: 600; }
.tc-shot img { max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--border); margin: 6px 0; }
.tc-manage { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); margin-top: 8px; }
.tc-reply { flex-direction: column; align-items: stretch; }
.tc-update-form { display: grid; gap: 10px; max-width: 640px; }
.tc-field { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--text); }
.tc-field input, .tc-field textarea, .tc-field select { min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border-strong); font: inherit; font-weight: 400; }
.tc-update-form .btn-primary { justify-self: start; }
.tc-update-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tc-update-list li { padding: 8px 0; border-top: 1px solid var(--border); }
.tc-update-list li:first-child { border-top: 0; }
.tc-update-list li.is-draft { opacity: 0.7; }
.tc-update-list p { margin: 4px 0; color: var(--muted); font-size: 14px; }
.tc-update-acts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.tc-danger { color: var(--danger); }

@media (max-width: 899px) {
  .tc-queue { grid-template-columns: 1fr; }
  .tc-report { position: static; }
}
@media (max-width: 759px) {
  .pr-grid { grid-template-columns: 1fr; }
}

/* PR5: Reply column and the unsent-reply line */
.tc-reply-st { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tc-reply-st.is-replied { background: #E8F5E9; color: #2E7D32; }
.tc-reply-st.is-waiting { background: #FFF4E0; color: #8A5300; }
.tc-draft-note { color: #8A5300; }
.tc-notes { margin-top: 16px; }

/* R1e: TellUS Control › Dealer app */
.tc-da-controls { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.tc-da-controls label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; color: var(--muted); }
.tc-da-controls select, .tc-da-controls input { min-height: 40px; }
.tc-da-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tc-da-tiles .stat-tile { padding: 14px 16px; border: 1px solid var(--line, #E6E2F2); border-radius: 14px; background: #fff; }
.tc-da-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* RD2: Demo offices card (Reset demo office) */
.tc-demo-list { display: grid; gap: 10px; }
.tc-demo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-demo-row .btn-secondary { margin-left: auto; }
.tc-demo-msg { flex-basis: 100%; font-size: 14px; }
.tc-demo-msg:empty { display: none; }

/* RP1: Report a problem per role, and Office reports */
.pr-routes { display: grid; gap: 8px; margin: 10px 0 6px; max-width: 460px; }
.pr-route-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; }
.pr-route-role { font-weight: 600; }
.pr-route-row select { min-height: 40px; }
.pr-route-note { margin: 0; align-self: center; }
.pr-with-office { background: var(--violet-soft, #ece8fd); color: var(--violet, #4B2EDB); }
.pr-office-actions { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
@media (max-width: 480px) { .pr-route-row { grid-template-columns: 1fr; gap: 4px; } }
/* CF1: why calls didn't connect (this week) */
.tc-reasons { max-width: 640px; margin-bottom: 12px; }
.tc-reasons td.tc-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 70px; }
.tc-reasons tr.is-fail td:first-child { color: #B42318; font-weight: 600; }
.tc-reasons td.tc-wrap { min-width: 0; }
.tc-reasons td.tc-num, .tc-reasons th:not(:first-child) { width: 56px; text-align: right; }
.tc-reasons { table-layout: fixed; }
.tc-reasons td.tc-wrap { white-space: normal; overflow-wrap: anywhere; }

/* Ref: a report's short reference */
.tc-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.tc-find input { min-height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); padding: 4px 10px; font: inherit; color: var(--text); background: #fff; width: 230px; max-width: 100%; }
.pr-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }
.pr-search { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); margin: 0 0 12px; max-width: 360px; }
.pr-search input { min-height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); padding: 4px 10px; font: inherit; color: var(--text); background: #fff; }
/* css/policy-pages.css */
/* CN3 (Nov 12): Business details, Policy pages, TellUS › Policy pages */
.pp-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.pp-details > .setup-field { min-width: 0; }
.pp-details input { width: 100%; }
.pp-addr-row { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 12px; }
@media (max-width: 640px) {
  .pp-details { grid-template-columns: 1fr; }
  .pp-addr-row { grid-template-columns: 1fr 1fr; }
  .pp-addr-row > .setup-field:first-child { grid-column: 1 / -1; }
}
.pp-slug-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-slug-base { color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 13px; }
.pp-slug-row input { flex: 1 1 200px; max-width: 320px; }
.pp-slug-value { font-family: "JetBrains Mono", monospace; font-size: 13px; margin: 4px 0; }
.pp-missing { background: var(--wait-bg); color: var(--wait); border-radius: var(--radius-sm); padding: 10px 12px; margin: 8px 0 12px; font-size: 14px; }
.pp-list { display: flex; flex-direction: column; gap: 10px; }
.pp-item, .pp-tpl { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
.pp-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pp-item-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pp-item-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pp-status { color: var(--muted); font-size: 13px; }
.pp-status.is-live { color: var(--ok); font-weight: 600; }
.pp-status.is-warn { color: var(--wait); }
.pp-status.a2p-kind { display: inline-block; align-self: flex-start; width: auto; max-width: max-content; border: 1px solid var(--line, #e3e0ee); border-radius: 999px; padding: 1px 8px; margin: 0 6px; }
.pp-status.a2p-kind.is-service { color: var(--violet, #4B2EDB); border-color: currentColor; }
.pp-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.pp-link code { font-family: "JetBrains Mono", monospace; background: var(--soft); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.pp-link.is-off code { color: var(--muted); }
.pp-panel { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.pp-panel label { display: block; margin: 8px 0; font-weight: 600; font-size: 14px; }
.pp-panel label input[type="text"], .pp-panel label input[type="date"] { display: block; margin-top: 4px; width: 100%; max-width: 360px; }
.pp-panel label.check-row { font-weight: 500; }
.pp-body-input { display: block; width: 100%; margin-top: 4px; font-family: "JetBrains Mono", monospace; font-size: 13px; line-height: 1.5; }
.pp-approve { margin-top: 14px !important; }
.pp-doc { background: var(--bg); border-radius: var(--radius-sm); padding: 16px 20px; max-height: 460px; overflow: auto; font-size: 14px; line-height: 1.55; }
.card .pp-doc h1, .pp-doc h1 { font-family: "Bricolage Grotesque", sans-serif; font-size: 22px; margin: 0 0 8px; }
.card .pp-doc h2, .pp-doc h2 { font-family: "Bricolage Grotesque", sans-serif; font-size: 16px; margin: 16px 0 4px; }
.pp-doc p { margin: 6px 0; }
.pp-doc ul { margin: 6px 0; padding-left: 22px; }
.pp-history { width: 100%; border-collapse: collapse; font-size: 13px; }
.pp-history th, .pp-history td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pp-history th { color: var(--muted); font-weight: 600; }
.pp-tpl-page { margin-top: 14px; }
.card .pp-tpl-page h3, .pp-tpl-page h3 { font-family: "Bricolage Grotesque", sans-serif; font-size: 16px; margin: 0 0 8px; }
.pp-tpl-page .pp-tpl + .pp-tpl { margin-top: 8px; }
.pp-offices .pp-slug-input { width: 190px; margin-right: 6px; }
/* css/trials.css */
/* MPA1: trials (js/trials.js): Today's Trials card, the trial line on demos and the lead page, Stats tiles */
.today-trials { margin-bottom: 16px; }
.today-trials .today-card-head { display: flex; align-items: center; gap: 8px; }
.today-trials .today-card-head h2 { margin: 0; }
.today-trials-help { margin: 4px 0 10px; }
.today-trials-list { display: flex; flex-direction: column; }
.today-trial-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line, #E6E3EF);
}
.today-trial-row:first-child { border-top: 0; }
.today-trial-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.today-trial-name { font-weight: 600; text-align: left; }
.today-trial-need { font-size: 14px; }
.today-trial-row.is-due .today-trial-need { color: #B45309; font-weight: 600; }
.trial-line { color: #7A5300; font-weight: 600; }
.demos-grid .dg-status .trial-line { display: block; }

.stats-trials h2 { margin-top: 0; }
.trial-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.trial-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line, #E6E3EF);
  border-radius: 12px;
  background: #fff;
}
.trial-stat strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 24px; color: #1B1530; }
.trial-stat span { font-size: 13px; color: var(--muted, #6B6880); }

.trial-modal input[type="date"],
.trial-modal input[type="time"] { width: 100%; min-height: 44px; margin-bottom: 8px; }

@media (max-width: 767px) {
  .today-trial-row .today-row-actions { width: 100%; }
  .today-trial-row .today-row-actions > * { flex: 1 1 auto; min-height: 44px; }
}

    /* TR1: the trial's length in the end visit window; longer than planned stands out */
    .trial-length { margin: 10px 0 0; font-weight: 700; color: var(--text); }
    .trial-length.is-long { color: var(--wait); background: var(--wait-bg); border-radius: 8px; padding: 6px 10px; display: inline-block; }

    /* TR3: office trial visits in Stats, and a session's places */
    .trial-stats-sessions { margin: 12px 0 0; font-weight: 600; color: var(--text); }
    .trial-places.is-full { color: #9A3412; font-weight: 700; }
    .trial-session-btn { white-space: nowrap; }

/* OT2: the lead page's office trial: its visits */
.lead-trial-office { margin: 6px 0 10px; }
.lead-trial-visits { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.lead-trial-visit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px;
  border: 1px solid #E6E2F0; border-radius: 10px; background: #fff; }
.lead-trial-visit-when { font-weight: 600; color: #1B1530; }
.lead-trial-visit-state { font-size: 13px; color: #5B5670; }
.lead-trial-visit.is-completed .lead-trial-visit-state { color: #1E7A46; font-weight: 600; }
.lead-trial-visit.is-no_show .lead-trial-visit-state { color: #B4232A; font-weight: 600; }
.lead-trial-visit-actions { margin-left: auto; display: flex; gap: 6px; }
/* css/right-now.css */
    /* RN1: Right now on Today and the day map (Today and Calendar › Day). Colours follow D-Today.html:
       booked = white with a violet ring, in the home = violet, finished = grey, sold = green, home base = ink. */
    .today-right-now { margin-bottom: 16px; }
    /* RN2: the card takes the spot Performance had (lifted over the band's lower edge, page margins), so
       Performance no longer slides up over the card's bottom (the legend) and the card never runs to the window
       edge (the right column was cut off under the scrollbar) */
    #today-right-now:not(:empty) { position: relative; z-index: 2; margin: -50px 32px 16px; }
    #today-right-now:not(:empty) ~ #today-perf-slot.is-open { margin-top: 0; }

    .rn-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; margin: 0; min-width: 0; }
    .rn-card-error { color: var(--muted); font-size: 14px; }
    .rn-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .rn-title-wrap { min-width: 0; }
    .rn-title { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
    .rn-headline { margin: 2px 0 0; font-size: 15px; color: var(--muted); font-weight: 600; }
    .rn-head-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
    .rn-updated { font-size: 13px; color: var(--muted); white-space: nowrap; }
    .rn-switch { display: inline-flex; padding: 3px; border-radius: 18px; background: var(--soft); }
    .rn-switch-btn {
      min-height: 32px; padding: 0 12px; border: 0; border-radius: 15px; background: transparent; color: var(--text);
      font: 700 13px var(--font-body); cursor: pointer; white-space: nowrap;
    }
    .rn-switch-btn.is-on { background: #FFFFFF; color: var(--accent); box-shadow: 0 1px 3px rgba(27, 21, 48, .15); }
    .rn-switch-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

    .rn-pills { display: flex; flex-wrap: wrap; gap: 8px; }
    .rn-pill {
      display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px;
      background: var(--soft); color: var(--text); font-size: 13px; font-weight: 800;
    }
    .rn-pill.is-in { background: var(--accent); color: #FFFFFF; }
    .rn-pill.is-sold { background: var(--ok); color: #FFFFFF; }
    .rn-pill.is-pending { background: var(--wait-bg); color: var(--wait); }
    .rn-pill.is-booked { background: var(--ok-bg); color: var(--ok); }

    .rn-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
    .rn-body > * { min-width: 0; }

    /* lanes */
    .rn-lanes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
    .rn-lanes-title { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 800; }
    .rn-lanes-note { font-size: 12px; color: var(--muted); }
    .rn-lanes { min-width: 0; }

    /* RN2 summary row: filters the list and the map */
    .rn-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
    .rn-sum-btn {
      display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 17px;
      border: 1.5px solid var(--border); background: #FFFFFF; color: var(--text); font: 700 13px var(--font-body);
      cursor: pointer; white-space: nowrap;
    }
    .rn-sum-btn:disabled { opacity: .45; cursor: default; }
    .rn-sum-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
    .rn-sum-n { font-weight: 800; }
    .rn-sum-late { font-size: 12px; font-weight: 800; color: var(--wait); }
    .rn-sum-btn.is-in_home .rn-sum-n { color: var(--accent); }
    .rn-sum-btn.is-heading .rn-sum-n { color: #1F4FB8; }
    .rn-sum-btn.is-done .rn-sum-n { color: var(--muted); }
    .rn-sum-btn.is-on { border-color: var(--accent); background: var(--soft); color: var(--accent); }
    .rn-sum-clear { margin: 2px 0 0; font-size: 13px; }
    .rn-more {
      margin-top: 4px; width: 100%; min-height: 40px; border: 1.5px dashed var(--border-strong); border-radius: 12px;
      background: #FFFFFF; color: var(--accent); font: 700 14px var(--font-body); cursor: pointer;
    }
    .rn-lane {
      display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center;
      padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; border-radius: 6px;
    }
    .rn-lane-list > .rn-lane:first-child { border-top: 0; }
    .rn-lane:hover { background: #FAF9FE; }
    .rn-lane:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .rn-lane-av { width: 40px; height: 40px; }
    .rn-initials {
      display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
      background: var(--accent); color: #FFFFFF; font-weight: 800; font-size: 13px;
    }
    .rn-lane-mid { min-width: 0; }
    .rn-lane-name { font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .rn-lane-pill {
      display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 11px;
      font-size: 12px; font-weight: 800; background: var(--soft); color: var(--accent);
    }
    .rn-lane-pill.is-in { background: var(--soft); color: var(--accent); }
    .rn-lane-pill.is-heading { background: #E8F0FE; color: #1F4FB8; }
    .rn-lane-pill.is-late { background: var(--wait-bg); color: var(--wait); }
    .rn-lane-pill.is-sold { background: var(--ok-bg); color: var(--ok); }
    .rn-lane-pill.is-done { background: #EFEDF5; color: var(--muted); }
    .rn-lane-sub, .rn-lane-results { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
    .rn-lane-results.is-good { color: var(--ok); font-weight: 700; }
    .rn-lane-count { font-size: 13px; font-weight: 700; white-space: nowrap; }
    .rn-lanes-office { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
    /* PR1: demos waiting for a new time today, under Dealers right now (office admins) */
    .rn-waiting { margin: 8px 0 0; font-size: 13px; }
    .rn-waiting-btn { color: var(--muted); font-size: 13px; min-height: 32px; }
    .rn-waiting-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
    .rn-waiting-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); }
    .rn-waiting-time { min-width: 64px; font-variant-numeric: tabular-nums; }
    .rn-empty { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

    .rn-tl { position: relative; height: 8px; border-radius: 4px; background: var(--soft); margin-top: 8px; }
    .rn-tl-seg { position: absolute; top: 0; height: 8px; border-radius: 4px; background: #CFC6F7; }
    .rn-tl-seg.is-in_home { background: var(--accent); }
    .rn-tl-seg.is-sold { background: var(--ok); }
    .rn-tl-seg.is-finished { background: #8A82A6; }
    .rn-tl-now { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text); border-radius: 1px; pointer-events: none; }
    /* RN3: hour marks, "Now" and block details */
    .rn-tl-wrap { position: relative; margin-top: 8px; }
    .rn-tl-wrap .rn-tl { margin-top: 0; }
    .rn-tl-wrap.has-scale { padding-top: 14px; }
    .rn-tl-tick { position: absolute; top: 0; width: 1px; height: 8px; background: rgba(27, 21, 48, .14); pointer-events: none; }
    .rn-tl-seg { cursor: default; }
    .rn-tl-seg::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; } /* easier to tap */
    .rn-tl-nowlabel {
      position: absolute; top: 0; transform: translateX(-50%); font-size: 10px; line-height: 12px; font-weight: 800;
      color: var(--text); letter-spacing: .02em; pointer-events: none;
    }
    .rn-tl-scale { position: relative; height: 14px; margin-top: 3px; }
    .rn-tl-mark { position: absolute; top: 0; transform: translateX(-50%); font-size: 10px; line-height: 14px; color: var(--muted); white-space: nowrap; opacity: .8; }
    .rn-tl-mark.is-end { transform: translateX(-100%); }
    .rn-tl-tip {
      position: fixed; z-index: 1000; display: none; max-width: min(280px, calc(100vw - 16px)); padding: 6px 10px;
      border-radius: 8px; background: var(--text); color: #FFFFFF; font: 600 12px/1.35 var(--font-body);
      box-shadow: 0 4px 14px rgba(27, 21, 48, .25); pointer-events: none;
    }

    /* the map */
    .rn-map { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
    .rn-map-canvas {
      position: relative; height: 330px; border-radius: 16px; overflow: hidden; background: #ECE9F6;
    }
    .rn-map-wait, .rn-map-fail {
      position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0;
      padding: 16px; text-align: center; color: var(--muted); font-size: 14px;
    }
    .rn-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
    .rn-legend li { display: inline-flex; align-items: center; gap: 6px; }
    .rn-key { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
    .rn-key.is-booked { background: #FFFFFF; box-shadow: inset 0 0 0 3px var(--accent); }
    .rn-key.is-late { background: #FFFFFF; box-shadow: inset 0 0 0 3px #D97706; }
    .rn-key.is-in_home { background: var(--accent); }
    .rn-key.is-finished { background: #8A82A6; }
    .rn-key.is-sold { background: var(--ok); }
    .rn-key.is-home { background: var(--text); border-radius: 3px; }
    .rn-map-note { margin: 0; font-size: 13px; color: var(--muted); }

    .rn-pin {
      display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0;
      background: none; cursor: pointer; font: inherit;
    }
    .rn-pin-dot {
      width: 32px; height: 32px; border-radius: 50%; border: 3px solid #FFFFFF; box-sizing: border-box;
      display: flex; align-items: center; justify-content: center; font: 800 11px var(--font-body);
      box-shadow: 0 2px 6px rgba(27, 21, 48, .3); background: #FFFFFF; color: var(--accent);
    }
    .rn-pin.is-booked .rn-pin-dot { border-color: var(--accent); }
    .rn-pin.is-late .rn-pin-dot { border-color: #D97706; color: #B45309; }
    .rn-pin.is-in_home .rn-pin-dot { background: var(--accent); color: #FFFFFF; }
    .rn-pin.is-finished .rn-pin-dot { background: #8A82A6; color: #FFFFFF; }
    .rn-pin.is-sold .rn-pin-dot { background: var(--ok); color: #FFFFFF; }
    .rn-pin:focus-visible .rn-pin-dot { outline: 3px solid var(--text); outline-offset: 2px; }
    /* RN2 bubbles: nearby pins when zoomed out, coloured by the most urgent one */
    .rn-bubble {
      min-width: 38px; height: 38px; padding: 0 8px; border-radius: 19px; border: 3px solid #FFFFFF; cursor: pointer;
      display: flex; align-items: center; justify-content: center; font: 800 14px var(--font-body); color: #FFFFFF;
      background: var(--accent); box-shadow: 0 0 0 4px rgba(75, 46, 219, .22), 0 2px 8px rgba(27, 21, 48, .3);
    }
    .rn-bubble.is-late { background: #D97706; box-shadow: 0 0 0 4px rgba(217, 119, 6, .25), 0 2px 8px rgba(27, 21, 48, .3); }
    .rn-bubble.is-booked { background: #FFFFFF; color: var(--accent); border-color: var(--accent); }
    .rn-bubble.is-sold { background: var(--ok); box-shadow: 0 0 0 4px rgba(22, 128, 61, .22), 0 2px 8px rgba(27, 21, 48, .3); }
    .rn-bubble.is-finished { background: #8A82A6; box-shadow: 0 2px 8px rgba(27, 21, 48, .3); }
    .rn-bubble:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
    /* pointing at a dealer in the list */
    .rn-pin.is-dim, .rn-bubble.is-dim, .rn-home.is-dim { opacity: .28; }
    .rn-pin.is-hl .rn-pin-dot, .rn-bubble.is-hl { outline: 3px solid var(--text); outline-offset: 2px; }
    .rn-pin.is-hl { z-index: 20 !important; }
    .rn-home.is-hl { outline: 2px solid var(--accent); outline-offset: 1px; }
    .rn-home {
      width: 22px; height: 22px; border-radius: 6px; background: var(--text); color: #FFFFFF; border: 2px solid #FFFFFF;
      display: flex; align-items: center; justify-content: center; font: 800 9px var(--font-body);
      box-shadow: 0 1px 4px rgba(27, 21, 48, .3);
    }

    .rn-card-pop { font-family: var(--font-body); color: var(--text); min-width: 200px; }
    .rn-card-pop p { margin: 0 0 4px; }
    .rn-pop-state { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
    .rn-pop-state.is-sold { color: var(--ok); }
    .rn-pop-state.is-finished { color: var(--muted); }
    .rn-pop-state.is-late { color: #B45309; }
    .rn-pop-dealer { font-weight: 700; color: var(--text); }
    .rn-pop-name { font-weight: 800; font-size: 16px; }
    .rn-pop-line { font-size: 13px; color: var(--muted); }
    .rn-pop-line.is-good { color: var(--ok); font-weight: 700; }
    .rn-pop-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
    .rn-pop-btn { min-height: 36px; padding: 0 12px; font-size: 13px; display: inline-flex; align-items: center; text-decoration: none; }
    .maplibregl-popup { z-index: 30; } /* RN2: markers carry z-index up to 20, so the card must sit above them */
    .maplibregl-popup-content { border-radius: 14px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(27, 21, 48, .2); }
    .maplibregl-popup-close-button { font-size: 18px; width: 28px; height: 28px; }

    /* addresses not on the map */
    .rn-problems { max-width: 620px; }
    .rn-problems-list { display: flex; flex-direction: column; gap: 0; max-height: 60vh; overflow: auto; }
    .rn-problem { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
    .rn-problem:first-child { border-top: 0; }
    .rn-problem.is-retried { opacity: .6; }
    .rn-problem-text p { margin: 0; }
    .rn-problem-name { font-weight: 800; }
    .rn-problem-line { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
    .rn-problem-why { font-size: 13px; color: var(--danger); }
    .rn-problem-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
    .rn-problems-empty { color: var(--ok); font-weight: 700; }

    /* Calendar › Day */
    .cal-day-mapbar { display: flex; justify-content: flex-end; margin: 4px 0 8px; }
    .cal-day-map-btn {
      min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1.5px solid var(--border-strong);
      background: #FFFFFF; color: var(--text); font: 700 14px var(--font-body); cursor: pointer;
    }
    .cal-day-map-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
    .cal-day-map-slot:empty { display: none; }
    .cal-day-map-slot { margin-bottom: 12px; }
    .cal-day-map-slot .rn-map-canvas { height: 360px; }
    .cal-day-map-empty { margin: 0 0 8px; }

    @media (max-width: 1100px) {
      #today-right-now:not(:empty) { margin: -36px 16px 16px; }
    }

    @media (max-width: 959px) {
      .rn-body { grid-template-columns: minmax(0, 1fr); }
    }

    @media (max-width: 759px) {
      .rn-card { padding: 14px 14px; }
      .rn-title { font-size: 20px; }
      .rn-map-canvas, .cal-day-map-slot .rn-map-canvas { height: 260px; border-radius: 12px; }
  
/* css/appointment-types.css */
/* BK1a: appointment types and locations */
.appt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; margin-top: 8px; }
.appt-checks { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 4px; }
.appt-type-card.is-off { opacity: 0.72; }
.appt-type-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.appt-type-head h2 { margin: 0; }
.appt-texts { margin-top: 12px; }
.appt-texts summary { cursor: pointer; font-weight: 600; }
.appt-texts textarea { width: 100%; }
.appt-loc-row { padding: 12px 0; border-top: 1px solid #ECEAF3; }
.appt-loc-row:first-of-type { border-top: 0; }
.appt-loc-row.is-off { opacity: 0.6; }
.appt-loc-row.is-editing { background: #F7F6FB; padding: 12px; border-radius: 10px; }
.appt-loc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.appt-prod-row { padding: 12px 0; border-top: 1px solid #ECEAF3; }
.appt-prod-row .bo-chips { margin: 8px 0; }
.book-demo-type { margin: 4px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.book-demo-type .setup-field { margin: 0; }
.appt-type-choices .choice.selected { box-shadow: inset 4px 0 0 var(--appt-colour, #4B2EDB); }
/* the type's colour and place on calendar items */
.appt-type-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #1B1530; }
.appt-type-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--appt-colour, #4B2EDB); }
.appt-place-line { font-size: 12px; color: #5B5670; }
.appt-multiday-bar { display: block; margin: 2px 0; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #fff;
  background: var(--appt-colour, #E0832F); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-multiday-bar.is-middle { border-radius: 0; }
.appt-multiday-bar.is-first { border-radius: 6px 0 0 6px; }
.appt-multiday-bar.is-last { border-radius: 0 6px 6px 0; }
.appt-capacity-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.appt-capacity-chip { padding: 4px 10px; border-radius: 999px; background: #F1EEFC; font-size: 13px; color: #1B1530; }
.appt-capacity-chip.is-full { background: #FDE8E4; color: #9B2C1A; }
.appt-stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.appt-stats-table th, .appt-stats-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #ECEAF3; }
.appt-stats-table td.num, .appt-stats-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* checkboxes keep their own size inside setup cards (the page's input style makes them 44px tall) */
.setup-page .setup-card .appt-checks .voice-check input,
.setup-page .setup-card .appt-type-head .voice-check input { height: 18px; min-height: 0; padding: 0; }
.appt-type-head .voice-check { margin: 0; align-items: center; }

/* SL1: Admin › RBO offices */
.rbo-office-row { padding: 12px 0; border-top: 1px solid #ECEAF3; }
.rbo-office-row:first-of-type { border-top: 0; }
.rbo-office-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rbo-office-head .setup-help { margin: 0; }
.rbo-office-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rbo-office-form input { flex: 1 1 220px; max-width: 360px; }
.rbo-office-note { margin: 0; }

/* SA2: Admin › Sale fields */
.sf-row { padding: 12px 0; border-top: 1px solid #ECEAF3; }
.sf-row:first-of-type { border-top: 0; }
.sf-row.is-off { opacity: 0.6; }
.sf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sf-row .setup-help { margin: 4px 0; }
.sf-form .setup-field { margin-bottom: 12px; }
.sf-form input, .sf-form select, .sf-form textarea { width: 100%; max-width: 420px; }

/* TR3: trial kinds and office trial defaults on a days type */
.appt-office-trial { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 14px; background: #FFF8F1; border: 1px solid #F3D9C0; }
.appt-trial-kinds { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.appt-trial-kinds .check-row { min-height: 44px; }
/* css/ai-booking-lab.css */
/* AB1: the AI booking lab (TellUS) and the Assistant draft note */
.ab-lab {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  align-items: start;
}
.ab-lab .card { padding: 16px; }
.ab-lab-h { font-family: "Bricolage Grotesque", sans-serif; font-size: 16px; font-weight: 800; margin: 0 0 10px; color: #1B1530; }
.ab-lab-side .ab-lab-h + * { margin-bottom: 16px; }
.ab-lab-setup { display: flex; flex-direction: column; gap: 10px; }
.ab-lab-setup label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.ab-lab-buttons { display: flex; gap: 8px; margin-top: 4px; }

.ab-lab-phone { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ab-chat {
  min-height: 360px; max-height: 60vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px; border-radius: 14px; background: #F7F5FF; border: 1px solid #ECE8F6;
}
.ab-chat-empty { color: var(--muted); margin: auto; text-align: center; max-width: 300px; }
.ab-msg { max-width: 85%; display: flex; flex-direction: column; gap: 6px; }
.ab-msg-text { margin: 0; padding: 10px 12px; border-radius: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.ab-msg.is-assistant { align-self: flex-start; }
.ab-msg.is-assistant .ab-msg-text { background: #4B2EDB; color: #fff; border-bottom-left-radius: 4px; }
.ab-msg.is-customer { align-self: flex-end; }
.ab-msg.is-customer .ab-msg-text { background: #fff; color: #1B1530; border: 1px solid #E2DDF2; border-bottom-right-radius: 4px; }
.ab-msg.is-system { align-self: center; max-width: 95%; }
.ab-msg.is-system .ab-msg-text { background: #FFF4D6; color: #7A5300; font-size: 14px; }
.ab-msg-meta { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.ab-badge { align-self: flex-start; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #ECE8FA; color: #3A20B5; }
.ab-badge.is-book { background: #DDF3E7; color: #137A4B; }
.ab-badge.is-handoff { background: #FFF4D6; color: #7A5300; }
.ab-meta-warn { color: #A3361F; font-weight: 600; }
.ab-meta-send { font-style: italic; }

.ab-lab-status { margin: 0; min-height: 18px; }
.ab-lab-status.is-error { color: #A3361F; font-weight: 600; }
.ab-lab-status.is-warn { color: #7A5300; font-weight: 600; }
.ab-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-idea {
  font: inherit; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid #E2DDF2; background: #fff; color: #1B1530; cursor: pointer;
}
.ab-idea:hover { border-color: #4B2EDB; color: #4B2EDB; }
.ab-lab-compose { display: flex; gap: 8px; align-items: flex-end; }
.ab-lab-compose textarea { flex: 1 1 auto; min-width: 0; resize: vertical; }

.ab-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ab-rule { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; font-size: 14px; }
.ab-rule-mark { font-weight: 800; text-align: center; }
.ab-rule.is-ok .ab-rule-mark { color: #137A4B; }
.ab-rule.is-no .ab-rule-mark { color: #A3361F; }
.ab-rule-body { display: flex; flex-direction: column; gap: 1px; }
.ab-rule-note { color: var(--muted); font-size: 13px; }
.ab-times { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-time { font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 8px; background: #F4F2FB; color: #5E5873; }
.ab-time.is-offered { background: #ECE8FA; color: #3A20B5; outline: 1px solid #4B2EDB; }

.ab-draft-note { margin-top: 6px; }

@media (max-width: 1100px) {
  .ab-lab { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .ab-lab-compose { flex-direction: column; align-items: stretch; }
  .ab-msg { max-width: 95%; }
  .ab-chat { min-height: 280px; }
}
/* css/office-plan.css */
/* PL2 (owner Dec 4): the office's Plan card and Change plan (js/office-plan.js; TellUS only) */
.opl-chip { font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.opl-chip.is-pro { background: #4B2EDB; color: #fff; }
.opl-chip.is-standard { background: #ECE9F7; color: #1B1530; }
.opl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 4px; }
.opl-hist-title { font-size: 15px; margin: 16px 0 6px; }
.opl-hist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.opl-hist li { padding: 6px 0; border-top: 1px solid #EEEBF5; }
.opl-dialog { max-width: 560px; width: calc(100vw - 32px); }
.opl-body { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.opl-body p { margin: 0; }
.opl-lead { font-family: "Bricolage Grotesque", sans-serif; font-size: 18px; font-weight: 700; color: #1B1530; }
.opl-choices { display: flex; flex-direction: column; gap: 8px; }
.opl-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #E2DEEF; border-radius: 10px; cursor: pointer; }
.opl-choice > span { display: flex; flex-direction: column; gap: 2px; }
.opl-choice.is-now { opacity: .6; cursor: default; }
.opl-sec { border: 1px solid #E2DEEF; border-radius: 10px; padding: 10px 12px; }
.opl-sec h3 { font-size: 14px; margin: 0 0 6px; color: #1B1530; }
.opl-sec.is-off { border-color: #F1D3C9; background: #FFF8F5; }
.opl-sec.is-decide { border-color: #F2D49B; background: #FFF9EC; }
.opl-list { margin: 0 0 4px; padding-left: 18px; font-size: 14px; }
.opl-list li { margin: 2px 0; }
.opl-decide-row { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.opl-decide-row + .opl-decide-row { border-top: 1px solid #F2E3C2; }
.opl-decide-row .btn-secondary { align-self: flex-start; }
.opl-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.module-dot.is-blocked { opacity: .45; cursor: pointer; }
