:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1b2430;
  --muted: #667085;
  --line: #e3e7ee;
  --brand: #1d4e89;
  --brand-ink: #ffffff;
  --warn-bg: #fff1d6;
  --warn-ink: #8a5300;
  --ok-bg: #e3f5e8;
  --ok-ink: #1d6b36;
  --err-bg: #fde8e8;
  --err-ink: #9b1c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 20px; padding-bottom: 60px; }

/* top bar */
.topbar {
  background: linear-gradient(100deg, #0f2f57 0%, #17447a 55%, #1d5594 100%);
  color: var(--brand-ink); position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 2px 10px rgba(15, 35, 70, 0.18);
}
.topbar::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, #7cc4ff, #4f9bea 45%, #ffc94d); }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 60px; max-width: 1560px; }
.topbar a { color: var(--brand-ink); }
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; text-decoration: none !important; }
.brand-mark { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.brand-app { font-size: 19px; font-weight: 750; letter-spacing: -0.01em; }
.mainnav { flex: 1 1 auto; display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a {
  position: relative; display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.2;
  color: rgba(255,255,255,0.78) !important; transition: background-color .15s, color .15s;
}
.mainnav a:hover { background: rgba(255,255,255,0.10); color: #fff !important; text-decoration: none; }
.mainnav a.on { background: rgba(255,255,255,0.16); color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }

.mainnav a.on .nav-ico { color: #ffc94d; }
.nav-ico { flex: 0 0 auto; opacity: 0.9; }
.mainnav a.on .nav-ico { opacity: 1; }
.nav-count {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #17447a;
}
.signout { display: flex; align-items: center; gap: 10px; margin: 0 0 0 auto; flex: 0 0 auto; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, #ffc94d, #f59f2a); color: #3b2500;
}
.topbar .btn-signout {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 13px; color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.25); background: transparent;
}
.topbar .btn-signout:hover { background: rgba(255,255,255,0.10); color: #fff; }
@media (max-width: 1480px) { .who-name, .btn-signout .nav-label { display: none; } }
@media (max-width: 1300px) { .mainnav .nav-label { display: none; } .mainnav a { padding: 9px 10px; } .mainnav { gap: 4px; } }
@media (max-width: 560px) { .brand-text { display: none; } }

/* headings */
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -0.015em; line-height: 1.2; }
h2 { font-size: 17px; margin: 0 0 12px; }
.h1-sub { font-size: 16px; font-weight: 400; color: var(--muted); }
.page-head { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.page-head-row .actions { align-self: center; }
.page-head p { margin: 4px 0 0; }
.muted, .sub { color: var(--muted); }
.sub { font-size: 12.5px; }
.crumb { margin: 0 0 8px; }

/* buttons and inputs */
.btn {
  display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-block { display: block; width: 100%; margin-top: 16px; padding: 11px; }

input[type=text], input[type=password], input[type=search], select {
  font: inherit; padding: 8px 10px; border: 1px solid #cfd6e0; border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}

/* filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-size: 13px;
}
.chip b { margin-left: 4px; color: var(--muted); font-weight: 600; }
.chip:hover { text-decoration: none; border-color: var(--brand); }
.chip-on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip-on b { color: var(--brand-ink); opacity: 0.85; }
.chip-review:not(.chip-on) { background: var(--warn-bg); border-color: #f2d9a6; color: var(--warn-ink); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 320px; min-width: 220px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.active-filter { background: #eaf1fb; padding: 8px 12px; border-radius: 8px; margin: 0 0 12px; }
.active-filter a { margin-left: 8px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.grid thead th {
  background: #fafbfc; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--muted); white-space: nowrap;
}
.grid tbody tr:last-child td { border-bottom: none; }
.grid tbody tr:hover { background: #fafcff; }
.grid a.sort { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; }
.empty { background: var(--card); border: 1px dashed #cfd6e0; border-radius: 12px; padding: 32px; text-align: center; color: var(--muted); }

/* badges */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: #eef1f6; color: #3a4658; white-space: nowrap;
}
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }

/* detail page */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.card .table-wrap { border: none; border-radius: 0; }
.count { font-size: 12.5px; background: #eef1f6; color: var(--muted); padding: 1px 8px; border-radius: 999px; margin-left: 6px; font-weight: 600; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 28px; margin: 0; }
.field dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.field dd { margin: 2px 0 0; word-break: break-word; }

/* login / setup */
.login-card {
  max-width: 380px; margin: 12vh auto 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 28px;
}
.login-card h1 { font-size: 21px; }
.login-card label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 14px; }
.login-card input { width: 100%; }
body > .login-card { margin-left: auto; margin-right: auto; }
.alert { padding: 10px 12px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.alert-error { background: var(--err-bg); color: var(--err-ink); }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); }
code { background: #eef1f6; padding: 1px 5px; border-radius: 4px; font-size: 13px; }

@media (max-width: 700px) {
  .topbar-in { gap: 12px; }
  h1 { font-size: 21px; }
}

/* forms and actions (editing pages) */
.page-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card:has(> form .form-grid) { max-width: 920px; padding: 26px 30px 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-section { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  margin: 34px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-section.first { margin-top: 0; padding-top: 0; border-top: none; }
.form-section-help { margin: -8px 0 16px; color: var(--muted); font-size: 13.5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label, .form-field .label { font-weight: 600; font-size: 14px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; font: inherit; padding: 10px 12px;
  border: 1px solid #cfd6e0; border-radius: 8px; background: #fff; color: var(--ink); }
.form-field textarea { resize: vertical; }
.form-field .static { padding: 8px 0; }
.req { color: var(--err-ink); }
.help { font-size: 12.5px; color: var(--muted); }
.field-error { font-size: 13px; color: var(--err-ink); font-weight: 600; }
.form-field:has(.field-error) input, .form-field:has(.field-error) select, .form-field:has(.field-error) textarea { border-color: var(--err-ink); }
.form-actions { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 12px; }
.form-actions .btn { padding: 10px 22px; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; }
.inline-form input[type=text] { flex: 1 1 140px; min-width: 120px; padding: 5px 8px; font-size: 13px; }
.inline-form .btn { padding: 5px 10px; font-size: 13px; white-space: nowrap; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* move / assign / return page */
.check-list { margin: 4px 0 8px; }
.check-row { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.check-row input { margin-top: 4px; }
.subhead { font-size: 16px; margin: 24px 0 8px; }

/* reports */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.report-tile { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px; color: var(--ink); }
.report-tile:hover { border-color: var(--brand); text-decoration: none; }
.report-tile strong { font-size: 16px; color: var(--brand); }
.report-summary { font-weight: 600; margin: 6px 0 12px; }
.report-note { margin-top: 10px; font-size: 13px; }
.total-row td { background: #fafbfc; border-top: 2px solid var(--line); }
.filters label { font-weight: 600; font-size: 14px; }

/* printable documents */
.doc-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.doc-toolbar .grow { flex: 1; }
.doc-tip { font-size: 13.5px; margin: 0 0 14px; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: 6px; max-width: 800px; margin: 0 auto 30px;
  padding: 40px 48px; font-size: 14px; line-height: 1.45; }
.doc h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: 0.02em; }
.doc h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.07em; color: #444; border-bottom: 1px solid #bbb;
  padding-bottom: 4px; margin: 24px 0 10px; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.doc-co-name { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.doc-title { text-align: right; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 18px; }
.doc-kv { border-collapse: collapse; width: 100%; }
.doc-kv th { text-align: left; font-weight: 600; width: 190px; padding: 5px 12px 5px 0; vertical-align: top; }
.doc-kv td { padding: 5px 0; }
.doc-grid { border-collapse: collapse; width: 100%; }
.doc-grid th, .doc-grid td { border: 1px solid #999; padding: 6px 8px; text-align: left; vertical-align: top; }
.doc-grid th { background: #eee; font-size: 12.5px; }
.terms-text { font-size: 12.5px; }
.doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 46px; break-inside: avoid; }
.sign-line { border-bottom: 1px solid #000; height: 44px; margin-bottom: 6px; }
.sign-meta { margin-top: 14px; border-bottom: 1px solid #bbb; padding-bottom: 2px; color: #444; }

/* printing */
@page { size: A4; margin: 14mm; }
@media print {
  body { background: #fff; font-size: 11pt; color: #000; }
  .topbar, .no-print, .filters, .chips, .crumb, .pager, .form-actions, .inline-form, .btn, .alert, .result-bar { display: none !important; }
  .page-head-row .actions { display: none !important; }
  .grid td a[href*="_form.php"] { display: none !important; }
  main.wrap { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .card { border: none; padding: 0; margin-bottom: 14px; box-shadow: none; }
  .table-wrap { overflow: visible; border: 1px solid #999; border-radius: 0; }
  .grid th, .grid td { padding: 5px 7px; font-size: 10pt; }
  .grid thead th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #000; }
  tr { break-inside: avoid; }
  thead { display: table-header-group; }
  .badge { border: 1px solid #999; background: none !important; color: #000 !important; }
  .doc { border: none; padding: 0; max-width: none; margin: 0; font-size: 10.5pt; }
  .doc h2 { break-after: avoid; }
  .doc-terms { break-inside: auto; }
}

/* printed reports go sideways so wide tables fit */
@page report { size: A4 landscape; margin: 12mm; }
.report-page { page: report; }

/* customer equipment report */
.report-choose { max-width: 520px; }
.report-choose .form-field { margin-bottom: 14px; }
.report-options { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; margin-bottom: 14px; }
.doc-spaced { margin-top: 8px; }
.doc-foot { margin-top: 26px; font-size: 12px; }

/* dashboard */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; color: var(--ink); }
.kpi:hover { border-color: var(--brand); text-decoration: none; }
.kpi-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.kpi-num { font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--brand); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 13px; color: var(--muted); }
.kpi-warn { background: var(--warn-bg); border-color: #f2d9a6; }
.kpi-warn .kpi-num { color: var(--warn-ink); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.dash-grid .card { margin-bottom: 0; }
.dash-wide { grid-column: 1 / -1; }
.card-head a { font-size: 13.5px; }
.dash-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dash-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); text-align: left;
  font-weight: 600; padding: 0 8px 6px 0; }
.dash-table td { padding: 7px 8px 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.dash-table tbody tr:first-child td { border-top: none; }
.dash-table thead + tbody tr:first-child td { border-top: 1px solid var(--line); }
.dash-table .num { padding-right: 0; padding-left: 8px; }
.dash-table.money td { padding-top: 9px; padding-bottom: 9px; }
.dash-table .total-row td { background: none; border-top: 2px solid var(--line); }
.row-low td:first-child a { color: var(--warn-ink); font-weight: 600; }
.bar-col { width: 34%; vertical-align: middle !important; }
.bar { display: block; height: 8px; border-radius: 4px; background: #c9d8ec; }
.bar-0 { width: 0; }
.bar-5 { width: 5%; } .bar-10 { width: 10%; } .bar-15 { width: 15%; } .bar-20 { width: 20%; }
.bar-25 { width: 25%; } .bar-30 { width: 30%; } .bar-35 { width: 35%; } .bar-40 { width: 40%; }
.bar-45 { width: 45%; } .bar-50 { width: 50%; } .bar-55 { width: 55%; } .bar-60 { width: 60%; }
.bar-65 { width: 65%; } .bar-70 { width: 70%; } .bar-75 { width: 75%; } .bar-80 { width: 80%; }
.bar-85 { width: 85%; } .bar-90 { width: 90%; } .bar-95 { width: 95%; } .bar-100 { width: 100%; }
.dash-sub { font-size: 14px; margin: 22px 0 8px; }
.dash-sub.first { margin-top: 0; }
.dash-lead { margin: -4px 0 10px; }
.dash-foot { margin: 12px 0 0; }
.dash-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 13.5px; }
.dash-note a { color: var(--warn-ink); text-decoration: underline; }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { padding: 6px 0; border-top: 1px solid var(--line); }
.dash-list li:first-child { border-top: none; }
.dash-list strong { margin-right: 4px; font-variant-numeric: tabular-nums; }
.attention { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; }
@media (max-width: 900px) {
  .dash-grid, .attention { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-num { font-size: 24px; }
  .bar-col { display: none; }
  .dash-card { padding: 16px; }
  .card-head { flex-wrap: wrap; gap: 4px 12px; }
}

/* rental rates */
.btn-sm { padding: 5px 10px; font-size: 13px; }
.dash-note .btn { margin-top: 8px; color: var(--brand-ink); text-decoration: none; }
.rate-bulk { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.rate-bulk h2 { margin: 0 0 2px; }
.rate-bulk .sub { margin: 0; }
.rate-bulk-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rate-bulk-fields label { font-weight: 600; font-size: 14px; }
input.rate-input { width: 110px; font: inherit; padding: 7px 10px; border: 1px solid #cfd6e0; border-radius: 8px; text-align: right; }
.rates-table td { vertical-align: middle; }
.rates-table input[type=checkbox] { width: 18px; height: 18px; }
.row-err input.rate-input, .row-err select { border-color: var(--err-ink); }

/* add several units */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ok-tick { color: var(--ok-ink); font-weight: 600; }
.badge-gbp { background: #e8eefc; color: #2747a3; }
.company-tag { font-size: 12px; font-weight: 600; color: var(--muted); }
.row-suggest td { background: #f5f8ff; }

/* hardware payback */
.badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.bar.bar-ok { background: #8fcfa3; }
.kpi-ok .kpi-num { color: var(--ok-ink); }
.payback-head { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.payback-meter { display: block; background: var(--line); border-radius: 4px; }
.payback-meter .bar { background: #7ea3d1; }
.payback-meter .bar.bar-ok { background: #4caf6e; }
.payback-table .bar-col { width: 12%; min-width: 70px; }
.payback-how { margin-top: 18px; }
.plain-list { margin: 0 0 12px; padding-left: 18px; }
.plain-list li { margin: 4px 0; color: var(--muted); }
.plain-list strong, .plain-list em { color: var(--ink); }
.payback-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.payback-settings label { font-weight: 600; font-size: 14px; }
.neg { color: #b42318; font-weight: 600; }
.net-total dd { font-weight: 700; font-size: 1.1em; }
@media (max-width: 700px) {
  .payback-head { grid-template-columns: minmax(0, 1fr); }
}

/* Delete a cancelled record */
.btn-danger { background: var(--err-ink); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
a.link-danger { color: var(--err-ink); }

/* rental quote calculator */
.quote-form [hidden] { display: none !important; }
.h2-note { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.quote-main .card { max-width: none; }
.quote-side { position: sticky; top: 14px; }
.quote-side .card { padding: 18px; }
.q-table td { vertical-align: middle; }
.grid.q-table th, .grid.q-table td { padding: 8px 6px; }
.grid.q-table th:first-child, .grid.q-table td:first-child { padding-left: 12px; }
.q-table input, .q-table select { font: inherit; padding: 6px 8px; border: 1px solid #cfd6e0; border-radius: 8px; background: #fff; color: var(--ink); }
.q-table .q-src { width: 100%; min-width: 120px; max-width: 180px; }
.q-table .q-name { width: 100%; min-width: 130px; }
.q-table .q-qty { width: 58px; text-align: right; }
.q-table .q-num { width: 84px; text-align: right; }
.q-table .q-freq { width: 100px; }
.q-table .q-total { font-variant-numeric: tabular-nums; }
.q-table .q-c { text-align: center; }
.q-table input[type=checkbox] { width: 18px; height: 18px; }
.q-table .q-del { padding: 3px 9px; font-size: 16px; line-height: 1; }
.q-line-sub { margin-top: 2px; }
input.q-manual, select.q-manual { background: #fff8e6; border-color: #e7c983; }
.q-method { display: flex; gap: 22px; flex-wrap: wrap; margin: 0 0 16px; }
.q-method .check { font-weight: 600; }
.q-price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.q-suggest { margin-top: 20px; padding: 14px 16px; border-radius: 10px; background: #eef3fa; display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center; gap: 10px 20px; }
.q-suggest-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; }
.q-suggest-fields .label { color: var(--muted); }
.q-suggest-fields input { width: 72px; font: inherit; padding: 5px 8px; border: 1px solid #cfd6e0; border-radius: 8px; text-align: right; }
.q-suggest-result { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.q-kv { display: grid; grid-template-columns: minmax(130px, 1fr) auto; gap: 6px 12px; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.q-kv dt { color: var(--muted); font-size: 14px; }
.q-kv dd { margin: 0; text-align: right; font-weight: 600; }
.q-kv dd.q-big { font-size: 20px; color: var(--brand); }
.q-kv dd.q-big.neg { color: #b42318; }
.q-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.q-months { margin-top: 12px; font-size: 13.5px; }
.q-term-row td { font-weight: 600; }
.q-foot { margin: 12px 0 0; }
.quote-side .dash-note { margin-top: 10px; }
.q-delete { margin-left: auto; align-self: center; }
.q-qty-col { width: 60px; }
.doc-grid .num { text-align: right; }
.q-set-name { width: 100%; min-width: 220px; font: inherit; padding: 7px 10px; border: 1px solid #cfd6e0; border-radius: 8px; }
input.q-order { width: 80px; }
.q-defaults { max-width: 640px; }
.q-set-grid { margin-top: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .quote-layout { grid-template-columns: minmax(0, 1fr); }
  .quote-side { position: static; }
}
@media (max-width: 700px) {
  .q-price-grid, .q-set-grid { grid-template-columns: minmax(0, 1fr); }
}

/* quote -> agreement, assign hardware */
.assign-check { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 720px; }
.assign-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.assign-list { columns: 2 360px; column-gap: 28px; }
.assign-list .check-row { break-inside: avoid; }
@media (max-width: 900px) { .assign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .assign-check, .assign-grid { grid-template-columns: minmax(0, 1fr); } }

/* drop-down lists */
.lists-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.lists-grid .card { margin-bottom: 0; }
.list-remove { margin: 0; }
.list-add { margin-top: 14px; }
@media (max-width: 900px) { .lists-grid { grid-template-columns: minmax(0, 1fr); } }

/* stocktake and labels */
.kpi-on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.st-steps li { margin-bottom: 8px; }
.st-start { margin-top: 14px; }
.st-scan-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-scan-row .st-code { flex: 1 1 320px; font-size: 17px; padding: 10px 12px; }
.st-scan-row .st-loc { flex: 0 1 200px; }
.st-paste { margin-top: 10px; }
.st-paste summary { cursor: pointer; color: var(--brand); font-size: 14px; }
.st-paste textarea { display: block; width: 100%; max-width: 520px; margin: 8px 0; font: inherit; padding: 8px; box-sizing: border-box; }
.st-results { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; }
.st-results li { padding: 6px 10px; border-radius: 6px; margin-bottom: 4px; background: #f3f5f9; }
.st-results .st-r-ok { background: #e7f5ec; }
.st-results .st-r-elsewhere, .st-results .st-r-unknown, .st-results .st-r-choose { background: var(--warn-bg); }
.st-choose { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.st-explain { margin-top: -4px; }
.st-bulk { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 10px; }
.st-dismissed td { color: var(--muted); }
.st-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; }
@media (max-width: 700px) {
  .st-scan-row .st-loc { flex: 1 1 100%; }
}

/* dashboard: show / hide figures */
.figures-toggle { display: inline; margin: 0; }

/* ICR monthly check */
.icr-listhead { margin: 0 0 14px; }
.icr-review-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--warn-bg); color: var(--warn-ink);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.icr-review-bar .sub { color: var(--warn-ink); flex-basis: 100%; }
.icr-group { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.icr-group:first-of-type { border-top: none; padding-top: 4px; }
.icr-group-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; margin-bottom: 8px; }
.icr-group-figs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; }
.icr-group-figs .inline-form { margin: 0; }
.icr-table td .sub a { font-weight: 400; }
.icr-warn { color: var(--warn-ink); }
.icr-add { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0 8px; }
.icr-add-title { font-weight: 700; margin-bottom: 6px; }
.icr-add .grid { background: transparent; }
.icr-add .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.icr-price { width: 100%; max-width: 190px; }
details > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; }
details > summary::-webkit-details-marker { display: none; }
.icr-inline { display: inline; margin: 0; }

.kpi-bad { background: var(--err-bg); border-color: #f3c4c4; }
.kpi-bad .kpi-num, .kpi-bad .kpi-label { color: var(--err-ink); }
.badge-bad { background: var(--err-bg); color: var(--err-ink); }
.icr-cancel { border-color: #f3c4c4; }
.icr-cancel-total { font-weight: 700; color: var(--err-ink); }
.icr-mail { display: block; width: 100%; margin-top: 4px; font: 13px/1.5 Consolas, "Courier New", monospace; padding: 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); resize: vertical; }
.icr-group-head > div { min-width: 0; max-width: 100%; }
.icr-group-figs .btn { white-space: normal; text-align: left; max-width: 100%; }

/* Assign several items */
.bulk-search { max-width: 280px; width: 100%; }
.bulk-group .subhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bulk-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; font-weight: 400; }
.bulk-first { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.bulk-first input { width: 64px; padding: 4px 6px; }
.bulk-actions { position: sticky; bottom: 0; background: #fff; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.check-row.bulk-hidden, .bulk-group.bulk-hidden { display: none; }

/* Help */
.help-toc ol { columns: 2 260px; column-gap: 28px; margin: 0; padding-left: 20px; }
.help-toc li { margin: 3px 0; break-inside: avoid; }
.help section { scroll-margin-top: 80px; }
.help h3 { font-size: 15px; margin: 16px 0 6px; }
.help li { margin: 5px 0; line-height: 1.5; }
.help p { line-height: 1.55; }
.help code { background: #eef1f6; padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* Jobs and invoices, cash rentals */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 10px; }
.bulk-bar input[type=text] { width: 180px; }
.jobs-table td.details { min-width: 260px; max-width: 520px; }
.jobs-table .group-row td, .group-row td { background: #f4f6fa; font-weight: 600; font-size: 13.5px; }
.names-table input.pick { width: 100%; min-width: 260px; }
.names-table input.pick.guessed { background: #f2fbf4; border-color: #9fd3ad; }
.link-btn { background: none; border: 0; padding: 0 4px; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; }
.cash-table .mcell { text-align: center; padding-left: 4px; padding-right: 4px; font-size: 12.5px; white-space: nowrap; }
.cash-table .m-paid { color: var(--ok-ink); background: var(--ok-bg); }
.cash-table .m-owed { color: var(--err-ink); background: var(--err-bg); }
.cash-table .m-none { color: #c3c9d3; }
.cash-table tr.row-ended td { opacity: 0.65; }
.owed { color: var(--err-ink); font-weight: 600; }
.amount-in { width: 110px; text-align: right; }
.month-in { width: 90px; }
.setup-table input[type=text] { min-width: 0; }
.setup-table td { vertical-align: top; }

/* To do / reminders */
.todo-quick { padding: 12px 14px; }
.todo-quick-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.todo-quick-form input[type=text] { flex: 1 1 320px; min-width: 220px; }
.todo-table td.todo-title { min-width: 260px; }
.todo-table tr.todo-high td.todo-title > a { font-weight: 600; }
.todo-table tr.todo-done td { opacity: 0.6; }
.todo-table tr.todo-done td.todo-title > a { text-decoration: line-through; }
.todo-table .inline-form { margin: 0; }
.todo-dash-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.todo-dash-list .todo-tick { margin: 0; display: inline; }
.todo-dash-list .todo-tick .btn { padding: 1px 8px; line-height: 1.4; }
.todo-dash-list .todo-when { min-width: 92px; }
@media print { .todo-tick, .todo-quick { display: none !important; } }

/* User photo and My profile */
a.who { color: #fff; text-decoration: none !important; padding: 3px 10px 3px 3px; border-radius: 999px; }
a.who:hover, a.who.on { background: rgba(255,255,255,0.12); }
.avatar { width: 30px; height: 30px; flex: 0 0 auto; }
img.avatar-img { display: block; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,0.85); background: #fff; }
.avatar-xl { width: 120px; height: 120px; font-size: 48px; }
main img.avatar-img { box-shadow: 0 0 0 3px #fff, 0 2px 10px rgba(15,35,70,0.2); }
.profile-photo { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile-photo-actions { flex: 1 1 280px; }
.profile-photo-actions form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.file-btn { cursor: pointer; }

/* ===================================================================== job sheets and the phone app (13 Nov 2026) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.print-only { display: none; }
[hidden] { display: none !important; }

/* New job in the top menu: a filled button so it stands out */
.mainnav a.nav-new {
  background: #ffc94d; color: #3b2500 !important; box-shadow: 0 1px 2px rgba(0,0,0,0.2); margin-right: 4px;
}
.mainnav a.nav-new:hover, .mainnav a.nav-new.on { background: #ffd56e; color: #3b2500 !important; }
.mainnav a.nav-new .nav-ico { color: #3b2500 !important; opacity: 1; }
/* office menu is long: keep words on New job, Jobs and Scan, icons only for the rest until there's room */
@media (max-width: 1720px) { .mainnav-full { gap: 0; } .mainnav-full a { padding: 8px 7px; gap: 5px; font-size: 13.5px; } .mainnav-full a.nav-new { margin-right: 2px; } }
@media (max-width: 1919px) { .mainnav-full a:not(.nav-new):not(.nav-pri):not(.on) .nav-label { display: none; } .mainnav-full a { padding: 8px 9px; } }
@media (min-width: 1920px) { .topbar-in { max-width: 1900px; } }
@media (max-width: 1300px) { .mainnav a.nav-new .nav-label, .mainnav a.nav-pri .nav-label { display: inline; } }
@media (max-width: 1020px) { .mainnav a.nav-pri .nav-label { display: none; } }
.nav-count-blue { background: #4f9bea; box-shadow: 0 0 0 2px #17447a; }
.badge-live { background: #dff0ff; color: #0b5cad; }
.badge-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1e88e5; margin-right: 5px; vertical-align: 1px; animation: fj-pulse 1.4s infinite; }
@keyframes fj-pulse { 50% { opacity: 0.25; } }

/* big buttons (Jobs home, dashboard, More) */
.big-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.big-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px;
  padding: 12px 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink);
  font-weight: 650; font-size: 15px; text-align: center; box-shadow: 0 1px 2px rgba(15,35,70,0.05);
}
.big-btn:hover { text-decoration: none; border-color: var(--brand); }
.big-btn .nav-ico { width: 26px; height: 26px; color: var(--brand); }
.big-btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.big-btn-primary .nav-ico { color: #ffc94d; }
.big-btn-primary:hover { filter: brightness(1.1); }
.big-btn-warn { background: var(--warn-bg); border-color: #f2d9a6; }
.big-btn .nav-count { margin-left: 4px; vertical-align: 1px; box-shadow: none; }
.big-actions-dash { margin-top: -4px; }
.big-actions-menu { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (max-width: 760px) {
  .big-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .big-btn { min-height: 76px; }
}

.field-hello { margin-bottom: 16px; }
.field-hello h1 { margin-bottom: 0; }
.field-section { margin: 0 0 22px; }
.field-section > h2, .field-section .card-head h2 { font-size: 16px; }
.fj-empty { background: var(--card); border: 1px dashed #cfd6e0; border-radius: 12px; padding: 16px; margin: 0; }

/* job cards */
.fj-cards { display: grid; gap: 10px; }
.fj-card {
  display: flex; flex-direction: column; gap: 3px; padding: 13px 15px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); color: var(--ink); box-shadow: 0 1px 2px rgba(15,35,70,0.04);
}
.fj-card:hover { text-decoration: none; border-color: var(--brand); }
.fj-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fj-card-cust { font-weight: 700; font-size: 15.5px; }
.fj-card-meta { font-size: 13px; color: var(--muted); }
.fj-card-what { font-size: 14px; color: #3a4658; }
@media (min-width: 900px) { .fj-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* customer / item picking */
.pick-search { display: flex; gap: 8px; margin: 0 0 16px; }
.pick-search input[type=search] { flex: 1 1 auto; min-width: 0; font-size: 16px; padding: 11px 12px; }
.pick-list { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pick-row { display: flex; flex-direction: column; padding: 12px 15px; border-bottom: 1px solid var(--line); color: var(--ink); }
.pick-row:last-child { border-bottom: none; }
.pick-row:hover { background: #f3f7fc; text-decoration: none; }
.pick-name { font-weight: 650; }
.pick-sub { font-size: 13px; color: var(--muted); }

/* job sheet page */
.fj-head h1 { margin-bottom: 2px; }
.fj-head-status { margin: 4px 0 0; }
.fj-customer h2 { font-size: 19px; margin-bottom: 4px; }
.fj-customer p { margin: 4px 0; }
.fj-address { color: #3a4658; }
.fj-contact-btns, .photo-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fj-contact-btns .btn, .photo-btns .btn { display: inline-flex; align-items: center; gap: 7px; }
.btn-big { padding: 12px 18px; font-size: 15.5px; border-radius: 10px; }
.btn .nav-ico { width: 18px; height: 18px; }
.fj-clock .btn-big { width: 100%; max-width: 420px; }
.label-sm { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin: 10px 0 2px; }
.fj-text { margin: 0 0 6px; white-space: normal; }
.fj-work-form textarea, .field-form textarea {
  width: 100%; font: inherit; padding: 10px; border: 1px solid #cfd6e0; border-radius: 8px; margin-bottom: 8px;
}
.fj-items { list-style: none; margin: 0; padding: 0; }
.fj-items li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.fj-items li:last-child { border-bottom: none; }
.fj-item-action { display: inline-block; min-width: 82px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--brand); }
.fj-at-customer { margin-top: 14px; }
.fj-at-customer summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 6px 0; }
.fj-finish .btn-big { min-width: 200px; }
.inline-form .btn-big { padding: 12px 18px; font-size: 15.5px; }
.fj-finish .inline-form, .fj-clock .inline-form { display: block; }
#signature, .fj-sig { max-width: none; }
.fj-reopen { margin: 12px 0 0; }
.big-check { margin: 4px 0 4px; font-size: 15px; }
.big-check input { width: 20px; height: 20px; }

/* photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.photo { position: relative; display: flex; flex-direction: column; gap: 3px; color: var(--ink); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #eef1f6; display: block; }
.photo-cap { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-del { position: absolute; top: 6px; right: 6px; }
.photo-del .btn { background: rgba(255,255,255,0.92); padding: 2px 8px; }
.photo-add { border-top: 1px solid var(--line); padding-top: 12px; }
.photo-add input[type=text], .photo-add select { width: 100%; }

/* signature */
.sig-pad { display: block; width: 100%; max-width: 600px; height: 200px; border: 2px dashed #b9c4d3; border-radius: 10px; background: #fff; touch-action: none; margin: 6px 0 12px; }
.sig-img { display: block; max-width: 320px; width: 100%; border-bottom: 1px solid #999; margin-bottom: 6px; }

/* choosing what happened to an item */
.choice-list { border: none; padding: 0; margin: 0 0 14px; }
.choice-list legend { font-weight: 650; margin-bottom: 6px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.choice input { width: 20px; height: 20px; flex: 0 0 auto; }
.choice:has(input:checked) { border-color: var(--brand); background: #eef4fc; }

/* scanning */
.scan-view { position: relative; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 12px; max-width: 520px; }
.scan-view video { display: block; width: 100%; max-height: 60vh; object-fit: cover; }
.scan-frame { position: absolute; left: 10%; right: 10%; top: 32%; bottom: 32%; border: 3px solid #ffc94d; border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,0.35); }
.scan-card .pick-search { margin: 14px 0 0; }
.scan-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 20px; margin: 6px 0 12px; }
.scan-facts dt { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.scan-facts dd { margin: 1px 0 0; font-weight: 600; }

/* More */
.menu-me { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.who-row { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.who-row:hover { text-decoration: none; }
.who-row .avatar { width: 44px; height: 44px; font-size: 18px; }
.offline-page { text-align: center; padding-top: 14vh; max-width: 460px; }

/* bottom bar on phones */
.tabbar { display: none; }
@media (max-width: 760px) {
  .topbar .mainnav { display: none; }
  .topbar-in { min-height: 54px; }
  .topbar .btn-signout { display: none; }
  .brand-text { display: flex; }
  .topbar .signout { margin-left: auto; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff;
    border-top: 1px solid var(--line); box-shadow: 0 -2px 12px rgba(15,35,70,0.08);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
    padding: 5px 2px 3px; color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none !important;
  }
  .tabbar a.on { color: var(--brand); }
  .tab-ico { position: relative; display: block; line-height: 0; }
  .tab-ico .nav-ico { width: 24px; height: 24px; }
  .tab-ico .nav-count { position: absolute; top: -6px; left: 15px; box-shadow: 0 0 0 2px #fff; }
  .tab-new { position: relative; }
  .tab-new-btn {
    display: grid; place-items: center; width: 54px; height: 54px; margin-top: -24px; border-radius: 50%;
    background: var(--brand); color: #ffc94d; box-shadow: 0 4px 12px rgba(23,68,122,0.45); border: 3px solid #fff;
  }
  .tab-new-btn .nav-ico { width: 28px; height: 28px; stroke-width: 2.4; }
  .tabbar a.tab-new { color: var(--brand); }
  body.has-nav main.wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.has-nav { -webkit-tap-highlight-color: rgba(23,68,122,0.12); }
  main.wrap { padding-left: 14px; padding-right: 14px; padding-top: 14px; }
  .card, .card:has(> form .form-grid) { padding: 15px 15px; border-radius: 12px; }
  .form-actions .btn, .fj-finish .btn-big, .photo-btns .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
  input[type=text], input[type=search], input[type=password], input[type=date], select, textarea { font-size: 16px; } /* stops iPhone zooming in */
}
/* full screen app on iPhone: keep clear of the notch */
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); }
}

@media print {
  .tabbar, .photo-add, .photo-del, .big-actions { display: none !important; }
  .print-only { display: block; }
  .fj-work-form { display: none !important; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo, .fj-items li { break-inside: avoid; }
  .sig-img { max-width: 240px; }
}

/* settings: drop-down lists (14 Nov 2026) */
.list-jump { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 13.5px; }
.list-group-head { font-size: 17px; margin: 26px 0 10px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-head h2 { margin: 0; }
.list-inline { display: inline-flex; gap: 4px; margin: 0; }
.list-table td { vertical-align: top; }
.list-table .badge { margin-left: 6px; font-size: 11px; }
.list-hidden td:first-child { color: var(--muted); }
.list-rename { margin-top: 4px; font-size: 13px; }
.list-rename summary { cursor: pointer; color: var(--brand); display: inline-block; }
.list-rename form { margin-top: 6px; flex-wrap: wrap; gap: 6px; }
.list-rename input[type=text] { min-width: 0; width: 200px; max-width: 100%; }
.list-merge { margin: 0; align-items: center; font-size: 13px; }
.list-merge input { margin-top: 0; }
.btn-icon { min-width: 30px; padding-left: 6px; padding-right: 6px; }
.btn[disabled] { opacity: .35; cursor: default; }
