/* Round 6 pages that used to be pop-ups: Settings, History, This week, Hand over, Owners' notes (Kam, Nov 29: "Round 6 everywhere").
   Same buttons and fields as before – only the look: white cards on the page background, one vertical tab card for Settings, stat tiles,
   soft table headers, dark primary buttons, 44 px touch targets. Light and dark follow the page's own tokens (--card, --line, --ink …). */
.pd .r6host { color: var(--ink); font-size: 14px; }
.pd .r6host .r6h-body { display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.pd .r6host #hBody, .pd .r6host #wkBody, .pd .r6host #setBody, .pd .r6host #hoBody { min-width: 0; overflow-x: auto; }
.pd .r6host .muted, .pd .r6host .mut { color: var(--ink3); }
.pd .r6host .small { font-size: 12.5px; }
.pd .r6host a { color: var(--accent2); }

/* cards: the main body is one card, nested legacy cards become soft sections */
.pd .r6h-week .r6h-body, .pd .r6h-handover .r6h-body, .pd .r6h-notes .r6h-body { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--cardShadow); }
.pd .r6h-handover .r6h-body, .pd .r6h-notes .r6h-body { max-width: 860px; }
.pd .r6host .card { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: none; }
.pd .r6host .card .top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* section labels = Round 6 small table-header words */
.pd .r6host .section-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink3); margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.pd .r6host .section-label:first-child { margin-top: 0; }

/* fields */
.pd .r6host label.field { font-size: 13px; font-weight: 650; color: var(--ink2); }
.pd .r6host label.field > span { margin-bottom: 6px; }
.pd .r6host input, .pd .r6host select, .pd .r6host textarea { min-height: 44px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 14px; font: inherit; font-size: 14px; }
.pd .r6host input:focus, .pd .r6host select:focus, .pd .r6host textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); box-shadow: none; }
.pd .r6host input[type=checkbox], .pd .r6host input[type=radio] { min-height: 0; width: 20px; height: 20px; accent-color: var(--accent2); padding: 0; margin-top: 1px; }
.pd .r6host .check { font-size: 14px; gap: 10px; min-height: 32px; align-items: center; }
.pd .r6host .grid2, .pd .r6host .grid3 { gap: 14px 18px; }
.pd .r6host .stack { gap: 14px; }

/* buttons */
.pd .r6host .btn { min-height: 44px; height: auto; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font-weight: 650; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; }
.pd .r6host .btn:hover { background: var(--soft); }
.pd .r6host .btn.sm { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.pd .r6host .btn.primary, .pd .r6host .btn.ok { background: var(--navy); color: var(--onNavy, #fff); border-color: var(--navy); box-shadow: 0 2px 8px rgba(17, 26, 46, .22); }
.pd .r6host .btn.primary:hover, .pd .r6host .btn.ok:hover { filter: brightness(1.12); background: var(--navy); }
.pd .r6host .btn.danger { color: var(--late); border-color: var(--lateLine, #F3B4B4); background: var(--card); }
.pd .r6host .btn.ghost { border-color: transparent; background: transparent; }
.pd .r6host .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pd .r6host .btn:disabled { opacity: .5; cursor: default; }

/* tables = Round 6 order table */
.pd .r6host table.list { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.pd .r6host table.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink3); background: var(--soft); padding: 10px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.pd .r6host table.list th:first-child { border-left: 1px solid var(--line); border-top-left-radius: 10px; }
.pd .r6host table.list th:last-child { border-right: 1px solid var(--line); border-top-right-radius: 10px; }
.pd .r6host table.list td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pd .r6host table.list tr:last-child td { border-bottom: 0; }
.pd .r6host table.list tr[data-drv]:hover td, .pd .r6host table.list tr[data-day]:hover td { background: var(--soft); }
.pd .r6host .tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.pd .r6host .tag.out, .pd .r6host .tag.outbound { background: var(--outs); color: var(--outText); }
.pd .r6host .tag.in, .pd .r6host .tag.inbound { background: var(--pus); color: var(--puText); }
.pd .r6host .tag.trf, .pd .r6host .tag.transfer { background: var(--trs); color: var(--trText); }

/* stat tiles (History, This week) */
.pd .r6host .kpis, .pd .r6host .wk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 18px; }
.pd .r6host .kpi, .pd .r6host .wk-kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--cardShadow); }
.pd .r6host .kpi b, .pd .r6host .wk-kpis b { display: block; font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
.pd .r6host .kpi span, .pd .r6host .wk-kpis span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink3); font-weight: 550; }
.pd .r6host .wk-grid { gap: 22px; }
.pd .r6host .wk-hours div { background: var(--accent); opacity: .7; }
.pd .r6host .wk-hl { color: var(--ink3); }

/* History: search, quick ranges (as Round 6 chips) and the date row */
.pd .r6host .hsearch input { font-size: 14px; padding-left: 14px; }
.pd .r6host [data-preset] { min-height: 34px; height: 34px; padding: 0 13px; border-radius: 9px; font-size: 13px; font-weight: 550; color: var(--ink2); background: var(--card); border: 1px solid var(--line); }
.pd .r6host [data-preset]:hover { background: var(--soft); }
.pd .r6host details > summary { cursor: pointer; }

/* Settings: one vertical tab card on the left, the form card on the right (Round 6 #Settings) */
.pd .r6h-settings .r6h-body { grid-template-columns: 232px minmax(0, 1fr); gap: 20px; }
.pd .r6h-settings .tabs { margin: 0 !important; padding: 8px !important; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--cardShadow); overflow: visible; position: sticky; top: 12px; }
.pd .r6h-settings .tabs button { text-align: left; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: none; color: var(--ink2); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; position: relative; }
.pd .r6h-settings .tabs button:hover { background: var(--soft); }
.pd .r6h-settings .tabs button.on { background: var(--soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pd .r6h-settings .tabs button.on::before { content: ''; position: absolute; left: -9px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--accent); }
.pd .r6h-settings .tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pd .r6h-settings #setBody { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; box-shadow: var(--cardShadow); min-width: 0; }
@media (max-width: 900px) {
  .pd .r6h-settings .r6h-body { grid-template-columns: 1fr; }
  .pd .r6h-settings .tabs { position: static; flex-direction: row; overflow-x: auto; padding: 6px !important; }
  .pd .r6h-settings .tabs button { flex: none; white-space: nowrap; }
  .pd .r6h-settings .tabs button.on::before { left: 14px; right: 14px; top: auto; bottom: 4px; width: auto; height: 3px; }
  .pd .r6h-settings #setBody, .pd .r6h-history .r6h-body, .pd .r6h-week .r6h-body, .pd .r6h-handover .r6h-body, .pd .r6h-notes .r6h-body { padding: 16px; border-radius: 16px; }
  .pd .r6host .grid2, .pd .r6host .grid3 { grid-template-columns: 1fr; }
}

/* Hand over + Owners' notes */
.pd .r6host .ho-sec { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.pd .r6host .ho-sec .section-label { margin: 0 0 6px; }
.pd .r6host .ho-sec .count { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-size: 11.5px; }
.pd .r6host .note-card { background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--tr); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.pd .r6host .note-who { font-size: 12.5px; color: var(--ink3); font-weight: 650; }
.pd .r6host .empty { color: var(--ink3); padding: 18px 4px; font-size: 14px; }
.pd .r6host .note-paused { background: var(--waits); color: var(--wait); border: 1px solid var(--waitl); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }

/* The Map page (Round 6 #Map): the live map card, page-sized, with the drivers' list and the hospitals' search floating on it */
.pd .mappage { min-height: 0; }
.pd .mapbig { border-radius: 18px; overflow: hidden; }
.pd .mapbig > .ch .lnk { display: none; }
.pd .mapbig #mapc { height: calc(100vh - 190px) !important; min-height: 520px; margin: 0 14px 14px; }
.pd .mpdrivers, .pd .mphosp { position: absolute; z-index: 3; background: var(--glass); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--floatShadowCss, 0 10px 24px rgba(0,0,0,.16)); backdrop-filter: blur(6px); color: var(--ink); cursor: default; }
.pd .mpdrivers { left: 12px; top: 64px; width: 320px; max-height: calc(100% - 150px); overflow: auto; }
.pd .mphosp { right: 64px; top: 12px; width: 320px; max-height: calc(100% - 80px); overflow: auto; padding-bottom: 12px; }
.pd .mphd { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; font-size: 13px; }
.pd .mphd .ok { color: var(--ok); font-weight: 650; display: inline-flex; align-items: center; gap: 5px; }
.pd .mphd .sp { flex: 1; }
.pd .mpcount { background: var(--oks); color: var(--ok); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.pd .mpd { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; min-height: 56px; cursor: pointer; font: inherit; color: inherit; }
.pd .mpd:hover:not(:disabled) { background: var(--soft); }
.pd .mpd:disabled { opacity: .55; cursor: default; }
.pd .mpd:focus-visible, .pd .mpfound button:focus-visible, .pd .mpchips button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pd .mpd .av { width: 38px; height: 38px; border-radius: 50%; background: var(--avBg); color: var(--avText); display: grid; place-items: center; font-weight: 800; font-size: 13px; position: relative; flex: none; }
.pd .mpd .av .st { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--card); }
.pd .mpn { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.pd .mpn i { font-style: normal; color: var(--ink3); font-size: 12px; margin-left: 4px; }
.pd .mpn small, .pd .mpt small { font-size: 12.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd .mpt { text-align: right; display: flex; flex-direction: column; }
.pd .mpd.late .mpt small { color: var(--late); }
.pd .mphosp input { display: block; width: calc(100% - 28px); margin: 4px 14px 8px; min-height: 44px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 14px; }
.pd .mpsub { padding: 4px 14px 6px; font-size: 12px; color: var(--ink3); font-weight: 600; }
.pd .mpchips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px; }
.pd .mpchips button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pd .mpchips button.on { background: var(--navy); color: var(--onNavy, #fff); border-color: var(--navy); }
.pd .mpfound { padding: 0 6px 8px; }
.pd .mpfound button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 10px; min-height: 44px; cursor: pointer; font: inherit; color: inherit; }
.pd .mpfound button:hover { background: var(--soft); }
.pd .mpfound small { display: block; color: var(--ink3); font-size: 12px; }
.pd .mpempty { padding: 10px 14px 12px; color: var(--ink3); font-size: 13px; }
@media (max-width: 1100px) { .pd .mphosp { display: none; } }
@media (max-width: 760px) { .pd .mpdrivers, .pd .mphosp { display: none; } .pd .mapbig #mapc { height: calc(100vh - 240px) !important; } }

/* Pop-ups that are still the board's own windows (Add driver, edit order, confirmations …): the same fields, buttons and corners as the Round 6 windows */
.lg .modal { border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(23, 18, 14, .28); background: var(--card, #fff); color: var(--ink, inherit); }
.lg .modal header { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.lg .modal header h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.lg .modal .content { padding: 16px 22px 22px; }
.lg .modal header .x { width: 40px; height: 40px; border-radius: 12px; padding: 0; display: grid; place-items: center; }
.lg .modal input, .lg .modal select, .lg .modal textarea { min-height: 44px; border-radius: 12px; border: 1px solid var(--line2, var(--line)); padding: 10px 14px; background: var(--card, #fff); color: inherit; }
.lg .modal input:focus, .lg .modal select:focus, .lg .modal textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; box-shadow: none; }
.lg .modal input[type=checkbox], .lg .modal input[type=radio] { min-height: 0; width: 20px; height: 20px; accent-color: var(--accent2, var(--accent)); }
.lg .modal .btn { min-height: 44px; border-radius: 12px; font-weight: 650; }
.lg .modal .btn.sm { min-height: 36px; border-radius: 10px; }
.lg .modal .btn.primary { background: var(--accent2, var(--accent)); border-color: var(--accent2, var(--accent)); color: #fff; box-shadow: var(--btnShadow, none); }
.lg .modal .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lg .modal label.field { font-size: 13px; font-weight: 650; }
.lg .modal-back { background: var(--dim, rgba(23, 18, 14, .4)); }

/* small screens: nothing wider than the card, the date row and buttons wrap */
.pd .r6host, .pd .r6host *, .lg .modal input, .lg .modal select, .lg .modal textarea { box-sizing: border-box; }
.pd .r6host .r6h-body { min-width: 0; max-width: 100%; }
.pd .r6host .row { flex-wrap: wrap; }
.pd .r6host .hsearch, .pd .r6host .hsearch input { width: 100%; max-width: 100%; }
@media (max-width: 760px) {
  .pd .r6host .kpis, .pd .r6host .wk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd .r6host .kpi b, .pd .r6host .wk-kpis b { font-size: 22px; }
  .pd .r6host .btn { flex: 1 1 auto; }
  .pd .r6host .check { align-items: flex-start; }
}

/* Sign-in (Round 6): the dark SoCal map behind the words; the shift chips with their initial */
.lg .login-hero .login-map { position: absolute; inset: 0; opacity: .9; }
.lg .login-hero .login-map svg { width: 100%; height: 100%; display: block; }
.lg .login-hero .login-map::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 11, 9, .55) 0%, rgba(14, 11, 9, 0) 28%, rgba(14, 11, 9, 0) 55%, rgba(14, 11, 9, .85) 100%); }
.lg .login-hero-brand, .lg .login-hero-text { position: relative; z-index: 1; }
.lg .login .pchip span { display: inline-flex; align-items: center; cursor: pointer; }
.lg .login .pchip span::before { position: static; content: attr(data-i); display: grid; place-items: center; border-radius: 50%; font-weight: 800; flex: none; }
.lg .login .pchip input { position: absolute; opacity: 0; pointer-events: none; }
.lg .login .pchip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sign-in on a phone: the picture is a band above the form (it was squeezed into a 160 px column beside it) */
@media (max-width: 760px) {
  .lg .login-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: 230px auto; }
  .lg .login-hero { min-height: 0; padding: 22px 22px 18px; }
  .lg .login-hero-text h1 { font-size: 30px; line-height: 1.1; margin: 0 0 4px; }
  .lg .login-hero-text p { margin: 0; font-size: 14px; }
  .lg .login { width: 100%; max-width: 480px; margin: 0 auto; padding: 24px 22px 40px; align-self: start; }
  .lg .login .people { flex-wrap: wrap; }
}

/* Touch targets on a phone: 44 px at least (Kam, Nov 29: UI/UX pass) */
@media (max-width: 760px) {
  .pd .chip, .pd .tab { min-height: 44px; }
  .pd .mapseg button { min-height: 44px; padding-left: 12px; padding-right: 12px; }
  .pd .mapctl button { width: 44px; height: 44px; }
  .pd .btn.sm, .pd .r6host .btn.sm, .pd .r6host [data-preset] { min-height: 44px; height: auto; }
  .pd .btn.sm[aria-label], .pd .btn.sm[title] { min-width: 44px; }
  .pd .r6host .check { min-height: 44px; }
  .pd .r6host input[type=checkbox], .pd .r6host input[type=radio], .lg .modal input[type=checkbox], .lg .modal input[type=radio] { width: 24px; height: 24px; min-width: 24px; }
  .pd .mpd, .pd .mpfound button, .pd .mpchips button { min-height: 44px; }
}

/* contrast: the red "Blocked" / "sample" tag in the dark look (white on light red was 2.8:1) */
.pd.dark .tag.sample, html[data-theme='dark'] .tag.sample { color: #2A0B0B; }

/* History (Round 6): the table card, and "This week · pay" beside it */
.pd .r6h-history .hgrid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.pd .r6h-history .hmain { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--cardShadow); min-width: 0; }
.pd .r6h-history .hside-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--cardShadow); position: sticky; top: 12px; }
.pd .r6h-history .hside-head { display: flex; flex-direction: column; gap: 2px; }
.pd .r6h-history .hside-head h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.pd .r6h-history .hside-card .stack .btn { width: 100%; }
@media (max-width: 1100px) { .pd .r6h-history .hgrid { grid-template-columns: minmax(0, 1fr); } .pd .r6h-history .hside-card { position: static; } .pd .r6h-history .hside { order: -1; } }
@media (max-width: 760px) { .pd .r6h-history .hmain { padding: 16px; border-radius: 16px; } }

/* links that look like buttons inside windows: no underline (the Weekly payroll "Download for Excel") */
.lg .modal a.btn, .pd .r6host a.btn { text-decoration: none; }

/* Messages (Kam, Nov 30): the drivers' conversations */
.pd .msgpage { grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.pd .msgpage .ordcard { display: flex; flex-direction: column; min-height: 60vh; max-height: calc(100vh - 150px); }
.pd .msglist, .pd .msgbody { overflow-y: auto; flex: 1; }
.pd .msgrow { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; padding: 12px 18px; min-height: 64px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; cursor: pointer; }
.pd .msgrow:hover { background: var(--soft); }
.pd .msgrow.on { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); }
.pd .msgrow.unread .mpn b { font-weight: 800; }
.pd .msgrow .av { width: 40px; height: 40px; border-radius: 50%; background: var(--avBg); color: var(--avText); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.pd .msgrow:focus-visible, .pd .msgform textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pd .msgrow .mpn { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.pd .msgrow .mpn i { font-style: normal; color: var(--ink3); font-size: 12px; margin-left: 4px; }
.pd .msgrow .mpn small { color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.pd .msgrow .mpt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pd .msgrow .mpt small { color: var(--ink3); font-size: 12px; }
.pd .msgbody { padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; }
.pd .msgday { align-self: center; font-size: 12px; color: var(--ink3); font-weight: 650; padding: 6px 0; }
.pd .bub { max-width: 78%; padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.pd .bub small { display: block; margin-top: 3px; font-size: 11.5px; opacity: .7; }
.pd .bub.theirs { align-self: flex-start; background: var(--soft); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.pd .bub.mine { align-self: flex-end; background: var(--navy); color: var(--onNavy, #fff); border-bottom-right-radius: 5px; }
.pd .msgform { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.pd .msgform textarea { flex: 1; min-height: 46px; max-height: 140px; resize: vertical; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 14.5px; }
.pd .msgform .btn { min-height: 46px; }
.pd .msgerr { margin: 0 16px 12px; color: var(--late); font-size: 13px; }
@media (max-width: 900px) { .pd .msgpage { grid-template-columns: minmax(0, 1fr); } .pd .msgpage .ordcard { max-height: none; min-height: 0; } .pd .msglist { max-height: 38vh; } .pd .msgbody { min-height: 40vh; } }

/* Product pass (Kam, Nov 30): the workings stay out of sight while they work; one plain banner when orders stop coming in. */
#sideNav #waPill, #sideNav #appPill, #sideNav #aiPill { display: none !important; }
.sysbanner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 10px 20px 0; padding: 10px 14px; border: 1px solid var(--line2); border-left: 4px solid var(--late); border-radius: 12px; background: var(--card); color: var(--ink); }
.sysbanner .btn { height: 34px; }
.sysbanner .mut { color: var(--ink3); }

/* The first-time tour (Kam, Nov 30; public/js/tour.js): the part is outlined in white, the rest of the screen is darkened, one small card sits next to it. On a phone (or when the
   part is not on screen) the card is one sheet at the bottom. */
.tour{position:fixed;inset:0;z-index:3000}
.tour-hole{position:fixed;border-radius:10px;outline:3px solid #fff;box-shadow:0 0 0 9999px rgba(17,26,46,.58);pointer-events:none;transition:left .18s,top .18s,width .18s,height .18s}
.pd.dark .tour-hole{box-shadow:0 0 0 9999px rgba(0,0,0,.66)}
.tour-card{position:fixed;background:var(--card);color:var(--ink);border:1px solid var(--line2);border-radius:16px;padding:14px;box-shadow:0 14px 40px rgba(0,0,0,.35)}
.tour-card h4{margin:0 0 4px;font-size:15px;line-height:1.3}
.tour-card p{margin:0;font-size:13px;line-height:1.45;color:var(--ink2)}
.tour-tag{display:inline-block;margin-left:6px;font-size:10.5px;letter-spacing:.04em;text-transform:uppercase;font-weight:600;padding:1px 7px;border-radius:999px;background:var(--soft);color:var(--ink2);vertical-align:middle}
.tour-bar{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-top:12px;flex-wrap:wrap}
.tour-dots{display:flex;gap:5px}
.tour-dots i{width:7px;height:7px;border-radius:50%;background:var(--line2)}
.tour-dots i.on{background:var(--pu)}
.tour-btns{display:flex;gap:6px;align-items:center}
.tour-btns .btn{height:36px;padding:0 12px}
.tour-btns .ghost{border-color:transparent;background:transparent;color:var(--ink3)}
.tour.sheet{background:rgba(17,26,46,.58)}
.tour.sheet .tour-card{left:0 !important;right:0;top:auto !important;bottom:0;width:auto !important;border-radius:20px 20px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px))}
@media (prefers-reduced-motion:reduce){.tour-hole{transition:none}}

/* AI helper 1 (Kam, Dec 1): why the board suggests this driver – short words from the suggestion rules' own numbers */
.whys{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 0 24px}
.whys .why{font-size:11.5px;font-weight:600;padding:2px 9px;border-radius:999px;background:var(--soft);border:1px solid var(--line);color:var(--ink2);white-space:nowrap}
.sug .btn.ghost{border-color:transparent;background:transparent;color:var(--ink3)}
