/* RVBay design system */
:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-2: #f8fafb;
  --line: #e3e8ee;
  --line-2: #eef1f5;
  --text: #0f1b2a;
  --text-2: #475569;
  --muted: #7a8799;
  --brand: #0d9488;
  --brand-2: #0f766e;
  --brand-soft: #e6f6f4;
  --accent: #f59e0b;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --warn: #d97706;
  --warn-soft: #fff4e0;
  --ok: #16a34a;
  --ok-soft: #e8f7ee;
  --info: #2563eb;
  --info-soft: #e9f0fe;
  --side: #0b1f2a;
  --side-2: #12303e;
  --side-text: #c4d3dc;
  --shadow-sm: 0 1px 2px rgba(15, 27, 42, 0.06);
  --shadow: 0 1px 3px rgba(15, 27, 42, 0.06), 0 6px 16px -6px rgba(15, 27, 42, 0.08);
  --shadow-lg: 0 24px 60px -12px rgba(15, 27, 42, 0.28);
  --r: 12px;
  --r-sm: 8px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b131b;
  --panel: #111c26;
  --panel-2: #0e1821;
  --line: #213140;
  --line-2: #1a2834;
  --text: #e6edf3;
  --text-2: #a9b7c4;
  --muted: #7d8d9c;
  --brand: #2dd4bf;
  --brand-2: #14b8a6;
  --brand-soft: #0f2e2c;
  --danger-soft: #3a1717;
  --warn-soft: #382a10;
  --ok-soft: #12301f;
  --info-soft: #14233f;
  --side: #08111a;
  --side-2: #10202c;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 16px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); text-decoration: none; }
[data-theme="dark"] a:not([class]) { color: var(--brand); }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.grow { flex: 1; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ic { flex: none; vertical-align: middle; }
.hidden { display: none !important; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--panel); }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }

/* ------------------------------- layout ------------------------------- */
#app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex: none; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; }
.brand { padding: 16px 16px 10px; }
.brand-link { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.brand-link span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-link b { font-size: 17px; letter-spacing: -0.02em; }
.brand-link small { color: var(--side-text); opacity: 0.75; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px; }
.nav-sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: #6f8796; padding: 16px 10px 6px; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); font-weight: 500; text-decoration: none !important; width: 100%; background: none; border: 0; font: inherit; cursor: pointer; transition: background 0.15s, color 0.15s; }
.nav-item:hover { background: var(--side-2); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(45, 212, 191, 0.18), rgba(45, 212, 191, 0.04)); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
.board-tabs a[draggable="true"] { -webkit-user-drag: element; }
.board-tabs a.dragging { opacity: 0.4; }
.board-tabs a.drop-l { box-shadow: inset 3px 0 0 var(--brand); }
.board-tabs a.drop-r { box-shadow: inset -3px 0 0 var(--brand); }
.msg-failed { color: var(--danger); font-weight: 600; }
.bubble.out .msg-failed { color: #fecaca; }
.msgr-name { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.msgr-name > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgr-ros { display: inline-flex; gap: 4px; flex: none; }
.msgr-ro { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-2); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); cursor: pointer; line-height: 17px; }
.msgr-ro:hover, .msgr-ro:focus-visible { background: var(--brand); color: #fff; outline: none; }
.msgr-ro.more { cursor: default; background: var(--panel-2); color: var(--muted); border-color: var(--line); }
.msgr-ro.more:hover { background: var(--panel-2); color: var(--muted); }
/* inspections */
.insp-wrap { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.insp { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.insp-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.insp-head b { display: flex; align-items: center; gap: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; flex: 1; }
.insp-sum { display: flex; gap: 5px; align-items: center; font-size: 12px; }
.insp-sum i { font-style: normal; font-weight: 700; color: #fff; background: var(--c); border-radius: 9px; padding: 0 7px; line-height: 18px; }
.insp-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-top: 1px solid var(--line-2); }
.insp-row:first-of-type { border-top: 0; }
.insp-row.good { background: color-mix(in srgb, #16a34a 6%, transparent); }
.insp-row.fair { background: color-mix(in srgb, #f59e0b 12%, transparent); }
.insp-row.bad { background: color-mix(in srgb, #dc2626 10%, transparent); }
.insp-btns { display: flex; gap: 4px; flex: none; }
.insp-b { width: 28px; height: 28px; border-radius: 7px; border: 1.5px solid color-mix(in srgb, var(--c) 45%, var(--line)); background: var(--panel); color: var(--c); display: grid; place-items: center; padding: 0; cursor: pointer; }
.insp-b.on { background: var(--c); color: #fff; border-color: var(--c); }
.insp-b:disabled { cursor: default; opacity: 0.55; }
.insp-b.on:disabled { opacity: 1; }
.insp-label { font-weight: 600; font-size: 13.5px; min-width: 120px; flex: 0 1 220px; }
.insp-note { flex: 1; min-width: 120px; }
.insp-add { padding: 6px 10px; border-top: 1px solid var(--line-2); }
.insp-add .input { width: 100%; }
@media (max-width: 700px) { .insp-row { flex-wrap: wrap; } .insp-note { flex-basis: 100%; } }
/* recommendations */
.recs-card { border-color: #fcd34d; background: color-mix(in srgb, #f59e0b 5%, var(--panel)); }
.rec-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.rec-row:first-child { border-top: 0; }
.rec-row .grow { min-width: 0; }
.rec-row b { display: block; }
.rec-row small { color: var(--muted); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.list-hint { margin: 0 0 8px; text-align: right; }
.list-hint .link-btn, .link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--brand-2); cursor: pointer; }
.sortable-table th[data-col] { cursor: grab; user-select: none; position: relative; white-space: nowrap; }
.sortable-table th[data-col]:hover { color: var(--text); background: var(--panel-2); }
.sortable-table th.sorted { color: var(--brand-2); }
.sortable-table th .th-in { display: inline-flex; align-items: center; gap: 5px; }
.sortable-table th.num .th-in { justify-content: flex-end; width: 100%; }
.sortable-table th .sort-ic { font-size: 9px; opacity: 0.35; }
.sortable-table th.sorted .sort-ic { opacity: 1; }
.sortable-table th.dragging { opacity: 0.4; cursor: grabbing; }
.sortable-table th.drop-l { box-shadow: inset 3px 0 0 var(--brand); }
.sortable-table th.drop-r { box-shadow: inset -3px 0 0 var(--brand); }
.svc-cell { min-width: 150px; }
.svc-cell .link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--brand-2); cursor: pointer; }
.svc-cell .link-btn:hover { text-decoration: underline; }
.svc-list { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }
.svc-list li { margin: 2px 0; }
.svc-list li.done { color: var(--muted); }
.nav-item.active .ic { color: #5eead4; }
.nav-item .ic { width: 21px; height: 21px; flex: none; }
@media (min-width: 901px) { body.nav-mini .nav-item .ic { width: 26px; height: 26px; } body.nav-mini .nav-item { padding: 11px 0; } body.nav-mini .nav-toggle .ic { width: 24px; height: 24px; } }
.nav-badge.danger { background: #ef4444; color: #fff; }
.nav-badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: #f59e0b; color: #1f1300; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.nav-foot { padding: 10px; border-top: 1px solid var(--side-2); }
.nav-note { font-size: 11.5px; color: #fbbf24; padding: 6px 10px 8px; display: flex; gap: 6px; align-items: center; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 22px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(1.5) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.view { flex: 1; min-width: 0; }
.view.fade-in > * { animation: fadeUp 0.22s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page { padding: 22px 26px 100px; max-width: 1480px; margin: 0 auto; } /* bottom room so the chat bubble never covers the last row */
.page-narrow { max-width: 1100px; }
.page-cust { max-width: 1320px; }
.hist-table td:nth-child(3) { min-width: 190px; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.crumb a { color: var(--muted); }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); border-radius: 10px; width: min(440px, 46vw); cursor: pointer; font: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.search-trigger:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.search-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.shift-btn.on { color: var(--ok); }
.shift-btn.on .ic { animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.mobile-only { display: none !important; }
.scrim { display: none; }

/* ------------------------------- buttons ------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background 0.15s, border-color 0.15s, transform 0.06s, box-shadow 0.15s; }
.btn:hover { background: var(--panel-2); border-color: color-mix(in srgb, var(--text) 18%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; box-shadow: 0 1px 2px rgba(13, 148, 136, 0.3); }
.btn-primary:hover { background: #0b5f59; border-color: #0b5f59; }
[data-theme="dark"] .btn-primary { background: #0f766e; border-color: #14b8a6; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-warn { background: #f59e0b; border-color: #f59e0b; color: #1f1300; }
.btn-warn:hover { background: #d97706; border-color: #d97706; }
.job-state { gap: 5px; }
.job-state .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: jc-pulse 1.4s ease-in-out infinite; }
@keyframes jc-pulse { 50% { opacity: 0.25; } }
.job-clock-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.jc-icons { display: inline-flex; gap: 4px; flex: none; }
.jc-icons:empty { display: none; }
.tech-job-title { margin-top: 8px; gap: 10px; align-items: center; }
.jc-lg .jc-btn { width: 44px; height: 44px; }
.jc-lg .jc-btn .ic { width: 20px; height: 20px; }
.jc-btn { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--panel); color: var(--text-2); display: grid; place-items: center; cursor: pointer; padding: 0; transition: transform 0.1s, background 0.15s; }
.jc-btn:hover:not([disabled]) { transform: scale(1.08); }
.jc-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.jc-play { color: #16a34a; border-color: #86efac; }
.jc-play:hover:not([disabled]) { background: #16a34a; color: #fff; border-color: #16a34a; }
.jc-play.running { background: #dcfce7; }
.jc-pause { background: #f59e0b; border-color: #f59e0b; color: #1f1300; animation: jc-glow 1.6s ease-in-out infinite; }
@keyframes jc-glow { 50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.25); } }
.jc-done:hover:not([disabled]) { color: #16a34a; border-color: #16a34a; }
.jc-done.on { background: #16a34a; border-color: #16a34a; color: #fff; }
span.jc-btn { cursor: default; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); border-color: transparent; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer; transition: background 0.15s; flex: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); }
.btn-group button { border: 0; background: none; padding: 0 12px; height: 34px; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-group button + button { border-left: 1px solid var(--line); }
.btn-group button.on { background: var(--brand-soft); color: var(--brand-2); }
[data-theme="dark"] .btn-group button.on { color: var(--brand); }

/* ------------------------------- dropdowns ------------------------------- */
.dd { position: relative; }
.dd-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.dd-menu.right { left: auto; right: 0; }
.dd.open .dd-menu { display: block; animation: pop 0.14s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.dd-menu > button, .dd-menu > a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 7px; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; text-decoration: none !important; }
.dd-menu > button:hover, .dd-menu > a:hover { background: var(--panel-2); }
.dd-menu > button .ic, .dd-menu > a .ic { color: var(--muted); }
.dd-menu .danger { color: var(--danger) !important; }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.dd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; display: flex; flex-direction: column; }
.dd-head small { color: var(--muted); }

/* ------------------------------- cards & panels ------------------------------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-body { padding: 14px 18px; }
.card + .card { margin-top: 14px; }
.grid > .card + .card, .split > .card + .card, .landing-feats > .card + .card { margin-top: 0; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1fr) 420px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.kpi { padding: 16px 18px; position: relative; overflow: hidden; display: block; color: inherit; text-decoration: none !important; transition: transform 0.15s, box-shadow 0.15s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi-value { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; margin-top: 6px; }
.kpi-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.kpi-ic { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--c-soft, var(--brand-soft)); color: var(--c, var(--brand-2)); }
.delta { font-size: 12px; font-weight: 700; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }

/* ------------------------------- chips & badges ------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: color-mix(in srgb, var(--c, #64748b) 13%, transparent); color: color-mix(in srgb, var(--c, #64748b) 85%, var(--text)); white-space: nowrap; border: 0; }
.chip-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, #64748b); }
.chip-outline { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
.badge-ok { --c: var(--ok); }
.badge-warn { --c: var(--warn); }
.badge-danger { --c: var(--danger); }
.badge-info { --c: var(--info); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; flex: none; letter-spacing: 0; box-shadow: 0 0 0 2px var(--panel); }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--c, var(--muted)); flex: none; }

/* ------------------------------- forms ------------------------------- */
.input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
textarea.input { height: auto; min-height: 72px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
select.input { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8799' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.input-sm { height: 32px; font-size: 13px; padding: 0 9px; border-radius: 8px; }
.input-bare { border-color: transparent; background: transparent; padding: 0 6px; height: 30px; }
.input-bare:hover { border-color: var(--line); background: var(--panel); }
.input-bare:focus { background: var(--panel); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--brand-2); }
.toggle { position: relative; width: 38px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: 0.2s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: 0.2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.toggle input:checked + span { background: var(--brand-2); }
.toggle input:checked + span::after { transform: translateX(16px); }
.search { position: relative; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 34px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { width: 300px; max-width: 100%; }
.toolbar select.input { width: auto; min-width: 140px; }
.seg { display: inline-flex; gap: 4px; padding: 3px; background: var(--line-2); border-radius: 10px; }
.seg button, .seg a { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; text-decoration: none !important; display: inline-flex; gap: 6px; align-items: center; }
.seg .on { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.seg em { font-style: normal; font-size: 11px; background: var(--line); border-radius: 99px; padding: 0 6px; }

/* picker */
.picker { position: relative; }
.picker-box { position: relative; }
.picker-box .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.picker-box .input { padding-left: 34px; }
.picker-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; z-index: 80; padding: 4px; }
.picker-row { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 7px; font: inherit; color: var(--text); cursor: pointer; }
.picker-row small { color: var(--muted); font-size: 12px; }
.picker-row.active, .picker-row:hover { background: var(--brand-soft); }
.picker-create { flex-direction: row; align-items: center; gap: 6px; color: var(--brand-2); font-weight: 600; border-top: 1px solid var(--line-2); border-radius: 0 0 7px 7px; }
.picker-empty { padding: 10px; color: var(--muted); }

/* ------------------------------- tables ------------------------------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; position: sticky; top: 0; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; transition: background 0.1s; }
.table tbody tr.click:hover { background: var(--panel-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.tight, .table th.tight { width: 1%; white-space: nowrap; }
.table-sm td { padding: 7px 10px; }
.table-sm th { padding: 7px 10px; }
.cell-main { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.lines td { padding: 4px 6px; border-bottom: 1px dashed var(--line-2); }
.lines th { padding: 6px; background: none; position: static; }
.lines input.input { height: 32px; }
.lines .num input { text-align: right; }
.tr-warn td { background: color-mix(in srgb, var(--warn) 7%, transparent); }

/* ------------------------------- board ------------------------------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding: 0 26px 30px; min-height: calc(100vh - 190px); scroll-snap-type: x proximity; }
.col { flex: 0 0 292px; display: flex; flex-direction: column; background: color-mix(in srgb, var(--line-2) 70%, transparent); border-radius: 14px; max-height: calc(100vh - 200px); scroll-snap-align: start; transition: background 0.15s, box-shadow 0.15s; }
.col.drop { background: color-mix(in srgb, var(--brand) 12%, var(--line-2)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 50%, transparent); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; font-weight: 700; }
.col-head .count { background: var(--panel); border-radius: 99px; padding: 0 8px; font-size: 12px; color: var(--text-2); box-shadow: var(--shadow-sm); }
.col-head .sum { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.col-body { padding: 2px 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; min-height: 80px; }
.ro-card { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; cursor: grab; box-shadow: var(--shadow-sm); transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s; display: block; color: inherit; text-decoration: none !important; position: relative; }
.ro-card:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.ro-card.dragging { opacity: 0.45; transform: rotate(1.5deg); }
.ro-card.high { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-sm); }
.ro-card .top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ro-card .top b { color: var(--text); font-size: 13px; }
.ro-card .name { font-weight: 650; margin-top: 5px; font-size: 14px; }
.ro-card .unit { color: var(--text-2); font-size: 12.5px; display: flex; gap: 5px; align-items: center; }
.ro-card .concern { font-size: 12.5px; color: var(--muted); margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ro-card .foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.ro-card .foot .amt { margin-left: auto; font-weight: 700; font-size: 13px; }
.ro-card .late { color: var(--danger); font-weight: 700; }
.ro-card .menu-btn { position: absolute; right: 6px; top: 6px; opacity: 0; transition: opacity 0.15s; }
.ro-card:hover .menu-btn, .ro-card .dd.open .menu-btn { opacity: 1; }

/* ------------------------------- repair order ------------------------------- */
.stepper { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 2px; }
.step { flex: 1; min-width: 110px; border: 0; background: var(--line-2); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 650; padding: 9px 10px; cursor: pointer; text-align: center; transition: background 0.15s, color 0.15s; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%, 9px 50%); }
.step:first-child { border-radius: 9px 0 0 9px; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); }
.step:last-child { border-radius: 0 9px 9px 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 9px 50%); }
.step:hover { background: var(--line); color: var(--text); }
.step.done { background: color-mix(in srgb, var(--c) 18%, var(--line-2)); color: color-mix(in srgb, var(--c) 80%, var(--text)); }
.step.cur { background: var(--c); color: #fff; }
.job { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; box-shadow: var(--shadow-sm); }
.job + .job { margin-top: 12px; }
.job.declined { opacity: 0.6; }
.job.declined .job-title-input { text-decoration: line-through; }
.job-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); background: var(--panel-2); flex-wrap: wrap; }
.job-num { width: 26px; height: 26px; border-radius: 8px; background: var(--c, var(--brand-2)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.job-title-input { font-weight: 650; font-size: 15px; flex: 1 1 260px; min-width: 200px; }
.job-body { padding: 12px 14px; }
.three-c { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.three-c textarea { min-height: 62px; font-size: 13px; }
.job-foot { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.job-total { margin-left: auto; font-weight: 750; font-size: 15px; }
.status-pills { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--panel); }
.status-pills button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 650; padding: 4px 10px; cursor: pointer; color: var(--muted); }
.status-pills button.on.pending { background: var(--warn-soft); color: var(--warn); }
.status-pills button.on.approved { background: var(--ok-soft); color: var(--ok); }
.status-pills button.on.declined { background: var(--danger-soft); color: var(--danger); }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin: 4px 0 6px; display: flex; align-items: center; gap: 8px; }
.totals { width: 100%; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.totals .t-big { font-size: 18px; font-weight: 750; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.totals .t-bal { font-size: 15px; font-weight: 700; color: var(--danger); }
.totals .t-bal.paid { color: var(--ok); }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 18px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 15px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline small { color: var(--muted); display: block; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 13.5px; white-space: pre-wrap; }
.note + .note { margin-top: 8px; }
.note.cust { background: var(--info-soft); border-color: transparent; }
.note-meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 6px; align-items: center; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.photos img, .photo-add { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; cursor: zoom-in; background: var(--line-2); display: block; }
.photo-add { display: grid; place-items: center; border: 1.5px dashed var(--line); color: var(--muted); cursor: pointer; background: none; }
.photo-add:hover { border-color: var(--brand); color: var(--brand); }
.lightbox { position: fixed; inset: 0; background: rgba(5, 12, 18, 0.88); z-index: 200; display: grid; place-items: center; cursor: zoom-out; animation: fadeUp 0.15s; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 10px; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; background: var(--info-soft); color: var(--text); font-size: 13.5px; }
.callout.warn { background: var(--warn-soft); }
.callout.ok { background: var(--ok-soft); }
.callout.danger { background: var(--danger-soft); }
.callout .ic { margin-top: 1px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none !important; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--panel-2); margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.list-row .meta { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--muted); flex: none; }
.list-row .ttl { font-weight: 600; }
.list-row .sub { font-size: 12.5px; color: var(--muted); }
.pipe { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line-2); }
.pipe span { height: 100%; transition: width 0.4s; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ------------------------------- schedule ------------------------------- */
.cal { display: grid; grid-template-columns: 56px repeat(7, minmax(120px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.cal-head { position: relative; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px; text-align: center; font-weight: 650; font-size: 12.5px; color: var(--text-2); }
.cal-head.today { color: var(--brand-2); }
.cal-head.click { cursor: pointer; }
.cal-head.click:hover { background: var(--panel-2, #f5f5f4); }
.cal-head .d { font-size: 20px; font-weight: 750; color: var(--text); display: block; }
.cal.cal-1 { grid-template-columns: 56px 1fr; }
.seg.seg-sm a { padding: 6px 10px; }
.cal-head.picked { background: color-mix(in srgb, var(--brand) 9%, var(--panel)); color: var(--brand-2); }
.cal-head.picked .d { color: var(--brand-2); }
.calpick-wrap { position: relative; }
.calpick { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 292px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.18)); padding: 12px; }
.calpick[hidden] { display: none; }
.cp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cp-head b { font-size: 14.5px; }
.cp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cp-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 0 4px; }
.cp-day { position: relative; height: 34px; border: 0; border-radius: 8px; background: none; font: 600 13px var(--font, inherit); color: var(--text); cursor: pointer; }
.cp-day:hover { background: var(--line-2); }
.cp-day.out { color: var(--muted); opacity: 0.55; }
.cp-day.past { color: var(--muted); }
.cp-day.today { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-2); }
.cp-day.sel { background: var(--brand); color: #fff; }
.cp-day i { position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent, #f59e0b); }
.cp-day.sel i { background: #fff; }
.cp-quick { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.cp-quick button { flex: 1 1 28%; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 5px 7px; font: 600 12px var(--font, inherit); color: var(--text-2); cursor: pointer; }
.cp-quick button:hover { border-color: var(--brand); color: var(--brand-2); }
.cal-head.today .d { color: #fff; background: var(--brand-2); border-radius: 50%; width: 34px; height: 34px; line-height: 34px; margin: 2px auto 0; }
.cal-times { border-right: 1px solid var(--line); }
.cal-time { height: 52px; font-size: 11px; color: var(--muted); text-align: right; padding: 2px 8px 0 0; }
.cal-day { position: relative; border-right: 1px solid var(--line-2); }
.cal-day:last-child { border-right: 0; }
.cal-day.today { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.cal-slot { height: 52px; border-bottom: 1px solid var(--line-2); cursor: copy; }
.cal-slot:hover { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.appt { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 7px; font-size: 12px; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--c) 16%, var(--panel)); border-left: 3px solid var(--c); color: var(--text); transition: box-shadow 0.15s, transform 0.1s; line-height: 1.3; }
.appt:hover { box-shadow: var(--shadow); z-index: 3; }
.appt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt small { color: var(--text-2); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* ------------------------------- tech view ------------------------------- */
.tech-job { padding: 16px; }
.tech-job + .tech-job { margin-top: 12px; }
.tech-job.running { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.timer { font-variant-numeric: tabular-nums; font-weight: 750; font-size: 15px; color: var(--ok); }

/* ------------------------------- messages ------------------------------- */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 480px; overflow: hidden; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; }
.inbox-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none !important; }
.inbox-item:hover { background: var(--panel-2); }
.inbox-item.on { background: var(--brand-soft); }
.inbox-item .row b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: flex; flex-direction: column; min-height: 0; }
.thread-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 72%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.out { align-self: flex-end; background: var(--brand-2); color: #fff; border-bottom-right-radius: 5px; }
.bubble.in { align-self: flex-start; background: var(--line-2); border-bottom-left-radius: 5px; }
.bubble.call { align-self: center; background: var(--warn-soft); border-radius: 10px; font-size: 12.5px; max-width: 90%; }
.bubble-meta { font-size: 11px; opacity: 0.75; margin-top: 3px; }
.composer { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 160px; }

/* ------------------------------- charts ------------------------------- */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { transition: opacity 0.15s; }
.chart .bar:hover { opacity: 0.8; }
.hbar { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 13px; }
.hbar .lbl { width: 150px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .track { display: block; flex: 1; height: 9px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.hbar .fill { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--brand)); }
.hbar .val { width: 86px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ------------------------------- modal / palette / toast ------------------------------- */
.modal-wrap, .palette-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 17, 26, 0.5); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.12s; }
.modal-wrap.open .modal-backdrop, .palette-wrap.open .modal-backdrop { opacity: 1; }
.modal { position: relative; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; opacity: 0; transform: translateY(6px) scale(0.99); transition: opacity 0.12s, transform 0.12s; display: flex; flex-direction: column; max-height: 88vh; }
.modal-wrap.open .modal { opacity: 1; transform: none; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 1000px; }
.modal-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 12px; }
.modal-head > div { flex: 1; }
.modal-head p { margin: 3px 0 0; font-size: 13px; }
.modal-body { padding: 4px 20px 16px; overflow-y: auto; }
/* In a dialog the search results push content down instead of being clipped to two rows. */
.modal .picker-list { position: static; margin-top: 4px; max-height: 300px; box-shadow: var(--shadow-sm); }
/* Locked fields look locked. */
.input:disabled, .input[disabled] { background: color-mix(in srgb, var(--line-2) 60%, var(--panel)); color: var(--text-2); border-color: transparent; cursor: not-allowed; box-shadow: none; }
.modal-foot { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line-2); background: var(--panel-2); border-radius: 0 0 16px 16px; }
.palette { position: relative; width: 100%; max-width: 640px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; opacity: 0; transform: translateY(-6px); transition: 0.15s; }
.palette-wrap.open .palette { opacity: 1; transform: none; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; border: 0; outline: 0; height: 56px; font: inherit; font-size: 16px; background: none; color: var(--text); }
.palette-results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.palette-group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; padding: 10px 10px 4px; }
.palette-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.palette-row span { display: flex; flex-direction: column; min-width: 0; }
.palette-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-row .ic { color: var(--muted); }
.palette-row.active { background: var(--brand-soft); }
.palette-row.active .ic { color: var(--brand-2); }
.palette-empty { padding: 28px; text-align: center; color: var(--muted); }
.kbd-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #0f1b2a; color: #fff; padding: 10px 14px; border-radius: 11px; box-shadow: var(--shadow-lg); font-weight: 500; opacity: 0; transform: translateY(10px); transition: 0.22s; max-width: 92vw; }
.toast.show { opacity: 1; transform: none; }
.toast-ok .ic { color: #4ade80; }
.toast-err { background: #7f1d1d; }
.toast-btn { border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font: inherit; font-weight: 700; padding: 4px 10px; border-radius: 7px; cursor: pointer; }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .ic { color: color-mix(in srgb, var(--muted) 60%, transparent); }
.empty h3 { color: var(--text); margin: 10px 0 4px; }
.empty p { margin-bottom: 12px; }
.empty-sm { padding: 18px; }

/* ------------------------------- login & public ------------------------------- */
.auth { min-height: 100vh; width: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at 10% 10%, #115e59 0%, transparent 60%), radial-gradient(900px 600px at 90% 90%, #0b3b52 0%, transparent 60%), #071a24; color: #d5e7ea; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: 40px; line-height: 1.1; color: #fff; max-width: 520px; letter-spacing: -0.03em; }
.auth-art p { font-size: 16px; max-width: 460px; color: #a8c4ca; margin-top: 14px; }
.auth-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 520px; }
.auth-feats div { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #c4dadd; }
.auth-feats .ic { color: #5eead4; margin-top: 1px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--panel); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 24px; margin-bottom: 4px; }
.demo-accts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.demo-accts button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; cursor: pointer; font: inherit; color: var(--text); transition: border-color 0.15s, background 0.15s; }
.demo-accts button:hover { border-color: var(--brand); background: var(--brand-soft); }
.demo-accts small { display: block; color: var(--muted); font-size: 11.5px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 8px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.pub { max-width: 760px; margin: 0 auto; padding: 28px 16px 80px; }
.pub-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pub-job { padding: 16px; }
.pub-job + .pub-job { margin-top: 12px; }
.pub-job.declined { opacity: 0.6; }
.decide { display: flex; gap: 8px; margin-top: 12px; }
.decide button { flex: 1; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--panel); font: inherit; font-weight: 700; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.decide button.on.yes { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.decide button.on.no { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.sticky-total { position: sticky; bottom: 12px; margin-top: 18px; }
.boot { min-height: 100vh; width: 100%; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-error { margin: auto; text-align: center; padding: 40px; }
.boot-error h2 { margin: 10px 0; }

/* ------------------------------- print docs ------------------------------- */
.doc { max-width: 860px; margin: 24px auto; background: #fff; color: #111; padding: 44px 48px; border-radius: 6px; box-shadow: var(--shadow); font-size: 13px; }
.doc h1 { font-size: 24px; }
.doc .doc-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #111; padding-bottom: 16px; margin-bottom: 18px; }
.doc .doc-meta { text-align: right; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.doc th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #555; border-bottom: 1px solid #bbb; padding: 6px 4px; }
.doc td { padding: 6px 4px; border-bottom: 1px solid #eee; vertical-align: top; }
.doc .num { text-align: right; white-space: nowrap; }
.doc .job-h { margin-top: 14px; font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; }
.doc .three { color: #333; margin: 4px 0; }
.doc .tot { width: 300px; margin-left: auto; }
.doc .tot div { display: flex; justify-content: space-between; padding: 3px 0; }
.doc .tot .big { font-size: 16px; font-weight: 800; border-top: 2px solid #111; margin-top: 4px; padding-top: 6px; }
.doc .sig { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.doc .sig div { border-top: 1px solid #111; padding-top: 4px; font-size: 11px; color: #555; }
.doc-bar { max-width: 860px; margin: 18px auto 0; display: flex; gap: 8px; }
body.print-mode .sidebar, body.print-mode .topbar { display: none; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .doc-bar, #toasts { display: none !important; }
  .doc { box-shadow: none; margin: 0; padding: 0; max-width: none; }
}

/* ------------------------------- responsive ------------------------------- */
@media (max-width: 1180px) {
  .split, .split-wide { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform 0.22s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 35; cursor: pointer; animation: scrim-in 0.2s ease; -webkit-tap-highlight-color: transparent; }
  .sidebar { z-index: 40; width: min(240px, 66vw); }
  .nav-close { margin-left: auto; color: var(--side-text) !important; width: 40px; height: 40px; }
  body.nav-open { overflow: hidden; }
  body.nav-open #msgr { display: none; }
  .mobile-only { display: inline-grid !important; }
  .topbar { padding: 0 12px; gap: 6px; }
  .search-trigger { width: auto; flex: 1; }
  .search-trigger kbd { display: none; }
  .hide-sm { display: none; }
  .shift-btn span { display: none; }
  .page { padding: 16px 14px 60px; }
  .board { padding: 0 14px 24px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .three-c { grid-template-columns: 1fr; }
  .form-grid, .form-grid.g3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .cal { grid-template-columns: 44px repeat(7, minmax(92px, 1fr)); }
  .doc { padding: 22px; margin: 10px; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 16px 16px 0 0; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 21px; }
  .search-trigger span { display: none; }
  .search-trigger { flex: 0; }
  .toolbar .search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.ic.ok { color: var(--ok); }

/* ------------------------------- landing ------------------------------- */
.landing { width: 100%; min-height: 100vh; background: radial-gradient(1000px 500px at 10% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%), var(--bg); }
.landing-nav { display: flex; align-items: center; gap: 8px; padding: 18px 28px; max-width: 1180px; margin: 0 auto; }
.landing-hero { max-width: 820px; margin: 0 auto; padding: 56px 24px 30px; text-align: center; }
.landing-hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.03em; }
.landing-hero > p { font-size: 17px; color: var(--text-2); margin: 16px auto 26px; max-width: 640px; }
.find-store { text-align: left; padding: 18px; max-width: 560px; margin: 0 auto 14px; }
.find-store .row { margin-top: 8px; }
.slug-input { flex: 1; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); padding-right: 12px; }
.slug-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.slug-input .input { border: 0; box-shadow: none !important; height: 46px; font-size: 16px; }
.slug-input span { color: var(--muted); white-space: nowrap; }
.landing-feats { max-width: 1180px; margin: 20px auto; padding: 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-feats .ic { color: var(--brand-2); }
.landing-foot { text-align: center; padding: 30px; }
@media (max-width: 800px) { .landing-feats { grid-template-columns: 1fr; } .find-store .row { flex-direction: column; align-items: stretch; } }
/* landing: tech app + Bayview showcases */
.landing-show { max-width: 1180px; margin: 56px auto 0; padding: 48px 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 40px 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; }
.landing-show-copy { flex: 1 1 380px; min-width: 0; }
.landing-show h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.12; letter-spacing: -0.025em; margin: 14px 0 12px; }
.landing-show p { font-size: 16.5px; color: var(--text-2); line-height: 1.65; margin: 0 0 18px; }
.landing-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-2); background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; }
.landing-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.landing-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.landing-list .ic { color: var(--brand-2); flex: none; margin-top: 2px; }
.landing-phones { flex: 1 1 420px; min-width: 0; display: flex; justify-content: center; gap: 20px; align-items: flex-end; }
.landing-phones img { width: min(46%, 240px); height: auto; border-radius: 28px; border: 8px solid #0b1622; box-shadow: 0 24px 50px rgba(8, 17, 26, 0.25); }
.landing-phones img:last-child { transform: translateY(-24px); }
.landing-show-dark { background: #0b1622; border-color: #0b1622; color: #e6ecf2; }
.landing-show-dark p { color: #a9b6c3; }
.landing-show-dark .landing-tag { background: rgba(242, 169, 59, 0.16); color: #fbcb7a; }
.landing-show-dark .landing-list .ic { color: #5eead4; }
.landing-tv { flex: 1.4 1 520px; min-width: 0; margin: 0; }
.landing-tv img { width: 100%; height: auto; display: block; border-radius: 10px; border: 10px solid #050b12; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); }
.landing-cta { max-width: 760px; margin: 64px auto 0; padding: 0 24px; text-align: center; }
.landing-cta h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; margin: 0 0 8px; }
.landing-cta p { margin: 0 0 22px; }
@media (max-width: 800px) { .landing-show { margin: 32px 16px 0; padding: 28px 22px; } }

/* ------------------------------- platform ------------------------------- */
.plat { width: 100%; min-height: 100vh; }
.plat-top { display: flex; align-items: center; gap: 10px; padding: 14px 26px; background: var(--side); color: #fff; }
.plat-top a, .plat-top button { color: #cfe3e8; }
.plat-top .seg { background: rgba(255, 255, 255, 0.08); }
.plat-top .seg a { color: #cfe3e8; }
.plat-top .seg .on { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; }

/* ------------------------------- board tabs ------------------------------- */
.board-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--line-2); border-radius: 12px; margin-bottom: 14px; }
.board-tabs::-webkit-scrollbar { display: none; }
.board-tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 7px 8px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none !important; transition: background 0.15s, color 0.15s; }
.board-tabs a:hover { background: color-mix(in srgb, var(--panel) 60%, transparent); color: var(--text); }
.board-tabs a.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.board-tabs em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; text-align: center; padding: 1px 5px; border-radius: 99px; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text-2); }
.board-tabs a.on em { background: var(--brand-soft); color: var(--brand-2); }
.board-tabs em.hot { background: var(--accent) !important; color: #1f1300 !important; }
.mine-board .col { flex: 1 1 320px; max-width: 460px; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.job-card .name { font-size: 13.5px; }
.calls { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.call-card { padding: 14px 16px; }
.call-card + .call-card { margin-top: 0; }
.addr { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--text) !important; text-decoration: none !important; transition: filter 0.15s; }
.addr:hover { filter: brightness(0.97); }
.addr span { flex: 1; display: flex; flex-direction: column; font-weight: 600; font-size: 13.5px; }
.addr small { font-weight: 400; color: var(--text-2); }
.addr b { color: var(--brand-2); font-size: 12.5px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
[data-theme="dark"] .addr b { color: var(--brand); }
@media (max-width: 560px) { .calls { grid-template-columns: 1fr; } }

/* ------------------------------- attachments ------------------------------- */
.three-c.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { position: relative; }
.tile-del { position: absolute; top: 2px; right: 2px; background: var(--panel); opacity: 0; transition: opacity 0.15s; }
.tile:hover .tile-del, .tile:focus-within .tile-del { opacity: 1; }
@media (hover: none) { .tile-del { opacity: 1; } }
.tile-tag { position: absolute; left: 3px; bottom: 3px; right: 3px; font-size: 10.5px; font-weight: 600; background: rgba(8, 17, 26, 0.72); color: #fff; padding: 1px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.file-tile { width: 100%; aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-2) !important; text-decoration: none !important; padding: 6px; text-align: center; }
.file-tile:hover { border-color: var(--brand); color: var(--brand-2) !important; }
.file-tile b { font-size: 11px; letter-spacing: 0.05em; }
.file-tile small { font-size: 10.5px; color: var(--muted); width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-files { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }
.photo-add.sm { border-width: 1.5px; }
@media (max-width: 900px) { .three-c.two { grid-template-columns: 1fr; } }

/* ------------------------------- messenger ------------------------------- */
#msgr { position: fixed; right: 20px; bottom: 20px; z-index: 60; }
.msgr-fab { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(8, 17, 26, 0.28); cursor: pointer; position: relative; transition: transform 0.15s; }
.msgr-fab:hover { transform: scale(1.06); }
#msgr.open .msgr-fab { transform: scale(0.92); }
.msgr-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 10px; background: #dc2626; color: #fff; font: 700 11px/20px var(--font, system-ui); font-style: normal; padding: 0 5px; border: 2px solid var(--bg); }
.msgr-panel { position: absolute; right: 0; bottom: 68px; width: 380px; height: min(560px, calc(100vh - 110px)); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(8, 17, 26, 0.3); display: flex; flex-direction: column; overflow: hidden; animation: msgr-in 0.16s ease-out; }
@keyframes msgr-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.msgr-head { display: flex; align-items: center; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); }
.msgr-head .seg { display: flex; background: var(--panel-2); border-radius: 10px; padding: 3px; gap: 2px; }
.msgr-head .seg button { border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: 13px; padding: 6px 10px; border-radius: 8px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.msgr-head .seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.msgr-head .seg em, .msgr-meta em { font-style: normal; background: #dc2626; color: #fff; border-radius: 9px; font-size: 10.5px; font-weight: 700; padding: 0 6px; line-height: 17px; }
.msgr-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.msgr-list { overflow: auto; flex: 1; }
.msgr-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--text); border-bottom: 1px solid var(--line); }
.msgr-row:hover { background: var(--panel-2); }
.msgr-row .grow { min-width: 0; display: flex; flex-direction: column; }
.msgr-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgr-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; color: var(--muted); flex: none; }
.msgr-search-wrap { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.msgr-search-wrap .search { width: 100%; }
.msgr-thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.msgr-thead { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.msgr-msgs { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msgr-msgs .bubble { max-width: 84%; }
.bubble-who { display: block; font-size: 11.5px; margin-bottom: 2px; }
.bubble-ro { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 11.5px; font-weight: 600; }
.msgr-compose { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.msgr-compose textarea { flex: 1; resize: none; min-height: 38px; max-height: 120px; }
@media (max-width: 600px) {
  #msgr { right: 12px; bottom: 12px; }
  .msgr-panel { position: fixed; inset: 8px 8px 80px 8px; width: auto; height: auto; }
}
@media print { #msgr { display: none; } }
.bubble.out .bubble-ro { color: #fff; }
.msgr-panel[hidden] { display: none; }
#msgr { pointer-events: none; }
#msgr > * { pointer-events: auto; }
.main, #view { padding-bottom: 84px; }
.print-mode #msgr { display: none; }

/* My Jobs: columns grow with their cards (the page scrolls), and each can fold away */
.mine-board { align-items: flex-start; min-height: 0; overflow-x: visible; flex-wrap: wrap; }
.mine-board .col { max-height: none; }
.mine-board .col-body { overflow: visible; }
.mine-toggle { width: 100%; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; border-radius: 14px; }
.mine-toggle:hover { background: color-mix(in srgb, var(--line-2) 60%, transparent); }
.mine-toggle .fold-ic { color: var(--muted); }
.mine-col.folded { padding-bottom: 0; }
.mine-board .col { flex: 1 1 300px; max-width: none; }

/* Service board: every tab lines up with the header and sits centered on wide screens */
.board { max-width: 1480px; margin-left: auto; margin-right: auto; }
.board[data-keep-scroll="dispatch"] .col { flex: 1 1 270px; }
.calls { grid-template-columns: repeat(auto-fit, minmax(340px, 460px)); justify-content: center; }
@media (max-width: 760px) { .calls { grid-template-columns: 1fr; } }
.board-filters { padding: 0 26px; max-width: 1480px; margin-left: auto; margin-right: auto; }
/* Board tab: all six stages fit on one screen (columns share the width; cards compact when narrow) */
@media (min-width: 1000px) {
  .board[data-keep-scroll="board"] { max-width: none; overflow-x: hidden; gap: 10px; }
  .board[data-keep-scroll="board"] .col { flex: 1 1 0; min-width: 0; container-type: inline-size; }
  .board[data-keep-scroll="board"] .col-head { padding: 11px 10px 9px; gap: 6px; font-size: 13.5px; white-space: nowrap; }
  .board[data-keep-scroll="board"] .col-body { padding: 2px 7px 10px; gap: 7px; }
}
@container (max-width: 250px) {
  .col-head .sum { display: none; }
  .ro-card { padding: 9px 10px; }
  .ro-card .name { font-size: 13.5px; margin-top: 3px; }
  .ro-card .unit { font-size: 12px; }
  .ro-card .unit .muted { display: none; }
  .ro-card .concern { -webkit-line-clamp: 1; font-size: 12px; margin-top: 3px; }
  .ro-card .foot { margin-top: 6px; gap: 4px; }
  .ro-card .foot .chip { font-size: 10.5px; padding: 1px 6px; }
  .ro-card .avatars .avatar { width: 20px !important; height: 20px !important; font-size: 9px !important; }
}
@container (max-width: 200px) {
  .ro-card .top { flex-wrap: wrap; row-gap: 2px; }
  .ro-card .concern { display: none; }
  .ro-card .foot .amt { margin-left: 0; width: 100%; text-align: right; }
}
/* ------------------------- left menu: icons-only / expanded ------------------------- */
.brand { display: flex; align-items: center; gap: 8px; }
.nav-toggle { flex: none; width: 36px; height: 36px; border-radius: 9px; border: 0; background: none; color: var(--side-text); display: grid; place-items: center; cursor: pointer; }
.nav-toggle:hover { background: var(--side-2); color: #fff; }
.sidebar { transition: width 0.18s ease; }
@media (min-width: 901px) {
  body.nav-mini .sidebar { width: 68px; }
  body.nav-mini .brand { padding: 14px 16px 8px; justify-content: center; }
  body.nav-mini .brand-link { display: none; }
  body.nav-mini .nav { padding: 6px 10px; overflow-x: hidden; }
  body.nav-mini .nav-item { justify-content: center; padding: 10px 0; position: relative; }
  body.nav-mini .nav-item > span { display: none; }
  body.nav-mini .nav-sep { font-size: 0; padding: 0; margin: 10px 8px; border-top: 1px solid var(--side-2); }
  body.nav-mini .nav-badge { position: absolute; top: 3px; right: 5px; font-size: 9.5px; line-height: 15px; padding: 0 5px; }
  body.nav-mini .nav-note { font-size: 0; justify-content: center; padding: 6px 0; }
}
@media (max-width: 900px) { .nav-toggle { display: none; } }

@keyframes scrim-in { from { opacity: 0; } }

/* Phones: the Service Board stacks its columns instead of scrolling sideways, and tabs wrap. */
@media (max-width: 700px) {
  .board[data-keep-scroll="board"] { flex-direction: column; overflow-x: visible; scroll-snap-type: none; min-height: 0; }
  .board[data-keep-scroll="board"] .col { flex: none; width: 100%; max-height: none; }
  .board[data-keep-scroll="board"] .col-body { max-height: none; overflow: visible; }
  .board-tabs { flex-wrap: wrap; overflow-x: visible; }
  .board-hint-drag { display: none; }
}
/* Schedule: month view */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.month-dow { padding: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); }
.month-cell { min-height: 112px; padding: 6px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.month-cell:nth-child(7n) { border-right: 0; }
.month-cell:hover { background: color-mix(in srgb, var(--brand) 5%, var(--panel)); }
.month-cell.out { background: color-mix(in srgb, var(--line-2) 45%, var(--panel)); }
.month-cell.out .month-d, .month-cell.past .month-d { color: var(--muted); }
.month-d { font-weight: 700; font-size: 13px; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; }
.month-cell.today .month-d { background: var(--brand-2); color: #fff; }
.month-appt { display: flex; align-items: center; gap: 4px; width: 100%; border: 0; border-radius: 6px; padding: 2px 5px; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--text); font: 12px var(--font, inherit); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.month-appt i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.month-appt b { font-weight: 700; flex: none; }
.month-appt:hover { background: color-mix(in srgb, var(--c) 24%, transparent); }
.month-more { font-size: 11.5px; color: var(--muted); font-weight: 600; padding-left: 5px; }
@media (max-width: 700px) { .month-cell { min-height: 64px; padding: 3px; } .month-appt b, .month-appt { font-size: 0; padding: 0; height: 6px; background: var(--c); } .month-appt i { display: none; } }

/* printed inspection checklists */
.insp-print { margin: 8px 0 4px; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.insp-print-h { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; background: #f5f5f4; font-size: 12px; }
.insp-print table { margin: 0; }
.insp-print td { padding: 4px 8px; font-size: 12px; }
.ip-chip { display: inline-block; font-size: 11px; font-weight: 700; color: var(--c); border: 1px solid var(--c); border-radius: 10px; padding: 0 7px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ip-bad td { background: #fef2f2; } .ip-fair td { background: #fffbeb; }
.lightbox-x { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox-x:hover, .lightbox-x:focus-visible { background: rgba(255,255,255,.3); outline: none; }

/* team chat attachments */
.bubble-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bubble-img { width: 132px; height: 100px; object-fit: cover; border-radius: 9px; cursor: zoom-in; background: var(--line-2); display: block; }
.bubble-file { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: color-mix(in srgb, var(--panel) 80%, transparent); color: inherit; text-decoration: none !important; border: 1px solid var(--line); max-width: 240px; }
.bubble-file span { display: flex; flex-direction: column; min-width: 0; }
.bubble-file b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble-file small { font-size: 11px; opacity: 0.75; }
.bubble.out .bubble-file { color: var(--text); }
.msgr-compose { flex-wrap: wrap; }
.msgr-tray { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 5px; }
.msgr-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; font-size: 12px; padding: 3px 4px 3px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgr-chip button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.msgr-attach { flex: none; cursor: pointer; }
.msgr-thread.drop { outline: 2px dashed var(--brand); outline-offset: -6px; }

/* Service Board → History: latest 50 + search all */
.hist-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text-2); }
.hist-bar span { display: inline-flex; align-items: center; gap: 6px; }

/* accounting */
.pl-table td { padding: 7px 16px; }
.pl-table .pl-h td { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, var(--text-2)); padding-top: 16px; border-bottom: 0; }
.pl-table tr:not(.pl-h):not(.pl-t):not(.pl-T) td:first-child { padding-left: 28px; }
.pl-t td { font-weight: 600; border-top: 1px solid var(--border); }
.pl-T td, tr.pl-T td { font-weight: 700; border-top: 2px solid var(--text-2); background: var(--surface-2, transparent); }
td.neg, .num.neg { color: var(--danger); }

/* PDI */
.chip-pdi { background: #f3e8ff; color: #7e22ce; font-weight: 700; text-decoration: none; }
[data-theme="dark"] .chip-pdi { background: rgba(147, 51, 234, .22); color: #d8b4fe; }
.pdi-prog { width: 90px; height: 6px; border-radius: 4px; background: var(--line, #e5e7eb); overflow: hidden; }
.pdi-prog span { display: block; height: 100%; background: var(--brand, #0d9488); }
td.late b, td.late .cell-sub { color: var(--danger); }
.insp-mini { display: inline-flex; gap: 4px; }
.insp-mini i { font-style: normal; font-weight: 700; font-size: 12px; min-width: 22px; text-align: center; padding: 1px 5px; border-radius: 6px; }
.insp-mini .g { background: #dcfce7; color: #166534; }
.insp-mini .y { background: #fef9c3; color: #854d0e; }
.insp-mini .r { background: #fee2e2; color: #991b1b; }

/* My Jobs: current work on the left, incoming & outgoing stacked on the right */
.mine-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.mine-main, .mine-aside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mine-aside { gap: 18px; }
.mine-side { display: flex; flex-direction: column; gap: 10px; }
.mine-list { display: flex; flex-direction: column; gap: 10px; }
.mine-list .ro-card { cursor: pointer; }
.mine-h { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; padding: 4px 2px; }
.mine-h .count { background: var(--line-2); color: var(--text-2); border-radius: 20px; padding: 1px 9px; font-size: 12px; font-weight: 600; }
.mine-h.mine-toggle { padding: 4px 6px; }
.mine-ic { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: #fff; flex: none; }
.mine-empty { text-align: center; padding: 22px 10px; border: 1px dashed var(--line); border-radius: 12px; background: var(--panel); }
.mine-side.folded .mine-h { opacity: .8; }

.cur-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.cur-card.high { border-left: 4px solid var(--danger); }
.cur-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 14px 16px 10px; color: inherit; text-decoration: none !important; }
.cur-head:hover b { color: var(--brand); }
.cur-title b { font-size: 16.5px; line-height: 1.3; }
.cur-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.cur-chips:empty { display: none; }
.cur-when { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; font-size: 13px; font-weight: 600; }
.cur-when .late { color: var(--danger); }
.cur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; padding: 0 16px 10px; }
.cur-info { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-size: 13.5px; }
.cur-info dt { font-weight: 700; color: var(--text-2); }
.cur-info dd { margin: 0; }
.cur-cust { font-size: 13.5px; line-height: 1.5; }
.cur-jobs { list-style: none; margin: 0; padding: 6px 16px 8px; border-top: 1px solid var(--line-2); }
.cur-jobs li { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; }
.cur-jobs li.done .grow { color: var(--muted); text-decoration: line-through; }
.cur-jobs li.mine .grow { font-weight: 600; }
.cur-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: color-mix(in srgb, var(--line-2) 45%, transparent); border-top: 1px solid var(--line-2); }
@media (max-width: 900px) {
  .mine-layout { grid-template-columns: 1fr; }
  .cur-grid { grid-template-columns: 1fr; }
}
.chip-refurb { background: #ffedd5; color: #c2410c; font-weight: 700; text-decoration: none; }
[data-theme="dark"] .chip-refurb { background: rgba(234, 88, 12, .22); color: #fdba74; }
/* Service Board tabs: on laptop-size screens drop the little icons so every tab fits on one row. */
@media (min-width: 701px) and (max-width: 1700px) { .board-tabs a > .ic { display: none; } .board-tabs a { padding: 7px 9px; } }

/* Schedule → appointment requests from the customer page */
.req-panel { margin-bottom: 14px; border-color: color-mix(in srgb, #f59e0b 45%, var(--line)); }
.req-panel .card-head { flex-wrap: wrap; gap: 6px 12px; }
.req-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 12px 16px 16px; }
.req { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 7px; background: var(--panel); }
.req-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.req-when { font-size: 13.5px; }
.req-concern { font-size: 13.5px; white-space: pre-wrap; color: var(--text-2, inherit); }
.req-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.req-media { display: flex; gap: 6px; flex-wrap: wrap; }
.req-media img, .req-media video { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #000; cursor: zoom-in; }
.req-media video { width: 160px; height: 96px; cursor: default; }
.bubble .req-media { margin-top: 6px; }

.chip-move { --c: #0891b2; white-space: nowrap; }

/* PDI form (pdiform.js) — tech app, office work order and print */
.pf { display: flex; flex-direction: column; gap: 12px; }
.pf-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 6px; }
.pf-sh { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.pf-sh > div { flex: 1; min-width: 0; }
.pf-sh h3, .pf-sign h3 { margin: 0; font-size: 16px; }
.pf-sh small { color: var(--muted); font-size: 12.5px; }
.pf-count { font-weight: 800; font-size: 12.5px; color: var(--muted); background: var(--panel-2); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.pf-count.full { color: #15803d; background: #dcfce7; }
.pf-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }
.pf-quick button { font: 600 12.5px var(--font); padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.pf-quick button.hot { border-color: #0891b2; color: #0e7490; background: #ecfeff; }
.pf-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pf-row:first-of-type { border-top: 0; }
.pf-lbl b { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.pf-lbl small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.pf-row.ok .pf-lbl b { color: var(--text-2); }
.pf-row.na .pf-lbl b { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.pf-btns { display: flex; gap: 5px; }
.pf-b { min-width: 46px; height: 42px; padding: 0 8px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--panel); font: 800 15px var(--font); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-style: normal; }
.pf-b.na { font-size: 12.5px; }
.pf-b.fix { min-width: 38px; }
.pf-b.ok.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.pf-b.na.on { background: #64748b; border-color: #64748b; color: #fff; }
.pf-b.fix.on { background: #dc2626; border-color: #dc2626; color: #fff; }
.pf-b:disabled { cursor: default; }
.pf.locked .pf-b:not(.on) { opacity: 0.35; }
.pf-note { grid-column: 1 / -1; width: 100%; box-sizing: border-box; font: 14px var(--font); padding: 8px 10px; border-radius: 9px; border: 1px solid #fecaca; background: #fef2f2; color: var(--text); resize: vertical; }
.pf-extra { border-top: 1px dashed var(--line); margin-top: 4px; padding: 10px 0 8px; }
.pf-k { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pf-tires { display: flex; flex-direction: column; gap: 6px; }
.pf-tire { display: grid; grid-template-columns: 92px 1fr 80px; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 600; }
.pf-tire input, .pf-in input { width: 100%; box-sizing: border-box; font: 15px var(--font); padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text); min-width: 0; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }
.pf-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.pf-in { display: flex; align-items: center; gap: 6px; }
.pf-in em { font-style: normal; color: var(--muted); font-weight: 700; white-space: nowrap; }
.pf-in input:disabled { background: var(--panel-2); color: var(--text-2); }
.pf-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 6px; font-size: 12.5px; color: var(--muted); }
.pf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pf-legend .pf-b { min-width: 34px; height: 26px; font-size: 12px; border-radius: 7px; }
.pf-link { background: none; border: 0; color: var(--brand-2); font: 700 13px var(--font); padding: 8px 0 2px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.pf-sign { padding-bottom: 14px; }
.pf-cert { font-size: 13px; color: var(--text-2); margin: 6px 0 10px; line-height: 1.5; }
.pf-todo { font-size: 13.5px; color: #b45309; background: #fffbeb; border-radius: 9px; padding: 8px 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pf-signbtn { margin-top: 12px; width: 100%; font: 700 16px var(--font); padding: 14px; border-radius: 13px; border: 0; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.pf-signbtn:disabled { opacity: 0.45; cursor: default; }
.pf-signed { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; flex-wrap: wrap; color: #15803d; }
.pf-signed small { display: block; color: var(--text-2); }
.pf-sig { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 22px; color: var(--text); font-weight: 400; }
@media (min-width: 900px) { .pf-row { grid-template-columns: 1fr auto; } }

.pdi-card { border-color: #a5f3fc; background: #f5feff; }
.pdi-card.done { border-color: #bbf7d0; background: #f6fef9; }
.pdi-card > .card-body > .ic { color: #0e7490; }
.pdi-card.done > .card-body > .ic { color: #15803d; }
.pdi-bar { height: 6px; border-radius: 9px; background: #cffafe; margin-top: 7px; overflow: hidden; max-width: 420px; }
.pdi-bar > i { display: block; height: 100%; background: #0891b2; }
.pdi-card.done .pdi-bar > i { background: #16a34a; }
.pf-signbtn.cust { background: #0e7490; }
.pf-csig { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 12px; }
.pf-csig img { height: 70px; max-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pf-csig small { display: block; color: var(--text-2); }
.pf-pad-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 17, 26, 0.6); display: flex; align-items: flex-end; justify-content: center; }
.pf-pad { background: var(--panel); width: 100%; max-width: 640px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; color: var(--text); }
.pf-pad h2 { margin: 0; font-size: 20px; }
.pf-pad-st { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text); background: var(--panel-2); border-radius: 12px; padding: 12px 14px; }
.pf-pad-box { position: relative; height: 200px; border: 2px dashed #94a3b8; border-radius: 14px; background: #fff; }
.pf-pad-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; border-radius: 12px; }
.pf-pad-x { position: absolute; left: 14px; bottom: 30px; font-size: 20px; color: #94a3b8; pointer-events: none; }
.pf-pad-box::after { content: ""; position: absolute; left: 40px; right: 20px; bottom: 34px; border-bottom: 1.5px solid #cbd5e1; pointer-events: none; }
.pf-pad-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 15px; pointer-events: none; }
.pf-pad-act { display: flex; gap: 8px; }
.pf-pad-btn { flex: 1; font: 700 16px var(--font); padding: 14px 8px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.pf-pad-btn.ok { flex: 2; background: #16a34a; border-color: #16a34a; color: #fff; }
.pf-pad-btn:disabled { opacity: 0.6; }
.pf-pad-msg { margin: 0; min-height: 18px; font-size: 14px; font-weight: 600; color: #b91c1c; }
/* PDI printout */
.pdi-doc { font-size: 11.5px; }
.pdi-p-head { width: 100%; border-collapse: collapse; margin: 10px 0 4px; }
.pdi-p-head th { text-align: left; font-weight: 700; color: #475569; width: 15%; padding: 4px 6px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.pdi-p-head td { padding: 4px 6px; border-bottom: 1px solid #e2e8f0; }
.pdi-p-key { color: #64748b; margin: 4px 0 8px; }
.pdi-p-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.pdi-p-sec { break-inside: avoid; margin-bottom: 10px; }
.pdi-p-sec h3 { font-size: 12.5px; margin: 0; text-transform: uppercase; letter-spacing: 0.02em; }
.pdi-p-sec > small { color: #64748b; display: block; margin-bottom: 3px; }
.pdi-p-row { display: flex; gap: 6px; align-items: flex-start; padding: 1.5px 0; line-height: 1.35; }
.pdi-p-row em { color: #b91c1c; font-style: normal; }
.pdi-p-box { flex: none; width: 26px; height: 15px; border: 1px solid #94a3b8; border-radius: 3px; font-size: 9.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.pdi-p-box.ok { color: #15803d; border-color: #15803d; }
.pdi-p-box.na { color: #475569; }
.pdi-p-box.fix { color: #b91c1c; border-color: #b91c1c; }
.pdi-p-tires { border-collapse: collapse; margin: 4px 0 2px 32px; font-size: 11px; }
.pdi-p-tires th, .pdi-p-tires td { border: 1px solid #cbd5e1; padding: 2px 8px; text-align: left; }
.pdi-p-line { margin: 4px 0 2px 32px; }
.pdi-p-line u { text-decoration: none; border-bottom: 1px solid #0f172a; padding: 0 4px; font-weight: 700; }
.pdi-p-sign { margin-top: 12px; border-top: 2px solid #0f172a; padding-top: 10px; break-inside: avoid; }
.pdi-p-sigs { display: flex; gap: 40px; margin-top: 10px; flex-wrap: wrap; }
.pdi-p-sigs > div { display: flex; flex-direction: column; min-width: 240px; }
.pdi-p-sigs img { height: 64px; width: auto; max-width: 280px; object-fit: contain; object-position: left; border-bottom: 1px solid #0f172a; }
.pdi-p-script { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 22px; min-height: 34px; border-bottom: 1px solid #0f172a; }
.pdi-p-sigs small { color: #64748b; margin-top: 3px; }
/* PDI form: jump bar — Next unchecked + a Go to section dropdown, stuck to the top */
.pf-nav { position: sticky; top: 60px; z-index: 5; display: flex; gap: 8px; padding: 8px 0; margin: -4px 0; background: var(--bg); }
.pf-jump { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 700 14px var(--font); padding: 0 14px; height: 44px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; cursor: pointer; white-space: nowrap; }
.pf-jump em { font-style: normal; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, 0.22); border-radius: 99px; padding: 1px 7px; }
.pf-goto { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text-2); }
.pf-goto > .ic:first-child { position: absolute; left: 12px; pointer-events: none; color: var(--muted); }
.pf-goto > .ic:last-child { position: absolute; right: 11px; pointer-events: none; color: var(--muted); }
.pf-goto select { appearance: none; -webkit-appearance: none; width: 100%; height: 100%; border: 0; background: transparent; font: 650 14.5px var(--font); color: var(--text); padding: 0 32px 0 36px; cursor: pointer; text-overflow: ellipsis; }
.pf-goto select:focus { outline: none; }
.pf-goto:focus-within { border-color: var(--brand); }
.pf-sec { scroll-margin-top: 120px; }
.pf-row { scroll-margin-top: 120px; }
.pf-row.flash { animation: pf-flash 1.6s ease-out; border-radius: 10px; }
@keyframes pf-flash { 0%, 40% { background: #fef3c7; box-shadow: 0 0 0 6px #fef3c7; } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }

/* barcode label previews (Settings → Parts & pricing, print-labels dialog) */
.lb-preview { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); border-radius: 3px; overflow: hidden; flex: none; }
.lb-set { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.lb-set-prev { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 14px; background: var(--panel-2, #f1f5f9); border-radius: 10px; }
.lb-modal-prev { display: flex; justify-content: center; padding: 12px; background: var(--panel-2, #f1f5f9); border-radius: 10px; }
@media (max-width: 760px) { .lb-set { grid-template-columns: 1fr; } }
.kpi-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
