/* The app's own styles (1.3b D12): the technician's pages allow no inline style, so everything they need is here.
   The design: docs/specs/2026-11-22-ui-redesign-design.md. Bootstrap 5.3.3 (Identity UI's copy) re-skinned through
   its variables, plus a few classes of our own. Phone first: the tab bar floats at the bottom, from 992px at the top. */
:root {
  --bg: #eef0f3;
  --surface: #fff;
  --ink: #0e1116;
  --ink-2: #4a5260;
  --ink-3: #5f6673;
  --hair: rgba(14, 17, 22, .08);
  --soft: rgba(14, 17, 22, .06);
  --volt: #ffb800;
  --volt-soft: #fff3cf;
  --volt-ink: #6b4b00;
  --ok: #0f7b4a;
  --ok-soft: #e3f4ea;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --r-card: 22px;
  --r-ctl: 14px;
  --shadow: 0 1px 2px rgba(14, 17, 22, .04), 0 10px 30px -14px rgba(14, 17, 22, .18);
  --spring: cubic-bezier(.32, .72, 0, 1);
  --tabbar-space: calc(env(safe-area-inset-bottom) + 104px);
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.45;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--ink-2);
  --bs-border-color: rgba(14, 17, 22, .12);
  --bs-border-radius: var(--r-ctl);
  --bs-border-radius-lg: var(--r-card);
  --bs-link-color: var(--ink);
  --bs-link-color-rgb: 14, 17, 22;
  --bs-link-hover-color: #000;
  --bs-link-hover-color-rgb: 0, 0, 0;
  --bs-focus-ring-color: rgba(255, 184, 0, .45);
}
body { -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
.pre-line { white-space: pre-line; }
.text-muted { color: var(--ink-3) !important; }

/* Shell */
body.app { max-width: 1120px; margin: 0 auto; padding: 0 16px var(--tabbar-space); }
.app-main { padding-top: 8px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 10px); z-index: 1030; display: flex; gap: 2px; padding: 6px; border-radius: 26px; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px); box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -18px rgba(14, 17, 22, .35); }
.tabbar > a, .tabbar summary { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; padding: 6px 2px 4px; border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--ink-3); text-decoration: none; position: relative; cursor: pointer; list-style: none; transition: transform .18s var(--spring), background-color .18s var(--spring); }
.tabbar summary::-webkit-details-marker { display: none; }
.tabbar > a:active, .tabbar summary:active { transform: scale(.95); }
.tabbar .i { width: 25px; height: 25px; }
.tabbar [aria-current], .tabbar details[open] > summary { color: var(--ink); background: var(--soft); }
.tabbar [aria-current]::after { content: ""; position: absolute; top: 6px; right: calc(50% - 19px); width: 7px; height: 7px; border-radius: 9px; background: var(--volt); }
.more { flex: 1; display: flex; position: relative; }
.more-panel { position: absolute; right: 0; bottom: calc(100% + 12px); min-width: 230px; padding: 8px; border-radius: 22px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair), 0 24px 48px -20px rgba(14, 17, 22, .45); }
.more-panel a, .more-panel .btn-link { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; color: var(--ink); font-weight: 600; text-decoration: none; }
.more-panel a:hover, .more-panel .btn-link:hover { background: var(--soft); }
.more-panel form { margin: 4px 0 0; border-top: 1px solid var(--hair); padding-top: 4px; }
/* The log-out button carries Bootstrap's p-0, which is !important. */
.more-panel .btn-link { justify-content: flex-start; color: var(--bad); padding: 0 14px !important; }
@media (min-width: 992px) {
  body.app { padding-bottom: 48px; }
  .tabbar { position: sticky; top: 12px; bottom: auto; left: auto; right: auto; width: max-content; max-width: 100%; margin: 12px auto 4px; }
  .tabbar > a, .tabbar summary { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 16px; font-size: 15px; }
  .tabbar .i { width: 20px; height: 20px; }
  .tabbar [aria-current]::after { top: 8px; right: 8px; }
  .more-panel { bottom: auto; top: calc(100% + 12px); }
}

/* Page head: a back chip, an eyebrow and a large title, not a glued navbar. */
.back { display: inline-flex; align-items: center; gap: 2px; margin: 6px 0 0 -8px; padding: 8px 12px 8px 4px; border-radius: 999px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.back .i { width: 20px; height: 20px; }
.eyebrow { display: block; margin: 14px 2px 4px; font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
h1, .h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.025em; line-height: 1.1; margin: 12px 0 16px; }
h1 .badge { font-size: .45em; vertical-align: middle; }
.eyebrow + h1 { margin-top: 0; }
h2, .h2, h3, .h3, .h4, .h5, .h6 { font-weight: 700; letter-spacing: -.01em; }
h2.label, .label { font-size: 13px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 26px 4px 10px; }

/* Cards: white plates with a hairline ring and a soft shadow; the main one on a screen in a double bezel. */
.card { --bs-card-border-width: 0; --bs-card-border-radius: var(--r-card); --bs-card-inner-border-radius: var(--r-card); --bs-card-spacer-y: 16px; --bs-card-spacer-x: 16px; box-shadow: var(--shadow), 0 0 0 1px var(--hair); margin-bottom: 12px; }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card-title .i { width: 19px; height: 19px; color: var(--ink-3); }
.bezel { padding: 6px; margin-bottom: 12px; border-radius: calc(var(--r-card) + 6px); background: rgba(14, 17, 22, .045); box-shadow: inset 0 0 0 1px var(--hair); }
.bezel > .card { margin: 0; box-shadow: 0 1px 1px rgba(14, 17, 22, .05), inset 0 1px 0 rgba(255, 255, 255, .9); }
section.border.rounded, div.border.rounded { border: 0 !important; border-radius: var(--r-card) !important; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--hair); padding: 16px !important; }
img.border.rounded, canvas.border.rounded { border: 0 !important; border-radius: 16px !important; box-shadow: 0 0 0 1px var(--bs-border-color); background: #fff; }
.fine { font-size: 13px; line-height: 1.45; color: var(--ink-3); margin: 10px 2px 0; }

/* Buttons: pills at least 48px tall, ink primary for sunlight, press feedback on a spring. */
.btn { --bs-btn-border-radius: 999px; --bs-btn-font-weight: 600; --bs-btn-padding-x: 1.25rem; --bs-btn-padding-y: .55rem; --bs-btn-focus-box-shadow: 0 0 0 .25rem rgba(255, 184, 0, .45); min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: transform .18s var(--spring), background-color .18s var(--spring), color .18s var(--spring); }
.btn:active { transform: scale(.97); }
.btn-sm { --bs-btn-padding-x: .9rem; min-height: 40px; }
.btn-lg { --bs-btn-font-size: 1.125rem; --bs-btn-padding-y: .8rem; min-height: 56px; }
.btn-link { min-height: 44px; }
.btn-primary { --bs-btn-color: #fff; --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #262d38; --bs-btn-hover-border-color: #262d38; --bs-btn-active-color: #fff; --bs-btn-active-bg: #000; --bs-btn-active-border-color: #000; --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--ink); --bs-btn-disabled-border-color: var(--ink); }
.btn-secondary, .btn-outline-primary, .btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-bg: rgba(14, 17, 22, .07); --bs-btn-border-color: transparent; --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: rgba(14, 17, 22, .12); --bs-btn-hover-border-color: transparent; --bs-btn-active-color: var(--ink); --bs-btn-active-bg: rgba(14, 17, 22, .16); --bs-btn-active-border-color: transparent; --bs-btn-disabled-color: var(--ink-3); --bs-btn-disabled-bg: rgba(14, 17, 22, .05); --bs-btn-disabled-border-color: transparent; }
.btn-outline-success { --bs-btn-color: var(--ok); --bs-btn-bg: var(--ok-soft); --bs-btn-border-color: transparent; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ok); --bs-btn-hover-border-color: var(--ok); }
.btn-outline-danger { --bs-btn-color: var(--bad); --bs-btn-bg: var(--bad-soft); --bs-btn-border-color: transparent; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--bad); --bs-btn-hover-border-color: var(--bad); --bs-btn-active-bg: var(--bad); --bs-btn-active-color: #fff; }

/* Fields: filled, 52px, 17px text so iPhone does not zoom on focus. */
.form-label { font-weight: 600; font-size: 15px; width: 100%; max-width: 560px; }
.form-label > .form-control, .form-label > .form-select { margin-top: 6px; font-weight: 400; }
.form-control, .form-select { min-height: 52px; font-size: 17px; border-radius: var(--r-ctl); border: 1px solid transparent; background-color: rgba(14, 17, 22, .055); padding: .75rem .9rem; }
.form-select { padding-right: 2.5rem; background-position: right .9rem center; }
.form-control:focus, .form-select:focus { background-color: #fff; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 184, 0, .35); }
.form-control[readonly] { background-color: #fff; box-shadow: 0 0 0 1px var(--bs-border-color); }
textarea.form-control { min-height: 120px; }
input[type=file].form-control { padding: 14px; min-height: 64px; background: #fff; border: 1.5px dashed rgba(14, 17, 22, .25); }
input[type=file].form-control::file-selector-button { margin: -4px 12px -4px -4px; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; }
.form-check { min-height: 44px; padding-left: 2.2em; padding-top: .45rem; padding-bottom: .45rem; }
.form-check .form-check-input { margin-left: -2.2em; }
.form-check-input { width: 1.45em; height: 1.45em; margin-top: 0; border-color: rgba(14, 17, 22, .35); }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.form-switch .form-check-input { width: 2.6em; }
.form-text { color: var(--ink-3); }
.text-danger { color: var(--bad) !important; }

/* Choice chips and option cards: Bootstrap's .btn-check radios, so a form posts exactly the fields it posted before. */
.choose { border: 0; padding: 0; margin: 0 0 6px; }
.choose legend { float: none; font-size: 15px; font-weight: 650; margin: 18px 2px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px rgba(14, 17, 22, .14); font-weight: 600; cursor: pointer; transition: transform .18s var(--spring), background-color .18s var(--spring); }
.btn-check:checked + .chip { background: var(--ink); color: #fff; box-shadow: none; }
.options { display: grid; gap: 8px; max-width: 560px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px rgba(14, 17, 22, .12); font-weight: 600; cursor: pointer; transition: transform .18s var(--spring); }
.option::before { content: ""; flex: none; width: 24px; height: 24px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(14, 17, 22, .3); }
.option small { display: block; font-weight: 500; color: var(--ink-3); font-size: 14px; }
.btn-check:checked + .option { box-shadow: 0 0 0 2px var(--ink); }
.btn-check:checked + .option::before { background: radial-gradient(circle, #fff 0 4px, var(--ink) 4.5px); box-shadow: none; }
.chip:active, .option:active { transform: scale(.97); }
.btn-check:focus-visible + .chip, .btn-check:focus-visible + .option { outline: 3px solid var(--volt); outline-offset: 2px; }
.btn-check:disabled + .chip, .btn-check:disabled + .option { opacity: .55; }
/* decisions.md :113: a checklist row on the phone, full width; one tap ticks or unticks it. */
.check-row { position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 56px; margin-bottom: 8px; padding: 14px 16px 14px 54px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px rgba(14, 17, 22, .12); color: inherit; font-weight: 600; text-align: left; transition: transform .18s var(--spring); }
.check-row::before { content: ""; position: absolute; left: 16px; top: 16px; width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px rgba(14, 17, 22, .3); }
.check-row.done::before { content: "\2713"; display: grid; place-items: center; background: var(--ink); color: #fff; box-shadow: none; }
.check-row small { font-weight: 500; color: var(--ink-3); font-size: 14px; }
.check-row:active { transform: scale(.98); }
.check-row:focus-visible { outline: 3px solid var(--volt); outline-offset: 2px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(14, 17, 22, .07); }
.segmented .btn, .segmented a { min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.segmented .btn-check:checked + .btn { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14, 17, 22, .15); }
.segmented a:hover { background: rgba(255, 255, 255, .6); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; }
.actionbar { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 90px); z-index: 1020; display: flex; gap: 10px; align-items: center; margin-top: 20px; max-width: 560px; }
.actionbar .btn-primary { flex: 1 0 112px; box-shadow: 0 12px 30px -10px rgba(14, 17, 22, .45); }
@media (min-width: 992px) { .actionbar { bottom: 16px; } }
.bar-total { flex: 0 1 auto; padding: 10px 16px; border-radius: 999px; background: var(--surface); box-shadow: 0 8px 24px -12px rgba(14, 17, 22, .35); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }

/* Step strips: what is done, what is now, what comes next. */
.steps { display: flex; gap: 6px; padding: 0; margin: 0 0 16px; list-style: none; counter-reset: s; overflow-x: auto; }
.steps li { flex: 1 1 0; min-width: 0; counter-increment: s; padding: 9px 10px 8px; border-radius: 14px; background: rgba(14, 17, 22, .045); font-size: 13px; font-weight: 600; color: var(--ink-3); line-height: 1.25; }
.steps li::before { content: counter(s); display: block; font-size: 11px; letter-spacing: .08em; margin-bottom: 2px; }
.steps li a { color: inherit; text-decoration: none; }
.steps li small { display: block; font-weight: 500; }
.steps .done { background: var(--ok-soft); color: var(--ok); }
.steps .done::before { content: "\2713"; }
.steps .now { background: var(--volt-soft); color: var(--volt-ink); box-shadow: inset 0 0 0 1.5px var(--volt); }

/* The technician's day and visit */
.clock-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 16px; }
.dot { width: 10px; height: 10px; border-radius: 99px; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.dot.off { background: #9aa1ad; box-shadow: 0 0 0 4px var(--soft); }
.row-link { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 600; text-decoration: none; }
.row-link .i { width: 18px; height: 18px; color: var(--ink-3); }
.visit { position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 12px; }
.visit-time { font-weight: 700; line-height: 1.2; }
.visit-time small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.visit-body > a:first-child { font-weight: 650; color: var(--ink); text-decoration: none; }
.visit-body > a:first-child::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.visit-body p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.visit-actions a, .tag { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.visit-actions .i { width: 17px; height: 17px; }
.tag { min-height: 28px; padding: 0 10px; margin-top: 8px; font-size: 13px; background: var(--volt-soft); color: var(--volt-ink); }
.tag.done { background: var(--ok-soft); color: var(--ok); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; border-radius: 16px; background: var(--soft); font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; text-align: center; transition: transform .18s var(--spring); }
.quick a:first-child:nth-last-child(3) { grid-column: 1 / -1; }
.quick a:active { transform: scale(.97); }
.step-others { display: flex; gap: 8px; margin-top: 8px; }
.step-others form { flex: 1; margin: 0 !important; }
.step-others .btn-primary { --bs-btn-color: var(--ink); --bs-btn-bg: rgba(14, 17, 22, .07); --bs-btn-border-color: transparent; --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: rgba(14, 17, 22, .12); --bs-btn-hover-border-color: transparent; --bs-btn-disabled-color: var(--ink-3); --bs-btn-disabled-bg: rgba(14, 17, 22, .05); --bs-btn-disabled-border-color: transparent; --bs-btn-font-size: 1rem; min-height: 48px; }

/* Tables: clean on a card; on a phone, lists become stacked cards and other tables scroll sideways. */
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--hair); font-size: 16px; }
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table tr:first-child > th { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
table.table { background: var(--surface); border-collapse: separate; border-spacing: 0; border-radius: var(--r-card); box-shadow: var(--shadow), 0 0 0 1px var(--hair); overflow: hidden; }
.table tr:last-child > * { border-bottom: 0; }
.badge { border-radius: 999px; font-weight: 650; padding: .4em .75em; vertical-align: middle; }
.badge.text-bg-secondary { background: rgba(14, 17, 22, .08) !important; color: var(--ink-2) !important; }
.badge.text-bg-warning, .table-warning { --bs-table-bg: var(--volt-soft); background: var(--volt-soft) !important; color: var(--volt-ink) !important; }
.alert { border: 0; border-radius: 18px; }
.alert-warning { background: var(--volt-soft); color: var(--volt-ink); }
.alert-info { background: #e8eef8; color: #1d3557; }
.alert-success { background: var(--ok-soft); color: #0b4f30; }
.alert-danger { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 639.98px) {
  table.table:not(.table-stack):not(.board) { display: block; overflow-x: auto; }
  table.table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; }
  table.table-stack { background: none; box-shadow: none; overflow: visible; }
  .table-stack tr:has(> th) { display: none; }
  .table-stack tr { margin-bottom: 10px; padding: 12px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--hair); }
  .table-stack > :not(caption) > * > * { padding: 2px 0; border: 0; }
  .table-stack td:first-child { font-size: 17px; font-weight: 700; }
  .table-stack td:empty { display: none; }
  /* The column names a stacked card would lose, for the cells that are not obvious by themselves. */
  .jobs-list td:nth-child(5)::before, .estimates-list td:nth-child(5)::before { content: "Status: "; color: var(--ink-3); }
  .jobs-list td:nth-child(6)::before { content: "Next visit: "; color: var(--ink-3); }
  .estimates-list td:nth-child(6)::before { content: "Customer link: "; color: var(--ink-3); }
  .estimates-list td:nth-child(7)::before { content: "Dated "; color: var(--ink-3); }
  .estimates-list td:nth-child(8)::before { content: "Valid until "; color: var(--ink-3); }
  .invoices-list td:nth-child(5)::before { content: "Status: "; color: var(--ink-3); }
  .invoices-list td:nth-child(6)::before { content: "Total "; color: var(--ink-3); }
  .invoices-list td:nth-child(7)::before { content: "Balance "; color: var(--ink-3); }
}

/* The sign-in and password forms (Identity's own pages): the main button is a full-width thumb target on a phone. */
@media (max-width: 767.98px) {
  .app-main form:has(input[type="password"]) .btn-primary { width: 100%; min-height: 54px; }
}

/* A row of a field and its buttons (search, "New estimate" with its job site) wraps on a phone: the field takes the
   line and the buttons go under it, so nothing is wider than the screen. */
@media (max-width: 767.98px) {
  .d-flex:has(> .form-control, > .form-select) { flex-wrap: wrap; }
  .d-flex > .form-control, .d-flex > .form-select { flex: 1 1 100%; }
}

/* The dispatch board on a phone: one card per person, the days inside it (the week always starts on Monday). */
@media (max-width: 767.98px) {
  table.board, .board tbody, .board tr, .board th, .board td { display: block; }
  table.board { background: none; box-shadow: none; overflow: visible; }
  .board tr:first-child { display: none; }
  .board tr { margin-bottom: 12px; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--hair); }
  .board th { padding: 0 0 6px !important; border: 0 !important; font-size: 17px; }
  .board td { padding: 8px 0 !important; border: 0 !important; border-top: 1px solid var(--hair) !important; }
  .board td:not(:has(a)) { display: none; }
  .board td::before { display: block; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
  .board td:nth-child(2)::before { content: "Monday"; }
  .board td:nth-child(3)::before { content: "Tuesday"; }
  .board td:nth-child(4)::before { content: "Wednesday"; }
  .board td:nth-child(5)::before { content: "Thursday"; }
  .board td:nth-child(6)::before { content: "Friday"; }
  .board td:nth-child(7)::before { content: "Saturday"; }
  .board td:nth-child(8)::before { content: "Sunday"; }
  .table-responsive:has(> .board) { overflow: visible; }
}
.board tr:not(:first-child) > th { font-weight: 650; font-size: 15px; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.board-visit + .board-visit { margin-top: 10px; }
/* decisions.md :141: the day view, a column per person on a computer and a list per person on a phone. */
.day-board { display: grid; gap: 12px; }
.day-col h2 { overflow-wrap: anywhere; }
.day-col { padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--hair); }
@media (min-width: 768px) {
  .day-board { grid-auto-flow: column; grid-auto-columns: minmax(13rem, 1fr); overflow-x: auto; align-items: start; }
}
/* office.js: a visit being dragged, and the place it would land. */
[draggable=true] { cursor: grab; }
.drop-over { outline: 3px dashed var(--volt); outline-offset: -3px; }
/* office.js: the board's map, tiles and pins placed by the script; the attribution the tile policy asks for. */
.board-map { position: relative; height: 440px; overflow: hidden; border-radius: var(--r-card); background: #e7ebef; box-shadow: var(--shadow), 0 0 0 1px var(--hair); }
.board-map .layer { position: absolute; inset: 0; }
.board-map .tile { position: absolute; max-width: none; }
.board-map .pin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 0 0 3px #fff, var(--shadow); }
.board-map .zoom { position: absolute; z-index: 1; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; }
.board-map .attrib { position: absolute; z-index: 1; right: 0; bottom: 0; padding: 2px 8px; border-top-left-radius: 8px; background: rgba(255, 255, 255, .85); font-size: 12px; }
.map-list li { overflow-wrap: anywhere; }
.map-list li + li { margin-top: 8px; }

/* Estimate lines on a phone: each line a stacked card with its labels (the labor column only on taxable types). */
@media (max-width: 767.98px) {
  table.lines, .lines tbody, .lines tr, .lines td { display: block; }
  table.lines { background: none; box-shadow: none; overflow: visible; }
  .lines tr:first-child { display: none; }
  .lines tr { margin-bottom: 10px; padding: 12px; border-radius: 18px; background: rgba(14, 17, 22, .035); }
  /* Qty, unit and unit price side by side; the description, the labor box, the amount and the button take a line each. */
  .lines tr { display: grid; grid-template-columns: 1fr 1fr 1.4fr; column-gap: 8px; }
  .lines td:nth-child(1), .lines td:nth-child(n+5) { grid-column: 1 / -1; }
  .lines > :not(caption) > * > * { padding: 4px 0; border: 0; }
  .lines td::before { display: block; font-size: 12px; font-weight: 650; color: var(--ink-3); margin-bottom: 2px; }
  .lines td:nth-child(1)::before { content: "Description"; }
  .lines td:nth-child(2)::before { content: "Qty"; }
  .lines td:nth-child(3)::before { content: "Unit"; }
  .lines td:nth-child(4)::before { content: "Unit price"; }
  .lines.tax td:nth-child(5)::before { content: "Labor or service (not goods)"; }
  .lines td:empty, .lines td:empty::before { display: none; }
}

/* The customer's sign screen (no layout, no menu: 1.3c D1). */
body.sign { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(env(safe-area-inset-bottom) + 24px); }
body.sign h1 { font-size: 1.75rem; }
/* The signature pad (1.3c Task 6): the finger draws instead of scrolling the page. */
#pad { touch-action: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.clock-warn { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--volt-soft); color: var(--volt-ink); font-weight: 600; }
/* A photo's small copy on the visit page: square tiles that wrap, each the link to the full photo. */
.thumb { display: inline-block; margin: 0 8px 8px 0; border-radius: 12px; overflow: hidden; }
.thumb img { display: block; width: 96px; height: 96px; object-fit: cover; }
