:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5d6b7a;
  --border: #dde3e9;
  --brand: #0b5cad;
  --brand-text: #ffffff;
  --ok: #1f7a3a;
  --warn-bg: #fff4d6;
  --warn-text: #7a5300;
  --err-bg: #fde8e8;
  --err-text: #9b1c1c;
  --ok-bg: #e5f5ea;
  --danger: #9b1c1c;      /* buttons and the LIVE badge, white text on it */
  --shaded: #f1f2f4;      /* every other box in a list */
  --hover-bg: #f7faff;
  --pill-bg: #e3eefb;
  --pill-text: #0b4a8b;
  /* Quote stage colors (Quotes page; Mitch, Nov 7 2026): outline, then words. */
  --st-orange: #e8780c; --st-orange-text: #a24f00;
  --st-yellow: #e2b600; --st-yellow-text: #7a5f00;
  --st-green: #2e9a4f; --st-green-text: #1f7a3a;
  --st-blue: #0b5cad; --st-blue-text: #0b5cad;
  --st-red: #d32f2f; --st-red-text: #9b1c1c;
}

/* Dark Mode (Settings > My Account; public/theme.js sets data-theme).
   The same colors twice: Dark, and Match This Device when the device is dark. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --surface: #1a1d23;
  --text: #e6e9ee;
  --muted: #9aa4b1;
  --border: #2f353e;
  --brand: #2a74c9;
  --brand-text: #ffffff;
  --ok: #5cc27c;
  --warn-bg: #3a2e0a;
  --warn-text: #f2cf74;
  --err-bg: #3b1616;
  --err-text: #f19a9a;
  --ok-bg: #16301f;
  --danger: #c0392b;
  --shaded: #22262d;
  --hover-bg: #1f2a38;
  --pill-bg: #1d3350;
  --pill-text: #9cc6f5;
  --st-orange: #f0954a; --st-orange-text: #f7b27a;
  --st-yellow: #e8c547; --st-yellow-text: #f2d676;
  --st-green: #4fb86e; --st-green-text: #7fd39a;
  --st-blue: #2a74c9; --st-blue-text: #9cc6f5;
  --st-red: #e35d5d; --st-red-text: #f19a9a;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --bg: #0f1115;
    --surface: #1a1d23;
    --text: #e6e9ee;
    --muted: #9aa4b1;
    --border: #2f353e;
    --brand: #2a74c9;
    --brand-text: #ffffff;
    --ok: #5cc27c;
    --warn-bg: #3a2e0a;
    --warn-text: #f2cf74;
    --err-bg: #3b1616;
    --err-text: #f19a9a;
    --ok-bg: #16301f;
    --danger: #c0392b;
    --shaded: #22262d;
    --hover-bg: #1f2a38;
    --pill-bg: #1d3350;
    --pill-text: #9cc6f5;
  --st-orange: #f0954a; --st-orange-text: #f7b27a;
  --st-yellow: #e8c547; --st-yellow-text: #f2d676;
  --st-green: #4fb86e; --st-green-text: #7fd39a;
  --st-blue: #2a74c9; --st-blue-text: #9cc6f5;
  --st-red: #e35d5d; --st-red-text: #f19a9a;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: #111; /* matches the Service2.0 logo */
  color: var(--brand-text);
}
.topbar h1 { font-size: 1.2rem; margin: 0; }
.topbar .brand { color: var(--brand-text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.topbar .brand-logo { height: 44px; width: auto; display: block; }
.auth-logo { display: block; height: auto; margin: 0 auto 8px; max-width: 60%; }
.auth-card h1 { text-align: center; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 0.9rem; }
.topbar .button.small { padding: 5px 10px; font-size: 0.85rem; }

/* Sign-in and setup-link pages */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.3rem; margin: 0 0 4px; }
.auth-card .form { max-width: none; }
.auth-page:has(.auth-footer) { flex-direction: column; }
.auth-footer { margin-top: 12px; font-size: 0.85rem; }
.legal-card { width: 100%; max-width: 720px; line-height: 1.5; }
.legal-card h1 { font-size: 1.4rem; margin: 0 0 4px; }
.legal-card h2 { font-size: 1.05rem; margin: 20px 0 6px; }

/* Home page */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; color: var(--text); text-decoration: none; }
.stat:hover { border-color: var(--brand); }
.stat .label { color: var(--muted); font-size: 0.85rem; }
.stat .count { font-size: 1.8rem; font-weight: 600; }
.rows { border: 1px solid var(--border); border-radius: 8px; }
.rows .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.rows .row:last-child { border-bottom: none; }
.rows .row .meta { color: var(--muted); white-space: nowrap; }
.rows .row .flag { color: var(--warn-text); white-space: nowrap; }
.rows .empty { padding: 12px; color: var(--muted); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.search { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; }
.qr-box svg { width: 200px; height: 200px; }
.link-box { word-break: break-all; font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; background: var(--bg); padding: 8px; border-radius: 6px; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-grid { grid-template-columns: 1fr; } }

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn-text);
}

.badge.live { background: var(--danger); color: #fff; }
.check-list { list-style: none; padding: 0; margin: 8px 0 0; }
.check-list li { padding: 6px 0; border-top: 1px solid var(--border); }
.check-list .ok { color: var(--ok); font-weight: 600; }
.check-list .bad { color: var(--err-text); font-weight: 600; }
.check-list .detail { display: block; color: var(--muted); font-size: 0.85rem; }

.layout { display: flex; min-height: calc(100vh - 52px); }

.sidebar {
  width: 200px;
  padding: 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar a, .sidebar .soon { padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--text); }
.sidebar a.active { background: var(--bg); font-weight: 600; }
.sidebar .soon { color: var(--muted); }
.sidebar small { display: block; font-size: 0.7rem; }
.menu-toggle { display: none; }

main { flex: 1; padding: 24px; max-width: 1100px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 10px; font-size: 1.05rem; }
.section-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.section-toggle::before { content: '▸'; display: inline-block; width: 1em; transition: transform 0.15s; color: var(--muted); }
.section-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.card h2:has(.section-toggle[aria-expanded="false"]) { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; white-space: pre-line; }

.actions { display: flex; gap: 10px; margin-top: 12px; }

.button {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
.button:disabled { opacity: 0.6; cursor: wait; }

.message { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; }
.message.error { background: var(--err-bg); color: var(--err-text); }
.message.success { background: var(--ok-bg); color: var(--ok); }
.message.warning { background: var(--warn-bg); color: var(--warn-text); }
.message.warning p { margin: 0 0 6px; }
.message.warning ul { margin: 0; padding-left: 20px; }

.form { display: grid; gap: 14px; max-width: 520px; margin-top: 12px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: 0.92rem; }
.form .req { font-weight: 400; font-size: 0.75rem; color: var(--muted); }
.form .field { display: grid; gap: 4px; }
.form .field > label { font-weight: 600; font-size: 0.92rem; }
/* A checkbox with its words beside it, not stacked like the other boxes. */
.form > label.choice { display: flex; align-items: center; gap: 8px; }
.form > label.choice input { margin: 0; width: 18px; height: 18px; flex: none; }

/* Type-to-search picker (New Job customer) */
.combo { position: relative; }
.combo input { width: 100%; box-sizing: border-box; padding-right: 34px; }
.combo input.chosen { font-weight: 600; }
.combo-select input { cursor: pointer; }
.combo-select input:not([readonly]) { cursor: text; }
/* Down arrow, so these still read as drop-downs */
.combo-select::after {
  content: ''; position: absolute; right: 13px; top: 50%; pointer-events: none;
  width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}
.memo-row .combo { width: 190px; }
.combo-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--muted); font-size: 0.9rem;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
}
.combo-clear:hover { background: var(--bg); color: var(--text); }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  margin: 0; padding: 4px; list-style: none;
  max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28, 36, 48, 0.12);
}
.combo-option {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer; font-weight: 400;
}
.combo-option.is-indented { padding-left: 26px; }
.combo-option.is-action { color: var(--brand); }
/* A line between the list and its extra choices ("+ New Contact…") */
.combo-option:not(.is-action) + .combo-option.is-action { border-top: 1px solid var(--border); border-radius: 0; }
.combo-option.is-selected .combo-name { font-weight: 600; }
.combo-option.active, .combo-option:hover { background: var(--bg); }
.combo-option.active { box-shadow: inset 3px 0 0 var(--brand); }
.combo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-name mark { background: none; color: inherit; font-weight: 700; }
.combo-meta { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-empty { padding: 10px; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
/* Remove button on a row (site contacts), and its "are you sure" on the row */
.combo-option:has(.combo-remove) { align-items: center; }
.combo-option .combo-name { flex: 1; }
.combo-remove { flex: none; padding: 2px 8px; font-size: 0.78rem; }
.combo-option.is-confirming { cursor: default; align-items: center; flex-wrap: wrap; background: var(--warn-bg); color: var(--warn-text); }
.combo-confirm { flex: 1; min-width: 180px; font-weight: 600; }
.combo-actions { display: flex; gap: 6px; flex: none; }
.button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.form .memo { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px 4px; margin: 0; }
.form .memo legend { font-weight: 600; font-size: 0.92rem; padding: 0 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.field-row.four { grid-template-columns: 2fr 1.2fr 0.6fr 0.8fr; }
.field-note { font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.form input:disabled { background: var(--bg); }
@media (max-width: 500px) { .field-row, .field-row.three, .field-row.four { grid-template-columns: 1fr; } }
.memo-row { display: flex; gap: 10px; flex-wrap: wrap; }
.money-input { display: inline-flex; align-items: center; gap: 4px; }
.money-input input { width: 140px; }
.nte-hours { display: block; margin-top: 8px; }
.nte-hours input { width: 90px; margin-left: 6px; }
.nte-hours .field-note { display: block; }
.hours-input { width: 90px; }
.hours-over { color: var(--danger, #c0392b); }
.hint { color: var(--err-text); font-size: 0.85rem; margin: 6px 0 0; }
.form input.invalid, .form textarea.invalid { border-color: var(--err-text); background: var(--err-bg); }
.form textarea, .form input, .form select {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.folder-box { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; font-size: 0.9rem; }
.folder-box .folder-title { margin: 0 0 6px; font-weight: 600; }
.folder-box p { margin: 4px 0; }
.folder-level + .folder-level { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.folder-level-title { margin: 0 0 4px; font-weight: 600; font-size: 0.85rem; color: var(--muted); }
.folder-box .choice { display: flex; gap: 8px; align-items: baseline; font-weight: 400; margin: 4px 0; }
.system-list { max-height: 280px; overflow-y: auto; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.select-all { margin-top: 6px; }
.folder-path { font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; word-break: break-word; }
.folder-result { margin: 8px 0 12px; }

.result { border-color: var(--ok); }
.job-number { font-size: 1.3rem; margin: 4px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.job-ok { font-size: 0.9rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); }
.folder-result.done { padding: 4px 0; font-size: 0.9rem; }

.muted { color: var(--muted); }
.connected { color: var(--ok); font-weight: 600; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
.num { text-align: right; }

@media (max-width: 700px) {
  .layout { flex-direction: column; }
  /* Phones (Mitch, Nov 14 2026): one "☰ Menu · <page>" bar; tapping it drops
     the pages down as a column of big buttons (public/common.js). */
  .sidebar { width: auto; flex-direction: column; gap: 2px; padding: 8px 12px; border-right: none; border-bottom: 1px solid var(--border); }
  .menu-toggle { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg); color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; white-space: pre; }
  .sidebar:not(.open) > a, .sidebar:not(.open) > .soon { display: none; }
  .sidebar.open > .menu-toggle { margin-bottom: 4px; }
  .sidebar > a { padding: 11px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .sidebar > a:last-child { border-bottom: none; }
  .sidebar > a.active { border-radius: 6px; border-bottom-color: transparent; }
  main { padding: 16px; min-width: 0; }
  /* The top bar: logo and SANDBOX/LIVE on the first line, who's signed in and the buttons on the next. */
  .topbar { flex-wrap: wrap; row-gap: 6px; padding: 8px 12px; }
  .topbar .brand-logo { height: 32px; }
  .topbar h1 { font-size: 1rem; }
  .topbar .spacer { flex-basis: 100%; height: 0; }
  .topbar .who { flex: 1; min-width: 0; }
}
.no-margin { margin: 0; }
.small-note { font-weight: 400; font-size: 0.85rem; }
.spaced { margin-top: 20px; }

/* Needs attention: each item is a labelled, clickable row */
#attention.rows { border: none; display: grid; gap: 16px; }
.att-group { display: grid; gap: 6px; }
.att-head { display: flex; align-items: center; gap: 10px; }
.att-count { color: var(--muted); font-size: 0.85rem; }
.att-list { display: grid; gap: 6px; }
.att-more { justify-self: start; }
.att-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 0.92rem; }
.att-item:hover { border-color: var(--brand); background: var(--hover-bg); }
.att-title { overflow-wrap: anywhere; line-height: 1.3; }
.att-sub { display: block; color: var(--muted); font-size: 0.8rem; }
.att-days { font-weight: 600; white-space: nowrap; }
.pill { justify-self: start; padding: 3px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.pill-parts { background: var(--warn-bg); color: var(--warn-text); }
.pill-invoice { background: var(--err-bg); color: var(--err-text); }
.pill-quote { background: var(--pill-bg); color: var(--pill-text); }
.pill-done { background: var(--ok-bg); color: var(--ok); }
/* Office Home: Tech Updates, one heading per day (public/home.js). */
.feed-day { margin: 14px 0 4px; font-size: 0.95rem; color: var(--muted); }
.feed-day:first-child { margin-top: 0; }

/* Job Board tabs and folder viewer */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.tab { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.9rem; }
.tab.active { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
.board { display: grid; gap: 16px; margin-top: 8px; }
.att-days.late { color: var(--warn-text); }
.board-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.board-row:hover { border-color: var(--border); background: var(--surface); }
.row-buttons { display: flex; gap: 6px; }
.move-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px 4px; font-size: 0.9rem; }
.move-error { color: var(--err-text); }
.parts-chip { margin-left: 8px; }
.parts-chip .pill { display: inline-block; vertical-align: middle; }
.parts-panel { margin: 4px 0 8px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: grid; gap: 10px; font-size: 0.9rem; }
.parts-panel textarea { width: 100%; box-sizing: border-box; font: inherit; }
.note-done { color: var(--ok, #1d7a3a); }
.site-field { display: grid; gap: 2px; font-size: 0.85rem; font-weight: 600; }
.parts-panel .site-field input, .parts-panel > select { width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.site-row { display: grid; grid-template-columns: 1fr 70px 100px; gap: 8px; }
.site-row:has(.site-phone) { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .site-row, .site-row:has(.site-phone) { grid-template-columns: 1fr; } }
.parts-head { margin: 0; }
.parts-list { display: grid; gap: 8px; }
.parts-row { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.parts-main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.parts-where, .parts-add, .parts-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.parts-where input, .parts-add input { width: auto; min-width: 0; flex: 1 1 160px; }
.parts-add .parts-qty { flex: 0 1 70px; }
.parts-or { color: var(--muted); }
.parts-quote { display: grid; gap: 6px; }
.order-box, .order-list { display: grid; gap: 10px; }
.order-card { display: grid; gap: 8px; padding: 10px; border: 2px solid var(--brand); border-radius: 8px; }
.order-card select { font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); max-width: 100%; }
.order-rows { display: grid; gap: 6px; }
.order-row .order-num { flex: 0 1 140px; }
.order-row .order-price { width: 90px; }
.order-form { display: grid; gap: 8px; }
.order-line { display: grid; gap: 2px; }
.order-row input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; }
.order-off input[type="text"] { opacity: 0.5; text-decoration: line-through; }
.email-preview-box { display: grid; gap: 8px; padding: 10px; border: 2px dashed var(--brand); border-radius: 8px; }
.email-preview { width: 100%; min-height: 360px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.order-deliver, .order-files { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.order-drop { display: grid; gap: 6px; padding: 10px; border: 2px dashed var(--border); border-radius: 8px; }
.order-drop.drop-on { border-color: var(--brand); background: var(--shaded); }
.order-file-row { display: inline-flex; gap: 8px; align-items: center; }
.order-mail { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.order-mail-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .parts-main { grid-template-columns: 1fr; }
}
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.88rem; margin-bottom: 8px; }
.crumbs .button { padding: 3px 9px; }
.crumbs .sep { color: var(--muted); }
#entries { margin-top: 12px; }
.file-row { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.reopen-row { display: grid; gap: 6px; }
.reopen-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.reopen-ask input { flex: 1; min-width: 200px; }
.kind { display: inline-block; min-width: 52px; margin-right: 10px; padding: 2px 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; text-align: center; background: var(--bg); color: var(--muted); }
.kind-folder { background: var(--pill-bg); color: var(--pill-text); }
.kind-pdf { background: var(--err-bg); color: var(--err-text); }
.kind-image, .kind-video { background: var(--ok-bg); color: var(--ok); }
.kind-text { background: var(--warn-bg); color: var(--warn-text); }
.viewer { margin-top: 20px; }
.viewer-frame { width: 100%; height: 80vh; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.viewer-image { max-width: 100%; max-height: 80vh; display: block; margin: 0 auto; border-radius: 6px; }
.viewer-text { white-space: pre-wrap; background: var(--bg); padding: 12px; border-radius: 6px; max-height: 70vh; overflow: auto; }

/* New Job: folder details with nothing to check (see hideIfAllFound) */
.all-found { display: none !important; }

/* What's New page (after signing in) */
.whats-new-card { max-width: 520px; }
.whats-new-choice { justify-content: center; }
.whats-new-card .center { text-align: center; margin-top: 0; }
.whats-new-day { margin-top: 14px; }
.whats-new-date { margin: 0 0 4px; font-weight: 600; font-size: 0.85rem; color: var(--muted); }
.whats-new-card ul { margin: 0 0 8px; padding-left: 20px; }
.whats-new-card li { margin: 4px 0; }
.whats-new-card .actions { margin-top: 16px; }

/* Technicians board */
.day-nav { display: flex; align-items: center; gap: 6px; }
.day-nav .button { padding: 7px 12px; }
.day-nav input { font: inherit; padding: 7px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.button.small { padding: 5px 10px; font-size: 0.85rem; }
.link-button { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-size: 0.8rem; cursor: pointer; text-align: left; }
.link-button:hover { text-decoration: underline; }
.icon-button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; width: 28px; height: 26px; cursor: pointer; font-size: 0.85rem; }
.icon-button:hover:not(:disabled) { border-color: var(--brand); }
.icon-button:disabled { opacity: 0.35; cursor: default; }
.tech-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
/* Narrow windows: the techs' columns first, the job list under them (shorter). */
@media (max-width: 860px) {
  .tech-layout { grid-template-columns: 1fr; }
  .tech-jobs { order: 2; }
  .tech-job-list { max-height: 45vh; }
}
.tech-jobs { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.tech-jobs .tabs { margin: 8px 0; }
.tech-jobs .tab { font: inherit; font-size: 0.8rem; padding: 4px 10px; cursor: pointer; }
.tech-job-list { display: grid; gap: 6px; max-height: 70vh; overflow-y: auto; }
.tech-job { display: grid; gap: 2px; text-align: left; font: inherit; font-size: 0.9rem; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; }
.tech-job:hover { border-color: var(--brand); }
.tech-job.picked { border: 2px solid var(--brand); padding: 7px 9px; }
.tech-card-sub { color: var(--muted); font-size: 0.8rem; }
.tech-card-job { font-size: 0.85rem; }
.tech-scheduled { color: var(--ok); font-size: 0.78rem; }
.schedule-panel { background: var(--surface); border: 2px solid var(--brand); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; display: grid; gap: 10px; }
.schedule-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.schedule-fields { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.schedule-fields label { display: grid; gap: 4px; font-weight: 600; font-size: 0.85rem; }
.schedule-fields input, .schedule-fields select { font: inherit; font-weight: 400; padding: 7px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.schedule-fields .combo { width: 150px; }
.order-picks { display: flex; flex-wrap: wrap; gap: 14px; }
.tech-picks { border: 0; padding: 0; margin: 0; min-width: 200px; }
.tech-picks legend { font-weight: 600; font-size: 0.85rem; padding: 0; margin-bottom: 4px; }
.tech-picks .choice { display: flex; gap: 6px; align-items: center; font-size: 0.9rem; margin: 2px 0; }
.schedule-panel .actions { margin-top: 0; }
.tech-day-title { font-weight: 600; margin: 0 0 8px; }
.tech-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tech-column { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: grid; gap: 6px; align-content: start; }
.tech-column.is-off { background: var(--warn-bg); }
.tech-column-head { display: grid; gap: 1px; margin-bottom: 2px; }
.tech-column-head .muted, .tech-off { font-size: 0.8rem; }
/* Folding (public/technicians.js, Mitch Nov 13 2026): customers in Jobs to
   Schedule and each tech on the board fold up to one line. */
.tech-column-name { display: grid; gap: 1px; font-weight: 400; }
.tech-column-name > span:first-child { font-weight: 700; }
.tech-column.folded { padding: 8px 10px; }
.tech-columns { align-items: start; }
/* Tech box outline colors (public/technicians.js outlineOf, Mitch Nov 13 2026). */
.tech-column.tc-green, .tech-column.tc-blue, .tech-column.tc-orange, .tech-column.tc-yellow, .tech-column.tc-red { border: 3px solid var(--tc); }
.tech-column.tc-green.folded, .tech-column.tc-blue.folded, .tech-column.tc-orange.folded, .tech-column.tc-yellow.folded, .tech-column.tc-red.folded { padding: 6px 8px; }
.tech-column.tc-green, .tech-column.tc-blue, .tech-column.tc-orange, .tech-column.tc-yellow, .tech-column.tc-red { background: color-mix(in srgb, var(--tc) 13%, var(--surface)); }
.tech-card.tc-green, .tech-card.tc-blue { border: 2px solid var(--tc); background: color-mix(in srgb, var(--tc) 13%, var(--surface)); }
.tech-card.assigned.tc-green { border-style: dashed; }
.tc-green { --tc: var(--st-green); } .tc-blue { --tc: var(--st-blue); } .tc-orange { --tc: var(--st-orange); } .tc-yellow { --tc: var(--st-yellow); } .tc-red { --tc: var(--st-red); }
.tc-key { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; font-size: 0.8rem; color: var(--muted); }
.tc-key-item { display: inline-flex; align-items: center; gap: 4px; }
.tc-key-item::before { content: ''; width: 12px; height: 12px; border: 3px solid var(--tc); border-radius: 3px; box-sizing: border-box; }
.tech-day-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.tech-day-head .tech-day-title { margin: 0 auto 0 0; }
.tech-cust { display: grid; gap: 6px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.tech-cust > .section-toggle { flex-wrap: wrap; row-gap: 2px; }
.tech-cust > .section-toggle .tech-scheduled { font-weight: 400; }
.tech-cust-jobs { display: grid; gap: 6px; padding-bottom: 2px; }
.tech-off { color: var(--warn-text); font-weight: 600; }
.tech-empty { margin: 0; font-size: 0.85rem; }
.tech-card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; font-size: 0.88rem; display: grid; gap: 2px; }
.tech-with { font-size: 0.78rem; color: var(--brand); }
.tech-time { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.tech-time.shop-note { white-space: pre-line; overflow-wrap: anywhere; }
.tech-time.sent { color: var(--ok); }
.tech-time.waiting { color: var(--warn-text); background: var(--warn-bg); border-radius: 6px; padding: 4px 6px; }
.tech-card-actions { display: flex; gap: 4px; margin-top: 4px; }
.delivery-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--pill-bg); color: var(--pill-text); font-size: 0.7rem; font-weight: 700; vertical-align: 1px; }
.tech-card.shop { border-left: 4px solid var(--muted); }
.delivery-choice { margin-top: 8px; }
.tech-view.time-only { grid-template-columns: 1fr; }
.time-work { display: grid; gap: 4px; margin-top: 12px; }
.time-work textarea { font: inherit; font-size: 1rem; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 100%; resize: vertical; }
.test-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--warn-bg); color: var(--warn-text); font-size: 0.7rem; font-weight: 700; vertical-align: 1px; }

/* Technician's screen (works on phones, tablets and laptops) */
.tech-main { max-width: 1000px; margin: 0 auto; padding: 20px 16px; }
.not-owner .owner-only { display: none !important; }
.view-as { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; background: var(--warn-bg); color: var(--warn-text); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 0.9rem; }
.view-as-pick .combo { width: 220px; }
.view-as-pick input { color: var(--text); }
.tech-view { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
@media (max-width: 720px) { .tech-view { grid-template-columns: 1fr; } }
.tech-forms { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.tech-form-list { display: grid; gap: 6px; margin-top: 8px; }
.tech-add-unit { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.tech-add-unit input { width: 100%; }
.tech-add-unit .actions { flex-wrap: wrap; }
.tech-add-unit .actions .button { white-space: nowrap; }
.tech-delete-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tech-form { text-align: left; font: inherit; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; min-height: 44px; }
.tech-form:hover { border-color: var(--brand); }
.tech-form.picked { border: 2px solid var(--brand); padding: 11px; font-weight: 600; }
/* Forms not filled in yet are blue like the other buttons. */
.tech-form:not(.done) { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
.tech-form:not(.done).picked { border-color: var(--text); }
.tech-job-detail { display: grid; gap: 12px; }
.tech-job-detail .card { margin: 0; }
.tech-job-customer { font-weight: 700; font-size: 1.15rem; margin: 0 0 4px; }
.tech-job-top { margin: 12px 0 0; }
.tech-job-memo { float: right; margin: 2px 0 4px 12px; padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.tech-job-memo.with-hours { border-radius: 10px; text-align: center; padding: 3px 10px; }
.tech-job-hours { display: block; font-weight: 500; font-size: 0.8rem; }
.tech-job-hours.over, .tech-hours-line.over { color: var(--danger); font-weight: 700; }
.tech-hours-line { font-weight: 600; }
.tech-job-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-job-buttons .button { margin-top: 10px; min-height: 40px; }
.tech-view.filling { grid-template-columns: minmax(0, 1fr); }
.tech-view.filling .tech-forms { display: none; }
.tech-details { display: grid; gap: 12px; margin-top: 12px; }
.tech-details .card { margin: 0; }
.tech-detail-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 8px; line-height: 1.5; }
.tech-detail.office-note { background: var(--warn-bg); border-color: var(--warn-text); }
.tech-detail.office-note h3 { color: var(--warn-text); }
.tech-next { min-width: 160px; min-height: 44px; font-size: 1rem; }
.tech-column-links { display: flex; gap: 12px; align-items: center; margin-top: 4px; }

/* ---- Technician service form (tech-form.js) ---- */
.tech-form.done { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.tech-form-note { display: block; font-size: 0.78rem; font-weight: 400; color: var(--ok); margin-top: 2px; }
/* Schedule > Pick a Day: our own calendar pop-up (public/tech-site.js) */
.cal-card { max-width: 380px; }
.cal-card p { margin: 6px 0 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head .button { min-width: 44px; font-size: 1.2rem; line-height: 1; }
.cal-month { font-size: 1.05rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--muted); padding: 2px 0; }
.cal-day { aspect-ratio: 1; min-height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.cal-day:hover:not(:disabled) { border-color: var(--brand); }
.cal-day.today { border: 2px solid var(--brand); }
.cal-day.picked { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
.cal-day.mine { background: var(--ok-bg); color: var(--ok); }
.cal-day:disabled { opacity: 0.35; cursor: default; }
.cal-day.mine:disabled { opacity: 0.8; }
.cal-actions { justify-content: flex-end; margin-top: 12px; }
.tech-form.look-only { cursor: default; } /* Site job Look screen: shown, not opened */
.tech-form.look-only.done:hover { border-color: var(--ok); }
.tech-form.look-only:not(.done):hover { border-color: var(--brand); }
.tech-form-note.reopened { color: var(--st-red-text); font-weight: 600; }
.tf-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.tf-top h3 { flex: 1; min-width: 160px; }
.tf-saved { font-size: 0.8rem; color: var(--muted); }
.tf-section { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 14px; }
.tf-section h4 { margin: 0 0 8px; font-size: 0.95rem; }
.tf-ro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 0.92rem; }
.tf-ro > div { display: grid; gap: 1px; overflow-wrap: anywhere; }
.tf-ro > div > span:first-child { color: var(--muted); font-size: 0.78rem; }
.tf-ro .button { justify-self: start; margin-top: 4px; }
.tf-ro .tf-ro-button { border-color: var(--brand); margin-top: 2px; text-align: left; white-space: normal; line-height: 1.3; }
.tf-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.tf-unit + .tf-unit { margin-top: 12px; }
.tf-unit-title { margin: 0 0 6px; font-weight: 600; font-size: 0.88rem; }
.tf-box { display: grid; gap: 3px; font-size: 0.85rem; }
.tf-label { color: var(--muted); }
.tf-box input, .tf-box textarea, .tf-mat input, .tf-mat-line select, .tf-other input[type=text], .tf-quote-part > input {
  font: inherit; font-size: 1rem; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); width: 100%; box-sizing: border-box; min-height: 42px;
}
.tf-box textarea { resize: vertical; min-height: 110px; line-height: 1.4; }
/* Short Description: the unit's Type fixed at the front (public/tech-form.js, Mitch Nov 14 2026). */
.tf-fixed-wrap { display: flex; align-items: stretch; }
.tf-fixed-unit { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border); border-right: none; border-radius: 6px 0 0 6px;
  background: var(--bg); color: var(--text); font-size: 1rem; font-weight: 600; white-space: nowrap; }
.tf-fixed-wrap > input { flex: 1; min-width: 0; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.tf-box input:disabled, .tf-box textarea:disabled, .tf-mat input:disabled, .tf-mat-line select:disabled, .tf-quote-part > input:disabled { background: var(--bg); color: var(--text); }
.tf-check { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 0.95rem; min-height: 32px; }
.tf-check input { width: 20px; height: 20px; }
/* Service form (Mitch, Nov 29 2026): every button the size of Tech Support
   (the same width side by side where it fits), and boxes that can be typed
   in a light blue; locked ones stay grey. */
#form-panel .button, #form-panel .button.small, #form-panel .tf-nav { padding: 9px 16px; font-size: 0.95rem; min-height: 40px; }
#form-panel .actions > .button, #form-panel .tf-photo-choices .button, #form-panel .tf-nav { min-width: 9.5rem; }
#form-panel .actions { flex-wrap: wrap; }
#form-panel .tf-photo-choices { max-width: 9.5rem; }
#form-panel .tf-box input:not(:disabled):not([readonly]), #form-panel .tf-box textarea:not(:disabled):not([readonly]),
#form-panel .tf-mat input:not(:disabled), #form-panel .tf-mat-line select:not(:disabled),
#form-panel .tf-other input[type=text]:not(:disabled), #form-panel .tf-quote-part > input:not(:disabled) {
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
}
#form-panel .tf-box textarea.tf-work-locked, #form-panel .tf-box input.tf-equip-locked { background: var(--bg); }
/* Part or material and Where From: the same dropdown arrow on both (public/tech-form.js partChoices;
   the Where From box's own arrow is turned off so the two match). */
#form-panel .tf-mat-line select:not(:disabled) { -webkit-appearance: none; appearance: none; }
#form-panel input.tf-dropdown:not(:disabled), #form-panel .tf-mat-line select:not(:disabled) {
  padding-right: 30px; background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Suggested wording pop-up: the wording in a box the tech can change (public/tech-form.js). */
.tf-suggest-dialog .s2-alert-box { width: min(560px, calc(100vw - 32px)); }
.tf-suggest-text { width: 100%; box-sizing: border-box; min-height: 150px; margin: 4px 0 8px; padding: 9px 10px; font: inherit; font-size: 1rem; line-height: 1.4;
  border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); resize: vertical; text-align: left; }
.tf-suggest-dialog .s2-alert-actions .button { min-width: 9.5rem; min-height: 40px; }
.tf-mat { display: grid; gap: 10px; margin-bottom: 10px; }
.tf-mat-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 44px; gap: 6px; align-items: center; }
.tf-mat-head { font-size: 0.78rem; color: var(--muted); }
/* The parts list under Part or material: a menu like the Where From dropdown's
   (Mitch, Nov 29 2026), floating over the form under the box (public/tech-form.js partChoices). */
.tf-mat-line, .tf-part-name { position: relative; }
.tf-choices { position: absolute; z-index: 30; display: grid; max-height: 300px; overflow-y: auto; padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; background: rgba(52, 54, 58, 0.94);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.tf-choices[hidden] { display: none; }
.tf-choice { position: relative; text-align: left; padding: 5px 12px 5px 30px; border: 0; border-radius: 5px; background: none;
  color: #fff; font: inherit; font-size: 1rem; line-height: 1.35; cursor: pointer; }
.tf-choice.picked::before { content: '\2713'; position: absolute; left: 10px; }
.tf-choice:hover, .tf-choice:focus { background: #0a64d6; color: #fff; outline: none; }
.tf-mat-line { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.tf-x { min-height: 42px; }
.tf-quote-tag { justify-self: start; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--warn-bg); color: var(--warn-text); }
.tf-problems ul, .tf-ask ul { margin: 6px 0 0; padding-left: 20px; }
.tf-problems p, .tf-ask p { margin: 0 0 4px; }
.tf-complete { min-width: 180px; min-height: 46px; font-size: 1rem; }
@media (max-width: 720px) {
  .tf-ro, .tf-grid2 { grid-template-columns: 1fr; }
}
/* Quoted parts the scope of work ties to this unit (green) or to another unit (grey) */
.tf-quote-tag.is-suggested { background: var(--ok-bg); color: var(--ok); }
.tf-quote-tag.is-other { background: var(--bg); color: var(--muted); }
.tf-mat-line.is-suggested { border-left: 4px solid var(--ok); padding-left: 8px; }
.tf-mat-line.is-suggested input { border-color: var(--ok); }
.tf-mat-line.is-other input { color: var(--muted); }
/* Step-by-step form: steps line, photos, Quote needed, Back / Next */
.tf-steps { margin: 2px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--brand); }
.tf-photos, .tf-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.tf-photo { display: grid; gap: 4px; align-content: start; }
.tf-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); }
.tf-photo-name { font-size: 0.82rem; overflow-wrap: anywhere; }
.tf-waiting { color: var(--warn-text); }
.tf-photo-actions, .tf-photo-buttons, .tf-rename { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-photo-buttons { margin-top: 8px; }
.tf-rename input { flex: 1 1 120px; min-width: 0; font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.tf-slot { border: 1px dashed var(--border); border-radius: 8px; padding: 8px; display: grid; gap: 6px; align-content: start; }
.tf-slot-label { margin: 0; font-weight: 600; font-size: 0.85rem; }
.tf-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.tf-pick-photo { display: grid; gap: 2px; padding: 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font: inherit; font-size: 0.72rem; cursor: pointer; text-align: left; }
.tf-pick-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.tf-pick-photo:hover { border-color: var(--brand); }
.tf-followups { margin-top: 6px; }
.tf-followups > p { margin: 8px 0 0; }
.tf-quote-part { display: grid; gap: 6px; grid-column: 1 / -1; border: 1px dashed var(--border); border-radius: 8px; padding: 10px; background: var(--surface); }
.tf-quote-part.shaded { background: var(--shaded); }
.tf-part-name { display: grid; gap: 6px; }
.tf-quote-part .tf-label { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.tf-slot.bare { border: 0; padding: 0; }
.tf-quote-part .tf-photo { max-width: 220px; }
.tf-quote-part .tf-label .req { font-weight: normal; }
.tf-photo-choices { display: grid; gap: 6px; max-width: 260px; }
.tf-quote-part > .button { justify-self: start; }
.tf-photo-choices .button { text-align: left; }
.tf-nav-row { justify-content: space-between; align-items: flex-start; margin-top: 18px; }
.tf-nav { min-width: 120px; min-height: 46px; font-size: 1rem; }
.tf-nav-row .tf-nav:only-child, .tf-nav-row .tf-nav-end:only-child { margin-left: auto; }
.tf-nav-end { margin: 0; justify-content: flex-end; flex-wrap: wrap; }
.tf-done-hint { text-align: right; margin-top: 6px; }
/* Quote: name suggestion, labor lines, crew choices */
.tf-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 0.88rem; padding: 6px 10px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); }
.tf-labor { display: grid; gap: 8px; margin-bottom: 10px; }
.tf-labor-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 44px; gap: 6px; align-items: center; }
.tf-labor-row select, .tf-labor-row input { font: inherit; font-size: 1rem; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); min-height: 42px; width: 100%; box-sizing: border-box; }
.tf-other { display: grid; gap: 4px; }
.tf-other input[type=text] { margin-left: 30px; max-width: 420px; width: calc(100% - 30px); }
.tf-crew { border-top: 1px solid var(--border); padding-top: 8px; }
.tf-crew .tf-check input { width: 20px; height: 20px; }
.tf-receipt-btn { justify-self: start; min-width: 160px; }
.tf-general-choices { display: grid; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }

/* Technician home and pay stubs */
/* Home boxes: all the same size, buttons at the bottom of each. */
.tech-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 1fr; gap: 16px; margin-top: 12px; }
.tech-box { display: flex; flex-direction: column; min-height: 200px; }
.tech-box-body { margin-top: 10px; flex: 1; display: flex; flex-direction: column; }
.tech-box-body p { margin: 0 0 6px; overflow-wrap: anywhere; }
.tech-box-body .actions { margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
/* My Open Jobs (Dedicated Site techs): the whole width, one row per job. */
.tech-box-wide { grid-column: 1 / -1; min-height: 0; }
.tech-home-grid:has(.tech-box-wide) { grid-auto-rows: auto; }
.tech-open-job { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.tech-open-job p { margin: 0 0 2px; }
.tech-home-btn { margin-bottom: 12px; }
.stub-group h3 { margin: 20px 0 8px; }
.rows .row.stub-row { align-items: center; }
.stub-name { overflow-wrap: anywhere; }

/* Enter Time */
.time-card { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; }
.time-heading { text-align: center; margin: 0; }
.center { text-align: center; }
.time-block { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: var(--bg); border-radius: 8px; padding: 12px; }
.time-block .field { display: grid; gap: 4px; }
.time-block input { width: 100%; }
@media (max-width: 480px) { .time-block { grid-template-columns: 1fr 1fr; } .time-block .field:last-child { grid-column: 1 / -1; } }
.time-question { display: grid; gap: 8px; background: var(--warn-bg); color: var(--warn-text); border-radius: 8px; padding: 10px 12px; }
.time-question .actions { margin-top: 0; }
.time-total { font-weight: 700; font-size: 1.05rem; margin: 0; }
.time-split { margin: 4px 0 0; padding-left: 20px; }
.time-actions { justify-content: center; }

/* Suggested wording and Tech Support (ChatGPT) */
.tf-wording { margin-top: 10px; background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; }
.tf-wording-text { white-space: pre-wrap; }
.tf-wording .actions { margin-top: 4px; }
.tech-support { display: grid; gap: 10px; }
.rundown-body { display: grid; gap: 12px; }
.rundown-section h4 { margin: 0 0 4px; }
.rundown-section h5 { margin: 10px 0 2px; font-size: 0.95em; }
.rundown-section ul, .rundown-check ul { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.rundown-section .button.small { margin-top: 4px; }
.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 4px 0; }
.chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); }
.chat-msg.me { align-self: flex-end; background: var(--brand); color: var(--brand-text); }
.chat-msg.muted { color: var(--muted); }
.chat-input { display: grid; gap: 8px; }
.chat-input textarea { width: 100%; }
.chat-input .actions { margin-top: 0; }
.chat-attach { display: flex; align-items: center; gap: 8px; }
.chat-attach img { max-height: 90px; border-radius: 6px; }
.chat-foot { border-top: 1px solid var(--border); padding-top: 8px; display: grid; gap: 6px; }

/* My Dashboard (office logins): the tech Home boxes */
.my-time-form.form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.my-time-form .field { display: grid; gap: 4px; }
.my-time-form input, .my-time-form .combo { width: 100%; }
.my-week { display: grid; gap: 2px; margin: 10px 0 6px; font-size: 0.92rem; }
.my-week > div { display: flex; justify-content: space-between; }
.my-week-total { border-top: 1px solid var(--border); padding-top: 4px; font-weight: 600; }

/* The S2.0 badge as a faint watermark on every screen (Mitch, Oct 28 2026):
   fixed in the middle, over the page but see-through and never in the way of
   a click. Not printed. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/brand/badge.png') center / min(55vmin, 440px) no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 9999;
}
/* Dark Mode (Mitch, Oct 29 2026): the green 2.0 stays green, the S and the
   building white, the circle the screen's dark color with a white ring. */
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] body::after { opacity: 0.1; background-image: url('/brand/badge-dark.png'); } }
:root[data-theme="dark"] body::after { opacity: 0.1; background-image: url('/brand/badge-dark.png'); }
@media print { body::after { display: none; } }

/* A scanned equipment sticker (/e/<code>) */
.scan-card { max-width: 480px; }
.scan-code { text-align: center; margin: 0 0 16px; font-weight: 600; letter-spacing: 0.05em; }
.scan-actions { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.scan-actions .button { width: 100%; text-align: center; padding: 14px; font-size: 1.05rem; }
.scan-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.scan-site { text-align: center; margin: 0 0 12px; }
.scan-unit { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
.scan-unit strong { display: block; margin-bottom: 6px; }
.scan-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.scan-line span:last-child { text-align: right; overflow-wrap: anywhere; }
.scan-staff h3 { margin: 16px 0 8px; }
.requests-box { margin-bottom: 20px; }
.request-item { border: 1px solid var(--border); border-left: 4px solid #8bc640; border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
/* Home Time Off (Mitch, Nov 9 2026): yellow = to do, green = done. */
.request-item.to-new { border-left: 8px solid var(--st-yellow); }
.request-item.to-done { border-left: 8px solid var(--st-green); background: var(--ok-bg); }
.to-status { margin: 4px 0; font-weight: 700; color: var(--ok); }
.to-others { margin: 6px 0; font-size: 0.9rem; }
.to-others strong { display: block; }
#time-off-box.to-has-new > h3, #time-off-box.to-has-done > h3 { border-left: 6px solid var(--st-yellow); padding-left: 8px; border-radius: 3px; }
#time-off-box.to-has-done > h3 { border-left-color: var(--st-green); }
.request-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.request-message { margin: 6px 0; white-space: pre-wrap; }
.request-actions { display: flex; gap: 8px; flex-wrap: wrap; }
:root[data-theme="dark"] .scan-logo { content: url('/brand/logo-white.png'); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .scan-logo { content: url('/brand/logo-white.png'); } }
.request-from { margin-top: 4px; }

/* Tag a Unit (tech-tag.html) */
.tag-card { display: grid; gap: 12px; }
.tag-pick, .tag-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pick .button, .tag-steps .button { flex: 1 1 120px; }
.tag-part { display: grid; gap: 12px; }
.tag-card select { padding: 10px; font-size: 1rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.type-uses { border: 0; padding: 0; margin: 0; display: grid; gap: 2px; } .type-uses legend { font-size: 0.85rem; font-weight: 600; padding: 0; }
.scan-directions { margin-top: 8px; display: inline-block; }
.van-row { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; }
.van-head { display: flex; justify-content: space-between; gap: 8px; }
.van-count { font-weight: 600; }
.van-range { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--border); margin-top: 4px; }
.tech-sticker-count { font-size: 2rem; font-weight: 700; margin: 0; }
.code-box { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); overflow: hidden; }
.code-prefix { display: flex; align-items: center; padding: 0 4px 0 10px; font-weight: 700; color: var(--text); }
.code-box input { border: 0; flex: 1; min-width: 0; padding-left: 2px; background: transparent; }
.code-box:focus-within { outline: 2px solid var(--brand); outline-offset: -1px; }
.give-note { margin: 8px 0 0; color: var(--err-text); background: var(--err-bg); padding: 8px 12px; border-radius: 6px; }
section[data-collapse] .section-body > :first-child { margin-top: 10px; }
.section-toggle .small-note { color: var(--muted); }
.tag-hint { margin: 0; color: var(--muted); font-size: 0.82rem; font-style: italic; }
.tag-outdoor-left { color: var(--warn-text); font-weight: 600; } /* Tag the Outdoor Unit Later: still to do */

/* Get the App (public/app.html) */
.app-lead { text-align: center; }
.app-steps { padding-left: 22px; margin: 8px 0 16px; line-height: 1.5; }
.app-steps li { margin-bottom: 10px; }
.app-share { width: 22px; height: 22px; vertical-align: -4px; color: #007aff; }
.app-where { display: block; font-size: 0.92rem; }
.app-qr { display: block; margin: 8px auto 16px; width: 240px; max-width: 100%; height: auto; background: #fff; border-radius: 8px; }

/* Done for Today (tech.js): why the job isn't finished, and a visit note per open form. */
.tech-done-today { margin-top: 14px; }
.tech-reasons .button { flex: 1 1 160px; }
.tech-visit-note { display: block; margin-top: 12px; }
.tech-visit-note textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; }

/* Technicians page: a Dedicated Site tech's open jobs under their day. */
.tech-open-head { margin: 12px 0 6px; font-weight: 600; border-top: 1px solid var(--border); padding-top: 10px; }
.tech-card.assigned { border-style: dashed; }
.assign-wrap { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.tech-visit-note select, .tech-visit-note input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; }
.tech-visit-note input { margin-top: 8px; }

/* Service form: the Unit Tag hint under Type ("RTU-" -> "RTU-A2"). */
.tf-hint { color: var(--warn-text); font-size: 0.8rem; }
.tf-hint[hidden] { display: none; }

/* Notifications not on yet for this phone (tech Home): first box, outlined. */
.tech-box.notify-needed { border-width: 3px; background: var(--pill-bg); }
.notify-settings .actions { flex-wrap: wrap; }

/* Change a Sticker: new sticker left, old one right, side by side even on a phone. */
.sticker-swap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.sticker-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; }
.sticker-side .button { width: 100%; }
.sticker-side input { width: 100%; box-sizing: border-box; text-transform: uppercase; }
.sticker-result p { margin: 0 0 4px; overflow-wrap: anywhere; }
.sticker-result.ok { color: var(--ok); }
.sticker-result.ok strong, .sticker-result.ok .small-note { color: var(--text); }
.sticker-result.error { color: var(--err-text); font-size: 0.9rem; }
.sticker-confirm { margin-top: 12px; }

/* Tech Home: every box outlined in the button blue (Mitch, Oct 30 2026).
   Hold a box, then drag it (tech-home.js); the job box stays first. */
.tech-home-grid .tech-box { border: 1.5px solid var(--brand); }
.tech-home-grid.can-move .tech-box:not(#job-box) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tech-home-grid .tech-box.dragging { opacity: 0.92; transform: scale(1.03); box-shadow: 0 12px 28px rgba(11, 92, 173, 0.35); position: relative; z-index: 5; }
.tech-move-hint { text-align: center; margin-top: 14px; }

/* Techs' help: the "?" next to a title, and its panel (public/help.js). */
.help-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: 6px; padding: 0; border-radius: 50%; border: 1.5px solid var(--brand); background: var(--surface); color: var(--brand); font: 700 14px/1 inherit; vertical-align: middle; cursor: pointer; }
.help-btn:hover, .help-btn:focus-visible { background: var(--brand); color: var(--brand-text); }
.help-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 28, 0.45); display: flex; align-items: flex-end; justify-content: center; padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
.help-panel { width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; background: var(--surface); color: var(--text); border-radius: 14px; padding: 16px; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25); }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-steps { margin: 12px 0; padding-left: 20px; display: grid; gap: 8px; }
.help-ask { border-top: 1px solid var(--border); padding-top: 12px; display: grid; gap: 8px; }
.help-ask textarea { width: 100%; box-sizing: border-box; font: inherit; }
.help-answer { background: var(--pill-bg); border-radius: 8px; padding: 10px 12px; }
.help-answer p { margin: 0 0 6px; }
.help-answer p:last-child { margin-bottom: 0; }
.help-row { align-items: flex-start; }
.help-row p + p { margin-top: 3px; }

/* My Sticker Log (Change a Sticker > Log). */
.sticker-log { display: grid; gap: 0; }
.sticker-log-row { padding: 10px 0; border-top: 1px solid var(--border); display: grid; gap: 2px; }
.sticker-log-row:first-child { border-top: 0; padding-top: 0; }
.sticker-kind { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; vertical-align: 1px; }
.sticker-kind.tagged { background: var(--ok-bg); color: var(--ok); }
.sticker-kind.changed { background: var(--pill-bg); color: var(--pill-text); }

/* Request Time Off (tech, public/tech-time-off.*): one row per day. */
.time-off-kind { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; }
.time-off-kind legend { font-weight: 700; margin-bottom: 4px; }
.time-off-day { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.time-off-day .field { flex: 1 1 140px; margin: 0; }
.time-off-total { font-weight: 700; margin: 10px 0 0; }
/* My Time (tech-time-log.js) */
.time-log-week { margin-bottom: 14px; }
.time-log-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.time-log-day { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.time-log-entry { padding: 6px 0 0 12px; }
.time-off-form .field { display: grid; gap: 4px; }
.time-off-form .field input, .time-off-form .field select { width: 100%; box-sizing: border-box; }
/* Settings > Vacation Balances: start date, hours/year, hours now per person. */
.vacation-row { flex-wrap: wrap; gap: 8px; }
.vacation-inputs { flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.vacation-field { display: grid; gap: 2px; font-size: 0.8rem; color: var(--muted); }
.vacation-field input[type="text"] { width: 4.5em; }

/* Messages page (public/messages.*): who a message goes to. */
.message-to { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.message-to legend { font-weight: 700; margin-bottom: 4px; }
.message-people { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-left: 4px; }
.message-sent strong { white-space: pre-wrap; font-weight: 600; }
/* Messages box on Home: unread ones stand out. */
.home-message { padding: 6px 0; border-bottom: 1px solid var(--border); white-space: pre-wrap; }
.home-message:last-child { border-bottom: 0; }
.home-message.unread { font-weight: 700; }
/* Tech Home's Messages box stays the size of the other boxes; long messages
   scroll inside it (Mitch, Nov 2 2026). */
#messages { flex: 0 1 auto; max-height: 120px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.message-to .tf-check { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.message-to .tf-check input { margin: 0; }

/* A slider (Settings > Notifications): an on/off switch with its label. */
.switch-row { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-knob { position: absolute; inset: 0; border-radius: 26px; background: var(--border); transition: background 0.15s; }
.switch-knob::before { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: transform 0.15s; }
.switch input:checked + .switch-knob { background: var(--brand); }
.switch input:checked + .switch-knob::before { transform: translateX(20px); }
.switch input:disabled + .switch-knob { opacity: 0.5; }
.switch input:focus-visible + .switch-knob { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Scan page: Staff Sign In under Request Service, quiet. */
.scan-staff-signin { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--border); text-align: center; }
/* Tech Home: Scan a Sticker's typed code with its Open button. */
.scan-type { display: grid; gap: 4px; margin-top: 10px; font-size: 0.9rem; }
.scan-type-row { display: flex; gap: 8px; }
.scan-type-row input { flex: 1; min-width: 0; }
/* Scan Sticker: the live camera view, full screen. */
.scan-live { position: fixed; inset: 0; z-index: 10000; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 16px max(24px, env(safe-area-inset-bottom)); gap: 12px; }
.scan-live video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-live-frame { position: absolute; top: 50%; left: 50%; width: min(64vw, 280px); aspect-ratio: 1; transform: translate(-50%, -55%); border: 3px solid #fff; border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35); }
.scan-live-hint { position: relative; color: #fff; text-align: center; margin: 0; font-weight: 600; text-shadow: 0 1px 3px #000; max-width: 420px; }
.scan-live .button { position: relative; min-width: 160px; }

/* New message pop-up (public/message-popup.js): over everything, one blue OK. */
.message-popup { position: fixed; inset: 0; z-index: 10001; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.message-popup-card { width: 100%; max-width: 440px; max-height: 85vh; overflow-y: auto; margin: 0; }
.message-popup-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.message-popup-item:last-of-type { border-bottom: 0; }
.message-popup-text { white-space: pre-wrap; font-size: 1.05rem; margin: 0 0 6px; }
.message-popup-from { font-weight: 700; margin: 0 0 4px; }
.message-popup-ok { min-width: 120px; }

/* Settings > Logins: a setup link shown as a big QR code to scan. */
.qr-popup { position: fixed; inset: 0; z-index: 10001; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.qr-popup-card { width: 100%; max-width: 480px; text-align: center; margin: 0; }
.qr-popup-code { display: block; width: min(100%, 360px); height: auto; margin: 16px auto; background: #fff; border-radius: 8px; }
.qr-popup-card .actions { justify-content: center; }
/* My Job: the site's Directions and Call buttons under the job line. */
.tech-job-site { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.tech-job-site .tf-ro-button { border-color: var(--brand); text-align: left; white-space: normal; line-height: 1.3; }

/* Workers' Comp (public/workers-comp.*): totals by class code. */
.comp-class { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.comp-class-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.comp-person { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 0 4px 12px; border-top: 1px solid var(--border); font-size: 0.92rem; }
.comp-total { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-top: 6px; background: var(--shaded); border-radius: 8px; }
.comp-pay { flex-wrap: wrap; align-items: center; gap: 6px; }
.comp-period-row { margin-top: 10px; }
.comp-period { font-weight: 700; }

/* Pricing request (public/pricing.*): the choices on the left, the email on the right. */
.pricing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-grid textarea, .pricing-supplier select { width: 100%; box-sizing: border-box; }
/* Part (wide), Qty (narrow), Remove: like the Build page's part rows (Nov 28 2026). */
.pricing-part { display: grid; grid-template-columns: minmax(0, 1fr) 80px auto; gap: 8px; align-items: center; margin: 6px 0; }
.pricing-left .pricing-part input { width: 100%; min-width: 0; }
.pricing-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.pricing-photo { display: grid; gap: 4px; font-size: 0.85rem; }
.pricing-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--shaded); }
.in-dialog .topbar, .in-dialog .sidebar, .in-dialog #back, .in-dialog #writeup-box, .in-dialog .menu-toggle { display: none !important; }
.in-dialog .layout { display: block; }
.in-dialog main { padding: 12px; max-width: none; }
.pricing-wording { display: grid; gap: 6px; margin-bottom: 10px; }
.pricing-wording textarea { width: 100%; box-sizing: border-box; font: inherit; line-height: 1.4; }
.pricing-preview { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 8px; background: #f4f6f8; }
.pricing-send { margin-top: 18px; }

/* Quotes tab (public/quotes.*, public/quote.*) */
.quote-search { display: block; max-width: 360px; margin: 8px 0 12px; }
.quote-pricing { display: grid; gap: 0; border: 1px solid var(--brand); border-radius: 8px; overflow: hidden; }
.quote-list { display: grid; gap: 16px; margin-top: 12px; }
.quote-pricing { margin-top: 8px; }
.quote-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.quote-row:last-child { border-bottom: none; }
.quote-row-main { display: grid; gap: 2px; min-width: 0; }
.quote-row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.quote-reply { padding-left: 28px; background: var(--shaded, rgba(0,0,0,0.03)); }
.quote-list > p, .quote-pricing > p { padding: 12px; margin: 0; }
.quote-tag { display: inline-block; font-size: 0.72rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); vertical-align: 2px; margin-left: 4px; }
.quote-tag.tech { border-color: var(--brand); color: var(--brand); }
.quote-tag.test { border-color: var(--warn-text); color: var(--warn-text); }
.quote-warn { color: var(--warn-text); }
.quote-stage { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--brand); color: var(--brand-text); font-size: 0.85rem; }
.quote-stage-line { margin-top: 8px; }
.quote-request { white-space: pre-wrap; font: inherit; font-size: 0.9rem; margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.quote-status { display: grid; gap: 4px; margin: 8px 0 12px; font-size: 0.92rem; }
.quote-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.quote-photo { display: grid; gap: 4px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; overflow: hidden; text-align: left; }
.quote-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.quote-photo span { padding: 0 8px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .quote-row { flex-direction: column; align-items: stretch; } .quote-row-actions { justify-content: flex-start; } }
.quote-search input { width: 100%; }

/* File viewer (public/view.*): a Back button over the PDF, for the Home Screen app. */
.viewer-page { background: var(--bg); }
.viewer-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); background: #111; color: #fff; }
.viewer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.viewer-pages { display: grid; justify-items: center; gap: 12px; padding: 12px 8px 40px; }
.viewer-page-canvas { max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }

/* Tech Home's Search and My Files boxes (public/tech-library.js; Mitch, Nov 2 2026) */
.tech-home-grid:has(.tech-box-wide) { grid-auto-rows: auto; }
.tech-search-row { display: flex; gap: 8px; margin: 8px 0 12px; flex-wrap: wrap; }
.tech-search-row input[type=search] { flex: 1; min-width: 180px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.tech-list { display: grid; gap: 0; }
.tech-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 4px; border-top: 1px solid var(--border); }
.tech-row:nth-child(even) { background: var(--shaded); }
.tech-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.tech-row-text input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 16px; background: var(--surface); color: var(--text); }
.tech-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tech-folder-head { margin: 0 0 8px; }
.tech-folder-name { margin: 0 0 6px; overflow-wrap: anywhere; }
/* My Files: drop files on the box (computers) */
#files-box.drop-on { outline: 3px dashed var(--brand); outline-offset: -6px; background: var(--shaded); }
.drop-hint { display: none; }
@media (hover: hover) and (pointer: fine) { .drop-hint { display: inline; } }

/* CSD-1 on My Job (public/tech-csd.js; Mitch, Nov 2 2026) */
.tech-csd-title { margin-top: 18px; }
.csd-head { margin-bottom: 8px; }
.csd-unit { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.csd-rows { display: grid; }
.csd-row { display: grid; grid-template-columns: minmax(130px, 1.3fr) 1fr 1fr 0.8fr 0.9fr auto; gap: 6px 8px; align-items: start; padding: 8px 4px; border-top: 1px solid var(--border); }
.csd-row.is-na { opacity: 0.8; }
.csd-row.csd-test { grid-template-columns: 2fr 0.9fr auto; }
.csd-label { font-weight: 700; padding-top: 8px; }
.csd-row.csd-headrow { padding: 2px 4px; border-top: 0; background: none; }
.csd-row:not(.csd-headrow) .csd-col { display: none; }
.csd-rows > .csd-row:nth-child(odd):not(.csd-headrow) { background: var(--shaded); }
.csd-rows > .csd-row:nth-child(even) { background: none; }
.csd-box { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.csd-box input { width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.csd-box input:disabled { background: var(--bg); }
.csd-box input::placeholder { color: var(--muted); opacity: 0.7; }
.csd-col { font-size: 0.75rem; color: var(--muted); }
.csd-last { align-self: flex-start; border: 0; background: none; padding: 2px 0; color: var(--brand); font: inherit; font-size: 0.8rem; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.csd-results { display: flex; gap: 4px; }
.csd-result { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.csd-result.on.pass { background: #1f7a3a; border-color: #1f7a3a; color: #fff; }
.csd-result.on.fail { background: #b42318; border-color: #b42318; color: #fff; }
.csd-result.on.na { background: var(--muted); border-color: var(--muted); color: #fff; }
.csd-foot textarea, .tf-section textarea { width: 100%; }
@media (max-width: 760px) {
  .csd-row.csd-headrow { display: none; }
  .csd-row:not(.csd-headrow) .csd-col { display: inline; }
  .csd-row { grid-template-columns: 1fr 1fr; }
  .csd-label { grid-column: 1 / -1; padding-top: 0; }
  .csd-row > .csd-box:last-child { grid-column: 1 / -1; }
  .csd-row.csd-test { grid-template-columns: 1fr 1fr; }
  .csd-row.csd-test > .csd-box.wide { grid-column: 1 / -1; }
}

/* New Job: New Customer / Add Sub-Customer */
.customer-buttons { margin-top: 6px; }
#customer-form label { display: block; margin-bottom: 8px; }
#customer-form label input, #customer-form label select { display: block; width: 100%; margin-top: 3px; }
#customer-form .field-row label { flex: 1; min-width: 0; }

/* Customer Signature on the service form */
.tf-sig-pad { display: block; width: 100%; max-width: 600px; aspect-ratio: 3 / 1; margin: 4px 0 8px; border: 1.5px solid var(--brand); border-radius: 8px; background: #fff; touch-action: none; }
.tf-sig-image { display: block; max-width: 300px; width: 100%; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

.schedule-note { display: grid; gap: 4px; }
.schedule-note textarea { width: 100%; box-sizing: border-box; font: inherit; }
/* Visit reminder email (Technicians > Schedule). */
.reminder-wrap { border: 1px solid var(--border, #dde3e9); border-radius: 8px; padding: 10px 12px; }
.reminder-wrap .actions { margin: 0; }
.reminder-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.reminder-add input { flex: 1 1 160px; min-width: 0; }
.reminder-pick { display: inline-flex; align-items: center; gap: 2px; }
.reminder-editor { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: none; gap: 10px; box-sizing: border-box; }
.reminder-editor[open] { display: grid; }
.reminder-editor::backdrop { background: rgba(0, 0, 0, 0.35); }
.reminder-editor input, .reminder-editor textarea { width: 100%; box-sizing: border-box; font: inherit; }
.reminder-frame { width: 100%; height: 420px; border: 1px solid var(--border); border-radius: 8px; background: #f4f6f8; }

/* Quote Build page */
.qb-wide { display: block; max-width: 420px; margin-top: 8px; }
.qb-wide select { width: 100%; }
.qb-row { display: grid; gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--border); }
.qb-row:last-child { border-bottom: none; }
.qb-row label { display: grid; gap: 4px; font-size: 0.85rem; min-width: 0; }
.qb-row input, .qb-row select { width: 100%; min-width: 0; }
.qb-labor { grid-template-columns: 2fr 0.6fr 0.6fr 0.6fr; }
.qb-part { grid-template-columns: 2fr 1.2fr 0.6fr 0.8fr 0.7fr 1.2fr 0.8fr auto; }
.qb-sell { display: grid; gap: 4px; }
.qb-part-actions { display: flex; gap: 6px; align-items: center; }
.qb-part-actions .icon-button { height: 30px; }
.qb-qtys { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.qb-qtys label { display: grid; gap: 4px; font-size: 0.85rem; }
.qb-qtys input { width: 100%; }
.qb-total { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.qb-total.big { font-size: 1.15rem; padding: 6px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 4px 0; }
@media (max-width: 900px) { .qb-part { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .qb-labor { grid-template-columns: 1fr 1fr 1fr; } .qb-labor label:first-child { grid-column: 1 / -1; } }
#build.form { max-width: none; display: block; }
#build .card { margin-bottom: 14px; }
#build select { background-color: var(--bg); }
.qb-part { padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.qb-part:nth-child(even) { background: var(--bg); }
.qb-remove { background: var(--err-bg); color: var(--err-text); border-color: var(--err-text); }
#build input, #build textarea { background-color: color-mix(in srgb, var(--pill-bg) 55%, var(--surface)); }
#build input, #build select { height: 42px; box-sizing: border-box; }
.qb-sub { margin: 12px 0 0; }
.qb-consumables { grid-template-columns: repeat(3, minmax(0, 180px)); border-bottom: none; }
#build input[readonly] { background-color: var(--bg); color: var(--text); cursor: default; }
.qb-qtys label { grid-template-rows: 1fr auto; }
/* Part and Supplier: look like the dropdowns, with suggestions as you type */
.qb-combo { position: relative; }
#build input.qb-combo-input { background-color: var(--bg); padding-right: 28px; }
.qb-combo::after { content: ""; position: absolute; right: 12px; top: 16px; width: 7px; height: 7px; border-right: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); transform: rotate(45deg); pointer-events: none; }
.qb-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: 340px; max-height: 300px; overflow-y: auto; padding: 5px; border-radius: 10px; background: rgba(70, 70, 72, 0.97); color: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); font-weight: 400; }
.qb-option { padding: 5px 10px; border-radius: 5px; cursor: default; }
.qb-option:hover, .qb-option.active { background: #2f6fdb; }
.qb-option.on::before { content: "✓ "; }
.qb-reply { margin: 0 0 10px 14px; padding: 4px 10px 10px; border-left: 3px solid var(--border); }
.qb-read { display: grid; grid-template-columns: 2fr 0.6fr 0.8fr 1.4fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 700px) { .qb-read { grid-template-columns: 1fr 1fr; } }
.quote-sort-head { margin: 14px 0 2px; }
.quote-sort { border: 1px solid var(--brand); border-radius: 8px; margin-top: 8px; background: var(--pill-bg); }
.quote-sort:last-child { border-bottom: 1px solid var(--brand); margin-bottom: 12px; }
.quote-sort-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.quote-sort-actions select { max-width: 340px; min-width: 0; }
.qb-word { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0; }
.qb-lines { display: grid; gap: 6px; }
#word label { display: grid; gap: 4px; margin-top: 8px; }
#word textarea { width: 100%; box-sizing: border-box; }
@media (max-width: 700px) { .qb-word { grid-template-columns: 1fr; } }
.qb-scope-help { margin: 6px 0; }
.qb-ask { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.qb-ask input { flex: 1; min-width: 0; }
.qb-scope { padding: 8px 0; border-bottom: 1px solid var(--border); }
.qb-scope-text { white-space: pre-wrap; margin: 4px 0; }
.qb-scope-help details { margin-top: 8px; }
.qb-needs { margin: 6px 0 0 18px; padding: 0; }
#send label { display: grid; gap: 4px; margin-top: 8px; }
#send textarea { width: 100%; box-sizing: border-box; }
#send-contact { margin-top: 8px; }
.quote-sort .quote-row-main { width: 100%; }
.quote-sort-match:not(:empty) { margin-top: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.quote-sort-match .quote-row { padding: 4px 0; border-bottom: none; }
.quote-sort-label { font-size: 0.8rem; font-weight: 600; color: var(--muted, inherit); }
.quote-sort-asked { margin-top: 2px; }

/* Full-screen photo viewer (window.viewPhotos in public/common.js). */
.photo-view { position: fixed; inset: 0; z-index: 10001; display: flex; flex-direction: column; background: #101317; }
.photo-view-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; background: var(--surface); color: var(--text); border-bottom: 1px solid var(--border); }
.photo-view-name { flex: 1 1 200px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.photo-view-count { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.photo-view-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.photo-view-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: grab; user-select: none; }
.photo-view-stage:active { cursor: grabbing; }
.photo-view-image { max-width: 100%; max-height: 100%; }
.photo-view-status { position: absolute; margin: 0; color: #fff; }

/* Build page: the four sections that open and close. */
.qb-group .section-body > .card { margin: 10px 0 0; box-shadow: none; }
.quote-list .att-list > .quote-row { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.qb-move-ask { display: grid; gap: 8px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--brand); border-radius: 8px; background: var(--pill-bg); }
h2:has(> .section-toggle), h3:has(> .section-toggle) { display: flex; align-items: center; }
.pricing-other { display: grid; gap: 8px; margin-top: 10px; }
#people { display: grid; gap: 6px; margin-top: 10px; }
.pricing-people-title { margin: 0; font-weight: 600; }
.pricing-person { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }

/* Quote stage colors (Mitch, Nov 7 2026): each quote box outlined in its stage's
   color with a thicker bar on the left, the stage in small colored letters, and
   the color key at the top of the Quotes page (press one to show only it). */
.quote-row.st-orange, .quote-key .st-orange { --st: var(--st-orange); --st-text: var(--st-orange-text); }
.quote-row.st-yellow, .quote-key .st-yellow { --st: var(--st-yellow); --st-text: var(--st-yellow-text); }
.quote-row.st-green, .quote-key .st-green { --st: var(--st-green); --st-text: var(--st-green-text); }
.quote-row.st-blue, .quote-key .st-blue { --st: var(--st-blue); --st-text: var(--st-blue-text); }
.quote-row.st-red, .quote-key .st-red { --st: var(--st-red); --st-text: var(--st-red-text); }
.quote-list .att-list > .quote-row[class*="st-"], .quote-sort-match .quote-row[class*="st-"] { border: 2px solid var(--st); border-left-width: 8px; border-radius: 8px; }
.quote-sort-match .quote-row[class*="st-"] { padding: 6px 10px; }
/* A light fill of the same color (Mitch, Nov 28 2026), and the whole box opens the quote. */
.quote-list .att-list > .quote-row[class*="st-"], .quote-sort-match .quote-row[class*="st-"] { background: color-mix(in srgb, var(--st) 12%, var(--surface)); }
.quote-row-open { cursor: pointer; }
.quote-row-open:hover { background: color-mix(in srgb, var(--st, var(--border)) 22%, var(--surface)) !important; }
.quote-row-open:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.quote-row-rename { display: grid; gap: 6px; width: 100%; }
.quote-rename-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.quote-rename-date { font-weight: 600; white-space: nowrap; }
.quote-rename-line input { flex: 1; min-width: 0; }
.quote-stage-word { display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--st-text); margin-left: 6px; vertical-align: 1px; }
.quote-key { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.quote-key button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 2px solid var(--st); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.quote-key button::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--st); }
.quote-key button.active { background: var(--st); color: #fff; }
.quote-key button.active::before { background: #fff; }
.quote-key button.st-yellow.active { color: #1c2430; }
.quote-key button.st-yellow.active::before { background: #1c2430; }
.quote-stage.st-orange, .quote-stage.st-yellow, .quote-stage.st-green, .quote-stage.st-blue, .quote-stage.st-red { background: var(--st); }
.quote-stage.st-orange { --st: var(--st-orange); } .quote-stage.st-yellow { --st: var(--st-yellow); color: #1c2430; }
.quote-stage.st-green { --st: var(--st-green); } .quote-stage.st-blue { --st: var(--st-blue); } .quote-stage.st-red { --st: var(--st-red); }
.quote-red-note { margin: 8px 0 0; padding: 8px 12px; border: 2px solid var(--st-red); border-radius: 8px; background: var(--err-bg); color: var(--err-text); }

/* Service Write-Up (public/write-up.js): the tech's service form behind a quote. */
.wu-box { display: grid; gap: 10px; }
.wu-form { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.wu-part { display: grid; gap: 2px; }
.wu-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
.wu-text { white-space: pre-wrap; }
.wu-list { margin: 0; padding-left: 20px; }
.wu-pick { display: grid; gap: 6px; }
.qb-combined { border: 1px solid var(--brand); background: var(--pill-bg); color: var(--text); }

/* Combine Quotes (public/quotes.js): tick boxes and the name, under the customer. */
.quote-combine { display: grid; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--brand); border-radius: 8px; background: var(--pill-bg); }
.quote-row-tick { justify-content: flex-start; }
.quote-row-tick > input[type="checkbox"] { width: 20px; height: 20px; flex: none; }
.quote-row-tick > .quote-row-main { flex: 1; }
.att-head .button { margin-left: auto; }
/* Quotes by customer, folding up (public/quotes.js, Mitch Nov 9 2026): the left
   edge is the color of the customer's most urgent quote, and a dot per stage
   shows how many quotes are in it. */
.quote-cust { padding: 6px 10px; border: 1px solid var(--border); border-left: 8px solid var(--st, var(--border)); border-radius: 8px; background: var(--surface); }
.quote-cust.st-orange { --st: var(--st-orange); } .quote-cust.st-yellow { --st: var(--st-yellow); }
.quote-cust.st-green { --st: var(--st-green); } .quote-cust.st-blue { --st: var(--st-blue); } .quote-cust.st-red { --st: var(--st-red); }
.quote-cust .att-list { padding-bottom: 4px; }
.quote-cust-toggle { flex: 1; flex-wrap: wrap; width: auto; }
.quote-cust-dots { display: inline-flex; flex-wrap: wrap; gap: 6px; font-weight: 600; }
.quote-cust-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--st); color: #fff; font-size: 0.8rem; }
.quote-cust-dot.st-orange { --st: var(--st-orange); } .quote-cust-dot.st-yellow { --st: var(--st-yellow); color: #1c2430; }
.quote-cust-dot.st-green { --st: var(--st-green); } .quote-cust-dot.st-blue { --st: var(--st-blue); } .quote-cust-dot.st-red { --st: var(--st-red); }
.quote-combine label { display: grid; gap: 4px; max-width: 460px; }
.quote-combine input[type="text"] { width: 100%; padding: 8px 10px; font: inherit; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.qb-sent-not-filed { border: 2px solid var(--st-red); background: var(--err-bg); }

/* Tool Crib (public/tools.*, public/tool.*) */
.tool-search { width: 100%; margin: 8px 0 10px; }
.tool-row { align-items: center; }
.tool-badge { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin: 4px 6px 0 0; border: 1px solid var(--border); }
.tool-in { background: var(--ok-bg, #e7f6ec); color: var(--ok-text, #1d6b34); border-color: transparent; }
.tool-out { background: var(--surface); color: var(--text); }
.tool-waiting { background: var(--warn-bg, #fff4d6); color: var(--warn-text, #8a5a00); border-color: transparent; }
.tool-issue { background: var(--err-bg, #fde8e8); color: var(--err-text, #a12020); border-color: transparent; }
.tool-retired { color: var(--muted); }
.tool-status { text-align: center; margin-bottom: 12px; }
.tool-status .tool-badge { font-size: 1rem; padding: 4px 14px; }
.tool-status p { margin: 8px 0 0; }
.tool-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tool-thumb { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.tool-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.tool-photos { display: grid; gap: 6px; justify-items: start; }
.tool-move { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
.tool-move .check-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 1rem; }
.tool-move .check-row input { width: 22px; height: 22px; }
.tool-out-box { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; }
.tool-out-box h3 { margin: 0 0 4px; font-size: 1rem; }
.tool-out-box p { margin: 4px 0; }
.tool-history { display: grid; gap: 8px; }
.tool-move-row { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; }
.tool-scanned { color: var(--ok-text, #1d6b34); font-weight: 600; }
.tool-found { text-align: center; }
.tool-qr { width: 140px; height: 140px; display: block; margin: 8px 0; background: #fff; }
.tool-steps { padding-left: 18px; margin: 8px 0; }
.tool-steps li { margin: 4px 0; }
/* Tool Crib kits: pieces with their own stickers */
.tool-piece { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--border); }
.tool-piece:first-of-type { border-top: 0; }
.tool-piece-scanned { background: var(--highlight, rgba(255, 200, 0, 0.12)); }
.tool-piece-list { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; }
.tool-piece-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; }
.tool-read { color: var(--success, #1a7f37); font-weight: 600; }
.tool-pieces-edit { display: grid; gap: 6px; }
.tool-piece-edit { display: flex; align-items: center; gap: 8px; }
.tool-piece-edit input { flex: 1; min-width: 0; }
.tool-piece-code { min-width: 64px; }
.tool-move .tool-piece-row label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 400; }
.tool-move .tool-piece-row label input { width: 22px; height: 22px; flex: none; }
.tool-move .tool-piece-row { justify-content: space-between; }

/* Job folder page: Tech Notes and Finish at Office (public/folder.js) */
.job-office { margin: 12px 0; display: grid; gap: 10px; }
.job-office-status { margin: 0; font-weight: 600; }
.job-office-note { border-left: 3px solid var(--border, #ddd); padding-left: 10px; }
.job-office-note .meta { font-size: 0.85rem; color: var(--muted, #666); margin-bottom: 2px; }
.job-office-finish { border-top: 1px solid var(--border, #ddd); padding-top: 10px; }
.job-office-finish .actions { margin-top: 8px; }

/* Job Board search (public/board.js) */
.board-search { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; }
.board-search input[type=search] { flex: 1; min-width: 0; max-width: 520px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.board-search-stage h3 { margin: 18px 0 8px; }

/* Missed Time on office Home (public/home.js) */
.missed-panel { display: grid; gap: 8px; margin-top: 8px; }
.missed-hours { max-width: 220px; }
.missed-hours .field { display: grid; gap: 4px; }

/* Tool Crib list: a little picture before each tool (public/tools.js) */
.tool-row { align-items: center; }
.tool-row .tool-thumb { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 6px; object-fit: cover; background: var(--bg); border: 1px solid var(--border); }
/* Whole row is the button (Mitch, Nov 11 2026): every other row shaded; hover shows it can be picked. */
#rows .tool-row, #my-rows .tool-row { cursor: pointer; transition: background 0.1s, border-color 0.1s; }
#rows .tool-row:nth-child(even), #my-rows .tool-row:nth-child(even) { background: var(--shaded); }
#rows .tool-row:hover, #my-rows .tool-row:hover, .tool-row:focus-visible { background: var(--hover-bg); border-color: var(--brand); outline: none; }
.tool-row-go { font-size: 1.6rem; line-height: 1; color: var(--muted); padding: 0 4px; }
.tool-row:hover .tool-row-go { color: var(--brand); }
.tool-row .tool-row-text { flex: 1; min-width: 0; }
/* Reply to a supplier's email (quote page, Build page). */
.supplier-reply { margin-top: 8px; }
.supplier-reply textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); resize: vertical; margin-bottom: 6px; }

/* Create a Quote from the office (public/office-quote.html, Mitch Nov 12 2026) */
.office-quote-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border, #ddd); }
#form-panel[hidden], .office-quote-top[hidden] { display: none; }

/* Help Manual (public/help-manual.js) */
.manual-section-title { margin: 24px 0 8px; }
.manual-area .card-head { gap: 8px; }
.manual-topic { border-top: 1px solid var(--border, #e5e7eb); padding-top: 10px; margin-top: 10px; }
.manual-topic h4 { margin: 0 0 4px; }
.manual-steps { margin: 0; padding-left: 20px; }
.manual-steps li { margin: 4px 0; }
.manual-answer { margin-top: 10px; display: grid; gap: 6px; }
.manual-wide { width: 100%; max-width: none; box-sizing: border-box; }
.manual-topic .card-head h4 { margin: 0; }
.manual-edit-steps { display: grid; gap: 8px; }
.manual-edit-step { display: grid; gap: 4px; justify-items: start; }

/* Unit Photos (tech-tag.js): the unit's old photos to pick from. */
.tag-old-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 8px 0; }
.tag-old-photo { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; font-size: 0.8rem; cursor: pointer; text-align: center; }
.tag-old-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.tag-old-photo span { overflow-wrap: anywhere; }

/* Working… (public/updates.js; Mitch, Nov 20 2026): the screen dims and the
   round S2.0 badge spins away and back while a tap's work goes on, then Done. */
.s2-veil { position: fixed; inset: 0; z-index: 2147483000; display: none; place-items: center; background: rgba(10, 12, 16, 0.6);
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); cursor: progress; }
.s2-veil.on { display: grid; }
.s2-veil-box { display: grid; justify-items: center; gap: 14px; color: #fff; font-weight: 600; font-size: 1.15rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.s2-veil-logo { width: 96px; height: 96px; animation: s2-spin 1.6s ease-in-out infinite; }
@keyframes s2-spin {
  0% { transform: rotate(0deg) scale(1); opacity: 1; }
  50% { transform: rotate(360deg) scale(0); opacity: 0; }
  100% { transform: rotate(720deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .s2-veil-logo { animation-duration: 3.2s; } }
.s2-veil-done { width: 96px; height: 96px; border-radius: 50%; background: #7dc242; color: #fff; display: none; place-items: center; font-size: 56px; line-height: 1; }
.s2-veil.done .s2-veil-logo { display: none; }
.s2-veil.done .s2-veil-done { display: grid; }

/* Build a quote > Send to Customer: the PDF's name is the button that opens it,
   outlined in Adobe's PDF red (Mitch, Nov 20 2026). */
.button.pdf-name { border: 2px solid #fa0f00; background: rgba(250, 15, 0, 0.18); }
.button.pdf-name:hover { border-color: #fa0f00; background: rgba(250, 15, 0, 0.3); }
/* New Job > From the Estimating Mailbox: red PDF name, who it's from, blue Use
   on one line (Mitch, Nov 25 2026). */
.pdf-mail-left { display: grid; gap: 4px; flex: 1; min-width: 0; }
.pdf-mail-row .pdf-name { width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.pdf-mail-row { align-items: flex-start; }
.pdf-mail-row > .button.primary { white-space: nowrap; flex: none; border-width: 2px; }

/* Job Board colors (src/jobStatus.js; Mitch, Nov 20 2026): each job outlined and
   shaded in what it needs next, with why; the counts at the top filter. */
.board-job.job-color { border: 2px solid var(--tc); border-radius: 8px; background: color-mix(in srgb, var(--tc) 12%, var(--surface)); margin: 4px 0; }
.job-why { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--surface); background: var(--tc); }
.tc-yellow.job-why { color: #3a2f00; }
.board-colors { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.button.color-count { border: 2px solid var(--tc); background: color-mix(in srgb, var(--tc) 12%, var(--surface)); }
.button.color-count.active { background: var(--tc); color: #fff; }
.tc-yellow.button.color-count.active { color: #3a2f00; }
.tech-job.job-color { border: 2px solid var(--tc); background: color-mix(in srgb, var(--tc) 12%, var(--surface)); }
.tech-job .job-why { margin-left: 0; align-self: flex-start; }
.board-job .job-why { display: block; width: fit-content; margin: 4px 0 0; }

/* Job Board flow (Mitch, Nov 21 2026): Schedule and Open on the row, the rest
   under More; the Schedule box; Needs Attention. */
.row-more { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; padding: 0 8px 8px; }
.job-where { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.attention-tab { font-weight: 700; }
.attention-section { margin-bottom: 18px; }
.attention-section h3 { margin: 12px 0 6px; }
.board-schedule { display: grid; gap: 8px; }
.board-schedule-techs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px 12px; }
.board-schedule-days { display: flex; flex-wrap: wrap; gap: 12px; }
.board-schedule textarea { width: 100%; box-sizing: border-box; font: inherit; }
.board-schedule-reminder { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 0.9rem; }

/* Left menu groups (Mitch, Nov 21 2026): a small gap and line before each group. */
.sidebar a.nav-gap { margin-top: 10px; position: relative; }
.sidebar a.nav-gap::before { content: ''; position: absolute; left: 10px; right: 10px; top: -6px; border-top: 1px solid var(--border); }

/* Job progress and color for the tech (src/jobProgress.js; Mitch, Nov 21 2026):
   green On Track, yellow Wrapping Up, red Must Finish Today, blue Ready for Time. */
.job-colored { border: 3px solid var(--tc) !important; background: color-mix(in srgb, var(--tc) 10%, var(--surface)); }
.job-progress { display: grid; gap: 6px; margin: 8px 0; }
.job-progress-word { margin: 4px 0; }
.job-progress-word strong { color: var(--tc); }
.progress-row { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 8px; align-items: center; font-size: 0.85rem; }
.progress-bar { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-fill { display: block; height: 100%; background: var(--st-green); border-radius: 999px; }
.progress-bar.over .progress-fill { background: var(--st-red); }

.board-progress { display: grid; gap: 3px; margin-top: 4px; max-width: 360px; }
.board-progress .progress-row { grid-template-columns: 110px 1fr; font-size: 0.78rem; }
.tech-card.tc-red, .tech-card.tc-yellow { border: 2px solid var(--tc); background: color-mix(in srgb, var(--tc) 13%, var(--surface)); }

/* "Before you go on" (public/updates.js; Mitch, Nov 21 2026): what's missing,
   in a pop-up instead of a small red line; then the boxes that need it pulse red. */
.s2-alert { position: fixed; inset: 0; z-index: 2147483100; display: none; place-items: center; padding: 16px; background: rgba(10, 12, 16, 0.6); }
.s2-alert.on { display: grid; }
.s2-alert-box { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--text); border: 2px solid var(--st-red); border-radius: 12px; padding: 22px 20px; display: grid; gap: 12px; justify-items: center; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.s2-alert-logo { width: 56px; height: 56px; }
.s2-alert-title { margin: 0; font-size: 1.1rem; }
.s2-alert-list { margin: 0; padding-left: 20px; text-align: left; justify-self: stretch; display: grid; gap: 6px; }
.s2-alert-ok { min-width: 160px; }
.s2-alert-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.s2-alert-actions[hidden] { display: none; }
.s2-alert-actions .button { min-width: 160px; }
/* A box that needs filling in: shaded light red, not outlined (Mitch, Nov 29 2026);
   back to its usual shade as soon as something is entered (public/updates.js markBoxes). */
.s2-needs { background-color: color-mix(in srgb, var(--st-red) 18%, var(--surface)) !important;
  border-color: color-mix(in srgb, var(--st-red) 45%, var(--border)) !important; }
.s2-tip-spot { position: fixed; z-index: 2147482999; display: none; border-radius: 8px; pointer-events: none; box-shadow: 0 0 0 200vmax rgba(10, 12, 16, 0.55); transition: top 0.2s, left 0.2s, width 0.2s, height 0.2s; }
.s2-tip-spot.on { display: block; }
@media (prefers-reduced-motion: reduce) { .s2-tip-spot { transition: none; } }
.s2-tip { position: fixed; z-index: 2147483000; display: none; width: min(320px, calc(100vw - 16px)); background: var(--surface); color: var(--text); border: 2px solid var(--brand); border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.s2-tip.on { display: grid; gap: 6px; }
.s2-tip-arrow { position: absolute; top: -9px; width: 16px; height: 16px; margin-left: -8px; background: var(--surface); border-left: 2px solid var(--brand); border-top: 2px solid var(--brand); transform: rotate(45deg); }
.s2-tip.above .s2-tip-arrow { top: auto; bottom: -9px; transform: rotate(225deg); }
.s2-tip-count { font-size: 0.8rem; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: 0.03em; }
.s2-tip-title { margin: 0; font-size: 1rem; }
.s2-tip-body { margin: 0; font-size: 0.92rem; line-height: 1.4; }
.s2-tip-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.s2-tip-target { outline: 3px solid var(--brand) !important; outline-offset: 3px; border-radius: 6px; animation: s2-tip 1.4s ease-in-out 3; }
@keyframes s2-tip { 50% { outline-color: color-mix(in srgb, var(--brand) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .s2-tip-target { animation: none; } }

.file-list { margin: 4px 0 8px; padding-left: 18px; font-size: 0.85rem; word-break: break-word; }

.review-box { display: grid; gap: 8px; padding: 10px; border: 2px solid var(--st-orange); border-radius: 8px; background: color-mix(in srgb, var(--st-orange) 10%, var(--surface)); }
.review-card { display: grid; gap: 6px; padding: 8px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.review-field { display: grid; gap: 4px; font-weight: 600; font-size: 0.85rem; }
.review-field textarea { width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; }

/* Ready to Invoice: a box per job that opens to its forms (Mitch, Nov 21 2026). */
.inv-customer-group { border: 2px solid var(--border); border-radius: 12px; background: var(--shaded); padding: 10px 12px; margin: 0 0 14px; }
.inv-customer-group .inv-job { margin: 0; }
.inv-job { padding: 0; margin: 8px 0; border: 2px solid var(--border); border-radius: 8px; background: var(--surface); }
.inv-job:not(.inv-job-open):hover { border-color: var(--brand); background: var(--hover-bg); }
.inv-job .inv-top { padding: 10px 12px; flex-wrap: wrap; }
.inv-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.inv-head { flex: 1; display: flex; align-items: flex-start; gap: 8px; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.inv-body { display: grid; gap: 6px; padding: 0 10px 10px; }
.inv-form { display: grid; gap: 4px; padding: 6px 10px; border-radius: 8px; border: 2px solid var(--tc); background: color-mix(in srgb, var(--tc) 10%, var(--surface)); }
.inv-form.green { --tc: var(--st-green); }
.inv-form.red { --tc: var(--st-red); }
.inv-form-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.inv-check { display: flex; align-items: center; gap: 8px; }
.inv-check input { width: 20px; height: 20px; }
.inv-form-top { flex-wrap: nowrap; justify-content: flex-start; }
.inv-open { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; color: inherit; text-decoration: none; border-radius: 6px; padding: 2px 6px; }
.inv-open:hover, .inv-open:focus-visible { background: color-mix(in srgb, var(--tc) 18%, transparent); }
.inv-open { background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.inv-editor { display: grid; gap: 10px; padding: 8px 0 4px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.inv-editor .review-field { display: grid; gap: 3px; font-weight: 600; font-size: 0.9rem; align-content: end; } /* a two-line label (Equipment Code) no longer stretches the other boxes in its row */
.inv-editor .review-field input, .inv-editor .review-field textarea { font-weight: 400; width: 100%; box-sizing: border-box; }
.inv-unit { display: grid; gap: 6px; }
.inv-suggested { display: grid; gap: 6px; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px dashed var(--brand); }
.inv-materials { display: grid; gap: 4px; }
.inv-mat { display: grid; grid-template-columns: 70px 1fr; gap: 6px; }
.inv-next { display: grid; gap: 6px; }
.inv-next:empty { display: none; }
.s2-flagged { outline: 3px solid var(--st-red) !important; outline-offset: 1px; border-color: var(--st-red) !important; }
.inv-after { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid var(--border); }

/* Home: nothing needs the office (Mitch, Nov 21 2026). */
.all-clear { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 48px 16px; }
.all-clear[hidden] { display: none; }
.all-clear-check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; color: #fff; background: var(--st-green); }
.char-count { display: block; text-align: right; }
.char-count-near { color: var(--danger); font-weight: 600; }
/* A question (Move this job?): the pop-up without the red frame. */
.s2-alert.s2-ask .s2-alert-box { border-color: var(--border); }

/* New Job: the billed customer's payment terms (blank = choose them). */
.terms-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 4px; }
.terms-line.blank strong { color: var(--danger, #b42318); }

/* Customer PDFs on New Job (public/new-job.js) */
.pdf-drop { border: 2px dashed var(--border); border-radius: 6px; padding: 10px 12px; font-size: 0.9rem; }
.pdf-drop.dragging { border-color: var(--ok); background: var(--ok-bg); }
.pdf-drop .folder-title { margin: 0 0 4px; font-weight: 600; }
.pdf-drop .row-buttons { margin-top: 8px; }
.pdf-list { list-style: none; padding: 0; margin: 8px 0 0; }
.pdf-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px solid var(--border); }
.r-pdfs { margin: 8px 0 12px; }
.r-pdfs h3 { margin: 0 0 6px; }
.pdf-result { margin-bottom: 8px; }
.pdf-tech-text { white-space: pre-wrap; font: inherit; font-size: 0.85rem; max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; padding: 8px; margin: 4px 0 0; }
.inv-suggested .pre-wrap { white-space: pre-wrap; }
.inv-names { display: grid; gap: 6px; }
.inv-see-only { font-weight: 400; padding: 3px 6px; min-height: 1.4em; border: 1px dashed var(--border); border-radius: 4px; }
.inv-signature { max-width: 100%; max-height: 70px; background: #fff; border: 1px dashed var(--border); border-radius: 4px; justify-self: start; }

/* Stop Nagging Me pop-up (public/stop-nagging.js): the message pop-up's look. */
.today-lit { background: var(--warn-bg, #fff3cd); color: var(--warn-text, #5c4300); border-radius: 4px; padding: 2px 6px; margin: 0 -6px; }
.stop-nagging .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
/* Tech Home: every box's buttons centered (Mitch, Nov 25 2026). The file
   rows' own Open / Rename / Remove stay at the row's end. */
.tech-home-grid .actions,
.tech-home-grid div.tech-search-row,
.tech-home-grid .scan-type-row { justify-content: center; }
/* Job Board > More > Customer PDF: a PDF dragged over the box (Mitch, Nov 25 2026). */
.parts-panel.drop-on { outline: 3px dashed var(--brand); outline-offset: -4px; background: var(--shaded); }
.job-pdf-results { display: grid; gap: 6px; }
/* Job Board > More > Change Description (Mitch, Nov 25 2026). */
.parts-panel input.job-desc-input { width: 100%; background: var(--pill-bg); border-color: var(--brand); }
.job-desc-list { margin: 4px 0; padding-left: 18px; display: grid; gap: 4px; overflow-wrap: anywhere; }

/* Maintenance agreements (public/agreements.html; Mitch, Nov 25 2026) */
.ag-months { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ag-month { min-width: 52px; }
.ag-month.on { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }
.ag-unit { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.ag-unit.off { opacity: 0.55; }
.ag-unit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ag-unit-head .tf-check { margin: 0; font-weight: 600; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 10px; margin-top: 8px; }
/* Boxes: the shared .form / #build look of the quote Build page; labels like its rows. */
.ag-unit label, .ag-extras label { font-size: 0.85rem; margin: 0; }
.ag-grid input, .ag-grid select { width: 100%; }
.ag-unit .ag-month { min-width: 44px; padding: 2px 6px; font-size: 0.8rem; }
.ag-parts-title { font-size: 0.85rem; font-weight: 600; margin: 10px 0 4px; display: flex; align-items: center; gap: 10px; }
.ag-visits { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-visit { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; font-size: 0.8rem; }
.ag-visit input { width: 72px; text-align: center; }
.ag-visit .muted { height: 42px; line-height: 42px; }
.ag-part { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; margin: 0 0 6px; }
.ag-part label { display: grid; gap: 4px; }
.ag-part .ag-qty { width: 80px; } .ag-part .ag-size { width: 150px; } .ag-part .ag-cost { width: 110px; }
.ag-part > .button { margin-bottom: 8px; }
.ag-extras { display: grid; grid-template-columns: max-content max-content max-content; align-items: center; gap: 10px 28px; margin: 10px 0; }
.ag-unit-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: 10px 0 0; }
.ag-unit-extras .ag-parts-title { margin: 0; }
.ag-extras .tf-check, .ag-unit-head .tf-check, .ag-unit-extras .tf-check { display: flex; align-items: center; gap: 10px; margin: 0; min-height: 0; font-size: 0.95rem; }
.form .ag-times, .form .ag-type { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 0.92rem; }
.ag-times, .ag-type { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.ag-extras input[type=number] { width: 80px; }
.ag-extras input[type=text] { width: 130px; }
.ag-extras .tf-check input { height: 20px; padding: 0; }
.ag-unit-head .tf-check input, .ag-unit-extras .tf-check input { height: 20px; padding: 0; }
@media (max-width: 600px) { .ag-extras { grid-template-columns: max-content max-content; } .ag-extras > :nth-child(3n) { grid-column: 2; } }
.ag-totals { display: grid; grid-template-columns: auto auto; gap: 4px 18px; justify-content: start; margin: 8px 0; }
.ag-totals .big { font-weight: 700; font-size: 1.05rem; }
.ag-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; background: var(--border); color: var(--text); margin-left: 6px; }
.ag-status.made { background: var(--warn-bg); color: var(--warn-text); } .ag-status.sent { background: var(--ok-bg); color: var(--ok); }
.ag-switch { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.ag-switch .on { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
.ag-problems { margin: 8px 0; padding-left: 20px; }
/* Settings > Technicians: a Dedicated Site tech's sites (Nov 27 2026) */
.row.row-wrap { flex-wrap: wrap; }
.tech-sites { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; position: relative; }
.tech-sites .tech-site-add { flex: 1 1 220px; min-width: 200px; }
.tech-site-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
/* Tech Home: All [Site] Jobs for Dedicated Site techs (Nov 27 2026) */
.site-jobs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; }
.site-jobs-head h3 { flex: 1 1 180px; min-width: 0; }
.site-stage { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: var(--surface); border: 1px solid var(--border); }
.tech-open-job .row-buttons { flex-wrap: wrap; justify-content: flex-end; }
/* Site box job rows: each one a big button to its Look screen (Mitch, Nov 27 2026) */
.site-job { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.site-job:hover { border-color: var(--brand); }
.site-job:active { transform: scale(0.99); }
.site-job-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.site-job-line { display: block; }
.site-job-arrow { font-size: 1.6rem; line-height: 1; color: var(--muted); }

/* Site Jobs Guide (public/tech-site-guide.html; Mitch, Nov 27 2026): picture
   steps; the "screens" are drawings in the real styles, look only. */
.guide-main { max-width: 760px; }
.guide-for { margin-top: 12px; color: var(--text); } /* same as the title under it (Mitch, Nov 27 2026) */
.guide-step { display: grid; gap: 10px; margin-top: 16px; }
.guide-step p, .guide-step .guide-list { margin: 0; }
.guide-head { display: flex; align-items: center; gap: 10px; margin: 0; }
.guide-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-text); font-weight: 700; }
.guide-list { padding-left: 20px; display: grid; gap: 6px; }
.guide-screen { pointer-events: none; user-select: none; border: 2px dashed var(--border); border-radius: 14px; padding: 14px; background: var(--bg); display: grid; gap: 10px; max-width: 520px; }
.guide-screen .card { margin: 0; }
.guide-screen .tech-box { min-height: 0; }
.guide-screen .site-job { margin-top: 8px; }
.guide-pair { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 100%; }
.guide-dialog { width: 100%; border-color: var(--border); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.guide-dialog .s2-alert-logo { width: 44px; height: 44px; }
.guide-dialog .s2-alert-actions .button, .guide-dialog .s2-alert-ok { min-width: 110px; }
.guide-tap { position: relative; outline: 3px solid var(--st-red); outline-offset: 3px; border-radius: 8px; }
.guide-tap::after { content: 'Tap'; position: absolute; top: -14px; right: -12px; z-index: 1; padding: 1px 7px; border-radius: 999px; background: var(--st-red); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.4; }
.guide-feed { display: grid; gap: 8px; }
.guide-feed .pill { margin-right: 6px; }
.guide-end { justify-content: center; margin: 20px 0 8px; }
.manual-guides { margin-bottom: 16px; }
.manual-guides .actions { margin-top: 8px; }
.guide-part { margin: 32px 0 4px; padding-top: 20px; border-top: 2px solid var(--border); }
.site-guide-popup p { margin: 10px 0 0; }

/* Pricing Emails on a quote (Mitch, Nov 28 2026): a box per email shaped like
   the quote boxes. Yellow sent, orange a question, green priced, grey a draft;
   a dashed box with Parts / Equipment / Lift and No Pricing Needed or All Pricing Sent (the same size) starts a new one. */
.pe-box { display: grid; gap: 2px; margin-top: 10px; padding: 10px 12px; border: 2px solid var(--pe, var(--border)); border-left-width: 8px; border-radius: 8px; background: color-mix(in srgb, var(--pe, var(--border)) 12%, var(--surface)); }
.pe-box[role="button"] { cursor: pointer; }
.pe-box[role="button"]:hover { background: color-mix(in srgb, var(--pe, var(--border)) 22%, var(--surface)); }
.pe-box:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.pe-yellow { --pe: var(--st-yellow); } .pe-orange { --pe: var(--st-orange); } .pe-green { --pe: var(--st-green); } .pe-draft { --pe: var(--muted); }
.pe-new { border-style: dashed; background: var(--surface); gap: 8px; }
.pe-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pe-kinds.pe-all { grid-template-columns: 1fr; }
.pe-kinds.pe-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pe-kinds .button { width: 100%; justify-content: center; text-align: center; }
.pe-dialog { width: min(1200px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.pe-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.pe-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.pe-dialog-body { display: grid; gap: 10px; padding: 12px 14px 16px; }
.pe-dialog-body textarea { width: 100%; box-sizing: border-box; font: inherit; }
.pe-frame { width: 100%; height: 78vh; border: 0; border-radius: 8px; background: var(--bg, #f4f6f8); }
.pe-frame-short { height: 55vh; border: 1px solid var(--border); }
.pe-email { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.pe-email-text { white-space: pre-wrap; max-height: 40vh; overflow: auto; margin-top: 6px; }
.pe-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 2px dashed var(--border); border-radius: 8px; }
.pe-drop.over { border-color: var(--brand); background: var(--pill-bg); }
.pe-files { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.pe-file { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; }

/* People under a supplier or lift provider (Settings, Nov 28 2026). */
.people-edit { display: grid; gap: 6px; }
.people-edit-title { margin: 0; font-weight: 600; }
.person-row { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--border); }
.person-row label { display: grid; gap: 4px; font-size: 0.85rem; min-width: 0; }
.person-row input[type="text"], .person-row input[type="email"] { width: 100%; min-width: 0; }
.person-row .pr-cc { display: flex; align-items: center; gap: 4px; white-space: nowrap; padding-bottom: 6px; }
@media (max-width: 1100px) { .person-row { grid-template-columns: 1fr 1fr; } .person-row .pr-cc { padding-bottom: 0; } .person-row > .button { justify-self: end; } }

/* The pricing email page, laid out like the Build page (Nov 28 2026). */
.pricing-left, .pricing-left.form { display: grid; gap: 0; margin-top: 0; max-width: none; }
.pricing-left > .card, .pricing-preview-card { margin-top: 0; margin-bottom: 16px; }
.pricing-left .card { display: grid; gap: 10px; }
.pricing-supplier, .pricing-people, #lift { display: grid; gap: 10px; }
.pricing-left select, .pricing-left input[type="text"], .pricing-left input[type="email"], .pricing-left textarea { width: 100%; box-sizing: border-box; }
.l-weight { grid-template-columns: 1fr 1fr auto; }

.pricing-email-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.pricing-email-head-right { display: grid; gap: 8px; min-width: 0; flex: 1; }
/* Send: a square blue button with the paper plane over the word (Nov 29 2026). */
.send-big { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 66px; min-height: 76px; padding: 10px 4px; border-radius: 10px; flex: none; font-size: 0.85rem; line-height: 1.15; text-align: center; white-space: normal; }
.send-big svg { display: block; }
.pricing-email-head #subject { font-size: 0.95rem; }
/* The email shown in full: the frame grows to the email's height (pricing.js). */
.pricing-preview-card .pricing-preview { height: auto; min-height: 400px; }
.pricing-email-head .pricing-wording-actions { display: flex; gap: 8px; }
.pricing-alternate { display: grid; gap: 6px; }
.pricing-fold { display: grid; gap: 10px; }

/* A quote's Pricing Emails box in its stage's color (Nov 28 2026). */
.pricing-stage.st-orange { --st: var(--st-orange); } .pricing-stage.st-yellow { --st: var(--st-yellow); } .pricing-stage.st-green { --st: var(--st-green); }
.pricing-stage.st-blue { --st: var(--st-blue); } .pricing-stage.st-red { --st: var(--st-red); }
.pricing-stage[class*="st-"] { border: 2px solid var(--st); border-left-width: 8px; background: color-mix(in srgb, var(--st) 12%, var(--surface)); }

/* Delete on a pricing email box, and its question (Nov 29 2026). */
.pe-dialog-head .actions { margin: 0; flex-wrap: nowrap; }

/* Confirmations (window.S2Confirm, Nov 29 2026): the pop-up's look, on top of any window. */
dialog.s2-confirm { padding: 0; border: 0; background: transparent; max-width: calc(100vw - 32px); }
dialog.s2-confirm::backdrop { background: rgba(10, 12, 16, 0.6); }
dialog.s2-confirm .s2-alert-box { border-color: var(--border); }
.s2-confirm-text { margin: 0; }
.pricing-left label.pricing-unit-toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pricing-left label.pricing-unit-toggle input { width: auto; margin: 0; flex: none; }
.pricing-left label.pricing-unit-toggle[hidden] { display: none; }
button.quote-stage { border: 0; font: inherit; font-size: 0.85rem; cursor: pointer; }
button.quote-stage:hover { filter: brightness(0.95); text-decoration: none; }
button.quote-stage:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.quote-also { margin-top: 6px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }

/* Combine Quotes window (Nov 29 2026): a line per quote in progress, with its stage. */
.combine-dialog { width: min(720px, 96vw); }
.combine-list { display: grid; gap: 6px; }
.combine-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.combine-row input { width: 20px; height: 20px; flex: none; margin: 0; }
.combine-row .combine-name { flex: 1; min-width: 0; }
.combine-row .quote-stage { flex: none; width: 150px; text-align: center; box-sizing: border-box; }
.combine-name-box { display: grid; gap: 4px; font-weight: 600; }
.combine-name-box input { width: 100%; box-sizing: border-box; }
.combine-name-box input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-weight: 400; background: var(--surface); color: var(--text); }
