/* Shop UpKeepr — UpKeepr family look: teal #0e8a9e, navy #0b1f33, light teal #5fd3e0,
   slate #5b6b7a, plus the Shop accent orange #e8762b. */
:root {
  --teal: #0e8a9e; --teal-d: #0a6f80; --teal-l: #5fd3e0; --navy: #0b1f33; --slate: #5b6b7a; --orange: #e8762b;
  --bg: #f3f6f8; --card: #fff; --line: #dde5ea; --text: #0b1f33; --muted: #5b6b7a;
  --ok: #1e9e5a; --warn: #c0582b; --err: #c23b3b;
  --radius: 12px; --shadow: 0 1px 2px rgba(11,31,51,.06), 0 4px 16px rgba(11,31,51,.05);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--teal-d); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }
code { font-size: .85em; background: #eef3f5; padding: 2px 5px; border-radius: 5px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.prewrap { white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--teal); color: #fff; border: 1px solid var(--teal);
  padding: 9px 16px; border-radius: 9px; font: 700 .92rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--teal-d); border-color: var(--teal-d); }
.btn-sm { padding: 5px 11px; font-size: .82rem; border-radius: 7px; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: #eef3f5; border-color: #cbd6dd; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-warn { background: var(--warn); border-color: var(--warn); }
.btn-warn:hover { background: #a54a22; border-color: #a54a22; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--teal-d); font: inherit; cursor: pointer; }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; }
input, select, textarea { font: 500 .95rem var(--font); color: var(--text); border: 1px solid #c9d5dc; border-radius: 8px; padding: 9px 11px; background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-l); outline-offset: 0; border-color: var(--teal); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--teal); margin: 0; flex: none; }
input[type=color] { width: 44px; height: 38px; padding: 3px; flex: none; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; }
legend { font-weight: 700; font-size: .88rem; padding: 0 4px; }
.stack { display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: 1 / -1; }
.grid2 > h2, .grid2 > h3 { margin: 6px 0 -4px; }
.sub { background: #f7fafb; border: 1px dashed #cfdce3; border-radius: 10px; padding: 12px; }
.hp { position: absolute; left: -9999px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input:not([type=checkbox]):not([type=color]) { flex: 1 1 160px; width: auto; }
.inline-form select { flex: 0 1 220px; width: auto; }
.add-row { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.w-sort { max-width: 80px; flex: 0 0 80px !important; }
.w-qty { max-width: 90px; } .w-price { max-width: 120px; }

/* ---------- Flash & pills ---------- */
.flash { padding: 11px 14px; border-radius: 10px; margin: 0 0 16px; font-weight: 600; background: #e7f5f8; color: #0a5561; border: 1px solid #bfe3ea; }
.flash-success { background: #e6f6ee; color: #14683d; border-color: #bfe6d0; }
.flash-error { background: #fdecec; color: #8f2424; border-color: #f3c6c6; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #eef2f4; color: var(--slate); }
.pill-ok { background: #e3f5eb; color: #16774a; }
.btn-danger { background: #c62828; border-color: #c62828; color: #fff; } .btn-danger:hover { background: #a61f1f; border-color: #a61f1f; }
.card-danger { border: 1px solid #f1c4c4; border-top: 3px solid #c62828; }
.pri-high { background: #fff1e3; color: #b35a10; } .pri-rush { background: #fde6e6; color: #b32626; } .pri-low { background: #eef2f4; color: var(--slate); }

/* ---------- App shell ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; display: flex; align-items: center; }
.wordmark { display: inline-flex; align-items: center; line-height: 0; }
.wordmark .logo { height: 40px; width: auto; max-width: 100%; display: block; }
.wordmark .logo-dark { display: none; }
.w-shop { color: var(--orange); } .w-up { color: var(--navy); } .w-keepr { color: var(--teal); }
.topbar-mid { flex: 1; display: flex; justify-content: center; align-items: center; gap: 10px; min-width: 0; }
.switcher select { font-weight: 700; min-width: 240px; max-width: 360px; background: #f3f8fa; border-color: #bfdfe6; }
.shop-name { font-weight: 700; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.usermenu summary::-webkit-details-marker, .menu-toggle summary::-webkit-details-marker { display: none; }
.usermenu-pop { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; min-width: 220px; display: grid; gap: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 800; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: .62rem; background: var(--teal); }
.menu-toggle { display: none; }
.menu-toggle summary { list-style: none; width: 38px; height: 38px; display: grid; align-content: center; gap: 5px; cursor: pointer; padding: 0 8px; }
.menu-toggle summary span { height: 2px; background: var(--navy); border-radius: 2px; }
.viewas { background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 7px 14px; font-weight: 600; flex-wrap: wrap; }
.viewas form { margin: 0; }
.shell { display: flex; min-height: calc(100vh - 60px - 56px); }
.sidebar { width: 236px; flex: none; background: var(--navy); padding: 16px 10px; }
.sidebar nav, .mobile-nav { display: grid; gap: 2px; }
.sidebar a, .mobile-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #c9d6e0; text-decoration: none; font-weight: 600; }
.sidebar a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar a.active { background: var(--teal); color: #fff; }
.ico { width: 19px; height: 19px; fill: currentColor; flex: none; }
.nav-label { color: #7f93a6; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px 4px; }
.main { flex: 1; min-width: 0; padding: 24px 28px 40px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-actions form { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; min-width: 0; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary h2 { display: inline; margin: 0; }
details.card > summary::before { content: '▸ '; color: var(--teal); }
details.card[open] > summary::before { content: '▾ '; }
details.card[open] > summary { margin-bottom: 14px; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2col > .card { margin-bottom: 0; }
.grid-2col + .card { margin-top: 18px; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px !important; }
.empty-sm { margin: 4px 0; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 18px 28px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); background: #fff; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--muted); }

/* ---------- Tables (turn into cards on phones) ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid #edf1f4; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table td.form-row { padding: 8px 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f7fafb; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.truncate { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); display: grid; }
.tile:hover { border-color: var(--c); }
.tile-n { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.tile-l { color: var(--muted); font-weight: 700; font-size: .85rem; }
.wo-list, .activity, .veh-list, .timeline { list-style: none; margin: 0; padding: 0; }
.wo-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1f4; flex-wrap: wrap; }
.wo-list li:last-child { border-bottom: 0; }
.wo-list a { text-decoration: none; color: var(--text); }
.wo-meta { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--c); flex: none; }
.activity li { padding: 7px 0; border-bottom: 1px solid #edf1f4; }
.activity li:last-child { border-bottom: 0; }
.promise { font-size: .8rem; color: var(--slate); font-weight: 600; white-space: nowrap; }
.promise.late { color: var(--err); font-weight: 800; }

/* ---------- Workflow board ---------- */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 280px; width: auto; }
.filters select { width: auto; }
.board { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; align-items: start; }
.col { background: #e9eff2; border-radius: var(--radius); border-top: 4px solid var(--c); max-height: calc(100vh - 210px); display: flex; flex-direction: column; min-width: 0; }
.col.drop-target { background: #dcecf0; outline: 2px dashed var(--teal); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.col-h h2 { font-size: .95rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-h .count { background: #fff; border-radius: 99px; padding: 1px 9px; font-weight: 800; font-size: .8rem; color: var(--slate); }
.col-body { padding: 4px 10px 12px; overflow-y: auto; display: grid; gap: 10px; min-height: 60px; }
.col-empty { color: #8a9aa6; text-align: center; font-size: .85rem; margin: 10px 0; }
.wo-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; box-shadow: 0 1px 2px rgba(11,31,51,.06); }
.wo-card.movable { cursor: grab; }
.wo-card.dragging { opacity: .45; }
.wo-card-link { display: grid; gap: 2px; text-decoration: none; color: var(--text); }
.wo-card-link .pill { justify-self: start; }
.wo-num { font-weight: 800; color: var(--teal-d); font-size: .85rem; }
.wo-veh { font-weight: 800; }
.wo-cust { color: var(--slate); font-size: .88rem; }
.wo-concern { color: var(--muted); font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wo-foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 8px; font-size: .8rem; flex-wrap: wrap; }
.assignee { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.move-form { margin-top: 8px; }
.move-form select { font-size: .8rem; padding: 5px 8px; }
@media (hover: hover) and (pointer: fine) { .has-js .move-form { display: none; } }

/* many stages: tighter cards so every column fits */
.board.dense { gap: 6px; }
.board.dense .col-h { padding: 10px 8px 6px; gap: 6px; }
.board.dense .col-h h2 { font-size: .8rem; }
.board.dense .col-body { padding: 2px 6px 10px; gap: 6px; }
.board.dense .wo-card { padding: 8px; font-size: .85rem; }
.board.dense .wo-concern { display: none; }
.board.dense .wo-foot { font-size: .72rem; }
.board.dense .assignee .avatar { display: none; }
.wo-card, .wo-card-link span { min-width: 0; }
.wo-veh, .wo-cust { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Work order ---------- */
.stage-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .82rem; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); white-space: nowrap; }
.stage-chip.lg { font-size: .95rem; padding: 6px 14px; }
.wo-top { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.wo-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; flex: 1; min-width: 0; }
.label { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.big { font-size: 1.1rem; font-weight: 800; }
.stage-move { min-width: 220px; }
.kind { font-size: .72rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: #e7f3f6; color: var(--teal-d); }
.kind-part { background: #fff1e6; color: #a8561a; } .kind-fee { background: #eef0f6; color: #4c5a86; }
.totals { margin: 14px 0 0 auto; max-width: 320px; display: grid; gap: 4px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { border-top: 2px solid var(--navy); padding-top: 6px; margin-top: 4px; font-size: 1.1rem; }
.add-item { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.add-item select { width: auto; } .add-item .grow { flex: 1 1 220px; width: auto; }
.note-form { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.timeline li { padding: 10px 0 10px 16px; border-left: 3px solid var(--line); margin-left: 4px; }
.timeline li.ev-note { border-left-color: var(--teal); }
.timeline li.ev-stage { border-left-color: var(--orange); }
.timeline p { margin: 0; }
.veh-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf1f4; flex-wrap: wrap; }
.add-veh { margin-top: 12px; }
.add-veh summary { cursor: pointer; font-weight: 700; color: var(--teal-d); margin-bottom: 10px; }

/* ---------- Roles matrix ---------- */
.matrix-wrap { overflow-x: auto; }
.matrix th.rot { text-align: center; font-size: .7rem; vertical-align: bottom; min-width: 78px; }
.matrix td.c { text-align: center; }
.matrix td.c input { display: inline-block; }
.matrix tr.group td { background: #f3f8fa; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-d); }
/* Wide screens (1200px+): role names stay pinned under the top bar while scrolling the permissions (no sideways scroll box there,
   which would stop sticky). Tablets keep the scroll box; phones show each permission as a card. */
@media (min-width: 1200px) {
  .matrix-wrap { overflow: visible; }
  .matrix thead th { position: sticky; top: 60px; z-index: 5; background: var(--card); box-shadow: 0 1px 0 var(--line); }
}
.upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-row input { width: auto; flex: 1 1 240px; }

/* ---------- Public pages ---------- */
.pub-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.pub-top nav { display: flex; gap: 18px; align-items: center; }
.pub-top nav a:not(.btn) { color: var(--navy); font-weight: 600; text-decoration: none; }
.pub-top .btn { padding: 9px 18px; font-size: .95rem; font-weight: 700; border-radius: 10px; }
.public > .flash { max-width: 1100px; margin: 16px auto 0; }
.auth-card { max-width: 420px; margin: 48px auto; }
.auth-card h1 { font-size: 1.4rem; }
.narrow { max-width: 560px; margin: 40px auto; padding: 0 16px; }
.pw-rules { margin: -6px 0 0; padding-left: 20px; font-size: .84rem; color: var(--muted); }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::marker { content: '✓  '; }
.legal { max-width: 800px; margin: 32px auto; }
.legal h2 { margin-top: 1.4em; }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .sidebar { display: none; }
  .menu-toggle { display: block; position: relative; }
  .mobile-nav { position: absolute; top: 46px; left: -8px; width: 270px; background: var(--navy); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); max-height: calc(100vh - 80px); overflow-y: auto; }
  .mobile-nav a.active { background: var(--teal); color: #fff; }
  .main { padding: 18px 16px 32px; }
  .board, .board.dense { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .col { max-height: none; }
}

/* ---------- Phone: no sideways scrolling; tables become cards ---------- */
@media (max-width: 700px) {
  body { font-size: 15px; }
  .topbar { padding: 0 10px; gap: 8px; }
  .brand { min-width: 0; flex: 0 1 auto; } .wordmark .logo { height: 26px; }
  .uname { display: none; }
  .switcher select { min-width: 0; max-width: 100%; font-size: .85rem; padding: 7px 8px; }
  .topbar-mid { justify-content: flex-end; }
  .grid2, .grid4, .grid-2col { grid-template-columns: 1fr; }
  .span2, .span3, .span4 { grid-column: auto; }
  .card { padding: 16px; }
  h1 { font-size: 1.35rem; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 12px; background: #fff; }
  .table td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td[data-label]::before { content: attr(data-label); font-weight: 700; color: var(--muted); font-size: .8rem; text-align: left; flex: none; }
  .table td.row-actions, .table td.empty, .table td.form-row { display: flex; justify-content: flex-start; text-align: left; }
  .table td.empty { justify-content: center; }
  .table .r { text-align: right; }
  .truncate { max-width: 60vw; }
  .matrix tr.group { border: 0; background: none; padding: 0; margin: 14px 0 6px; }
  .matrix tr.group td { display: block; text-align: left; background: none; padding: 0; }
  .matrix td.perm-label { font-weight: 800; text-align: left; }
  .board, .board.dense { grid-template-columns: 1fr; }
  .col { max-height: none; }
  .note-form { flex-direction: column; align-items: stretch; }
  .inline-form select { flex: 1 1 100%; }
  .pub-top { padding: 12px 16px; } .pub-top nav { gap: 12px; } .pub-top nav a:not(.btn), .pub-top .pub-demo { display: none; }
  .auth-card { margin: 24px 16px; }
  .site-footer { padding: 16px; }
  .wo-top { flex-direction: column; }
}

/* ---------- Calendar ---------- */
.h-link { font-weight: 700; margin-left: 8px; text-decoration: none; }
.cal-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.cal-nav h2 { margin: 0 0 0 8px; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-views { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.cal-views a { padding: 6px 14px; font-weight: 700; font-size: .85rem; color: var(--navy); text-decoration: none; }
.cal-views a + a { border-left: 1px solid var(--line); }
.cal-views a.on { background: var(--teal); color: #fff; }
.cal-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-filters select { width: auto; }
.cal-card { padding: 0; overflow: hidden; }
.cal-phone { display: none; }
.cal-grid { --gut: 64px; overflow-x: auto; }
.cal-head, .cal-body { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(120px, 1fr)); }
.cal-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.cal-colhead { padding: 10px 8px; text-align: center; font-weight: 800; font-size: .88rem; border-left: 1px solid #edf1f4; display: grid; }
.cal-colhead a { color: var(--navy); text-decoration: none; }
.cal-colhead span { font-weight: 600; font-size: .78rem; color: var(--muted); }
.cal-colhead.today { color: var(--teal-d); background: #eef8fa; }
.cal-colhead.today a { color: var(--teal-d); }
.cal-body .cal-gutter { border-right: 1px solid var(--line); }
.cal-hour { position: relative; border-bottom: 1px solid #edf1f4; }
.cal-hour span { position: absolute; top: -8px; right: 8px; font-size: .72rem; color: var(--muted); font-weight: 600; background: #fff; padding: 0 2px; }
.cal-hour:first-child span { top: 2px; }
.cal-col { position: relative; border-left: 1px solid #edf1f4;
  background-image: repeating-linear-gradient(to bottom, #edf1f4 0, #edf1f4 1px, transparent 1px, transparent 30px, #f5f8fa 30px, #f5f8fa 31px, transparent 31px, transparent 60px); }
.cal-col.today { background-color: #fbfeff; }
.cal-slot { position: absolute; left: 0; right: 0; z-index: 1; }
.cal-slot:hover { background: rgba(14,138,158,.08); }
.cal-slot:hover::after { content: '+ Book'; position: absolute; left: 6px; top: 6px; font-size: .72rem; font-weight: 800; color: var(--teal-d); }
.cal-ev { position: absolute; z-index: 2; border-radius: 7px; padding: 4px 7px; font-size: .75rem; line-height: 1.25; overflow: hidden; text-decoration: none;
  color: var(--navy); background: #e3f4f7; border-left: 4px solid var(--teal); box-shadow: 0 1px 2px rgba(11,31,51,.12); display: flex; flex-direction: column; }
.cal-ev:hover { z-index: 4; box-shadow: 0 4px 12px rgba(11,31,51,.2); }
.ev-time { font-weight: 800; font-size: .7rem; }
.ev-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sub { color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--err); z-index: 3; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
/* status colors */
.st-scheduled { --sc: var(--teal); }
.st-confirmed { --sc: var(--ok); }
.st-checked_in { --sc: #7a8a99; }
.st-no_show { --sc: var(--err); }
.st-cancelled { --sc: #9aa7b2; }
.cal-ev.st-confirmed, .ag-item.st-confirmed, .cm-ev.st-confirmed { background: #e4f5ec; }
.cal-ev.st-checked_in, .ag-item.st-checked_in, .cm-ev.st-checked_in { background: #eef1f4; color: #55636f; }
.cal-ev.st-no_show, .ag-item.st-no_show, .cm-ev.st-no_show { background: #fdecec; text-decoration: line-through; }
.cal-ev { border-left-color: var(--sc); }
.st-pill { background: color-mix(in srgb, var(--sc) 14%, #fff); color: color-mix(in srgb, var(--sc) 75%, #000); }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .lg::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--sc); }
/* month */
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cm-head { padding: 8px; font-size: .75rem; font-weight: 800; text-transform: uppercase; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.cm-day { min-height: 110px; border-right: 1px solid #edf1f4; border-bottom: 1px solid #edf1f4; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.cm-day:nth-child(7n+7) { border-right: 0; }
.cm-day.other { background: #f8fafb; }
.cm-day.other .cm-num { color: #a3b0ba; }
.cm-num { font-weight: 800; font-size: .85rem; color: var(--navy); text-decoration: none; align-self: flex-start; padding: 1px 6px; border-radius: 99px; }
.cm-day.today .cm-num { background: var(--teal); color: #fff; }
.cm-ev { font-size: .72rem; font-weight: 700; text-decoration: none; color: var(--navy); background: #e3f4f7; border-left: 3px solid var(--sc); border-radius: 4px; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-more { font-size: .72rem; font-weight: 800; color: var(--teal-d); text-decoration: none; }
.cm-add { position: absolute; right: 6px; top: 4px; color: #b6c3cc; text-decoration: none; font-weight: 800; opacity: 0; }
.cm-day:hover .cm-add { opacity: 1; }
/* agenda (phones) */
.cal-agenda section { padding: 12px 16px; border-bottom: 1px solid #edf1f4; }
.cal-agenda h3 { margin: 0 0 8px; font-size: .95rem; }
.cal-agenda h3 a { color: var(--navy); text-decoration: none; }
.cal-agenda ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ag-item { display: grid; gap: 1px; padding: 8px 10px; border-radius: 8px; background: #e3f4f7; border-left: 4px solid var(--sc); text-decoration: none; color: var(--navy); font-size: .88rem; }
.ag-item span:last-child { color: var(--slate); font-size: .8rem; }
.appt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.appt-actions form { margin: 0; }
.grid2.nested { gap: 10px; }

@media (max-width: 900px) {
  .cal-desktop { display: none; }
  .cal-phone { display: block; }
}
@media (max-width: 700px) {
  .cal-month { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cm-day { min-height: 64px; padding: 3px; }
  .cm-ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; background: var(--sc); border-radius: 3px; }
  .cm-more { font-size: .62rem; }
  .cm-head { font-size: .62rem; padding: 6px 2px; }
  .cal-nav h2 { font-size: 1rem; flex-basis: 100%; margin: 6px 0 0; order: 5; }
  .cal-nav { flex-wrap: wrap; }
  .topbar-mid { gap: 6px; }
  .grid2.nested { grid-template-columns: 1fr 1fr; }
}

/* ---------- Wallboard setup pages ---------- */
.wb-listcard .wb-lc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.wb-listcard h2 { margin-bottom: 2px; }
.wb-link { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.wb-link label { flex: 1; min-width: 0; }
.wb-link input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; background: #f7fafb; }
.wb-panels { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wb-panels li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.wb-panels .wb-move { display: flex; gap: 4px; }
.wb-panels .wb-sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding-left: 28px; }
.wb-panels .wb-sub input:not([type=checkbox]) { flex: 1; }
@media (max-width: 700px) { .wb-panels .wb-sub { padding-left: 0; } .wb-link { flex-direction: column; align-items: stretch; } }
/* board: wrap long names instead of cutting them off */
.col-h h2 { white-space: normal; overflow: visible; line-height: 1.2; }
.wo-veh { white-space: normal; overflow: visible; }
.board.dense .promise { white-space: normal; }

/* ---------- Parts & inventory ---------- */
.stock-low { color: #b35a10; font-weight: 800; }
.stock-out { color: var(--err); font-weight: 800; }
.stock-in { color: var(--ok); font-weight: 800; }
.stock-pill { background: #eef3fb; color: #3b5a8c; text-decoration: none; font-size: .7rem; }
tr.inactive td { opacity: .55; }
.part-pick { flex: 1 1 260px; width: auto; }
.inv-total { margin: 12px 0 0; text-align: right; }
.stock-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.stock-form label { flex: 0 1 220px; }
.stock-form label.grow { flex: 1 1 240px; }
.low-card { border-left: 4px solid #e8a23b; }
@media print {
  .sidebar, .topbar, .site-footer, .page-actions, .no-print, .flash, .viewas { display: none !important; }
  .main { padding: 0; } .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  body { background: #fff; }
}

/* ---------- Workflow stages editor ---------- */
.stage-head, .stage-row { display: grid; grid-template-columns: 84px 52px minmax(0, 1fr) 84px 72px; gap: 10px; align-items: center; }
.stage-head { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 10px 6px; }
.stage-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.stage-row { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.stage-row.hidden-stage { opacity: .6; }
.stage-row input[type=color] { width: 44px; }
.stage-row .check .lbl { display: none; }
.wb-move { display: flex; gap: 4px; }
@media (max-width: 700px) {
  .stage-head { display: none; }
  .stage-row { grid-template-columns: auto 44px minmax(0, 1fr); }
  .stage-row .check { grid-column: auto; }
  .stage-row .check .lbl { display: inline; }
  .stage-row label.check:first-of-type { grid-column: 1 / 3; }
}

/* ---------- Notifications bell & nav badges ---------- */
.nav-badge { margin-left: auto; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; }
.nav-badge[hidden] { display: none; }
.bell { position: relative; }
.bell summary { list-style: none; cursor: pointer; position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); }
.bell summary::-webkit-details-marker { display: none; }
.bell summary:hover { background: #eef2f4; }
.bell summary .ico { width: 22px; height: 22px; }
.bell summary .nav-badge { position: absolute; top: -3px; right: -7px; margin: 0; min-width: 18px; height: 18px; font-size: .66rem; padding: 0 4px; border: 2px solid #fff; box-sizing: content-box; }
.bell-pop { position: absolute; right: -8px; top: 46px; width: min(360px, calc(100vw - 20px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; z-index: 40; }
.bell-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.bell-head form { margin: 0; }
.bell-all { display: block; text-align: center; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); font-weight: 700; font-size: .9rem; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list.compact { max-height: 60vh; overflow-y: auto; }
.notif-list li a { display: flex; gap: 10px; padding: 10px 8px; border-radius: 9px; color: var(--text); text-decoration: none; }
.notif-list li a:hover { background: #f3f6f8; }
.notif-list li.unread a { background: #eaf6f8; }
.notif-list li + li { margin-top: 2px; }
.n-ico { font-size: 1.1rem; line-height: 1.4; flex: none; }
.n-txt { display: grid; gap: 1px; min-width: 0; }
.n-body { color: var(--slate); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.notif-settings .check { align-items: flex-start; }
.pill-new { background: var(--orange); color: #fff; }
.wo-convs { margin: 0 0 12px; padding-left: 18px; }
.note-hint { margin: -6px 0 12px; }

/* ---------- Messages ---------- */
.msg-shell { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; height: calc(100vh - 60px - 120px); min-height: 460px; }
.inbox, .thread-pane { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.inbox-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.inbox-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.inbox-list a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.inbox-list a:hover { background: #f3f6f8; }
.inbox-list a.on { background: #eaf6f8; }
.inbox-list .avatar { background: var(--teal); }
.inbox-txt { flex: 1; min-width: 0; display: grid; }
.inbox-top { display: flex; justify-content: space-between; gap: 8px; }
.inbox-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-top .small { flex: none; }
.inbox-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-list a.unread .inbox-last { color: var(--text); font-weight: 700; }
.inbox-list .count { background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; flex: none; }
.inbox-empty { padding: 16px; }
.empty-pane { align-items: center; justify-content: center; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.thread-title { flex: 1; min-width: 0; }
.thread-title > b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-title .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-link { display: none; font-size: 1.4rem; text-decoration: none; font-weight: 800; padding: 0 6px; }
.thread-menu { position: relative; }
.thread-menu summary { list-style: none; }
.thread-menu summary::-webkit-details-marker { display: none; }
.thread-menu-pop { position: absolute; right: 0; top: 40px; z-index: 20; width: min(280px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 12px; }
.thread-menu-pop form { display: grid; gap: 8px; margin: 0; }
.people-pick { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; }
.new-msg .people-pick { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: none; }
.new-msg { display: grid; gap: 14px; max-width: 760px; }
.thread { list-style: none; margin: 0; padding: 14px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(78%, 560px); align-self: flex-start; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg-from { font-size: .78rem; font-weight: 700; color: var(--slate); margin: 0 0 2px 4px; }
.bubble { display: inline-block; text-align: left; background: #eef2f4; padding: 9px 13px; border-radius: 16px 16px 16px 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--teal); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg-time { font-size: .7rem; color: var(--muted); margin: 2px 6px 0; }
.msg-sys { align-self: center; font-size: .78rem; color: var(--muted); background: #f3f6f8; padding: 3px 10px; border-radius: 99px; text-align: center; }
.send-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.send-form textarea { resize: none; max-height: 160px; }
.send-off { padding: 12px 14px; margin: 0; border-top: 1px solid var(--line); }
@media (max-width: 1000px) {
  .msg-shell { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .msg-shell { grid-template-columns: 1fr; height: calc(100vh - 60px - 96px); min-height: 380px; }
  .msg-shell:not(.list-only) .inbox { display: none; }
  .msg-shell.list-only .thread-pane { display: none; }
  .back-link { display: block; }
  .msg { max-width: 88%; }
  .bell summary { width: 34px; height: 34px; }
}
.break { overflow-wrap: anywhere; }

/* ---------- Reports & summary tiles ---------- */
.report-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.report-filters label { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--muted); min-width: 0; }
.report-filters select, .report-filters input { width: auto; max-width: 100%; }
.report-range { margin: -6px 0 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.kpi-val { font-size: 1.55rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.kpi-lbl { font-weight: 700; color: var(--slate); font-size: .88rem; }
.kpi-sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.small-kpis { margin: 0; } .small-kpis .kpi { box-shadow: none; background: #f7f9fa; } .small-kpis .kpi-val { font-size: 1.25rem; }
.cust-kpis .kpi-val { font-size: 1.25rem; }
.vbars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; align-items: end; height: 220px; padding-top: 18px; }
.vbar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; min-width: 0; text-align: center; }
.vbar-val { font-size: .68rem; font-weight: 700; color: var(--slate); white-space: nowrap; overflow: hidden; }
.vbar-fill { align-self: end; background: var(--teal); border-radius: 5px 5px 0 0; min-height: 2px; width: 100%; }
.vbar:hover .vbar-fill { background: var(--teal-d); }
.vbar-lbl { font-size: .7rem; color: var(--muted); padding-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar { display: block; height: 10px; background: #eef2f4; border-radius: 99px; overflow: hidden; min-width: 60px; }
.hbar span { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.bar-cell { width: 40%; } .bar-head { width: 40%; }
.mix-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin-bottom: 10px; background: #eef2f4; }
.table.compact td, .table.compact th { padding-top: 7px; padding-bottom: 7px; }
@media (max-width: 700px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 10px 12px; } .kpi-val { font-size: 1.2rem; }
  .vbars { gap: 3px; height: 180px; }
  .vbar-val { visibility: hidden; font-size: 0; }
  .vbars[style*="--n:1"] .vbar-lbl, .vbar-lbl { font-size: .6rem; }
  .table.compact { display: table; font-size: .85rem; }
  .table.compact thead { display: table-header-group; } .table.compact tbody { display: table-row-group; }
  .table.compact tr { display: table-row; border: 0; padding: 0; margin: 0; background: none; }
  .table.compact td, .table.compact th { display: table-cell; padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--line); }
  .table.compact td.r, .table.compact th.r { text-align: right; }
  .table.compact td[data-label]::before { content: none; }
  .table.compact th { font-size: .66rem; }
  .table.compact .bar-cell, .table.compact .bar-head { display: none; }
  .table.compact .stage-chip { white-space: normal; font-size: .72rem; }
  .report-filters label { flex: 1 1 40%; } .report-filters select, .report-filters input { width: 100%; }
}
.grid-2col + .grid-2col { margin-top: 18px; }
@media (max-width: 700px) { .now-extra { display: none; } }

/* ---------- Invoices ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 7px 14px; border-radius: 99px; text-decoration: none; font-weight: 700; color: var(--slate); background: #fff; border: 1px solid var(--line); }
.tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.inv-open { background: #e6f4f7; color: var(--teal-d); } .inv-partial { background: #fff1e3; color: #b35a10; }
.inv-overdue { background: #fde6e6; color: #b32626; } .inv-paid { background: #e3f5eb; color: #16774a; } .inv-void { background: #eef2f4; color: var(--slate); text-decoration: line-through; }
.qbo-badge { display: inline-block; font-size: .66rem; font-weight: 800; padding: 1px 6px; border-radius: 5px; vertical-align: middle; }
.qbo-badge.ok { background: #e3f5eb; color: #16774a; } .qbo-badge.pending { background: #eef2f4; color: var(--slate); } .qbo-badge.err { background: #fde6e6; color: #b32626; }
.err-text { color: var(--err); } .warn-text { color: var(--warn); }
.inv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.inv-side .card h2 { font-size: 1rem; }
.inv-side form { margin: 0 0 8px; }
.copy-row { display: flex; gap: 6px; margin-top: 4px; }
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pay-list li { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pay-list li.voided { opacity: .55; } .pay-list li.voided b { text-decoration: line-through; }
.invoice-doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.inv-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 3px solid var(--teal); padding-bottom: 16px; margin-bottom: 18px; }
.inv-shop { font-size: 1.4rem; font-weight: 800; }
.inv-meta { text-align: right; } .inv-title { font-size: 1.3rem; font-weight: 800; color: var(--teal-d); }
.inv-parties { display: flex; gap: 48px; flex-wrap: wrap; margin-bottom: 18px; }
.inv-parties .label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.inv-totals .paid-line { color: var(--ok); }
.inv-paid, .inv-void { font-size: 1.3rem; font-weight: 800; text-align: right; margin: 18px 0 0; }
.inv-paid { color: var(--ok); } .inv-void { color: var(--err); letter-spacing: .2em; }
.inv-notes { margin-top: 18px; } .inv-footer { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.inv-public { max-width: 860px; margin: 24px auto 40px; padding: 0 16px; }
.inv-public-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 1.05rem; }
.qbo-connect { background: #2ca01c; border-color: #2ca01c; } .qbo-connect:hover { background: #248616; border-color: #248616; }
@media (max-width: 1000px) { .inv-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .invoice-doc { padding: 18px; }
  .inv-meta { text-align: left; }
  .inv-parties { gap: 16px; }
  .totals { max-width: none; }
}
@media print {
  .invoice-doc { border: 0; box-shadow: none; padding: 0; }
  .inv-layout { display: block; } .page-head h1 { display: none; }
  .invoice-public .pub-top, .inv-public-bar { display: none !important; }
  .inv-public { margin: 0; max-width: none; }
}

/* ---------- Collapsible settings sections & pick lists ---------- */
details.fold > summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
details.fold > summary::before { flex: none; }
details.fold > summary .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
details.fold[open] > summary .muted { display: none; }
details.fold > summary::-webkit-details-marker { display: none; }
.list-head, .list-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 110px 72px; gap: 10px; align-items: center; }
.list-head { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 10px 6px; }
.list-head .r, .list-row .r { text-align: right; } .list-head .c, .list-row .c { justify-self: center; }
.list-row { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.list-row .check .lbl { display: none; }
.sort-btns { display: flex; gap: 4px; }
@media (max-width: 700px) {
  .list-head { display: none; }
  .list-row { grid-template-columns: auto minmax(0, 1fr); }
  .list-row .r { grid-column: 2; text-align: left; } .list-row .r::after { content: ' parts'; }
  .list-row .c { grid-column: 2; justify-self: start; } .list-row .check .lbl { display: inline; }
}
@media (max-width: 700px) { .table tr.edit-line td.form-row { display: block; } .table tr.edit-line .add-item { margin-bottom: 6px; } }

/* ---------- Searchable dropdown (select[data-searchable]) ---------- */
.combo { position: relative; }
.combo-input { padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235b6b7a'%3E%3Cpath d='M15.5 14h-.8l-.3-.3A6.5 6.5 0 1 0 9.5 16a6.5 6.5 0 0 0 4.2-1.6l.3.3v.8l5 5 1.5-1.5zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z'/%3E%3C/svg%3E") no-repeat right 9px center / 18px; }
.combo-list { position: absolute; z-index: 25; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; }
.combo-list li { font-weight: 500; color: var(--text); padding: 8px 10px; border-radius: 7px; cursor: pointer; overflow-wrap: anywhere; }
.combo-list li.on, .combo-list li:hover { background: #eaf6f8; }
.combo-list li[aria-selected=true] { font-weight: 700; }
.combo-list li.combo-special { color: var(--teal-d); font-weight: 700; border-bottom: 1px solid var(--line); border-radius: 7px 7px 0 0; }
.combo-list li.combo-empty { color: var(--muted); cursor: default; font-size: .88rem; }
.combo-list li.combo-empty:hover { background: none; }
.combo-input { font-weight: 500; }
.code-input { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-weight: 700; }

/* ---------- Marketing & inbox ---------- */
.pill-warn { background: #fff4e0; color: #9a5b00; } .pill-bad { background: #fde6e6; color: #b32626; }
.mk-filters .grid2 { margin-bottom: 12px; }
.mk-filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-camp > div { min-width: 0; }
.mk-camp .card { margin-bottom: 18px; }
.mk-preview { width: 100%; height: 460px; border: 1px solid var(--line); border-radius: 10px; background: #f3f6f8; margin-bottom: 10px; }
.merge-fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-btn { font: inherit; font-size: .8rem; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); background: #f7f9fa; color: var(--navy); cursor: pointer; }
.chip-btn:hover { border-color: var(--teal); color: var(--teal); }
.mk-inbox { padding: 6px 0; }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list li + li { border-top: 1px solid #edf1f4; }
.mail-list a { display: grid; grid-template-columns: 220px 1fr auto; grid-template-areas: "who subj when" "who snip when"; gap: 2px 14px; padding: 11px 18px; text-decoration: none; color: inherit; }
.mail-list a:hover { background: #f7f9fa; }
.ml-who { grid-area: who; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-subj { grid-area: subj; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-snip { grid-area: snip; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-when { grid-area: when; white-space: nowrap; }
.mail-list li.unread .ml-who, .mail-list li.unread .ml-subj { font-weight: 800; }
.mail-list li.unread a { box-shadow: inset 3px 0 0 var(--teal); }
.mail-thread { display: grid; gap: 12px; margin-bottom: 18px; }
.mail-msg { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; max-width: 820px; min-width: 0; overflow-wrap: anywhere; }
.mail-msg.out { margin-left: auto; background: #eef8fa; border-color: #cfe7ec; }
.mm-head { margin-bottom: 8px; }
.mm-quoted { margin-top: 8px; }
@media (max-width: 700px) {
  .mail-list a { grid-template-columns: 1fr auto; grid-template-areas: "who when" "subj subj" "snip snip"; padding: 11px 14px; }
  .mk-preview { height: 380px; }
}
form.inline { display: inline; margin: 0; }
.mk-cust { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #edf1f4; }
.addr-field { display: flex; align-items: center; gap: 6px; } .addr-field input { flex: 1 1 auto; } .addr-field span { font-weight: 700; color: var(--slate); }

/* Work order: delete card */
.danger-zone { border-color: color-mix(in srgb, #c62828 35%, var(--line)); }
.danger-zone h2 { color: #a61f1f; }

/* Drag between columns (drag.js): mouse, or press and hold on touch */
.wo-card.movable { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.wo-card.press { transform: scale(.98); transition: transform .3s; }
.drag-ghost { box-shadow: 0 12px 32px rgba(11,31,51,.28); opacity: .95; cursor: grabbing; }
html.is-dragging, html.is-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
/* Calendar: drag appointments to reschedule (app.js) */
.cal-ev.movable, .cm-ev.movable { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab; }
.cal-ev.press, .cm-ev.press { transform: scale(.97); transition: transform .3s; }
.cal-ev.dragging, .cm-ev.dragging { opacity: .35; }
.cal-ev.drag-ghost { position: fixed; opacity: .8; }
.cal-ev.drag-ghost .ev-time { color: var(--teal-d); }
html.is-dragging .cal-slot:hover { background: none; }
html.is-dragging .cal-slot:hover::after { content: none; }
.cal-drop { position: absolute; left: 2px; right: 2px; z-index: 5; border: 2px dashed var(--teal); border-radius: 7px; background: rgba(14,138,158,.12);
  color: var(--teal-d); font-size: .72rem; font-weight: 800; padding: 3px 6px; pointer-events: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-col.drop-target { background-color: rgba(14,138,158,.05); }
.cm-day.drop-target { background: #e3f4f7; box-shadow: inset 0 0 0 2px var(--teal); }
html.cal-saving, html.cal-saving * { cursor: progress !important; }

/* Dark theme switch (menu under the user's name). Dark colors come from /static/dark.css (src/theme.js). */
.theme-form { margin: 0; }
.theme-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; background: none; border: 0; padding: 0; font: inherit; color: var(--teal-d); cursor: pointer; text-align: left; }
.theme-toggle .switch { position: relative; width: 36px; height: 20px; border-radius: 99px; background: #c9d5dc; flex: none; transition: background .15s; }
.theme-toggle .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(11,31,51,.3); transition: transform .15s; }
.theme-toggle[aria-checked=true] .switch { background: var(--teal); }
.theme-toggle[aria-checked=true] .switch::after { transform: translateX(16px); }

/* ---------- Vehicle storage ---------- */
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.bare[disabled] input, fieldset.bare[disabled] select, fieldset.bare[disabled] textarea { background: #f7fafb; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.spot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.spot { display: grid; gap: 1px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.spot b { font-size: 1.1rem; }
.spot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot.taken { background: #e6f4f7; border: 1px solid #bfe3ea; }
.spot.taken span:first-of-type { font-weight: 700; }
.spot.open { background: #f7fafb; border: 1px dashed #cfdce3; color: var(--muted); }
a.spot:hover { border-color: var(--teal); }
.dmg-layout { align-items: start; }
.dmg-form { display: grid; gap: 10px; margin-bottom: 12px; }
.kind-chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kind-chips legend { margin-bottom: 6px; padding: 0; }
.kind-chips label { flex-direction: row; }
.kind-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind-chips span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 99px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; }
.kind-chips span b { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-size: .75rem; }
.kind-chips input:checked + span { border-color: var(--teal); background: #e6f4f7; }
.kind-chips input:focus-visible + span { outline: 2px solid var(--teal-l); }
.dmg-help { margin: 0; }
.dmg-fallback { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.dmg-fallback label { flex: 1 1 200px; }
.dmg-board { position: relative; width: 100%; max-width: 320px; margin: 0 auto; border: 1px dashed #cfdce3; border-radius: 12px; background: #fbfdfe; }
.dmg-board.editable { cursor: crosshair; touch-action: manipulation; }
.dmg-car { display: block; width: 100%; height: auto; }
.dmg-lbl { font: 800 13px var(--font); fill: #5b6b7a; letter-spacing: 2px; }
.dmg-body { fill: #fff; stroke: #0b1f33; stroke-width: 3; }
.dmg-glass { fill: #e3f4f7; stroke: #0b1f33; stroke-width: 2.5; }
.dmg-roof { fill: #f3f6f8; stroke: #0b1f33; stroke-width: 2.5; }
.dmg-tire { fill: #2a3a4c; }
.dmg-detail { fill: none; stroke: #9aa7b2; stroke-width: 2; }
.dmg-dash { stroke: #c9d5dc; stroke-width: 2; stroke-dasharray: 6 6; }
.dmg-pin { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(11,31,51,.35); display: grid; place-items: center; font-size: .75rem; font-weight: 800; pointer-events: none; }
.dmg-pin.out { background: var(--orange); }
.dmg-pin.static { position: static; transform: none; flex: none; box-shadow: none; }
.dmg-legend { display: flex; gap: 16px; justify-content: center; margin-top: 10px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.dmg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dmg-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-in { background: var(--teal); } .dot-out { background: var(--orange); }
.dmg-list { list-style: none; margin: 0; padding: 0; }
.dmg-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #edf1f4; }
.dmg-list li > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dmg-list form { margin: 0; }
.release-card { border-top: 4px solid var(--orange); }

/* ---------- Check-in inspection (work order card + phone page /c/<token>) ---------- */
.insp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.insp-head h2 { margin: 0; }
.insp-card { border-top: 4px solid var(--orange); }
.insp-card.done { border-top-color: var(--ok); }
.insp-start { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 12px; }
.insp-qr { flex: 0 0 auto; display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7fafb; max-width: 440px; }
.insp-qr svg.qr { width: 170px; height: 170px; flex: none; border-radius: 6px; }
.insp-qr p { margin: 4px 0 0; }
.insp-progress { flex: 1 1 360px; min-width: 0; }
.bar { height: 8px; border-radius: 99px; background: #eef2f4; overflow: hidden; margin: 8px 0 12px; }
.bar span { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width .3s; }
.insp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 10px 0; }
.insp-thumbs figure { margin: 0; display: grid; gap: 4px; min-width: 0; }
.insp-thumbs img, .insp-empty { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.insp-empty { border: 1px dashed #b6c3cc; background: #f7fafb; display: grid; place-items: center; }
.insp-thumbs figcaption { font-size: .78rem; font-weight: 700; text-align: center; color: var(--muted); }
.slot-ico { width: 64%; height: auto; fill: none; stroke: #8a9aa6; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.slot-ico.flip, .cam-ico.flip { transform: scaleX(-1); }
.insp-results { margin-top: 10px; }
.insp-results h3 { margin: 6px 0 8px; }
.insp-wheels { list-style: none; margin: 0 0 10px; padding: 0; }
.insp-wheels li { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #edf1f4; }
.insp-sig { max-width: 300px; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.insp-dmg { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.insp-dmg .dmg-board { max-width: 150px; margin: 0; flex: none; }
.insp-dmg .dmg-list { flex: 1 1 200px; }
.insp-hide { display: none; }
.pill-bad { background: #fde6e6; color: #b32626; }
/* phone page */
.inspect { max-width: 640px; margin: 0 auto; padding: 14px 12px 40px; }
.inspect .card { padding: 16px; }
.inspect h1 { font-size: 1.35rem; margin: 2px 0; }
.inspect h2 { font-size: 1.05rem; }
.shot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shot { border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 6px; background: #fff; min-width: 0; }
.shot.done { border-color: #bfe6d0; }
.shot.busy { opacity: .6; }
.shot-img { aspect-ratio: 16 / 9; border-radius: 8px; background: #f7fafb; display: grid; place-items: center; overflow: hidden; }
.shot-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 0; font-size: .88rem; line-height: 1.3; }
.shot-btn { display: inline-flex; flex-direction: row; font-weight: 700; color: var(--teal-d); cursor: pointer; min-height: 32px; align-items: center; font-size: .85rem; }
.shot-start { margin: 14px 0 0; }
.extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.extras figure { margin: 0; } .extras img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.extras form { margin: 0; text-align: center; }
label.btn { flex-direction: row; }
.seg { border: 0; padding: 0; margin: 0; }
.seg legend { font-weight: 700; font-size: .9rem; padding: 0; margin-bottom: 4px; }
.seg-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid #c9d5dc; border-radius: 10px; overflow: hidden; }
.seg-row label { flex-direction: row; margin: 0; }
.seg-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-row span { flex: 1; display: grid; place-items: center; min-height: 46px; font-weight: 700; cursor: pointer; background: #fff; border-left: 1px solid #c9d5dc; }
.seg-row label:first-child span { border-left: 0; }
.seg-row input:checked + span { background: var(--teal); color: #fff; }
.seg-row input:focus-visible + span { outline: 2px solid var(--teal-l); outline-offset: -2px; }
.sig-wrap { position: relative; margin-top: 6px; }
.sig-pad { width: 100%; height: auto; aspect-ratio: 600 / 180; border: 1px dashed #b6c3cc; border-radius: 10px; background: #fff; touch-action: none; display: block; }
.sig-saved { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.inspect .dmg-board { max-width: 260px; }
.inspect-page .pub-top { padding: 10px 14px; }
/* guided camera */
html.cam-open, html.cam-open body { overflow: hidden; }
.cam { position: fixed; inset: 0; z-index: 100; background: #0b141d; color: #fff; display: flex; flex-direction: column; }
.cam.flash { background: #fff; }
.cam-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; gap: 10px; }
.cam-top > span { width: 44px; }
.cam-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.1rem; }
.cam-title { text-align: center; display: grid; } .cam-title small { color: #a9b8c5; font-weight: 700; } .cam-title b { font-size: 1.15rem; }
.cam-view { position: relative; flex: 1; margin: 0 8px; border-radius: 16px; overflow: hidden; background: #000; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-outline { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cam-ico { width: 92%; fill: none; stroke: #fff; stroke-opacity: .85; stroke-width: 1.4; stroke-dasharray: 4 3; stroke-linejoin: round; }
.cam-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(11,20,29,.75); padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: .85rem; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 24px 28px; }
.cam-skip { justify-self: start; background: none; border: 0; color: #c9d6e0; font: 700 1rem var(--font); min-height: 44px; }
.cam-shoot { width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: none; display: grid; place-items: center; padding: 0; }
.cam-shoot span { width: 60px; height: 60px; border-radius: 50%; background: #fff; display: block; }
.cam-status { justify-self: end; font-size: .85rem; color: #a9b8c5; }
@media print { .insp-card .no-print, .insp-qr { display: none !important; } }

/* ---------- Duplicate customers ---------- */
.dup-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 20px; max-width: min(520px, calc(100vw - 32px)); width: 100%; background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(11,31,51,.3); }
.dup-dialog::backdrop { background: rgba(11,31,51,.45); }
.dup-dialog h2 { margin: 0 0 10px; }
.dup-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.dup-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.dup-list li > div { min-width: 0; overflow-wrap: anywhere; }
.dup-group h2 { margin-bottom: 8px; }
.dup-group .btn { margin-top: 10px; }
.merge-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.merge-col { display: grid; gap: 3px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; }
.merge-col:has(input:checked) { border-color: var(--teal); background: #eef8fa; }
.merge-col .check { display: flex; flex-direction: row; align-items: center; gap: 8px; margin-bottom: 6px; }
@media (max-width: 700px) { .merge-cols { grid-template-columns: 1fr; } .dup-list li { flex-direction: column; align-items: stretch; } }

/* ---------- Date & time picker (public/datepicker.js; computers only, phones keep their own) ---------- */
.dp { position: relative; }
.dp-field { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid #c9d5dc; border-radius: 8px; background: #fff; color: var(--text); font: 500 .95rem var(--font); text-align: left; cursor: pointer; }
.dp-field:hover { border-color: #a9bcc7; }
.dp-field:focus-visible, .dp-field[aria-expanded=true] { outline: 2px solid var(--teal-l); outline-offset: 0; border-color: var(--teal); }
.dp-field svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dp-field span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-field .dp-ph { color: var(--muted); }
.dp-field.dp-invalid { border-color: var(--err); outline-color: var(--err); }
.dp-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; display: flex; gap: 14px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 36px rgba(11,31,51,.18); }
.dp-pop.up { top: auto; bottom: calc(100% + 6px); }
.dp-pop.right { left: auto; right: 0; }
.dp-pop { font: 500 .95rem var(--font); line-height: 1.4; }
.dp-pop[hidden] { display: none; }
.dp-cal { width: 266px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head b { font-size: .98rem; }
.dp-nav { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.dp-nav:hover { background: #eef3f5; }
.dp-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.dp-dow { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 2px 0 6px; }
.dp-day { height: 36px; border: 0; border-radius: 9px; background: none; font: 600 .88rem var(--font); color: var(--text); cursor: pointer; }
.dp-day:hover { background: #eef3f5; }
.dp-day.other { color: #a3b0ba; }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--teal); color: var(--teal-d); }
.dp-day.sel, .dp-day.sel:hover { background: var(--teal); color: #fff; box-shadow: none; }
.dp-day:disabled { color: #c9d5dc; cursor: default; background: none; }
.dp-day:focus-visible, .dp-time:focus-visible, .dp-quick button:focus-visible, .dp-nav:focus-visible { outline: 2px solid var(--teal-l); outline-offset: 1px; }
.dp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-quick button { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 99px; padding: 5px 11px; font: 700 .8rem var(--font); cursor: pointer; }
.dp-quick button:hover { border-color: var(--teal); color: var(--teal-d); }
.dp-quick .dp-clear { margin-left: auto; border-color: transparent; color: var(--muted); }
.dp-times { width: 124px; display: flex; flex-direction: column; }
.dp-dt .dp-times { border-left: 1px solid var(--line); padding-left: 14px; }
.dp-times-h { font-weight: 800; font-size: .98rem; height: 32px; display: flex; align-items: center; margin-bottom: 8px; }
.dp-tlist { max-height: 268px; overflow-y: auto; display: grid; gap: 2px; padding-right: 4px; }
.dp-t .dp-tlist { max-height: 300px; }
.dp-time { border: 0; background: none; border-radius: 8px; padding: 7px 10px; text-align: left; font: 600 .88rem var(--font); color: var(--text); cursor: pointer; }
.dp-time:hover { background: #eef3f5; }
.dp-time.sel, .dp-time.sel:hover { background: var(--teal); color: #fff; }

/* Print just the inspection report (Print report on the work order adds html.print-insp) */
.print-only { display: none; }
@media print {
  html.print-insp .main > :not(#inspection) { display: none !important; }
  html.print-insp .main { padding: 0; }
  html.print-insp #inspection { border: 0; box-shadow: none; padding: 0; margin: 0; }
  html.print-insp .print-only { display: block; }
  html.print-insp .insp-head h2 { font-size: 1.05rem; margin-top: 4px; }
  html.print-insp .insp-thumbs { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  html.print-insp .insp-thumbs figure, html.print-insp .insp-results > div { break-inside: avoid; }
  html.print-insp .insp-thumbs a { pointer-events: none; }
  html.print-insp .insp-results { grid-template-columns: 1fr 1fr; }
  html.print-insp body { font-size: 12pt; }
  .insp-print-head { border-bottom: 2px solid #0e8a9e; padding-bottom: 10px; margin-bottom: 12px; }
  .insp-print-head .iph-top { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
  .insp-print-head .iph-shop { font-size: 1.3rem; font-weight: 800; }
  .insp-print-head .iph-title { text-align: right; } .insp-print-head .iph-title b { font-size: 1.15rem; color: #0a6f80; }
  .insp-print-head .iph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
}
.insp-miles { font-size: 1.2rem; font-weight: 700; letter-spacing: .02em; max-width: 260px; }
.drop-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.drop-chips .chip-btn { min-height: 38px; padding: 6px 12px; font-size: .85rem; }
.drop-chips .chip-btn.on { border-color: var(--teal); background: #e6f4f7; color: var(--teal-d); }
.chip-toggle { flex-direction: row; margin: 0; }
.chip-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-toggle span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: #f7f9fa; color: var(--navy); font-weight: 600; font-size: .88rem; cursor: pointer; }
.chip-toggle span::before { content: '+'; font-weight: 800; color: var(--muted); }
.chip-toggle input:checked + span { border-color: var(--teal); background: var(--teal); color: #fff; }
.chip-toggle input:checked + span::before { content: '✓'; color: #fff; }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--teal-l); outline-offset: 1px; }
