/* SCMS theme on top of Bootstrap 5 */
:root {
  --scms-ink: #17212b;
  --scms-accent: #d9480f;
  --bs-link-color: #b33d0b;
  --bs-link-color-rgb: 179, 61, 11;
  --bs-link-hover-color: #8a2e07;
}

body { background: #f5f6f8; }
.bg-ink { background: var(--scms-ink); }
.guest-bg { background: linear-gradient(160deg, #17212b 0%, #2b3a48 60%, #3b2a20 100%); }

.btn-primary {
  --bs-btn-bg: var(--scms-accent); --bs-btn-border-color: var(--scms-accent);
  --bs-btn-hover-bg: #b33d0b; --bs-btn-hover-border-color: #b33d0b;
  --bs-btn-active-bg: #8a2e07; --bs-btn-active-border-color: #8a2e07;
  --bs-btn-disabled-bg: var(--scms-accent); --bs-btn-disabled-border-color: var(--scms-accent);
}
.btn-outline-primary {
  --bs-btn-color: var(--scms-accent); --bs-btn-border-color: var(--scms-accent);
  --bs-btn-hover-bg: var(--scms-accent); --bs-btn-hover-border-color: var(--scms-accent);
  --bs-btn-active-bg: #b33d0b; --bs-btn-active-border-color: #b33d0b;
}
.form-check-input:checked { background-color: var(--scms-accent); border-color: var(--scms-accent); }

@media (min-width: 992px) {
  .sidebar { min-height: calc(100vh - 56px); border-right: 1px solid var(--bs-border-color); }
}
.sidebar .nav-link { color: var(--bs-body-color); border-radius: .375rem; }
.sidebar .nav-link.active { background: var(--scms-ink); color: #fff; }
.sidebar-caption { font-size: .7rem; letter-spacing: .05em; }

.page-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.stat-card .stat-label { color: var(--bs-secondary-color); font-size: .85rem; }
.table td, .table th { vertical-align: middle; }
.table-responsive { border-radius: .5rem; }
.card { border-color: #e6e8eb; }
.mono { font-family: var(--bs-font-monospace); }
.temp-password { font-family: var(--bs-font-monospace); font-size: 1.25rem; letter-spacing: .08em; user-select: all; }
.perm-group { break-inside: avoid; }
@media (min-width: 992px) { .perm-columns { column-count: 2; column-gap: 2rem; } }
.json-cell { max-width: 28rem; font-size: .8rem; white-space: pre-wrap; word-break: break-word; }
.hours-grid input[type=time] { min-width: 7rem; }
.mw-20 { max-width: 20rem; }
.w-order { width: 5.5rem; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .6rem; }
.staff-tile { position: relative; display: flex; flex-direction: column; gap: .1rem; padding: .75rem .9rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: #fff; cursor: pointer; }
.staff-tile input { position: absolute; opacity: 0; pointer-events: none; }
.staff-tile:has(input:checked) { border-color: var(--scms-accent); box-shadow: 0 0 0 2px var(--scms-accent) inset; }
.staff-tile:has(input:focus-visible) { outline: 2px solid var(--scms-accent); outline-offset: 2px; }
.staff-tile.is-locked { opacity: .55; cursor: not-allowed; }
.staff-name { font-weight: 600; }
.staff-role { font-size: .8rem; color: var(--bs-secondary-color); }
.pin-input { letter-spacing: .5em; font-family: var(--bs-font-monospace); }
.counter-bar { background: #fff3e8; border-bottom: 1px solid #f3d3b8; }
.emergency-bar { background: #b02a37; color: #fff; }
.top-search { max-width: 22rem; flex: 1 1 14rem; }
.branch-select { min-width: 8.5rem; }
/* Voice entry: mic button inside every text box */
.voice-wrap { position: relative; display: block; }
.voice-wrap > .form-control, .voice-wrap > .form-control-sm { padding-right: 2.4rem; }
.voice-btn { position: absolute; top: 0; right: 0; height: 100%; max-height: 2.4rem; width: 2.3rem; border: 0; background: transparent; color: var(--bs-secondary-color); border-radius: 0 .375rem .375rem 0; }
.voice-wrap.is-area .voice-btn { top: .2rem; height: 2.1rem; }
.voice-btn:hover, .voice-btn:focus-visible { color: var(--scms-accent); }
.voice-btn:focus-visible { outline: 2px solid var(--scms-accent); outline-offset: -2px; }
.voice-btn.is-listening { color: #fff; background: #c92a2a; animation: voice-pulse 1.2s ease-in-out infinite; }
.voice-note { display: block; margin-top: .25rem; color: var(--bs-secondary-color); }
.top-search .voice-wrap { width: 100%; }
.navbar .voice-btn { color: #6c757d; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 .3rem rgba(201, 42, 42, .25); } }
@media (prefers-reduced-motion: reduce) { .voice-btn.is-listening { animation: none; } }

/* Starter lists */
.w-amount { width: 7rem; }
.fit-chip { font-weight: 500; font-size: .85rem; padding: .35rem .5rem; display: inline-flex; align-items: center; }
.btn-close-sm { width: .5rem; height: .5rem; background-size: .5rem; }
.w-rate { width: 11rem; }
/* A voice button inside an input group keeps the group on one line. */
.input-group > .voice-wrap { flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group > .voice-wrap:not(:last-child) > .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .voice-wrap:not(:first-child) > .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: calc(-1 * var(--bs-border-width)); }
.input-group > .voice-wrap:not(:last-child) .voice-btn { border-radius: 0; }

/* Job cards */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .4rem; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .375rem; border: 1px solid var(--bs-border-color); }
.action-panel > summary { list-style: none; }
.action-panel > summary::-webkit-details-marker { display: none; }
.action-panel[open] > summary { box-shadow: 0 0 0 .2rem rgba(0,0,0,.08); }
.action-panel > .card { min-width: 18rem; max-width: 30rem; }
.approval-row td { background: transparent; }
/* Stock forms */
.w-qty { width: 5.5rem; }
.w-gst { width: 6.5rem; }
.w-part { min-width: 18rem; }
.sidebar .nav-link { padding: .38rem .75rem; }
.voice-wrap:has(> .d-none) { display: none; }

/* Job board: one column per stage; on a phone the columns stack. */
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; align-items: start; padding-bottom: .5rem; }
@media (max-width: 1599.98px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.board-col { background: var(--bs-tertiary-bg); border-radius: .5rem; padding: .5rem; min-height: 6rem; }
.board-head { font-size: .95rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; margin: .1rem .2rem .5rem; }
.board-empty { color: var(--bs-secondary-color); text-align: center; padding: .75rem 0; }
.job-tile { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-left: .3rem solid var(--bs-secondary); border-radius: .4rem; padding: .5rem .6rem; margin-bottom: .5rem; }
.board-in_progress .job-tile { border-left-color: var(--bs-primary); }
.board-waiting_parts .job-tile, .board-waiting_customer .job-tile { border-left-color: var(--bs-warning); }
.board-ready .job-tile, .job-tile.is-done { border-left-color: var(--bs-success); }
.board-delivered .job-tile { border-left-color: var(--bs-dark); opacity: .8; }
.job-tile.is-late { border-left-color: var(--bs-danger); background: var(--bs-danger-bg-subtle); }
.job-reg { font-weight: 700; font-size: 1.05rem; text-decoration: none; }
@media (max-width: 991.98px) { .board { grid-template-columns: 1fr; } }

/* What's left on a job card */
.whats-left { border-left: .3rem solid var(--bs-primary); }
.whats-left .step { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 1rem; font-size: .85rem; text-decoration: none; border: 1px solid var(--bs-border-color); color: var(--bs-body-color); background: var(--bs-body-bg); }
.whats-left .step.is-done { color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); border-color: var(--bs-success-border-subtle); }
.whats-left .step.is-todo { color: var(--bs-danger-text-emphasis); background: var(--bs-danger-bg-subtle); border-color: var(--bs-danger-border-subtle); }
.whats-left .progress { height: .45rem; }
.whats-left .progress-bar { width: 0; }
.autosave-note { font-size: .75rem; white-space: nowrap; }

/* My jobs (technician phone screen) */
.my-job { border-left: .35rem solid var(--bs-primary); }
.my-job.is-late { border-left-color: var(--bs-danger); }
.my-job .line-toggle { display: flex; align-items: center; gap: .6rem; padding: .55rem .25rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.my-job .line-toggle:last-child { border-bottom: 0; }
.my-job .line-toggle .btn { min-width: 6.5rem; }
.my-job .big-btn { padding: .6rem 1rem; font-size: 1rem; }
.w-pct-0 { width: 0%; }
.w-pct-10 { width: 10%; }
.w-pct-20 { width: 20%; }
.w-pct-30 { width: 30%; }
.w-pct-40 { width: 40%; }
.w-pct-50 { width: 50%; }
.w-pct-60 { width: 60%; }
.w-pct-70 { width: 70%; }
.w-pct-80 { width: 80%; }
.w-pct-90 { width: 90%; }
.w-pct-100 { width: 100%; }

/* Test data */
.w-0 { width: 0; }
.test-data-bar { background: repeating-linear-gradient(45deg, #fff3cd, #fff3cd 12px, #ffe69c 12px, #ffe69c 24px); border-bottom: 1px solid #e0b100; }
.more-details > summary { cursor: pointer; }
.more-details > summary::marker { color: var(--bs-secondary-color); }
.thumb-96 { width: 96px; height: 96px; object-fit: cover; }
.text-pre { white-space: pre-line; }
.mw-36 { max-width: 36rem; }
.theme-dot { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; vertical-align: -2px; }
.theme-dot-blue { background: #1d4ed8; } .theme-dot-green { background: #15803d; } .theme-dot-red { background: #c2410c; } .theme-dot-dark { background: #334155; }
.mw-48 { max-width: 48rem; }
.mw-24 { max-width: 24rem; width: 100%; }
.w-0 { width: 0; }
.demo-role { background: #fff; transition: box-shadow .15s, border-color .15s; } .demo-role:hover, .demo-role:focus { border-color: #0d6efd !important; box-shadow: 0 .5rem 1rem rgba(0,0,0,.08) !important; }

/* ---- Colourful plan cards (owner request 26 Oct 2026). Colour set per plan in Plans & modules. ---- */
.plan-c-blue   { --plan: #1d4ed8; --plan-2: #3b82f6; --plan-soft: #eff6ff; }
.plan-c-teal   { --plan: #0f766e; --plan-2: #14b8a6; --plan-soft: #f0fdfa; }
.plan-c-green  { --plan: #15803d; --plan-2: #22c55e; --plan-soft: #f0fdf4; }
.plan-c-orange { --plan: #c2410c; --plan-2: #f97316; --plan-soft: #fff7ed; }
.plan-c-red    { --plan: #b91c1c; --plan-2: #ef4444; --plan-soft: #fef2f2; }
.plan-c-purple { --plan: #6d28d9; --plan-2: #a855f7; --plan-soft: #faf5ff; }
.plan-c-pink   { --plan: #be185d; --plan-2: #ec4899; --plan-soft: #fdf2f8; }
.plan-c-gold   { --plan: #a16207; --plan-2: #eab308; --plan-soft: #fefce8; }
.plan-c-slate  { --plan: #334155; --plan-2: #64748b; --plan-soft: #f8fafc; }
.plan-x { position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid #e5e7eb; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06); transition: transform .15s ease, box-shadow .15s ease; }
.plan-x:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .12); }
.plan-x.is-popular { border: 2px solid var(--plan); box-shadow: 0 10px 28px rgba(15, 23, 42, .16); }
.plan-x.is-current { border: 2px solid var(--plan); }
.plan-x:has(.plan-ribbon) .plan-top { padding-top: 2.1rem; }
.plan-top { padding: 1rem 1.1rem .9rem; color: #fff; background: linear-gradient(135deg, var(--plan), var(--plan-2)); }
.plan-icon { width: 2.4rem; height: 2.4rem; border-radius: .75rem; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .2); font-size: 1.25rem; margin-bottom: .4rem; }
.plan-name { font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.plan-for { font-size: .85rem; opacity: .92; }
.plan-ribbon { position: absolute; top: .75rem; right: .75rem; background: #fff; color: var(--plan); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .55rem; border-radius: 999px; }
.plan-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.plan-price { font-size: 1.9rem; font-weight: 800; color: var(--plan); line-height: 1.1; }
.plan-price span { font-size: .85rem; font-weight: 400; color: #6b7280; }
.plan-limits { font-size: .85rem; color: #4b5563; background: var(--plan-soft); border-radius: .5rem; padding: .35rem .6rem; margin: .6rem 0; }
.plan-feats { list-style: none; padding: 0; margin: 0 0 .75rem; font-size: .9rem; }
.plan-feats li { padding: .18rem 0 .18rem 1.5rem; position: relative; }
.plan-feats li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .12rem; color: var(--plan); font-weight: 700; }
.plan-feats li.soon { color: #6b7280; }
.plan-save { font-size: .8rem; color: #15803d; font-weight: 600; margin-bottom: .6rem; }
.plan-foot { margin-top: auto; }
.btn-plan { --bs-btn-color: #fff; --bs-btn-bg: var(--plan); --bs-btn-border-color: var(--plan); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--plan-2); --bs-btn-hover-border-color: var(--plan-2);
  --bs-btn-active-bg: var(--plan); --bs-btn-active-color: #fff; font-weight: 600; }
.btn-plan-outline { --bs-btn-color: var(--plan); --bs-btn-border-color: var(--plan); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--plan); --bs-btn-hover-border-color: var(--plan); font-weight: 600; }
label.plan-pick-x { display: block; cursor: pointer; height: 100%; margin: 0; }
label.plan-pick-x input { position: absolute; opacity: 0; pointer-events: none; }
.plan-picked { display: none; }
label.plan-pick-x:has(input:checked) .plan-x { border: 2px solid var(--plan); box-shadow: 0 0 0 4px var(--plan-soft), 0 10px 24px rgba(15, 23, 42, .12); }
label.plan-pick-x:has(input:checked) .plan-picked { display: inline-block; }
label.plan-pick-x:has(input:focus-visible) .plan-x { outline: 3px solid var(--plan); outline-offset: 2px; }
.plan-x.plan-compact .plan-top { padding: .7rem .9rem; }
.plan-x.plan-compact .plan-name { font-size: 1.05rem; }
.plan-x.plan-compact .plan-icon { display: none; }
.plan-x.plan-compact .plan-body { padding: .7rem .9rem .9rem; }
.plan-x.plan-compact .plan-price { font-size: 1.4rem; }
.plan-x.is-hidden-plan { opacity: .7; }
.swatch { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; font-size: .8rem; margin: 0 .5rem .3rem 0; }
.swatch input { accent-color: var(--plan); }
.swatch-dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: linear-gradient(135deg, var(--plan), var(--plan-2)); display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px #d1d5db; }
.hero-band { background: linear-gradient(135deg, #17212b 0%, #263445 55%, #d9480f 140%); color: #fff; border-radius: 1.25rem; padding: 2.5rem 1.25rem; }
.hero-band .lead, .hero-band .text-body-secondary { color: rgba(255, 255, 255, .85) !important; }
.hero-band .btn-outline-primary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .7); --bs-btn-hover-bg: #fff; --bs-btn-hover-color: #17212b; }
.profile-hero { background: linear-gradient(135deg, #17212b, #334155); color: #fff; border-radius: 1rem; padding: 1.25rem; }
.avatar-xl { width: 4rem; height: 4rem; border-radius: 50%; background: linear-gradient(135deg, #d9480f, #f59e0b); color: #fff; font-weight: 700; font-size: 1.5rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stat-tile { border-radius: .9rem; padding: .9rem 1rem; color: #fff; }
.stat-tile .n { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-tile.t-blue { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.stat-tile.t-orange { background: linear-gradient(135deg, #c2410c, #f97316); }
.stat-tile.t-green { background: linear-gradient(135deg, #15803d, #22c55e); }

/* ---- Colour coding (owner request 26 Oct 2026): one meaning per colour everywhere, with an icon so colour is never alone. ----
   Blue = being worked on · Sky = just arrived · Orange = waiting · Yellow = needs the customer · Green = done / paid / OK ·
   Red = late / due / problem · Slate = closed. Menu groups also have their own colour. */
.st { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; line-height: 1.2; padding: .22rem .55rem; border-radius: 999px;
  color: var(--st); background: var(--st-soft); border: 1px solid color-mix(in srgb, var(--st) 25%, transparent); white-space: nowrap; }
.st-checked_in      { --st: #0369a1; --st-soft: #e0f2fe; }
.st-in_progress     { --st: #1d4ed8; --st-soft: #dbeafe; }
.st-waiting_parts   { --st: #c2410c; --st-soft: #ffedd5; }
.st-waiting_customer { --st: #a16207; --st-soft: #fef9c3; }
.st-ready           { --st: #15803d; --st-soft: #dcfce7; }
.st-delivered       { --st: #334155; --st-soft: #f1f5f9; }
.st-cancelled       { --st: #6b7280; --st-soft: #f3f4f6; }
.st-late            { --st: #b91c1c; --st-soft: #fee2e2; }
.st-paid            { --st: #15803d; --st-soft: #dcfce7; }
.st-part_paid       { --st: #c2410c; --st-soft: #ffedd5; }
.st-due             { --st: #b91c1c; --st-soft: #fee2e2; }
.st-ok              { --st: #15803d; --st-soft: #dcfce7; }
.st-low             { --st: #c2410c; --st-soft: #ffedd5; }
.st-out             { --st: #b91c1c; --st-soft: #fee2e2; }
/* Job board columns carry the status colour */
.board-col { border-top: 4px solid var(--st, #94a3b8); }
.board-checked_in { --st: #0369a1; } .board-in_progress { --st: #1d4ed8; } .board-waiting_parts { --st: #c2410c; }
.board-waiting_customer { --st: #a16207; } .board-ready { --st: #15803d; } .board-delivered { --st: #334155; }
/* Menu groups: each group has its colour (icons and the selected item) */
.nav-c-blue { --nc: #1d4ed8; } .nav-c-teal { --nc: #0f766e; } .nav-c-orange { --nc: #c2410c; } .nav-c-indigo { --nc: #4338ca; }
.nav-c-green { --nc: #15803d; } .nav-c-purple { --nc: #7c3aed; } .nav-c-slate { --nc: #334155; } .nav-c-ink { --nc: #17212b; } .nav-c-red { --nc: #b91c1c; }
.sidebar .nav-link[class*="nav-c-"] i { color: var(--nc); }
.sidebar .nav-link[class*="nav-c-"].active { background: var(--nc); color: #fff; }
.sidebar .nav-link[class*="nav-c-"].active i { color: #fff; }
.sidebar .nav-link[class*="nav-c-"]:hover:not(.active) { background: color-mix(in srgb, var(--nc) 10%, transparent); }
.sidebar-caption .cap-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--nc); margin-right: .35rem; }
/* Dashboard tiles with a coloured edge */
.stat-card.tone-l { border-left: 5px solid var(--nc); }
.stat-card.tone-l .stat-value { color: var(--nc); }
.legend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; }
/* Listing page and WhatsApp buttons inside SCMS */
.btn-wa { --bs-btn-color: #fff; --bs-btn-bg: #25d366; --bs-btn-border-color: #25d366; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #1ebe5b; --bs-btn-hover-border-color: #1ebe5b; }
.listing-logo { object-fit: cover; }
.listing-logo-empty { width: 56px; height: 56px; border-radius: .8rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem;
  color: #fff; background: linear-gradient(135deg, #d9480f, #f59e0b); }
.listing-photo { height: 90px; width: 100%; object-fit: cover; }
/* Audit log in plain words */
.audit-table td { vertical-align: top; }
.audit-changes { min-width: 16rem; max-width: 34rem; }
.audit-changes li { margin-bottom: .1rem; }
.audit-old { text-decoration: line-through; color: var(--bs-secondary-color); }
.audit-changes details summary { cursor: pointer; font-size: .75rem; }
.reset-menu { min-width: 19rem; } .reset-menu .dropdown-item { white-space: normal; }
/* Part condition codes (staff only): R1 refurbished, R2 repaired, U used */
.cond-badge { font-size: .7rem; font-weight: 600; letter-spacing: .02em; vertical-align: middle; }
.cond-r1 { background: #e0e7ff; color: #3730a3; }
.cond-r2 { background: #fef3c7; color: #92400e; }
.cond-u { background: #e5e7eb; color: #374151; }
.cond-n { background: #dcfce7; color: #166534; }
.w-cond { min-width: 4.2rem; }
/* Phone bottom bar: Home · Job cards · + New · Search · Menu */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; display: flex; justify-content: space-around; align-items: stretch;
  background: #fff; border-top: 1px solid var(--bs-border-color); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.bottom-item { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; padding: 2px;
  color: var(--bs-secondary-color); text-decoration: none; font-size: .72rem; background: none; border: 0; border-radius: .6rem; }
.bottom-item .bi { font-size: 1.3rem; line-height: 1; }
.bottom-item.active { color: var(--bs-primary); font-weight: 600; }
.bottom-item:active { background: var(--bs-tertiary-bg); }
.bottom-item.bottom-new .bi { background: var(--bs-primary); color: #fff; border-radius: 50%; width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-top: -14px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
@media (max-width: 991.98px) { body.has-bottom-bar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } }
@media print { .bottom-bar { display: none !important; } }
/* Camera scanner */
.scan-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 16px; }
.scan-box { position: relative; width: 100%; max-width: 480px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; text-align: center; }
.scan-video { width: 100%; max-height: 60vh; border-radius: 12px; background: #000; object-fit: cover; }
.scan-frame { position: absolute; top: 18%; left: 15%; right: 15%; height: 28%; border: 3px solid rgba(255,255,255,.85); border-radius: 12px; pointer-events: none; }
.scan-msg { font-size: 1rem; }
.scan-close { min-width: 8rem; }
.issue-form { max-width: 22rem; }
.issue-form .issue-serial { flex: 1 1 9rem; min-width: 9rem; }
.issue-form .voice-wrap { flex: 1 1 9rem; min-width: 9rem; }
/* Purchase lines on a phone: one card per line instead of a wide table */
@media (max-width: 767.98px) {
  .purchase-lines thead { display: none; }
  .purchase-lines tbody tr[data-line] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem .5rem; padding: .7rem .75rem; border-bottom: 1px solid var(--bs-border-color); }
  .purchase-lines tbody tr[data-line] > td { display: block; border: 0; padding: 0; min-width: 0; }
  .purchase-lines tbody tr[data-line] > td:first-child { grid-column: 1 / -1; }
  .purchase-lines tbody tr[data-line] > td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--bs-secondary-color); text-align: left; }
  .purchase-lines tbody tr[data-line] > td[data-amount], .purchase-lines tbody tr[data-line] > td[data-min] { text-align: left !important; }
  .purchase-lines tbody tr[data-line] > td[data-amount]:empty, .purchase-lines tbody tr[data-line] > td[data-min]:empty { display: none; }
  .purchase-lines .w-qty, .purchase-lines .w-amount, .purchase-lines .w-gst, .purchase-lines .w-cond { width: 100%; min-width: 0; }
  .purchase-lines tfoot tr { display: flex; justify-content: space-between; }
  .purchase-lines tfoot td { border: 0; }
  .purchase-lines tfoot td:empty { display: none; }
}
/* Control panel top menu: wrap onto a second line instead of running off the screen */
@media (min-width: 768px) {
  #pfnav .navbar-nav { flex-wrap: wrap; row-gap: .1rem; }
  #pfnav .nav-link { padding-left: .45rem; padding-right: .45rem; }
}

/* Support chat (27 Oct 2026) */
.chat-log { max-height: 62vh; overflow-y: auto; scroll-behavior: smooth; padding-right: .25rem; }
.chat-badge { font-size: .65rem; vertical-align: top; }

/* Collect payment QR (27 Oct 2026) */
.collect-qr { width: min(320px, 80vw); aspect-ratio: 1 / 1; }
.collect-qr svg { width: 100%; height: 100%; }

/* Part and work search (replaces the browser's suggestion list on phones) */
.pick-box { position: absolute; left: 0; right: 0; top: 100%; z-index: 1060; max-height: 18rem; overflow-y: auto; background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #ced4da); border-radius: .5rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); margin-top: 2px; min-width: 16rem; }
.pick-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .55rem .75rem; font-size: .95rem; line-height: 1.3; color: inherit; }
.pick-item small { display: block; color: var(--bs-secondary-color, #6c757d); font-size: .8rem; }
.pick-item:hover, .pick-item.active { background: var(--bs-primary-bg-subtle, #e7f1ff); }
.pick-item + .pick-item { border-top: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,.08)); }
.pick-none { padding: .6rem .75rem; color: var(--bs-secondary-color, #6c757d); font-size: .9rem; }

/* Job card work and parts on a phone: one card per line, the amounts visible without scrolling sideways */
@media (max-width: 767.98px) {
  .jc-lines thead { display: none; }
  .jc-lines tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; padding: .7rem .75rem; border-bottom: 1px solid var(--bs-border-color); }
  .jc-lines tbody td { display: block; border: 0; padding: 0; }
  .jc-lines tbody td:first-child { flex: 1 1 100%; }
  .jc-lines tbody td:empty { display: none; }
  .jc-lines tfoot tr { display: flex; justify-content: space-between; padding: .2rem .75rem; }
  .jc-lines tfoot td { border: 0; padding: .2rem 0; }
  .jc-lines tfoot td:empty, .jc-lines tfoot td[colspan="2"]:last-child { display: none; }
  .jc-lines tfoot td[colspan="7"] { flex: 1 1 100%; text-align: left !important; }
}

/* Inspection checklist rows */
.check-row { display: grid; grid-template-columns: 1fr; gap: .35rem; padding: .55rem 0; border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,.08)); }
@media (min-width: 768px) { .check-row { grid-template-columns: 14rem auto 1fr; align-items: center; gap: .75rem; } }
.check-item { font-weight: 600; }

/* Owner reports: the level box on Parts to keep. */
.input-level { width: 5.5rem; }

/* Hold box (3 Nov 2026): what holds a job, since when, who acts next. Same on the board, the list and the job card. */
.hold-box { --hold: #6c757d; --hold-bg: #f6f7f8; border: 1px solid color-mix(in srgb, var(--hold) 35%, #fff); border-left: 4px solid var(--hold); background: var(--hold-bg); border-radius: 6px; padding: .45rem .6rem; margin: .35rem 0; font-size: .85rem; }
.hold-danger { --hold: #c0392b; --hold-bg: #fdf2f1; }
.hold-warning { --hold: #c77700; --hold-bg: #fff8ec; }
.hold-info { --hold: #0b7285; --hold-bg: #eef8fa; }
.hold-success { --hold: #2b8a3e; --hold-bg: #f0f9f2; }
.hold-title { font-weight: 700; color: var(--hold); display: flex; gap: .35rem; align-items: baseline; }
.hold-line { color: #333; line-height: 1.3; }
.hold-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; color: #666; font-size: .78rem; margin-top: .2rem; }
.hold-box.is-compact { font-size: .8rem; padding: .35rem .5rem; }
.hold-box.is-overdue .hold-meta::before { content: "!"; color: #fff; background: #c0392b; border-radius: 50%; width: 1.1em; height: 1.1em; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
[data-bs-theme="dark"] .hold-box { --hold-bg: color-mix(in srgb, var(--hold) 14%, #1d2125); }
[data-bs-theme="dark"] .hold-line { color: #ddd; }
[data-bs-theme="dark"] .hold-meta { color: #aaa; }
.resp-option.is-on { border-color: var(--bs-primary) !important; background: var(--bs-primary-bg-subtle); }
.resp-option { cursor: pointer; }

/* Point of sale (4 Nov 2026) */
.pos-suggest { z-index: 1050; max-height: 320px; overflow-y: auto; }
.pos-total { font-size: 2rem; font-weight: 800; }
.pos-qty-col { width: 5.5rem; } .pos-rate-col { width: 7rem; }
#pos-lines input[name="qty[]"] { min-width: 4rem; } #pos-lines input[name="rate[]"] { min-width: 5.5rem; }
.pos-pay.sticky-lg-top { top: 4.5rem; }
/* Counter on a phone: each line stacks — the item on top, quantity, price and amount below (owner request 4 Nov 2026). */
@media (max-width: 575.98px) {
  #pos-lines thead { display: none; }
  #pos-lines tr[data-pos-line] { display: grid; grid-template-columns: 5rem 1fr auto auto; gap: .35rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--bs-border-color); }
  #pos-lines tr[data-pos-line] > td { display: block; border: 0; padding: 0; width: auto; }
  #pos-lines tr[data-pos-line] > td:first-child { grid-column: 1 / -1; }
  #pos-lines input[name="qty[]"], #pos-lines input[name="rate[]"] { min-width: 0; }
}
/* Field sales (owner request 4 Nov 2026) */
.field-video, .field-preview { width: 100%; max-height: 60vh; object-fit: contain; background: #111; border-radius: .5rem; }
.field-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: .4rem; border: 1px solid var(--bs-border-color); }
.field-bar { height: .4rem; }
.field-sketch { width: 100%; height: auto; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
.field-sketch .fs-bg { fill: #f6f8fa; }
.field-sketch .fs-line { fill: none; stroke: #0d6efd; stroke-width: 2; stroke-dasharray: 5 4; }
.field-sketch .fs-ping { fill: #adb5bd; }
.field-sketch .fs-visit { fill: #0d6efd; } .field-sketch .fs-start { fill: #198754; } .field-sketch .fs-end { fill: #dc3545; }
.field-sketch .fs-num { fill: #fff; font: 700 10px sans-serif; text-anchor: middle; }
.field-target-form { min-width: 9rem; }
/* Team "Me": the month as a grid of days (owner request 8 Nov 2026). */
.att-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.att-day { font-size: .72rem; line-height: 1.2; min-height: 3.2rem; }
/* Sales pipeline board: one column per stage, scrolls sideways on a phone. */
.pipe { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.pipe-col { background: var(--bs-tertiary-bg); border-radius: .5rem; padding: .5rem; min-height: 8rem; }
.pipe-card { font-size: .82rem; }

/* Two-step sign-in set-up code (doc 50) */
.totp-qr { width: 176px; height: 176px; flex: none; }
.totp-qr svg { width: 100%; height: 100%; display: block; }

/* Control panel menu in colour-coded groups (doc 53) */
.pf-g-sales { --pf-g: #3b82f6; } .pf-g-marketing { --pf-g: #a066f0; } .pf-g-shops { --pf-g: #22a96b; } .pf-g-money { --pf-g: #e0a21c; }
.pf-g-team { --pf-g: #14a3a3; } .pf-g-safety { --pf-g: #e5534b; } .pf-g-setup { --pf-g: #8a94a3; }
.pf-g .pf-g-icon { color: var(--pf-g); }
.pf-g-menu { border-top: 3px solid var(--pf-g); }
.pf-g-menu .dropdown-item i { color: var(--pf-g); }
.pf-g-menu .dropdown-item.active, .pf-g-menu .dropdown-item:active { background: var(--pf-g); color: #fff; }
.pf-g-menu .dropdown-item.active i, .pf-g-menu .dropdown-item:active i { color: #fff; }
.pf-launch-group { border-left: 4px solid var(--pf-g); padding-left: .6rem; }
.pf-launch-group h3 { color: var(--pf-g); font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.pf-launch-group a { display: block; padding: .15rem 0; text-decoration: none; }
.pf-launch-group a i { color: var(--pf-g); width: 1.3rem; display: inline-block; }
.pf-launch-group a { color: var(--bs-body-color); }
.pf-launch-group a:hover, .pf-launch-group a:focus { color: var(--pf-g); text-decoration: underline; }
@media (min-width: 1200px) { .navbar .pf-g > .nav-link { padding-left: .45rem; padding-right: .45rem; } }
.att-thumb{width:44px;height:44px;object-fit:cover}
.pf-g-tag { border-left: 4px solid var(--pf-g); padding-left: .4rem; }
.inspect-photo{width:120px;height:90px;object-fit:cover}
