:root {
  /* Themable (overridden by Theme / Colors via localStorage) */
  --primary: #dc2626;
  --primary-dim: #4a1010;
  --accent: #ef4444;
  --accent-dim: #5c1515;
  --bg: #0a0a0a;
  --bg-elev: #141414;
  --bg-card: #1c1c1c;
  --bg-hover: #2a2a2a;
  --border: #333333;
  --text: #ffffff;
  --text-muted: #a8a8a8;
  --header-from: #111111;
  --header-to: #1a0505;
  /* Aliases so existing --blue/--orange rules map to primary/accent */
  --blue: var(--primary);
  --blue-dim: var(--primary-dim);
  --orange: var(--accent);
  --orange-dim: var(--accent-dim);
  --green: #22c55e;
  --green-dim: #14532d;
  --red: #ef4444;
  --red-dim: #7f1d1d;
  --yellow: #eab308;
  --purple: #a78bfa;
  /* t273u: theme-derived readable colours (applyTheme recomputes them for every scheme; these are the Hotsy defaults) */
  --primary-fill: #dc2626; --on-primary: #ffffff;
  --accent-fill: #dc2626; --on-accent: #ffffff;
  --on-primary-dim: #ffffff;
  --accent-ink: #f26a6a; --primary-ink: #f05252;
  --warn-ink: #fca5a5; --warm-ink: #f6b26b;
  /* names some screens used without them ever being defined (their fixed light / dark fallbacks made rows unreadable in other schemes) */
  --card: var(--bg-card); --surface: var(--bg-card); --surface-2: var(--bg-hover); --line: var(--border); --muted: var(--text-muted);
  --amber: #f59e0b; --danger: var(--red);
  --radius: 10px;
  --tap: 48px;
  --nav-h: 64px;
  --header-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
}

a { color: var(--primary); }

#app {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}

/* ===== Header ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
  padding: 0 14px;
  background: linear-gradient(180deg, var(--header-from) 0%, var(--header-to) 100%);
  border-bottom: 2px solid var(--accent);
}

.app-header .logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
/* Custom company logo: ~36px tall, keep aspect ratio */
.app-header .logo.custom-logo {
  width: auto;
  height: 36px;
  max-width: 160px;
  object-fit: contain;
}

.app-header h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.app-header .phone {
  margin-left: auto;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.15;
}
.app-header .phone .phone-lbl { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; opacity: .8; }
.app-header .phone .phone-num { color: var(--text); }

.app-header .phone:active { background: color-mix(in srgb, var(--accent) 32%, transparent); }


/* ===== Views ===== */
.view { display: none; flex: 1; flex-direction: column; min-height: 0; }
.view.active { display: flex; }

.view-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: calc(var(--header-h) + var(--topnav-h, 0px));
  z-index: 30;
}

.view-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.12s, transform 0.08s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary-fill); color: var(--on-primary); }
.btn-primary:active { filter: brightness(0.88); }
.btn-accent { background: var(--accent-fill); color: var(--on-accent); }
.btn-accent:active { filter: brightness(0.88); }
.btn-ghost {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:active { background: var(--bg-hover); }
.btn-danger { background: var(--red-dim); color: #fecaca; border: 1px solid var(--red); }
.btn-success { background: var(--green-dim); color: #bbf7d0; border: 1px solid var(--green); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn-icon {
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 1.2rem;
}

/* ===== Forms ===== */
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary);
}
.search-wrap { flex: 1; min-width: 140px; position: relative; }
.search-wrap input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  min-height: 36px;
}
.chip.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--on-primary-dim);
}
.chip.orange.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.card:active { background: var(--bg-hover); }
.card-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.card-meta { font-size: 0.82rem; color: var(--text-muted); }
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-new { background: var(--primary-dim); color: var(--on-primary-dim); }
.badge-diagnosing { background: #3b2f1a; color: #fcd34d; }
.badge-waiting { background: var(--accent-dim); color: var(--accent-ink); }
.badge-scheduled { background: #2a1515; color: #fff; }
.badge-progress { background: #3a1a1a; color: #fca5a5; }
.badge-ready { background: var(--green-dim); color: #86efac; }
.badge-invoiced { background: #2a2a2a; color: #e5e5e5; }
/* v1.18.48: invoice issued on an still-open RO — amber tint + contrast-checked ink (all themes) */
.badge-invoice-pending {
  background: var(--amber-tint, #fef3c7);
  color: var(--amber-ink, #7a4b00);
  box-shadow: inset 0 0 0 1px var(--amber-line, #d97706);
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: normal;
  font-weight: 700;
  line-height: 1.25;
}
.cal-item .badge-invoice-pending,
.ticket-card .badge-invoice-pending,
.li-sub .badge-invoice-pending {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.66rem;
}
.cal-item .badge-invoice-pending { display: block; }

.badge-paid { background: var(--green-dim); color: #86efac; }
.badge-unpaid { background: var(--red-dim); color: #fca5a5; }
.badge-estimate { background: #3b2f1a; color: #fcd34d; }
.badge-low { background: var(--red-dim); color: #fca5a5; }

/* ===== Kanban Board ===== */
.board-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  align-items: flex-start;
}

.board-col {
  flex: 0 0 280px;
  max-height: calc(100vh - var(--header-h) - var(--nav-h) - 90px);
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  scroll-snap-align: start;
}

.board-col-head {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.board-col-head .count {
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text);
}

.board-col-body {
  overflow-y: auto;
  padding: 8px;
  flex: 1;
}

.ticket-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  border-left: 3px solid var(--primary);
}
.ticket-card.field { border-left-color: var(--accent); }
.ticket-card:active { background: var(--bg-hover); }
.ticket-card .tc-num { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
.ticket-card .tc-title { font-weight: 700; font-size: 0.9rem; margin: 2px 0 4px; }
.ticket-card .tc-asset { font-size: 0.78rem; color: var(--text-muted); }
.ticket-card .tc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.75rem;
}
.ticket-card .tech-pill {
  background: var(--primary-dim);
  color: var(--on-primary-dim);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* ===== Modal / Detail ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-elev);
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-bottom: none;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-head h2 { flex: 1; font-size: 1.1rem; }
.modal-body {
  overflow-y: auto;
  padding: 16px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-b));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-elev);
}

@media (min-width: 700px) {
  .modal-overlay { align-items: center; padding: 24px; }
  .modal { border-radius: 16px; border-bottom: 1px solid var(--border); max-height: 85vh; }
  .modal-foot { padding-bottom: 12px; }
}

/* v1.18.59: phone modals (New RO, Drop-off Contact, Convert estimate → RO, and every other #modal)
   stay inside a 390px viewport — full width with padding, no horizontal overflow. */
.modal-overlay, .modal, .modal-head, .modal-body, .modal-foot {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.modal input, .modal select, .modal textarea,
.modal .field, .modal .field input, .modal .field select, .modal .field textarea,
.modal .grid-2, .modal .dropoff-phone-wrap, .modal .dropoff-phone-row,
.modal .sms-consent-box, .modal .dropoff-optin-legal, .modal .sms-consent-text,
.modal .dropoff-optin-badge, .modal .dropoff-optin-src {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.modal .dropoff-optin-legal, .modal .sms-consent-text, .modal .dropoff-optin-badge {
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
}
@media (max-width: 699px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  #app { max-width: 100%; overflow-x: hidden; }
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
    justify-content: flex-start;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
  }
  .modal {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
  }
  .modal-head, .modal-body, .modal-foot { width: 100%; max-width: 100%; }
  .modal-body { overflow-x: hidden; overflow-y: auto; }
  .modal .grid-2 { grid-template-columns: 1fr; }
  .modal-foot .btn, .modal-foot .btn-lg { max-width: 100%; }
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.section-label:first-child { margin-top: 0; }

.line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.line-item .li-remove {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 36px;
  padding: 0 8px;
}
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 12px 0 4px;
  color: var(--accent);
}

/* ===== Owner Pulse ===== */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.pulse-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.pulse-stat .val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.pulse-stat .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
}
.pulse-stat.warn .val { color: var(--amber-ink); }
.pulse-stat.good .val { color: var(--green-ink); }
.pulse-stat.bad .val { color: var(--warn-ink); }

@media (min-width: 600px) {
  .pulse-grid { grid-template-columns: repeat(4, 1fr); }
}
/* Owner dashboard: A/R Aging spans the grid directly under the first KPI row (4 per row on desktop, 2 on phones) */
.pulse-owner > .pulse-ar { grid-column: 1 / -1; order: 1; }
.pulse-owner > .pulse-ar .ar-tiles { margin-bottom: 0; }
.pulse-owner > .pulse-ar .section-label { margin-top: 4px; }
.pulse-owner > .pulse-stat:nth-child(n+6) { order: 2; }
@media (max-width: 599px) { .pulse-owner > .pulse-stat:nth-child(3), .pulse-owner > .pulse-stat:nth-child(4) { order: 2; } }

/* ===== Lists ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  min-height: var(--tap);
}
.list-item:active { background: var(--bg-hover); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 700; }
.list-item .li-sub { font-size: 0.8rem; color: var(--text-muted); }
.list-item .li-right { text-align: right; flex-shrink: 0; }
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* ===== Field tech ===== */
.tech-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tech-btn {
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  font-weight: 700;
}
.tech-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  border-left: 4px solid var(--accent);
}
.job-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.job-card .addr { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* Checklist → RO Details → Needs Parts always share one row */
.job-actions-top { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.job-actions-top .btn { min-height: 48px; font-weight: 700; padding-left: 6px; padding-right: 6px; white-space: normal; line-height: 1.15; }

/* ===== Inventory qty ===== */
.qty-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qty-edit button {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.1rem;
}
.qty-edit span {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.site-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
.site-block h4 { font-size: 0.9rem; margin-bottom: 6px; color: var(--primary); }
.asset-row {
  font-size: 0.85rem;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.asset-row strong { color: var(--text); }

.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--green-dim);
  border: 1px solid var(--green);
  color: #bbf7d0;
  padding: 12px 12px 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  max-width: min(520px, 92vw);
  text-align: left;
}
.toast.show { opacity: 1; pointer-events: auto; }
.toast.toast-ok { background: var(--green-dim); border-color: var(--green); color: #bbf7d0; }
.toast.toast-warn {
  background: var(--amber-tint, rgba(245, 158, 11, 0.18));
  border-color: var(--amber-line, var(--amber));
  color: var(--amber-ink, #fde68a);
}
.toast.toast-err { background: var(--red-dim); border-color: var(--red); color: #fecaca; }
.toast-text { flex: 1; min-width: 0; }
.toast-close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin: -8px -4px -8px 0;
  border-radius: 8px;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  opacity: 0.85;
}
.toast-close:hover, .toast-close:focus-visible {
  opacity: 1;
  background: rgba(255,255,255,0.12);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/* ===== Photos + Signatures (v1.4) ===== */
.field-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.photo-cell { position: relative; }
.photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg) center/cover no-repeat;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}
.photo-thumb.loaded { border-color: var(--primary); }
.photo-rm {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 2;
}
.photo-cap {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-lightbox {
  text-align: center;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.photo-lightbox img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  margin: 0 auto;
}

.sig-wrap {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  touch-action: none;
}
.sig-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}
.sig-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 520px) {
  .sig-row { grid-template-columns: 1fr; }
}
.sig-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
.sig-card.empty { border-style: dashed; }
.sig-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.sig-img {
  width: 100%;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #ddd;
  margin-bottom: 6px;
}

.field-big {
  min-height: 48px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  flex: 1 1 140px;
}

.print-ro .pr-sig-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.print-ro .pr-sig img {
  max-width: 100%;
  height: 70px;
  object-fit: contain;
  border: 1px solid #ccc;
  background: #fff;
  display: block;
  margin: 6px 0;
}
.print-ro .pr-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.print-ro .pr-photo-cell .pr-thumb {
  aspect-ratio: 1;
  border: 1px solid #ccc;
}
.print-ro .pr-photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media print {
  .print-ro .pr-sig img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


.desktop-hint { display: none; }
@media (min-width: 900px) {
  .board-col { flex: 0 0 260px; }
  .desktop-hint { display: inline; }
}

/* ===== Repair Order polish (v1.1) ===== */
.part-sku {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-ink);
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { display: block; }
.line-item .li-sku-row { margin-top: 2px; }

.field-tap input,
.field-tap select,
.field-tap textarea {
  min-height: var(--tap);
  font-size: 1.05rem;
  padding: 12px 14px;
}
.field-tap label { font-size: 0.85rem; margin-bottom: 6px; }

.btn-lg {
  min-height: 52px;
  padding: 0 18px;
  font-size: 1.05rem;
  font-weight: 700;
  width: 100%;
}
.btn-lg + .btn-lg { margin-top: 8px; }

.verify-banner {
  background: var(--primary-dim);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.verify-banner strong { color: var(--accent); }

.dropoff-banner {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}
.dropoff-banner .do-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.dropoff-banner .do-val { font-weight: 700; margin-top: 2px; }

.dup-warn {
  background: var(--red-dim);
  border: 1px solid var(--red);
  color: #fecaca;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  display: none;
}
.dup-warn.show { display: block; }

.print-ro {
  background: #fff;
  color: #111;
  border-radius: 8px;
  padding: 18px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.print-ro h3 { font-size: 1.15rem; margin-bottom: 4px; color: #111; }
.print-ro .pr-meta { color: #555; font-size: 0.85rem; margin-bottom: 12px; }
.print-ro .pr-section { margin-top: 14px; border-top: 1px solid #ddd; padding-top: 10px; }
.print-ro .pr-section h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #666; margin-bottom: 6px; }
.print-ro .pr-line { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dotted #e5e5e5; }
.print-ro .pr-sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: #b91c1c; margin-right: 6px; }
.print-ro .pr-total { font-weight: 800; font-size: 1.1rem; margin-top: 10px; text-align: right; }

@media print {
  body * { visibility: hidden !important; }
  .modal-overlay, .modal-overlay * { visibility: visible !important; }
  .modal-overlay {
    position: static !important;
    background: #fff !important;
    display: block !important;
  }
  .modal {
    max-width: none !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
  }
  .modal-head, .modal-foot, .btn-icon, .bottom-nav, .app-header { display: none !important; }
  body:has(#modal-overlay:not(.hidden)) > #app { display: none !important; }
  .toast, #update-bar, #nav-more-sheet { display: none !important; }
  .modal { border-radius: 0 !important; } /* no blank pages from the hidden app behind a print modal */
  .modal-body { padding: 0 !important; overflow: visible !important; }
  .print-ro { color: #000; }
}

/* ===== Theme / Colors picker (Owner) ===== */
.theme-panel { margin-bottom: 12px; }
.theme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.theme-preset {
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--bg);
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-preset.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.theme-swatches {
  display: inline-flex;
  gap: 3px;
}
.theme-swatches span {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.25);
}
.theme-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .theme-colors { grid-template-columns: 1fr; }
}
.theme-color-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.theme-color-field label {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.theme-color-field input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.theme-color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.theme-color-field input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}


/* ===== v1.5 — Nav (9 sections), Board DnD, lists, customer types, POs, logo ===== */

/* Board drag & drop */
.ticket-card {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.ticket-card.drag-pending { transform: scale(0.98); transition: transform 0.25s ease; }
.ticket-card.drag-source { opacity: 0.35; border-style: dashed; }
.drag-ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  margin: 0;
  opacity: 0.95;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  outline: 2px solid var(--primary);
  will-change: transform;
}
.board-col.drop-target {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary) inset;
  background: color-mix(in srgb, var(--primary) 10%, var(--bg-elev));
}
body.board-dragging, body.board-dragging * { cursor: grabbing !important; }
body.board-dragging { touch-action: none; overscroll-behavior: none; }
@media (hover: hover) { .ticket-card { cursor: grab; } }
.board-col-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 4px 12px 0;
}
.link-btn {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 700;
  font-size: inherit;
  padding: 0;
  background: none;
}

/* Lists */
.list-count { margin-bottom: 10px; }
.list-item .li-sub .badge { margin-right: 2px; }
.badge-archived { background: #262626; color: #a3a3a3; border: 1px dashed #525252; }

/* Field: All */
.tech-btn-all { font-weight: 800; }
.job-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.job-badges .tech-pill {
  background: var(--primary-dim);
  color: var(--on-primary-dim);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Customer types */
.badge-cust-hotsy { background: #dc2626; color: #fff; }
.badge-cust-sewer { background: #1f2937; color: #fde68a; border: 1px solid #f59e0b; }
.li-title .badge { vertical-align: middle; margin-left: 4px; }
.card-title .badge { vertical-align: middle; }
.cust-type-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.cust-type-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.92rem !important;
  color: var(--text) !important;
  cursor: pointer;
  margin: 0 !important;
}
.cust-type-toggle input { width: 20px !important; height: 20px; min-height: 0 !important; accent-color: var(--primary); }
.cust-type-toggle:has(input:checked) { border-color: var(--primary); background: var(--primary-dim); }

/* Purchase Orders */
.po-line {
  display: grid;
  grid-template-columns: 2fr 1fr 70px 90px 36px;
  gap: 6px;
  align-items: end;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.po-line .field { margin-bottom: 0; }
.po-line .po-rm { height: 40px; align-self: end; }
@media (max-width: 600px) {
  .po-line { grid-template-columns: 1fr 1fr; }
  .po-line .po-item { grid-column: 1 / -1; }
  .po-line .po-rm { grid-column: 2; justify-self: end; }
}

/* Company logo (Owner + print) */
.logo-preview-row { display: flex; flex-wrap: wrap; gap: 10px; }
.logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 72px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.logo-preview-dark { background: linear-gradient(180deg, var(--header-from), var(--header-to)); }
.logo-preview-dark img { height: 36px; width: auto; max-width: 160px; object-fit: contain; }
.logo-preview-light {
  background-color: #fff;
  background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.logo-preview-light img { height: 60px; width: auto; max-width: 240px; object-fit: contain; }
.logo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-actions .btn[disabled] { pointer-events: none; }
.print-ro .pr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.print-ro .pr-logo { height: 60px; width: auto; max-width: 240px; object-fit: contain; flex-shrink: 0; }
.print-ro .pr-head-text { min-width: 0; }
.print-ro .pr-head .pr-meta { margin-bottom: 0; }
@media print {
  .print-ro .pr-logo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Taller drop targets: empty columns stretch so there is room to drop */
.board-scroll { align-items: stretch; }
.board-col-body { min-height: 140px; }

/* ===== v1.6 — Purchase Orders, Vendors, Parts Orders, locations, chemical true cost ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
.warn-text { color: var(--warn-ink); font-weight: 700; }
.badge-raw { background: #1f2937; color: #cbd5e1; border: 1px solid #475569; }
.badge-mixed { background: #3b0a0a; color: #fecaca; border: 1px solid var(--primary); }

/* PO view toolbar + tabs */
.pos-toolbar { flex-direction: column; align-items: stretch; }
.seg-tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 4px; overflow-x: auto; }
.seg-tab {
  flex: 1 0 auto; min-height: 44px; padding: 0 16px; border-radius: 8px; font-weight: 700; font-size: 0.9rem;
  color: var(--text-muted); white-space: nowrap;
}
.seg-tab.active { background: var(--primary-fill); color: var(--on-primary); }
.seg-count { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #fff; color: #111; font-size: 0.72rem; margin-left: 4px; }
.tb-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tb-select {
  min-height: 40px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  max-width: 220px;
}

/* Tables (stack into cards on phones) */
.table-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px 10px; }
.table-meta { text-align: right; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; color: var(--text-muted); padding: 6px 4px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ps-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.ps-table th {
  text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
  padding: 8px 8px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.ps-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ps-table tbody tr[data-po], .ps-table tbody tr[data-v], .ps-table tbody tr[data-pr] { cursor: pointer; }
.ps-table tbody tr[data-po]:hover, .ps-table tbody tr[data-v]:hover, .ps-table tbody tr[data-pr]:hover { background: var(--bg-hover); }
.ps-table .num { text-align: right; }
.ps-table .tracking { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.78rem; word-break: break-all; }
.ps-table.compact td { padding: 7px 8px; }
.po-num { font-weight: 800; white-space: nowrap; }
.row-actions { white-space: nowrap; text-align: right; }
.icon-btn {
  min-width: 40px; min-height: 40px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 1rem; margin-left: 4px;
}
.icon-btn.danger { background: var(--red-dim); border-color: var(--red); color: #fecaca; }
.totals-tr td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 760px) {
  .ps-table thead { display: none; }
  .ps-table, .ps-table tbody, .ps-table tr, .ps-table td { display: block; width: 100%; }
  .ps-table tr { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 6px 8px; background: var(--bg); }
  .ps-table td { border: none; padding: 5px 4px; display: flex; justify-content: space-between; gap: 10px; text-align: right; }
  .ps-table td[data-label]::before { content: attr(data-label); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); text-align: left; }
  .ps-table td.num { text-align: right; }
  .ps-table .row-actions { justify-content: flex-end; }
  .lines-table td input { max-width: 140px; }
  .tb-select { max-width: none; flex: 1 1 45%; }
}

/* Detail pages */
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.detail-head h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.po-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .po-detail-grid { grid-template-columns: 1fr; } }
.po-side .card { margin-bottom: 12px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
  margin: -12px -14px 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-elev);
  border-radius: var(--radius) var(--radius) 0 0;
}
.head-actions { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.head-actions select { min-height: 36px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; max-width: 220px; }
.df-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; padding: 4px 0; }
.df-row label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-align: right; }
.df-row input, .df-row select, .df-row textarea {
  width: 100%; min-height: 40px; padding: 7px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
}
.df-row textarea { min-height: 54px; resize: vertical; }
@media (max-width: 480px) { .df-row { grid-template-columns: 1fr; gap: 2px; } .df-row label { text-align: left; } }
.big-total { font-size: 1.2rem; }
.vendor-mini { line-height: 1.7; font-size: 0.9rem; }
.lines-table input {
  width: 100%; min-width: 70px; min-height: 38px; padding: 6px 8px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text);
}
.lines-table .item-cell { min-width: 180px; }
.li-item-name { font-weight: 700; }
.landed { font-size: 0.72rem; margin-top: 2px; white-space: nowrap; }
.line-actions .btn { margin-left: 4px; }
.add-line-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.add-line-row select { flex: 1 1 260px; min-height: var(--tap); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 0 10px; }
.add-line-row input { width: 90px; min-height: var(--tap); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 0 10px; }
.checkin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.checkin-row input { width: 100px; min-height: var(--tap); font-size: 1.05rem; text-align: center; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.csv-text { width: 100%; min-height: 240px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.78rem; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px; }

/* Vendors */
.vendor-stats { display: grid; grid-template-columns: 1fr 1fr; text-align: center; padding: 20px 10px; }
.vendor-stats > div + div { border-left: 1px solid var(--border); }
.vs-lbl { color: var(--text-muted); font-weight: 600; }
.vs-val { font-size: 2.2rem; font-weight: 800; margin-top: 6px; }
@media (max-width: 600px) { .vs-val { font-size: 1.4rem; } }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 0.9rem; }
.kv span:first-child { font-weight: 700; }
@media (max-width: 600px) { .kv-grid { grid-template-columns: 1fr; } }

/* Board / RO / Field: parts on-order (amber) and parts-in (green) notices */
.ro-parts-notices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.ro-page .ro-parts-notices, .job-card .ro-parts-notices, .list-item .ro-parts-notices { margin: 8px 0; }
.ro-parts-notices .tc-parts-badge { margin-top: 0; }
.tc-parts-badge {
  margin-top: 6px; font-size: 0.72rem; font-weight: 800; color: #111; background: var(--amber, #fbbf24);
  border-radius: 6px; padding: 2px 8px; display: inline-flex; align-items: center; gap: 4px;
}
.tc-parts-badge.tc-parts-onorder { background: var(--amber, #fbbf24); color: #111; }
.tc-parts-badge.tc-parts-onorder .i { width: 12px; height: 12px; flex: 0 0 auto; }
.ro-pr { cursor: pointer; }

/* Inventory locations */
.loc-breakdown { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.loc-chip { font-size: 0.72rem; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.loc-chip.zero { color: var(--text-muted); border-style: dashed; } /* t273u: was opacity .45 — unreadable on light themes */
.loc-chip.loc-serviceTruck { border-color: var(--accent); }
.loc-chip.loc-boxTruck { border-color: #f59e0b; }
.loc-total { font-size: 0.75rem; margin-left: 6px; }
#inv-loc-filters .chip.active { background: #fff; color: #111; border-color: #fff; }

/* Chemical true cost */
.recipe-summary .rs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.recipe-summary .rs-grid > div { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.recipe-summary .rs-grid span { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 700; }
.recipe-summary .rs-grid strong { font-size: 1.05rem; }
.recipe-summary .rs-hl { border-color: var(--primary) !important; background: var(--primary-dim) !important; }
@media (max-width: 600px) { .recipe-summary .rs-grid { grid-template-columns: 1fr 1fr; } }
.rc-row { display: grid; grid-template-columns: 1fr 100px 80px 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.rc-row select, .rc-row input { min-height: var(--tap); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 0 8px; width: 100%; }
@media (max-width: 480px) { .rc-row { grid-template-columns: 1fr 80px 40px; } .rc-row .rc-unit { display: none; } }
.line-item.short { background: color-mix(in srgb, var(--red) 12%, transparent); }
.owner-chem { cursor: pointer; }

/* Print: PO + labels */
.print-ro .pr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.print-ro .pr-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 14px; }
.print-ro .pr-kv span { display: block; font-size: 0.7rem; color: #666; text-transform: uppercase; }
.print-ro .pr-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.print-ro .pr-table th, .print-ro .pr-table td { border-bottom: 1px solid #ddd; padding: 5px 4px; text-align: left; }
.print-ro .pr-table .num { text-align: right; }
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.stock-label { border: 1px dashed #999; border-radius: 6px; padding: 8px 10px; color: #111; background: #fff; break-inside: avoid; page-break-inside: avoid; }
.stock-label .sl-sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 1.1rem; color: #b91c1c; }
.stock-label .sl-name { font-weight: 700; font-size: 0.85rem; line-height: 1.2; margin: 2px 0; }
.stock-label .sl-meta { font-size: 0.72rem; color: #444; }
@media print {
  .no-print { display: none !important; }
  .label-sheet { grid-template-columns: repeat(3, 1fr); }
}

/* v1.6 mobile overflow guards */
.pos-toolbar > *, .tb-row > *, .add-line-row > * { min-width: 0; max-width: 100%; }
.tb-select { min-width: 0; }
@media (max-width: 760px) {
  .seg-tab { padding: 0 10px; flex: 1 1 auto; }
  .add-line-row select { flex: 1 1 100%; }
  #view-pos, #po-list { min-width: 0; max-width: 100%; }
}

/* ===== v1.7: sync pill, user chip, single-device banner, sign-in screen, users ===== */
.hidden { display: none !important; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-header .header-right .phone { margin-left: 0; }
.sync-pill {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
  min-height: 40px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font: inherit; cursor: pointer; line-height: 1.1; white-space: nowrap;
}
.sync-pill .sp-main { font-weight: 700; font-size: 0.82rem; }
.sync-pill .sp-time { font-size: 0.68rem; color: var(--text-muted); }
.sync-pill.sp-ok { border-color: #16a34a; }
.sync-pill.sp-ok .sp-main { color: #22c55e; }
.sync-pill.sp-busy .sp-main { color: #facc15; }
.sync-pill.sp-off { border-color: #a3a3a3; }
.sync-pill.sp-off .sp-main { color: #d4d4d4; }
.sync-pill.sp-err { border-color: var(--primary); background: var(--primary-dim); }
.sync-pill.sp-err .sp-main { color: #fff; }
.user-chip {
  display: inline-flex; flex-direction: column; align-items: flex-end; min-height: 40px; justify-content: center;
  padding: 4px 10px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; cursor: pointer; line-height: 1.1;
}
.user-chip .uc-name { font-weight: 700; font-size: 0.82rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .uc-role { font-size: 0.66rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 640px) {
  .app-header .header-right .phone { display: none; }
  .sync-pill .sp-time { display: none; }
  .user-chip .uc-role { display: none; }
  .app-header h1 { font-size: 0.95rem; }
}
@media (max-width: 400px) { .user-chip { display: none; } }
/* ux3 global search (header): always-visible box on desktop, magnifier → full-width bar on phones */
.gs { position: relative; flex: 1 1 340px; max-width: 560px; min-width: 0; margin: 0 4px 0 auto; display: flex; align-items: center; }
.gs + .header-right { margin-left: 8px; }
.gs-open { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; }
.gs-open .i { width: 20px; height: 20px; }
.gs-box { position: relative; display: flex; align-items: center; width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); transition: border-color .12s, box-shadow .12s; }
.gs.gs-on .gs-box, .gs-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.gs-ico { width: 17px; height: 17px; margin: 0 0 0 10px; color: var(--text-muted); flex-shrink: 0; }
#gs-q { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: .92rem; padding: 0 8px; }
#gs-q::-webkit-search-cancel-button { display: none; }
.gs-kbd { font: 600 .72rem var(--font); color: var(--text-muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; margin-right: 8px; }
.gs.gs-on .gs-kbd { display: none; }
.gs-close { display: none; border: 0; background: transparent; color: var(--text-muted); font-size: 1rem; min-width: 40px; height: 100%; cursor: pointer; }
.gs.gs-on .gs-close { display: block; }
.gs-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 420px; max-height: min(72vh, 680px); overflow-y: auto; overscroll-behavior: contain; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 48px rgba(0,0,0,.55); padding: 6px 0 0; }
.gs-hint { padding: 14px 16px; color: var(--text); font-size: .9rem; line-height: 1.5; }
.gs-hint kbd { font: 600 .72rem var(--font); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }
.gs-grp + .gs-grp { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.gs-gh { display: flex; align-items: center; gap: 8px; padding: 6px 14px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.gs-gh .i { width: 15px; height: 15px; }
.gs-n { margin-left: auto; background: var(--bg-hover); color: var(--text); border-radius: 999px; padding: 1px 8px; font-size: .7rem; letter-spacing: 0; }
.gs-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 14px; border: 0; border-left: 3px solid transparent; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.gs-row:hover { background: var(--bg-hover); }
.gs-row.act { background: color-mix(in srgb, var(--accent) 16%, var(--bg-card)); border-left-color: var(--accent); }
.gs-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gs-t { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-s { font-size: .76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-row mark { background: color-mix(in srgb, var(--yellow) 40%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.gs-r { display: flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: .78rem; flex-wrap: wrap; justify-content: flex-end; max-width: 52%; }
.gs-r .badge { font-size: .66rem; }
.gs-qty { font-weight: 700; color: var(--green); white-space: nowrap; }
.gs-qty.gs-zero { color: var(--text-muted); }
.gs-amt { font-weight: 700; white-space: nowrap; }
.gs-cost { color: var(--text-muted); white-space: nowrap; }
.gs-more { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 2px 14px 6px 17px; }
.gs-see { border: 0; background: transparent; color: var(--accent); font: 600 .8rem var(--font); padding: 6px 0; min-height: 32px; cursor: pointer; }
.gs-see:hover { text-decoration: underline; }
.gs-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; padding: 7px 14px; font-size: .72rem; color: var(--text-muted); background: var(--bg-elev); border-top: 1px solid var(--border); margin-top: 6px; }
@media (max-width: 1180px) { .gs-kbd { display: none; } }
@media (max-width: 759px) {
  .gs { flex: 0 0 auto; margin: 0 0 0 auto; max-width: none; position: static; }
  .gs-open { display: inline-flex; }
  .gs-box { display: none; }
  .gs.gs-on .gs-box { display: flex; position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 70; border-radius: 0; border: 0; border-bottom: 2px solid var(--accent); box-shadow: none; background: var(--bg-elev); padding: 0 4px; }
  .gs.gs-on #gs-q { font-size: 16px; } /* no iOS zoom */
  .gs-panel { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); min-width: 0; max-height: none; border-radius: 0; border: 0; z-index: 70; box-shadow: none; padding-bottom: 8px; }
  .gs-row { min-height: 56px; }
  .gs-r { max-width: 46%; }
  .gs-foot { position: static; }
}
@media (max-width: 759px) { .gs + .header-right { margin-left: 0; } }
@media (max-width: 440px) { .app-header { gap: 6px; } }
@media (max-width: 379px) { .app-header h1.brand-word { display: none; } } /* room for the search magnifier on the narrowest phones (the PS drop mark stays) */
/* ux3: with the Back button showing, the Owner's phone header (badge + sync + user + log out) was 31px too wide at 390 and 3px at 360 */
@media (max-width: 439px) { .app-header:has(.hdr-back:not(.nav-back-off)) h1.brand-word { display: none; } }
@media (max-width: 379px) { .app-header:has(.hdr-back:not(.nav-back-off)) .brand-mark { display: none; } }
.sd-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; background: color-mix(in srgb, var(--primary) 16%, var(--bg)); border-bottom: 1px solid var(--primary);
  font-weight: 600; font-size: 0.9rem;
}
#app.locked { filter: blur(3px); pointer-events: none; user-select: none; }
.login-screen {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--primary) 30%, #000) 0%, #000 70%); overflow-y: auto;
}
.login-card {
  width: 100%; max-width: 420px; background: var(--bg-elev); border: 1px solid var(--border); border-top: 4px solid var(--primary);
  border-radius: 16px; padding: 24px 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.login-logo { height: 44px; width: auto; max-width: 120px; object-fit: contain; }
.login-app { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.02em; }
.login-sub { font-size: 0.82rem; color: var(--text-muted); }
.login-title { font-size: 1.15rem; margin: 6px 0 14px; }
.login-msg { background: var(--primary-dim); border: 1px solid var(--primary); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 0.9rem; }
.login-field { display: block; margin-bottom: 12px; }
.login-field span { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
.login-field input {
  width: 100%; min-height: 54px; font-size: 1.1rem; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.login-field input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.login-remember { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 1rem; cursor: pointer; }
.login-remember input { width: 24px; height: 24px; accent-color: var(--primary); }
.login-err { color: var(--warn-ink); font-weight: 600; min-height: 1.3em; margin: 4px 0 8px; }
.login-btn { width: 100%; min-height: 58px; font-size: 1.1rem; }
.login-alt { width: 100%; margin-top: 10px; min-height: 48px; }
.sync-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.sync-actions .btn { min-height: 48px; }
.users-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.users-table tr.row-disabled td { opacity: 0.55; }
.role-badge { text-transform: none; }
.role-badge.role-owner { background: var(--primary-fill); color: var(--on-primary); }
.role-badge.role-manager { background: #7c2d12; color: #fff; }
.role-badge.role-counter { background: #1e3a8a; color: #fff; }
.role-badge.role-tech { background: #14532d; color: #fff; }
.role-badge.role-svcmgr { background: #6b21a8; color: #fff; }
.role-badge.role-sales { background: #0f766e; color: #fff; }
.role-badge.role-inventory { background: #854d0e; color: #fff; }
.role-badge.role-accounting { background: #155e75; color: #fff; }
.role-badge.role-fieldtech { background: #166534; color: #fff; }
.role-help { display: grid; gap: 4px; margin: 4px 0 12px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; }
.ro-history { margin-top: 14px; }
.ro-history summary { cursor: pointer; list-style: revert; }
.hist-row { display: grid; grid-template-columns: 130px 120px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.86rem; }
.hist-when { color: var(--text-muted); }
.hist-who { font-weight: 700; }
@media (max-width: 560px) { .hist-row { grid-template-columns: 1fr; gap: 2px; } }
.ro-readonly { border-color: #a3a3a3 !important; }
/* Role permissions switch these off (the server enforces too) */
body.no-adjust .qty-edit button { display: none; }
body.no-cust-edit #cu-save, body.no-cust-edit #cu-add-site, body.no-cust-edit #cu-add-asset, body.no-cust-edit #cu-add-photo, body.no-ro-create #cu-ticket { display: none !important; }
/* Role permissions grid */
.rp-roles { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.rp-roles .chip { min-height: 44px; padding: 8px 14px; }
.rp-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.rp-grid { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rp-grid th, .rp-grid td { border-bottom: 1px solid var(--border); padding: 4px 8px; }
.rp-grid thead th { position: sticky; top: 0; background: var(--bg-elev); z-index: 1; font-size: 0.8rem; vertical-align: bottom; }
.rp-grid .rp-perm { text-align: left; font-weight: 500; min-width: 220px; }
.rp-grid .rp-col { text-align: center; min-width: 78px; }
.rp-grid .rp-group th { text-align: left; background: var(--bg); color: var(--primary); font-weight: 700; padding-top: 10px; }
.rp-cell { text-align: center; }
.rp-box { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.rp-box input { width: 22px; height: 22px; cursor: pointer; }
.ls-periods, .ls-by { margin-bottom: 8px; }
.ls-periods .chip, .ls-by .chip { min-height: 44px; }
.ls-tiles { margin: 6px 0 10px; }
.ls-crumbs { margin: 6px 0; font-size: 0.95rem; }
.ls-row { cursor: pointer; }
.ls-row td { padding-top: 12px; padding-bottom: 12px; }
.ls-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-reset { display: block; margin: 2px auto 0; font-size: 0.75rem; }
.sd-actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sd-close { width: 40px; height: 40px; }
@media (max-width: 640px) {
  .sd-banner { flex-wrap: nowrap; padding: 6px 10px; font-size: 0.8rem; }
  .sd-banner .btn-sm { padding: 6px 10px; min-height: 40px; }
}

/* ===== v1.8 Invoicing ===== */
.badge-overdue { background: #dc2626; color: #fff; }
.badge-follow { background: #78350f; color: #fde68a; }
.badge-exempt { background: #1e3a5f; color: #bfdbfe; }
.badge-top10 { background: linear-gradient(135deg, #fde68a, #d4a017); color: #3b2a00; font-weight: 800; letter-spacing: .03em; }
.chip-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--primary-fill); color: var(--on-primary); font-size: 0.75rem; line-height: 20px; text-align: center; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 600; cursor: pointer; }
.check-row input[type=checkbox], .big-check input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--primary); }
.doc-head { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.doc-cust { margin-bottom: 10px; }
.doc-meta { margin-bottom: 4px; }
.doc-line { border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 8px; background: var(--bg-elev); }
.doc-line .dl-main { display: flex; gap: 6px; margin-bottom: 6px; }
.doc-line input, .doc-line select, .disc-pair input, .disc-pair select { min-height: 44px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 0 8px; font-size: 0.95rem; }
.doc-line input:disabled, .doc-line select:disabled { opacity: 0.75; }
.doc-line .dl-sku { width: 120px; flex: 0 0 120px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--warn-ink); }
.doc-line .dl-desc { flex: 1 1 auto; min-width: 0; }
.doc-line .dl-nums { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.doc-line .dl-nums label { display: flex; flex-direction: column; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; gap: 2px; }
.doc-line .dl-nums label > input { width: 92px; }
.disc-pair { display: inline-flex; gap: 4px; }
.disc-pair input { width: 80px; }
.disc-pair select { width: 56px; padding: 0 4px; }
.doc-line .dl-tax { flex-direction: row !important; align-items: center; gap: 6px !important; min-height: 44px; font-size: 0.85rem !important; color: var(--text) !important; }
.doc-line .dl-tax input { width: 22px !important; height: 22px; min-height: 0; accent-color: var(--primary); }
.doc-line .dl-amt { margin-left: auto; font-weight: 800; font-size: 1.05rem; text-align: right; min-width: 96px; align-self: center; }
.doc-line .dl-amt small { display: block; font-size: 0.72rem; color: var(--warn-ink); font-weight: 600; }
.doc-line .li-remove { align-self: center; }
.doc-add-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.doc-sum-grid { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.3fr); gap: 14px; align-items: start; margin-top: 6px; }
@media (max-width: 640px) { .doc-sum-grid { grid-template-columns: 1fr; } .doc-line .dl-sku { width: 92px; flex-basis: 92px; } .doc-line .dl-nums label > input { width: 76px; } }
.doc-totals { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.doc-totals .dt-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 0.92rem; }
.doc-totals .dt-row small { color: var(--text-muted); }
.doc-totals .dt-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; font-size: 1.15rem; font-weight: 800; }
.doc-totals .dt-balance { font-size: 1.2rem; font-weight: 800; color: var(--warn-ink); }
.doc-totals .dt-balance.paid { color: var(--green); }
.ro-totals { margin-top: 12px; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-methods .chip { min-height: var(--tap); padding: 0 18px; font-size: 1rem; }
.pay-row .card-meta { margin-top: 2px; }
.follow-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.doc-row .li-main { min-width: 0; }
.tpl-block { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: var(--bg-elev); }
.tpl-block summary { cursor: pointer; font-weight: 700; min-height: 36px; display: flex; align-items: center; }
.billing-panel code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-size: 0.78rem; margin-right: 2px; display: inline-block; margin-bottom: 3px; }
.pulse-link { cursor: pointer; }
.pulse-link:hover { border-color: var(--primary); }
/* A/R aging */
.ar-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ar-title { font-size: 1.25rem; margin-bottom: 2px; }
.ar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-tiles { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.ar-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
.ar-table th, .ar-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.ar-table thead th { background: var(--bg-elev); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.ar-table tfoot th { background: var(--bg-elev); font-size: 0.95rem; }
.ar-table .num { text-align: right; white-space: nowrap; }
.ar-table .ar-late { color: var(--warn-ink); font-weight: 700; }
.ar-table .ar-chk { width: 48px; padding: 0; text-align: center; }
.ar-chk-box { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.ar-chk-box input { width: 22px; height: 22px; margin: 0; cursor: pointer; }
.ar-bsel { display: inline-flex; vertical-align: middle; margin-right: 2px; }
.ar-bsel .ar-chk-box { min-width: 36px; min-height: 44px; }
.pd-status { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: var(--bg-elev); }
.pd-mail { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.pd-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pd-subj { margin: 6px 0; }
.pd-body { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 0.9rem; background: var(--bg-elev); border-radius: 8px; padding: 10px; margin: 0; max-height: 320px; overflow: auto; }
.notice-log { margin-bottom: 10px; }
.notice-row { padding: 6px 0; border-bottom: 1px solid var(--border); }
.notice-unsent strong { color: var(--text-muted); }
.ar-row { cursor: pointer; }
.ar-row:hover { background: var(--bg-hover); }
#btn-ar-aging.active { border-color: var(--primary); background: var(--primary-dim); color: var(--on-primary-dim); }
/* Polished invoice / estimate / statement print */
.print-doc { position: relative; padding: 26px 28px; font-size: 0.9rem; }
.print-doc .pr-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 12px; border-bottom: 3px solid #dc2626; }
.print-doc .pr-company { font-size: 0.85rem; color: #333; line-height: 1.4; }
.print-doc .pr-company strong { font-size: 1.05rem; color: #111; }
.print-doc .pr-doc-title { text-align: right; font-size: 0.85rem; color: #333; line-height: 1.5; }
.print-doc .pr-big { font-size: 1.8rem; font-weight: 900; letter-spacing: 0.08em; color: #dc2626; line-height: 1.1; margin-bottom: 4px; }
.print-doc .pr-status { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; border: 1.5px solid #111; font-weight: 800; font-size: 0.75rem; text-transform: uppercase; }
.print-doc .pr-st-overdue { border-color: #dc2626; color: #dc2626; }
.print-doc .pr-st-paid { border-color: #15803d; color: #15803d; }
.print-doc .pr-lines thead th { background: #111; color: #fff; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: none; }
.print-doc .pr-lines tbody tr:nth-child(even) td { background: #f6f6f6; }
.print-doc .pr-sku-cell { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: #b91c1c; white-space: nowrap; }
.print-doc .pr-dim { color: #777; font-size: 0.8rem; }
.print-doc .pr-bottom { display: grid; grid-template-columns: 1fr 300px; gap: 20px; margin-top: 12px; }
.print-doc .pr-notes h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: #666; margin: 6px 0 4px; }
.print-doc .pr-sum .pr-line { border-bottom: 1px solid #eee; }
.print-doc .pr-strong { font-weight: 800; font-size: 1.02rem; }
.print-ro .pr-grand { display: flex; justify-content: space-between; margin-top: 6px; padding: 8px 10px; background: #111; color: #fff; font-weight: 900; font-size: 1.1rem; border-radius: 4px; }
.print-doc .pr-terms { font-size: 0.8rem; color: #444; }
.print-doc .pr-approve { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; font-size: 0.9rem; }
.print-doc .pr-tagline { margin-top: 12px; text-align: center; font-weight: 700; color: #dc2626; }
.print-doc .pr-stamp { position: absolute; top: 120px; right: 60px; transform: rotate(-14deg); border: 4px solid #15803d; color: #15803d; font-size: 2.4rem; font-weight: 900; padding: 2px 18px; border-radius: 8px; opacity: 0.55; letter-spacing: 0.1em; pointer-events: none; }
.print-doc .pr-aging th, .print-doc .pr-aging td { text-align: right; }
.print-ro .pr-sum-ro { max-width: 300px; margin-left: auto; margin-top: 10px; }
@media (max-width: 640px) { .print-doc .pr-bottom { grid-template-columns: 1fr; } .print-doc .pr-doc-head { flex-direction: column; } .print-doc .pr-doc-title { text-align: left; } }
@media print {
  .print-doc .pr-lines thead th, .print-ro .pr-grand, .print-doc .pr-lines tbody tr:nth-child(even) td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (min-width: 700px) { .modal.modal-wide { max-width: 940px; } }
@media (min-width: 900px) {
  .modal-wide .doc-line { display: flex; align-items: flex-end; gap: 10px; }
  .modal-wide .doc-line .dl-main { flex: 1 1 auto; margin-bottom: 0; min-width: 0; }
  .modal-wide .doc-line .dl-nums { flex: 0 0 auto; flex-wrap: nowrap; }
  .modal-wide .doc-line .dl-nums label input { width: 78px; }
}
.ar-tiles .pulse-stat.cur .val { color: var(--text); }

/* ===== v1.8 Part B: priority, due dates, custom stages, tech lanes, timers, checklists, calendar ===== */
.board-col { border-top: 4px solid var(--stc, var(--border)); }
.stage-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--stc, #64748b); margin-right: 6px; vertical-align: -1px; }
.badge-stage { background: #2a2a2a; color: #e5e5e5; }
.ticket-card.prio-low { border-left: 4px solid #6b7280; }
.ticket-card.prio-high { border-left: 6px solid #f59e0b; }
.ticket-card.prio-emergency { border-left: 8px solid #ef4444; box-shadow: 0 0 0 1px rgba(239,68,68,.45), 0 0 14px rgba(239,68,68,.18); }
.ticket-card.overdue { background: linear-gradient(90deg, rgba(239,68,68,.10), transparent 60%), var(--bg-card); }
.tc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.prio-badge { font-size: .66rem; }
.prio-b-low { background: #2a2a2a; color: #d1d5db; }
.prio-b-high { background: #3b2a10; color: #fbbf24; }
.prio-b-emergency { background: #ef4444; color: #fff; }
.badge-due { background: #1f2937; color: #e5e7eb; }
.badge-due.due-today { background: #3b2a10; color: #fbbf24; }
.badge-overdue-ro { background: #7f1d1d; color: #fff; }
.badge-timer { background: #14532d; color: #86efac; }
.badge-cl { background: #1f2937; color: #cbd5e1; }
.badge-cl.ok { background: var(--green-dim); color: #86efac; }
.badge-issue { background: #1f2937; color: #e5e7eb; text-transform: none; }
.job-card.prio-high { border-left: 6px solid #f59e0b; }
.job-card.prio-emergency { border-left: 8px solid #ef4444; }
.job-card.prio-low { border-left: 4px solid #6b7280; }
.job-card.overdue { box-shadow: inset 0 0 0 1px rgba(239,68,68,.5); }

/* calendar drop targets */
.cal-cell.drop-target, .cal-lane-head.drop-target { background: color-mix(in srgb, var(--primary) 22%, var(--bg-elev)); border-color: var(--primary); outline: 2px solid var(--primary); }

/* labor timer */
.timer-panel { display: flex; flex-direction: column; gap: 8px; }
.timer-row { display: grid; grid-template-columns: minmax(90px, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border); }
.timer-row.timer-running { border-color: #22c55e; box-shadow: 0 0 0 1px rgba(34,197,94,.35); }
.timer-row.timer-paused { border-color: #f59e0b; }
.timer-who { display: flex; flex-direction: column; }
.timer-clock { font-variant-numeric: tabular-nums; font-size: 1.5rem; font-weight: 800; letter-spacing: .02em; }
.timer-running .timer-clock { color: #4ade80; }
.timer-btns { display: flex; gap: 6px; }
.btn-timer { min-height: 48px; min-width: 92px; font-size: .95rem; }
.timer-panel.compact .timer-row { grid-template-columns: 1fr auto; }
.timer-panel.compact .timer-btns { grid-column: 1 / -1; }
@media (max-width: 379px) { .timer-row { grid-template-columns: minmax(70px, 1fr) auto auto; gap: 8px; } } /* ux3: the RO page was 3px too wide on a 360px phone */
.timer-panel.compact .btn-timer { flex: 1; }
.timer-note { font-size: .72rem; }
.timer-add select { min-height: 44px; }
.job-timer { margin: 10px 0 4px; }

/* checklists */
.cl-block { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.cl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cl-head strong { flex: 1; }
.cl-count { font-weight: 800; font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: #3b2a10; color: #fbbf24; }
.cl-count.ok { background: var(--green-dim); color: #86efac; }
.cl-item { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 8px 4px; border-top: 1px solid var(--border); cursor: pointer; font-size: .95rem; }
.cl-item input { width: 26px; height: 26px; flex: 0 0 26px; accent-color: var(--primary); margin-top: 1px; }
.cl-item.done span { color: var(--text-muted); text-decoration: line-through; }
.cl-by { display: block; font-style: normal; font-size: .72rem; color: var(--text-muted); text-decoration: none; }
.cl-attach select { min-height: 44px; width: 100%; }
.cl-open-list { margin: 10px 0 0 18px; line-height: 1.6; }

/* owner settings: stages + checklist templates */
.sub-h { margin: 16px 0 6px; font-size: .95rem; }
.stage-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.stage-row .stage-color, .stage-row input[type=color] { width: 48px; height: 44px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); flex: 0 0 48px; }
.stage-row .stage-label, .stage-row input:not([type=color]) { flex: 1; min-height: 44px; }
.stage-row .stage-used { min-width: 110px; font-size: .72rem; }
.stage-row.locked { opacity: .8; }
.btn-icon-sm { min-width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ck-tpl { border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 8px; background: var(--bg-elev); }
.ck-tpl-head { display: flex; gap: 8px; margin-bottom: 6px; }
.ck-tpl-head input { flex: 1; min-height: 44px; font-weight: 700; }
.ck-tpl textarea { width: 100%; }

/* calendar */
.cal-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-nav strong { margin-left: 6px; font-size: .95rem; }
.cal-body { overflow-x: auto; }
.cal-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; }
.cal-week .cal-lane-head, .cal-week .cal-corner, .cal-day .cal-hour, .cal-day .cal-corner { position: sticky; left: 0; z-index: 3; box-shadow: 2px 0 0 var(--border); }
.cal-grid > div { background: var(--bg-elev); }
.cal-corner, .cal-dayhead, .cal-lane-head, .cal-hour { padding: 8px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.cal-dayhead.today { color: #fff; background: color-mix(in srgb, var(--primary) 35%, var(--bg-elev)) !important; }
.cal-lane-head { display: flex; align-items: center; color: var(--text); background: var(--bg-card) !important; min-height: 44px; }
.cal-hour { font-size: .7rem; text-align: right; }
.cal-cell { min-height: 88px; padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.cal-day .cal-cell { min-height: 54px; }
.cal-cell.today { background: color-mix(in srgb, var(--primary) 7%, var(--bg-elev)) !important; }
.cal-item { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--stc, var(--primary)); border-radius: 8px; padding: 6px 8px; font-size: .78rem; cursor: pointer; user-select: none; touch-action: pan-y; min-height: 44px; }
.cal-item.prio-high { border-left-width: 6px; border-left-color: #f59e0b; }
.cal-item.prio-emergency { border-left-width: 7px; border-left-color: #ef4444; }
.cal-item.overdue { box-shadow: inset 0 0 0 1px rgba(239,68,68,.6); }
.cal-appt { border-style: dashed; border-left: 4px solid #60a5fa; background: #111827; }
.ci-top { display: flex; gap: 6px; font-size: .68rem; color: var(--text-muted); font-weight: 700; }
.ci-time { color: var(--amber-ink, #fbbf24); }
.ci-title { font-weight: 700; font-size: .8rem; line-height: 1.2; }
.ci-sub { font-size: .7rem; color: var(--text-muted); }
.ci-who { margin-top: 2px; font-size: .7rem; font-weight: 600; color: var(--text); display: inline-block; padding: 0 6px; border-radius: 8px; background: rgba(148,163,184,.18); }
.t-cal-l { white-space: nowrap; }
.cal-tray { margin-top: 14px; }
.cal-tray-items { flex-direction: row !important; flex-wrap: wrap; background: var(--bg-elev); border: 1px dashed var(--border); border-radius: 10px; padding: 8px !important; min-height: 64px; }
.cal-tray-items .cal-item { width: 200px; }
@media (hover: hover) { .cal-item { cursor: grab; } }
@media print { #view-calendar .view-toolbar { display: none !important; } }
/* v1.8 Part B: form controls outside .field */
.stage-row input:not([type=color]), #issue-types, .ck-tpl input, .ck-tpl textarea, .timer-add select, .cl-attach select {
  width: 100%; min-height: var(--tap); padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit;
}
#issue-types { min-height: 150px; resize: vertical; }
.stage-row input:disabled { opacity: .7; }
.stage-row input:focus, #issue-types:focus, .ck-tpl input:focus, .ck-tpl textarea:focus, .timer-add select:focus, .cl-attach select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.ci-title, .ci-sub { overflow-wrap: anywhere; }

/* ===== v1.9 — Admin (Owner only) ===== */
.admin-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
.admin-layout.has-sec .admin-nav { display: none; }
.admin-layout:not(.has-sec) .admin-main { display: none; }
.admin-nav { display: flex; flex-direction: column; gap: 6px; }
.admin-nav-head { font-weight: 800; font-size: 1.15rem; padding: 4px 4px 8px; display: flex; align-items: baseline; gap: 8px; }
.admin-nav-btn { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-size: 1rem; text-align: left; cursor: pointer; }
.admin-nav-btn .ico { width: 26px; text-align: center; font-size: 1.15rem; }
.admin-nav-btn .chev { margin-left: auto; color: var(--text-muted); font-size: 1.3rem; }
.admin-nav-btn:hover { background: var(--bg-hover); }
.admin-nav-btn.active { border-color: var(--primary); box-shadow: inset 4px 0 0 var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--bg-card)); }
.admin-sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.admin-sec-head h2 { font-size: 1.25rem; margin: 0; }
.admin-main .card { margin-bottom: 14px; }
.admin-save { margin-top: 14px; }
@media (min-width: 900px) {
  .admin-layout, .admin-layout.has-sec { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
  .admin-layout.has-sec .admin-nav, .admin-layout .admin-nav { display: flex; }
  .admin-layout .admin-main { display: block; }
  .admin-nav-btn { min-height: 44px; font-size: .92rem; padding: 8px 12px; }
  .admin-nav-btn .chev { display: none; }
  .admin-back { display: none; }
}
.adm-rows { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 10px; }
.adm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.adm-row.inactive { opacity: .55; }
.adm-row input[type="color"] { width: 44px; height: 44px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); flex: 0 0 auto; }
.adm-row input:not([type]), .adm-row input[type="text"], .adm-row .t-name, .adm-row .l-label, .adm-row .r-name, .adm-row .tm-label, .adm-row .ct-label, .adm-row .p-label { flex: 1 1 160px; min-height: 44px; }
.adm-row .l-short { flex: 0 1 120px; }
.adm-row select { min-height: 44px; flex: 0 1 190px; }
.adm-row .adm-active { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; white-space: nowrap; }
.adm-row .adm-active input { width: 22px; height: 22px; }
.adm-row .adm-count { white-space: nowrap; margin-left: auto; }
.money-input { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.money-input input { width: 96px; min-height: 44px; }
.adm-num { display: flex; flex-direction: column; gap: 10px; }
.adm-num-row { display: grid; grid-template-columns: 130px repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 8px; background: var(--bg-elev); border-radius: var(--radius); }
.adm-num-row > strong { align-self: center; }
.adm-num-row .field { margin: 0; }
@media (max-width: 700px) { .adm-num-row { grid-template-columns: 1fr 1fr; } .adm-num-row > strong { grid-column: 1 / -1; } }
.adm-links { display: flex; flex-wrap: wrap; gap: 10px; }
.adm-links .btn { min-height: 48px; }
.adm-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.adm-counts > div { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; }
.adm-counts strong { font-size: 1.3rem; }
.adm-counts span { color: var(--text-muted); font-size: .8rem; }
.act-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.act-filters input[type="search"] { flex: 1 1 260px; min-height: 48px; }
.act-filters select { min-height: 48px; flex: 0 1 200px; }
.activity-list { display: flex; flex-direction: column; }
.act-row { display: grid; grid-template-columns: 150px 150px minmax(0, 1fr); gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: .9rem; align-items: baseline; }
.act-row:last-child { border-bottom: 0; }
.act-when { color: var(--text-muted); font-size: .82rem; }
.act-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-what { word-break: break-word; }
.act-row.act-bad .act-what { color: var(--warn-ink); }
.badge.act-area { background: var(--bg-hover); color: var(--text); margin-right: 4px; }
@media (max-width: 640px) { .act-row { grid-template-columns: 1fr; gap: 2px; } }
.rate-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.badge-cat { background: var(--bg-hover); color: var(--text-muted); }
.tech-btn[style*="--tech-color"] { border-left: 5px solid var(--tech-color); }
.owner-admin-link { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.owner-admin-link p { flex: 1 1 280px; margin: 0; }
.nowrap { white-space: nowrap; }
.print-ro .pr-terms div { font-size: .78rem; color: #444; }
#admin-root input:not([type=color]):not([type=checkbox]):not([type=radio]):not([type=file]), #admin-root select, #admin-root textarea {
  min-height: 44px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit; }
#admin-root textarea { width: 100%; min-height: 88px; resize: vertical; }
#admin-root input:focus, #admin-root select:focus, #admin-root textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
#admin-root select:disabled, #admin-root input:disabled { opacity: .6; }
#admin-root .check-row { display: flex; align-items: center; gap: 10px; min-height: 48px; }
#admin-root .check-row input { width: 22px; height: 22px; flex: 0 0 auto; }
/* v1.9.1 "In use" checkboxes on every Admin setup list */
.adm-active.inuse { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; white-space: nowrap; font-size: .85rem; font-weight: 600; cursor: pointer; flex: 0 0 auto; }
.adm-active.inuse input[type=checkbox], .stage-row .adm-active.inuse input, .ck-tpl-head .adm-active.inuse input { width: 22px !important; height: 22px !important; min-height: 0 !important; flex: 0 0 22px !important; padding: 0 !important; margin: 0; accent-color: var(--primary); }
.adm-active.inuse:has(input:disabled) { opacity: .7; cursor: default; }
.stage-row.inactive, .ck-tpl.inactive { opacity: .55; }
.adm-row .nl-name { flex: 1 1 220px; min-height: 44px; }
.tpl-block > .adm-active.inuse { margin: 6px 0; }
.adm-rows .nl-row { padding: 4px 8px; }
#it-list .adm-rows, #cat-list .adm-rows { gap: 4px; }
#it-list .nl-row .btn-icon-sm, #cat-list .nl-row .btn-icon-sm { min-height: 40px; }
#it-list .nl-name, #cat-list .nl-name { min-height: 40px !important; padding-top: 6px !important; padding-bottom: 6px !important; }

/* ---- v1.10: inline quick-add, combo pickers, big date/time, techs, tax rates, freight ---- */
.inline-add { margin: 8px 0 12px; padding: 12px; border: 2px dashed var(--accent, #dc2626); border-radius: var(--radius); background: var(--bg-elev); }
.inline-title { font-weight: 700; margin-bottom: 8px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.inline-actions .btn { min-height: 48px; }
.combo-search { width: 100%; min-height: 48px; font-size: 16px; margin-bottom: 6px; }
.combo-select, .big-picker, #ap-time { min-height: 52px; font-size: 17px; width: 100%; }
.big-picker::-webkit-calendar-picker-indicator { transform: scale(1.6); cursor: pointer; padding: 4px; }
.date-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.date-chips .chip { min-height: 44px; padding: 0 16px; font-size: 15px; }
.qc-types { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-inactive-toggle { margin: 4px 0 10px; }
.tech-row .tech-title { flex-basis: 100%; display: flex; align-items: center; gap: 8px; }
.tech-row .t-type-title { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent, #dc2626); }
.t-login { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.login-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.login-linked { background: #14532d; color: #bbf7d0; }
.login-none { background: #3f3f46; color: #e4e4e7; }
.tax-row.is-default { border-color: var(--accent, #dc2626); }
.tax-row .tr-name { min-width: 160px; flex: 1; }
.tax-row .tr-rate { width: 90px; }
.tax-row .tr-effwrap { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tax-row .tr-eff { min-height: 44px; width: 150px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0 6px; }
.doc-tax-field select { margin-bottom: 6px; }
.freight-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 150px; }
.freight-cell input { width: 90px; min-height: 40px; }
.freight-cell.is-manual input { border: 2px solid #f59e0b; background: #451a03; color: #fff; }
.badge-freight-manual { background: #f59e0b; color: #111; font-weight: 700; }
.freight-summary { margin-top: 8px; padding: 8px 10px; border-left: 4px solid var(--accent, #dc2626); background: var(--bg-elev); border-radius: 6px; font-size: 14px; }
.freight-summary.warn { border-left-color: #f59e0b; }
.ci-freight { margin-top: 12px; }
@media (max-width: 700px) { .freight-cell input { width: 100%; } .tech-row .t-name { flex: 1 1 100%; } }

/* ---- v1.10.1: background-update bars, modal nudge, markup ---- */
.remote-bar, .update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 3000; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: calc(100vw - 24px); padding: 10px 14px; border-radius: 12px; background: #111; color: #fff; border: 2px solid var(--primary, #dc2626); box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 14px; }
.update-bar { bottom: auto; top: 12px; }
.remote-bar .btn, .update-bar .btn { min-height: 40px; }
.remote-bar.hidden { display: none; }
@keyframes modalNudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.modal-nudge { animation: modalNudge .25s ease 2; }
.markup-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: end; }
.sell-preview { font-size: 15px; padding: 10px 12px; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border); min-height: 48px; display: flex; align-items: center; }
.sell-preview strong { font-size: 18px; margin-left: 6px; color: #fff; }
.pc-table input:not([type=checkbox]) { width: 100%; min-width: 90px; min-height: 46px; padding: 6px 10px; font-size: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.pc-table td { vertical-align: middle; }
.pc-keep { white-space: nowrap; }
.pc-row.keep .pc-price { opacity: .5; }
@media (max-width: 700px) { .markup-row { grid-template-columns: 1fr 1fr; } }

/* ===== v1.11 full catalog: searchable pickers, paged lists ===== */
.spick { position: relative; }
.spick-q { width: 100%; min-height: 44px; }
.spick-list { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 60; max-height: min(55vh, 420px); overflow-y: auto; background: var(--bg-card, #161616); border: 1px solid var(--border, #333); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.55); -webkit-overflow-scrolling: touch; }
.spick-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 48px; padding: 8px 12px; background: none; border: 0; border-bottom: 1px solid var(--border, #2a2a2a); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.spick-opt:hover, .spick-opt.act { background: rgba(220, 38, 38, .18); }
.spick-opt.sel .spick-l::before { content: '✓ '; color: var(--primary, #dc2626); }
.spick-l { font-weight: 600; word-break: break-word; }
.spick-s { font-size: .8rem; color: var(--text-muted, #9ca3af); }
.spick-none { padding: 10px 12px; font-size: .85rem; color: var(--text-muted, #9ca3af); }
.add-line-row .spick { flex: 1 1 260px; min-width: 200px; }
.po-add-row .spick { flex: 1 1 460px; min-width: min(100%, 440px); }
.add-line-row .spick .spick-q { width: 100%; }
@media (max-width: 640px) { .po-add-row .spick { flex: 1 1 100%; min-width: 100%; } }
.vendor-pick select { width: 100%; }
.vendor-pick .btn-sm { flex: none; min-height: 44px; padding: 0 12px; }
.po-ship .badge { margin-left: 6px; }
.list-more { display: flex; justify-content: center; padding: 14px 0 24px; }
.list-more .btn { min-width: 240px; }
.search-ms { float: right; font-size: .72rem; color: var(--text-muted); }
/* v1.11: team member contact fields + RS details */
.tech-contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; margin-top: 6px; }
.tech-contact input { flex: 1 1 200px; min-height: 44px; }
.rs-details { margin: 8px 0 12px; padding: 8px 12px; border: 1px solid var(--border, #333); border-radius: 10px; }
.rs-details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.rs-details > div { padding: 3px 0; }

/* v1.11 document disclaimer: small print, wraps cleanly */
.pr-disclaimer { margin-top: 10px; padding-top: 6px; border-top: 1px solid #ccc; font-size: 7.5pt; line-height: 1.35; color: #333; text-align: justify; hyphens: auto; overflow-wrap: break-word; white-space: pre-line; }
@media print { .pr-disclaimer { font-size: 6.5pt; break-inside: auto; } }

/* ===== v1.11 Estimate / Invoice page (RepairShopr layout): wide on desktop, stacked cards on a phone ===== */
.doc-page { max-width: 1400px; margin: 0 auto; padding-bottom: 40px; }
.view-body.doc-page { overflow: visible; } /* ux3: the page grows with its content (the window scrolls), so it is not a scroll box — lets sticky bars (labor-code Add bar) stick to the screen */
.dp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 14px; }
.dp-title { font-size: 1.7rem; margin: 0; letter-spacing: .2px; }
.dp-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.dp-actions .btn { min-height: var(--tap); }
.dp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.dp-col { display: flex; flex-direction: column; gap: 14px; }
.dp-card { margin: 0; }
.dp-lines-card { margin-bottom: 14px; }
.dp-bh { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .5px; color: var(--text-muted); border-bottom: 2px solid var(--primary); padding-bottom: 6px; margin-bottom: 10px; }
.dp-kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px; padding: 5px 0; align-items: center; font-size: .92rem; border-bottom: 1px solid var(--border); }
.dp-kv:last-child { border-bottom: 0; }
.dp-k { color: var(--text-muted); }
.dp-v input, .dp-v select { min-height: 40px; width: 100%; max-width: 320px; }
.dp-tax { display: flex; gap: 6px; } .dp-tax select { flex: 1; } .dp-tax input { width: 90px; }
.ro-taxsel { max-width: 340px; margin: 10px 0 0 auto; } .ro-taxsel select { min-height: 44px; width: 100%; }
.dp-dim { color: var(--text-muted); }
.dp-status { text-align: center; font-weight: 800; letter-spacing: 1px; padding: 6px; border-radius: 6px; margin-bottom: 8px; background: var(--bg-hover); text-transform: uppercase; font-size: .85rem; }
.dp-st-paid { background: var(--green-dim); color: #bbf7d0; } .dp-st-overdue { background: var(--red-dim); color: #fecaca; } .dp-st-partial { background: #4a3a08; color: #fde68a; }
.dp-addbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.dp-addpick { flex: 1 1 320px; min-width: 240px; }
.dp-addbar .btn { min-height: var(--tap); }
.dp-table-wrap { overflow-x: auto; }
.dp-table { width: 100%; border-collapse: collapse; }
.dp-table th { text-align: left; font-size: .75rem; text-transform: uppercase; color: var(--text-muted); padding: 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dp-table td { padding: 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dp-table .num { text-align: right; }
.dp-table input, .dp-table textarea, .dp-table select { width: 100%; min-height: 40px; font-size: .92rem; }
.dp-table td.num input { width: 92px; text-align: right; }
.dl-c-item { width: 24%; } .dl-c-item .dl-sku { margin-bottom: 4px; font-size: .8rem; min-height: 34px; color: var(--text-muted); }
.dl-c-desc { width: 32%; } .dl-ldesc { resize: vertical; min-height: 40px; }
.dl-disc { display: flex; gap: 2px; margin-top: 4px; justify-content: flex-end; } .dl-disc input { width: 58px !important; min-height: 32px !important; font-size: .8rem !important; } .dl-disc select { width: 46px; min-height: 32px; font-size: .8rem; }
.dl-tax { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 40px; } .dl-tax input { width: 22px; min-height: 22px; }
.dl-reason { min-width: 90px; }
.dl-amt { white-space: nowrap; font-weight: 700; padding-top: 14px !important; } .dl-amt small { display: block; color: var(--text-muted); font-weight: 400; }
.dl-lab { display: inline-block; margin-bottom: 4px; }
.dl-c-rm { width: 44px; } .dl-c-rm .li-remove { min-width: 40px; min-height: 40px; }
.dp-empty { text-align: center; padding: 18px !important; }
.dp-msgtot { display: grid; grid-template-columns: 1fr 360px; gap: 16px; margin-top: 12px; align-items: start; }
.dp-disc .disc-pair { display: flex; gap: 4px; } .dp-disc input { flex: 1; }
.dp-mini { width: 100%; border-collapse: collapse; font-size: .9rem; } .dp-mini th { text-align: left; color: var(--text-muted); font-size: .75rem; text-transform: uppercase; padding: 4px; } .dp-mini td { padding: 6px 4px; border-top: 1px solid var(--border); } .dp-mini .num { text-align: right; }
.dp-attach { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.dp-att { position: relative; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 6px; text-align: center; }
.dp-att img { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; display: block; } .dp-file { display: block; font-size: 2.4rem; line-height: 80px; text-decoration: none; }
.dp-att-n { font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; } .dp-att .li-remove { position: absolute; top: 2px; right: 2px; }
.dp-terms { font-size: .88rem; margin-bottom: 8px; white-space: pre-line; }
.dp-disclaimer { color: var(--text-muted); border-top-color: var(--border); max-height: 260px; overflow-y: auto; font-size: .74rem; }
.dp-sig { max-width: 100%; background: #fff; border-radius: 6px; display: block; margin-bottom: 6px; }
.pr-ldesc { font-size: .85em; color: #555; white-space: pre-line; margin-top: 2px; }
.pr-sig { max-height: 70px; margin-top: 4px; }
.ne-box { margin-top: 10px; }
.ne-missing { border-color: var(--yellow) !important; box-shadow: 0 0 0 1px var(--yellow) inset; }
@media (max-width: 1000px) { .dp-grid2 { grid-template-columns: 1fr; } .dp-msgtot { grid-template-columns: 1fr; } }
/* phone: each line becomes a card with labelled cells */
@media (max-width: 760px) {
  .dp-title { font-size: 1.35rem; }
  .dp-actions { margin-left: 0; width: 100%; } .dp-actions .btn { flex: 1 1 calc(50% - 8px); }
  .dp-kv { grid-template-columns: 112px 1fr; }
  .dp-table thead { display: none; }
  .dp-table, .dp-table tbody, .dp-table tr, .dp-table td { display: block; width: 100% !important; }
  .dp-table tr.doc-line { position: relative; border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 10px; background: var(--bg-elev); }
  .dp-table td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; text-align: left !important; }
  .dp-table td::before { content: attr(data-l); color: var(--text-muted); font-size: .78rem; text-transform: uppercase; }
  .dp-table td.num input { width: 100%; text-align: left; }
  .dl-disc { justify-content: flex-start; grid-column: 2; }
  .dp-table td.dl-c-rm { position: absolute; top: 4px; right: 4px; width: auto !important; display: block; } .dp-table td.dl-c-rm::before { content: none; }
  .dp-table td.dp-empty { display: block; } .dp-table td.dp-empty::before { content: none; }
}
.dp-v input, .dp-v select, .doc-line textarea { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 6px 8px; font-size: 0.95rem; font-family: inherit; }
.dp-v input:focus, .dp-v select:focus, .doc-line input:focus, .doc-line textarea:focus, .doc-line select:focus { outline: none; border-color: var(--primary); }
.dp-v input:disabled, .dp-v select:disabled, .doc-line textarea:disabled { opacity: 0.75; }
.ro-docs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.ro-docs .chip { min-height: 40px; }

/* ===== v1.11 navigation: dark gray top bar (desktop) / bottom tab bar with More (phone); inline SVG line icons ===== */
:root { --nav-accent: #f97316; --nav-bg: #161616; --topnav-h: 0px; }
svg.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; flex-shrink: 0; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--nav-bg); border-top: 1px solid #2a2a2a; }
.nav-btn { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tap);
  color: #a3a3a3; font-size: 0.66rem; font-weight: 600; line-height: 1.1; text-align: center; position: relative; transition: color .15s; -webkit-tap-highlight-color: transparent; }
.nav-btn .nav-ico { position: relative; display: inline-flex; }
.nav-btn svg.i { width: 24px; height: 24px; stroke-width: 1.75; }
.nav-btn.active { color: var(--nav-accent); }
.nav-btn:active { background: #222; }
.nav-btn .nav-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.nav-badge { position: absolute; top: -6px; right: -11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 0.66rem; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--nav-bg); }
.nav-btn.nav-sec, .nav-more-btn.nav-none { display: none; }
.nav-more-btn { order: 99; }
.nav-more-sheet { position: fixed; z-index: 60; right: 8px; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); min-width: 220px; background: #1d1d1d; border: 1px solid #333;
  border-radius: 12px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.55); display: flex; flex-direction: column; }
.nav-more-sheet button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 8px; color: #e5e5e5; font-weight: 600; text-align: left; }
.nav-more-sheet button svg.i { width: 22px; height: 22px; }
.nav-more-sheet button.active { color: var(--nav-accent); }
.nav-more-sheet button:active { background: #2a2a2a; }
.nav-more-sheet .nav-badge { position: static; margin-left: auto; box-shadow: none; }
.admin-nav-btn .ico svg.i { width: 20px; height: 20px; }
@media (min-width: 900px) {
  :root { --topnav-h: 68px; }
  #app { padding-bottom: 0; padding-left: 0; }
  .app-header { order: -2; }
  .bottom-nav { order: -1; position: sticky; top: var(--header-h); bottom: auto; z-index: 39; height: var(--topnav-h); padding: 0 8px; border-top: 0; border-bottom: 1px solid #2a2a2a;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; justify-content: flex-start; }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .nav-btn { flex: 0 0 auto; min-width: 92px; padding: 6px 10px 8px; font-size: 0.74rem; border-bottom: 3px solid transparent; }
  .nav-btn:hover { color: #e5e5e5; background: #1f1f1f; }
  .nav-btn.active { border-bottom-color: var(--nav-accent); background: #1c1c1c; }
  .nav-btn.nav-sec { display: flex; }
  .nav-btn { order: 0 !important; }
  .nav-more-btn { display: none !important; }
  .nav-btn.nav-admin { margin-left: auto; }
  .board-col { max-height: calc(100vh - var(--header-h) - var(--topnav-h) - 70px); }
}
.inv-cat-filter { min-height: 40px; max-width: 260px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 0 12px; }
.rscat-tree { max-height: 480px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; }
.rscat-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-right: 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
.rscat-row input { width: 22px; height: 22px; }
.rscat-n { flex: 1; }
/* Full-size Repair Order print (matches invoice/estimate print; bigger type for the shop floor) */
.pr-opts { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.pr-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; cursor: pointer; }
.pr-opt input { width: 22px; height: 22px; }
.print-ro-full { font-size: 1.1rem; }
.print-ro-full .pr-section h4 { font-size: 0.82rem; color: #333; }
.print-ro-full .pr-table { font-size: 0.98rem; }
.print-ro-full .pr-table th, .print-ro-full .pr-table td { padding: 8px 6px; }
.print-ro-full .pr-kv-big { margin-top: 12px; font-size: 1rem; }
.print-ro-full .pr-kv-big > div { border-bottom: 1px solid #ccc; padding-bottom: 4px; min-height: 2.6em; font-weight: 600; }
.print-ro-full .pr-kv span { font-weight: 400; }
.print-ro-full .pr-sub { margin-top: 6px; }
.print-ro-full .pr-text { white-space: pre-line; }
.print-ro-full .pr-write { display: block; height: 1.9em; border-bottom: 1px solid #bbb; }
.print-ro-full .pr-blank { display: block; height: 1.3em; }
.print-ro-full .pr-empty-row td { height: 2.1em; }
.print-ro-full .pr-check td { vertical-align: top; height: 2.4em; }
.print-ro-full .pr-box-col { width: 52px; text-align: center; }
.print-ro-full .pr-pf { width: 50px; text-align: center; }
.print-ro-full .pr-cl-notes { width: 38%; border-left: 1px solid #ddd; }
.print-ro-full .pr-box { display: inline-block; width: 26px; height: 26px; border: 2.5px solid #111; border-radius: 3px; line-height: 22px; text-align: center; font-weight: 900; font-size: 1.2rem; }
.print-ro-full .pr-box.sm { width: 22px; height: 22px; border-width: 2px; }
.print-ro-full .pr-box.on { background: #111; color: #fff; }
.print-ro-full .pr-sig { min-width: 0; }
.print-ro-full .pr-sig .pr-meta { overflow: hidden; color: transparent; height: 46px; border-bottom: 1.5px solid #111; margin-bottom: 0; }
.print-ro-full .pr-sig h4::after { content: " / Date"; }
@media (max-width: 640px) {
  .print-ro-full { padding: 14px 12px; }
  .print-ro-full .pr-kv { grid-template-columns: 1fr 1fr; } .print-ro-full .pr-two { grid-template-columns: 1fr; }
  .print-ro-full .pr-check { table-layout: fixed; } .print-ro-full .pr-box-col, .print-ro-full .pr-pf { width: 38px; padding-left: 2px; padding-right: 2px; } .print-ro-full .pr-cl-notes { width: 22%; }
  .print-ro-full .pr-check th { font-size: .7rem; } .print-ro-full .pr-check td { overflow-wrap: anywhere; }
  .print-ro-full .pr-lines { table-layout: fixed; font-size: .85rem; } .print-ro-full .pr-lines th, .print-ro-full .pr-lines td { padding: 6px 3px; overflow-wrap: anywhere; }
  .print-ro-full .pr-lines .pr-sku-cell { white-space: normal; } .print-ro-full .pr-lines th:first-child { width: 24%; } .print-ro-full .pr-lines th.num { width: 17%; } .print-ro-full .pr-lines th:nth-child(3) { width: 12%; }
}
@media print {
  @page { size: letter; margin: 0.45in; }
  .print-ro-full { padding: 0; font-size: 11.5pt; }
  .print-ro-full .pr-kv { grid-template-columns: repeat(3, 1fr) !important; }
  .print-ro-full .pr-two { grid-template-columns: 1fr 1fr !important; }
  .print-ro-full .pr-doc-head { flex-direction: row !important; }
  .print-ro-full .pr-doc-title { text-align: right !important; }
  .print-ro-full tr, .print-ro-full .pr-sig, .print-ro-full .pr-sum-ro, .print-ro-full .pr-kv > div { break-inside: avoid; page-break-inside: avoid; }
  .print-ro-full .pr-section h4 { break-after: avoid; page-break-after: avoid; }
  .print-ro-full thead { display: table-header-group; }
  .print-ro-full .pr-box.on { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* RO hour meter */
.hm-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; }
.hm-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.hm-field { flex: 0 1 auto; margin-bottom: 0; }
.hm-field input { width: 140px; max-width: 100%; font-size: 1.05rem; font-weight: 700; min-height: 44px; }
.hm-box .hm-meter + .hm-meter { margin-top: 0; padding-top: 0; border-top: 0; }
.hm-hist { margin-top: 6px; }
.hm-hist summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--text-muted); }
/* Labor codes */
.lc-search { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 12px; background: var(--bg-card); }
.lc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.lc-row input[type=search] { flex: 1 1 240px; min-height: 46px; font-size: 1rem; }
.lc-row select { flex: 0 1 200px; min-height: 46px; }
.lc-row input, .lc-row select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; }
.lc-search, .lc-row > input, .lc-row > select, .lc-results { min-width: 0; max-width: 100%; box-sizing: border-box; } .lc-row > select { width: 0; }
.lc-search { contain: inline-size; } /* ux3: long system / job-type names (and one-line rows) never push the page wider than a phone — the estimate / invoice page sizes to its content */
.lc-all { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: .9rem; }
.lc-results { max-height: 320px; overflow-y: auto; }
.lc-hit, .lc-item summary { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px; border-bottom: 1px solid var(--border); text-align: left; color: var(--text); background: none; cursor: pointer; }
.lc-hit:active, .lc-hit:hover { background: var(--bg-hover); }
.lc-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--primary); min-width: 72px; }
.lc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lc-hrs { font-weight: 800; white-space: nowrap; }
.lc-item.lc-off summary { opacity: .55; }
/* ux3 multi-select labor codes: checkbox rows (44px+ taps), persistent selection, sticky "N selected · Clear · Add N labor lines" bar */
.lc-multi .lc-hit { min-height: 56px; gap: 10px; }
.lc-multi.lc-kbd .lc-hit.act { box-shadow: inset 3px 0 0 var(--primary); background: var(--bg-hover); outline: 1px dashed var(--text-muted); outline-offset: -2px; }
.lc-multi .lc-hit.on { background: color-mix(in srgb, var(--primary) 14%, transparent); }
.lc-cb { flex: none; width: 24px; height: 24px; border: 2px solid var(--text-muted); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); }
.lc-hit.on .lc-cb { background: var(--primary); border-color: var(--primary); }
.lc-hit.on .lc-cb::after { content: ''; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.lc-main strong, .lc-main .card-meta { overflow-wrap: anywhere; }
.lc-ontk { align-self: flex-start; margin-top: 3px; font-size: .74rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--yellow); color: #1f1300; }
.lc-reshead { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 4px; border-bottom: 1px solid var(--border); }
.lc-reshead .link-btn { min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; }
.lc-bar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px -10px -10px; padding: 10px; border-top: 1px solid var(--border); background: var(--bg-elev); border-radius: 0 0 10px 10px; }
.lc-bar-l { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.lc-n { font-size: .95rem; }
.lc-has-sel .lc-n { color: var(--text); }
.lc-selcodes { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-bar-r { display: flex; gap: 8px; flex: 0 1 auto; margin-left: auto; }
.lc-bar .btn { min-height: 44px; }

.lab-multi-note { margin: 0 0 10px; }
@media (max-width: 899px) { .view .lc-bar { bottom: calc(var(--nav-h) + var(--safe-b)); } } /* doc page: above the fixed bottom nav */
@media (max-width: 480px) {
  .lc-multi .lc-code { min-width: 0; width: 64px; flex: none; font-size: .85rem; overflow-wrap: anywhere; }
  .lc-multi .lc-hit { padding: 8px 6px; gap: 8px; }
  .lc-multi .lc-main .card-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line of system · job type · complaint keeps rows short */
  .modal .lc-multi .lc-results { max-height: 46vh; }
  .lc-bar-r { width: 100%; } .lc-bar-r .btn { flex: 1; } .lc-bar-r .btn-primary { flex: 2; }
  .lc-row select { flex: 1 1 120px; min-width: 0; }
}
.lc-edit { padding: 10px 8px 14px; border-bottom: 1px solid var(--border); }
.lc-flags { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0; }
.lc-flags label, .lc-inuse { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.lc-admin-list { margin-bottom: 10px; }
.hm-meter + .hm-meter { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* Inline add-vendor in popups */
.vendor-pick { display: flex; gap: 8px; align-items: stretch; }
.vendor-pick select { flex: 1; min-width: 0; }
.vendor-pick .btn { white-space: nowrap; }
.quick-vendor { margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--bg-elev); }
.qv-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Structured address fields */
.addr-fields { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 2px; margin: 0 0 12px; }
.addr-fields legend { padding: 0 6px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.addr-csz { display: grid; grid-template-columns: 2fr 0.8fr 1.2fr; gap: 8px; }
.addr-csz .addr-state { text-transform: uppercase; }
@media (max-width: 420px) { .addr-csz { grid-template-columns: 1fr 1fr; } .addr-csz .field:first-child { grid-column: 1 / -1; } }
/* Clickable dashboard tiles + "Showing: …" filter banner */
button.pulse-stat { font: inherit; color: inherit; width: 100%; cursor: pointer; min-height: 44px; }
.pulse-link:hover, .pulse-link:focus-visible { border-color: var(--primary); }
.pulse-stat.active { outline: 2px solid var(--primary); outline-offset: -2px; }
.smart-filter { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--primary); border-radius: 10px; margin-bottom: 8px; background: var(--bg-elev); }
.smart-filter .btn { min-height: 40px; }
.req-actions { white-space: nowrap; }
.req-actions .btn { margin: 2px; min-height: 44px; }
/* v1.11 Back button: first item of the desktop top bar; on phones a header button (hidden until there is somewhere to go back to) */
.bottom-nav .nav-back { display: none; }
.hdr-back { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0 2px 0 -6px; border-radius: 10px; color: #e5e5e5; background: transparent; }
.hdr-back svg.i { width: 26px; height: 26px; stroke-width: 2.25; }
.hdr-back:active { background: #2a2a2a; }
.hdr-back.nav-back-off { display: none; }
@media (min-width: 900px) {
  .hdr-back { display: none !important; }
  .bottom-nav .nav-back { display: flex; min-width: 72px; border-right: 1px solid #2a2a2a; }
  .bottom-nav .nav-back.nav-back-off { opacity: 0.35; cursor: default; background: none; }
}
@media (max-width: 520px) { /* 4 PO tabs: 2 × 2 on phones so none hide off-screen */
  #pos-toolbar .seg-tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  #pos-toolbar .seg-tab { padding: 0 6px; }
}

/* ===== v1.11 Customer page = RepairShopr customer Overview (left column + right column; phone stacks left then right) ===== */
#view-customers.cust-page-mode > .view-toolbar { display: none; }
.cp-head .dp-title .cp-sub { font-weight: 500; color: var(--text-muted); }
.cp-menu { position: relative; } .cp-menu > summary { list-style: none; cursor: pointer; } .cp-menu > summary::-webkit-details-marker { display: none; }
.cp-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.cp-menu-list .btn { justify-content: flex-start; width: 100%; min-height: 44px; }
.cp-tabs-rs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin: 4px 0 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cp-tab { flex: 0 0 auto; min-height: 44px; padding: 0 14px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; color: var(--text-muted); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cp-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.cp-grid { display: grid; grid-template-columns: minmax(300px, 360px) 1fr; gap: 14px; align-items: start; }
.cp-left, .cp-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cp-sec { margin: 0; } .cp-sec .dp-bh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-acts { display: inline-flex; align-items: center; gap: 8px; } .cp-acts .btn-sm, .cp-btns .btn-sm, .cp-pager .btn-sm { min-height: 44px; }
.cp-empty { padding: 6px 0; }
.cp-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.cp-kv:last-child { border-bottom: 0; } .cp-kv > span:first-child { color: var(--text-muted); flex: 0 0 auto; } .cp-kv > span:last-child { text-align: right; overflow-wrap: anywhere; }
.cp-bal { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; } .cp-bal strong { font-size: 1.5rem; } .cp-bal.cp-total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.cp-btns { display: flex; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.cp-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; } .cp-counts .lbl { font-size: .72rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.cp-cnt { display: flex; justify-content: space-between; font-size: .9rem; padding: 2px 0; }
.cp-notes { white-space: pre-wrap; font-size: .92rem; }
.cp-aging { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 4px; }
.cp-ag { background: var(--bg-hover); border-radius: 8px; padding: 6px; text-align: center; } .cp-ag .lbl { font-size: .72rem; color: var(--text-muted); } .cp-ag .val { font-weight: 700; font-size: .8rem; }
.cp-ag.bad { background: var(--red-dim); color: #fecaca; }
.cp-cf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; font-size: .9rem; } .cp-cf-grid > div { overflow-wrap: anywhere; }
.cp-table tbody tr.cp-row { cursor: pointer; } .cp-table tbody tr.cp-row:hover { background: var(--bg-hover); } .cp-table td .badge { white-space: nowrap; }
.cp-more { width: 100%; min-height: 44px; margin-top: 6px; }
.cp-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
button.cp-row { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 56px; }
@media (max-width: 900px) {
  .cp-grid { grid-template-columns: 1fr; }
  .cp-head .dp-actions { flex-wrap: nowrap; } .cp-head .dp-actions > .btn, .cp-head .cp-menu { flex: 1 1 0; } .cp-head .cp-menu > summary { width: 100%; justify-content: center; }
  .cp-aging { grid-template-columns: repeat(3, 1fr); }
}
.doc-out-opts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; padding: 6px 10px; border: 1px dashed var(--border); border-radius: 8px; }
.doc-out-opts .check-row { min-height: 44px; }

/* v1.11 customer approval banner (estimates & Repair Orders) */
.appr-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; padding: 10px 14px; border-radius: 10px;
  background: var(--green-dim); border: 1px solid var(--green); color: #dcfce7; }
.appr-banner .i { width: 20px; height: 20px; flex: none; }
.appr-banner span { flex: 1 1 240px; }
.appr-banner .btn { min-height: 44px; }
#ap-by[readonly] { background: var(--bg-hover); color: var(--text-muted); }
.pr-approved { color: #14532d; font-weight: 600; }
.appr-go { font-weight: 800; letter-spacing: 0.04em; }
.appr-done { cursor: default; gap: 6px; }
.appr-done .i { width: 14px; height: 14px; }

/* v1.11 job links (Estimate ↔ Repair Order ↔ Invoice) */
.jl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--border); }
.jl-row:first-of-type { border-top: 0; }
.jl-label { flex: 0 0 120px; color: var(--text-muted); font-size: 0.85rem; }
.jl-open { flex: 1 1 200px; min-height: 44px; text-align: left; background: none; color: var(--accent); font-weight: 700; text-decoration: underline; padding: 0 4px; }
.jl-none { flex: 1 1 200px; }
.jl-acts { display: flex; gap: 6px; }
.jl-acts .btn { min-height: 44px; }
.jl-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto; }
.jl-pick { min-height: 44px; text-align: left; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text); }
.jl-pick:hover, .jl-pick:focus-visible { background: var(--bg-hover); }

/* v1.11 Repair Order full page (reuses the estimate / invoice page layout) */
.ro-page .ro-machine { margin: 8px 0; }
.ro-page .ro-notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ro-page .ro-notes-grid .field { margin: 0; }
.ro-page .dropoff-banner { margin: 8px 0; }
.ro-page .ro-totals { max-width: 420px; margin: 10px 0 0 auto; }
.ro-page .dp-bh .btn { min-height: 44px; }
@media (max-width: 900px) { .ro-page .ro-notes-grid { grid-template-columns: 1fr; } }

/* v1.11 asset photos + edit form */
.asset-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.asset-thumb { width: 64px; height: 64px; min-height: 44px; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--bg) center / cover no-repeat; }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-row .asset-edit { float: right; min-height: 44px; }
.as-prop { display: flex; gap: 6px; margin-bottom: 6px; }
.as-prop input { flex: 1 1 0; min-width: 0; min-height: 44px; }
.as-prop .btn { flex: none; min-height: 44px; }

/* ===== v1.11 product photos + product page (RepairShopr Product Detail) ===== */
.pthumb { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.pthumb-none { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-hover); color: var(--text-muted); }
.inv-item .li-thumb { margin-right: 10px; align-self: center; }
.spick-opt:has(.spick-img) { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; align-items: center; }
.spick-opt:has(.spick-img) .spick-img { grid-row: span 2; width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; }
#view-inventory.inv-page-mode > .view-toolbar { display: none; }
.pd-head .pd-title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; } .pd-hthumb { width: 64px; height: 64px; flex-basis: 64px; }
.pd-sec { margin: 0 0 14px; } .pd-sh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; text-transform: uppercase; font-size: .82rem;
  letter-spacing: .03em; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 2px solid var(--accent); }
.pd-acts { display: inline-flex; gap: 8px; align-items: center; text-transform: none; font-weight: 500; } .pd-acts .btn-sm { min-height: 44px; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; } .pd-col { min-width: 0; }
.pd-details textarea { width: 100%; } .pd-help { margin-top: 4px; }
.pd-check { min-height: 44px; } .pd-flags { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 18px; align-items: start; margin-bottom: 10px; }
.pd-qty { display: flex; flex-direction: column; gap: 2px; } .pd-qty strong { font-size: 1.3rem; }
.pd-save { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 10px; }
.pd-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pd-ph { border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; } .pd-ph.primary { border-color: var(--accent); }
.pd-ph-img { background: #fff; border: 0; border-radius: 8px; padding: 0; height: 140px; cursor: zoom-in; } .pd-ph-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-ph-cap { font-size: .8rem; color: var(--text-muted); } .pd-ph-acts { display: flex; gap: 4px; } .pd-ph-acts .btn { flex: 1; min-height: 44px; padding: 0 6px; }
.pd-table input { width: 90px; text-align: right; min-height: 40px; } .pd-row { cursor: pointer; } .pd-row:hover { background: var(--bg-hover); }
.pd-more { width: 100%; min-height: 44px; margin-top: 6px; } .pd-empty { padding: 6px 0; }
.prod-label { width: 2.25in; height: 1.25in; border: 1px dashed #999; padding: .08in; box-sizing: border-box; color: #000; background: #fff; display: flex; flex-direction: column; justify-content: space-between; font-family: Arial, sans-serif; }
.pl-name { font-weight: 700; font-size: 10pt; line-height: 1.15; overflow: hidden; max-height: 3.5em; } .pl-sku { font-family: ui-monospace, Menlo, monospace; font-size: 11pt; font-weight: 700; }
.pl-row { display: flex; justify-content: space-between; align-items: baseline; } .pl-price { font-size: 14pt; font-weight: 800; } .pl-loc { font-size: 8pt; }
@media print { .prod-label { border: 0; } .no-print { display: none !important; } }
@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-head .dp-actions .btn { flex: 1 1 calc(50% - 8px); }
}

/* v1.11 machine (asset) page + QR label */
.ap-meter { padding: 4px 12px 8px; font-size: 1.15rem; }
.ap-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px; border-top: 1px solid var(--line, #e5e7eb); }
.ap-link a { overflow-wrap: anywhere; }
.asset-page .asset-thumbs { padding: 4px 12px 10px; }
.asset-label { flex-direction: row; gap: 0.08in; align-items: center; justify-content: flex-start; }
.asset-label .pl-name { font-size: 9pt; } .asset-label .pl-sku { font-size: 8pt; }
.asset-label .al-qr { width: 1.05in; height: 1.05in; flex: none; }
.asset-label .al-qr svg { width: 100%; height: 100%; display: block; }
.asset-label .al-txt { min-width: 0; font-size: 7pt; line-height: 1.2; }
.asset-label .al-cust { font-weight: 600; }
.asset-label .al-shop { margin-top: 2px; }

/* v1.11 batch 13: scanning, labels with barcodes, kits, cycle counts */
.mono { font-family: ui-monospace, Menlo, monospace; }
.chk-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.chk-row input { width: 22px; height: 22px; }
.scan-box { margin: 6px 0 10px; }
.scan-cam { position: relative; background: #111; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; max-height: 52vh; }
.scan-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-aim { position: absolute; left: 10%; right: 10%; top: 34%; bottom: 34%; border: 3px solid rgba(255,255,255,.85); border-radius: 8px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.scan-state { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; color: #fff; font-size: .9rem; text-shadow: 0 1px 2px #000; }
.scan-nocam .scan-cam { aspect-ratio: auto; min-height: 64px; display: flex; align-items: center; }
.scan-nocam .scan-aim { display: none; }
.scan-nocam .scan-state { position: static; padding: 12px; }
.scan-manual { display: flex; gap: 8px; margin-top: 8px; }
.scan-manual input { flex: 1; min-height: 48px; font-size: 1.05rem; }
.scan-manual .btn { min-height: 48px; min-width: 64px; }
.scan-last { min-height: 26px; margin-top: 6px; font-weight: 600; }
.scan-ok { color: #15803d; } .scan-bad { color: #b91c1c; }
.ci-scan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.ci-scan .scan-box, .ci-scan .scan-last { flex: 1 1 100%; }
.cc-hit { animation: cchit .9s ease-out; }
@keyframes cchit { from { background: var(--accent-dim); } to { background: transparent; } } /* t273u: was a fixed light yellow under theme text */
.pl-bc { text-align: center; } .pl-bc .bc128 { width: 100%; display: block; } .pl-code { font-family: ui-monospace, Menlo, monospace; font-size: 7pt; line-height: 1; }
.prod-label-sheet .prod-label + .prod-label { margin-top: 8px; }
@media print { .prod-label { page-break-after: always; break-after: page; } .prod-label-sheet .prod-label + .prod-label { margin-top: 0; } }
.pl-opts { display: grid; grid-template-columns: 1fr 120px; gap: 10px; margin-top: 10px; }
.stock-page .dp-top { flex-wrap: wrap; }
.kp-q { width: 100%; min-height: 48px; font-size: 1.05rem; margin: 6px 0 10px; }
.kp-list, .kit-list, .cc-list { display: flex; flex-direction: column; gap: 8px; }
.kp-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; min-height: 56px; padding: 10px 14px; text-align: left; border: 1px solid var(--line, #d6d3d1); border-radius: 10px; background: var(--card, #fff); color: inherit; cursor: pointer; }
.kp-row:hover { border-color: var(--primary); }
.kp-name { font-weight: 700; font-size: 1.02rem; }
.kit-line { display: flex; align-items: center; gap: 8px; min-height: 48px; border-bottom: 1px solid var(--line, #e7e5e4); }
.kit-l { flex: 1; min-width: 0; }
.kit-qty { width: 80px; min-height: 44px; text-align: right; }
.kit-rm { min-width: 44px; min-height: 44px; }
.kit-lc { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.cc-tools { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.cc-tools input { flex: 1; min-height: 48px; font-size: 1.05rem; }
.cc-filters { margin: 6px 0 8px; }
.cc-lines { display: flex; flex-direction: column; }
.cc-line { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line, #e7e5e4); border-left: 4px solid transparent; }
.cc-line.cc-ok { border-left-color: #16a34a; } .cc-line.cc-diff { border-left-color: #f59e0b; }
.cc-info { flex: 1; min-width: 0; } .cc-name { font-weight: 600; overflow-wrap: anywhere; }
.cc-qty { display: flex; align-items: center; gap: 4px; flex: none; }
.cc-step { min-width: 48px; min-height: 48px; font-size: 1.3rem; padding: 0; }
.cc-in { width: 76px; min-height: 48px; font-size: 1.2rem; text-align: center; }
.cc-sumgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 8px; }
.cc-sumgrid > div { display: flex; flex-direction: column; } .cc-sumgrid strong { font-size: 1.3rem; }
.cc-sum .btn-lg { width: 100%; margin-top: 6px; }
@media (max-width: 600px) {
  .cc-line { flex-wrap: wrap; } .cc-qty { margin-left: auto; }
  #view-inventory .view-toolbar #btn-inv-scan { order: -1; }
}

/* v1.11 batch 13: Chemical Mixing */
.mix-list { display: grid; gap: 10px; margin-top: 10px; }
.mix-card { padding: 14px; }
.mix-main { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.mix-info { flex: 1 1 260px; min-width: 0; }
.mix-name { font-size: 1.05rem; }
.mix-recipe { margin-top: 4px; }
.mix-nums { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.mix-nums > div { display: flex; flex-direction: column; }
.mix-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mix-acts .btn { min-height: 44px; }
.rc-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto 44px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border, #333); }
.rc-row .rc-qty { min-height: 44px; }
.rc-row .rc-rm { min-width: 44px; min-height: 44px; }
.rc-name { min-width: 0; overflow-wrap: anywhere; }
.rc-addbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; }
.rc-addbar .field { flex: 1 1 260px; margin: 0; }
.rc-addbar > .btn { min-height: 44px; }
.rc-newraw { margin-top: 8px; padding: 12px; }
#nav-more-sheet #more-mix { border-top: 1px solid var(--border, #333); }
@media (max-width: 600px) {
  .rc-row { grid-template-columns: minmax(0, 1fr) 80px 44px; }
  .rc-row .rc-unit { grid-column: 1 / -1; grid-row: 2; margin-top: -4px; }
}

/* v1.11 batch 14: daily counts, approvals, shrink report */
.today-count { padding: 14px; margin-bottom: 12px; border-left: 4px solid var(--accent, #e53935); }
.tc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 1.05rem; }
.tc-head .card-meta { margin-left: auto; }
.tc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border, #333); }
.tc-row > div { flex: 1; min-width: 0; }
.tc-row .btn { min-height: 48px; min-width: 120px; }
.tc-bar { height: 6px; border-radius: 3px; background: var(--bg-hover); margin-top: 6px; overflow: hidden; }
.tc-bar span { display: block; height: 100%; background: #2e7d32; }
.dc-blind { margin: 6px 0 10px; }
.dc-list { display: grid; gap: 8px; margin-top: 10px; }
.dc-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text); }
.dc-line.dc-done { background: var(--bg-elev); border-left: 4px solid var(--border); } /* t273u: was a fixed #1d1d1d row (dark text vanished on light themes) + opacity .85 */
.dc-info { flex: 1; min-width: 0; }
.dc-name { font-weight: 700; overflow-wrap: anywhere; }
.dc-why { color: var(--warm-ink); }
.dc-qty { display: flex; align-items: center; gap: 6px; }
.dc-qty .dc-in { width: 76px; min-height: 48px; text-align: center; font-size: 1.15rem; font-weight: 700; }
.dc-res-qty { font-size: 1.2rem; font-weight: 700; min-width: 48px; text-align: center; }
.dc-foot { position: sticky; bottom: calc(var(--nav-h, 0px) + 8px); margin-top: 14px; display: flex; justify-content: flex-end; }
.dc-foot .btn { min-height: 52px; min-width: 200px; }
.ap-line { padding: 14px; margin-top: 10px; }
.ap-top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.ap-nums { display: flex; flex-wrap: wrap; gap: 16px; }
.ap-nums > div { display: flex; flex-direction: column; }
.ap-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.ap-form select, .ap-form input { min-height: 44px; flex: 1 1 200px; }
.ap-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-btns .btn { min-height: 44px; }
.sh-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0 12px; }
.sh-filters .field { margin: 0; flex: 1 1 150px; }
.sh-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-quick .btn { min-height: 44px; }
.sh-tot { margin-bottom: 12px; }
.acs-chips { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.acs-users-lbl { flex-basis: 100%; margin-top: 6px; }
@media (max-width: 600px) {
  .dc-line { flex-wrap: wrap; }
  .dc-qty { margin-left: auto; }
  .dc-foot .btn { width: 100%; }
  .tc-row .btn { min-width: 100px; }
}
.dc-in, .cc-in, .ap-form select, .ap-form input { padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
@media (max-width: 600px) { .dc-name { font-size: .95rem; font-weight: 600; } .dc-qty .dc-in { width: 64px; } }

/* v1.11 batch 15: negative stock — stock alerts card, owed to customers, fill dialog */
.stock-alerts { padding: 14px; margin-bottom: 12px; border-left: 4px solid #f59e0b; }
.ow-table td, .neg-table td { vertical-align: middle; }
.ow-row .btn, .ow-row .link-btn { min-height: 44px; }
.neg-row { cursor: pointer; }
.ow-fill-table select, .ow-fill-table input { min-height: 44px; width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; }
.ow-fill-table input { max-width: 110px; text-align: right; }
.owed-banner .btn { min-height: 44px; margin-left: 8px; }
.mm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 12px; }
.mm-tools input[type="search"] { flex: 1; min-width: 220px; min-height: 44px; padding: 0 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.mm-table input[type="number"] { width: 84px; min-height: 44px; text-align: right; padding: 0 8px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.mm-table input[type="checkbox"], #mm-all { width: 24px; height: 24px; }
.mm-table .btn, .mm-table .link-btn { min-height: 44px; }
.mm-same { opacity: .7; }

/* v1.11 batch 15: drop-ship board */
.ds-board { display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; }
.ds-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-height: 120px; }
.ds-col-h { font-weight: 700; font-size: .9rem; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ds-card { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.ds-card.ds-stuck { border-color: #e53935; box-shadow: inset 4px 0 0 #e53935; }
.ds-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.ds-cust { font-weight: 600; }
.ds-why { font-size: .85rem; }
.ds-card .btn, .ds-card .link-btn, .ds-btns .btn { min-height: 44px; }
.ds-track { font-weight: 600; word-break: break-all; }
.ds-steps { margin-top: 8px; }
.ds-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ds-empty { padding: 6px; }
.dl-ds { margin-top: 6px; }
.dl-dspo { display: inline-block; margin-top: 4px; }
@media (max-width: 900px) { .ds-board { grid-template-columns: 1fr; overflow-x: visible; } .ds-col { min-height: 0; } }

/* v1.11 batch 16: terms & reminders, upcoming statements */
.ar-mode { padding: 4px 0; }
.ar-mode input[type="radio"] { width: 22px; height: 22px; flex: none; }
.ar-modes { margin-bottom: 8px; }
.ar-next { margin: 6px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ar-next .btn, .ar-actions select, .aru-act .btn { min-height: 44px; }
.ar-actions select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; }
.ar-log-row { display: block; width: 100%; text-align: left; background: none; color: var(--text); border: 0; border-bottom: 1px solid var(--border); min-height: 44px; cursor: pointer; font: inherit; }
.aru-list { display: flex; flex-direction: column; gap: 8px; }
.aru-row { display: grid; grid-template-columns: 130px 1fr auto auto; gap: 12px; align-items: center; margin: 0; }
.aru-row.aru-skipped { opacity: .6; }
.aru-cust { font-weight: 700; min-height: 44px; text-align: left; }
.aru-inv { min-height: 44px; }
.aru-x { text-decoration: line-through; }
.aru-amt { font-weight: 700; text-align: right; }
.aru-held { margin-top: 12px; }
@media (max-width: 700px) {
  .aru-row { grid-template-columns: 1fr auto; }
  .aru-date { grid-column: 1; } .aru-amt { grid-column: 2; grid-row: 1; }
  .aru-main { grid-column: 1 / -1; } .aru-act { grid-column: 1 / -1; } .aru-act .btn { width: 100%; }
}

/* estimate filter: say what "Open" covers */
.chip-sub { margin-left: 4px; font-size: 0.72rem; opacity: 0.75; font-weight: 500; }

/* v1.11 batch 18: vendor price lists, Update Part Cost, several tracking numbers per PO, cost history */
.po-tracks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.po-track { display: inline-flex; align-items: center; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding-left: 8px; }
.po-track .icon-btn { min-width: 44px; min-height: 44px; }
.po-track-add { display: inline-flex; gap: 6px; flex: 1 1 220px; }
.po-track-add input { flex: 1; min-width: 0; min-height: 44px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; }
.po-track-add .btn { min-height: 44px; }
.pl-meta { display: grid; gap: 4px; margin-bottom: 8px; }
.pl-search { margin: 8px 0; }
.puc-pick { width: 24px; height: 24px; margin: 10px; accent-color: var(--primary); }
.puc-table td[data-label="Update"] { width: 48px; }
@media (max-width: 640px) {
  .po-track-add { flex-basis: 100%; }
  .puc-table td[data-label="Update"] { width: auto; }
}

/* v1.12 A/R search hit */
.ar-hit { font-size: .72rem; color: var(--accent, #f59e0b); font-weight: 600; }

.po-st-tabs { margin-bottom: 10px; }
/* v1.12 drop ship: per-line shipments + back-orders */
.ds-prog { font-size: .8rem; font-weight: 600; margin: 2px 0; }
.ds-shipments { margin: 6px 0; padding-left: 18px; font-size: .8rem; }
.ds-bo-row.ds-late td { color: #ef4444; }
.ds-bo-row.ds-late td:first-child { box-shadow: inset 4px 0 0 #e53935; }
.ds-ship-t input { width: 84px; min-height: 44px; }
.ds-ship-t input[type=date] { width: 150px; }
.badge-rolled { display: inline-block; margin-top: 3px; background: rgba(245,158,11,.18); color: var(--amber-ink, #b45309); font-size: .66rem; }
/* v1.12 RO time entries + labor time report */
.tl-wrap { margin-top: 12px; }
.tl-table .tl-pick { width: 30px; height: 30px; margin: 7px 0; accent-color: var(--accent, #e11d2e); }
.tl-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tl-acts .btn, .tl-table .btn { min-height: 44px; }
#tl-report, #owner-time-rep { min-height: 44px; }
.tr-tot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.tr-tot > div { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.tr-tot strong { font-size: 1.15rem; }
.tr-table .tr-row[data-tr-ro] { cursor: pointer; }
.warn-box { background: var(--amber-tint, rgba(245,158,11,.12)); border: 1px solid var(--amber-line, rgba(245,158,11,.5)); color: var(--amber-ink, #fcd34d); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-weight: 600; }
/* v1.12 recommended services */
.dl-decline { min-height: 36px; margin-right: 4px; white-space: nowrap; }
@media (pointer: coarse) { .dl-decline { min-height: 44px; } }
.rec-letter + .rec-letter { page-break-before: always; break-before: page; margin-top: 24px; }
.rec-letter .rec-asset { margin: 14px 0 4px; }
.rec-letter .rec-list { margin: 0 0 8px 20px; }
.rb-table .rb-pick { width: 28px; height: 28px; }
#btn-recs-bulk { min-height: 44px; }
/* v1.12 PressureSoft brand (product logo — the company logo stays in Admin → Company, prints and emails) */
.app-header .brand-mark { height: 34px; width: auto; flex-shrink: 0; margin-right: -4px; }
.app-header .brand-word { display: flex; align-items: center; margin: 0; line-height: 0; }
.app-header .brand-word img { height: 20px; width: auto; display: block; }
@media (max-width: 520px) { .app-header .brand-word img { height: 16px; } .app-header .brand-mark { height: 30px; } .app-header .logo.custom-logo { display: none; } }
.login-brand { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.login-ps-logo { width: 150px; max-width: 60%; height: auto; display: block; margin: 0 auto; }
.login-for { display: flex; align-items: center; justify-content: center; gap: 10px; }
/* v1.12 purchaser on estimates + linked invoice on the customer's estimates list */
.dp-pur { padding: 6px 0 2px; border-top: 1px dashed var(--border); margin-top: 4px; }
.dp-pur .field { margin-bottom: 6px; }
.dp-pur #doc-pur-new { padding: 8px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.pr-purchaser { margin-top: 6px; font-size: 0.92em; }
.cp-inv-link { font-weight: 600; }
/* v1.12 Accounting Export (QuickBooks IIF) */
.acct-tabs { margin-bottom: 12px; }
.acct-types { display: grid; gap: 6px; }
.acct-types .check-row { align-items: flex-start; font-weight: 400; }
.acct-types .check-row input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); }
.acct-check { padding: 10px 12px; border-radius: 8px; font-weight: 700; margin: 8px 0; }
.acct-check.ok { background: color-mix(in srgb, #16a34a 18%, transparent); color: #86efac; border: 1px solid #16a34a; }
.acct-check.bad { background: var(--red-dim); color: #fecaca; border: 1px solid var(--red); }
.acct-tot { width: 100%; border-collapse: collapse; margin: 8px 0; }
.acct-tot td { padding: 5px 6px; border-bottom: 1px solid var(--border); }
.acct-tot .num, .acct-day-table .num, .acct-hist .num { text-align: right; font-variant-numeric: tabular-nums; }
.acct-dl { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-days summary { cursor: pointer; font-weight: 700; padding: 8px 0; min-height: var(--tap); display: flex; align-items: center; }
.acct-day-table, .acct-hist, .acct-map-t { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.acct-day-table th, .acct-day-table td, .acct-hist th, .acct-hist td, .acct-map-t th, .acct-map-t td { padding: 5px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.acct-day-lines td { padding: 2px 6px 10px 18px; color: var(--muted); }
.acct-line { display: flex; justify-content: space-between; gap: 10px; font-size: 0.85rem; }
.acct-map-t input { width: 100%; min-width: 0; }
.acct-h { font-size: 0.95rem; margin: 16px 0 6px; }
@media (max-width: 700px) {
  .acct-map-t thead { display: none; }
  .acct-map-t tr { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .acct-map-t td { border: 0; padding: 0; }
  .acct-hist thead { display: none; }
  .acct-hist tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .acct-hist td { border: 0; padding: 0; }
  .acct-day-table { font-size: 0.82rem; }
}
.acct-types .check-row, .acct-types .check-row span { text-transform: none; letter-spacing: normal; font-size: 0.95rem; color: var(--text); }
/* v1.12 Equipment ready — notify customer */
.rn-head { margin-bottom: 10px; }
.rn-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.rn-opt { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; border: 1px solid var(--border); border-radius: 10px; padding: 6px; cursor: pointer; text-align: center; font-weight: 700; }
.rn-opt input { width: 20px; height: 20px; accent-color: var(--primary); }
.rn-opt span { display: flex; flex-direction: column; }
.rn-opt small { font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.rn-opt:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, transparent); }
.rn-opt.disabled { opacity: 0.55; cursor: not-allowed; }
.rn-optin { margin: -2px 0 10px; }
.rn-sec h4 { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font-size: 0.95rem; }
@media (max-width: 520px) { .rn-opts { grid-template-columns: repeat(2, 1fr); } }
/* v1.12 estimate follow-ups */
.follow-actions .fu-done { font-weight: 700; }
.fu-hist { margin-top: 12px; max-height: 240px; overflow: auto; }
.cp-fu-last { cursor: pointer; text-decoration: underline dotted; }
/* v1.12 Admin → Asset Types */
.at-row .adm-count { min-width: 84px; text-align: right; }
.at-row .at-group { max-width: 150px; }
/* v1.12 Recommended services: banner, row actions, report, Avery 5160 labels */
.rec-banner { border-left: 4px solid var(--amber, #f59e0b); padding: 10px 14px; margin: 10px 0; }
.rec-banner summary { cursor: pointer; }
.rec-bline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.rec-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rr-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.rr-wrap { max-height: 50vh; overflow: auto; }
.rr-table td { vertical-align: top; }
.rr-acts { margin-top: 8px; }
.rbe-prev .pd-body { white-space: pre-wrap; }
.pr-recs .rec-list { margin: 4px 0 0 18px; }
.av-sheet { width: 8.5in; padding: 0.5in 0.1875in 0; display: grid; grid-template-columns: repeat(3, 2.625in); grid-auto-rows: 1in; column-gap: 0.125in; background: #fff; color: #000; box-sizing: border-box; }
.av-lab { padding: 0.08in 0.15in; font-size: 10pt; line-height: 1.2; overflow: hidden; }
@media print { .av-sheet { page-break-after: always; margin: 0; } }
/* Batch 19: company logo shown at the top of the email preview */
.em-logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--border, #ddd); border-radius: 8px; background: #fff; color: #111; }
.em-logo img { max-height: 44px; max-width: 180px; object-fit: contain; }
.em-logo .card-meta { color: #555; }
/* Batch 19: liquid / density block on the product page; lb/gal unit picker in recipe rows */
.pd-liq { padding: 10px 12px; margin: 6px 0 10px; }
.pd-liq .pd-perunit { margin-top: 4px; font-weight: 600; }
.rc-row .rc-u { min-height: 44px; width: auto; padding: 4px 8px; }
/* Batch 19: always-visible Log out next to who's signed in; Forgot password */
.logout-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 4px 12px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; justify-content: center; }
.logout-btn:hover, .logout-btn:focus-visible { border-color: var(--primary); color: #fff; }
@media (max-width: 640px) { .logout-btn span { display: none; } .logout-btn { padding: 4px 10px; } }
@media (max-width: 400px) { .user-chip { display: inline-flex; padding: 4px 8px; } .user-chip .uc-name { max-width: 80px; font-size: 0.75rem; } }
.login-forgot { display: block; margin: 10px auto 0; min-height: 44px; }
.fp-preview { margin-top: 10px; padding: 10px; border: 1px dashed #facc15; border-radius: 8px; font-size: 0.85rem; text-align: left; }
.fp-preview pre { white-space: pre-wrap; word-break: break-all; font: inherit; margin: 6px 0; }
.uf-pass-row { display: flex; gap: 8px; } .uf-pass-row input { flex: 1; min-width: 0; } .uf-pass-row .btn { min-height: 44px; }
.tp-pass { font-family: ui-monospace, Menlo, monospace; font-size: 1.1rem; user-select: all; }
/* Batch 19 C: Rentals — check out / return checklists */
#rentals-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#rentals-toolbar .search-wrap { flex: 1 1 260px; }
.rn-st { margin-left: 6px; } .rn-out { background: #2563eb; color: #fff; } .rn-reserved { background: #6b7280; color: #fff; } .rn-returned { background: #16a34a; color: #fff; }
.rn-cancelled { background: #3f3f46; color: #ddd; } .rn-late { background: var(--primary-fill); color: var(--on-primary); }
.rn-check { display: flex; flex-direction: column; gap: 6px; }
.rn-ci { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(120px, 0.6fr); gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.rn-ci.rn-issue { border-color: var(--primary); }
.rn-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rn-seg .seg-btn { min-height: 44px; min-width: 52px; padding: 0 10px; background: transparent; color: var(--text); border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.rn-seg .seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.rn-seg .seg-btn.active[data-v="ok"] { background: #16a34a; color: #fff; } .rn-seg .seg-btn.active[data-v="issue"] { background: var(--primary-fill); color: var(--on-primary); } .rn-seg .seg-btn.active[data-v="na"] { background: #52525b; color: #fff; }
.rn-ci-note { min-height: 44px; }
.rn-ci-all { margin: 6px 0 10px; }
.rn-terms { white-space: pre-wrap; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px; margin: 8px 0; }
.rn-agree { align-self: end; min-height: 44px; }
.rn-sum { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.rn-pill { font-size: 0.72rem; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); } .rn-pill.rn-issue { border-color: var(--primary); color: #fca5a5; } .rn-pill.rn-ok { border-color: #16a34a; }
.rn-head { margin-bottom: 8px; }
.print-ro .rn-box { min-height: 34px; border: 1px solid #ccc; border-radius: 4px; padding: 6px; white-space: pre-wrap; }
.print-ro .rn-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.print-ro .rn-sigline { border-bottom: 1px solid #333; min-height: 26px; padding: 4px 0; font-family: 'Brush Script MT', cursive; font-size: 1.1rem; }
@media (max-width: 640px) { .rn-ci { grid-template-columns: 1fr; } .rn-seg { width: 100%; } .rn-seg .seg-btn { flex: 1; } }
.user-chip .uc-ini { display: none; font-weight: 800; font-size: 0.85rem; }
@media (max-width: 440px) { .user-chip { min-width: 44px; min-height: 44px; align-items: center; padding: 4px 6px; } .user-chip .uc-name { display: none; } .user-chip .uc-ini { display: inline; } .logout-btn { padding: 4px 8px; } }
.er-job .seg-tab { flex: 1 1 0; min-height: 44px; }
.verify-banner.est-to-ro, .verify-banner.ro-from-est { background: rgba(37, 99, 235, 0.12); border-color: rgba(59, 130, 246, 0.5); color: var(--text); }
/* v1.12 Rental Fleet */
.rn-tabs { flex: 1 1 100%; max-width: 420px; }
.rn-tabs .seg-tab { flex: 1 1 0; min-height: 44px; }
.fl-sum { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 4px 0 10px; }
.fl-sum .btn { margin-left: auto; }
.fl-types { margin-bottom: 8px; }
.fl-row, .fl-bk { cursor: pointer; }
.fl-bk { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; color: var(--text); font: inherit; min-height: 44px; }
.rcal-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.rcal-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 10px; }
.rcal { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 0.8rem; }
.rcal th, .rcal td { border: 1px solid var(--border); padding: 0; height: 44px; min-width: 44px; text-align: center; }
.rcal thead th { font-weight: 600; color: var(--muted); padding: 4px 2px; }
.rcal thead th.rcal-today { color: var(--text); background: color-mix(in srgb, var(--primary) 20%, transparent); }
.rcal .rcal-u { position: sticky; left: 0; z-index: 1; background: var(--card, var(--bg)); text-align: left; padding: 4px 8px; min-width: 150px; max-width: 190px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcal-free { cursor: pointer; } .rcal-free:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.rcal-past { background: rgba(255, 255, 255, 0.03); cursor: default; } .rcal-oos { background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 255, 255, 0.06) 6px 12px); cursor: not-allowed; }
.rcal-b { cursor: pointer; color: #fff; text-align: left !important; white-space: nowrap; overflow: visible; }
.rcal-b span { display: inline-block; padding: 0 4px; font-weight: 600; position: relative; z-index: 0; }
.rcal-reserved { background: #6b7280; } .rcal-out { background: #2563eb; } .rcal-late { background: var(--primary); } .rcal-returned { background: #166534; }
.rn-charges strong.warn-text { color: var(--primary); }
@media (max-width: 640px) { .rcal .rcal-u { min-width: 110px; max-width: 120px; } .fl-sum .btn { margin-left: 0; } }
.rcal { table-layout: fixed; } .rcal th, .rcal td { width: 52px; } .rcal .rcal-u { width: 170px; }
.rcal-b { position: relative; } .rcal-b span { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); z-index: 2; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
@media (max-width: 640px) { .rcal .rcal-u { width: 116px; } }
/* b19 nightly backups */
.bk-list { display: flex; flex-direction: column; border: 1px solid var(--line, #e3e3e3); border-radius: 8px; margin: 8px 0 12px; max-height: 420px; overflow: auto; }
.bk-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-top: 1px solid var(--line, #eee); }
.bk-row:first-child { border-top: 0; }
.bk-nm { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.bk-sz { color: var(--muted, #666); font-size: 13px; white-space: nowrap; }
.bk-warn { background: #fdecea; color: #8a1c1c; border-radius: 6px; padding: 8px 10px; margin: 6px 0; font-size: 14px; }
/* b19 discount approval */
.form-err { background: #fdecea; color: #8a1c1c; border-radius: 6px; padding: 8px 10px; margin-top: 8px; font-size: 14px; }
/* b19 Admin › Reports */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rep-card { display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; font: inherit; color: inherit; margin: 0; }
.rep-card:hover { border-color: var(--primary, #d71920); }
.rep-wrap { max-height: 62vh; overflow: auto; }
.rep-table td.num, .rep-table th.num { text-align: right; white-space: nowrap; }

/* UX batch 2: APPROVE = white with green border/text; Approved = solid green */
.btn.appr-go { background: #fff; color: #15803d; border: 2px solid #16a34a; font-weight: 800; letter-spacing: .02em; }
.btn.appr-go:hover { background: #f0fdf4; }
.btn.appr-done { background: #16a34a; color: #fff; border: 2px solid #16a34a; }
/* More ▾ menus in page action bars */
.dp-actions .more-menu > summary { min-height: var(--tap); }
@media (max-width: 760px) {
  .dp-actions .more-menu { flex: 1 1 calc(50% - 8px); display: flex; }
  .dp-actions .more-menu > summary { width: 100%; justify-content: center; }
  .dp-actions .more-menu .cp-menu-list { left: auto; right: 0; min-width: 220px; }
}

/* Board: search + tech filter; phone = one stage at a time with tabs */
.board-search { flex: 1 1 200px; min-width: 160px; max-width: 340px; min-height: 40px; }
.board-tech { flex: 0 1 200px; min-height: 40px; padding: 8px 10px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.board-stage-tabs { display: none; }
@media (max-width: 760px) {
  .board-stage-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 8px 12px; gap: 6px; background: var(--bg-elev); border-bottom: 1px solid var(--border); scrollbar-width: none; }
  .board-stage-tabs .chip { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
  .board-stage-tabs .chip .stage-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stc); display: inline-block; }
  .board-stage-tabs .chip .count { font-weight: 800; opacity: .85; }
  .board-scroll.staged .board-col:not(.m-cur) { display: none; }
  .board-scroll.staged .board-col { flex: 1 1 100%; max-width: 100%; }
  .board-search { flex: 1 1 100%; max-width: none; min-height: 44px; }
  .board-tech { flex: 1 1 0; min-height: 44px; }
}

/* Inventory: Adjust/Transfer (not the old −/+); phone folds the filter chips behind a Filters button */
.qty-edit .qty-num { font-weight: 800; font-size: 1.1rem; min-width: 2.5ch; text-align: right; }
.qty-edit .inv-adj,
.qty-edit .inv-xfer { width: auto; height: auto; min-height: 40px; padding: 0 12px; font-size: .9rem; font-weight: 600; margin-left: 6px; }
.sa-step { display: flex; gap: 6px; align-items: stretch; } .sa-step input { flex: 1; text-align: center; font-weight: 700; min-width: 0; } .sa-step .btn { min-width: 48px; font-size: 1.2rem; }
.sa-preview { font-size: 1.05rem; margin: 4px 0 10px; }
.inv-filter-panel { display: contents; }
.inv-filter-btn { display: none; }
@media (max-width: 760px) {
  .inv-filter-btn { display: inline-flex; min-height: 44px; }
  .inv-filter-panel { display: none; width: 100%; flex-direction: column; gap: 8px; order: 10; }
  .inv-filter-panel.open { display: flex; }
  .qty-edit .inv-adj,
  .qty-edit .inv-xfer { min-height: 44px; }
}

/* PO action bar: Receive ▾ opens to the right; More ▾ to the left */
.cp-menu.menu-left .cp-menu-list { left: 0; right: auto; min-width: 250px; }
.cp-menu-list .btn span { text-align: left; line-height: 1.25; }
.danger-text { color: var(--red) !important; }
.action-bar > .btn, .action-bar > .cp-menu > summary { min-height: var(--tap); }
@media (max-width: 760px) { .action-bar > .btn, .action-bar > .cp-menu { flex: 1 1 calc(50% - 8px); } .action-bar > .cp-menu > summary { width: 100%; justify-content: center; } }

/* Reports home */
.rep-h { font-size: 1.2rem; margin: 4px 0 12px; } .rep-sub { margin: 18px 0 8px; }
.owner-rep-btn { min-height: 40px; margin-left: 8px; }

/* menu badges: More shows a dot; the More sheet says what each number means */
.nav-badge.nav-dot { min-width: 10px; width: 10px; height: 10px; padding: 0; border-radius: 50%; }
.nav-lbl-wrap { display: flex; flex-direction: column; line-height: 1.2; }
.nav-more-sheet .nav-badge-why { font-size: .72rem; color: var(--text-muted); font-weight: 500; }

/* customer type: one calm outline badge, only when not Hotsy-only */
/* UX batch 2: Sewer Cable customer badge — one shared style everywhere: bold orange text, black border, light fill */
.badge.badge-cust-type { background: #fff7ed; color: #c2410c; border: 2px solid #000; font-weight: 800; letter-spacing: .02em; text-shadow: none; white-space: nowrap; }

/* UX batch 2 #15: every tap target is at least 44px tall on a phone (small buttons, filter chips, link buttons, menus, selects) */
@media (max-width: 640px) {
  .btn-sm, .chip, .tb-select, .cp-menu > summary { min-height: 44px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  button.link-btn { min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; vertical-align: middle; }
}

/* UX batch 2: Rental Calendar (Month / Week / Day) */
.rn-tabs { flex: 0 1 auto; max-width: 680px; overflow: visible; } .rn-tabs .seg-tab { white-space: nowrap; flex: 1 1 auto; padding: 0 14px; }
.rn-tab-cal .i { width: 16px; height: 16px; vertical-align: -3px; }
.rc-bar-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 8px; }
.rc-modes { margin: 0; } .rc-nav { display: flex; gap: 6px; align-items: center; } .rc-title { font-size: 1.05rem; margin-left: 6px; white-space: nowrap; }
.rc-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.rc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .8rem; margin-bottom: 8px; color: var(--text-muted); }
.rc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rc-sw { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.rc-reserved { --rc: #7c3aed; } .rc-out { --rc: #2563eb; } .rc-due { --rc: #d97706; } .rc-late { --rc: #dc2626; } .rc-returned { --rc: #52525b; }
.rc-sw, .rc-bar, .rc-badge { background: var(--rc); color: #fff; }
.rc-month { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.rc-dow { display: grid; grid-template-columns: repeat(7, 1fr); font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); text-align: center; border-bottom: 1px solid var(--border); }
.rc-dow div { padding: 6px 0; }
.rc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 3px; min-height: 92px; border-bottom: 1px solid var(--border); position: relative; padding-bottom: 4px; }
.rc-week:last-child { border-bottom: 0; }
.rc-day { border-right: 1px solid var(--border); cursor: pointer; padding: 3px 5px; position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; min-width: 0; }
.rc-day:nth-child(7) { border-right: 0; }
.rc-dnum { font-size: .8rem; font-weight: 700; color: var(--text-muted); }
.rc-today { background: color-mix(in srgb, var(--primary) 12%, transparent); } .rc-today .rc-dnum { color: var(--text); }
.rc-past { cursor: default; background: rgba(255, 255, 255, .02); } .rc-out-month .rc-dnum { opacity: .4; }
.rc-more { font-size: .7rem; color: var(--accent); background: none; text-decoration: underline; padding: 0; z-index: 2; align-self: flex-end; }
.rc-bar { z-index: 1; margin: 0 3px; border-radius: 6px; font-size: .75rem; font-weight: 600; text-align: left; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-height: 0; line-height: 1; border: 0; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.rc-bar span { overflow: hidden; text-overflow: ellipsis; display: block; }
.rc-bar.rc-cl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; } .rc-bar.rc-cr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
@media (hover: hover) { .rc-day:not(.rc-past):hover { background: color-mix(in srgb, var(--primary) 8%, transparent); } .rc-bar:hover { filter: brightness(1.15); } }
.rc-week-big .rc-bar { font-size: .85rem; }
.rc-dayview .rc-item { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); border-left: 6px solid var(--rc); color: var(--text); min-height: 56px; }
.rc-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-free-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.rc-pick { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rc-pick-off { opacity: .55; cursor: not-allowed; }
@media (max-width: 640px) {
  .rc-filters { margin-left: 0; width: 100%; } .rc-filters select { flex: 1; min-width: 0; }
  .rc-title { font-size: .95rem; }
  .rc-week { min-height: 72px; } .rc-day { padding: 2px 3px; }
  .rc-bar { font-size: .66rem; padding: 0 3px; margin: 0 1px; border-radius: 4px; }
  .rc-more { font-size: .62rem; min-height: 0 !important; }
  .rc-legend { font-size: .72rem; gap: 4px 10px; } .rc-legend .card-meta { display: none; }
  .rn-tabs { flex: 1 1 100%; max-width: none; flex-wrap: wrap; } .rn-tabs .seg-tab { flex: 1 1 45%; }
}

/* UX batch 2: "Order Part" at the bottom-left of the RO Labor & parts card (tax picker stays on the right) */
.ro-lines-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ro-lines-foot #tk-order-part2 { min-height: 44px; }
.ro-lines-foot .ro-taxsel { margin: 0 0 0 auto; flex: 0 1 340px; }
@media (max-width: 640px) { .ro-lines-foot #tk-order-part2 { width: 100%; justify-content: center; } .ro-lines-foot .ro-taxsel { flex: 1 1 100%; max-width: none; } }
/* UX batch 2: Site picker + map link */
.map-link { margin-left: 6px; font-weight: 600; white-space: nowrap; }
.ws-select { max-width: 100%; }
.ro-site-addr { margin-top: 2px; }
/* UX batch 2: Rental Check In */
.rn-cmp { width: 100%; border-collapse: collapse; margin: 4px 0 10px; }
.rn-cmp th, .rn-cmp td { padding: 6px 8px; border-bottom: 1px solid var(--border, #e2e8f0); text-align: left; vertical-align: middle; }
.rn-cmp thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted, #64748b); }
.rn-cmp input, .rn-cmp select { width: 100%; min-width: 80px; }
.rn-ci-out { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: #f1f5f9; color: #334155; }
.rn-ci-out.rn-issue { background: #fef2f2; color: #b91c1c; }
.rn-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.rn-ph { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: #f1f5f9; display: inline-block; }
.rn-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rn-ph-x { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.rn-sigwrap canvas { border: 1px dashed #94a3b8; border-radius: 8px; touch-action: none; background: #fff; }
.rn-sigimg { max-height: 70px; max-width: 260px; display: block; }
.rn-ci-btn { margin-top: 6px; white-space: nowrap; }
.rc-item-row { display: flex; gap: 8px; align-items: center; }
.rc-item-row .rc-item { flex: 1; min-width: 0; }
.rc-item-row .rn-ci-btn { margin-top: 0; }
.rn-psi-line { margin-top: 2px; }
@media (max-width: 640px) { .rc-item-row { flex-wrap: wrap; } .rc-item-row .rn-ci-btn { width: 100%; } .rn-cmp th, .rn-cmp td { padding: 6px 4px; } }
/* UX batch 2: estimate "Followed up 2x · Oct 4" (only after a follow-up is logged) */
.badge.badge-followed { background: #dcfce7; color: #166534; border: 1px solid #16a34a; font-weight: 700; }

/* Multi-tech ROs: tech chips on the RO, initials on Board / calendar cards, internal labor-by-tech panel */
.ro-techs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tech-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 3px; border-radius: 999px; background: var(--bg-hover, #f1f3f5); color: var(--text, #111); border: 1px solid var(--border, #d0d5dc); font-size: 0.9rem; min-height: 32px; }
.tech-chip.primary { border-color: var(--tcc, #2563eb); font-weight: 600; }
.tech-chip small { color: var(--text-muted, #667085); font-weight: 500; margin-right: 6px; }
.tech-chip-x { border: 0; background: transparent; font-size: 1.15rem; line-height: 1; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--text-muted, #667085); }
.tech-chip-x:hover, .tech-chip-x:focus-visible { background: rgba(0, 0, 0, 0.08); color: var(--text, #111); }
.tech-ini { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; background: var(--tcc, #475467); color: var(--tci, #fff); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.tech-ini.sm { min-width: 20px; height: 20px; font-size: 0.62rem; }
.tech-pills { display: inline-flex; gap: 2px; flex-wrap: wrap; }
.tech-pills .tech-ini.primary { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--tcc, #475467); margin-right: 3px; }
.ro-add-tech { width: auto; min-width: 150px; min-height: 32px; }
.ro-techs-field { margin-top: 4px; }
.ro-techhours { margin-top: 12px; }
.ro-techhours .lt-table select { min-width: 160px; }
.ro-techhours .lt-tot { margin-top: 8px; max-width: 460px; }
.lt-split { font-size: 0.85rem; margin-top: 2px; }
.ci-with { display: flex; align-items: center; gap: 2px; font-size: 0.72rem; color: var(--muted, #667085); margin-top: 2px; }
.pr-techs { font-style: italic; }

/* "Requested" tab (Purchase Orders): black bold text in an orange outlined box so waiting part requests stand out; count bubble kept */
.seg-tab.seg-tab-req { color: #111; font-weight: 800; background: #fff4e6; border: 2px solid #f97316; box-shadow: none; }
.seg-tab.seg-tab-req:hover { background: #ffe8cc; }
.seg-tab.seg-tab-req.active { color: #111; background: #fed7aa; border-color: #ea580c; box-shadow: inset 0 -3px 0 #ea580c; }
.seg-tab.seg-tab-req .seg-count { background: #c2410c; color: #fff; font-weight: 700; }

/* UX batch 2 camera: Take Photo (opens the camera) + Choose from library, everywhere photos belong */
.cam-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.cam-row .btn { min-height: 44px; }
.cam-row.cam-big .cam-take { min-height: 56px; font-size: 1.05rem; padding: 0 22px; flex: 1 1 200px; }
.cam-row.cam-big .cam-lib { min-height: 56px; flex: 0 1 auto; }
.ro-cam-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px 0 12px; padding: 8px 12px; border: 2px solid var(--primary, #2563eb); border-radius: 12px; background: var(--surface, #fff); }
.ro-cam-bar .cam-row { flex: 1 1 320px; margin: 0; }
.cam-preview { text-align: center; margin-bottom: 10px; }
.cam-preview img { max-width: 100%; max-height: 50vh; border-radius: 10px; border: 1px solid var(--border, #d0d5dc); }
.cam-staged .cam-row { margin-top: 6px; }
.req-star { color: #b42318; font-weight: 700; }
/* v1.18.32 required star on New RO / convert forms (both themes) */
.req { color: var(--danger, var(--red, #ef4444)); font-weight: 800; }
.theme-classic .req, [data-preset="classic"] .req { color: #f97316; }
.field-cam { font-size: 1rem; min-height: 52px; }
.cl-row { display: flex; align-items: center; gap: 6px; }
.cl-row .cl-item { flex: 1 1 auto; min-width: 0; }
.cl-cam { min-width: 44px; min-height: 44px; padding: 0 8px; position: relative; flex: 0 0 auto; }
.cl-cam-n { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--primary-fill, #2563eb); color: var(--on-primary, #fff); font-size: 0.65rem; line-height: 16px; text-align: center; }
.cl-photos { margin: 2px 0 8px 34px; }
.cl-photos .photo-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }

/* Rental fleet main photo */
.asset-thumb-wrap { position: relative; display: inline-block; }
.asset-thumb-wrap.is-main .asset-thumb { outline: 3px solid #f59e0b; outline-offset: 1px; }
.ph-main-btn { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fbbf24; font-size: 16px; line-height: 28px; padding: 0; cursor: pointer; }
.ph-main-tag { position: absolute; left: 2px; bottom: 2px; background: #f59e0b; color: #000; font-size: 10px; font-weight: 700; padding: 1px 4px; border-radius: 4px; }
.main-thumb { display: inline-block; flex: 0 0 auto; background-size: cover; background-position: center; border-radius: 8px; background-color: var(--surface-2, #eee); overflow: hidden; vertical-align: middle; }
.main-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.main-thumb img:not([src]) { visibility: hidden; }
.fl-row { gap: 10px; align-items: center; }
.fl-thumb { width: 56px; height: 56px; }
.fl-nophoto { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px dashed var(--border, #ccc); color: var(--muted, #999); flex: 0 0 auto; }
.rn-unit-val { display: inline-flex; align-items: center; gap: 8px; }
.rn-unit-photo { width: 72px; height: 72px; }
.rc-item { display: flex; align-items: center; gap: 8px; }
.rc-unit-photo { width: 40px; height: 40px; margin-right: 8px; }
.pr-unit-photo { width: 120px; height: 90px; margin: 4px 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* UX batch 2: deliveries */
.dlv-badge { background: #ccfbf1; color: #134e4a; border: 1px solid #5eead4; font-weight: 600; }
.dlv-badge.dlv-toschedule { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.dlv-badge.dlv-delivered { background: #dcfce7; color: #14532d; border-color: #86efac; }
.dlv-badge .i { width: 13px; height: 13px; vertical-align: -2px; }
.dlv-card .dlv-need-row { font-size: 1.05em; }
.dlv-card .dlv-status { margin: 6px 0; }
.dlv-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cal-item.cal-dlv { border-left: 4px solid #0f766e; background: rgba(20, 184, 166, 0.12); color: var(--text); } /* tinted, readable on dark + light themes (was a light-only fill) */
.cal-item.cal-dlvdoc { border-left-color: #f97316; background: rgba(249, 115, 22, 0.12); cursor: grab; }
.cal-item.dlv-done-item, .job-card.dlv-done-item { opacity: .7; }
.dlv-tray .section-label .i { width: 15px; height: 15px; vertical-align: -2px; }
.job-card.dlv-job { border-left: 5px solid #0f766e; }
.dlv-sum { padding: 8px 10px; background: var(--surface-2, #f5f5f5); border-radius: 8px; margin-bottom: 10px; }
.dlv-appt .line-item { gap: 10px; }
.dlv-items { text-align: right; }
.dlv-sigimg { max-width: 280px; max-height: 110px; display: block; margin: 6px 0; border: 1px solid var(--border, #ddd); border-radius: 6px; background: #fff; }
.dlv-done { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: rgba(34, 197, 94, .14); color: var(--text); } /* t273u: was a fixed light green under theme text */
.dlv-lane-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border, #eee); margin-bottom: 8px; }
.dlv-lane-row .tech-sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.dlv-print .pr-table { width: 100%; border-collapse: collapse; }
.dlv-print .pr-table th, .dlv-print .pr-table td { border-bottom: 1px solid #ddd; padding: 4px 6px; text-align: left; }
.dlv-print .pr-table .num { text-align: right; }
@media print { .no-print { display: none !important; } }

/* UX batch 2: declined lines / declined ROs */
.doc-line.dl-declined td { color: #6b7280; background: #f9fafb; }
.doc-line.dl-declined s { text-decoration: line-through; color: #6b7280; }
.dl-declined-badge { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; font-weight: 600; margin-left: 6px; }
.dl-declined-head td { font-weight: 700; color: #6b7280; background: #f3f4f6; font-size: .85em; text-transform: uppercase; letter-spacing: .03em; padding: 6px 8px; }
.pr-declined s { color: #6b7280; }
.pr-declined h4 { color: #6b7280; }
.badge-declined { background: #f3f4f6; color: #374151; border: 1px solid #9ca3af; }
.ro-declined-banner { border-left: 5px solid #6b7280; background: #f9fafb; color: #1f2937; } /* dark text: the light banner was white-on-white in the dark theme */
.chip.chip-declined.active { background: #374151; color: #fff; border-color: #374151; }
.dr-reasons .check-row { display: flex; padding: 6px 0; }

/* ux2: print option rows always wrap inside the dialog (desktop, phone, large text / zoom) */
.modal, .modal-body { min-width: 0; box-sizing: border-box; }
@media (min-width: 700px) { .modal.modal-wide { max-width: min(940px, calc(100vw - 32px)); } }
.doc-out-opts, .pr-opts { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; overflow: visible; }
.doc-out-opts > *, .pr-opts > * { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.doc-out-opts .check-row, .pr-opts .pr-opt { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.doc-out-opts .opt-group, .pr-opts .opt-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-width: 0; }
.doc-out-opts .check-row input, .pr-opts .pr-opt input { flex: 0 0 auto; }
@media (max-width: 699px) { .doc-out-opts .opt-group, .pr-opts .opt-group { flex-direction: column; align-items: flex-start; gap: 0; } .doc-out-opts .opt-sub, .pr-opts .opt-sub { padding-left: 30px; } }
/* ux2 estimate page: Follow Up button — white, black border, bright orange text; "✓ Followed Up" once logged */
.btn.btn-follow { background: #fff; color: #f97316; border: 2px solid #000; font-weight: 800; }
.btn.btn-follow:hover, .btn.btn-follow:focus-visible { background: #fff7ed; color: #ea580c; }
.btn.btn-follow .i { color: #f97316; }
/* ux2: Email ▾ message types */
.em-menu { display: flex; flex-direction: column; gap: 8px; }
.em-menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; font: inherit; }
.em-menu-item strong { font-size: 1.02rem; }
.em-menu-item:hover, .em-menu-item:focus-visible { border-color: var(--primary); }
.em-menu-item[disabled] { opacity: .6; }


/* UX2: Parts Request live notice + header badge (Inventory / Owner / Manager) */
.prq-badge {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 36px; padding: 4px 8px; border-radius: 10px;
  border: 1px solid var(--border, #444); background: var(--bg-elev, #1a1a1a); color: var(--text, #fff);
  cursor: pointer; font: inherit;
}
.prq-badge:hover, .prq-badge:focus-visible { background: var(--bg-hover, #333); outline: none; }
.prq-badge .i { width: 18px; height: 18px; }
.prq-badge .prq-n {
  position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red, #dc2626); color: #fff; font-size: 0.7rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.prq-badge.prq-empty .prq-n { display: none; }
.prq-pop {
  position: fixed; z-index: 12000; right: 16px; top: 64px; width: min(380px, calc(100vw - 24px));
  background: var(--bg-card, #1f1f1f); color: var(--text, #fff); border: 1px solid var(--border, #444);
  border-left: 5px solid #f97316; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.45);
  padding: 12px 14px; animation: prq-in .18s ease-out;
}
@keyframes prq-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.prq-pop h3 { margin: 0 0 6px; font-size: 0.95rem; }
.prq-pop .prq-meta { font-size: 0.82rem; color: var(--text-muted, #a8a8a8); margin-bottom: 8px; }
.prq-pop .prq-row { margin: 4px 0; font-size: 0.9rem; }
.prq-pop .prq-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.prq-pop a.prq-ro { color: var(--nav-accent, #f97316); font-weight: 700; text-decoration: underline; cursor: pointer; }
.prq-panel {
  position: fixed; z-index: 11900; right: 12px; top: 56px; width: min(420px, calc(100vw - 16px)); max-height: min(70vh, 520px);
  overflow: auto; background: var(--bg-card, #1f1f1f); color: var(--text, #fff); border: 1px solid var(--border, #444);
  border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.5); padding: 12px;
}
.prq-panel h3 { margin: 0 0 8px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.prq-panel .prq-item {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: transparent; border: 1px solid var(--border, #333); border-radius: 10px; padding: 10px; margin: 6px 0;
}
.prq-panel .prq-item:hover, .prq-panel .prq-item:focus-visible { background: var(--bg-hover, #333); outline: none; }
.prq-panel .prq-item strong { display: block; margin-bottom: 2px; }
.prq-panel .prq-item .card-meta { font-size: 0.8rem; color: var(--text-muted, #a8a8a8); }
@media (max-width: 600px) {
  .prq-pop, .prq-panel { right: 8px; left: 8px; width: auto; top: 56px; }
}

/* ux3: daily count category groups */
.dc-cat { margin-bottom: 8px; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; overflow: hidden; }
.dc-cat-head { width: 100%; text-align: left; background: var(--surface-2, #f3f4f6); border: 0; padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.dc-cat-body { padding: 4px 0; }
.dc-cat-body.hidden { display: none; }
.dc-cat-chev { width: 1.2em; display: inline-block; }
.cc-tools .inv-cat-filter { margin-left: auto; max-width: 200px; }
.sug-item { cursor: pointer; }
/* v1.12.16 Suggestions thread */
.sug-item.sug-unread { border-left: 3px solid var(--primary-fill); }
.sug-thread { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.sug-ev-reply { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.sug-ev-reply.sug-ev-sub { border-left: 3px solid var(--accent-fill); }
.sug-ev-head { margin-bottom: 2px; }
.sug-ev-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.sug-ev-status { padding: 0 2px; }
.sug-ev-status .badge { font-size: 0.75em; }

/* Calendar: two groups below the grid — ROs to schedule + Deliveries to schedule */
.cal-trays { display: flex; flex-direction: column; gap: 4px; }
.cal-trays .cal-tray .section-label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cal-trays .cal-tray .section-label .i { width: 15px; height: 15px; }
.cal-tray-count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #475569; color: #fff; font-size: .85em; text-align: center; line-height: 1.5; }
.dlv-tray .cal-tray-count { background: #c2410c; }
.cal-tray-hint { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }
.cal-tray-more { align-self: center; padding: 0 8px; }
.ro-tray .cal-tray-items { max-height: 470px; overflow-y: auto; align-content: flex-start; } /* long RO list scrolls inside, so Deliveries to schedule stays in view */
@media (max-width: 600px) { .cal-tray-items .cal-item { width: calc(50% - 6px); min-width: 150px; } .cal-tray-hint { flex-basis: 100%; } .ro-tray .cal-tray-items { max-height: 38vh; } }
/* phone header: the Parts-request badge made the header 15px wider than a 390px phone (page scrolled sideways) — tighter gaps */
@media (max-width: 440px) { .header-right { gap: 4px; } .prq-badge { min-width: 36px; padding: 4px 6px; } }

/* ux3: bin / shelf location chip (item "Physical location") — inventory list, product header, counts, PO receiving */
.bin-tag { display: inline-flex; align-items: center; gap: 3px; max-width: 16em; padding: 1px 7px 1px 5px; margin-right: 6px; border-radius: 5px; background: #fde68a; color: #1f2937; border: 1px solid #d97706;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: .8rem; line-height: 1.5; vertical-align: middle; white-space: nowrap; }
.bin-tag .bin-txt { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bin-tag .i { width: 12px; height: 12px; flex: 0 0 12px; stroke: currentColor; }
.bin-tag.bin-none { background: transparent; border-color: transparent; color: var(--text-muted, #9ca3af); font-weight: 400; padding: 1px 4px; }
.bin-tag.bin-count, .bin-tag.bin-li { font-size: .95rem; padding: 2px 8px 2px 6px; margin-right: 8px; }
.bin-tag.bin-count .i, .bin-tag.bin-li .i { width: 14px; height: 14px; flex-basis: 14px; }
.bin-tag.bin-count.bin-none, .bin-tag.bin-li.bin-none { min-width: 2.2em; justify-content: center; }
.bin-tag.bin-pd { font-size: .9rem; margin-left: 4px; }
.bin-tag.bin-sm { font-size: .72rem; }
/* Inventory list: same yellow bin chip as daily counts (bin-count), on the SKU/category line */
.inv-item .li-sub > .bin-tag { vertical-align: middle; margin-right: 6px; }
.inv-item .li-sub > .bin-tag.bin-none { min-width: 0; font-size: .8rem; }
.inv-item .bin-set { border: 1px dashed var(--border, #9ca3af); color: var(--text-muted, #6b7280); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; min-height: 28px; padding: 1px 8px; }
.inv-item .bin-set:hover, .inv-item .bin-set:focus-visible { border-color: #d97706; color: var(--text); background: rgba(253, 230, 138, .25); }
@media (pointer: coarse) { .inv-item .bin-set { min-height: 32px; } }
.dc-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; }
.dc-sort .dc-print { margin-left: auto; min-height: 40px; }
.dc-walk .dc-line .badge-cat { margin-left: 4px; }
.cc-tools #cc-print { width: auto; flex: 0 0 auto; }
.count-sheet .cs-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.count-sheet .cs-table th, .count-sheet .cs-table td { border: 1px solid #bbb; padding: 5px 6px; text-align: left; vertical-align: top; }
.count-sheet .cs-table .num { text-align: right; }
.count-sheet .cs-bin { white-space: nowrap; width: 1%; font-family: ui-monospace, Menlo, Consolas, monospace; }
.count-sheet .cs-cnt { width: 90px; min-width: 70px; }
.count-sheet .cs-group { margin: 14px 0 6px; font-size: .95rem; color: #111; }
.count-sheet .cs-sign { display: flex; gap: 40px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .bin-tag { max-width: 12em; }
  .bin-tag.bin-count { font-size: .9rem; }
  .dc-sort .dc-print { margin-left: 0; }
  .cc-tools #cc-print { min-height: 48px; }
}
@media print { .bin-tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* daily count category header: was a light-grey bar with white text on the dark theme (unreadable) — theme colours */
.dc-cat-head { background: var(--bg-hover); color: var(--text); }
.dc-cat-head .card-meta { color: var(--text-muted); }

/* UX3: Part received for RO — live notice, header list, RO line, Board chip */
.prc-pop { border-left-color: var(--green, #22c55e); }
.prc-pop.prc-pop-partial { border-left-color: #f59e0b; }
.prc-pop { cursor: pointer; }
.prc-pop h3 .i { color: var(--green, #22c55e); }
.prc-pop .prc-qty { font-weight: 700; }
.prc-pop .bin-tag, .prc-item .bin-tag { vertical-align: middle; }
.prq-badge.prq-rcv-only .prq-n { background: var(--green, #16a34a); color: #04210f; }
.prq-badge.prq-has-rcv:not(.prq-rcv-only)::after {
  content: ''; position: absolute; bottom: -3px; right: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green, #22c55e); border: 2px solid var(--bg-elev, #1a1a1a);
}
.prq-panel .prc-sec { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border, #333); }
.prq-panel .prc-item { border-left: 4px solid var(--border, #333); }
.prq-panel .prc-item.prc-unread { border-left-color: var(--green, #22c55e); background: rgba(34, 197, 94, .07); }
.prq-panel .prc-new { font-size: 0.65rem; padding: 1px 6px; margin-right: 2px; }
.badge.prc-received { display: inline-flex; align-items: center; gap: 4px; }
.badge.prc-received .i { width: 12px; height: 12px; }
.ro-pr.prs-received { border-left: 4px solid var(--green, #22c55e); padding-left: 8px; }
.ro-pr.prs-partial { border-left: 4px solid #f59e0b; padding-left: 8px; }
.ro-pr .prc-line { margin-top: 3px; }
.ro-pr.prc-flash { animation: prc-flash 1.2s ease-in-out 2; }
@keyframes prc-flash { 0%, 100% { background: transparent; } 50% { background: rgba(34, 197, 94, .22); } }
.tc-parts-badge.tc-parts-in { background: var(--green, #22c55e); color: #04210f; margin-right: 6px; display: inline-flex; align-items: center; gap: 4px; }
.tc-parts-badge.tc-parts-in .i { width: 12px; height: 12px; }
.hist-row.hist-prc .hist-what { color: var(--green-ink, var(--text)); }
.req-recv { margin-top: 14px; }
.req-recv tr[data-rcvpr] { cursor: pointer; }

/* ux3 raw-material unit change (lb ↔ gal): preview in the item form, unit tags on PO lines / counts */
.unit-prev { margin: 4px 0 10px; }
.unit-prev-box { border: 1px solid var(--accent, #2563eb); border-left-width: 4px; border-radius: 8px; padding: 10px 12px; font-size: 15px; line-height: 1.45; background: rgba(37, 99, 235, 0.08); }
.unit-prev-box .card-meta { margin-top: 4px; }
.unit-prev-need { font-size: 15px; }
.pl-unit, .cc-unit { font-weight: 600; }
.pl-conv { font-size: 12px; }

/* ux3: machine photo left of the RO # on the RO page (+ small one by the RO # on the print) */
.ro-idgrp { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.ro-idgrp .dp-title { min-width: 0; overflow-wrap: anywhere; }
.ro-mthumb { flex: 0 0 auto; width: 60px; height: 60px; padding: 0; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-muted); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ro-mthumb .main-thumb { width: 100%; height: 100%; border-radius: 0; background-color: transparent; }
.ro-mthumb-none svg.i { width: 28px; height: 28px; }
span.ro-mthumb { cursor: default; }
button.ro-mthumb:hover { border-color: var(--text-muted); }
.ro-mthumb:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 760px) { .ro-mthumb { width: 56px; height: 56px; } .ro-idgrp { gap: 10px; } }
.pr-ro-mphoto { width: 56px; height: 56px; margin-right: 8px; border: 1px solid #ccc; border-radius: 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* UX3: rentals invoiced at check out — deposit, Invoiced / Paid chips, settle-up */
.rn-inv-chip, .rn-dep-chip { margin-left: 4px; }
.rn-dep-box { border: 1px solid var(--border, #333); border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; }
.rn-dep-box .pay-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.rn-co-quote { margin-top: 6px; line-height: 1.45; font-size: .9rem; }
.rn-ci-bal { margin-top: 6px; font-size: 1rem; color: var(--text, inherit); }
.good-text { color: #22c55e; }
.rn-billed-banner { margin-bottom: 10px; }
.rn-credit-row { margin: 6px 0; font-weight: 600; }
.rn-refund-box { display: block; margin: 8px 0; }
.rn-refund-box .btn { margin-left: 8px; }
.rn-bal strong { font-size: 1.02rem; }
.rn-doc-chip { cursor: pointer; border: 0; display: inline-flex; align-items: center; gap: 4px; background: #0e7490; color: #fff; }
.rn-doc-chip .i { width: 12px; height: 12px; }
.rc-inv { float: right; font-style: normal; font-size: .62rem; font-weight: 800; line-height: 1; padding: 2px 4px; margin: 0 0 0 4px; border-radius: 4px; background: rgba(0,0,0,.35); color: #fff; text-shadow: none; position: relative; top: 50%; transform: translateY(-50%); }
.rc-inv-paid { background: #15803d; } .rc-inv-inv { background: #1f2937; } .rc-inv-dep { background: #a16207; }
.rc-item .rn-inv-chip, .rc-item .rn-dep-chip { margin-left: 6px; align-self: center; }
.rn-pr-money .pr-grand { margin-top: 4px; }
/* the check-in billing preview shared the OVERDUE badge class (red fill) — readable box instead */
#rt-late.rn-late { background: var(--bg-elev, #1f1f1f); color: var(--text, #eee); border: 1px solid var(--border, #333); border-left: 4px solid var(--primary); border-radius: 8px; padding: 8px 10px; font-size: .9rem; }
#rt-late .rn-ci-bal strong { font-size: 1.05rem; }

/* ux3: machine photo on the Repair Orders list (+ Field job cards) — ~48px left of the RO # */
.ro-lthumb { flex: 0 0 auto; width: 48px; height: 48px; padding: 0; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-muted); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; align-self: center; }
.ro-lthumb .main-thumb, .ro-lthumb .ro-lthumb-img { width: 100%; height: 100%; border-radius: 0; background-color: transparent; }
.ro-lthumb-none { cursor: default; }
.ro-lthumb-none svg.i { width: 22px; height: 22px; }
button.ro-lthumb:hover { border-color: var(--text-muted); }
.ro-lthumb:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.job-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.job-head .job-badges { flex: 1; min-width: 0; }
.job-head .ro-lthumb { align-self: flex-start; margin-top: 2px; }
@media (max-width: 760px) {
  .ro-lthumb { width: 44px; height: 44px; border-radius: 8px; }
  .list-item { gap: 10px; }
}

/* v1.12 Serial numbers */
.badge-sn { background: rgba(167,139,250,.16); color: var(--purple); border: 1px solid rgba(167,139,250,.45); }
.sn-mm { margin-left: 4px; }
.sn-flag { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: var(--radius); line-height: 1.35; }
.sn-flag input { margin-top: 3px; flex: 0 0 auto; width: 20px; height: 20px; }
.dl-sn { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 6px; }
.sn-chip { display: inline-flex; align-items: center; gap: 2px; background: rgba(167,139,250,.14); border: 1px solid rgba(167,139,250,.45); color: var(--text); border-radius: 999px; padding: 2px 4px 2px 9px; font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.sn-chip .sn-x { background: none; border: 0; color: var(--text-muted); font-size: 12px; min-width: 26px; min-height: 26px; cursor: pointer; border-radius: 999px; }
.sn-chip .sn-x:hover { background: var(--bg-hover); color: var(--red); }
.sn-warn { display: inline-block; font-size: 12px; font-weight: 600; color: var(--amber-ink, #fcd34d); background: var(--amber-tint, rgba(245,158,11,.12)); border: 1px solid var(--amber-line, rgba(245,158,11,.45)); border-radius: 999px; padding: 2px 9px; }
.sn-legacy { color: var(--text-muted); border-style: dashed; background: transparent; }
.sn-mach { font-size: 12px; }
.sn-mach-on { color: var(--green); font-weight: 600; }
.dl-sn .sn-pick { min-height: 30px; padding: 2px 10px; font-size: 12.5px; }
.sn-grp { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0; background: var(--bg-elev); }
.sn-gh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.sn-cnt { font-weight: 700; white-space: nowrap; color: var(--amber-ink); }
.sn-cnt.sn-cnt-ok { color: var(--green); }
.sn-ins { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 12px; }
.sn-row { display: grid; grid-template-columns: 26px 1fr; gap: 2px 6px; align-items: center; }
.sn-row .sn-n { color: var(--text-muted); font-size: 12px; text-align: right; }
.sn-in, .sn-scanrow input, .sn-paste textarea { width: 100%; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.sn-in:focus, .sn-scanrow input:focus, .sn-paste textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.sn-row .sn-in { min-height: 44px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; letter-spacing: .3px; text-transform: none; }
.sn-row .sn-msg { grid-column: 2; font-size: 12px; color: var(--warn-ink); }
.sn-row .sn-msg:empty { display: none; }
.sn-row.sn-bad .sn-in { border-color: var(--red); box-shadow: 0 0 0 2px rgba(239,68,68,.25); }
.sn-tools { display: flex; gap: 14px; margin-top: 6px; }
.sn-paste { margin-top: 8px; display: grid; gap: 6px; }
.sn-paste textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; }
.sn-scanrow { display: flex; gap: 8px; margin: 8px 0 4px; }
.sn-scanrow input { flex: 1; min-height: 44px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; }
.sn-list { display: grid; gap: 4px; max-height: 46vh; overflow: auto; margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; }
.sn-opt { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-height: 44px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.sn-opt:hover { background: var(--bg-hover); }
.sn-opt input { width: 20px; height: 20px; }
.sn-opt .mono, .sn-opt-s { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
.sn-locf { max-width: 320px; }
#pds-serials .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
#pds-serials tr.sn-focus td { background: rgba(167,139,250,.16); }
.sn-mm-box { margin-top: 0; }
.sn-sub { font-family: ui-monospace, Menlo, Consolas, monospace; }
.print-doc .pr-sn, .print-ro .pr-sn { font-family: ui-monospace, Menlo, Consolas, monospace; color: #111; }
@media (max-width: 640px) {
  .sn-ins { grid-template-columns: 1fr; }
  .sn-gh { flex-direction: column; gap: 2px; }
}
/* v1.12.3 void invoice rows in an item's Sales History */
.badge-void { background: rgba(239, 68, 68, .18); color: var(--text); border: 1px solid rgba(239, 68, 68, .5); }
tr.pd-void td { opacity: .75; }

/* ---- Parts by model (Inventory › Parts by model) ---- */
.pbm-page .pbm-find { margin-top: 4px; }
.pbm-page input[type="search"] { padding: 0 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.pbm-page input[type="search"]:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.pbm-man { margin: 10px 0; }
.pbm-man-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pbm-man-h .btn { margin-left: auto; }
.pbm-models { display: flex; flex-wrap: wrap; gap: 6px; }
.pbm-model.chip { min-height: 40px; }
.pbm-n { opacity: .6; font-size: .8em; margin-left: 4px; }
.pbm-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.pbm-head > .card-meta { flex-basis: 100%; }
.pbm-tools { position: sticky; top: var(--header-h); z-index: 3; background: var(--bg); padding: 4px 0 6px; }
.pbm-tools .kp-q { margin-bottom: 6px; }
.pbm-sec { padding: 8px 10px; margin: 10px 0; }
.pbm-sec-h { font-size: 1rem; margin: 2px 0 6px; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.pbm-rows { display: flex; flex-direction: column; }
.pbm-row { display: grid; grid-template-columns: 2.4em 7.6em minmax(12em, 1fr) 3.4em minmax(13em, 17em) auto; gap: 4px 10px; align-items: center; padding: 6px 2px; border-top: 1px solid var(--border); }
.pbm-row:first-child { border-top: 0; }
.pbm-row.pbm-alt { background: rgba(255, 255, 255, .02); }
.pbm-ref { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pbm-pn { white-space: nowrap; font-weight: 600; }
.pbm-qty { color: var(--text-muted); white-space: nowrap; }
.pbm-acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; }
.pbm-acts .btn-sm { min-height: 34px; padding: 4px 8px; }
.pbm-pg { font-size: .85em; white-space: nowrap; }
.pbm-ns { background: #44403c; color: #fff; }
.pbm-oh.pbm-zero strong { color: var(--red); }
.pbm-bin { font-size: .85em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border); white-space: nowrap; }
.pbm-price { font-weight: 600; }
.pbm-via { font-size: .78em; }
.pbm-rev { display: flex; flex-direction: column; gap: 8px; }
.pbm-revrow { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; display: grid; grid-template-columns: 1fr minmax(12em, 18em); gap: 4px 12px; }
.pbm-revrow .pbm-rev-models, .pbm-revrow .pbm-rev-pg { grid-column: 1 / -1; }
.pbm-revrow .pbm-acts { grid-column: 1 / -1; justify-content: flex-start; }
.pbm-what { margin-bottom: 10px; }
.pbm-tgts { max-height: 46vh; overflow: auto; }
/* v1.12.10 Parts by model: new inventory item popup + "Request this part now?" */
.pbm-add-note { margin: 0 0 10px; }
.pbm-ni-why { margin-bottom: 10px; }
.pbm-ni-sell { margin: -4px 0 10px; }
.pbm-ni-ref { margin-top: 4px; }
.pbm-req-q { margin: 6px 0 10px; font-weight: 600; }
input.field-err, select.field-err { border-color: var(--danger, #c0392b) !important; box-shadow: 0 0 0 2px rgba(192, 57, 43, .18); }
.pbm-slot { display: inline-flex; }
.pbm-ms { text-align: right; opacity: .5; }
@media (max-width: 760px) {
  .pbm-row { grid-template-columns: 2em 1fr auto; grid-template-areas: "ref pn qty" "ref desc desc" "ref stock stock" "ref acts acts"; padding: 8px 0; }
  .pbm-ref { grid-area: ref; align-self: start; }
  .pbm-pn { grid-area: pn; }
  .pbm-qty { grid-area: qty; }
  .pbm-desc { grid-area: desc; }
  .pbm-stock { grid-area: stock; }
  .pbm-acts { grid-area: acts; justify-content: flex-start; }
  .pbm-revrow { grid-template-columns: 1fr; }
  .pbm-tools { top: 0; }
}
/* v1.12.5 Shop Supplies checkbox + line in the RO / estimate / invoice totals */
.doc-totals .dt-shopsup { align-items: center; }
.doc-totals .dt-shopsup .shopsup-chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; flex-wrap: wrap; }
.doc-totals .dt-shopsup .shopsup-chk input { width: 20px; height: 20px; margin: 0; accent-color: var(--red, #d71920); }
.doc-totals .dt-shopsup.off { color: var(--text-muted); }
.doc-totals .dt-shopsup .shopsup-chk input:disabled { cursor: not-allowed; }
/* v1.12.6 Shop Supplies: per-record % field next to the checkbox */
.doc-totals .dt-shopsup .shopsup-ctl { display: inline-flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; min-width: 0; }
.doc-totals .dt-shopsup .shopsup-pct { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.doc-totals .dt-shopsup .shopsup-pct input { width: 62px; min-height: 34px; padding: 4px 8px; text-align: right; font-size: 16px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.doc-totals .dt-shopsup .shopsup-pct input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.doc-totals .dt-shopsup .shopsup-pct input:disabled { opacity: .6; cursor: not-allowed; }
.doc-totals .dt-shopsup .shopsup-info { flex-basis: auto; }

/* RO list › line toggle (Hotsy / Sewer Cable) — its own group after the status chips, so it combines with Open / Invoiced / Declined… */
.ro-line { padding-left: 10px; border-left: 2px solid var(--border); }
.ro-line .chip-line.active { background: var(--primary-dim); border-color: var(--primary); color: var(--on-primary-dim); }
.ro-line .chip-sewer.active { background: #1f2937; color: #fde68a; border-color: #f59e0b; }
@media (max-width: 480px) { .ro-line { padding-left: 0; border-left: 0; } }

/* v1.12.9 multi-location: the From (stock location) picker on part lines, the save warning, Transfer, per-location daily counts */
.dl-locw { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 6px; }
.dl-loc-l { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted, #94a3b8); }
.dl-locw select.dl-loc { width: auto; min-width: 0; max-width: 100%; min-height: 30px; padding: 2px 26px 2px 8px; font-size: 12.5px; }
.dl-locnote { display: inline-block; font-size: 12px; color: var(--muted, #94a3b8); border: 1px solid rgba(148,163,184,.4); border-radius: 999px; padding: 2px 9px; }
.dl-locnote.dl-locwarn { font-weight: 600; color: var(--amber-ink, #fcd34d); background: var(--amber-tint, rgba(245,158,11,.12)); border-color: var(--amber-line, rgba(245,158,11,.45)); }
.dl-only { font-size: 11px; }
.loc-warn .loc-warn-row { display: flex; gap: 6px; align-items: flex-start; padding: 3px 0; }
#modal-foot #lw-switch, #modal-foot #lw-only { white-space: normal; }
.tr-snlist { display: flex; flex-wrap: wrap; gap: 4px 16px; max-height: 180px; overflow: auto; }
.acs-locs { display: flex; flex-direction: column; gap: 4px; }
.acs-locrow { display: flex; align-items: center; gap: 10px; }
.acs-locrow .chk-row { flex: 1; }
.acs-locrow input.acs-locn { width: 84px; }
.sl-map select { width: 100%; }
@media print { .dl-locw { display: none !important; } }
@media (max-width: 760px) { .dp-table td .dl-locw { grid-column: 1 / -1; } }

/* t273u: placeholders ("—" on count inputs, search hints) use the theme's muted text so they read in every scheme */
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
.theme-fixnote { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--bg-elev); }
/* t273u: inputs / selects with no styling of their own (e.g. "Find on this list", "Find part #, name, bin…") took the browser's white box
   with the theme's text colour — typed text was white on white in dark schemes. Zero specificity: every styled field keeps its look. */
:where(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]), select, textarea) { background-color: var(--bg); color: var(--text); }
/* v1.12.12 Misc placeholder lines + add part on demand */
.badge.misc-tag, .badge.badge-misc { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--warm-ink); border: 1px solid color-mix(in srgb, var(--amber) 55%, transparent); font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.dl-c-item .misc-tag { display: inline-block; margin-bottom: 4px; font-size: .72rem; padding: 4px 8px; }
.dl-c-item .misc-rep { margin-top: 4px; border-color: color-mix(in srgb, var(--amber) 55%, transparent); color: var(--warm-ink); min-height: 36px; }
.verify-banner.misc-banner { background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); border-left: 4px solid var(--amber); color: var(--text); margin: 8px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.misc-why { border-left: 4px solid var(--amber); }
.verify-banner.misc-banner strong { color: var(--warm-ink); }
.misc-block-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.misc-block-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); border-radius: 10px; }
.misc-block-row .mb-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.misc-block-row .btn { min-height: 44px; }
.misc-rep-what { border-left: 4px solid var(--amber); padding: 10px 12px; margin-bottom: 10px; }
.mr-price { margin-top: 8px; } .mr-choose .check-row { margin: 4px 0; display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 400; color: var(--text); } .mr-choose .check-row input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; accent-color: var(--primary); }
.spick-opt.spick-add { color: var(--warm-ink); font-weight: 700; }
.spick-opt.spick-add .spick-s { font-weight: 400; }
@media (max-width: 760px) { /* v1.12.12 phone line card: the Misc tag sits where the part # box goes (clear of Decline / ×) */
  .dp-table td.dl-c-item > .misc-tag { justify-self: start; max-width: 96px; white-space: normal; line-height: 1.25; text-align: center; }
  .dp-table td.dl-c-item > .misc-rep { justify-self: stretch; }
}
/* v1.12.13 Void instead of delete */
.void-banner { display: flex; gap: 14px; align-items: center; margin: 8px 0 12px; padding: 10px 14px; border-radius: 10px; border: 2px solid rgba(220, 38, 38, .75); background: rgba(239, 68, 68, .12); color: var(--text); }
.void-banner .void-word { font-size: 1.6rem; font-weight: 900; letter-spacing: .12em; color: #dc2626; border: 3px solid #dc2626; border-radius: 8px; padding: 0 10px; line-height: 1.3; background: #fff; }
.dp-status.dp-st-void { background: #dc2626; color: #fff; font-weight: 900; letter-spacing: .1em; }
.pay-voided { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--border, rgba(127,127,127,.4)); }
.pay-void-row { margin: 4px 0; color: var(--text); }
.void-pays ul { margin: 6px 0 0 18px; }
.rp-nodel { margin: 6px 0 10px; }
.print-doc .pr-stamp.pr-stamp-void { border-color: #dc2626; color: #dc2626; font-size: 3.4rem; opacity: 0.7; }
.print-doc .pr-void-note { color: #b91c1c; font-weight: 700; margin: 0 0 6px; }
.list-item.li-void { opacity: .8; }

/* v1.12.14 locked payments */
.pay-acts { white-space: nowrap; }
.pay-acts .btn + .btn { margin-left: 4px; }
.pay-lock-hint { margin-top: 6px; }
input.pay-locked { background: var(--surface-2, rgba(127,127,127,.12)); color: var(--text); opacity: 1; cursor: not-allowed; }
.pay-lock-note { margin: 6px 0 10px; }
.pay-card-note, .pay-reenter-note { margin: 8px 0; color: var(--text); }
.pay-hist { margin-top: 8px; }
@media (max-width: 640px) { .pay-acts { white-space: normal; } .pay-acts .btn, .pay-acts .btn + .btn { display: block; width: 100%; margin: 2px 0; padding: 4px 6px; font-size: .78rem; white-space: normal; line-height: 1.15; }
  .dp-mini.pay-tbl th:nth-child(4), .dp-mini.pay-tbl td:nth-child(4) { display: none; } }

/* v1.12.14 Disabled (obsolete) items — grey OBSOLETE tag, the "use the replacement" gate, the item form box. Fixed colours inside the tag so it reads on every scheme. */
.badge-obs { background: #4b5563; color: #f9fafb; border: 1px solid #6b7280; letter-spacing: .04em; font-weight: 700; }
.obs-use { font-size: .85em; color: var(--text-muted); white-space: nowrap; }
.obs-gate { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--amber, #d97706); border-left-width: 4px; border-radius: 8px; background: var(--bg-card); color: var(--text); }
.obs-gate.hidden { display: none; }
.obs-gate .obs-msg { font-weight: 600; }
.obs-gate .obs-rep { margin-top: 4px; }
.obs-gate .obs-norep { margin-top: 4px; color: var(--text-muted); }
.obs-gate .obs-sell-note, .obs-gate .obs-block-note { margin-top: 6px; }
.obs-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.obs-acts .btn { min-height: 44px; }
.obs-kit-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.obs-kit-row:last-child { border-bottom: 0; }
.obs-box { margin: 10px 0; padding: 10px 12px; }
.obs-box.obs-on { border-color: #6b7280; border-left: 4px solid #6b7280; }
.obs-box .obs-fields { margin-top: 8px; }
.obs-box .obs-fields.hidden { display: none; }
.obs-hist { margin: 4px 0 10px; display: grid; gap: 2px; }
.spick-opt.spick-obs { color: var(--text-muted); font-style: italic; }
.pbm-obs { margin-top: 4px; font-size: .9em; }
.gs-obs { display: inline-flex; gap: 6px; align-items: center; margin: 0 8px; min-height: 32px; cursor: pointer; }
/* t289u Reports home: search + Tiles / List + categories */
.rep-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 6px; }
.rep-q { flex: 1 1 240px; max-width: 420px; }
.rep-views { margin: 0; }
.rep-cat { margin: 4px 0 10px; }
.rep-cat > summary { cursor: pointer; list-style: revert; }
.rep-list { width: 100%; }
.rep-list .rep-row { cursor: pointer; }
.rep-list .rep-row:hover td, .rep-list .rep-row:focus td { background: var(--hover, rgba(127,127,127,.12)); }
.rep-list .rep-row td:first-child { width: 34%; }
.rep-table select[data-rep-tid] { min-width: 150px; }
.rl-edit textarea { width: 100%; }
@media print { .rl-edit { display: none !important; } }
/* v1.12.18 t296u: daily count — part with no bin must get one */
.dc-line .dc-bin-set { border: 1px dashed #d97706; color: var(--text); background: rgba(253, 230, 138, .25); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; min-height: 28px; padding: 1px 8px; margin-right: 6px; }
.dc-bin-req { background: rgba(253, 230, 138, .3); border-left: 3px solid #d97706; padding: 8px 10px; border-radius: 4px; color: var(--text); }
.badge-costplus { background: #3b2f0b; color: #fde68a; }

/* v1.12.22 Admin › Website Orders */
.wo-status{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:10px 0}
.wo-wait{border:1px solid var(--line,#ddd);border-radius:8px;padding:10px;margin:8px 0}
.wo-map-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin:6px 0}
.wo-map-row input{max-width:220px}
.badge-web { background: #0c3b2e; color: #a7f3d0; text-decoration: none; }
.badge-web-obs { background: #5b1a1a; color: #fecaca; }
.web-badge { background: #5b1a1a; }

/* part # → item link on RO / estimate / invoice lines (t-partlink) */
.dl-sku-wrap { display: flex; align-items: center; gap: 4px; }
.dl-sku-wrap .dl-sku { flex: 1 1 auto; min-width: 0; }
.dl-pn-link { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; border-radius: 8px; color: var(--primary-ink, var(--primary)); border: 1px solid var(--border); background: var(--bg-elev); text-decoration: none; }
.dl-pn-link:hover, .dl-pn-link:focus-visible { background: var(--bg-hover); }
.dl-pn-link .i { width: 16px; height: 16px; }
@media print { .dl-pn-link { display: none !important; } }
@media (max-width: 760px) { .dp-table tr.doc-line:has(.dl-pn-link) { padding-top: 52px; } } /* phone cards: the Decline/✕ cluster sits in its own top band so it never covers the item link */

/* ===== v1.13.1 Kanban cards (print preview shows real size; colors fixed so text reads in every app theme) ===== */
.kb-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.kb-sheet { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.kb-card { box-sizing: border-box; background: #fff; color: #111; border: 1px dashed #888; font-family: Arial, Helvetica, sans-serif; display: flex; flex-direction: column; overflow: hidden; padding: 0 0 .08in; }
.kb-card small { display: block; font-size: 7pt; text-transform: uppercase; letter-spacing: .04em; color: #374151; font-weight: 700; }
.kb-card b { font-weight: 800; color: #111; }
.kb-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: #b91c1c; color: #fff; padding: .05in .1in; font-weight: 800; font-size: 9pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.kb-tag { letter-spacing: .12em; } .kb-headloc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-top { display: flex; gap: .1in; padding: .08in .1in 0; min-height: 0; }
.kb-photo { flex: none; width: 1.45in; height: 1.45in; border: 1px solid #d1d5db; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
.kb-photo img { width: 100%; height: 100%; object-fit: contain; }
.kb-nophoto { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #4b5563; font-size: 7pt; } .kb-nophoto svg { width: 34px; height: 34px; }
.kb-id { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.kb-sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 20pt; line-height: 1.05; overflow-wrap: anywhere; color: #111; }
.kb-name { font-size: 10pt; font-weight: 700; line-height: 1.15; max-height: 4.6em; overflow: hidden; }
.kb-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 8pt; color: #1f2937; }
.kb-locrow, .kb-vendor { display: grid; grid-template-columns: 1fr 1fr; gap: .08in; padding: .06in .1in 0; font-size: 10pt; }
.kb-locrow b, .kb-vendor b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-nums { display: grid; grid-template-columns: 1fr 1fr 1.25fr; margin: .08in .1in 0; border: 2px solid #111; border-radius: 4px; text-align: center; }
.kb-nums > div { padding: .03in 0; } .kb-nums > div + div { border-left: 2px solid #111; }
.kb-nums b { font-size: 22pt; line-height: 1.05; display: block; }
.kb-nums .kb-rq { background: #fee2e2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.kb-codes { display: flex; align-items: center; gap: .1in; padding: .08in .1in 0; margin-top: auto; }
.kb-bc { flex: 1; min-width: 0; text-align: center; } .kb-bc .bc128 { width: 100%; height: .6in; display: block; }
.kb-bctxt { font-family: ui-monospace, Menlo, monospace; font-size: 8pt; }
.kb-qr { flex: none; width: .95in; height: .95in; } .kb-qr svg { width: 100%; height: 100%; display: block; }
.kb-pulled { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px; align-items: end; padding: .08in .1in 0; font-size: 8pt; font-weight: 700; color: #111; }
.kb-pulled i { border-bottom: 1px solid #111; height: 1.1em; }
/* sizes */
.kb-4x6 { width: 4in; height: 6in; }
.kb-letter4 { width: 3.95in; height: 5.15in; }
.kb-letter4 .kb-sku { font-size: 17pt; } .kb-letter4 .kb-photo { width: 1.25in; height: 1.25in; } .kb-letter4 .kb-nums b { font-size: 18pt; } .kb-letter4 .kb-bc .bc128 { height: .5in; } .kb-letter4 .kb-qr { width: .85in; height: .85in; }
.kb-3x5 { width: 3in; height: 5in; padding-bottom: .05in; } /* portrait (Aaron) */
.kb-3x5 .kb-head { padding: .03in .08in; font-size: 7pt; } .kb-3x5 .kb-top { padding: .05in .08in 0; gap: .07in; }
.kb-3x5 .kb-photo { width: .95in; height: .95in; } .kb-3x5 .kb-sku { font-size: 13pt; } .kb-3x5 .kb-name { font-size: 7.5pt; max-height: 3.5em; } .kb-3x5 .kb-meta { font-size: 6.5pt; }
.kb-3x5 .kb-locrow, .kb-3x5 .kb-vendor { font-size: 8pt; padding: .04in .08in 0; } .kb-3x5 .kb-nums { margin: .05in .08in 0; } .kb-3x5 .kb-nums b { font-size: 15pt; }
.kb-3x5 .kb-codes { padding: .04in .08in 0; gap: .06in; } .kb-3x5 .kb-bc .bc128 { height: .42in; } .kb-3x5 .kb-qr { width: .68in; height: .68in; }
.kb-3x5 .kb-pulled { padding: .05in .08in 0; font-size: 7pt; } .kb-3x5 small { font-size: 5.5pt; }
/* black & white */
.kb-bw .kb-head { background: #000; } .kb-bw .kb-nums .kb-rq { background: #e5e7eb; } .kb-bw .kb-photo img { filter: grayscale(1); }
@media print {
  .kb-sheet { display: block; gap: 0; }
  .kb-card { border: 0; margin: 0; break-inside: avoid; page-break-inside: avoid; }
  .kb-sheet-4x6 .kb-card, .kb-sheet-3x5 .kb-card { break-after: page; page-break-after: always; }
  .kb-sheet-4x6 .kb-card:last-child, .kb-sheet-3x5 .kb-card:last-child { break-after: auto; page-break-after: auto; }
  .kb-sheet-letter4 { display: grid; grid-template-columns: 3.95in 3.95in; grid-auto-rows: 5.15in; gap: .1in; justify-content: center; }
  .kb-sheet-letter4 .kb-card { border: 1px dashed #bbb; }
  .kb-sheet-letter4 .kb-card:nth-child(4n) { break-after: page; page-break-after: always; }
}
/* scan → PO question */
.kpo-part { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; } .kpo-img { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 8px; flex: none; border: 1px solid var(--border); }
.kpo-none { display: inline-flex; align-items: center; justify-content: center; color: #4b5563; } .kpo-sku { font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 1.2rem; }
/* Inventory: check items for cards */
.kb-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; } .kb-selbar > span { flex: 1 1 auto; }
.kb-chk { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; flex: none; cursor: pointer; } .kb-chk input { width: 22px; height: 22px; }
.kb-fields { margin-bottom: 0; }
@media print {
  html:has(#kb-sheet), body:has(#kb-sheet) { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body:has(#kb-sheet) .modal-overlay, body:has(#kb-sheet) .modal, body:has(#kb-sheet) .modal-body { padding: 0 !important; margin: 0 !important; background: #fff !important; border: 0 !important; width: auto !important; min-height: 0 !important; height: auto !important; transform: none !important; }
  .kb-sheet { margin: 0 !important; padding: 0 !important; }
}
.kb-4x6 .kb-photo { width: 1.7in; height: 1.7in; }
/* v1.13.3 PressureSoft categories */
.rscat-row { cursor: default; } .rscat-acts { display: inline-flex; gap: 6px; } .rscat-acts .btn-sm { min-height: 40px; }
.rscat-ps .rscat-n { font-weight: 700; }
#cat-add-top { margin: 4px 0 8px; min-height: 44px; }
.newcat-panel { margin-top: 8px; padding: 10px; } .newcat-btns { display: flex; gap: 8px; } .newcat-btns .btn { min-height: 44px; }

/* v1.15 invoice page: QuickBooks status (theme inks keep contrast in every theme) */
.doc-qb { display: inline-block; line-height: 1.5; }
.doc-qb .qb-ok { font-weight: 700; color: var(--text); }
.doc-qb .qb-cm { color: var(--text); }
.doc-qb .qb-pend { color: var(--warm-ink); font-weight: 700; }
.doc-qb .qb-warn { color: var(--warn-ink); font-weight: 700; }

/* v1.16.1 3" x 1" thermal part label (black on white in every theme) */
.pl-3x1 { width: 3in; height: 1in; padding: .05in .1in; display: flex; flex-direction: column; justify-content: space-between; gap: 0; overflow: hidden; color: #000; background: #fff; }
.p3-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; white-space: nowrap; min-width: 0; }
.p3-sku { font-family: Arial, sans-serif; font-weight: 800; font-size: 15pt; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; flex: 0 0 auto; max-width: 100%; color: #000; }
.p3-bin { font-weight: 700; font-size: 9pt; flex: 0 1 auto; max-width: 55%; overflow: hidden; text-overflow: ellipsis; color: #000; }
.p3-name { font-size: 8pt; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #000; }
.p3-bc .bc128 { width: 100%; display: block; }
.pls-3x1 .prod-label + .prod-label { margin-top: 8px; }
@media print { .pls-3x1 .prod-label + .prod-label { margin-top: 0; } .pl-3x1 { border: 0; } .pls-3x1 .prod-label:last-child { page-break-after: auto; break-after: auto; } }
@media print {
  html:has(.pls-3x1), body:has(.pls-3x1) { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body:has(.pls-3x1) .modal-overlay, body:has(.pls-3x1) .modal, body:has(.pls-3x1) .modal-body { padding: 0 !important; margin: 0 !important; background: #fff !important; border: 0 !important; width: auto !important; min-height: 0 !important; height: auto !important; transform: none !important; }
  .pls-3x1 { margin: 0 !important; padding: 0 !important; display: block; }
  .pls-3x1 .pl-3x1 { margin: 0 !important; break-inside: avoid; page-break-inside: avoid; break-after: page; page-break-after: always; }
  .pls-3x1 .pl-3x1:last-child { break-after: auto; page-break-after: auto; }
}

/* v1.17.0 monthly invoice emails preview */
.mi-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mi-preview { margin-top: 10px; padding: 10px; border: 1px solid var(--border, #ccc); border-radius: 8px; background: var(--surface, transparent); color: var(--text, inherit); }
.mi-body { white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; margin: 8px 0; color: inherit; background: transparent; }
.mi-atts a { color: inherit; text-decoration: underline; }

/* v1.17.2 in-app manual page viewer (Parts by model page links) */
.pbv { position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; background: var(--bg); color: var(--text); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.pbv.hidden { display: none; }
body.pbv-open { overflow: hidden; }
.pbv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.pbv-title { flex: 1 1 140px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.pbv-nav, .pbv-zm { display: inline-flex; align-items: center; gap: 4px; }
.pbv-pg { min-width: 92px; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }
.pbv-bar .btn { min-width: 36px; min-height: 36px; color: var(--text); }

.pbv-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; background: #525659; position: relative; }
.pbv-img { display: block; width: 100%; height: auto; margin: 0 auto; background: #fff; transition: opacity .15s; }
.pbv-msg { position: absolute; top: 40%; left: 0; right: 0; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }

/* v1.17.3 Print page (manual page viewer): only the page + a small header, fit to one letter page */
#pbv-print { display: none; }
.pbv-bar .pbv-print { white-space: nowrap; }
@media print {
  @page { size: letter portrait; margin: 0.4in; }
  html.pbv-printing, html:has(body.pbv-printing), body.pbv-printing { color-scheme: light !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #fff !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; height: auto !important; }
  body.pbv-printing #pbv-print, body.pbv-printing #pbv-print * { visibility: visible !important; }
  body.pbv-printing > *:not(#pbv-print) { display: none !important; }
  body.pbv-printing #pbv-print { display: block !important; width: 100%; color: #000; background: #fff; }
  #pbv-print .pbp-head { display: flex; justify-content: space-between; gap: 12px; font: 600 10pt/1.2 -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: #000; border-bottom: 1px solid #000; padding-bottom: 3pt; margin-bottom: 6pt; }
  #pbv-print .pbp-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #pbv-print .pbp-p { white-space: nowrap; }
  #pbv-print .pbp-img { display: block; margin: 0 auto; max-width: 100%; max-height: 9.6in; width: auto; height: auto; object-fit: contain; page-break-inside: avoid; break-inside: avoid; }
}
/* v1.17.5 Salesperson picker + Me button */
.sp-field { display: flex; gap: 6px; align-items: center; min-width: 0; }
.sp-field select { flex: 1 1 auto; min-width: 0; }
.sp-field .sp-me { flex: 0 0 auto; min-height: 36px; }
/* v1.17.7 parts owed + customer deposits */
.pr-bo { font-size: 0.78em; font-weight: 700; white-space: nowrap; }
.dep-banner .dep-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dep-banner .dep-table { margin-top: 6px; width: 100%; }
.dep-banner .dep-acts { white-space: nowrap; text-align: right; }
.dep-banner .dep-acts .btn { margin-left: 4px; }
.ro-owed-badge { margin-left: 6px; }
.verify-banner.dep-banner { background: color-mix(in srgb, var(--green, #16a34a) 10%, transparent); border: 1px solid color-mix(in srgb, var(--green, #16a34a) 45%, transparent); border-left: 4px solid var(--green, #16a34a); color: var(--text); }
.verify-banner.dep-banner strong { color: var(--text); }

/* v1.17.10 audit: aging label on a red tile follows the tile ink */
.cp-ag.bad .lbl { color: inherit; opacity: 0.9; }

/* v1.17.12: tap anywhere on a field job card opens the RO */
.job-card.job-card-tap { cursor: pointer; }
.job-card.job-card-tap:focus-visible { outline: 3px solid var(--primary-ink, var(--primary)); outline-offset: 2px; }
/* v1.17.12: disabled buttons — still look unavailable (muted fill, dashed edge, not-allowed) but the label reads >=4.5:1 in every theme */
.btn:disabled, .btn[disabled], .btn.disabled, button.btn[aria-disabled="true"] {
  background: var(--disabled-bg, #2a2a2a) !important; color: var(--disabled-ink, #c4c4c4) !important;
  border: 1px dashed var(--disabled-line, #555) !important; box-shadow: none !important; filter: none !important;
  opacity: 1 !important; cursor: not-allowed; transform: none !important;
}
.btn:disabled .i, .btn[disabled] .i { color: inherit; fill: currentColor; }
/* v1.18.0 tax rates settings */
.tax-intro { margin: 0 0 8px; line-height: 1.45; }
.tax-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 10px 0; }
/* v1.18.0 past-due warning */
.pdw-list { max-height: 260px; overflow: auto; margin: 8px 0; }
.pdw-buckets { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; }
.pdw-buckets span { white-space: nowrap; }
.pdw-ack { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 6px; font-weight: 600; }
/* v1.18.1 deposit line: amounts never wrap (phone print showed "−" alone) */
.print-doc .pr-sum .pr-line > span:last-child, .doc-totals .dt-row > span:last-child { white-space: nowrap; flex-shrink: 0; }
.print-doc .pr-sum .pr-line > span:first-child, .doc-totals .dt-row > span:first-child { min-width: 0; }
/* v1.18.5 flat-price labor, tech reminders, removed kit labor codes, environmental fee (theme variables only, readable in every theme) */
.badge.dl-flat { display: inline-block; background: var(--accent-dim); color: var(--accent-ink); font-weight: 700; white-space: nowrap; }
.dl-unflat { display: block; margin: 4px 0 0 auto; font-size: 12px; }
.lc-remind { margin-top: 4px; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--amber-ink, #fcd34d); background: var(--amber-tint, rgba(245,158,11,.12)); border: 1px solid var(--amber-line, rgba(245,158,11,.45)); border-radius: 8px; padding: 3px 8px; }
.lc-remind-s { display: block; font-size: 12px; font-weight: 600; color: var(--amber-ink, #fcd34d); }
.lc-hrs small { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.badge.kit-lc-off { display: inline-block; background: var(--amber-tint, rgba(245,158,11,.12)); color: var(--amber-ink, #fcd34d); border: 1px solid var(--amber-line, rgba(245,158,11,.45)); font-size: 11px; }
.doc-totals .dt-envfee .shopsup-pct input { width: 84px; }
/* v1.18.6 special orders — theme variables only (accent / amber / green inks are contrast-managed per theme) */
.badge.so-tag { background: var(--accent-dim); color: var(--accent-ink); border: 1px solid var(--accent); font-weight: 800; white-space: nowrap; }
.dl-c-item .so-tag { display: inline-block; margin-bottom: 4px; font-size: .72rem; padding: 3px 8px; }
.so-banner .so-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.so-banner.so-open { border-color: var(--amber-line); }
.so-needmgr { margin: 6px 0 2px; color: var(--amber-ink); }
.so-checklist { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.so-ck { display: flex; gap: 8px; align-items: baseline; color: var(--text); }
.so-ck-i { font-weight: 900; width: 1.1em; text-align: center; }
.so-ck.so-ok .so-ck-i { color: var(--green-ink); }
.so-ck.so-miss .so-ck-i { color: var(--amber-ink); }
.so-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.so-pol-txt { white-space: pre-wrap; margin: 6px 0; }
.so-badge .so-badge-lbl { font-weight: 900; font-size: .72rem; letter-spacing: .03em; }
.so-queue .badge[class*="so-need-"] { background: var(--amber-tint); color: var(--amber-ink); border: 1px solid var(--amber-line); }
.so-set { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.pr-so-img { max-width: 260px; max-height: 90px; display: block; margin: 6px 0 2px; background: #fff; }
/* v1.18.7 special-order contrast: own neutral tint (like the deposit banner) so text is ≥ 4.5:1 on every theme */
.verify-banner.so-banner { background: color-mix(in srgb, var(--amber, #d97706) 8%, var(--bg)); border: 1px solid var(--amber-line, var(--border)); border-left: 4px solid var(--amber, #d97706); color: var(--text); }
.verify-banner.so-banner.so-done { background: color-mix(in srgb, var(--green, #16a34a) 8%, var(--bg)); border-color: var(--border); border-left-color: var(--green, #16a34a); }
.verify-banner.so-banner strong, .verify-banner.so-banner .card-meta, .so-checklist .card-meta, .so-policy .section-label, .so-queue .card-meta { color: var(--text); opacity: 1; }
/* v1.18.23 Correspondence (sent + replies) — theme variables only, readable in every theme */
.corr-list { display: flex; flex-direction: column; gap: 6px; }
.corr-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text); padding: 8px 10px; }
.corr-item.corr-in { border-left: 4px solid var(--accent); }
.corr-item.corr-out { border-left: 4px solid var(--primary); }
.corr-item > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--text); min-height: var(--tap); }
.corr-subj { color: var(--text); }
.corr-meta { margin: 6px 0; color: var(--text-muted); word-break: break-word; }
.corr-body { white-space: pre-wrap; word-break: break-word; color: var(--text); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; max-height: 420px; overflow: auto; font-size: 0.95em; }
.corr-row { display: flex; flex-direction: column; gap: 4px; }
.corr-row .corr-assign { flex: 1; min-width: 180px; }
#em-from-sel { max-width: 100%; color: var(--text); background: var(--bg-elev); border: 1px solid var(--border); }

/* v1.18.28 customer reply notifications */
.prq-badge.mail-badge .prq-n { background: var(--nav-accent, #f97316); color: #111; }
.prq-panel .mail-reply-item { border-left: 4px solid var(--nav-accent, #f97316); }
.prq-panel .mail-reply-item.mail-read { border-left-color: var(--border); }
.prq-panel.mail-replies-panel { width: min(760px, calc(100vw - 16px)); max-height: min(80vh, 640px); }
.mail-cols, .corr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.mail-col, .corr-col { min-width: 0; background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.mail-col-h, .corr-col-h { margin: 0 0 8px; font-size: 0.95rem; color: var(--text); }
.mail-detail { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.mail-detail-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mail-detail-subj { margin: 4px 0 0; color: var(--text); word-break: break-word; }
.mail-detail-body, .corr-body { white-space: pre-wrap; word-break: break-word; color: var(--text); background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 10px; max-height: min(50vh, 420px); overflow: auto; }
@media (max-width: 700px) {
  .mail-cols, .corr-cols { grid-template-columns: 1fr; }
  .mail-detail-body, .corr-body { max-height: min(60vh, 520px); }
}
.corr-item.corr-unread > summary { font-weight: 700; }
.corr-item.corr-unread { border-left: 3px solid var(--nav-accent, #f97316); padding-left: 6px; }
.badge-reply { background: var(--nav-accent, #f97316); color: #111; font-size: 0.7rem; margin-left: 4px; vertical-align: middle; }
.li-title .badge-reply, .dp-title .badge-reply { display: inline-block; }
.doc-row.has-unread-reply, .list-item.has-unread-reply { box-shadow: inset 3px 0 0 var(--nav-accent, #f97316); }

/* v1.18.49 inbound text replies — theme tokens so the badge stays readable in every color scheme */
.prq-badge.sms-badge .prq-n { background: var(--nav-accent, #f97316); color: #111; }
.prq-panel.sms-replies-panel { width: min(760px, calc(100vw - 16px)); max-height: min(80vh, 640px); }
.prq-panel .sms-reply-item { border-left: 4px solid var(--nav-accent, #f97316); background: var(--bg-elev, transparent); color: var(--text); }
.prq-panel .sms-reply-item.sms-read { border-left-color: var(--border); }
.badge-sms { background: var(--nav-accent, #f97316); color: #111; font-size: 0.7rem; margin-left: 4px; vertical-align: middle; }
.li-title .badge-sms, .dp-title .badge-sms { display: inline-block; }
.list-item.has-unread-text { box-shadow: inset 3px 0 0 var(--nav-accent, #f97316); }
.sms-unmatched { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--text); }
.sms-unmatched h4 { margin: 0 0 8px; font-size: 0.95rem; color: var(--text); }
.sms-test-flag { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); font-size: 0.7rem; margin-left: 4px; vertical-align: middle; padding: 1px 6px; border-radius: 6px; }

/* v1.18.42 — materials used on Recent builds / batches */
.batch-consumed-list { margin: 4px 0 0 1.1rem; padding: 0; }
.batch-consumed-list li { margin: 2px 0; }
.batch-hist { align-items: flex-start; }

/* v1.18.50 in-app email / SMS replies — theme tokens so counters and actions stay readable in every color scheme */
.sms-seg { margin-top: 6px; color: var(--text); font-size: 0.85rem; }
.sms-seg.sms-seg-warn { color: var(--nav-accent, #f97316); }
.sms-targets { display: flex; flex-direction: column; gap: 6px; margin: 0; max-width: 100%; }
.sms-target { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--card, var(--bg-elev, transparent)); cursor: pointer; max-width: 100%; }
.sms-target.sms-target-out { cursor: not-allowed; opacity: 0.85; }
.sms-target input { flex: 0 0 18px; accent-color: var(--nav-accent, var(--primary, #2563eb)); }
.sms-target .sms-target-who { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.sms-target .dropoff-optin-badge { flex: 0 1 auto; }
.sms-target .sms-record-optin { flex: 0 0 auto; min-height: var(--tap, 44px); }
.sms-optin-inline { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card, var(--bg-elev, transparent)); color: var(--text); }
.sms-optin-inline .dropoff-optin-legal { color: var(--muted, var(--text)); }
.sms-tpl { margin: 0 0 10px; }
.sms-st-banner { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--card, var(--bg-elev, transparent)); font-size: 0.9rem; line-height: 1.4; }
.sms-st-banner.warn-text { border-color: var(--nav-accent, #f97316); color: var(--text); }
.sms-target-status { display: inline-block; flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--text); border: 1px solid var(--border); white-space: nowrap; }
.sms-target-status.is-in { border-color: var(--accent, #16a34a); }
.sms-target-status.is-out { border-color: var(--nav-accent, #f97316); white-space: normal; }
#sms-seg.sms-foot-seg { width: 100%; margin: 0 0 2px; order: -1; }
@media (max-width: 600px) {
  .sms-target { align-items: flex-start; }
  .sms-target .sms-target-who { flex-basis: calc(100% - 32px); }
}

.corr-item .prq-acts, .mail-detail-nav .btn-reply { margin-top: 0; }
#sms-from[readonly], #sms-to[readonly] { background: var(--bg-elev, transparent); color: var(--text); }

/* v1.18.65/66 Text picker on the SMS composer (customer Communications → Actions) */
.sms-someone-pick { margin: 0 0 10px; position: relative; max-width: 100%; }
.sms-someone-pick input[type="search"] { width: 100%; min-height: var(--tap, 44px); box-sizing: border-box; }
.sms-someone-hits { z-index: 40; max-height: min(40vh, 280px); overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card, var(--bg-elev, #fff)); color: var(--text); }
.sms-someone-hit { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 10px;
  width: 100%; min-height: var(--tap, 44px); padding: 8px 10px; margin: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); text-align: left; cursor: pointer; box-sizing: border-box; }
.sms-someone-hit:hover, .sms-someone-hit:focus { background: var(--bg-elev, rgba(0,0,0,.06)); }
.sms-someone-hit-main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
#sms-someone-chosen { margin: 6px 0 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .sms-someone-hits { max-height: min(36vh, 240px); }
}



/* v1.18.51 documented SMS consent — theme tokens so the disclosure stays readable in every color scheme */
.sms-consent-box { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev, transparent); color: var(--text); }
.sms-consent-box .sms-consent-label { display: flex; align-items: flex-start; gap: 10px; color: var(--text); cursor: pointer; }
.sms-consent-box .sms-consent-label input { margin-top: 3px; flex: 0 0 auto; }
.sms-consent-box .sms-consent-text { color: var(--text); font-size: 0.9rem; line-height: 1.45; }
.sms-consent-box .sms-consent-src { margin: 8px 0 0; }
.sms-consent-status { color: var(--text); margin: 0 0 8px; font-size: 0.95rem; }
.sms-consent-status.sms-consent-in { color: var(--text); }
.sms-consent-status.sms-consent-out { color: var(--warn-ink, var(--nav-accent, #f97316)); }
.sms-consent-sec .sms-consent-box { margin-top: 0; }

/* v1.18.58 drop-off "OK to text": normal checkbox on the same line as the phone (under it on a phone). Theme tokens. */
/* Don't let form field chrome turn checkboxes into huge bordered squares. */
.field input[type="checkbox"],
.field input[type="radio"],
.field-tap input[type="checkbox"],
.field-tap input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex: 0 0 18px;
  accent-color: var(--primary, var(--nav-accent, #2563eb));
}
.dropoff-phone-wrap { width: 100%; min-width: 0; }
.dropoff-phone-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 12px; width: 100%; min-width: 0; }
.dropoff-phone-row input[type="tel"] { flex: 1 1 auto; width: auto; min-width: 0; max-width: 100%; box-sizing: border-box; }
.dropoff-ok-text,
.field label.dropoff-ok-text,
.field-tap label.dropoff-ok-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 1 auto;
  margin: 0;
  min-width: 0;
}
.dropoff-ok-text input { margin: 0; }
.dropoff-optin-status { color: var(--text); font-size: 0.9rem; margin: 4px 0 0; }
.dropoff-optin-status.sms-consent-in { color: var(--text); }
.dropoff-optin-status.sms-consent-out { color: var(--warn-ink, var(--nav-accent, #f97316)); }
.dropoff-optin-legal { color: var(--muted, var(--text-muted, var(--text))); font-size: 0.8rem; line-height: 1.4; margin: 8px 0 10px; }
.sms-consent-box.sms-consent-compact { margin-top: 0; }
.sms-consent-box .sms-consent-short { color: var(--text); font-weight: 600; font-size: 0.95rem; text-transform: none; letter-spacing: normal; }
.sms-consent-box .sms-consent-label input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--primary, var(--nav-accent, #2563eb));
}
@media (max-width: 480px) {
  .dropoff-phone-row { flex-direction: column; flex-wrap: wrap; align-items: stretch; }
  .dropoff-phone-row input[type="tel"] { width: 100%; flex: 1 1 100%; }
  .dropoff-ok-text, .field label.dropoff-ok-text { white-space: normal; padding: 4px 0; }
}

/* hidden must win over display:inline-flex on the drop-off opt-in label */
.dropoff-ok-text[hidden],
.field label.dropoff-ok-text[hidden],
.field-tap label.dropoff-ok-text[hidden] {
  display: none !important;
}

/* v1.18.60: "How they agreed" picker + already-opted-in / STOP badges (readable in every theme). */
.dropoff-optin-src { margin: 8px 0 0; max-width: 100%; min-width: 0; }
.dropoff-optin-src select { max-width: 100%; }
.dropoff-phone-err { margin: 6px 0 0; }
.dropoff-optin-badge {
  display: block;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
  color: var(--text);
  background: var(--bg-elev, transparent);
  max-width: 100%;
}
.dropoff-optin-badge.dropoff-optin-good {
  border: 1px solid var(--accent, #16a34a);
  box-shadow: inset 4px 0 0 var(--accent, #16a34a);
  color: var(--text);
}
.dropoff-optin-badge.dropoff-optin-out {
  border: 1px solid var(--warn-ink, var(--nav-accent, #f97316));
  box-shadow: inset 4px 0 0 var(--warn-ink, var(--nav-accent, #f97316));
  color: var(--text);
}

/* v1.18.52 website SMS opt-ins to review (theme tokens, readable in all themes) */
.optin-badge .so-badge-lbl { font-weight: 800; font-size: .68rem; letter-spacing: .02em; }
.wo-optin { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.wo-optin-row { padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.wo-optin-row:last-child { border-bottom: 0; }
.wo-optin-row .wo-optin-hits { margin-top: 6px; }
.wo-optin-reason { color: var(--warn-ink, var(--nav-accent, #f97316)); }
#optin-review-panel { max-width: 420px; }
