:root {
  --brand-strip: #141c26; /* match --navy / .sidebar; Damien via Marketing 2026-09-10 */
  --navy: #141c26;
  --navy-2: #1b2430;
  --ink: #1a1f26;
  --muted: #5c6570;
  --faint: #8a929c;
  --canvas: #ffffff;
  --paper: #ffffff;
  --line: #d7dadd;
  --line-2: #c5c9ce;
  --blue: #0a8cf0;
  --blue-d: #0874c9;
  --blue-s: #e7f4fe;
  --grey: #acaeaf;
  --ok: #2f7d4a;
  --ok-s: #e8f5ec;
  --warn: #b45309;
  --warn-s: #fff6e8;
  --bad: #b42318;
  --bad-s: #fdecea;
  --sidebar-w: 212px;
  --shadow: 0 1px 2px rgba(20,28,38,.05);
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.4;
}
a { color: var(--blue-d); }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; border: 0; }
h1,h2,h3 { margin: 0; font-weight: 650; letter-spacing: -0.02em; }
p { margin: 0; }

/* —— Login (ops card, 360 brand) —— */
.login-page {
  min-height: 100vh;
  min-height: 100dvb;
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px 16px 40px;
  overflow-y: auto;
  background: #0b1016 url("360-bg.webp") center / cover no-repeat;
  color: var(--ink);
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(20,28,38,.82) 0%, rgba(20,28,38,.62) 50%, rgba(20,28,38,.78) 100%);
}
.login-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  color: #111;
  color-scheme: light;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
  padding: 28px 24px 22px;
}
.login-card .brand-link { display: inline-block; margin-bottom: 14px; }
.login-card .brand-link img {
  display: block; height: 36px; width: auto;
  filter: none;
}
.login-kicker {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 650;
  margin-bottom: 6px;
}
.login-card h1 {
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 6px;
}
.login-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.login-card label {
  display: block; font-size: 12px; font-weight: 650;
  color: #111; margin: 0 0 6px;
}
.login-card .field { margin-bottom: 12px; }
.login-card input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--grey);
  color: #111;
  -webkit-text-fill-color: #111;
  caret-color: #111;
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 15px;
  color-scheme: light;
}
.login-card input::placeholder {
  color: #5c6570;
  -webkit-text-fill-color: #5c6570;
}
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111;
  caret-color: #111;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out;
}
.login-card input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: transparent;
}
.login-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}
.login-error {
  background: var(--bad-s);
  border: 1px solid #f5c2bd;
  color: var(--bad);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.login-foot { margin-top: 16px; font-size: 12px; color: var(--faint); }
.login-card .btn-block { padding: 12px 18px; font-size: 15px; }
.login-remember {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; font-size: 13px; font-weight: 550; color: #374151;
  cursor: pointer; user-select: none;
}
.login-remember input {
  width: 16px; height: 16px; margin: 0; accent-color: var(--blue);
}

.portal-homebar {
  position: absolute; top: 14px; left: 16px;
  display: flex; align-items: center; gap: 8px;
  z-index: 2;
  color: #fff; font-weight: 650; letter-spacing: .04em; font-size: 13px;
}
.portal-homebar-in { position: static; color: var(--navy); padding: 14px 20px 0; }
.portal-home-icon { width: 22px; height: 22px; border-radius: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; padding: 8px 14px; border-radius: 2px;
  font-weight: 650; text-decoration: none; color: inherit; background: transparent;
  font-size: 13px;
}
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-ghost { border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-d); }
.btn-block { width: 100%; }
.btn-xl { padding: 14px 18px; font-size: 16px; min-height: 48px; }

/* —— Live-ish shell: dark side / light main —— */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  background: var(--canvas);
}
.sidebar {
  background: var(--navy);
  color: #d8dde4;
  display: flex; flex-direction: column;
  min-height: 100vh; position: sticky; top: 0; height: 100vh; overflow: auto;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  text-decoration: none;
  background: var(--brand-strip, #141c26);
  border-bottom: 0;
}
.side-brand img,
.side-brand .side-brand-lockup {
  display: block; height: 36px; width: auto; max-width: 100%;
  filter: none; flex-shrink: 0;
}
.side-product { min-width: 0; }
.side-product strong {
  display: block; font-size: 12px; color: #fff; font-weight: 700; letter-spacing: .01em; line-height: 1.2;
}
.side-product small {
  display: block; font-size: 11px; color: rgba(216,221,228,.55); margin-top: 2px;
}
.side-nav { padding: 10px 8px 16px; display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  color: rgba(216,221,228,.82); text-decoration: none;
  padding: 7px 10px; border-radius: 3px; font-weight: 600; font-size: 13px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(10,140,240,.22); color: #fff; }
.nav-ico {
  width: 18px; height: 18px; display: grid; place-items: center; flex-shrink: 0; opacity: .9;
}
.nav-ico svg { width: 16px; height: 16px; display: block; }
.nav-item.active .nav-ico { color: #8ecfff; }
.side-foot {
  margin-top: auto; padding: 12px 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.workbook-pill {
  font-size: 11px; line-height: 1.35;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  padding: 8px 9px; border-radius: 3px;
  color: rgba(216,221,228,.72); margin-bottom: 10px;
}
.workbook-pill b { color: #8ecfff; font-weight: 650; display: block; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-av {
  width: 28px; height: 28px; border-radius: 50%; background: #2a3544; color: #8ecfff;
  display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.user-chip .who { font-weight: 650; color: var(--ink); font-size: 13px; line-height: 1.15; }
.user-chip .role { font-size: 11px; color: var(--muted); }
.top-user .who { color: var(--ink); }
.portal-tag { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(216,221,228,.4); }
.jamie-tag { font-size: 11px; color: rgba(216,221,228,.45); margin-top: 2px; }
.signout {
  display: inline-flex; align-items: center; text-decoration: none;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--ink); padding: 5px 10px; font-weight: 600; font-size: 12px;
  border-radius: 2px;
}
.signout:hover { border-color: var(--blue); color: var(--blue-d); }

.main { min-width: 0; background: var(--canvas); display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: none;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumbs { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--blue-d); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--muted); font-weight: 500; }
.menu-btn {
  display: none; background: var(--navy); color: #fff; border: 0;
  padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 650;
}
.page { padding: 16px 18px 40px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 0 0 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; letter-spacing: -0.02em; }
.lede { color: var(--muted); margin-top: 4px; max-width: 52rem; font-size: 13px; }

.sites-map, .site-map, .draw-map {
  height: 280px; border: 1px solid var(--line); background: #dfe7ee; margin-bottom: 12px;
}
.draw-map { height: 360px; }
.site-list { display: flex; flex-direction: column; gap: 0; background: var(--paper); border: 1px solid var(--line); }
.site-card {
  display: block; background: var(--paper); border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 14px; text-decoration: none; color: inherit; box-shadow: none;
}
.site-card:last-child { border-bottom: 0; }
.site-card:hover { background: #f6f8fa; }
.site-name { font-weight: 650; font-size: 14px; }
.site-alias { color: var(--muted); font-size: 12px; font-family: var(--mono); margin-top: 1px; }
.site-meta { color: var(--faint); font-size: 11px; margin-top: 4px; }

.card {
  background: var(--paper); border: 1px solid var(--line);
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.card h2 { font-size: 14px; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 5px; }
.field input[type=text], .field input[type=email], .field input[type=number], .field input[type=password], .field input:not([type]), .field input[type=file], .field select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); background: #fff;
  color: #111; -webkit-text-fill-color: #111; caret-color: #111; color-scheme: light;
}
.field .hint { font-size: 12px; color: var(--faint); font-weight: 500; margin-top: 4px; }
.check-list { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 12px; }
.check-list .check { margin: 0; }
.email-stack { font-size: 13px; line-height: 1.4; }
.email-stack .muted { color: var(--muted); }
.banner.err + .banner.err { margin-top: -8px; }
.name-preview { font-weight: 700; }
.qr-card { text-align: center; }
.qr-img { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; padding: 8px; }
.qr-url { font-size: 12px; word-break: break-all; margin: 10px 0; }
.map-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.gps-status {
  padding: 10px 12px; background: var(--blue-s); border: 1px solid #c5e3fb;
  margin-bottom: 12px; font-weight: 550; font-size: 13px;
}
.gps-status.ok { background: var(--ok-s); border-color: #b7e0c4; }
.gps-status.bad { background: var(--bad-s); border-color: #f5c2bd; }
.banner { padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.banner.ok { background: var(--ok-s); color: var(--ok); }
.banner.warn { background: var(--warn-s); color: var(--warn); }
.banner.err { background: var(--bad-s); color: var(--bad); }
.photo-preview { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.photo-preview img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); }
.draw-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; }
.checkin-list { list-style: none; padding: 0; margin: 0; }
.checkin-list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.out { color: var(--warn); font-weight: 650; }
.table-wrap { overflow: auto; background: var(--paper); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th {
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  background: #f4f5f7; font-weight: 650;
}
table.data tbody tr:hover { background: #f7f9fb; }
table.data tbody tr:last-child td { border-bottom: 0; }
.scrim { display: none; }
.empty-state {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 28px 20px;
  text-align: left;
}
.empty-state h2 { font-size: 16px; margin-bottom: 6px; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(86vw, 280px);
    transform: translateX(-105%); transition: transform .2s ease; z-index: 20;
  }
  .app-shell.side-open .sidebar { transform: none; }
  .app-shell.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 15; }
  .float-menu { display: inline-flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .sites-map, .draw-map { height: 240px; }
  .page { padding: 12px 12px 36px; }
  .top-user .role { display: none; }
}

.legend-loc { color: #0a8cf0; font-weight: 650; }
.legend-gf { color: #2f7d4a; font-weight: 650; }
code { font-family: var(--mono); font-size: 12px; background: #f0f2f4; padding: 1px 5px; }

.win-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.win-am { background: #e7f4fe; color: #0874c9; }
.win-refresh { background: #fff6e8; color: #b45309; }
.win-locking { background: #eee8f8; color: #5b3d8f; }
.win-badge.is-now { box-shadow: 0 0 0 2px currentColor; }
.win-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.win-hours { font-size: 12px; color: var(--muted); font-family: var(--mono); margin-right: 8px; }
.window-list { list-style: none; padding: 0; margin: 8px 0 0; }
.window-list li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.now-tag { font-size: 11px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: .06em; }
.window-pick { border: 1px solid var(--line); padding: 12px 14px; margin: 0 0 14px; }
.window-pick legend { font-weight: 650; padding: 0 6px; }
.window-opt { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.run-section { margin: 16px 0 22px; }
.run-section h2 { font-size: 16px; margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.run-meta { font-size: 12px; font-weight: 500; color: var(--muted); }
.sched-sites { list-style: none; padding: 0; margin: 8px 0 0; }
.sched-sites li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.schedule-card h2 { font-size: 16px; }

.hint { color: var(--muted); font-size: 13px; margin-top: 6px; font-weight: 400; }
.muted { color: var(--muted); }
.email-stack { font-size: 13px; }
.check-list { display: flex; flex-direction: column; gap: 4px; }
.check-list .check { margin: 4px 0; }
.contact-block { margin: 8px 0 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.contact-block h2 { margin-bottom: 6px; }
.contact-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}
.contact-row .field { margin-bottom: 0; }
.contact-row input[type=email] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); background: #fff;
}
.notify-check { margin: 0 0 4px; white-space: nowrap; font-weight: 600; }
select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); background: #fff;
}

.notify-events, .issue-template-note { margin: 18px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.notify-events h2, .issue-template-note h2 { font-size: 14px; margin-bottom: 6px; }
.issue-card textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); background: #fff;
  font: inherit; min-height: 96px;
}
.issue-hist { font-size: 13px; margin: 16px 0 8px; }
@media (max-width: 860px) {
  .contact-row { grid-template-columns: 1fr; }
}

button.site-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

body.activity-open { overflow: hidden; }

.activity-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 28, 38, .48);
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}
.activity-overlay[hidden] { display: none !important; }
.activity-panel {
  width: min(560px, 100%);
  max-width: 100%;
  background: #fff;
  color: #111;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 28px rgba(20, 28, 38, .22);
  font-family: var(--font);
}
.activity-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
.activity-titles { min-width: 0; flex: 1; }
.activity-head h2 {
  font-size: 16px;
  font-weight: 650;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.activity-alias {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 3px;
  word-break: break-word;
}
.activity-close {
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  background: #fff;
  color: #111;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  border-radius: 2px;
}
.activity-close:hover { border-color: var(--blue); color: var(--blue-d); }
.activity-scroll {
  overflow: auto;
  flex: 1;
  padding: 4px 16px 24px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.activity-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
  align-items: center;
}
.btn-create-pdf {
  margin-left: auto;
  background: #b42318;
  border: 1px solid #b42318;
  color: #fff;
  font-weight: 650;
}
.btn-create-pdf:hover { background: #912018; border-color: #912018; color: #fff; }
.activity-empty { padding: 28px 4px 16px; }
.activity-empty-name {
  font-size: 16px;
  font-weight: 650;
  color: #111;
  margin-bottom: 6px;
}
.activity-empty-copy {
  font-size: 14px;
  color: var(--muted);
}


.act-setup {
  font-size: 12px;
  font-weight: 650;
  color: var(--blue-d);
  text-decoration: none;
  align-self: center;
  margin-left: 4px;
}
.act-setup:hover { text-decoration: underline; }

.live-doc {
  padding: 16px 2px 22px;
  border-bottom: 1px solid var(--line);
}
.live-doc:last-child { border-bottom: 0; }
.live-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.live-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 160px;
}
.live-logo-client {
  max-width: 140px;
  height: 36px;
  object-fit: contain;
}
.live-brand-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
}
.live-date {
  font-size: 12px;
  color: #111;
  white-space: nowrap;
  padding-top: 4px;
}
.client-logo-preview {
  margin: 8px 0 12px;
  padding: 10px;
  border: 1px solid var(--line, #d7dee8);
  border-radius: 8px;
  background: #fff;
  display: inline-block;
}
.client-logo-preview img {
  display: block;
  max-height: 72px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.live-title {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 8px;
}
.live-site, .live-addr {
  font-size: 13px;
  color: #111;
  line-height: 1.35;
  margin: 0 0 4px;
}
.live-kv {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  align-items: baseline;
  margin: 10px 0 4px;
  font-size: 13px;
  color: #111;
}
.live-k { font-weight: 700; color: #111; }
.live-status {
  font-weight: 700;
  color: #e07b2a;
  letter-spacing: .04em;
}
.live-h2 {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 18px 0 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #d8dce0;
  letter-spacing: 0;
}
table.live-timeline, table.live-fields {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 0;
}
table.live-timeline th, table.live-fields th, table.live-timeline td, table.live-fields td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid #e6e9ed;
}
table.live-timeline th {
  color: #111;
  font-weight: 700;
  font-size: 12px;
  background: #e7f4fe;
  border-bottom: 1px solid #cfd6de;
}
table.live-fields th {
  width: 42%;
  font-weight: 600;
  color: #111;
  background: transparent;
}
table.live-timeline td, table.live-fields td { color: #111; }
table.live-timeline tr.stripe, table.live-fields tr.stripe {
  background: #e7f4fe;
}
.live-media-lab {
  font-size: 12px;
  color: #111;
  margin: 8px 0 8px;
}
.live-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.live-frame {
  border: 1px solid #d0d4d8;
  border-radius: 6px;
  padding: 4px;
  background: #fff;
  overflow: hidden;
}
.live-frame img,
.live-frame video {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: #f4f5f7;
  cursor: default;
}
.live-media-empty {
  color: #111;
  font-size: 13px;
  margin: 4px 0 0;
  padding: 16px;
  border: 1px solid #d0d4d8;
  border-radius: 6px;
}
.live-comments {
  font-size: 13px;
  color: #111;
  white-space: pre-wrap;
  margin: 10px 0 0;
}
.live-foot {
  margin: 16px 0 0;
  font-size: 11px;
  color: #111;
  text-align: right;
}
.live-meta {
  margin: 8px 0 4px;
  font-size: 12px;
  color: #111;
  line-height: 1.4;
}
.live-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: #111;
  font-weight: 600;
}
.activity-empty-copy { color: #111; }

.act-frames {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.act-frames-inline { margin-top: 8px; }
.act-frame {
  border: 1px solid #d4d7db;
  border-radius: 6px;
  padding: 6px;
  background: #fff;
}
.act-frame img,
.act-frame video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  background: #f4f5f7;
}


@media (max-width: 520px) {
  .activity-panel { width: 100%; }
  .live-kv { grid-template-columns: 1fr; gap: 2px; }
  table.live-timeline, table.live-fields { font-size: 12px; }
  table.live-timeline th, table.live-fields th, table.live-timeline td, table.live-fields td { padding: 7px 6px; }
}

/* —— chrome: no top bar, Live density, loop UI —— */
.float-menu {
  display: none;
  position: absolute; top: 10px; left: 10px; z-index: 12;
  background: var(--navy); color: #fff; border: 0;
  padding: 7px 11px; font-weight: 650; font-size: 12px; cursor: pointer;
}
.main { position: relative; background: #fff; }
.side-user { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.side-user .who { color: #fff; font-weight: 650; font-size: 13px; line-height: 1.15; }
.side-user .role { font-size: 11px; color: rgba(216,221,228,.55); }
.signout-side {
  display: inline-flex; text-decoration: none; margin-bottom: 10px;
  color: rgba(216,221,228,.85); border: 1px solid rgba(255,255,255,.16);
  padding: 5px 10px; font-size: 12px; font-weight: 600;
}
.signout-side:hover { color: #fff; border-color: #8ecfff; }

.side-foot-actions {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  margin-bottom: 10px; flex-wrap: nowrap;
}
.side-foot-actions .signout-side { margin: 0; }
.side-settings {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  text-decoration: none; border-radius: 2px;
}
.side-settings .nav-ico { width: 16px; height: 16px; opacity: 1; color: #fff; }
.side-settings .nav-ico svg { width: 14px; height: 14px; stroke: #fff; }
.side-settings:hover, .side-settings.on {
  color: #fff; border-color: #8ecfff; background: rgba(10,140,240,.18);
}

.main-map { height: 100vh; overflow: hidden; background: #dfe7ee; padding: 0; }
.map-stage { position: relative; height: 100%; }
.sites-map-full { position: absolute; inset: 0; border: 0; margin: 0; height: 100% !important; }
.map-overlay {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 30;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  pointer-events: none;
}
.map-overlay > * { pointer-events: auto; }
.map-actions { display: flex; gap: 8px; margin-left: auto; }
.map-list {
  position: absolute; inset: 58px 12px 12px; z-index: 7;
  background: #fff; overflow: auto; border: 1px solid var(--line);
}
@media (max-width: 860px) {
  .map-overlay { padding-left: 72px; top: 10px; }
}

.page { background: #fff; }
.page-head h1 { font-size: 26px; font-weight: 600; color: #2a2f36; letter-spacing: -0.02em; }
table.data { font-size: 13px; }
table.data th {
  font-size: 13px; letter-spacing: 0; text-transform: none; color: #6b7280;
  background: #fff; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid #e5e7eb;
}
table.data td { padding: 8px 12px; color: #111; border-bottom: 1px solid #eee; }
.mono-cell { font-family: var(--mono); font-size: 12px; color: var(--muted); }
button.linkish {
  background: none; border: 0; padding: 0; color: var(--blue-d);
  font: inherit; font-weight: 650; cursor: pointer; text-align: left;
}
tr.site-row { cursor: pointer; }
.empty-row td { color: var(--muted); }

.lh-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 10px; background: #f4f5f7; border: 1px solid var(--line);
  border-bottom: 0;
}
.table-wrap { border-top: 0; }
.lh-search {
  display: flex; align-items: center; gap: 6px; background: #fff;
  border: 1px solid var(--line-2); padding: 0 10px; min-width: 220px; flex: 1;
}
.lh-search input {
  border: 0; outline: 0; padding: 7px 0; width: 100%;
  color: #111; -webkit-text-fill-color: #111; background: #fff;
}
.lh-search-ico {
  width: 14px; height: 14px; border: 1.5px solid #8a929c; border-radius: 50%;
  position: relative; flex-shrink: 0;
}
.lh-search-ico::after {
  content: ""; position: absolute; width: 6px; height: 1.5px; background: #8a929c;
  right: -4px; bottom: -1px; transform: rotate(45deg);
}
.lh-count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.lh-drop { position: relative; }
.lh-drop-btn, .lh-more-btn {
  background: #fff; border: 1px solid var(--line-2); color: #111;
  padding: 7px 12px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.lh-drop-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(20,28,38,.12);
  padding: 12px; min-width: 260px; display: flex; flex-direction: column; gap: 10px;
}
.lh-drop-panel[hidden], .lh-menu[hidden], .lh-cal[hidden] { display: none !important; }
.lh-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #111; }
.lh-select, .lh-date, select.lh-select {
  width: 100%; padding: 7px 8px; border: 1px solid var(--line-2); background: #fff;
  color: #111; -webkit-text-fill-color: #111; color-scheme: light;
}
.lh-more { position: relative; display: inline-flex; }
.lh-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30;
  background: #fff; border: 1px solid var(--line); min-width: 160px;
  box-shadow: 0 8px 24px rgba(20,28,38,.12);
}
.lh-menu a {
  display: block; padding: 8px 12px; color: #111; text-decoration: none; font-size: 13px;
}
.lh-menu a:hover { background: #f4f5f7; }
.lh-menu a.lh-menu-danger { color: #b42318; }
.lh-menu a.lh-menu-danger:hover { background: #fef3f2; }
.lh-seg {
  display: inline-flex; border: 1px solid var(--line-2); background: #fff;
}
.lh-seg button, .lh-seg a {
  border: 0; background: transparent; padding: 6px 12px; font-weight: 650;
  font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: none;
}
.lh-seg .on, .lh-seg button.on { background: #e7f4fe; color: var(--blue-d); }
.page-seg { margin: 0 0 12px; }
.lh-cal {
  position: fixed; z-index: 200; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(20,28,38,.12); padding: 10px; width: 248px;
  box-sizing: border-box;
}
/* Body-attached calendar must not be clipped by wizard/card overflow */
form[data-works-wizard],
form[data-works-wizard] .field,
form[data-works-wizard] .card-pad,
.card.card-pad { overflow: visible; }
.lh-cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 650; }
.lh-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12px; }
.lh-cal-grid button {
  border: 0; background: transparent; padding: 6px 0; cursor: pointer; color: #111;
}
.lh-cal-grid button:hover { background: #e7f4fe; }
.lh-cal-grid .dow { color: var(--muted); font-weight: 650; }

.contract-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.contract-toggle {
  display: inline-flex; flex-direction: column; text-decoration: none;
  border: 1px solid var(--line-2); background: #fff; color: #111;
  padding: 8px 12px; font-weight: 650; font-size: 13px;
}
.contract-toggle small { font-weight: 500; color: var(--muted); font-size: 11px; }
.contract-toggle.on { border-color: var(--blue); background: #e7f4fe; color: var(--blue-d); }
.day-view-kicker { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

.st-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; }
.st-ok { background: var(--ok-s); color: var(--ok); }
.st-miss { background: var(--bad-s); color: var(--bad); }
.st-open { background: var(--blue-s); color: var(--blue-d); }
.st-catch { background: var(--warn-s); color: var(--warn); }

.lh-yn {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #eee;
}
.lh-yn-lab { font-size: 13px; color: #111; }
.lh-yn-opts { display: flex; gap: 12px; white-space: nowrap; font-weight: 650; }
.live-form-block { margin: 12px 0; }
.live-form-block h3 { font-size: 16px; margin-bottom: 6px; }
.report-h { font-size: 16px; margin: 18px 0 8px; }
.field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); background: #fff;
  color: #111; -webkit-text-fill-color: #111; font: inherit;
}

.float-menu {
  display: none;
  position: fixed; top: 10px; left: 10px; z-index: 12;
  background: var(--navy); color: #fff; border: 0;
  padding: 8px 12px; font-weight: 650; font-size: 12px; cursor: pointer;
}
.side-user { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.side-user .who { font-weight: 650; color: #fff; font-size: 13px; line-height: 1.15; }
.side-user .role { font-size: 11px; color: rgba(216,221,228,.55); }
.signout-side {
  display: inline-block; color: rgba(216,221,228,.75); text-decoration: none;
  font-size: 12px; font-weight: 650; margin: 6px 0 10px;
}
.signout-side:hover { color: #fff; }
.main-map { padding: 0; }
.main-map .float-menu { background: rgba(20,28,38,.86); }

.map-stage { position: relative; flex: 1; min-height: calc(100vh - 0px); display: flex; flex-direction: column; }
.sites-map-full { flex: 1; min-height: 60vh; height: calc(100vh - 0px); border: 0; }
.map-overlay {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 30;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  pointer-events: none;
}
.map-overlay > * { pointer-events: auto; }
.map-actions { display: flex; gap: 6px; margin-left: auto; }
.map-list { background: var(--canvas); padding: 56px 12px 24px; }
.map-search { min-width: 220px; max-width: 360px; flex: 1; }

.lh-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 12px; background: var(--paper); border: 1px solid var(--line);
  padding: 8px 10px;
}
.lh-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line-2); padding: 0 10px;
  min-width: 180px; flex: 1;
}
.lh-search input {
  border: 0; outline: 0; padding: 8px 0; width: 100%; background: transparent; color: #111;
}
.lh-search-ico {
  width: 14px; height: 14px; border: 2px solid var(--muted); border-radius: 50%;
  position: relative; flex-shrink: 0;
}
.lh-search-ico::after {
  content: ""; position: absolute; width: 6px; height: 2px; background: var(--muted);
  right: -5px; bottom: -1px; transform: rotate(45deg);
}
.lh-drop { position: relative; }
.lh-drop-btn, .lh-more-btn {
  background: #fff; border: 1px solid var(--line-2); padding: 7px 12px;
  font-weight: 650; font-size: 13px; cursor: pointer; color: var(--ink);
}
.lh-drop-btn:hover, .lh-more-btn:hover { border-color: var(--blue); }
.lh-drop-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 20;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 12px; min-width: 240px;
}
.lh-field { display: block; margin-bottom: 8px; }
.lh-field span { display: block; font-size: 11px; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.lh-select, .lh-date {
  width: 100%; padding: 7px 8px; border: 1px solid var(--line-2); background: #fff; color: #111;
}
.lh-count { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: auto; }
.lh-more { position: relative; display: inline-block; }
.lh-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 21;
  background: #fff; border: 1px solid var(--line); min-width: 140px;
  box-shadow: 0 8px 20px rgba(20,28,38,.12);
}
.lh-menu a {
  display: block; padding: 8px 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 13px;
}
.lh-menu a:hover { background: var(--blue-s); }
.lh-seg {
  display: inline-flex; border: 1px solid var(--line-2); background: #fff; overflow: hidden;
}
.lh-seg button, .lh-seg a {
  border: 0; background: transparent; padding: 7px 12px; font-weight: 650; font-size: 13px;
  color: var(--muted); cursor: pointer; text-decoration: none;
}
.lh-seg button.on, .lh-seg a.on { background: var(--blue); color: #fff; }
.page-seg { margin: 0 0 12px; }

.contract-toggles {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px;
}
.contract-toggle {
  display: inline-flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  text-decoration: none; padding: 7px 12px; font-weight: 700; font-size: 13px;
}
.contract-toggle small { font-weight: 500; color: var(--muted); font-size: 11px; }
.contract-toggle.on { border-color: var(--blue); background: var(--blue-s); color: var(--blue-d); }
.day-view-kicker { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

.linkish {
  background: none; border: 0; padding: 0; color: var(--blue-d); font: inherit; font-weight: 650;
  cursor: pointer; text-align: left;
}
.linkish:hover { text-decoration: underline; }
.mono-cell { font-family: var(--mono); font-size: 12px; }
.req { color: var(--bad); }

.yesno { border: 1px solid var(--line); padding: 8px 12px; margin: 0 0 10px; }
.yesno legend { font-weight: 650; padding: 0 6px; }
.task-st {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 2px;
}
.task-st-open { background: var(--blue-s); color: var(--blue-d); }
.task-st-complete { background: var(--ok-s); color: var(--ok); }
.task-st-missed { background: var(--bad-s); color: var(--bad); }
.task-st-late { background: var(--warn-s); color: var(--warn); }

fieldset.yesno .check { margin: 4px 0; }
.issue-card textarea, .checkin-card textarea, .field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); background: #fff;
  font: inherit; min-height: 72px; color: #111;
}

@media (max-width: 860px) {
  .float-menu { display: inline-block; }
  .map-overlay { padding-left: 72px; }
  .sites-map-full { min-height: 70vh; }
}

.topbar { display: none !important; }
@media (max-width: 860px) {
  .float-menu { display: inline-block; }
}
.day-strip {
  position: relative;
  height: 44px;
  background: #f4f5f7;
  border: 1px solid var(--line);
  margin: 0 0 16px;
}
.day-block {
  position: absolute;
  top: 8px;
  height: 28px;
  line-height: 28px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  color: #111;
}
.day-block.win-am { background: #e7f4fe; color: #0874c9; }
.day-block.win-refresh { background: #fff6e8; color: #b45309; }
.day-block.win-locking { background: #eee8f8; color: #5b3d8f; }
.day-block.is-now { outline: 2px solid currentColor; }
.task-st { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; }
.task-st-open { background: var(--blue-s); color: var(--blue-d); }
.task-st-complete { background: var(--ok-s); color: var(--ok); }
.task-st-missed { background: var(--bad-s); color: var(--bad); }
.task-st-late { background: var(--warn-s); color: var(--warn); }
.yesno { border: 0; padding: 0; margin: 0 0 10px; }
.yesno legend { font-weight: 650; font-size: 13px; color: #111; }
.req { color: var(--bad); }

/* —— Settings (Users / Roles / Profile) Live-shaped, sidebar chrome only —— */
.settings-chrome { margin-bottom: 8px; }
.settings-tabs {
  display: flex; gap: 0; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin: 0 0 16px;
}
.settings-tabs a {
  padding: 10px 16px; text-decoration: none;
  color: var(--muted); font-weight: 650; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.settings-tabs a:hover { color: var(--ink); }
.settings-tabs a.on { color: var(--blue-d); border-bottom-color: var(--blue); }
.settings-h2 { font-size: 18px; font-weight: 650; color: #2a2f36; margin: 0 0 4px; }
.page-head-actions { align-items: flex-end; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-actions { margin-top: 16px; }
.perm-h { font-size: 15px; margin: 18px 0 6px; color: #2a2f36; }
.perm-wrap { overflow: auto; border: 1px solid var(--line); background: #fff; margin: 8px 0 14px; }
table.perm-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.perm-grid th, table.perm-grid td {
  padding: 8px 10px; border-bottom: 1px solid #eee; text-align: center; vertical-align: middle;
}
table.perm-grid th {
  font-size: 12px; font-weight: 650; color: #6b7280; background: #f7f8fa; text-align: center;
}
table.perm-grid td.perm-lab { text-align: left; font-weight: 650; color: #111; min-width: 180px; }
table.perm-grid tr.perm-restrict { background: #fff6e8; }
table.perm-grid tr.perm-restrict td.perm-lab { color: #b45309; }
table.perm-grid tr.perm-override { background: #eef6ff; }
.perm-tick { display: inline-flex; align-items: center; justify-content: center; }
.perm-na { color: #c5c9ce; }
.perm-lock { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.perm-scope td { text-align: left; background: #fafbfc; padding-top: 4px; padding-bottom: 10px; }
.scope-opt { display: inline-flex; gap: 6px; align-items: center; margin-right: 16px; font-weight: 600; }
.notify-wrap { margin: 8px 0 16px; }
table.notify-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
table.notify-matrix th, table.notify-matrix td {
  padding: 7px 10px; border-bottom: 1px solid #eee; text-align: left; vertical-align: middle;
}
table.notify-matrix th { font-size: 12px; font-weight: 650; color: #6b7280; background: #f7f8fa; }
table.notify-matrix input[type=text] {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line-2); background: #fff; color: #111;
}
table.notify-matrix .send-after { max-width: 90px; }
.field-extra { margin: 18px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.contact-block-user {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end;
  margin-bottom: 10px;
}
.contact-block-user .field { margin-bottom: 0; }
.client-ticks { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.role-form, .profile-form { max-width: 980px; }
@media (max-width: 720px) {
  .contact-block-user { grid-template-columns: 1fr; }
}

/* —— Templates builder — one list, Task | Issues. No Audits. —— */
.tpl-builder .crumbs { margin-bottom: 6px; }
.tpl-form { max-width: 920px; }
.tpl-pick-lab { display: block; font-weight: 600; font-size: 12px; margin-bottom: 5px; }
.tpl-pick-box {
  border: 1px solid var(--line-2); background: #fff; padding: 8px 10px;
}
.tpl-pick-search {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line-2);
  background: #fff; color: #111; margin-bottom: 8px;
}
.tpl-pick-list {
  max-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: 2px;
}
.tpl-pick-opt { margin: 0; padding: 3px 4px; font-weight: 550; font-size: 13px; }
.tpl-pick-opt:hover { background: #f4f8fc; }
.tpl-group { padding: 12px 14px; }
.tpl-group-head { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.tpl-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.tpl-field {
  border: 1px solid var(--line);
  background: #fafbfc;
  padding: 10px 12px;
  margin-bottom: 0;
}
.tpl-field-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.tpl-tick { margin: 0 0 2px; white-space: nowrap; font-size: 12px; }
.tpl-opts { margin: 8px 0 0; }
.tpl-opts textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); background: #fff; color: #111; }
.tpl-field-grid {
  display: grid;
  grid-template-columns: 1fr 160px auto auto;
  gap: 10px;
  align-items: end;
}
.site-checks {
  max-height: 320px; overflow: auto;
  border: 1px solid var(--line); padding: 8px 10px; background: #fff;
}
@media (max-width: 720px) {
  .tpl-field-row { flex-direction: column; align-items: stretch; }
  .tpl-group-head { flex-direction: column; align-items: stretch; }
  .tpl-field-grid { grid-template-columns: 1fr; }
}

.tpl-signals { margin: 0 0 12px; padding-left: 18px; color: #111; }
.tpl-signals li { margin: 3px 0; }
.tpl-sites, .site-checks { margin-bottom: 12px; }

.tpl-extra { margin: 8px 0 0; font-size: 13px; }
.tpl-extra .check { margin-right: 10px; }
.tpl-group { margin-bottom: 14px; }
.tpl-group-head { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.tpl-group-head .grow { flex: 1; min-width: 180px; }
.tpl-field-grid { grid-template-columns: 1fr 160px auto auto auto auto auto; }
.tpl-switch { font-weight: 600; }
.tpl-display { margin: 0 0 8px; }
.tpl-lock-row { margin: 8px 0 16px; }

.tpl-inline { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0; }
.tpl-save-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tpl-group-title { font-size: 16px; margin: 12px 0 6px; }
.tpl-opts { margin: 8px 0 0; padding-top: 6px; border-top: 1px dashed var(--line); }
.tpl-opts .lede { margin: 0 0 6px; }

.tpl-group-head .field { min-width: 140px; }
.tpl-audit-note { margin: 0 0 14px; }

.sched-groups { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
#tpl-groups-pick { max-height: 180px; overflow: auto; margin-bottom: 12px; }


/* —— Consumables (mobile-first) —— */
.cons-page { padding-bottom: 96px; }
.cons-head-btn { min-height: 44px; padding: 10px 16px; }
.cons-seg { flex-wrap: wrap; }
.cons-seg a { min-height: 40px; display: inline-flex; align-items: center; }
.cons-label { display: block; font-weight: 650; font-size: 13px; margin-bottom: 6px; }
.cons-select, .cons-notes, .cons-qty-input {
  width: 100%; font-size: 16px; min-height: 48px;
  padding: 10px 12px; border: 1px solid var(--line-2); background: #fff; color: #111;
}
.cons-card { padding: 14px; }
.cons-contract-note { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.cons-list { display: flex; flex-direction: column; gap: 10px; }
.cons-order-card, .cons-cat-card, .cons-budget-card, .cons-item-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); padding: 14px;
}
.cons-order-card:hover, .cons-cat-card:hover { border-color: var(--blue); }
.cons-order-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cons-order-no { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.cons-order-site { font-weight: 650; font-size: 16px; margin-top: 6px; }
.cons-order-meta, .cons-order-who { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cons-thumb, .cons-thumb-ph {
  width: 70px; height: 70px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--line); background: #f4f5f7; border-radius: 4px;
}
.cons-thumb-ph { display: inline-block; background:
  linear-gradient(135deg, #eef2f6 0%, #dfe5eb 100%); }
.cons-item-head, .cons-cat-card { display: flex; gap: 12px; align-items: center; }
.cons-item-meta { flex: 1; min-width: 0; }
.cons-item-name { font-weight: 650; font-size: 16px; }
.cons-item-desc { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.cons-items { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; }
.cons-sups { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.cons-sup {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line-2); padding: 12px; margin: 0;
  min-height: 48px; background: #fff;
}
.cons-sup:has(input:checked) { border-color: var(--blue); background: var(--blue-s); }
.cons-sup input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; }
.cons-sup-body { flex: 1; min-width: 0; }
.cons-sku { display: block; font-size: 12px; color: var(--muted); }
.cons-gst { font-size: 13px; margin-top: 4px; }
.cons-gst.inclusive { color: var(--ok); }
.cons-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.cons-qty {
  display: flex; flex-direction: row; align-items: center; gap: 0;
  flex-shrink: 0; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff;
}
.cons-qty-btn {
  width: 40px; height: 40px; border: 0; background: #fff;
  font-size: 22px; font-weight: 650; cursor: pointer; color: #111; line-height: 1;
}
.cons-qty-input {
  width: 40px; min-height: 40px; text-align: center; border: 0; border-left: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2); padding: 0; font-size: 16px; font-weight: 650; background: #fff;
  -moz-appearance: textfield;
}
.cons-qty-input::-webkit-outer-spin-button,
.cons-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cons-no-sup { margin: 8px 0 0; font-size: 13px; }
.cons-budget {
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--blue-s); border: 1px solid #c5e3fb; font-size: 14px;
}
.cons-budget.over { background: var(--warn-s); border-color: #f0d0a0; color: var(--warn); }
.cons-sticky {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff; border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  margin: 16px -18px -16px;
}
.cons-btn { min-height: 48px; padding: 12px 16px; font-size: 16px; }
.cons-btn-process { flex: 1; min-width: 160px; }
.cons-running { width: 100%; font-weight: 650; font-size: 14px; }
.cons-slot { border: 1px solid var(--line); padding: 12px; margin: 0 0 12px; }
.cons-slot legend { font-weight: 650; padding: 0 6px; }
.cons-charge { display: flex; flex-direction: column; gap: 8px; }
.cons-month { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.cons-month .cons-select { min-width: 140px; }
.cons-cat-body { min-width: 0; }

.cons-price-tools { margin: 0 0 16px; }
.cons-price-tools h2 { margin: 0 0 8px; font-size: 18px; }
.cons-price-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.cons-price-upload .field { margin: 8px 0; }
.cons-price-upload input[type=file] { width: 100%; font-size: 16px; }

@media (min-width: 720px) {
  .cons-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* —— Maps: Live All Activity drawer (CONNECT Real-time feed) —— */
.map-stage.feed-open .sites-map-full { right: 320px; }
.map-stage.feed-open .map-overlay { right: 332px; }
.map-stage.feed-open .map-fab { right: calc(320px + 64px); }
.map-stage.feed-open .feed-reopen { right: 332px; }

.map-toolbar {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.feed-clock {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.feed-clock.on, .feed-clock:hover { border-color: var(--blue); color: var(--blue-d); }

.misses-toggle {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line-2);
  padding: 6px 10px;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
  user-select: none;
}
.misses-toggle-lab { line-height: 1; }
.misses-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.misses-toggle-ui {
  width: 36px; height: 20px;
  background: #d1d5db;
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
}
.misses-toggle-ui::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.misses-toggle input:checked + .misses-toggle-ui { background: #0a8cf0; }
.misses-toggle input:checked + .misses-toggle-ui::after { transform: translateX(16px); }
.misses-toggle:focus-within { border-color: var(--blue); }
.map-stage.show-misses .misses-toggle { border-color: #0a8cf0; background: #f0f8ff; }

.feed-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 320px;
  background: #fff;
  z-index: 10;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 18px rgba(20,28,38,.12);
  font-family: var(--font);
  color: #111;
}
.feed-panel[hidden] { display: none !important; }
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px 16px;
  border-bottom: 1px solid #eceef0;
  flex-shrink: 0;
}
.feed-head-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.feed-head h2 {
  font-size: calc(16px * 1.15);
  font-weight: 650;
  color: #111;
}
.feed-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 650;
  color: #15803d;
}
.feed-live i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}
.feed-filter-note {
  margin: 0;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 650;
  color: #9a3412;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
}
.feed-filter-note[hidden] { display: none !important; }
.feed-foot {
  flex-shrink: 0;
  padding: 10px 14px;
  border-top: 1px solid #eceef0;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}
.feed-close {
  border: 0; background: transparent;
  font-size: 22px; line-height: 1;
  cursor: pointer; color: #6b7280;
  width: 32px; height: 32px;
}
.feed-close:hover { color: #111; }
.feed-list {
  overflow: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.feed-empty {
  padding: 28px 16px;
  color: #5c6570;
  font-size: calc(14px * 1.25);
}
.feed-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eceef0;
  background: #fff;
  padding: 10px 12px 10px 8px;
  cursor: pointer;
  font: inherit;
  color: #111;
}
.feed-row:hover, .feed-row.on { background: #f6f8fa; }
.feed-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.feed-rel {
  font-size: calc(11px * 1.25);
  color: #8a929c;
  padding-top: 0;
  text-align: center;
  line-height: 1.1;
}
.feed-ico {
  width: 22px; height: 22px;
  margin-top: 0;
  color: #111;
}
.feed-row.closed .feed-ico { color: #2f7d4a; }
.feed-row.issue .feed-ico { color: #e07b2a; }
.feed-row.missed .feed-ico { color: #c2410c; }
.feed-badge.open {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #fee2e2;
  color: #b91c1c;
  padding: 1px 6px;
}
.feed-detail-miss {
  margin: 0 14px 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.feed-title {
  font-size: calc(13px * 1.25);
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}
.feed-sub {
  font-size: calc(12px * 1.25);
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.35;
  word-break: break-word;
}
.feed-reopen {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 9;
  background: #fff;
  border: 1px solid var(--line-2);
  padding: 7px 12px;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(20,28,38,.08);
}


/* Maps pin gestures — site activity list + form popup + pin drag */
.activity-row-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 4px 12px;
}
.activity-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-2, #e2e8f0);
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.activity-row:hover { border-color: #0a8cf0; }
.activity-row-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 2px;
}
.activity-row.kind-issue .activity-row-kicker { color: #c2410c; }
.activity-row.kind-visit .activity-row-kicker { color: #475569; }
.activity-row-title {
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
  word-break: break-word;
}
.activity-row-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}
.activity-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #0a8cf0;
  font-weight: 650;
  font-size: 13px;
  padding: 8px 4px 4px;
  cursor: pointer;
}
.leaflet-marker-icon.e3-pin-wrap.pin-dragging .e3-pin {
  filter: drop-shadow(0 0 8px rgba(10, 140, 240, 0.95));
  transform: scale(1.06);
  transform-origin: 15px 39px;
}
.map-fab .fab-issue[aria-label="New Issue"] { /* Issue rename on Maps FABs */ }

.activity-overlay.form-left {
  justify-content: flex-start;
  background: transparent;
  pointer-events: none;
  z-index: 2500;
  left: var(--sidebar-w);
}
.activity-overlay.form-left .activity-panel {
  pointer-events: auto;
  position: relative;
  z-index: 2501;
  isolation: isolate;
  background: #fff;
  margin: 12px 0 12px 12px;
  height: calc(100% - 24px);
  width: min(420px, calc(100vw - var(--sidebar-w) - 360px));
  max-width: 460px;
  box-shadow: 8px 0 28px rgba(20,28,38,.18);
  border-radius: 2px;
}
.activity-overlay.form-left .activity-head {
  background: #7cb342;
  color: #fff;
  border-bottom: 0;
  padding: 12px 14px 14px;
}
.activity-overlay.form-left.kind-issue .activity-head { background: #e07b2a; }
.activity-overlay.form-left.kind-visit .activity-head { background: #5c6570; }
.activity-kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .92;
  margin-bottom: 2px;
}
.activity-overlay.form-left .activity-head h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}
.activity-overlay.form-left .activity-alias { color: rgba(255,255,255,.85); font-family: var(--font); }
.activity-head-actions { display: flex; gap: 4px; flex-shrink: 0; }
.activity-overlay.form-left .activity-close,
.activity-icon-btn {
  border: 0; background: transparent; color: #fff;
  width: 32px; height: 32px; cursor: pointer;
  font-size: 18px; line-height: 1;
}
.form-meta {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 12px;
  padding: 14px 4px 8px;
  font-size: 13px;
  color: #111;
}
.form-meta .k { color: #5c6570; }
.form-meta .v { color: #111; word-break: break-word; }
.leaflet-marker-icon.pin-selected {
  filter: drop-shadow(0 0 8px #0a8cf0);
}
.leaflet-marker-icon.pin-miss {
  filter: drop-shadow(0 0 8px #dc2626);
}
.leaflet-marker-icon.pin-dim {
  opacity: 0.38;
}

/* E3 short-needle asset pins (Maps hub / Real-time) — colour = Contract */
.leaflet-marker-icon.e3-pin-wrap {
  background: transparent !important;
  border: 0 !important;
}
.e3-pin-wrap .e3-pin {
  display: block;
  width: 30px;
  height: 48px;
  overflow: visible;
  filter: drop-shadow(0 1px 1.5px rgba(15, 23, 42, 0.28));
}
.leaflet-marker-icon.e3-pin-wrap.pin-selected .e3-pin {
  filter: drop-shadow(0 0 6px rgba(10, 140, 240, 0.85));
}
.leaflet-marker-icon.e3-pin-wrap.pin-miss .e3-pin {
  filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.9));
}

.map-contract-legend {
  position: absolute;
  left: 14px;
  bottom: 28px;
  z-index: 12;
  width: min(260px, calc(100vw - 120px));
  max-width: min(260px, calc(100vw - 120px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  font-size: 12px;
  line-height: 1.25;
  color: #0f172a;
  pointer-events: auto;
}
.map-contract-legend[hidden] { display: none !important; }
.map-legend-panes {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px 12px 8px;
}
.map-legend-pane[hidden] { display: none !important; }
.map-legend-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  flex: 0 0 auto;
}
.map-legend-tab {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  padding: 10px 8px;
  cursor: pointer;
}
.map-legend-tab.on {
  color: #0a8cf0;
  box-shadow: inset 0 -2px 0 #0a8cf0;
  background: #fff;
}
.ml-live-block { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.ml-leg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
}
.ml-leg-lab { font-weight: 600; color: #0f172a; }
.ml-ico {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.08);
}
.ml-ico svg { display: block; }
.ml-cluster {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ml-count {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: #22c55e;
  box-shadow: none;
}
.ml-sig { border-radius: 4px; }
.ml-sig.ml-beacon { border-radius: 999px; }
.ml-sig.ml-qr { border-radius: 3px; }
.ml-sig.ml-nfc {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  transform: rotate(45deg);
  margin: 2px;
}
.ml-sig.ml-popper {
  border-radius: 999px 999px 999px 4px;
}
.map-legend-divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 10px 0;
}
.ml-base-radios {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.ml-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: #0f172a;
  cursor: pointer;
  margin: 0;
}
.ml-radio input { accent-color: #0a8cf0; margin: 0; }
.ml-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  margin: 0;
  cursor: pointer;
}
.ml-opt-row.is-nested {
  padding-left: 12px;
  min-height: 30px;
}
.ml-opt-lab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: #0f172a;
}
.ml-connect-new {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c3aed;
  background: #f3e8ff;
  border-radius: 999px;
  padding: 1px 6px;
}
.ml-switch { position: relative; display: inline-flex; flex: 0 0 auto; }
.ml-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.ml-switch-ui {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background .15s ease;
}
.ml-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.25);
  transition: transform .15s ease;
}
.ml-switch input:checked + .ml-switch-ui { background: #22c55e; }
.ml-switch input:checked + .ml-switch-ui::after { transform: translateX(16px); }
.ml-signals-children { margin: 0 0 4px; }
.ml-signals-children[hidden] { display: none !important; }
.signal-pin { background: transparent !important; border: 0 !important; }
.signal-pin .ml-ico { width: 14px; height: 14px; }
.map-contract-legend-title {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}
.map-near-me {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.map-near-me-label {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 650;
  color: #475569;
}
.map-near-me-label strong { color: #0f172a; font-variant-numeric: tabular-nums; }
.map-near-me-slider {
  width: 100%;
  accent-color: #0a8cf0;
  cursor: pointer;
}
.map-near-me-apply {
  appearance: none;
  border: 1px solid rgba(10, 140, 240, 0.35);
  background: #eff8ff;
  color: #0369a1;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.map-near-me-apply:hover { background: #dbeafe; }
.map-contract-legend-rows { display: flex; flex-direction: column; gap: 2px; }
.map-contract-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  cursor: pointer;
  margin: 0;
}
.map-contract-legend-row.is-off { opacity: 0.45; }
.map-contract-toggle {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #0a8cf0;
  flex: 0 0 auto;
  cursor: pointer;
}

/* Contract face — map pin colour picker (Assets fold) */
.cf-map-colour {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.cf-map-colour-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 4px;
}
.cf-map-colour-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
}
.cf-map-colour-meta { font-size: 12px; }
.cf-map-colour-hint { margin: 0 0 10px; font-size: 12px; line-height: 1.35; }
.cf-map-colour-form { margin: 0; }
.cf-map-colour-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.cf-map-swatch-preview {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.18), 0 1px 2px rgba(15,23,42,.08);
  flex: 0 0 auto;
}
.cf-map-colour-form input[type="color"] {
  width: 42px;
  height: 32px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.cf-map-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: 280px;
}
.cf-map-swatch {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.16);
  cursor: pointer;
  padding: 0;
}
.cf-map-swatch.is-on {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #0a8cf0;
}
.cf-map-swatch:focus-visible {
  outline: 2px solid #0a8cf0;
  outline-offset: 2px;
}

.map-contract-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.map-contract-name {
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-stage.feed-open .map-contract-legend { width: min(240px, calc(100vw - 360px)); max-width: min(240px, calc(100vw - 360px)); }
@media (max-width: 820px) {
  .map-contract-legend {
    left: 10px;
    bottom: 88px;
    max-height: 48vh;
    width: min(240px, calc(100vw - 24px));
  }
}

.map-fab {
  position: absolute;
  right: 64px;
  bottom: 28px;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.map-fab .fab-stack, .map-fab .fab-plus { pointer-events: auto; }
.fab-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.fab-stack[hidden], .fab-plus[hidden] { display: none !important; }
.fab-btn {
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 2px 8px rgba(20,28,38,.22);
  padding: 0;
}
.fab-btn svg { width: 22px; height: 22px; display: block; }
.fab-plus, .fab-add, .fab-collapse { background: #22d3ee; }
.fab-task { background: #8bc34a; }
.fab-issue { background: #f5a623; }
.fab-edit { background: #ef7a7a; }
.fab-btn:hover { filter: brightness(1.05); }

.map-hint {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 12;
  background: #141c26;
  color: #fff;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  pointer-events: none;
  max-width: 80%;
}
.map-hint[hidden] { display: none !important; }

.leaflet-control-layers {
  margin-top: 58px !important;
}
.main-map .leaflet-bottom.leaflet-right {
  margin-bottom: 10px;
}

@media (max-width: 860px) {
  .feed-panel { width: min(300px, 86vw); }
  .map-stage.feed-open .sites-map-full { right: 0; }
  .map-stage.feed-open .map-overlay { right: 12px; padding-right: 8px; }
  .map-stage.feed-open .map-fab { right: 64px; }
  .misses-toggle { margin-left: 0; }
  .activity-overlay.form-left .activity-panel {
    width: min(100%, 420px);
    margin: 0;
    height: 100%;
  }
}

.sites-map-full, .sites-map-full .leaflet-container, .sites-map-full .leaflet-pane {
  z-index: 1;
}
.sites-map-full .leaflet-control, .sites-map-full .leaflet-top, .sites-map-full .leaflet-bottom {
  z-index: 8;
}


/* Field Reports (Live drill-down) */
.report-tabs { margin: 0 0 14px; }
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.report-card {
  display: block;
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px 16px 14px;
  text-decoration: none;
  color: inherit;
}
.report-card h2 { font-size: 16px; margin: 0 0 6px; color: #111; }
.report-card:hover { border-color: var(--blue); }
.report-lh .report-exports { display: flex; gap: 8px; flex-wrap: wrap; }
.report-exports .btn { font-size: 13px; }
.ex-x { font-weight: 800; font-size: 16px; line-height: 1; display: inline-block; }
.ex-x.red { color: #d23b3b; }
.ex-x.green { color: #1f9d58; }
@media print {
  .share-bar, .float-menu, .sidebar, .scrim { display: none !important; }
  .live-doc { border: 0; }
}

.tpl-asg { margin: 22px 0 18px; padding-top: 8px; border-top: 1px solid #eceef0; }
.tpl-asg .report-h { font-size: 22px; font-weight: 400; color: #6b7280; margin: 0 0 10px; }
.tpl-asg-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px 24px; align-items: start; margin: 14px 0; }
.tpl-asg-lab { font-size: 14px; font-weight: 650; color: #374151; padding-top: 8px; }
.tpl-asg-lab span { display: block; font-weight: 400; font-size: 12px; color: #9ca3af; }
.tpl-asg-box { position: relative; }
.tpl-asg-btn { width: 100%; text-align: left; background: #fff; border: 1px solid #d1d5db; padding: 9px 12px; color: #6b7280; cursor: pointer; min-height: 40px; }
.tpl-asg-btn.has { color: #111; }
.tpl-asg-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid #d1d5db; max-height: 240px; overflow: auto; box-shadow: 0 8px 24px rgba(20,28,38,.12); }
.tpl-asg-opt { display: block; padding: 8px 12px; font-size: 13px; cursor: pointer; }
.tpl-asg-opt:hover { background: #f4f8fc; }
.tpl-asg-chipbox { min-height: 40px; max-height: 148px; overflow: auto; border: 1px solid #d1d5db; background: #fff; padding: 6px 8px; display: flex; flex-wrap: wrap; gap: 6px; cursor: pointer; }
.tpl-asg-chip { display: inline-flex; align-items: center; gap: 6px; background: #cfe8f8; color: #1f4e79; font-size: 13px; line-height: 1.2; padding: 5px 8px 5px 4px; border-radius: 2px; }
.tpl-asg-x { border: 0; background: transparent; color: #4b5563; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.tpl-asg-x:hover { color: #111; }
.tpl-asg-ph { color: #9ca3af; font-size: 14px; padding: 4px 2px; }
/* Assignments: CONNECT select-filter multi-pick chips */
.tpl-asg-filter { display: flex; flex-direction: column; gap: 8px; }
.tpl-asg-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.tpl-asg-chip.is-on {
  display: inline-flex; align-items: center; gap: 6px;
  background: #cfe8f8; color: #1f4e79; font-size: 13px; line-height: 1.2;
  padding: 5px 8px 5px 10px; border-radius: 2px;
}
.tpl-asg-chip-lab { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-asg-filter .select-filter-wrap { width: 100%; max-width: 480px; }
.tpl-g-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.tpl-g-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tpl-group-live { background: #fff; border: 1px solid #e5e7eb; padding: 16px 18px 18px; margin: 0 0 16px; }
.tpl-g-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tpl-g-title { font-size: 22px; font-weight: 400; color: #6b7280; }
.tpl-g-row { display: grid; grid-template-columns: 160px 1fr; gap: 8px 24px; align-items: center; margin: 10px 0; }
.tpl-g-lab { font-size: 14px; font-weight: 650; color: #374151; }
.tpl-g-lab .tpl-opt { display: block; font-weight: 400; font-size: 12px; color: #9ca3af; }
.tpl-g-input { width: 100%; border: 1px solid #d1d5db; padding: 8px 10px; background: #fff; color: #111; }
.tpl-skip { display: block; margin: 10px 0 16px; font-size: 14px; }
.tpl-field-table { margin-top: 8px; }
.tpl-field-head, .tpl-field-cols { display: grid; grid-template-columns: minmax(140px,1.4fr) 72px 100px 150px minmax(120px,1fr) 36px; gap: 8px; align-items: center; }
.tpl-field-head { font-size: 12px; font-weight: 650; color: #6b7280; padding: 6px 0; border-bottom: 1px solid #eceef0; }
.tpl-field { border: 0; background: transparent; padding: 8px 0; }
.tpl-field-cols input[type=text], .tpl-field-cols input:not([type]), .tpl-field-cols select { width: 100%; border: 1px solid #d1d5db; padding: 7px 8px; background: #fff; }
.tpl-col-check { display: grid; place-items: center; }
.tpl-field-x { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: #6b7280; }
.tpl-add-field-link { border: 0; background: transparent; color: var(--blue); font-weight: 650; padding: 8px 0; cursor: pointer; }
.tpl-add-group { margin: 4px 0 22px; }
.tpl-opt-text { font-size: 13px; color: #374151; }

.tpl-col-opts { min-width: 200px; }
.tpl-select-type { width: 100%; min-width: 180px; }
.tpl-field [data-tpl-extra] { display: none !important; }
.tpl-field[data-kind="text"] [data-tpl-extra="text"] { display: flex !important; }
.tpl-field[data-kind="select"] [data-tpl-extra="select"] { display: block !important; }
.tpl-field[data-kind="display_text"] [data-tpl-extra="display_text"] { display: block !important; }
.tpl-field[data-kind="display_image"] [data-tpl-extra="display_image"] { display: block !important; }
.tpl-field[data-kind="date"] [data-tpl-extra="date"] { display: block !important; }
.tpl-field[data-kind="file"] [data-tpl-extra="file"] { display: block !important; }
.tpl-field[data-kind="media"] [data-tpl-extra="media"] { display: block !important; }
.tpl-field[data-kind="time"] [data-tpl-extra="time"] { display: block !important; }
.tpl-field[data-kind="user"] [data-tpl-extra="user"] { display: block !important; }
.tpl-field[data-kind="user"] [data-tpl-extra="select"] { display: none !important; }
.tpl-field[data-kind="switch"] [data-tpl-extra],
.tpl-field[data-kind="signature"] [data-tpl-extra],
.tpl-field[data-kind="number"] [data-tpl-extra],
.tpl-field[data-kind="user"] [data-tpl-extra="select"] { display: none !important; }
.tpl-user-opts { display: grid; gap: 4px; }
.tpl-user-lab { font-size: 12px; color: #6b7280; font-weight: 650; }
.tpl-user-select:disabled,
.tpl-user-select[disabled] { background: #f3f4f6 !important; color: #6b7280 !important; cursor: not-allowed; opacity: 1; }
.tpl-field[data-kind="user"] .tpl-user-opts[hidden] { display: grid !important; }
.tpl-add-field-icon {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--blue); color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; margin: 10px 0 4px; display: inline-grid; place-items: center;
}
.tpl-dt { border: 1px solid #d1d5db; background: #fff; padding: 8px; margin-top: 8px; }
.tpl-dt-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 8px; }
.tpl-dt-style { min-width: 120px; border: 1px solid #d1d5db; padding: 6px 8px; background: #fff; }
.tpl-dt-btn { width: 32px; height: 28px; border: 1px solid #d1d5db; background: #fff; cursor: pointer; font-size: 13px; }
.tpl-dt-btn.on { background: #e8f3fc; border-color: var(--blue); color: var(--blue); }
.tpl-dt-href, .tpl-dt-body, .tpl-dt-when { width: 100%; border: 1px solid #d1d5db; padding: 8px; margin-top: 6px; background: #fff; }
.tpl-dt-body { min-height: 120px; }

@media (max-width: 720px) {
  .tpl-asg-row, .tpl-g-row, .tpl-field-head, .tpl-field-cols { grid-template-columns: 1fr; }
  .tpl-field-head { display: none; }
}

/* —— Cleaner phone PWA (Live-like). Staff sidebar unchanged. —— */
.phone-app {
  background: #f4f6f8;
  min-height: 100dvh;
  padding: 0;
}
.phone-app .m-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: calc(48px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 6px 0;
  background: #1b2430;
  color: #fff;
}
.phone-app .m-top-title {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone-app .m-top-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
.phone-app .m-top-btn svg { width: 22px; height: 22px; display: block; }
.phone-app a.m-top-btn { color: #fff; text-decoration: none; }
.phone-app .m-top-spacer { visibility: hidden; }
.phone-app .m-main {
  padding: 12px 12px calc(160px + env(safe-area-inset-bottom, 0px));
  min-height: calc(100dvh - 48px);
}
.phone-app .m-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30;
}
.phone-app .m-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(82vw, 300px);
  background: #141c26; color: #d8dde4; z-index: 40;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.phone-app .m-drawer-who { display: flex; gap: 10px; align-items: center; }
.phone-app .m-drawer-who .who { color: #fff; font-weight: 650; }
.phone-app .m-drawer-who .role { font-size: 12px; color: rgba(216,221,228,.55); }
.phone-app .m-drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.phone-app .m-drawer-nav a {
  display: flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none; font-weight: 650;
  padding: 12px 8px; border-radius: 4px;
}
.phone-app .m-drawer-nav a:hover { background: rgba(255,255,255,.06); }
.phone-app .m-drawer-nav svg { width: 20px; height: 20px; }
.phone-app .m-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: 1fr 1fr 112px 1fr 1fr;
  align-items: end;
  height: calc(80px + env(safe-area-inset-bottom, 0px));
  padding: 0 4px env(safe-area-inset-bottom, 0px);
  background: #1b2430;
  color: rgba(255,255,255,.72);
  box-shadow: 0 -1px 0 rgba(255,255,255,.06);
}
.phone-app .m-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: inherit;
  font-size: 11px; font-weight: 650; letter-spacing: .02em;
  padding: 6px 0 8px; min-height: 80px;
}
.phone-app .m-tab svg { width: 44px; height: 44px; }
.phone-app .m-tab.on { color: #fff; }
.phone-app .m-tab-slot { display: block; }
.phone-app .m-fab {
  position: absolute;
  left: 50%;
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: 112px; height: 112px; border-radius: 50%;
  border: 0; background: #0a8cf0; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(10,140,240,.45);
  cursor: pointer; z-index: 2;
}
.phone-app .m-fab svg { width: 56px; height: 56px; stroke-width: 2.2; }
.phone-app .m-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(20,28,38,.18);
}
.phone-app .m-sheet-handle {
  width: 40px; height: 4px; border-radius: 2px; background: #d7dadd; margin: 4px auto 12px;
}
.phone-app .m-sheet h2 { font-size: 18px; margin: 0 0 8px; }
.phone-app .m-sheet-row {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center;
  padding: 14px 4px; color: #111; text-decoration: none; font-weight: 650;
  border-bottom: 1px solid #eee;
}
.phone-app .m-sheet-row svg { width: 22px; height: 22px; color: #0a8cf0; }
.phone-app .m-sheet-row small { color: #8a929c; font-weight: 500; font-size: 12px; }
.phone-app .m-sheet-cancel {
  display: block; width: 100%; margin-top: 10px; border: 0; background: #f4f6f8;
  padding: 12px; font-weight: 650; cursor: pointer;
}
.phone-app .m-card {
  background: #fff; border: 1px solid #e5e8eb; border-radius: 8px;
  padding: 12px 14px; margin: 0 0 10px;
}
.phone-app .m-card-link { display: block; color: inherit; text-decoration: none; }
.phone-app .m-card h3 { font-size: 15px; margin: 0 0 4px; }
.phone-app .m-card-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #0a8cf0; margin-bottom: 4px;
}
.phone-app .m-card-site { font-size: 13px; color: #5c6570; }
.phone-app .m-card-meta { font-size: 12px; color: #8a929c; margin-top: 4px; }
.phone-app .m-sec { font-size: 13px; font-weight: 700; color: #5c6570; margin: 16px 4px 8px; text-transform: uppercase; letter-spacing: .04em; }
.phone-app .m-empty { text-align: center; padding: 36px 18px; color: #5c6570; }
.phone-app .m-empty h2 { font-size: 18px; color: #141c26; margin-bottom: 8px; }
.phone-app .m-search { margin: 0 0 12px; }
.phone-app .m-search input {
  width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 10px 12px; background: #fff;
}
.phone-app .m-filter-sheet {
  background: #fff; border: 1px solid #e5e8eb; border-radius: 8px; padding: 12px; margin-bottom: 12px;
}
.phone-app .m-field { display: block; margin: 0 0 10px; }
.phone-app .m-field span { display: block; font-size: 12px; font-weight: 650; margin-bottom: 4px; }
.phone-app .m-field select { width: 100%; padding: 8px; border: 1px solid #d1d5db; background: #fff; }
.phone-app .m-scan { margin: -12px -12px 0; }
.phone-app .m-scan-stage {
  position: relative; background: #0b1016; height: min(62vh, 520px); overflow: hidden;
}
.phone-app .m-scan-stage video { width: 100%; height: 100%; object-fit: cover; }
.phone-app .m-scan-reticle {
  position: absolute; left: 50%; top: 50%; width: 220px; height: 220px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 999px rgba(0,0,0,.28);
  border-radius: 8px; pointer-events: none;
}
.phone-app .m-scan-status { text-align: center; padding: 12px; color: #5c6570; }
.phone-app .m-nfc-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 12px 12px; }
.phone-app .m-nfc-btn svg { width: 20px; height: 20px; }
.phone-app .m-lightbox {
  position: fixed; inset: 0; z-index: 50; background: #000; display: grid; place-items: center;
}
.phone-app .m-lightbox[hidden] { display: none; }
.phone-app .m-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.phone-app .cons-page .page-head h1,
.phone-app .cons-page .page-head .lede { display: none; }
.phone-app .cons-page .page { padding: 0; }
.phone-app .cons-head-btn { margin-bottom: 10px; }
.phone-app .page { padding: 0; }
.phone-app .card { border-radius: 8px; }
.phone-app .float-menu, .phone-app .sidebar, .phone-app .app-shell { display: none !important; }

/* Direct-employee Start Shift landing + payroll */
.phone-shift-gate .m-tabbar,
.phone-shift-gate .m-fab,
.phone-shift-gate .m-sheet { display: none !important; }
.phone-shift-gate .m-main { padding-bottom: 24px; }
.shift-start-wrap {
  min-height: calc(100dvh - 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}
.shift-start-form { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.shift-go-btn {
  width: 180px; height: 180px; border-radius: 50%;
  border: 0; background: #22c55e; color: #fff;
  font-size: 22px; font-weight: 700; line-height: 1.15;
  letter-spacing: .02em; cursor: pointer;
  box-shadow: 0 10px 28px rgba(34,197,94,.38);
}
.shift-go-btn:disabled { opacity: .45; box-shadow: none; cursor: wait; }
.shift-go-btn:not(:disabled):active { transform: scale(.98); }
.shift-roster { margin: 0; font-size: 16px; font-weight: 650; color: #141c26; }
.shift-start-out { margin-top: 28px; }
.shift-start-out a { color: #5c6570; font-weight: 650; }
.roster-table input[type=time] { min-width: 8rem; }
tr.extra-pending td { background: #fff8e1; }
.kv { display: grid; gap: 8px 16px; margin: 0 0 16px; }
.kv > div { display: grid; grid-template-columns: 140px 1fr; gap: 8px; }
.kv dt { font-weight: 650; color: #5c6570; }
.kv dd { margin: 0; }

/* iPhone: never a persistent left rail. Hamburger only. [hidden] must beat display:flex. */
.phone-app .m-drawer[hidden],
.phone-app .m-scrim[hidden],
.phone-app .m-sheet[hidden],
.phone-app .m-lightbox[hidden],
.phone-app .m-filter-sheet[hidden] {
  display: none !important;
}
html.is-phone .app-shell {
  grid-template-columns: 1fr !important;
}
html.is-phone .sidebar {
  position: fixed !important;
  inset: 0 auto 0 0;
  width: min(82vw, 300px) !important;
  max-width: 300px;
  transform: translateX(-110%) !important;
  z-index: 40;
  height: 100dvh;
}
html.is-phone .app-shell.side-open .sidebar { transform: none !important; }
html.is-phone .app-shell.side-open .scrim {
  display: block !important;
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35;
}
html.is-phone .float-menu {
  display: grid !important;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background-color: #1b2430;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'><path d='M4 6h12M4 10h12M4 14h12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  border-radius: 8px;
}
html.is-phone.phone-app .float-menu,
.phone-app .float-menu { display: none !important; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr !important; }
  .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: min(82vw, 300px) !important;
    transform: translateX(-110%) !important;
    z-index: 40;
  }
  .app-shell.side-open .sidebar { transform: none !important; }
  .float-menu {
    display: grid !important;
    place-items: center;
    width: 44px; height: 44px;
    padding: 0;
    font-size: 0;
    color: transparent;
    background-color: #1b2430;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'><path d='M4 6h12M4 10h12M4 14h12'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
  }
  .phone-app .float-menu { display: none !important; }
}

/* Phone Order tab: Consumables Order — hide office chrome, show product icons */
.phone-app[data-m-nav="order"] .m-main { background: #f4f5f7; }
.phone-app[data-m-nav="order"] .cons-page .page-head,
.phone-app[data-m-nav="order"] .cons-head-btn,
.phone-app[data-m-nav="order"] .cons-seg,
.phone-app[data-m-nav="order"] .page-seg,
.phone-app[data-m-nav="order"] .lh-seg,
.phone-app[data-m-nav="order"] .contract-toggles { display: none !important; }
.phone-app[data-m-nav="order"] .cons-item-card { background: #fff; }
.phone-app[data-m-nav="home"] .m-main { background: #fff; }

/* —— Public Communication /tell —— */
.tell-app {
  margin: 0;
  min-height: 100dvh;
  background: #f4f5f7;
  color: var(--ink);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tell-top {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--brand-strip, #141c26);
  color: #fff;
  padding: 12px 16px calc(12px + env(safe-area-inset-top, 0));
  padding-top: calc(12px + env(safe-area-inset-top, 0));
}
.tell-top img,
.tell-top .tell-lockup { height: 32px; width: auto; max-width: min(220px, 70vw); display: block; }
.tell-top-sub { min-width: 0; }
.tell-top strong { display: block; font-size: 14px; }
.tell-top small { display: block; font-size: 11px; color: rgba(255,255,255,.8); }
.tell-main { padding: 16px 14px 32px; max-width: 560px; margin: 0 auto; }
.tell-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px 16px 22px;
  box-shadow: var(--shadow);
}
.tell-kicker {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 650;
  margin-bottom: 6px;
}
.tell-card h1 { font-size: 22px; margin-bottom: 10px; line-height: 1.25; }
.tell-card h2 { font-size: 16px; margin: 16px 0 8px; }
.tell-desc { white-space: pre-wrap; margin-bottom: 16px; color: var(--muted); }
.tell-sites { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.tell-site {
  display: block; width: 100%; text-align: left;
  border: 1px solid var(--line-2); background: #fff; padding: 12px;
  cursor: pointer; color: inherit;
}
.tell-site:hover, .tell-site.on { border-color: var(--blue); background: var(--blue-s); }
.tell-site b { display: block; font-size: 15px; }
.tell-site small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.tell-picked {
  background: var(--blue-s);
  border: 1px solid #c5e3fb;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}
.tell-choices { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.tell-stars { display: flex; gap: 6px; margin: 8px 0 12px; }
.tell-star { cursor: pointer; }
.tell-star input { position: absolute; opacity: 0; pointer-events: none; }
.tell-star span {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-weight: 700;
  font-size: 14px;
}
.tell-star input:checked + span,
.tell-star:hover span { background: var(--blue); color: #fff; border-color: var(--blue); }
.req { color: var(--bad); font-weight: 700; }
.comm-qr-card { margin-bottom: 18px; }
.comm-dl { margin: 0 0 12px; }
.comm-dl dt { font-size: 12px; font-weight: 650; color: var(--muted); margin-top: 10px; }
.comm-dl dd { margin: 2px 0 0; }
.comm-photos img { width: 96px; height: 96px; object-fit: cover; }
.phone-app .comm-dl { padding: 0 4px; }

/* Phone landing after Start Shift: raised Communication forms */
.phone-app[data-m-nav="order"] .m-hist.m-comm-landing { padding: 12px 14px 24px; }
.phone-app[data-m-nav="order"] .m-landing-blank { min-height: 40vh; background: #fff; }
.phone-app .m-comm-open { padding: 12px 14px 28px; }
.phone-app .m-comm-open h2 { font-size: 18px; margin: 0 0 4px; }
.phone-app .m-back { font-size: 14px; font-weight: 650; color: #0a8cf0; text-decoration: none; }
.phone-app .comm-close-form {
  background: #fff; border: 1px solid #e5e8eb; border-radius: 8px;
  padding: 14px; margin: 12px 0 0;
}
.phone-app .comm-close-form .field { margin: 0 0 12px; }
.phone-app .comm-close-form label { display: block; font-weight: 650; margin-bottom: 6px; }
.phone-app .comm-close-form textarea,
.phone-app .comm-close-form input[type=file] {
  width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 10px 12px;
}
.phone-app .comm-close-form .hint { font-size: 12px; color: #8a929c; margin-top: 6px; }
.phone-app .comm-dl { margin: 0; }
.phone-app .comm-dl dt { font-size: 12px; font-weight: 650; color: #5c6570; margin-top: 10px; }
.phone-app .comm-dl dd { margin: 2px 0 0; font-size: 15px; }

/* Communication media drop zone — camera roll, photos and/or video */
.media-drop { position: relative; }
.media-drop-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.media-drop-zone {
  display: block;
  border: 2px dashed #c5cbd3;
  border-radius: 10px;
  padding: 28px 16px;
  text-align: center;
  background: #f7f8fa;
  cursor: pointer;
}
.media-drop-zone strong { display: block; font-size: 16px; margin-bottom: 6px; }
.media-drop-zone span { display: block; font-size: 13px; color: #5c6570; line-height: 1.35; }
.media-drop.on .media-drop-zone { border-color: #0a8cf0; background: #e8f4fe; }
.photo-preview video, .comm-photos video {
  width: 160px; height: 96px; object-fit: cover; background: #111; border-radius: 6px;
}
.phone-app .media-drop-zone { padding: 22px 14px; }
.phone-app .media-drop-zone strong { font-size: 15px; }

table.data tr.is-click, table.data tr[data-href] { cursor: pointer; }
table.data tr.is-click:hover td, table.data tr[data-href]:hover td { background: #f4f7fb; }


/* Extra Works wizard chrome (CONNECT-style, Field brand) */
.card-pad { padding: 18px 20px; }
.steps {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.step {
  flex: 1;
  padding: 12px 8px 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.step em {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-style: normal;
  font-size: 12px;
  background: #e6eaef;
  color: #4a5058;
  margin-right: 6px;
}
.step.on {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.step.on em { background: var(--blue); color: #fff; }
.step.done { color: var(--ink); }
.step.done em { background: var(--navy); color: #fff; }
.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.wizard-actions .btn-primary { margin-left: auto; }
.review dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 12px;
  margin: 0;
}
.review dt { color: var(--muted); font-size: 13px; }
.review dd { margin: 0; font-weight: 550; white-space: pre-wrap; }
.wiz-panel[hidden] { display: none !important; }
@media (max-width: 640px) {
  .step { font-size: 12px; padding: 10px 4px 12px; }
  .step em { margin-right: 4px; }
  .review dl { grid-template-columns: 1fr; gap: 2px 0; }
}

/* Extra Works desk */
.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .works-grid { grid-template-columns: 1fr; } }
.works-ticks { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 4px 0 12px; }
.works-ticks .check { font-weight: 600; }
.works-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.media-chip {
  display: inline-block; font-size: 12px; background: #f4f5f7; border: 1px solid var(--line);
  padding: 6px 8px; margin: 4px 4px 0 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Desk of record — Extra Works list */
.works-desk .page-head { align-items: flex-start; }
.works-desk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-new {
  display: inline-flex; align-items: center; gap: 4px;
  background: #1a9b4a; color: #fff; border: 1px solid #1a9b4a;
  padding: 8px 14px; font-weight: 650; font-size: 13px; text-decoration: none;
}
.btn-new:hover { background: #15853f; border-color: #15853f; color: #fff; }
.works-desk-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  margin: 0 0 12px;
}
.works-desk-search { flex: 1 1 220px; max-width: 360px; }
.works-status-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 280px; align-items: center; }
.works-status-chips .works-chip[title*="Toggle recurring"] { margin-left: auto; }
.works-chip {
  display: inline-block; padding: 6px 12px; font-size: 12px; font-weight: 650;
  border: 1px solid var(--line-2); background: #fff; color: #334; text-decoration: none;
  border-radius: 999px;
}
.works-chip:hover { border-color: #0a8cf0; color: #0a8cf0; }
.works-chip.on { background: #0a8cf0; border-color: #0a8cf0; color: #fff; }
.works-desk .table-wrap,
.works-desk-table {
  overflow: auto !important;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}
.works-desk-data { min-width: 1400px; border-collapse: separate; border-spacing: 0; }
.works-desk-data thead th {
  position: sticky; top: 0; z-index: 3;
  background: #f7f8fa; box-shadow: 0 1px 0 var(--line);
  white-space: nowrap; font-size: 12px;
}
.works-desk-data th.sticky,
.works-desk-data td.sticky {
  position: sticky; background: #fff; z-index: 2;
}
.works-desk-data thead th.sticky { z-index: 4; background: #f7f8fa; }
.works-desk-data .sticky-1 { left: 0; min-width: 110px; }
.works-desk-data .sticky-2 { left: 110px; min-width: 140px; }
.works-desk-data .sticky-3 { left: 250px; min-width: 150px; box-shadow: 2px 0 4px rgba(0,0,0,.04); }
.works-desk-data td, .works-desk-data th { padding: 8px 10px; vertical-align: middle; }
.works-ref { color: #0a8cf0; font-weight: 650; text-decoration: none; white-space: nowrap; }
.works-ref:hover { text-decoration: underline; }
.works-row-actions { white-space: nowrap; text-align: center; }
.works-desk-data th.actions { text-align: center; }
.works-desk-ico-cell { text-align: center; }
.works-open { color: #0a8cf0; font-weight: 650; text-decoration: none; }
.works-open:hover { text-decoration: underline; }
.btn-files {
  display: inline-block; font-size: 12px; font-weight: 650;
  padding: 4px 8px; border: 1px solid var(--line-2); background: #f4f5f7; color: #334;
  text-decoration: none;
}
.btn-files:hover { border-color: #0a8cf0; color: #0a8cf0; }
.btn-closeout {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border: 1px solid #86efac; background: #dcfce7; color: #15803d;
  text-decoration: none; cursor: pointer; border-radius: 6px;
}
.btn-closeout:hover { background: #bbf7d0; border-color: #22c55e; }
.works-closeout-form { display: inline; margin: 0; padding: 0; }
.works-scroll-hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.st-badge.st-draft { background: #eef1f4; color: #4b5563; }
.st-badge.st-issued { background: #dbeafe; color: #1d4ed8; }
.st-badge.st-progress { background: #ffedd5; color: #c2410c; }
.st-badge.st-completed { background: #dcfce7; color: #15803d; }
.st-badge.st-invoiced { background: #e5e7eb; color: #4b5563; }
.works-files-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 900px) {
  .works-files-grid { grid-template-columns: 1fr; }
  .works-desk-data .sticky-2,
  .works-desk-data .sticky-3 { position: static; left: auto; box-shadow: none; }
  .works-desk-data .sticky-1 { left: 0; }
}
.works-files-col h3 { font-size: 14px; margin: 0 0 8px; }
.works-files-card .lede { margin-top: 0; }

.lh-more > summary.lh-more-btn { list-style: none; display: inline-block; }
.lh-more > summary.lh-more-btn::-webkit-details-marker { display: none; }
.lh-more[open] > .lh-menu { display: block !important; position: absolute; z-index: 80; }
.table-wrap td:last-child { overflow: visible; position: relative; z-index: 2; }
.table-wrap { overflow: visible; }
.works-desk .table-wrap { overflow: auto !important; }

.crew-pin { background: transparent; border: 0; }
.crew-pin svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }

.lh-menu button {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  padding: 8px 12px; color: #111; font-size: 13px; cursor: pointer; font-family: inherit;
}
.lh-menu button:hover { background: #f4f5f7; }
.lh-menu button.lh-menu-danger { color: #b42318; }
.lh-menu button.lh-menu-danger:hover { background: #fef3f2; }

.confirm-panel { max-width: 420px; }
.confirm-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px 16px; }

.gf-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 16px 0 4px; font-weight: 650; color: #111;
}
.gf-toggle-lab { font-size: 14px; }
.gf-toggle-ctl { position: relative; display: inline-flex; align-items: center; }
.gf-toggle-input {
  position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 44px; height: 24px; z-index: 1;
}
.gf-toggle-track {
  width: 44px; height: 24px; border-radius: 12px; background: #c5c9ce; position: relative;
  box-shadow: inset 0 0 0 1px rgba(20,28,38,.08);
}
.gf-toggle-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease;
}
.gf-toggle-input:checked + .gf-toggle-track { background: #0a8cf0; }
.gf-toggle-input:checked + .gf-toggle-track::after { transform: translateX(20px); }
.gf-toggle-input:focus-visible + .gf-toggle-track { box-shadow: 0 0 0 3px rgba(10,140,240,.28); }
.gf-toggle-help { margin: 0 0 8px; }

/* CONNECT-wide type-to-filter combobox (data-select-filter) */
.select-filter-wrap {
  position: relative;
  width: 100%;
}
.field .select-filter-q,
.lh-field .select-filter-q,
.cons-card .select-filter-q,
.cons-label + .select-filter-q,
label.cons-label .select-filter-q,
.select-filter-q {
  display: block;
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2, #d0d7e2); background: #fff;
  color: #111; -webkit-text-fill-color: #111; caret-color: #111; color-scheme: light;
  margin: 0; box-sizing: border-box; border-radius: 8px; font-size: 14px;
}
/* Consumables forms: filter boxes same height as .cons-select (Damien 2026-09-11) */
.cons-card .select-filter-q,
.cons-card label.cons-label .select-filter-q,
.cons-price-row .select-filter-q {
  min-height: 48px;
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 0;
  border-color: var(--line-2);
}
.cons-price-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 0 0 14px;
}
.cons-price-row .cons-label { margin-bottom: 0; }
.cons-price-row .cons-select,
.cons-price-row .select-filter-wrap { width: 100%; }
.cons-price-row .cons-select { border-radius: 0; }
.select-filter-q::placeholder { color: var(--faint, #9aa3b2); font-weight: 500; }
.select-filter-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.select-filter-results {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line-2, #d0d7e2);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.select-filter-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  cursor: pointer;
}
.select-filter-option:hover,
.select-filter-option.is-active {
  background: #eff6ff;
}
.select-filter-option.is-selected {
  background: #f0fdf4;
}
.select-filter-group {
  font-size: 11px;
  color: #64748b;
}
.select-filter-label {
  font-size: 14px;
  color: #0f172a;
}
.select-filter-empty {
  padding: 10px 12px;
  color: #64748b;
  font-size: 13px;
}


/* Extra Works cost box (CONNECT parity) */
.cost-box {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--border, #d8dee6);
  border-radius: 10px;
  background: #f7f9fc;
}
.cost-box .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
}
.cost-box .row.total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #d8dee6);
  font-weight: 650;
}

/* WO booking acknowledge */
.st-badge.st-booking-pending { background: #fef3c7; color: #b45309; }
.st-badge.st-booking-confirmed { background: #dcfce7; color: #15803d; }
.works-booking-badge { margin-top: 4px; }
.works-booking-badge .st-badge { text-transform: none; letter-spacing: 0; font-size: 10px; }
.muted { color: #6b7280; font-size: 12px; }


/* Contractor profile collapsible sections */
.contractor-fold {
  margin-top: 18px;
  border: 1px solid var(--border, #d8dee6);
  border-radius: 12px;
  background: #fff;
  padding: 0 14px 14px;
}
.contractor-fold.card { padding-bottom: 14px; }
.contractor-fold > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 14px 0 10px;
  font-weight: 650;
  font-size: 15px;
  color: #111;
  user-select: none;
}
.contractor-fold > summary::-webkit-details-marker { display: none; }
.contractor-fold > summary .fold-title { flex: 1; }
.contractor-fold > summary .fold-expand,
.contractor-fold > summary .fold-collapse,
details > summary .fold-expand,
details > summary .fold-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  border: 0;
  background: #0a8cf0;
  border-radius: 999px;
  padding: 0;
  flex-shrink: 0;
}
/* Nested sub-panels: 20px fold controls */
.contractor-fold .contractor-fold > summary .fold-expand,
.contractor-fold .contractor-fold > summary .fold-collapse,
.fold-nested > summary .fold-expand,
.fold-nested > summary .fold-collapse {
  width: 20px;
  height: 20px;
  font-size: 14px;
}
.contractor-fold > summary .fold-collapse,
details > summary .fold-collapse { display: none; }
.contractor-fold[open] > summary .fold-expand,
details[open] > summary .fold-expand { display: none; }
.contractor-fold[open] > summary .fold-collapse,
details[open] > summary .fold-collapse { display: inline-flex; }
.contractor-fold[open] > summary {
  border-bottom: 1px solid var(--border, #e5e9ef);
  margin-bottom: 12px;
}
.contractor-fold .works-grid { margin-top: 4px; }
td.date-soon, .date-soon {
  color: #b45309;
  font-weight: 650;
  background: #fff7ed;
}

/* Recurring desk — fewer columns, no horizontal sprawl */
.works-desk-data.works-desk-recurring { min-width: 980px; }

/* Work Orders desk — month / client / site filters */
.works-desk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f7f9fc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.works-desk-filters .lh-field { margin: 0; min-width: 160px; }
.works-desk-filters .lh-field span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}
.works-desk-filters .lh-select {
  min-width: 180px;
  max-width: 280px;
}

/* Destructive action */
.btn-danger {
  background: #b42318;
  color: #fff;
  border: none;
}
.btn-danger:hover { background: #912018; color: #fff; }
.works-item-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.works-item-footer .works-delete-form { margin-left: auto; }
.works-item-footer .btn-danger {
  min-width: 140px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
}
.works-issued-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}
.works-issued-actions .works-cancel-form {
  display: inline;
}

/* WO POS / CRP gallery — display thumbs ~50% (Damien). Photo export standard is 830×641 — do not downscale uploads to thumb CSS. */
.works-pos-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.works-pos-card {
  margin: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  overflow: hidden;
}
.works-pos-card figcaption {
  font-size: 11px;
  font-weight: 650;
  color: #475569;
  margin-bottom: 4px;
  word-break: break-all;
}
.works-pos-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: contain;
  background: #0f172a0a;
  border-radius: 6px;
  cursor: zoom-in;
}
.works-pos-pdf {
  width: 100%;
  height: 210px;
  border: 0;
  border-radius: 6px;
  background: #f8fafc;
}

/* Contractor Compliance — licences stacked pairs */
.licences-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  max-width: 920px;
}
.licence-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(130px, 0.9fr) minmax(120px, 1.2fr) 44px;
  gap: 10px 12px;
  align-items: end;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
}
.licence-row .field label {
  font-size: 12px;
  white-space: normal;
}
.licence-row .field input {
  width: 100%;
  min-width: 0;
  font-size: 14px;
  padding: 8px 10px;
}
.licence-file-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  min-width: 0;
}
.licence-file-link {
  color: #15803d;
  font-weight: 600;
  font-size: 13px;
  text-decoration: underline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.licence-file-missing { font-size: 13px; }
.licence-file-del { display: inline; margin: 0; }
.licence-file-del-btn {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.licence-file-del-btn:hover { color: #b91c1c; }
.licence-upload-form {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 38px;
}
.licence-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.licence-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #0a8cf0;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.licence-upload-icon:hover { filter: brightness(1.06); }
@media (max-width: 720px) {
  .licence-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "val exp"
      "file up";
  }
  .licence-row .field:first-child { grid-area: val; }
  .licence-row .field:nth-child(2) { grid-area: exp; }
  .licence-file-cell { grid-area: file; }
  .licence-upload-form, .licence-upload-locked { grid-area: up; justify-self: end; }
}

.agreed-rates {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 8px 0 4px;
}
.agreed-rate-day {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.agreed-rate-day-lab {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.agreed-rate-day .field label {
  font-size: 11px;
}
.agreed-rate-day .field input {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.agreed-rate-weekend {
  background: #fff7ed;
  border-color: #fed7aa;
}
.agreed-rate-ph {
  background: #fef2f2;
  border-color: #fecaca;
}
@media (max-width: 1100px) {
  .agreed-rates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .agreed-rates { grid-template-columns: 1fr 1fr; }
}

/* Site assignment — dates in one box */
.assignment-dates-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  margin-top: 4px;
}
.assignment-dates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: end;
}
@media (min-width: 900px) {
  .assignment-dates-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.assignment-dates-box .field { margin: 0; }
.assignment-dates-box .field input { width: 100%; }

/* Contractor profile — Identity / Commercial / Compliance / Notes in one card */
.contractor-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding-bottom: 16px;
}
.contractor-save-form {
  display: contents;
}
.contractor-shell > input[type="hidden"],
.contractor-save-form > input[type="hidden"] {
  display: none;
}
.contractor-shell > .cs-identity { grid-row: 1; }
.contractor-shell > .cs-commercial { grid-row: 2; }
.contractor-shell > .cs-compliance { grid-row: 3; }
.contractor-shell > .cs-tail { grid-row: 4; margin-top: 8px; }
.contractor-shell .contractor-fold {
  margin-top: 12px;
}
.contractor-shell .cs-identity.contractor-fold { margin-top: 0; }
.contractor-shell .cs-compliance .contractor-fold,
.contractor-shell .cs-compliance-fold {
  margin-top: 12px;
}
.contractor-shell .cs-tail .wizard-actions {
  margin-top: 10px;
}

/* Contractor: Add assignment starts collapsed as + icon button */
.contractor-add-assignment > summary.contractor-add-assignment-btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: #16a34a;
  border: 1px solid #15853f;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
.contractor-add-assignment > summary.contractor-add-assignment-btn::-webkit-details-marker { display: none; }
.contractor-add-assignment > summary.contractor-add-assignment-btn:hover {
  background: #15853f;
}
.contractor-add-assignment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
}
.contractor-add-assignment[open] > summary.contractor-add-assignment-btn {
  border-radius: 10px;
  margin-bottom: 4px;
}

/* Contractor site assignments: one collapsed key-info row by default */
.assignment-list { display: flex; flex-direction: column; gap: 8px; }
.assignment-row {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.assignment-row > summary.assignment-row-summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) minmax(90px, 0.7fr) minmax(70px, 0.5fr) minmax(110px, 0.8fr) minmax(120px, 1.2fr) 18px;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.assignment-row > summary.assignment-row-summary::-webkit-details-marker { display: none; }
.assignment-row-site { font-weight: 600; color: #0f172a; }
.assignment-row-meta { color: #64748b; font-size: 13px; }
.assignment-row-fee { font-weight: 600; font-variant-numeric: tabular-nums; }
.assignment-row-period { color: #475569; font-size: 13px; white-space: nowrap; }
.assignment-row-days { color: #64748b; font-size: 12px; }
.assignment-row > summary .fold-expand,
.assignment-row > summary .fold-collapse {
  justify-self: end;
}

.assignment-row[open] > summary.assignment-row-summary {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.assignment-row-body { padding: 12px 14px 16px; }
.assignment-issue-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}
@media (max-width: 900px) {
  .assignment-row > summary.assignment-row-summary {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "site chev"
      "meta fee"
      "period period"
      "days days";
  }
  .assignment-row-site { grid-area: site; }
  .assignment-row > summary .fold-expand,
  .assignment-row > summary .fold-collapse { grid-area: chev; }
  .assignment-row-meta { grid-area: meta; }
  .assignment-row-fee { grid-area: fee; justify-self: end; }
  .assignment-row-period { grid-area: period; }
  .assignment-row-days { grid-area: days; }
}

.identity-delete-bar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

/* Contractors list: Allocate / Open as icons */
.contractor-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #0a8cf0;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  cursor: pointer;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}
.contractor-icon-btn::-webkit-details-marker { display: none; }
.contractor-icon-btn:hover {
  background: #0a8cf0;
  border-color: #0a8cf0;
  color: #fff;
}
.contractor-alloc > summary.contractor-icon-btn { margin: 0; }
.contractor-alloc-cell,
.contractor-open-cell {
  width: 48px;
  text-align: center;
  vertical-align: middle;
}
.contractor-alloc[open] > summary.contractor-icon-btn {
  background: #0a8cf0;
  border-color: #0a8cf0;
  color: #fff;
}

/* Work Orders desk: Quote / POS / Open as icons */
.works-desk-ico-cell { white-space: nowrap; }
.works-desk-ico {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0a8cf0;
  text-decoration: none;
  vertical-align: middle;
}
.works-desk-ico:hover { color: #0369a1; }
.works-desk-ico-qty {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.works-row-actions .works-desk-ico {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  box-sizing: border-box;
}
.works-row-actions .works-closeout-form { margin-left: 6px; }
.works-row-actions .works-desk-ico:hover {
  background: #0a8cf0;
  border-color: #0a8cf0;
  color: #fff;
}

.works-file-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.works-copy-pos-form { display: inline; margin: 0; }
.works-copy-pos-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 8px;
  border: 1px solid #0a8cf0; border-radius: 6px;
  background: #eff8ff; color: #0a8cf0; font-size: 16px; font-weight: 700;
  cursor: pointer; line-height: 1;
}
.works-copy-pos-btn:hover { background: #0a8cf0; color: #fff; }
.works-pos-add-form { margin-top: 10px; }
.works-pos-add-btn {
  position: relative; display: inline-flex; cursor: pointer; overflow: hidden;
}
.works-pos-add-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0;
}
.works-th-ico {
  display: inline-flex; vertical-align: -2px; color: #64748b;
}
.works-desk-ico-crp { color: #475569; }

.works-file-del-form { display: inline; margin: 0 0 0 auto; }
.works-file-del-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; margin-left: 6px;
  border: 0; border-radius: 4px; background: transparent;
  color: #dc2626; font-size: 18px; font-weight: 700; line-height: 1;
  cursor: pointer;
}
.works-file-del-btn:hover { background: #fef2f2; color: #b91c1c; }
.works-file-row { justify-content: flex-start; }
.works-file-row > a { flex: 1; min-width: 0; }

.works-files-crp-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.works-files-crp-block h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.works-files-inline-gallery {
  margin-top: 8px;
}
.works-file-card-cap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.works-file-card-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 650;
  color: #475569;
  word-break: break-all;
}
.works-files-grid {
  grid-template-columns: minmax(280px, 1.3fr) minmax(160px, 0.7fr);
}
@media (max-width: 900px) {
  .works-files-grid { grid-template-columns: 1fr; }
}

.works-files-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.works-files-quote {
  text-align: left;
  max-width: 100%;
}
.works-files-rule {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 14px 0;
}
.works-files-pos { text-align: left; }


/* WO POS video tiles */
.works-pos-card-video { position: relative; }
.works-pos-video-link {
  position: relative;
  display: block;
  text-decoration: none;
}
.works-pos-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: contain;
  background: #0f172a;
  border-radius: 6px;
}
.works-pos-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(10, 140, 240, 0.92);
  color: #fff;
  font-size: 16px;
  line-height: 42px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.works-pdf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }


/* Clients list expander — one blue chrome button; closed + / open − */
.client-row .fold-expand,
.client-row .client-row-collapse,
.client-row .fold-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: #0a8cf0;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}
.client-row:not(.is-open) .fold-collapse,
.client-row:not(.is-open) .client-row-collapse { display: none !important; }
.client-row.is-open .fold-expand { display: none !important; }
.client-row.is-open .fold-collapse,
.client-row.is-open .client-row-collapse { display: inline-flex !important; }
.client-fold-cell { width: 44px; text-align: center; }
.client-open-cell { width: 44px; text-align: right; }

/* Location compliance X / + */
.compliance-site-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.compliance-site-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.compliance-site-main { flex: 1; min-width: 0; }
.compliance-site-actions { flex-shrink: 0; }
.compliance-x,
.btn-del-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.compliance-x:hover,
.btn-del-x:hover { background: #fee2e2; }
.btn-remove-soft {
  border: 0; background: transparent; color: #b91c1c; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 650; padding: 0; text-decoration: underline;
}
.btn-remove-soft:hover { color: #991b1b; }


/* Consumables CONNECT desk (2026-09-11 brief) */
.cons-desk-wrap { overflow-x: auto; margin: 0 0 24px; }
.cons-desk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cons-desk-table th, .cons-desk-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cons-desk-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
/* Catalogue actions: TD stays table-cell so vertical-align:middle works; keep row border under Edit/× */
.cons-desk-actions { white-space: nowrap; }
.cons-desk-actions .btn { margin: 0; }
.cons-cat-table tbody td {
  vertical-align: middle !important;
}
.cons-cat-table td.cons-desk-actions {
  display: table-cell !important;
  vertical-align: middle !important;
  text-align: right;
  white-space: nowrap;
}
.cons-cat-table td.cons-desk-actions .cons-act-edit,
.cons-cat-table td.cons-desk-actions .cons-row-del,
.cons-cat-table td.cons-desk-actions .cons-act-del {
  display: inline-block;
  vertical-align: middle;
  margin: 0 0 0 8px;
}
.cons-cat-table td.cons-desk-actions .cons-act-edit { margin-left: 0; }
.cons-cat-table td.cons-desk-actions .cons-row-del {
  margin: 0 0 0 8px;
}
.cons-act-edit {
  appearance: none; border: 1px solid var(--line); background: #fff; color: #334155;
  font: inherit; font-size: 13px; font-weight: 650; padding: 4px 10px; border-radius: 8px; cursor: pointer;
}
.cons-act-edit:hover { border-color: var(--blue); color: var(--blue); }
.cons-act-del {
  appearance: none; border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c;
  font-size: 22px; font-weight: 700; line-height: 1; padding: 2px 8px; cursor: pointer; border-radius: 8px;
}
.cons-act-del:hover { color: #fff; background: #b91c1c; border-color: #b91c1c; }
.cons-wait-ok { color: #15803d; font-weight: 700; }
.cons-wait-warn { color: #c2410c; font-weight: 700; }
.cons-wait-bad { color: #b91c1c; font-weight: 700; }
.cons-cat-pills { margin: 0 0 14px; flex: 1 1 auto; }
.cons-cat-section { margin: 0 0 14px; padding: 14px; }
.cons-cat-heading {
  margin: 0 0 10px; font-size: 16px; font-weight: 650; color: #2a2f36;
  letter-spacing: -0.01em; line-height: 1.25;
}
.cons-cat-block { width: 100%; max-width: 100%; box-sizing: border-box; }
.cons-cat-wrap {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box;
  overflow-x: auto; margin: 0;
}
.cons-cat-table {
  width: 100% !important; max-width: 100%; table-layout: fixed;
  border-collapse: collapse; font-size: 14px;
}
.cons-cat-table th, .cons-cat-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
.cons-cat-table thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); font-weight: 650;
  background: #f7f8fa; border-bottom: 1px solid var(--line);
}
.cons-cat-table tbody tr:last-child td { border-bottom: 0; }
.cons-cat-table th:nth-child(2), .cons-cat-table td:nth-child(2) { width: auto; }
.cons-cat-table th.cons-th-model, .cons-cat-table td.cons-td-model,
.cons-cat-table th.cons-th-units, .cons-cat-table td.cons-td-units { width: 6.5rem; white-space: nowrap; }
.cons-cat-table th:nth-child(5), .cons-cat-table td:nth-child(5),
.cons-cat-table th:nth-child(6), .cons-cat-table td:nth-child(6),
.cons-cat-table th:nth-child(7), .cons-cat-table td:nth-child(7) { width: 7.5rem; }
.cons-cat-table th:nth-child(8), .cons-cat-table td:nth-child(8) { width: 7.5rem; }
.cons-th-thumb, .cons-td-thumb { width: 86px; }
.cons-td-model, .cons-td-units { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.cons-price-plain { font-weight: 700; color: var(--ink); display: block; font-size: 19px; line-height: 1.2; }
.cons-price-empty { color: var(--muted); font-size: 19px; }
.cons-sku-plain { display: block; font-size: 12px; color: var(--muted); }
.cons-cat-fold { margin: 0 0 12px; }
.cons-cat-count { font-weight: 500; color: var(--muted); font-size: 13px; }
.cons-cat-heading .cons-cat-count { display: none; }
.cons-check-grid { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; }
.cons-check-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.cons-thumb-sm { width: 36px; height: 36px; }
.cons-assign-cat { font-weight: 700; margin: 12px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }

.cons-assign-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cons-assign-row:last-child { border-bottom: 0; }
.cons-assign-check { margin: 0; }
.cons-assign-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  padding-left: 28px;
}
.cons-charge-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.cons-slot-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: #f7f8fa;
}
.cons-slot-opt {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}
.cons-slot-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cons-slot-opt span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.cons-slot-opt input:checked + span {
  background: #1d4ed8;
  color: #fff;
}
.cons-assign-site-block { margin: 14px 0 18px; }
.cons-assign-site-title { margin: 0 0 8px; font-size: 16px; }
.cons-assign-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cons-assign-row-saved .cons-assign-controls { padding-left: 0; }
@media (min-width: 900px) {
  .cons-assign-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cons-assign-controls { padding-left: 0; }
}

.cons-spend-card { margin: 14px 0; }
.cons-spend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cons-spend-k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.cons-spend-v { font-size: 18px; font-weight: 700; margin-top: 4px; }
.cons-item-budget-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.cons-contract-fold { margin-top: 6px; }
@media (max-width: 720px) {
  .cons-spend-grid, .cons-item-budget-list { grid-template-columns: 1fr; }
  .cons-cat-table th:nth-child(n+3), .cons-cat-table td:nth-child(n+3) { font-size: inherit; }
}

/* Consumables: contract pick is a filter select — never chip toggles */
.cons-page .contract-toggles { display: none !important; }
.cons-contract-pick label { font-weight: 650; font-size: 12px; color: #475569; display: block; margin-bottom: 4px; }

.cons-carton-qty { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cons-carton-qty strong { color: var(--ink); font-weight: 650; }
.cons-budget-info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.cons-item-budget-row {
  display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(240px, 1.4fr);
  gap: 12px; align-items: start; margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.cons-item-budget-meta { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.cons-item-budget-text { min-width: 0; flex: 1; }
.cons-item-budget-sups { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 13px; color: #334155; }
.cons-item-budget-sup { line-height: 1.35; }
.cons-item-budget-fields {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end;
}
@media (max-width: 900px) {
  .cons-budget-info-row, .cons-item-budget-row, .cons-item-budget-fields { grid-template-columns: 1fr; }
}

/* Catalogue edit modal — CCS | ABCO | Other on one screen */
.cons-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  overflow: auto;
}
.cons-edit-overlay[hidden] { display: none !important; }
.cons-edit-panel {
  background: #fff;
  border-radius: 12px;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
  padding: 18px 18px 22px;
  margin: auto;
}
.cons-edit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.cons-edit-head h2 { margin: 0; font-size: 20px; }
.cons-edit-sup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 14px;
}
.cons-edit-sup-grid .cons-slot { margin: 0; }
.cons-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.cons-edit-thumb { margin-bottom: 8px; }
.cons-row-del { display: inline; margin: 0; }
.cons-desk-actions .btn-danger { vertical-align: middle; }
@media (max-width: 900px) {
  .cons-edit-sup-grid { grid-template-columns: 1fr; }
  .cons-edit-panel { max-height: none; }
}

/* Schedule of rates picker (Create WO — near Client charge) */
.works-sor-field { display: flex; flex-direction: column; justify-content: flex-end; }
.works-sor-spacer { visibility: hidden; height: 1.2em; }
.works-sor-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0a8cf0;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  cursor: pointer;
}
.works-sor-link:hover { color: #066bb8; }
.works-sor-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 12px 24px;
  overflow: auto;
}
.works-sor-overlay[hidden] { display: none !important; }
.works-sor-panel {
  background: #fff;
  border-radius: 12px;
  width: min(440px, 100%);
  max-height: calc(100vh - 72px);
  overflow: auto;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
  padding: 16px 16px 18px;
  margin: auto;
}
.works-sor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.works-sor-head h2 { margin: 0; font-size: 18px; }
.works-sor-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 4px 8px;
}
.works-sor-sub { margin: 0 0 12px; }
.works-sor-items { list-style: none; margin: 0; padding: 0; }
.works-sor-items li { margin: 0; border-top: 1px solid #eef1f4; }
.works-sor-items li:first-child { border-top: 0; }
.works-sor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 4px;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: #111;
}
.works-sor-item:hover { background: #f0f7ff; }
.works-sor-item-lab { flex: 1; font-size: 14px; min-width: 0; text-align: left; }
.works-sor-item-rate { font-weight: 700; color: #0a8cf0; white-space: nowrap; font-size: 14px; min-width: 7.5rem; text-align: right; }
.works-sor-item-callout { white-space: nowrap; font-size: 13px; color: #475569; min-width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.works-sor-headrow {
  display: flex; align-items: center; gap: 12px; padding: 6px 12px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #64748b;
}
.works-sor-headrow .works-sor-item-rate,
.works-sor-headrow .works-sor-item-callout { font-weight: 700; color: #64748b; }
.btn.is-busy, button.is-busy { opacity: 0.75; cursor: wait; }

/* In progress — orange (Issued → accept → In progress) */
.st-badge.st-progress { background: #ffedd5; color: #c2410c; }
.wo-status-progress { color: #c2410c; }


/* —— Client block polish — match Works / CONNECT chrome (CoS CLEAR) —— */
.client-block-page .page-head { margin: 0 0 16px; align-items: flex-start; }
.client-block-page .page-head h1 {
  font-size: 26px; font-weight: 600; color: #2a2f36; letter-spacing: -0.02em;
}

/* Landing desk */
.client-landing-card {
  padding: 0; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.client-landing { width: 100%; border-collapse: separate; border-spacing: 0; }
.client-landing thead th {
  background: #f7f8fa;
  box-shadow: 0 1px 0 var(--line);
  font-size: 12px; font-weight: 650; color: #6b7280;
  text-transform: none; letter-spacing: 0;
  padding: 10px 14px; white-space: nowrap;
}
.client-landing td {
  padding: 12px 14px; vertical-align: middle;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.client-landing th.client-logo-col,
.client-landing td.client-logo-col { width: 64px; padding-left: 16px; padding-right: 8px; }
.client-landing .client-fold-col { width: 48px; }
.client-logo-thumb {
  width: 40px; height: 40px; object-fit: contain; border-radius: 10px;
  background: #e7f4fe; border: 1px solid #bfdbfe; display: block;
}
.client-logo-ph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: #e7f4fe; border: 1px solid #bfdbfe;
  color: #0a8cf0; font-weight: 700; font-size: 15px;
}
.client-name-link {
  font-weight: 650; font-size: 14px;
  color: #0a8cf0; text-decoration: none;
}
.client-name-link:hover { color: #0874c9; text-decoration: underline; }
.client-landing .mono-cell {
  font-variant-numeric: tabular-nums; font-size: 13px; color: #334155; font-weight: 550;
}
.client-row { cursor: pointer; }
.client-row:hover td,
.client-row.is-open td { background: #f0f7ff; }
.client-contract-sub td {
  background: #f8fafc; border-bottom: 1px dashed #e2e8f0;
  padding-top: 10px; padding-bottom: 10px;
}
.client-contract-name-cell {
  display: flex; align-items: center; gap: 10px;
  padding-left: 32px !important;
}
.client-contract-ico { color: #0a8cf0; flex: 0 0 auto; }
.client-contract-link {
  color: #111; font-weight: 650; text-decoration: none; font-size: 13px;
}
.client-contract-link:hover { color: #111; text-decoration: underline; }
.client-contracts-cell { background: #f8fafc; padding: 12px 14px 14px 64px !important; }
.client-status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 99px;
  background: currentColor; margin-right: 6px; vertical-align: middle;
}
.client-block-page .st-badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.st-badge.st-completed .client-status-dot { background: #16a34a; }
.client-block-page .st-badge.st-completed {
  background: #dcfce7; color: #15803d;
}
.client-block-page .st-badge.st-draft {
  background: #eef1f4; color: #4b5563;
}

/* Inside client */
.client-identity {
  margin-bottom: 18px; padding: 16px 18px;
  border: 1px solid var(--line); background: var(--paper);
  box-shadow: var(--shadow);
}
.client-identity-grid {
  display: grid; grid-template-columns: 128px 1fr; gap: 20px; align-items: start;
}
@media (max-width: 720px) {
  .client-identity-grid { grid-template-columns: 1fr; }
}
.client-logo-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 120px; height: 120px; border: 2px dashed #93c5fd; border-radius: 12px;
  background: #e7f4fe; cursor: pointer; text-decoration: none; color: inherit;
}
.client-logo-box.empty:hover { border-color: #0a8cf0; background: #dbeafe; }
.client-logo-box.has-logo { border-style: solid; border-color: #bfdbfe; padding: 2px; background: #fff; overflow: hidden; --logo-zoom: 100; }
button.client-logo-box {
  cursor: pointer; font: inherit; appearance: none; -webkit-appearance: none;
  margin: 0; display: flex; align-items: center; justify-content: center;
}
button.client-logo-box.has-logo:hover { border-color: #0a8cf0; background: #eff6ff; }
.client-logo-box.has-logo img.client-logo-img,
.client-logo-box.has-logo img {
  width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: contain; object-position: center;
  transform: scale(calc(var(--logo-zoom, 100) / 100));
  transform-origin: center center;
}
.client-logo-plus { font-size: 40px; font-weight: 700; color: #0a8cf0; line-height: 1; }
.client-logo-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.client-logo-upload { position: relative; }
.client-logo-clear { margin-top: 8px; font-size: 12px; }
.client-id-row {
  display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: start;
  margin-bottom: 10px;
}
.client-id-lab {
  font-weight: 650; color: #5c6570; padding-top: 9px; font-size: 13px;
}
.client-id-row input,
.client-id-row textarea {
  width: 100%; border: 1px solid var(--line-2); background: #fff;
  padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--ink);
}
.client-id-row input:hover,
.client-id-row textarea:hover,
.client-id-row input:focus,
.client-id-row textarea:focus {
  border-color: #0a8cf0; outline: none; box-shadow: 0 0 0 3px rgba(10,140,240,.12);
}

.client-tabs.settings-tabs,
.settings-tabs.client-tabs {
  margin: 10px 0 20px;
  border-bottom: 1px solid var(--line);
}
.client-tabs a,
.settings-tabs.client-tabs a {
  padding: 12px 16px 14px;
  font-size: 14px; font-weight: 650;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.client-tabs a.on,
.settings-tabs.client-tabs a.on {
  color: #0a8cf0; border-bottom-color: #0a8cf0;
}

.client-inside .card.client-section,
.client-block-page .card.client-section {
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--paper);
}
.client-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.client-section-head h2,
.client-section > h2 {
  margin: 0 0 4px; font-size: 16px; font-weight: 650;
  color: #2a2f36; letter-spacing: -0.01em;
}
.client-section-head h2 { margin: 0; }
.client-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.client-section-head .client-section-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a8cf0;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}
.client-section-head .client-section-ico svg {
  width: 36px;
  height: 36px;
  display: block;
}
.client-section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.client-block-page .client-add-link,
.client-inside .client-add-link,
.client-add-link {
  background: none !important; border: 0 !important; box-shadow: none !important;
  color: #0a8cf0 !important; font-weight: 650; cursor: pointer;
  padding: 4px 6px; font-size: 13px;
}
.client-block-page .client-add-link:hover,
.client-inside .client-add-link:hover,
.client-add-link:hover { text-decoration: underline; color: #0874c9 !important; }
.client-section .table-wrap {
  border: 1px solid var(--line); background: #fff; margin-top: 4px;
}
.client-section .data th {
  background: #f7f8fa; font-size: 12px; font-weight: 650; color: #6b7280;
  padding: 10px 12px;
}
.client-section .data td { padding: 10px 12px; vertical-align: middle; }
.client-section .data input[type=text],
.client-section .data input[type=email],
.client-section .data input:not([type]),
.client-section .data input[type=tel] {
  width: 100%; min-width: 0; padding: 8px 10px;
  border: 1px solid var(--line-2); background: #fff; border-radius: 6px; font-size: 13px;
}
.client-section .data input:focus {
  border-color: #0a8cf0; outline: none; box-shadow: 0 0 0 3px rgba(10,140,240,.12);
}
.client-induction-ticks {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 14px 28px;
  font-size: 14px; font-weight: 550;
}
.client-tick-ok { color: #15803d; font-weight: 700; margin-right: 4px; }
.client-tick-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none; margin: 0;
  padding: 6px 10px; border-radius: 8px;
  border: 1px solid #e5e7eb; background: #fff;
}
.client-tick-toggle input {
  position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden;
}
.client-tick-toggle .client-tick-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px;
  font-size: 16px; font-weight: 700; line-height: 1;
  border: 2px solid #cbd5e1; color: #94a3b8; background: #f8fafc;
}
.client-tick-toggle.is-on .client-tick-mark,
.client-tick-toggle:has(input:checked) .client-tick-mark {
  border-color: #15803d; color: #15803d; background: #dcfce7;
}
.client-tick-toggle:has(input:checked) .client-tick-mark { content: none; }
.client-tick-toggle .client-tick-lab { font-weight: 550; color: #2a2f36; font-size: 14px; }
.client-tick-toggle:hover { border-color: #0a8cf0; }
.client-tick-toggle:has(input:checked) { border-color: #86efac; background: #f0fdf4; }
.client-induction-icons {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 16px;
}
.client-induction-icon {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  background: #ecfdf5; border: 1px solid #bbf7d0;
  font-size: 13px; font-weight: 650; color: #166534;
}
.client-overview-empty .client-add-link { margin-left: 4px; }
.client-cascade-note { font-size: 12px; font-style: italic; color: #64748b; margin: 12px 0 0; }
.client-insure-list { display: flex; flex-direction: column; gap: 0; }
.client-insure-row {
  display: grid; grid-template-columns: minmax(110px, 140px) 1fr; gap: 10px 14px;
  align-items: start; padding: 10px 4px; border-bottom: 1px solid #eee;
}
.client-insure-row:last-child { border-bottom: 0; }
.client-insure-lab { font-weight: 650; font-size: 14px; color: #2a2f36; padding-top: 8px; }
.client-insure-fields {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px;
}
.client-insure-field {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  font-size: 11px; font-weight: 650; color: #64748b; margin: 0;
}
.client-insure-field input[type=text],
.client-insure-field input[type=number],
.client-insure-field input[type=date] {
  border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 8px;
  background: #fff; font-size: 13px; font-weight: 500; color: #2a2f36; min-width: 0;
}
.client-insure-field input[type=text] { width: 140px; }
.client-insure-amount input { width: 110px; }
.client-insure-field input[type=date] { width: 138px; }
.client-insure-meta {
  font-size: 13px; color: #2a2f36; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 0;
}
.client-insure-meta .muted { font-size: 11px; font-weight: 650; text-transform: none; }
.client-insure-file {
  display: inline-flex; align-items: center; gap: 8px; padding-bottom: 2px;
}
.client-insure-file-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.client-insure-upload {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2);
  background: #f8fafc; color: #0a8cf0; cursor: pointer;
}
.client-insure-upload:hover { background: #eff6ff; border-color: #93c5fd; }
.client-insure-file-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; color: #0a8cf0; text-decoration: none;
  border: 1px solid transparent;
}
.client-insure-file-link:hover { background: #eff6ff; border-color: #93c5fd; }
.client-insure-clear { font-size: 12px; font-weight: 600; color: #64748b; gap: 4px; }
.client-insure-exp { color: #475569; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.client-insure-exp input[type=date] {
  border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 10px; background: #fff;
}
@media (max-width: 720px) {
  .client-insure-row { grid-template-columns: 1fr; }
  .client-insure-lab { padding-top: 0; }
}
.client-contract-short { display: flex; flex-direction: column; }
.client-contract-short-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid #eee;
}
.client-contract-short-row:last-child { border-bottom: 0; }
.client-contract-short-main {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.client-contract-short-meta {
  font-size: 12px; font-weight: 500; color: #6b7280;
}
.client-contract-short-name {
  font-weight: 650; font-size: 14px; color: #2a2f36; text-decoration: none;
}
a.client-contract-short-name:hover { color: #0a8cf0; text-decoration: underline; }
.client-contract-open {
  color: #0a8cf0; font-weight: 650; text-decoration: none; font-size: 13px;
}
.client-contract-open:hover { text-decoration: underline; }

/* Compliance expanders — extra air, Works blue chevron already global */
.client-comp-fold.contractor-fold {
  margin-top: 12px; padding: 0 16px 16px; border-radius: 10px;
}
.client-comp-fold > summary { padding: 16px 0 12px; font-size: 15px; }
.client-comp-add {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  margin: 14px 0 6px;
}
.client-comp-save { margin-top: 12px; }
.client-overview-save { margin: 8px 0 14px; }
.client-block-page .btn-sm,
.client-inside .btn-sm {
  padding: 6px 12px; font-size: 13px; font-weight: 650;
}
.client-block-page .btn-ghost,
.client-inside .btn-ghost {
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
}
.client-block-page .btn-ghost:hover,
.client-inside .btn-ghost:hover {
  border-color: #0a8cf0; color: #0a8cf0;
}
.client-block-page .btn-primary,
.client-inside .btn-primary {
  background: #0a8cf0; border-color: #0a8cf0; color: #fff;
  padding: 8px 14px; font-weight: 650;
}
.client-block-page .btn-primary:hover,
.client-inside .btn-primary:hover { background: #0874c9; border-color: #0874c9; }

.btn-sm { padding: 4px 10px; font-size: 13px; }

.client-induction-tick-row {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.client-induction-flag-file {
  display: inline-flex; align-items: center; gap: 8px;
}
.client-induction-docs-table .client-insure-file-link,
.client-induction-docs-table .client-insure-upload {
  vertical-align: middle;
}
.client-induction-doc-add {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #eee;
}
.client-induction-doc-add-grid {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px;
}
.client-induction-doc-add-grid .client-insure-field select,
.client-induction-doc-add-grid .client-insure-field input[type=text] {
  border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 8px;
  background: #fff; font-size: 13px; font-weight: 500; color: #2a2f36; min-width: 160px;
}
.client-induction-doc-replace { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.client-induction-icon .client-insure-file-link { width: 26px; height: 26px; }

.client-custom-req-row .client-custom-req-title {
  min-width: 140px; max-width: 220px; width: 12rem;
  padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px;
  background: #fff; font-size: 14px; font-weight: 550; color: #2a2f36;
}
.client-custom-req-row .client-tick-toggle { padding-right: 6px; }
.client-custom-req-row .client-custom-req-title:focus {
  border-color: #0a8cf0; outline: none; box-shadow: 0 0 0 3px rgba(10,140,240,.12);
}
.client-custom-req-row .compliance-x { margin-left: 2px; }


/* Master Documents desk */
.md-desk-actions { display:flex; gap:8px; align-items:flex-start; }
.md-upload-panel { margin: 0 0 14px; padding: 14px; }
.md-upload-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 12px; margin-bottom: 12px;
}
.md-upload-actions { display:flex; gap:8px; flex-wrap:wrap; }
.md-desk-toolbar { margin-bottom: 8px; }
.md-type-chips { margin: 0 0 12px; }
.md-type-chip { display:inline-flex; align-items:center; gap:6px; }
.md-dot { width:8px; height:8px; border-radius:50%; display:inline-block; flex:0 0 auto; }
.md-desk-data { min-width: 980px; }
.md-desk-data td, .md-desk-data th { padding: 8px 10px; vertical-align: middle; }
.md-name-cell { display:flex; align-items:flex-start; gap:10px; min-width: 220px; }
.md-file-ico {
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:6px; background:#eef2f7; color:#475569;
  font-size:10px; font-weight:700; letter-spacing:.02em; flex:0 0 auto;
}
.md-name-text { display:flex; flex-direction:column; gap:2px; }
.md-file-meta { font-size:12px; }
.md-type-badge {
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; font-weight:650; color:#334;
}
.md-grain {
  display:inline-block; font-size:11px; font-weight:700; padding:3px 8px; border-radius:999px;
  background:#e8f1fb; color:#1d4f91;
}
.md-grain-contract { background:#e7f7ee; color:#166534; }
.md-grain-location { background:#fde8e8; color:#b91c1c; }
.md-linked a { color:#0a8cf0; text-decoration:none; font-weight:600; }
.md-linked a:hover { text-decoration:underline; }
.md-crumb { color:#94a3b8; margin:0 2px; }
.md-expiry-none { color:#16a34a; font-weight:700; }
.md-expiry-warn { color:#ca8a04; }
.md-actions { white-space:nowrap; text-align:center; }
.md-ico {
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; color:#0a8cf0; cursor:pointer; vertical-align:middle;
}
.md-ico:hover { color:#066bb8; }
.md-replace-form { display:inline; }
.md-replace-input { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; }
.md-desk-foot {
  display:flex; justify-content:space-between; gap:12px; align-items:center;
  margin-top:12px; flex-wrap:wrap;
}
.md-foot-note { margin:0; color:#0a8cf0; font-size:13px; font-weight:500; max-width:640px; }
.md-logo-link { margin-top:6px; font-size:12px; }
.md-client-link { margin-left:8px; }


.client-custom-req-del { display: inline-flex; margin: 0; padding: 0; border: 0; background: none; }
.client-custom-req-del-btn { margin-left: 4px; }

/* Service Delivery Staff desk */
.sds-desk .page-head { align-items: flex-start; }
.sds-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; width: 100%; }
.sds-desk-data { min-width: 1100px; }
.sds-desk-data td, .sds-desk-data th { vertical-align: middle; }
.sds-name-wrap { display: flex; align-items: center; gap: 10px; }
.sds-av {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 999px;
  background: #e0f2fe; color: #0369a1; display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  overflow: hidden;
}
.sds-av-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sds-name-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.sds-email { font-size: 12px; font-weight: 400; }
.sds-chips-cell { max-width: 220px; }
.sds-contract-chip {
  display: inline-flex; align-items: center; margin: 2px 4px 2px 0;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 650;
  background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; white-space: nowrap;
}
.sds-chip-more { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.sds-st-active { background: #dcfce7; color: #15803d; text-transform: none; letter-spacing: 0; }
.sds-st-clearance { background: #fee2e2; color: #b91c1c; text-transform: none; letter-spacing: 0; }
.sds-st-induction { background: #fef3c7; color: #b45309; text-transform: none; letter-spacing: 0; }
.sds-st-inactive { background: #e5e7eb; color: #4b5563; text-transform: none; letter-spacing: 0; }
.sds-exp-ok { color: #15803d; font-weight: 600; white-space: nowrap; }
.sds-exp-soon { color: #b45309; font-weight: 600; white-space: nowrap; }
.sds-exp-expired, .sds-exp-missing { color: #b91c1c; font-weight: 650; white-space: nowrap; }
.sds-row { cursor: pointer; }
.sds-row.is-open { background: #f0f7ff; }
.sds-fold-cell { text-align: center; width: 40px; }
.sds-fold-cell .fold-expand,
.sds-fold-cell .fold-collapse {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; font-size: 16px; font-weight: 700; line-height: 1;
  color: #fff; border: 0; background: #0a8cf0; border-radius: 999px;
}
.sds-row.is-open .sds-fold-cell .fold-expand { display: none; }
.sds-row:not(.is-open) .sds-fold-cell .fold-collapse { display: none; }
.sds-row.is-open .sds-fold-cell .fold-collapse { display: inline-flex; }
.sds-row:not(.is-open) .sds-fold-cell .fold-expand { display: inline-flex; }
.sds-detail-cell { background: #f8fafc; padding: 14px 16px !important; }
.sds-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; align-items: start;
}
.sds-detail-grid-fix {
  grid-template-columns: minmax(200px, 0.9fr) minmax(220px, 1fr) minmax(260px, 1.2fr) minmax(220px, 1fr) minmax(180px, 0.85fr);
}
@media (max-width: 1400px) {
  .sds-detail-grid-fix { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
.sds-detail-col {
  background: #fff; border: 1px solid #e5e9ef; border-radius: 10px; padding: 12px 14px;
}
.sds-detail-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #0f172a; letter-spacing: .02em; text-transform: uppercase; }
.sds-title-id { color: #0369a1; }
.sds-title-clearances { color: #15803d; }
.sds-col-id { border-color: #bfdbfe; box-shadow: inset 3px 0 0 #3b82f6; }
.sds-col-clearances { border-color: #bbf7d0; box-shadow: inset 3px 0 0 #22c55e; }
.sds-col-inductions { border-color: #bfdbfe; box-shadow: inset 3px 0 0 #0a8cf0; }
.sds-title-inductions { color: #0369a1; }
/* Inductions OK tone = CONNECT blue (Clearances OK stays green) */
.sds-col-inductions .sds-clearance-card.sds-tone-ok {
  border-color: #93c5fd; background: #eff6ff;
}
.sds-col-inductions .sds-tone-ok .sds-clearance-ico {
  background: #dbeafe; color: #1d4ed8; border-color: #93c5fd;
}
.sds-col-inductions .sds-tone-ok .sds-btn-tone {
  border-color: #93c5fd; color: #1d4ed8; background: #fff;
}
.sds-col-inductions .sds-ind-new-card .sds-clearance-ico {
  background: #dbeafe; color: #0369a1; border-color: #93c5fd;
}
.sds-detail-head { display: flex; gap: 10px; align-items: flex-start; }
.sds-clearance-form .field { margin-bottom: 8px; }
.sds-ind-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 4px; }
.sds-ind-new-card { background: #f8fafc; border-style: dashed; }
.sds-ind-remove { margin-top: 6px; }
.sds-contract-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sds-foot { margin-top: 10px; font-size: 12px; }
.sds-add-form .field { margin-bottom: 4px; }
.btn-tiny {
  font-size: 11px; padding: 2px 8px; border: 1px solid #e5e9ef; background: #fff;
  border-radius: 6px; cursor: pointer; color: #64748b;
}
.btn-tiny:hover { color: #b91c1c; border-color: #fecaca; }

/* Portrait / ID / clearance cards */
.sds-portrait-block { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sds-portrait {
  width: 120px; height: 120px; border-radius: 12px; overflow: hidden;
  border: 1px solid #e2e8f0; background: #f1f5f9;
}
.sds-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sds-portrait-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #0369a1; font-weight: 700; font-size: 28px; gap: 4px;
}
.sds-portrait-hint { font-size: 11px; font-weight: 600; color: #b45309; }
.sds-profile-name { font-size: 18px; display: block; margin-top: 4px; }
.sds-profile-role { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 600; color: #334155; }
.sds-role-dot { width: 8px; height: 8px; border-radius: 999px; background: #22c55e; display: inline-block; }
.sds-upload-form .sds-upload-btn { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; }
.sds-upload-form .sds-upload-btn input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0;
}
.sds-id-card {
  display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px dashed #93c5fd;
  border-radius: 10px; background: #f8fbff; margin-bottom: 10px;
}
.sds-id-empty { min-height: 72px; justify-content: center; }
.sds-id-thumb { display: block; margin-bottom: 10px; }
.sds-id-thumb img { max-width: 100%; max-height: 120px; border-radius: 8px; border: 1px solid #e2e8f0; }
.sds-id-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.sds-hr-doc-card { margin-top: 10px; margin-bottom: 0; }
.sds-hr-doc-card .sds-clearance-actions { margin-top: 6px; }
.sds-md-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.sds-file-chip {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 650; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; text-decoration: none;
}
.sds-file-chip:hover { background: #dbeafe; }
.sds-expiry-line { margin-top: 8px; font-size: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sds-clearance-card {
  border: 1px solid #e5e9ef; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fafbfc;
}
.sds-clearance-card.sds-tone-ok { border-color: #86efac; background: #f0fdf4; }
.sds-clearance-card.sds-tone-attention { border-color: #fcd34d; background: #fffbeb; }
.sds-clearance-card.sds-tone-expired,
.sds-clearance-card.sds-tone-missing { border-color: #fca5a5; background: #fef2f2; }
.sds-clearance-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.sds-clearance-ico {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 10px; font-weight: 800;
  background: #dcfce7; color: #166534; border: 1px solid #86efac;
}
.sds-tone-attention .sds-clearance-ico { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.sds-tone-expired .sds-clearance-ico,
.sds-tone-missing .sds-clearance-ico { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.sds-clearance-sub { font-size: 11px; }
.sds-clearance-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.sds-status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; margin-left: auto; white-space: nowrap;
}
.sds-status-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.sds-status-pill.sds-tone-ok { background: #dcfce7; color: #166534; }
.sds-status-pill.sds-tone-ok .sds-status-dot { background: #22c55e; }
.sds-status-pill.sds-tone-attention { background: #fef3c7; color: #92400e; }
.sds-status-pill.sds-tone-attention .sds-status-dot { background: #f59e0b; }
.sds-status-pill.sds-tone-expired,
.sds-status-pill.sds-tone-missing { background: #ffe4e6; color: #9f1239; }
.sds-status-pill.sds-tone-expired .sds-status-dot,
.sds-status-pill.sds-tone-missing .sds-status-dot { background: #ef4444; }
.sds-btn-tone { border-color: #86efac; color: #166534; background: #fff; }
.sds-tone-attention .sds-btn-tone { border-color: #fcd34d; color: #92400e; }
.sds-tone-expired .sds-btn-tone,
.sds-tone-missing .sds-btn-tone { border-color: #fca5a5; color: #991b1b; }

/* Service Delivery Staff — Allocate access */
.sds-col-allocate { border-color: #c7d2fe; box-shadow: inset 3px 0 0 #6366f1; }
.sds-title-allocate { color: #4338ca; }
.sds-alloc-tabs {
  display: flex; flex-wrap: nowrap; gap: 4px; margin: 0 0 10px;
  border-bottom: 1px solid #e2e8f0; padding-bottom: 6px; overflow-x: auto;
}
.sds-col-allocate .sds-detail-title { margin-bottom: 8px; }
.sds-alloc-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 8px 8px 0 0; font-size: 12px; font-weight: 650;
  color: #64748b; text-decoration: none; background: transparent; border: 0; cursor: pointer;
}
.sds-alloc-tab.is-active {
  color: #1d4ed8; box-shadow: inset 0 -2px 0 #3b82f6; background: #eff6ff;
}
.sds-alloc-tab:not(.is-active):hover { color: #0f172a; background: #f8fafc; }
.sds-alloc-lede { margin: 0 0 10px; font-size: 12px; }
.sds-alloc-section { margin-bottom: 12px; }
.sds-alloc-label {
  font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase;
  color: #475569; margin-bottom: 6px;
}
.sds-alloc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 28px; }
.sds-alloc-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 6px;
  border-radius: 999px; border: 1px solid #86efac; background: #f0fdf4; color: #166534;
  font-size: 12px; font-weight: 650;
}
.sds-alloc-chip-check {
  display: inline-flex; width: 16px; height: 16px; border-radius: 999px; align-items: center;
  justify-content: center; background: #22c55e; color: #fff; font-size: 10px; font-weight: 800;
}
.sds-alloc-chip-x {
  border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 14px;
  line-height: 1; padding: 0 2px; border-radius: 4px;
}
.sds-alloc-chip-x:hover { color: #b91c1c; background: #fee2e2; }
.sds-alloc-add-row select { max-width: 100%; font-size: 12px; }
.sds-alloc-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px;
}
.sds-alloc-seg-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 10px 8px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff;
  font-size: 12px; font-weight: 650; color: #334155; cursor: pointer;
}
.sds-alloc-seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
.sds-alloc-seg-btn.is-on {
  border-color: #3b82f6; background: #eff6ff; color: #1d4ed8;
  box-shadow: 0 0 0 1px #93c5fd;
}
.sds-alloc-carve {
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; background: #f8fafc;
}
.sds-alloc-contract-block { margin-bottom: 8px; border: 1px solid #e5e9ef; border-radius: 8px; padding: 8px 10px; background: #fff; }
.sds-alloc-contract-block summary {
  cursor: pointer; font-size: 12px; font-weight: 700; color: #0f172a; list-style: none;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.sds-alloc-contract-block summary::-webkit-details-marker { display: none; }
.sds-alloc-contract-block summary .fold-expand,
.sds-alloc-contract-block summary .fold-collapse {
  margin-left: auto;
  width: 20px; height: 20px; font-size: 14px;
}
.sds-alloc-contract-block:not([open]) > summary .fold-collapse { display: none; }
.sds-alloc-contract-block[open] > summary .fold-expand { display: none; }
.sds-alloc-contract-block[open] > summary .fold-collapse { display: inline-flex; }
.sds-alloc-contract-block:not([open]) > summary .fold-expand { display: inline-flex; }
.sds-alloc-excl-label {
  font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase;
  color: #b91c1c; margin: 8px 0 4px;
}
.sds-alloc-excl-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.sds-alloc-excl-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px;
  border: 1px solid #e5e9ef; background: #fff; font-size: 12px; cursor: pointer;
}
.sds-alloc-excl-item:has(input:checked) {
  border-color: #fca5a5; background: #fef2f2; color: #991b1b;
}
.sds-alloc-excl-x {
  width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 800; background: #fee2e2; color: #b91c1c;
  flex: 0 0 auto;
}
.sds-alloc-excl-item input { margin: 0; }
.sds-alloc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sds-alloc-note { margin-top: 8px; }
@media (max-width: 720px) {
  .sds-alloc-seg { grid-template-columns: 1fr; }
}


/* ── Periodicals master desk (light chrome) ── */
.per-desk .page-head { align-items: flex-start; }
.per-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}
@media (max-width: 1100px) {
  .per-layout { grid-template-columns: 1fr; }
}
.per-cal-card { margin-bottom: 14px; }
.per-cal-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.per-cal-head h2 { margin: 0; font-size: 18px; flex: 1; text-align: center; }
.per-cal-nav { min-width: 36px; padding-left: 10px; padding-right: 10px; }
.per-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.per-cal-dow {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #64748b; text-align: center; padding: 4px 0;
}
.per-cal-cell {
  min-height: 72px;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.per-cal-cell.empty { background: #f8fafc; border-color: transparent; }
.per-cal-cell.today { border-color: #0a8cf0; box-shadow: 0 0 0 1px rgba(10,140,240,.25); }
.per-cal-daynum { font-size: 12px; font-weight: 700; color: #334155; }
.per-day-marks { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin-top: auto; }
.per-dot {
  width: 10px; height: 10px; border-radius: 999px; display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  flex: 0 0 auto;
  cursor: default;
}
/* Halves/quarters removed — CoS CLEAR 2026-09-12 (solid L→R dots only). */
.per-adhoc {
  width: 0; height: 0; display: inline-block;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid #ea580c;
  background: transparent; transform: none; border-radius: 0;
  box-sizing: border-box; flex: 0 0 auto;
  cursor: default;
}
.per-cal-cell { min-height: 88px; }
.per-legend {
  display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 12px; align-items: center;
  font-size: 12px; color: #475569;
}
.per-leg-item { display: inline-flex; align-items: center; gap: 6px; }
.per-foot { margin: 10px 0 0; font-size: 12px; }
.per-rail { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow: auto; }
.per-upcoming { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.per-upcoming li {
  border: 1px solid #e5e9ef; border-radius: 10px; padding: 10px; background: #f8fafc;
}
.per-up-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.per-up-meta { font-size: 12px; color: #64748b; margin-top: 4px; }
.per-hb-pill {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px;
  background: #ffedd5; color: #c2410c; font-size: 11px; font-weight: 700;
}
.per-summary-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap;
  margin-bottom: 10px;
}
.per-comm-pill {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: #e0f2fe; color: #0369a1; white-space: nowrap;
}
.per-comm-inclusive { background: #e0f2fe; color: #0369a1; }
.per-comm-chargeable { background: #ffedd5; color: #c2410c; }
.per-comm-ad-hoc, .per-comm-adhoc { background: #f3e8ff; color: #7c3aed; }
.per-comm-fixed-quote { background: #dcfce7; color: #15803d; }
.per-edit-form {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px;
  padding: 10px; background: #f8fafc; border: 1px solid #e5e9ef; border-radius: 8px; margin-top: 6px;
}
.per-edit-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: #64748b; }
.per-edit-form input, .per-edit-form select {
  font: inherit; font-size: 13px; font-weight: 500; color: #0f172a;
  border: 1px solid #d0d7e2; border-radius: 8px; padding: 6px 8px; background: #fff;
}
.per-sched-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #eef2f7;
}
.per-sched-name { min-width: 120px; font-size: 13px; }
.per-sched-row label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 600; color: #64748b; }
.per-sched-row input, .per-sched-row select {
  font: inherit; font-size: 13px; border: 1px solid #d0d7e2; border-radius: 8px; padding: 5px 8px; background: #fff;
}
.per-site-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.per-site-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.per-toolbar { margin-bottom: 12px; }


/* —— Contract face (CoS CLEAR 11 Sep 2026) —— */
.contract-face-page .cf-head {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  align-items: flex-start; margin-bottom: 14px;
}
.contract-face-page .cf-head-brand {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.contract-face-page .cf-head-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.contract-face-page .cf-title-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.contract-face-page .cf-head-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  box-sizing: border-box;
}
.contract-face-page .cf-title-row h1 {
  margin: 0;
  letter-spacing: 0.02em;
  font-size: 26px;
  line-height: 1.15;
}
.contract-face-page .cf-ref { margin: 4px 0 0; max-width: 100%; }
.contract-face-page .cf-ref-view {
  display: inline-block; margin: 0; padding: 0; border: 0; background: transparent;
  color: #64748b; font: inherit; font-size: calc(26px - 4pt); font-weight: 600;
  letter-spacing: 0.02em; line-height: 1.2; cursor: text; text-align: left; border-radius: 4px;
}
.contract-face-page .cf-ref-view:hover { color: #0f172a; background: #f1f5f9; }
.contract-face-page .cf-ref-view:focus { outline: 2px solid #0a8cf0; outline-offset: 2px; }
.contract-face-page .cf-ref-input {
  display: block; width: min(420px, 100%); margin: 0; padding: 2px 6px;
  border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #0f172a;
  font: inherit; font-size: calc(26px - 4pt); font-weight: 600; letter-spacing: 0.02em; line-height: 1.2;
  min-height: calc(26px - 4pt + 8px);
}
.contract-face-page .cf-ref.is-editing .cf-ref-view { display: none; }
.contract-face-page .cf-ref:not(.is-editing) .cf-ref-input { display: none !important; }

.cf-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.cf-badge-active { background: #dcfce7; color: #15803d; }
.cf-badge-other { background: #e2e8f0; color: #475569; }
.cf-head-meta { min-width: 260px; padding: 12px 14px; }
.cf-meta-row { display: flex; justify-content: space-between; gap: 12px; margin: 4px 0; font-size: 13px; }
.cf-head-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.cf-commercial { padding: 14px 16px; margin-bottom: 12px; }
.cf-comm-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
  align-items: start;
}
.cf-col-h {
  margin: 0 0 10px; font-size: 15px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #0a8cf0;
}
.cf-comm-value .cf-col-h,
.cf-comm-inv .cf-col-h { font-weight: 700; }
.cf-comm-value,
.cf-comm-inv {
  display: flex; flex-direction: column;
}
.cf-comm-top {
  min-height: 0;
  display: flex; flex-direction: column;
}
.cf-comm-align { margin-top: 0; }
.cf-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: #64748b; }
.cf-field-label { display: block; font-weight: 700; color: #334155; font-size: 13px; }
.cf-field-control {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.cf-field-ico {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: inline-grid; place-items: center;
  background: transparent; color: #0a8cf0;
  border: 0; border-radius: 0; box-shadow: none;
}
.cf-field-ico svg { width: 22px; height: 22px; display: block; }
.cf-field-ico-status {
  background: transparent; color: #16a34a;
  border: 0; box-shadow: none;
}
.cf-field input, .cf-field select {
  flex: 1; min-width: 0;
  font: inherit; font-size: 13px; font-weight: 500; color: #0f172a;
  border: 1px solid #d0d7e2; border-radius: 8px; padding: 7px 9px; background: #fff;
}
.cf-value-main input { font-size: 20px; font-weight: 700; color: #0f172a; }
.cf-lock-note { font-size: 12px; margin: 0 0 8px; }
.cf-value-details { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.cf-comm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.cf-ops-bar {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  padding: 12px 14px; margin-bottom: 12px; background: #f1f5f9; border: 1px solid #e2e8f0;
}
.cf-ops-stats { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; }
.cf-nav-list { padding: 12px 0; margin-bottom: 14px; }
.cf-nav-h { margin: 0 14px 8px; font-size: 15px; }
.cf-nav { list-style: none; margin: 0; padding: 0; }
.cf-nav li a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  text-decoration: none; color: inherit; border-top: 1px solid #eef2f7;
}
.cf-nav li a:hover { background: #f8fafc; }
.cf-nav-ico {
  width: 56px; min-width: 56px; height: 56px; text-align: center; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  color: #0a8cf0;
}
.cf-nav-ico svg { width: 28px; height: 28px; display: block; }
.cf-nav-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cf-nav-text strong { font-size: 14px; }
.cf-nav-text .muted { font-size: 12px; }
.cf-nav-chev { color: #94a3b8; font-size: 20px; font-weight: 300; }
.cf-quiet-chip, .cf-site-chip,
.chip-info, .chip-count, .chip-ok, .chip-warn, .chip-danger, .chip-inclusive, .chip-chargeable {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.cf-quiet-chip, .chip-info { background: #e0f2fe; color: #0369a1; }
.cf-site-chip, .chip-count { background: #e2e8f0; color: #334155; }
.chip-ok { background: #dcfce7; color: #166534; }
.chip-warn { background: #fef3c7; color: #92400e; }
.chip-danger { background: #ffe4e6; color: #9f1239; }
.chip-inclusive { background: #e0f2fe; color: #0369a1; }
.chip-chargeable { background: #ffedd5; color: #c2410c; }
.cf-fold { margin-bottom: 12px; scroll-margin-top: 72px; }
.cf-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.cf-row-actions.cf-table-footer { justify-content: space-between; }
.cf-row-actions .btn-primary { margin-left: auto; }
.cf-table-footer .btn-primary { margin-left: auto; }
.cf-upload-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.cf-upload-row .cf-field { margin: 0; min-width: 180px; flex: 1; }
.cf-tabs { display: flex; gap: 6px; margin: 8px 0 12px; }
.cf-tab {
  border: 1px solid #d0d7e2; background: #fff; border-radius: 999px; padding: 6px 12px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: #475569;
}
.cf-tab.on { background: #0a8cf0; border-color: #0a8cf0; color: #fff; }
.cf-fixed-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cf-fixed-total { text-align: right; }
.cf-fixed-total strong { display: block; font-size: 20px; color: #15803d; }
.cf-loc-fixed { background: #f8fafc; border-style: dashed; }
.cf-readonly td { background: #f1f5f9; color: #475569; }
.cf-ico { text-align: center; color: #0a8cf0; vertical-align: middle; }
.cf-ico svg { width: 22px; height: 22px; display: inline-block; vertical-align: middle; stroke-width: 1.5; }

/* —— CONNECT Field Uniformity pass (11 Sep 2026) —— */
.chip-info, .cf-quiet-chip { /* Quiet V / info */ }
.sds-contract-chip { /* count-adjacent site chips stay green for assigned contracts */ }
.sds-st-active { /* OK */ }
.sds-st-clearance { background: #ffe4e6; color: #9f1239; } /* danger/expired pink-red */
.sds-st-induction { /* warning amber already */ }
.cf-file-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cf-file-actions a, .cf-file-actions .cf-file-open {
  color: #0a8cf0; font-weight: 650; font-size: 13px; text-decoration: none;
}
.cf-file-actions a:hover { text-decoration: underline; }
.btn-attach-pdf {
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-attach-pdf .pdf-ico {
  width: 14px; height: 14px; display: inline-block; vertical-align: middle;
}
table.data thead th {
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.cf-loc-fixed, .cf-readonly {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}


/* —— Contract face feedback batch #1–12 (11 Sep 2026) —— */
.contract-face-page .cf-head-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  padding: 10px 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.contract-face-page .cf-comm-term .cf-col-h {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.1em;
}
.contract-face-page .cf-comm-term .cf-field-label { font-size: 13px; }
.contract-face-page .cf-comm-term .cf-field-control input { font-size: 13px; min-height: 38px; }
.contract-face-page .cf-comm-term .cf-field-ico svg {
  width: 24px; height: 24px;
  stroke-width: 2;
}
.contract-face-page .cf-comm-top { min-height: 0; }
.contract-face-page .cf-comm-top-spacer { min-height: 0; }
.contract-face-page .cf-field-label { font-weight: 700; font-size: 13px; line-height: 1.25; }
.contract-face-page .cf-comm-term .cf-field-label { font-size: 13px; }
.contract-face-page .cf-value-details {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: start;
}
.contract-face-page .cf-inv-align {
  display: flex; flex-direction: column; gap: 0;
}
.contract-face-page .cf-comm-value,
.contract-face-page .cf-comm-inv {
  display: flex; flex-direction: column;
}
.contract-face-page .cf-comm-align .cf-field { margin-bottom: 10px; }
.cf-ops-block { padding: 14px 16px; margin-bottom: 12px; }
.cf-ops-head {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.cf-ops-note { margin: 4px 0 0; font-size: 12px; }
.cf-ops-range {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
}
.cf-ops-date { margin: 0; min-width: 140px; }
.cf-ops-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px;
}
.cf-ops-tile {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.cf-ops-tile strong { font-size: 22px; color: #0f172a; line-height: 1.1; }
.cf-ops-jump { justify-content: center; align-items: flex-start; }
.cf-reps-block { margin-bottom: 12px; }
.cf-reps-block .client-section-head { margin-bottom: 8px; }
.cf-autosave-status { min-height: 20px; margin-top: 8px; }
.cf-autosave-msg.is-ok { color: #15803d; }
.cf-autosave-msg.is-err { color: #b91c1c; }
.cf-fold-minus {
  width: 28px; height: 28px; border-radius: 999px; border: none;
  background: #0a8cf0; color: #fff; font-size: 18px; line-height: 1;
  display: inline-grid; place-items: center; cursor: pointer;
}
.cf-fold-minus:hover { background: #066bb8; }
.cf-loc-unassign { width: 48px; text-align: right; }
.cf-comp-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #eef2f7;
}
.cf-comp-main { flex: 1; min-width: 0; }
.cf-spec-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cf-ext-pdf { background: #fee2e2; color: #b91c1c; }
.cf-ext-doc { background: #dbeafe; color: #1d4ed8; }
.cf-ext-xls { background: #dcfce7; color: #166534; }
.cf-ext-dwg { background: #ffedd5; color: #c2410c; }
.cf-ext-zip { background: #e2e8f0; color: #334155; }
.cf-cons-usage-table th { white-space: normal; max-width: 110px; font-size: 12px; }
.cf-cons-total td { background: #f8fafc; border-top: 2px solid #cbd5e1; }
.contract-face-page .cf-fold { scroll-margin-top: 96px; }

.cf-reps-overview { margin-bottom: 12px; }
.cf-reps-overview .client-section-head { margin-bottom: 8px; }
.cf-reps-block .client-section-head { margin-bottom: 8px; justify-content: space-between; align-items: center; }

/* Contract Representatives — copy from client (next to + Add) */
.cf-reps-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.cf-reps-copy-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.cf-reps-copy-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0a8cf0;
  cursor: pointer;
  line-height: 0;
}
.cf-reps-copy-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.cf-reps-copy-btn:hover {
  background: rgba(10, 140, 240, 0.10);
  color: #0874c9;
}
.cf-reps-copy-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 140, 240, 0.22);
}
.contract-face-page .cf-reps-block > summary .cf-reps-head-actions {
  margin-right: 4px;
}

/* —— Contract face ops full-width lock —— */
.contract-face-page .cf-commercial {
  display: block;
  width: 100%;
}
.contract-face-page .cf-comm-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.35fr) minmax(200px, 1fr);
  gap: 16px 20px;
  align-items: start;
}
.contract-face-page .cf-reps-overview,
.contract-face-page .cf-ops-block {
  display: block;
  width: 100%;
  max-width: 100%;
  clear: both;
  box-sizing: border-box;
}
.contract-face-page .cf-ops-block {
  margin-top: 0;
  border-top: 3px solid #0a8cf0;
}
.contract-face-page .cf-ops-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .contract-face-page .cf-comm-grid { grid-template-columns: 1fr; }
  .contract-face-page .cf-ops-tiles { grid-template-columns: 1fr; }
}

/* —— Contract face type theme match (12 Sep) —— */
.contract-face-page .cf-reps-overview .client-section-head h2 {
  font-size: 15px; font-weight: 650; letter-spacing: -0.01em; color: #2a2f36;
}
.contract-face-page .cf-reps-overview .client-section-ico {
  width: 28px; height: 28px;
}
.contract-face-page .cf-reps-overview .client-section-ico svg {
  width: 24px; height: 24px;
}
.contract-face-page .cf-ops-head strong {
  font-size: 15px; font-weight: 650; color: #2a2f36; letter-spacing: -0.01em;
}
.contract-face-page .cf-nav-h {
  font-size: 15px; font-weight: 650; color: #2a2f36;
}
.contract-face-page .cf-nav-text strong { font-size: 14px; font-weight: 650; }

/* —— Ops placement: full width under commercial (Damien markup) —— */
.contract-face-page .cf-face-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;
}
.contract-face-page .cf-face-stack > .cf-commercial,
.contract-face-page .cf-face-stack > .cf-commercial-fold,
.contract-face-page .cf-face-stack > .cf-reps-overview,
.contract-face-page .cf-face-stack > .cf-ops-block {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  box-sizing: border-box;
}
.contract-face-page .cf-ops-full {
  display: block;
  clear: both;
  border-top: 3px solid #0a8cf0;
}
.contract-face-page .cf-ops-full .cf-ops-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

/* —— Value / Invoicing row align (Damien red lines) —— */
.contract-face-page .cf-comm-grid-align {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr) minmax(260px, 1fr);
  grid-template-rows: auto auto auto;
  gap: 12px 28px;
  align-items: stretch;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.contract-face-page .cf-comm-grid-align > * {
  min-width: 0;
}
.contract-face-page .cf-comm-grid-align .cf-field-control,
.contract-face-page .cf-comm-grid-align .cf-field input,
.contract-face-page .cf-comm-grid-align .cf-field select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.contract-face-page .cf-comm-grid-align > .cf-comm-term {
  grid-column: 1;
  grid-row: 1 / span 3;
}
.contract-face-page .cf-comm-grid-align > .cf-h-value {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 4px;
}
.contract-face-page .cf-comm-grid-align > .cf-h-inv {
  grid-column: 3;
  grid-row: 1;
  margin: 0 0 4px;
}
.contract-face-page .cf-comm-grid-align > .cf-comm-top {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
}
.contract-face-page .cf-comm-grid-align > .cf-inv-top {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
}
.contract-face-page .cf-comm-grid-align > .cf-inv-top .cf-field {
  margin-bottom: 0;
}
.contract-face-page .cf-comm-grid-align > .cf-value-details {
  grid-column: 2;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-content: start;
}
.contract-face-page .cf-comm-grid-align > .cf-inv-align {
  grid-column: 3;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
}
.contract-face-page .cf-comm-grid-align .cf-field {
  margin-bottom: 0;
}
.contract-face-page .cf-comm-grid-align .cf-value-details .cf-field,
.contract-face-page .cf-comm-grid-align .cf-inv-align .cf-field {
  min-height: 0;
}
@media (max-width: 900px) {
  .contract-face-page .cf-comm-grid-align {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .contract-face-page .cf-comm-grid-align > .cf-comm-term,
  .contract-face-page .cf-comm-grid-align > .cf-h-value,
  .contract-face-page .cf-comm-grid-align > .cf-h-inv,
  .contract-face-page .cf-comm-grid-align > .cf-comm-top,
  .contract-face-page .cf-comm-grid-align > .cf-inv-top,
  .contract-face-page .cf-comm-grid-align > .cf-value-details,
  .contract-face-page .cf-comm-grid-align > .cf-inv-align {
    grid-column: 1;
    grid-row: auto;
  }
}

/* —— Ops mini under TERM (Marketing visual lock) —— */
.contract-face-page .cf-term-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.contract-face-page .cf-term-dates .cf-field { margin-bottom: 0; }
.contract-face-page .cf-ops-mini {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contract-face-page .cf-ops-mini-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.contract-face-page .cf-ops-mini .cf-ops-tile {
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.contract-face-page .cf-ops-kicker {
  font-size: 11px;
  font-weight: 650;
  color: #64748b;
  text-transform: none;
}
.contract-face-page .cf-ops-mini .cf-ops-count {
  font-size: 18px;
  font-weight: 700;
  color: #334155;
  line-height: 1.1;
  margin-top: 2px;
}
.contract-face-page .cf-ops-sub { font-size: 11px; }
.contract-face-page .cf-ops-mini .cf-ops-dollars {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
  color: #475569;
  line-height: 1.15;
}
.contract-face-page .cf-ops-strip {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 1px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  box-sizing: border-box;
}
.contract-face-page .cf-ops-strip .cf-ops-dollars {
  font-size: 16px;
  font-weight: 700;
  color: #475569;
}
.contract-face-page .cf-ops-strip .muted,
.contract-face-page .cf-ops-sub {
  font-size: 11px;
  line-height: 1.3;
  color: #94a3b8;
}
.contract-face-page .cf-ops-range-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-end;
}
.contract-face-page .cf-ops-range-label {
  flex: 1 0 100%;
  font-size: 11px;
  font-weight: 650;
  color: #64748b;
  letter-spacing: 0.01em;
}
.contract-face-page .cf-ops-range-mini .cf-ops-date {
  margin: 0;
  min-width: 0;
  flex: 1 1 90px;
}
.contract-face-page .cf-ops-range-mini .cf-field-label { font-size: 11px; }
.contract-face-page .cf-ops-range-mini input {
  font-size: 12px;
  min-height: 30px;
  padding: 3px 6px;
}
/* Field grid: one label size, even gaps */
.contract-face-page .cf-comm-grid-align .cf-field-label {
  font-size: 12px;
  font-weight: 650;
  color: #475569;
}
.contract-face-page .cf-comm-grid-align .cf-field input {
  font-size: 13px;
  min-height: 36px;
}
.contract-face-page .cf-comm-grid-align > .cf-value-details,
.contract-face-page .cf-comm-grid-align > .cf-inv-align {
  gap: 10px 14px;
}
.contract-face-page .cf-lock-note {
  font-size: 11px;
  color: #94a3b8;
}

/* Contract Face reps: Role + Email get more width (Damien — stop truncate) */
.contract-face-page .cf-reps-table {
  table-layout: fixed;
  width: 100%;
}
.contract-face-page .cf-reps-table .cf-reps-col-name { width: 15%; }
.contract-face-page .cf-reps-table .cf-reps-col-role { width: 22%; }
.contract-face-page .cf-reps-table .cf-reps-col-email { width: 36%; }
.contract-face-page .cf-reps-table .cf-reps-col-phone { width: 13.5%; }
.contract-face-page .cf-reps-table .cf-reps-col-mobile { width: 13.5%; }
.contract-face-page .cf-reps-table th:nth-child(2),
.contract-face-page .cf-reps-table td:nth-child(2),
.contract-face-page .cf-reps-table th:nth-child(3),
.contract-face-page .cf-reps-table td:nth-child(3) {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contract-face-page .cf-reps-table td,
.contract-face-page .cf-reps-table th {
  white-space: normal;
}
.contract-face-page .cf-reps-table input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* From/To/Apply live inside Combined totals grey strip */
.contract-face-page .cf-ops-range-in-strip {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  width: 100%;
}
.contract-face-page .cf-ops-strip .cf-ops-range-in-strip .cf-field-label {
  color: #64748b;
}

/* Financial adjustments — list-first desk chrome */
.contract-face-page .cf-fin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}
.contract-face-page .cf-fin-empty {
  padding: 16px 14px;
  border: 1px dashed #d0d7e2;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 10px;
}
.contract-face-page .cf-fin-table { width: 100%; }
.contract-face-page .cf-fin-add-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
}
.contract-face-page .cf-fin-add-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}
.contract-face-page .cf-fin-add-grid .cf-field { margin: 0; }
.contract-face-page .cf-fin-span-2 { grid-column: span 2; }
@media (max-width: 800px) {
  .contract-face-page .cf-fin-add-grid { grid-template-columns: 1fr; }
  .contract-face-page .cf-fin-span-2 { grid-column: auto; }
}
.contract-face-page .cf-fin-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.contract-face-page .cf-fin-note {
  margin-top: 12px;
  font-size: 12px;
}

/* Contract Face — CONNECT-consistent container density (match Client/Works cards) */
.contract-face-page .card,
.contract-face-page .contractor-fold.card,
.contract-face-page .cf-commercial {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--paper);
  border-radius: 12px;
}
.contract-face-page .contractor-fold {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.contract-face-page .contractor-fold > summary {
  font-size: 16px;
  font-weight: 650;
  color: #2a2f36;
  padding: 16px 0 12px;
}
.contract-face-page .contractor-fold > summary .fold-expand,
.contract-face-page .contractor-fold > summary .fold-collapse {
  width: 28px;
  height: 28px;
  font-size: 18px;
  background: #0a8cf0;
}
.contract-face-page .fold-nested {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 0 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
.contract-face-page .fold-nested > summary {
  font-size: 15px;
  font-weight: 650;
  color: #2a2f36;
  padding: 14px 0 10px;
}
.contract-face-page .fold-nested > summary .fold-expand,
.contract-face-page .fold-nested > summary .fold-collapse {
  width: 24px;
  height: 24px;
  font-size: 16px;
  background: #0a8cf0;
}

/* Fold headers carry section icons (nav list removed) */
.contract-face-page .cf-fold > summary .fold-title,
.contract-face-page .fold-nested > summary .fold-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.contract-face-page .cf-fold-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a8cf0;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}
.contract-face-page .cf-fold-ico svg {
  width: 24px;
  height: 24px;
  display: block;
}
.contract-face-page .fold-nested > summary .cf-fold-ico {
  width: 24px;
  height: 24px;
}
.contract-face-page .fold-nested > summary .cf-fold-ico svg {
  width: 20px;
  height: 20px;
}

/* WHS Safety multi-tick — full-width CONNECT list, not a shrunk grey box */
.contract-face-page .cf-comp-pick,
.cf-comp-pick {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: none;
}
.contract-face-page .cf-comp-filter,
.cf-comp-filter {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  border: 1px solid var(--line-2, #d1d5db);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  min-height: 40px;
  background: #fff;
}
.contract-face-page .cf-comp-ticks,
.cf-comp-ticks {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: #fff;
}
.contract-face-page .cf-comp-tick,
.cf-comp-tick {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 0;
  border-bottom: 1px solid #eef1f4;
  cursor: pointer;
  font-size: 14px;
}
.contract-face-page .cf-comp-tick:last-child,
.cf-comp-tick:last-child { border-bottom: 0; }
.contract-face-page .cf-comp-tick:hover,
.cf-comp-tick:hover { background: #eef6ff; }
.contract-face-page .cf-comp-tick input[type="checkbox"],
.cf-comp-tick input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: #0a8cf0;
  flex: 0 0 auto;
}
.contract-face-page .cf-comp-tick-main,
.cf-comp-tick-main { flex: 1; min-width: 0; line-height: 1.4; }
.contract-face-page .cf-comp-tick[hidden],
.cf-comp-tick[hidden] { display: none !important; }

.contract-face-page .cf-comp-apply-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.contract-face-page .cf-comp-package { margin-top: 10px; margin-bottom: 4px; }
.contract-face-page .cf-comp-package .select-filter-wrap,
.contract-face-page .cf-comp-package select { width: 100%; max-width: none; }


/* WHS Safety — full width + quieter nests (Marketing P0) */
.contract-face-page.page,
.contract-face-page {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.contract-face-page > .cf-fold,
.contract-face-page > .cf-compliance-wrap,
.contract-face-page > .card,
.contract-face-page > .cf-head {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  align-self: stretch;
  float: none;
  clear: both;
}
.contract-face-page > .cf-face-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  align-self: stretch;
  float: none;
  clear: both;
  margin-bottom: 0 !important;
}
.contract-face-page .cf-compliance-wrap,
.contract-face-page #cf-compliance,
.contract-face-page #compliance-apply,
.contract-face-page #compliance-apply.cf-whs-card,
.contract-face-page .cf-whs-card {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
}
.contract-face-page #cf-locations,
.contract-face-page .cf-fold.card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.contract-face-page .table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}
.contract-face-page .cf-whs-lede.lede,
.contract-face-page .cf-whs-lede {
  max-width: none !important;
  width: 100%;
}
.contract-face-page .cf-whs-nest,
.contract-face-page .cf-whs-nest-form,
.contract-face-page .cf-comp-pick,
.contract-face-page .cf-comp-ticks,
.contract-face-page .cf-comp-package,
.contract-face-page .cf-comp-package-row,
.contract-face-page .cf-comp-package-select,
.contract-face-page .cf-comp-filter {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

/* WHS width — ID selectors beat ancestor misses */
#cf-compliance.cf-compliance-wrap,
#compliance-apply.cf-whs-card,
#compliance-apply {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  clear: both !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#cf-locations.cf-fold {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Contract Face vertical rhythm — same gap as Term → Representatives */
.contract-face-page .cf-face-stack {
  margin-bottom: 0 !important;
}
.contract-face-page .cf-face-stack > .cf-commercial,
.contract-face-page .cf-face-stack > .cf-commercial-fold,
.contract-face-page .cf-face-stack > .cf-reps-overview {
  margin-bottom: 0 !important;
}
.contract-face-page .cf-face-stack > .cf-reps-overview {
  margin-top: 0 !important; /* gap:12px on stack handles Contract Term → Reps */
}
.contract-face-page .contractor-fold.card.cf-fold,
.contract-face-page .cf-fold {
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}
.contract-face-page .cf-reps-overview {
  margin-bottom: 0 !important;
}
.contract-face-page .cf-reps-block {
  margin-bottom: 0 !important;
}
.contract-face-page .cf-compliance-wrap {
  margin-top: 12px !important;
}

/* Sidebar edit mode (spanner) */
.side-settings {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  color: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  text-decoration: none; border-radius: 2px; cursor: pointer; padding: 0;
}
.side-settings .nav-ico { width: 16px; height: 16px; opacity: 1; color: #fff; }
.side-settings .nav-ico svg { width: 14px; height: 14px; stroke: #fff; }
.side-settings:hover, .side-settings.on, .side-settings[aria-pressed="true"] {
  color: #fff; border-color: #8ecfff; background: rgba(10,140,240,.18);
}
.side-edit-banner {
  display: none;
  margin: 0 10px 8px;
  padding: 8px 10px;
  font-size: 12px; font-weight: 650; color: #fff;
  background: rgba(10,140,240,.28);
  border: 1px solid rgba(142,207,255,.45);
  border-radius: 2px;
}
.sidebar.side-editing .side-edit-banner { display: block; }
.sidebar.side-editing .nav-item {
  cursor: grab;
  border: 1px dashed rgba(255,255,255,.18);
  margin-bottom: 2px;
}
.sidebar.side-editing .nav-item.nav-dragging {
  opacity: .45; cursor: grabbing;
}
.sidebar.side-editing .nav-item.nav-drag-over {
  border-color: #8ecfff; background: rgba(10,140,240,.18);
}
.sidebar.side-editing .nav-item.nav-hidden-edit {
  opacity: .4;
}
.nav-edit-tools {
  display: none; margin-left: auto; gap: 4px; align-items: center;
}
.sidebar.side-editing .nav-edit-tools { display: inline-flex; }
.nav-edit-tools button {
  background: transparent; border: 1px solid rgba(255,255,255,.22);
  color: #fff; width: 22px; height: 22px; padding: 0; cursor: pointer;
  font-size: 11px; line-height: 1; border-radius: 2px;
}
.nav-edit-tools button:hover { border-color: #8ecfff; }
.nav-item[data-nav-hidden="1"] { display: none; }
.sidebar.side-editing .nav-item[data-nav-hidden="1"] { display: flex; }

/* Clients — Create client panel (CoS CLEAR 2026-09-12) */
.client-block-page .page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.client-create-scrim {
  position: fixed; inset: 0; background: rgba(20,28,38,.35); z-index: 40;
}
.client-create-scrim[hidden] { display: none !important; }
.client-create-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: #fff; z-index: 41;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 28px rgba(20,28,38,.18);
  font-family: var(--font); color: #111;
}
.client-create-panel[hidden] { display: none !important; }
.client-create-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #e5e7eb; flex-shrink: 0;
}
.client-create-head h2 { margin: 0; font-size: 18px; font-weight: 650; }
.client-create-close {
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: #6b7280; width: 32px; height: 32px;
}
.client-create-close:hover { color: #111; }
.client-create-form {
  padding: 16px 18px 24px; overflow: auto; flex: 1;
  display: flex; flex-direction: column; gap: 12px;
}
.client-create-form .field { margin: 0; }
.client-create-form label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.client-create-form .req { color: #dc2626; }
.client-create-form input,
.client-create-form textarea,
.client-create-form select {
  width: 100%; box-sizing: border-box;
  border: 1px solid #d1d5db; border-radius: 2px;
  padding: 8px 10px; font: inherit; color: #111; background: #fff;
}
.client-create-form textarea { resize: vertical; min-height: 72px; }
.client-create-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 8px;
}


/* Contract Face — selectable status badge + delete (top-right) */
.contract-face-page .cf-head.cf-head-sticky,
.contract-face-page > .cf-head.cf-head-sticky {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px;
  width: 100% !important;
}
.contract-face-page .cf-head-main {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.contract-face-page .cf-head-actions-top {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  margin-left: auto;
  padding-top: 2px;
}
.contract-face-page .cf-delete-btn { white-space: nowrap; }
.cf-badge-wrap { display: inline-flex; }
select.cf-badge-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  border: 0;
  outline: none;
  padding-right: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2315803d' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
select.cf-badge-select.cf-badge-other {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23475569' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
}
.client-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}


/* Inside Client — delete top-right */
.client-inside .page-head.client-inside-head,
.client-block-page.client-inside .page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.client-inside-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
}
.client-delete-btn { white-space: nowrap; }


/* Client name → client landing */
a.client-inside-title-link {
  color: inherit !important;
  text-decoration: none !important;
  font: inherit;
}
a.client-inside-title-link:hover {
  color: #0a8cf0 !important;
  text-decoration: none !important;
}
a.cf-head-logo-link {
  display: inline-flex;
  flex: 0 0 auto;
  text-decoration: none;
}
a.cf-head-logo-link:hover .cf-head-logo {
  border-color: #0a8cf0;
}
a.cf-client-name-link {
  display: inline-block;
  margin: 0 0 2px;
  color: #0a8cf0 !important;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none !important;
}
a.cf-client-name-link:hover { text-decoration: underline !important; }


/* Export overview — left of Delete */
.client-inside-actions,
.cf-head-actions-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.client-export-btn,
.cf-export-btn {
  white-space: nowrap;
}


/* Signed Contract icon on client contracts list */
.client-contract-short-aside {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
a.client-signed-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #0a8cf0 !important;
  background: #eff6ff;
  text-decoration: none !important;
}
a.client-signed-link:hover {
  background: #dbeafe;
  color: #0369a1 !important;
}
.client-signed-ico { display: block; }


/* Fixed cost — true column grid (Periodicals align bar); view-only no X; Edit Remove X (13 Sep 2026) */
.cf-fixed-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0 0 8px;
}
.cf-fixed-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.cf-fixed-grid-head,
.cf-fixed-grid-row {
  display: grid;
  grid-template-columns:
    minmax(160px, 2.2fr)
    minmax(88px, 0.85fr)
    minmax(110px, 1.05fr)
    minmax(64px, 0.55fr)
    minmax(88px, 0.85fr);
  column-gap: 8px;
  align-items: center;
  padding: 8px 10px;
  box-sizing: border-box;
  width: 100%;
  min-width: 640px;
}
/* Edit mode: 6th col = red X Remove line (view stays 5-col, no X) */
.cf-fixed-grid-edit .cf-fixed-grid-head,
.cf-fixed-grid-edit .cf-fixed-grid-row {
  grid-template-columns:
    minmax(160px, 2.2fr)
    minmax(88px, 0.85fr)
    minmax(110px, 1.05fr)
    minmax(64px, 0.55fr)
    minmax(88px, 0.85fr)
    36px;
  min-width: 700px;
}
.cf-fixed-grid-head {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.cf-fixed-h {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  text-align: left;
  padding: 0;
  margin: 0;
  line-height: 1.2;
}
.cf-fixed-grid-row {
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  align-items: start;
}
.cf-fixed-grid-row:last-child { border-bottom: 0; }
.cf-fixed-add-row { background: #f8fafc; }
.cf-fixed-cell { min-width: 0; }
.cf-fixed-cell input,
.cf-fixed-cell textarea.cf-fixed-item {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  line-height: 1.35;
}
textarea.cf-fixed-item {
  min-height: 36px;
  resize: vertical;
  field-sizing: content; /* grow with content where supported */
}
.cf-fixed-col-total {
  font-variant-numeric: tabular-nums;
  padding-top: 8px;
  color: #0f172a;
}
.cf-fixed-col-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
}
.cf-fixed-grid-edit .compliance-x {
  color: #c0392b;
  font-weight: 800;
}
.cf-fixed-grid-view .cf-fixed-view-row .cf-fixed-cell {
  font-size: 13px;
  color: #0f172a;
  line-height: 1.35;
  padding: 2px 0;
}
.cf-fixed-view-item { white-space: pre-wrap; word-break: break-word; }
.cf-fixed-master-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.cf-fixed-master-actions .btn { white-space: nowrap; }
@media (max-width: 720px) {
  .cf-fixed-grid-head,
  .cf-fixed-grid-row,
  .cf-fixed-grid-edit .cf-fixed-grid-head,
  .cf-fixed-grid-edit .cf-fixed-grid-row {
    min-width: 560px;
  }
}

.client-identity-status { min-height: 1.1em; font-size: 12px; margin: 0 0 6px; }
.client-identity-status.is-ok { color: #15803d; }
.client-identity-status.is-err { color: #b91c1c; }

/* Contract Face — editable contract name (same pattern as CT ref) */
.contract-face-page .cf-name { max-width: 100%; }
.contract-face-page .cf-name-view {
  display: inline-block; margin: 0; padding: 0; border: 0; background: transparent;
  color: #0f172a; font: inherit; font-size: 26px; font-weight: 700;
  letter-spacing: 0.02em; line-height: 1.15; cursor: text; text-align: left; border-radius: 4px;
  text-transform: uppercase;
}
.contract-face-page .cf-name-view:hover { background: #f1f5f9; }
.contract-face-page .cf-name-view:focus { outline: 2px solid #0a8cf0; outline-offset: 2px; }
.contract-face-page .cf-name-input {
  display: block; width: min(560px, 100%); margin: 0; padding: 2px 6px;
  border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #0f172a;
  font: inherit; font-size: 26px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.15;
  min-height: 34px; text-transform: none;
}
.contract-face-page .cf-name.is-editing .cf-name-view { display: none; }
.contract-face-page .cf-name:not(.is-editing) .cf-name-input { display: none !important; }
.contract-face-page .cf-head-actions-top .cf-badge-wrap { align-self: center; }

.client-logo-adjust {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  max-width: 220px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.client-logo-zoom-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.client-logo-zoom-lab { font-size: 11px; font-weight: 650; color: #64748b; }
.client-logo-zoom-row input[type="range"] { flex: 1 1 80px; min-width: 70px; accent-color: #0a8cf0; }
.client-logo-zoom-val { font-size: 11px; font-variant-numeric: tabular-nums; color: #475569; min-width: 36px; }
.client-logo-zoom-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.client-logo-box.has-logo { cursor: pointer; }

.client-logo-zoom-lab { font-size: 11px; font-weight: 650; color: #64748b; }
.client-logo-zoom input[type="range"] { flex: 1 1 80px; min-width: 70px; accent-color: #0a8cf0; }
.client-logo-zoom-val { font-size: 11px; font-variant-numeric: tabular-nums; color: #475569; min-width: 36px; }
.contract-face-page .cf-head-logo {
  transform: scale(calc(var(--logo-zoom, 100) / 100));
  transform-origin: left center;
}

/* Signed Contract drop zone */
.cf-signed-drop {
  position: relative;
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  background: #f0f9ff;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cf-signed-drop.has-file { background: #fff; border-color: #bfdbfe; }
.cf-signed-drop.is-drag { border-color: #0a8cf0; background: #e0f2fe; }
.cf-signed-drop-ui { pointer-events: none; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.cf-signed-drop-ui .cf-signed-browse { pointer-events: auto; color: #0a8cf0; font-weight: 650; cursor: pointer; text-decoration: underline; }
.cf-signed-file {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 0;
}
.cf-signed-fname { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-signed-fname.is-set { color: #0f172a; font-weight: 600; }

/* Contract Documents tags — chip once selected; select on edit */
.cf-doc-tag { display: inline-flex; align-items: center; max-width: 100%; }
button.cf-doc-tag-chip {
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 10px; border-radius: 999px;
  background: #e2e8f0; color: #334155;
  font-size: 12px; font-weight: 650; line-height: 1.2;
  max-width: 100%;
}
.cf-doc-tag-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-doc-tag-x {
  border: 0; background: transparent; color: #dc2626; cursor: pointer;
  font-size: 15px; font-weight: 700; line-height: 1; padding: 0 1px;
  border-radius: 4px;
}
.cf-doc-tag-x:hover { background: #fee2e2; color: #b91c1c; }
.cf-spec-table .cf-doc-tag-select {
  width: 100%;
  max-width: 160px;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  background: #f8fafc;
}
.cf-spec-table .cf-fin-row-actions .compliance-x {
  color: #c0392b;
  font-weight: 700;
}

/* Contract Documents — Tag header + tag manager popout */
button.cf-doc-tag-head-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: #1d4ed8;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
button.cf-doc-tag-head-btn:hover { color: #1e3a8a; }

.cf-doc-tag-manager {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 24px;
}
.cf-doc-tag-manager[hidden] { display: none !important; }
.cf-doc-tag-manager-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.cf-doc-tag-manager-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(78vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
  border: 1px solid #e2e8f0;
}
.cf-doc-tag-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  position: sticky;
  top: 0;
}
.cf-doc-tag-manager-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.cf-doc-tag-manager-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 6px;
}
.cf-doc-tag-manager-close:hover { background: #e2e8f0; color: #0f172a; }
.cf-doc-tag-manager-lede {
  margin: 12px 16px 8px;
  font-size: 13px;
}
.cf-doc-tag-manager-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 8px;
}
.cf-doc-tag-manager-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #eef2f7;
}
.cf-doc-tag-manager-main { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.cf-doc-tag-manager-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  width: fit-content;
}
.cf-doc-tag-manager-meta { font-size: 11px; }
.cf-doc-tag-manager-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cf-doc-tag-manager-rename {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cf-doc-tag-manager-rename input[type="text"] {
  width: min(180px, 42vw);
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f8fafc;
}
.cf-doc-tag-manager-add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fbfdff;
}
.cf-doc-tag-manager-add .cf-field { flex: 1; min-width: 180px; margin: 0; }
.btn.btn-sm { padding: 4px 10px; font-size: 12px; }


/* Contract Face Schedule of Rates editor */
.cf-sor-table input[type="text"] {
  width: 100%;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  box-sizing: border-box;
}
.cf-sor-table .compliance-x { color: #c0392b; font-weight: 700; }

.cf-fin-add-form textarea {
  width: 100%;
  min-height: 110px;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  box-sizing: border-box;
  resize: vertical;
}
.cf-fin-add-form .cf-signed-drop { margin-top: 4px; }


.contract-face-page .cf-reps-table .cf-reps-del {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}
.contract-face-page .cf-reps-table .compliance-x {
  color: #dc2626;
  font-size: 16px;
  font-weight: 800;
}


/* Commercial collapsible on Contract Face */
.contract-face-page .cf-commercial-fold > .cf-commercial {
  padding: 0 0 8px;
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.contract-face-page .cf-commercial-fold > summary {
  margin-bottom: 4px;
}

/* —— Thin Asset create + face (2026-09-12) —— */
.asset-create-thin .asset-create-form { padding: 16px 18px 12px; }
.asset-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: start;
}
.asset-create-map .draw-map { height: 420px; border-radius: 10px; }
.asset-create-fields .grid-2.tight { gap: 10px; }
.field-help { margin: 4px 0 0; font-size: 12px; color: #6b7280; }
.req { color: #b45309; }
.signal-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.signal-radio {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 12px;
  background: #fff; cursor: pointer; font-weight: 600;
}
.signal-radio input { margin: 0; }
.signal-radio.on { border-color: #00796B; box-shadow: 0 0 0 2px rgba(0,121,107,.15); }
.badge-connect-new {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  background: #00796B; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  vertical-align: middle;
}
.places-field { position: relative; }
.places-suggest {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% - 2px);
  background: #fff; border: 1px solid #d1d5db; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.12); max-height: 220px; overflow: auto;
}
.places-suggest-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; font: inherit; cursor: pointer;
}
.places-suggest-item:hover { background: #f0fdfa; }
.asset-create-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb;
}
.asset-create-foot {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 10px; font-size: 12px;
}
.asset-face-core .asset-face-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.asset-face-core .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; background: #eef2f7; font-size: 12px; font-weight: 600;
}
.asset-face-core .chip-alias code {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; font-weight: 600;
}
.asset-face-core .chip-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #0a8cf0; display: inline-block;
}
.asset-face-core .chip-contract { background: #e0f2fe; color: #075985; text-decoration: none; }
.asset-face-core .chip-status-active { background: #dcfce7; color: #166534; }
.asset-face-core .chip-status-staging { background: #ffedd5; color: #9a3412; }
.asset-face-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px; align-items: start;
}
.asset-gf-row {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start;
  justify-content: space-between; margin-top: 10px;
}
.asset-tz { min-width: 140px; }
.asset-tz strong { display: block; }
.signals-card .signal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #eef2f7;
}
.signals-card .signal-row.on .signal-lab { font-weight: 700; }
.signals-card .signal-state { color: #9ca3af; font-size: 12px; font-weight: 600; }
.signals-card .signal-state.active { color: #15803d; }
.signals-card .signal-state.active::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; margin-right: 6px; vertical-align: middle;
}
.asset-face-foot { margin: 16px 0 4px; font-size: 12px; }
.face-draw-tools { margin-top: 8px; }
.face-draw-map { margin-top: 8px; height: 280px; }
@media (max-width: 960px) {
  .asset-create-grid, .asset-face-grid { grid-template-columns: 1fr; }
  .asset-create-map .draw-map { height: 300px; }
}

.azure-maps-missing { margin: 8px 0 0; font-size: 13px; }
.azure-maps-map-note {
  position: absolute; inset: 12px; z-index: 500;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: rgba(255,255,255,.92); border: 1px dashed #00796B; border-radius: 8px;
  padding: 12px; font-size: 13px; font-weight: 600; color: #134e4a; pointer-events: none;
}
.draw-map.azure-maps-disabled { position: relative; background: #eef6f5; }
.sites-map-full.azure-maps-disabled { position: relative; background: #eef6f5; }
/* Compact note so pins + geofences stay visible while key deferred */
.sites-map-full .azure-maps-map-note {
  inset: auto; top: 12px; left: 50%; right: auto; bottom: auto;
  transform: translateX(-50%);
  z-index: 450; max-width: min(520px, 86%);
  pointer-events: none;
  background: rgba(255,255,255,.94);
  box-shadow: 0 2px 10px rgba(15, 40, 50, .12);
}
.map-stage > .banner.azure-maps-missing { margin: 8px 12px 0; }


/* Geofence octagon radius slider (create + asset face) */
.gf-slider-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 10px 0 4px;
}
.gf-slider-row label {
  font-size: 13px;
  color: #334155;
  min-width: 140px;
}
.gf-slider-row input[type="range"] {
  flex: 1 1 180px;
  max-width: 320px;
  accent-color: #00796B;
}
.gf-slider-row .btn { margin-left: auto; }
.leaflet-draw { display: none !important; }

/* CONNECT-new Task Consumables block (allocation source) */
.cons-task-block {
  margin: 16px 0 4px;
  padding: 12px 12px 8px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #f8fafc;
}
.cons-task-block h3 { margin: 0 0 6px; font-size: 16px; }
.cons-task-lines { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.cons-task-line {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 8px 14px; padding: 8px 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
}
.cons-task-meta { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.cons-task-kind, .cons-task-carton { font-size: 12px; color: #64748b; }
.cons-task-carton { font-weight: 650; color: #0f766e; }
.cons-task-qty { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.cons-task-qty span { font-size: 12px; color: #334155; font-weight: 600; }
.cons-task-qty input, .cons-task-qty select { min-width: 140px; }
.cons-upc { display: inline-block; margin-left: 6px; font-size: 12px; color: #0f766e; font-weight: 650; }
.cons-sot-card .cons-sot-table { font-size: 13px; }
.cons-tpl-toggle { margin: 12px 0 4px; padding: 10px 12px; border: 1px dashed #99f6e4; border-radius: 10px; background: #f0fdfa; }

/* Asset bulk upload — Mode A/B + loud confirm */
.asset-bulk-upload .bulk-mode-fieldset {
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 10px;
  padding: 12px 14px 6px;
  margin: 0 0 16px;
}
.asset-bulk-upload .bulk-mode-fieldset legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: 0.85rem;
}
.asset-bulk-upload .bulk-mode-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.asset-bulk-upload .bulk-mode-opt:hover {
  background: rgba(37, 99, 235, 0.06);
}
.asset-bulk-upload .bulk-mode-opt span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.asset-bulk-upload .bulk-mode-b-panel {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 10px;
  border: 2px solid #b45309;
  background: #fffbeb;
}
.asset-bulk-upload .bulk-loud-confirm {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 2px dashed #b45309;
  background: #ffedd5;
}
.asset-bulk-upload .bulk-loud-confirm-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.35;
  cursor: pointer;
}
.asset-bulk-upload .bulk-loud-confirm-label input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.asset-bulk-upload .bulk-fail-banner {
  margin: 8px 0 12px;
}
.asset-bulk-upload .bulk-fail-row td {
  background: #fef2f2;
}
.asset-bulk-upload .bulk-fail-table {
  border: 1px solid #fca5a5;
}

/* —— Heartbeat shell correction (Maps overlay · CONNECT) —— */
.nav-item[data-nav-key="heartbeat"] .nav-ico { color: #c5ced8; }
.nav-item[data-nav-key="heartbeat"].active .nav-ico { color: #BE1E2D; }

.map-toolbar .hb-heart-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); background: #fff; padding: 6px 12px;
  cursor: pointer; font-weight: 700; font-size: 12px; letter-spacing: .04em; color: #141c26;
  height: 36px; box-sizing: border-box;
}
.hb-heart-toggle.on { border-color: #BE1E2D; background: #fff5f6; color: #BE1E2D; }
.hb-heart-toggle:not(.on) { color: #6b7280; }
.hb-heart-mark { display: block; flex-shrink: 0; }
.hb-heart-toggle:not(.on) .hb-heart-on { display: none !important; }
.hb-heart-toggle.on .hb-heart-off { display: none !important; }
.hb-heart-toggle:not(.on) .hb-heart-off { display: block !important; width: 22px; height: 22px; }
.hb-heart-toggle.on .hb-heart-on { display: block !important; width: 22px; height: 22px; }

/* Chase overlays map below fixed map-overlay banner; Activity rail stays */
.map-stage > .hb-chase {
  position: absolute;
  top: 64px; left: 12px; right: 12px; bottom: 12px;
  z-index: 24;
  display: flex; flex-direction: column;
  background: rgba(244, 246, 248, 0.96);
  border: 1px solid var(--line-2, #e5e7eb);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  pointer-events: auto;
}
.map-stage.feed-open > .hb-chase { right: 332px; }
.map-stage > .hb-chase[hidden] { display: none !important; }

/* Heart ON snug — edge-to-edge chase; solid Field chrome banner; no map mat peek */
.map-stage.heart-on > .hb-chase {
  top: 0; left: 0; right: 0; bottom: 0;
  border: 0;
  box-shadow: none;
  background: #f4f6f8;
  padding-top: 56px;
  box-sizing: border-box;
}
.map-stage.heart-on.feed-open > .hb-chase { right: 320px; }
.map-stage.heart-on > .map-overlay {
  top: 0; left: 0; right: 0;
  padding: 10px 12px;
  min-height: 56px;
  box-sizing: border-box;
  background: #fff;
  border-bottom: 1px solid var(--line-2, #e5e7eb);
  z-index: 36;
  align-content: center;
}
.map-stage.heart-on.feed-open > .map-overlay { right: 320px; }
.map-stage.heart-on > .map-fab { display: none; }
.map-stage.heart-on > .map-contract-legend { display: none !important; }
.map-stage.heart-on > .sites-map-full { visibility: hidden; pointer-events: none; }

/* Three stage bands — collapsible; scroll inside open stage */
.hb-bands {
  flex: 1; min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  overflow: hidden;
}
.hb-band {
  background: #fff; border: 1px solid var(--line-2); overflow: hidden;
  display: flex; flex-direction: column; min-height: 0;
  flex: 1 1 0;
}
.hb-band.is-collapsed {
  flex: 0 0 auto;
}
.hb-band.is-collapsed .hb-rows { display: none; }
.hb-band.is-collapsed .hb-band-head { border-bottom: 0; }
/* Stage band top accent — stage colours (13 Sep): Due now red · Follow-up orange · Closed today green */
.hb-band-due { border-top: 3px solid #BE1E2D; }       /* Due now = red */
.hb-band-waiting { border-top: 3px solid #e07b2a; }   /* Follow-up = orange */
.hb-band-closed { border-top: 3px solid #16a34a; }    /* Closed today = green */
.hb-band-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: #fafbfc; flex-shrink: 0;
  cursor: pointer; user-select: none;
}
.hb-band-head h2 { margin: 0; font-size: 15px; }
.hb-band-count {
  font-size: 12px; font-weight: 700; background: #eef2f6; color: #374151;
  min-width: 22px; text-align: center; padding: 2px 7px; border-radius: 999px;
}
.hb-band-hint { font-size: 12px; margin-left: auto; }
.hb-band-fold {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  font-size: 16px; font-weight: 700; line-height: 1;
  color: #fff; border: 0; background: #0a8cf0; border-radius: 999px;
  padding: 0; flex-shrink: 0;
}
.hb-band-head .fold-expand,
.hb-band-head .fold-collapse {
  display: none !important;
  margin-left: auto;
  align-items: center; justify-content: center;
  width: 24px; height: 24px;
  font-size: 16px; font-weight: 700; line-height: 1;
  color: #fff; border: 0; background: #0a8cf0; border-radius: 999px; /* blue collapse — teacher 05 */
  padding: 0; flex-shrink: 0;
}
/* Expanded = blue − · collapsed = blue + (never twin +/+ while open — Damien 13 Sep) */
.hb-band:not(.is-collapsed) > .hb-band-head .fold-collapse,
.hb-band-head[aria-expanded="true"] .fold-collapse { display: inline-flex !important; }
.hb-band:not(.is-collapsed) > .hb-band-head .fold-expand,
.hb-band-head[aria-expanded="true"] .fold-expand { display: none !important; }
.hb-band.is-collapsed > .hb-band-head .fold-expand,
.hb-band-head[aria-expanded="false"] .fold-expand { display: inline-flex !important; }
.hb-band.is-collapsed > .hb-band-head .fold-collapse,
.hb-band-head[aria-expanded="false"] .fold-collapse { display: none !important; }
/* Add Heartbeat (Due now only) — green + left of blue collapse (Damien 13 Sep swap) */
.hb-band-add {
  display: none;
  align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-left: auto;
  border: 0; border-radius: 999px; padding: 0;
  background: #16a34a; color: #fff;
  font-size: 16px; font-weight: 700; line-height: 1;
  cursor: pointer; flex-shrink: 0;
}
.hb-band-due > .hb-band-head .hb-band-add { display: inline-flex; }
.hb-band-due > .hb-band-head .fold-expand,
.hb-band-due > .hb-band-head .fold-collapse {
  margin-left: 8px; /* after green Add — not twin auto */
}
.hb-band-add:hover { background: #15803d; }
.hb-add-modal[hidden] { display: none !important; }
.hb-add-modal {
  position: absolute; inset: 56px 12px 12px; z-index: 40;
  background: #fff; border: 1px solid var(--line-2, #e5e7eb);
  box-shadow: 0 12px 32px rgba(15,23,42,.18);
  display: flex; flex-direction: column; max-width: 420px; margin: 0 auto;
  max-height: calc(100% - 24px);
}
.map-stage.heart-on.feed-open .hb-add-modal { right: 332px; }
.hb-add-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.hb-add-head h2 { margin: 0; font-size: 16px; }
.hb-add-body { flex: 1; overflow: auto; padding: 14px; }
.hb-add-actions { display: flex; gap: 8px; margin-top: 12px; }

.hb-attn-ico {
  display: inline-grid; place-items: center; width: 22px; height: 20px;
  background: #f97316; color: #fff; font-weight: 800; font-size: 13px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  line-height: 1; padding-top: 4px;
}
.hb-rows { display: flex; flex-direction: column; overflow: auto; min-height: 0; flex: 1; }
.hb-empty { padding: 14px; margin: 0; }
.hb-row {
  display: grid; grid-template-columns: 36px minmax(160px, 1.15fr) minmax(0, 2.6fr) auto;
  gap: 10px; align-items: start; padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.hb-row:first-child { border-top: 0; }
.hb-row-attn { background: #fff8f6; }
/* Seen = button green only on open stages; Closed today rows keep green tint */
.hb-row-seen:not([data-stage="closed"]) { /* no open-row paint */ }
.hb-row[data-stage="closed"],
.hb-band-closed .hb-row { background: #ecfdf5; }
.hb-row[data-stage="closed"] .hb-row-site { color: #166534; }
.hb-act.hb-act-seen,
.hb-act.is-seen {
  background: #16a34a !important;
  border-color: #15803d !important;
  color: #fff !important;
}
.hb-act.hb-act-seen:hover,
.hb-act.is-seen:hover {
  background: #15803d !important;
  border-color: #166534 !important;
  color: #fff !important;
}
.hb-urgency {
  width: 28px; height: 28px; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.hb-urgency-attn {
  background: transparent; color: #fff;
}
.hb-urgency-attn .hb-tri {
  display: inline-grid; place-items: center; width: 22px; height: 20px;
  background: #f97316; color: #fff; font-weight: 800; font-size: 13px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  line-height: 1; padding-top: 4px;
}
.hb-urgency-info { background: #e8f1fe; color: #1d4ed8; border-radius: 999px; }
.hb-urgency-seen { background: #16a34a; color: #fff; border-radius: 999px; font-size: 14px; }
.hb-row-main { min-width: 0; cursor: pointer; }
.hb-row-siteblock { min-width: 0; cursor: pointer; }
.hb-row-site { font-weight: 700; font-size: 15px; color: #141c26; }
.hb-source-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: middle;
  background: #eef2f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.hb-band-due .hb-source-tag { background: #fff5f6; color: #9f1239; border-color: #fecdd3; }
.hb-band-waiting .hb-source-tag { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.hb-band-closed .hb-source-tag { background: #ecfdf5; color: #166534; border-color: #bbf7d0; }
.hb-row-title { font-size: 13px; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-row-meta { font-size: 12px; margin-top: 2px; }
/* Band column headers — top-aligned once per stage (Damien chase chrome 12 Sep) */
.hb-col-heads {
  display: grid;
  grid-template-columns: 36px minmax(160px, 1.15fr) minmax(0, 2.6fr) auto;
  gap: 10px;
  align-items: start;
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: #fafbfc;
  flex-shrink: 0;
}
.hb-band.is-collapsed .hb-col-heads { display: none; }
.hb-col-spacer { width: 28px; }
.hb-col-site-spacer { min-width: 0; } /* aligns under site column — headers sit over value grid only */
.hb-col-actions-spacer { width: 118px; } /* icon Seen+Convert+Park */
.hb-col-heads-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(110px, 0.75fr) minmax(110px, 0.75fr);
  gap: 6px 14px;
  align-items: start;
  min-width: 0;
  margin-top: 0;
}
.hb-col-lab {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #141c26; /* bold black/strong — teacher 02 */
  line-height: 1.25;
}
.hb-row-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 6px 14px;
  margin-top: 6px;
}
.hb-row-fields-v2 {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(110px, 0.75fr) minmax(110px, 0.75fr);
  align-items: start; /* WHEN/WHO stay column-aligned when WHAT expands */
}
.hb-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hb-field-lab {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7280;
}
/* Band col-heads carry labels — hide per-row labs under v2 */
.hb-row-fields-v2 .hb-field-lab { display: none; }
.hb-field-val {
  font-size: 13px;
  font-weight: 650;
  color: #141c26;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* WHAT NEEDS + WHAT IS THE HOLD UP — expanding free text (no artificial caps) */
.hb-field-val.hb-field-expand {
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.hb-field-val.hb-due-now { color: #BE1E2D; }
.hb-field-when .hb-field-val,
.hb-field-who .hb-field-val {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb-row { align-items: start; } /* cascade: urgency/actions top when WHAT grows */
.hb-expand-ta {
  min-height: 2.6em;
  resize: vertical;
  field-sizing: content;
}
@media (max-width: 900px) {
  .hb-row,
  .hb-col-heads { grid-template-columns: 36px minmax(0, 1fr); }
  .hb-row-fields { grid-template-columns: 1fr; }
  .hb-col-site-spacer,
  .hb-col-actions-spacer { display: none; }
  .hb-row-fields-v2 { grid-column: 1 / -1; }
  .hb-col-heads-inner,
  .hb-row-fields-v2 {
    grid-template-columns: 1fr 1fr;
  }
}
.hb-due-now { color: #BE1E2D; font-weight: 700; }
.hb-due-chip { display: none !important; } /* dropped RHS Due now pill — v2 amend */
.hb-row-fields-v2 { cursor: pointer; min-width: 0; }
.hb-act.hb-act-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 28px; padding: 0;
  border: 1px solid var(--line-2, #d1d5db);
  background: #fff; color: #374151;
}
.hb-act.hb-act-ico svg { display: block; }
.hb-act.hb-act-ico:hover { border-color: #0a8cf0; color: #0a8cf0; }
.hb-act.hb-act-ico.hb-act-seen,
.hb-act.hb-act-ico.is-seen {
  background: #16a34a !important;
  border-color: #15803d !important;
  color: #fff !important;
}
.hb-row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.hb-act {
  border: 1px solid var(--line-2); background: #fff; padding: 5px 10px;
  font-size: 12px; font-weight: 650; cursor: pointer; color: #374151;
}
.hb-act:hover { border-color: #0a8cf0; color: #0a8cf0; }
.hb-act:disabled { opacity: .45; cursor: not-allowed; }
.hb-act-closeout { border-color: #16a34a; color: #15803d; }
.hb-act-closeout:hover { border-color: #15803d; color: #166534; background: #f0fdf4; }

/* Detail panel over chase (sibling of chase on map-stage) */
.map-stage > .hb-detail, #hb-detail.hb-detail {
  position: absolute; top: 64px; right: 12px; bottom: 12px; width: min(400px, 92%);
  z-index: 32; background: #fff; border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px rgba(15,23,42,.18);
  display: flex; flex-direction: column; overflow: hidden;
  pointer-events: auto;
}
.map-stage.feed-open > .hb-detail { right: 332px; }
.map-stage.heart-on > .hb-detail {
  top: 56px; right: 0; bottom: 0;
  border-right: 0; border-bottom: 0; border-radius: 0;
}
.map-stage.heart-on.feed-open > .hb-detail { right: 320px; }
#hb-detail[hidden] { display: none !important; }
.hb-detail-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.hb-detail-head h2 { margin: 0; font-size: 16px; }
.hb-detail-close {
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: #6b7280; padding: 0 4px;
}
.hb-detail-scroll { flex: 1; overflow: auto; padding: 14px; }
.hb-detail-field { margin-bottom: 12px; }
.hb-detail-field label { display: block; font-size: 12px; font-weight: 700; color: #5c6570; margin-bottom: 4px; }
.hb-detail-field input, .hb-detail-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--line-2);
  padding: 8px 10px; font: inherit; background: #fff;
}
.hb-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hb-detail-foot { margin-top: 12px; font-size: 12px; }
.hb-media-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hb-media-thumbs img, .hb-media-thumbs video {
  width: 96px; height: 72px; object-fit: cover; border: 1px solid var(--line-2); background: #f3f4f6;
}
.hb-feed-attn {
  display: inline-grid; place-items: center; width: 16px; height: 14px;
  background: #f97316; color: #fff; font-weight: 800; font-size: 10px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  margin-right: 6px; vertical-align: middle; padding-top: 2px;
}

@media (max-width: 900px) {
  .map-stage.feed-open > .hb-chase { right: 12px; }
  .map-stage.heart-on.feed-open > .hb-chase { right: 0; }
  .map-stage.heart-on.feed-open > .map-overlay { right: 0; }
  .hb-bands { overflow: auto; }
  .hb-band:not(.is-collapsed) { max-height: 42vh; flex: 0 1 auto; }
}


/* Maps people right-click (Admin/COG) */
.crew-ctx-menu {
  position: absolute;
  z-index: 1200;
  min-width: 200px;
  max-width: 280px;
  padding: 6px;
  background: #fff;
  border: 1px solid #d0d7e2;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  font-size: 13px;
}
.crew-ctx-title {
  padding: 6px 10px 8px;
  font-weight: 650;
  color: #0f172a;
  border-bottom: 1px solid #e5e9ef;
  margin-bottom: 4px;
}
.crew-ctx-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 8px;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.crew-ctx-item:hover { background: #f1f5f9; }
.crew-ctx-danger { color: #b91c1c; }
.crew-ctx-danger:hover { background: #fef2f2; }

/* Maps Legend — independent Markers + Contracts accordions (CONNECT +/−) */
.map-legend-fold {
  border: 0;
  margin: 0 0 6px;
  padding: 0;
  background: transparent;
}
.map-legend-fold > summary.map-legend-fold-sum {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 2px 0 6px;
  margin: 0;
  border: 0;
  color: #334155;
  font-weight: 650;
}
.map-legend-fold > summary.map-legend-fold-sum::-webkit-details-marker { display: none; }
.map-legend-fold > summary .fold-title { flex: 1; font-size: 12px; letter-spacing: 0.02em; }
.map-legend-fold > summary .map-contract-legend-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.map-legend-fold > summary .fold-expand,
.map-legend-fold > summary .fold-collapse {
  width: 20px;
  height: 20px;
  font-size: 14px;
}
.map-legend-fold:not([open]) > summary .fold-collapse { display: none; }
.map-legend-fold[open] > summary .fold-expand { display: none; }
.map-legend-fold[open] > summary .fold-collapse { display: inline-flex; }
.map-legend-fold[open] > summary.map-legend-fold-sum {
  border-bottom: 1px solid #e5e9ef;
  margin-bottom: 8px;
}

/* Contract face — Periodicals fixed info table (13 Sep 2026) — true column grid; CTA drop + master Save; Edit Remove X */
.cf-periodicals-fixed .cf-per-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.cf-per-grid-head,
.cf-per-grid-row {
  display: grid;
  grid-template-columns:
    minmax(110px, 1.15fr)
    minmax(120px, 1.25fr)
    minmax(100px, 0.85fr)
    minmax(72px, 0.65fr)
    minmax(72px, 0.65fr)
    minmax(140px, 1.2fr)
    minmax(150px, 1.35fr);
  column-gap: 8px;
  align-items: center;
  padding: 8px 10px;
  box-sizing: border-box;
  width: 100%;
  min-width: 860px;
}
/* Edit mode only: 8th col = red X Remove line (view stays 7-col, no X) */
.cf-per-grid-edit .cf-per-grid-head,
.cf-per-grid-edit .cf-per-grid-row {
  grid-template-columns:
    minmax(110px, 1.15fr)
    minmax(120px, 1.25fr)
    minmax(100px, 0.85fr)
    minmax(72px, 0.65fr)
    minmax(72px, 0.65fr)
    minmax(140px, 1.2fr)
    minmax(140px, 1.25fr)
    36px;
  min-width: 900px;
}
.cf-per-col-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cf-per-grid-edit .compliance-x {
  color: #c0392b;
  font-weight: 800;
}
.cf-per-grid-head {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.cf-per-h {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  text-align: left;
  padding: 0;
  margin: 0;
  line-height: 1.2;
}
.cf-per-grid-row {
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.cf-per-grid-row:last-child { border-bottom: 0; }
.cf-per-add-row { background: #f8fafc; }
.cf-per-cell { min-width: 0; }
.cf-per-cell input,
.cf-per-cell select {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.cf-per-col-type {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cf-per-col-type .per-dot { flex: 0 0 auto; }
.cf-per-col-type input { flex: 1 1 auto; min-width: 0; width: auto; }
.cf-per-grid-view .cf-per-view-row .cf-per-cell {
  font-size: 13px;
  color: #0f172a;
  line-height: 1.35;
  padding: 2px 0;
}
.cf-per-master-actions .btn { white-space: nowrap; }
.cf-per-paste summary { cursor: pointer; font-weight: 650; color: #0f172a; }
.cf-per-paste-area {
  width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; padding: 10px; border: 1px solid #cbd5e1; border-radius: 10px; min-height: 120px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* Service category blocks inside Other services (13 Sep 2026) */
/* Other services Qty column (Damien send 13 Sep 2026) */
.cf-svc-table th:nth-child(3),
.cf-svc-table td:nth-child(3) { width: 90px; }
.cf-svc-table input.cf-svc-qty { max-width: 80px; }
.cf-svc-block {
  margin-top: 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  padding-bottom: 10px;
}
.cf-svc-block > summary {
  font-size: 16px;
  font-weight: 750;
}
.cf-svc-block .cf-svc-title { font-size: 1.05em; font-weight: 800; }
.cf-svc-block .cf-svc-ico {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-right: 6px;
}
.cf-svc-block .cf-svc-ico svg { width: 16px; height: 16px; }
.cf-svc-sanitary .cf-svc-ico { background: #0a8cf0; }
.cf-svc-sanitary .cf-svc-title { color: #0a8cf0; }
.cf-svc-waste .cf-svc-ico { background: #16a34a; }
.cf-svc-waste .cf-svc-title { color: #15803d; }
.cf-svc-pest .cf-svc-ico { background: #ea580c; }
.cf-svc-pest .cf-svc-title { color: #c2410c; }
.cf-svc-grounds .cf-svc-ico { background: #92400e; }
.cf-svc-grounds .cf-svc-title { color: #78350f; }
.cf-svc-table td input,
.cf-svc-table td select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.cf-svc-table .cf-svc-del { width: 40px; text-align: center; }
.cf-svc-table-view td { vertical-align: middle; }
.cf-svc-head-actions { margin-top: 4px; }


/* Contract Periodicals fold — inline calendar lens (CoS CLEAR 13 Sep 2026) */
.cf-fold #cf-periodicals .cf-per-cal-lens,
details#cf-periodicals .cf-per-cal-lens {
  margin-top: 4px;
}
details#cf-periodicals .cf-per-cal-lens .per-cal-head h2 {
  font-size: 16px;
}


/* Bin run — parent site / bin (never "sub-asset") */
.chip-parent-site {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #7dd3fc;
}
.chip-bin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.asset-hier-cell .chip { margin-right: 4px; }
.bins-card .bin-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.bins-card .bin-list li {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}
.bins-card .bin-onesie-form {
  margin-top: 8px;
  display: grid;
  gap: 10px;
}
.bulk-paste-area {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  min-height: 140px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}
.bulk-paste-field .muted { margin-top: 4px; }


/* —— Issues orange triangle ! — Heartbeat Due now attention family (Damien 13 Sep) —— */
/* Reuses .hb-urgency-attn .hb-tri; do not alter Heartbeat collapse − chrome. */
.iss-attn-col { width: 28px; }
.iss-attn-cell {
  width: 28px;
  vertical-align: middle;
  padding-right: 4px;
  text-align: center;
}
.iss-attn-cell .iss-attn {
  margin: 0 auto;
}
.checkin-list .iss-attn {
  display: inline-grid;
  margin-right: 8px;
  vertical-align: middle;
}
.activity-row.kind-issue {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
}
.activity-row.kind-issue > .iss-attn {
  grid-row: 1 / span 3;
  align-self: center;
}
.activity-row.kind-issue > .activity-row-kicker,
.activity-row.kind-issue > .activity-row-title,
.activity-row.kind-issue > .activity-row-meta {
  grid-column: 2;
}
.feed-ico-wrap .feed-issue-attn,
.feed-ico-wrap .iss-attn {
  margin: 0 auto;
}
.feed-row.issue .feed-ico-wrap {
  color: inherit;
}
.ml-leg-row .iss-attn {
  flex-shrink: 0;
}

/* —— CONNECT Onboarding Package (M1) — signed Stage 0 mock 01 chrome —— */
.ob-app {
  margin: 0;
  min-height: 100dvh;
  background: #f3f4f6;
  color: var(--ink);
  font-family: var(--font);
}
.ob-top {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141c26;
  color: #fff;
  min-height: 52px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0));
}
.ob-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: -8px;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
}
.ob-back:hover { background: rgba(255,255,255,.08); }
.ob-brand {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ob-main { min-height: calc(100dvh - 52px); overflow: visible; }
.ob-wrap {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 22px 18px 48px;
  overflow: visible;
}
@media (min-width: 800px) {
  .ob-wrap { width: min(880px, 100%); padding: 28px 32px 64px; }
}
.ob-h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #141c26;
  line-height: 1.15;
}
.ob-h2 {
  font-size: 16px;
  font-weight: 700;
  color: #141c26;
  margin: 18px 0 8px;
  padding-top: 4px;
  border-top: 2px solid #BE1E2D;
  display: inline-block;
}
.ob-kicker {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.ob-progress-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.ob-desk-only { display: none; }
@media (min-width: 800px) {
  .ob-desk-only { display: inline; }
}
.ob-bar {
  display: block;
  width: 100%;
  height: 6px;
  min-height: 6px;
  background: #e5e7eb;
  border-radius: 99px;
  margin: 14px 0 18px;
  overflow: hidden;
  flex-shrink: 0;
}
.ob-bar-fill {
  display: block;
  height: 100%;
  background: #BE1E2D;
  border-radius: 99px;
  min-width: 0;
}
@media (min-width: 800px) {
  /* Mock 01 desktop: grey track always visible under the status line, even at 0 of 6. */
  .ob-bar {
    height: 8px;
    min-height: 8px;
    background: #e8eaed;
    box-shadow: inset 0 0 0 1px #d0d4d8;
    margin: 16px 0 20px;
  }
}
.ob-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,28,38,.05);
}
.ob-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #eef0f2;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.ob-row:last-child { border-bottom: 0; }
.ob-row:hover { background: #fafbfc; }
.ob-row-title {
  font-weight: 650;
  font-size: 15px;
  color: #1a1f26;
}
.ob-row-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ob-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  line-height: 1.4;
}
.ob-pill-done { background: #d1fae5; color: #047857; }
.ob-pill-progress { background: #ffedd5; color: #c2410c; }
.ob-pill-todo { background: #f3f4f6; color: #6b7280; }
.ob-chevron { color: #c5c9ce; display: inline-flex; }
.ob-cta,
.ob-cta-btn {
  display: block;
  width: 100%;
  background: #141c26;
  color: #fff !important;
  border: 0;
  border-radius: 999px;
  text-align: center;
  padding: 14px 22px;
  font-weight: 650;
  font-size: 15px;
  margin-top: 20px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.ob-cta:hover,
.ob-cta-btn:hover { background: #1b2430; }
@media (min-width: 800px) {
  .ob-cta,
  .ob-cta-btn {
    display: inline-flex;
    width: auto;
    min-width: 280px;
    justify-content: center;
  }
}
.ob-help {
  margin-top: 10px;
  color: var(--faint);
  font-size: 13px;
}
@media (max-width: 799px) {
  .ob-help { text-align: center; }
}
.ob-form { margin: 0; }
.ob-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px 20px;
  margin: 0 0 14px;
  box-shadow: 0 1px 2px rgba(20,28,38,.05);
}
.ob-card p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; }
.ob-card p:last-child { margin-bottom: 0; }
.ob-principles,
.ob-plain {
  margin: 0 0 12px;
  padding-left: 18px;
}
.ob-principles li,
.ob-plain li { margin: 0 0 8px; font-size: 15px; line-height: 1.45; }
.ob-handbook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.ob-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 13px;
}
.ob-btn-ghost:hover { border-color: #141c26; }
.ob-pdf {
  width: 100%;
  min-height: 280px;
  border: 1px dashed #d7dadd;
  border-radius: 10px;
  background: #fafafa;
}
.ob-muted { color: var(--muted); font-size: 14px; }
.ob-await { text-align: center; padding: 28px 18px 24px; }
.ob-hour { margin: 0 auto 12px; }
.ob-await-title { font-size: 20px; margin: 0 0 10px; color: #141c26; }
.ob-block-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 99px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.ob-hr { border: 0; border-top: 1px solid #eef0f2; margin: 14px 0; }
.ob-note {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.ob-app .banner {
  width: min(720px, calc(100% - 36px));
  margin: 12px auto 0;
}
@media (min-width: 800px) {
  .ob-app .banner { width: min(880px, calc(100% - 64px)); }
}

/* —— M2 Details & medical (signed mock 02 chrome; full 49Q) —— */
.ob-sec-title {
  font-size: 16px;
  font-weight: 700;
  color: #141c26;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #BE1E2D;
  display: inline-block;
}
.ob-sec-help {
  margin: 0 0 14px !important;
  color: var(--muted);
  font-size: 14px !important;
}
.ob-field { margin: 0 0 14px; }
.ob-field:last-child { margin-bottom: 0; }
.ob-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #141c26;
}
.ob-req { color: #BE1E2D; font-weight: 700; }
.ob-input,
.ob-select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: #141c26;
  -webkit-appearance: none;
  appearance: none;
}
.ob-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%236b7280' stroke-width='1.8'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.ob-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: #141c26;
  resize: vertical;
  min-height: 96px;
}
.ob-input:focus,
.ob-select:focus,
.ob-textarea:focus,
.ob-app .lh-date:focus {
  outline: 2px solid #141c26;
  outline-offset: 1px;
}
.ob-date-wrap { position: relative; }
.ob-date-wrap .ob-input { padding-right: 42px; }
.ob-date-ico {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: inline-flex;
}
.ob-choice { display: flex; flex-direction: column; gap: 8px; }
.ob-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1f26;
  cursor: pointer;
}
.ob-check input { margin-top: 3px; accent-color: #141c26; }
.ob-declare {
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
.ob-declare p { margin: 0 !important; font-size: 14px !important; line-height: 1.5; }
.ob-check-declare { align-items: center; font-weight: 650; }
.ob-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.ob-err { margin: 6px 0 0; color: #BE1E2D; font-size: 13px; font-weight: 600; }
.ob-field.is-err .ob-input,
.ob-field.is-err .ob-select,
.ob-field.is-err .ob-textarea { border-color: #BE1E2D; }
.ob-card { overflow: visible; }
.ob-actions { margin-top: 4px; }
.ob-draft {
  display: block;
  width: 100%;
  background: #fff;
  color: #141c26;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  text-align: center;
  padding: 14px 22px;
  font-weight: 650;
  font-size: 15px;
  margin: 8px 0 12px;
  cursor: pointer;
  font-family: inherit;
}
.ob-draft:hover { border-color: #141c26; }
.ob-actions .ob-cta,
.ob-actions .ob-cta-btn {
  display: block;
  width: 100%;
  margin-top: 0;
}
.ob-cta-submit {
  box-shadow: 0 3px 0 #BE1E2D;
  margin-bottom: 8px;
}
.ob-note + .ob-actions {
  margin-top: 16px;
  overflow: visible;
}
@media (max-width: 799px) {
  .ob-actions .ob-cta,
  .ob-actions .ob-cta-submit,
  .ob-cta.ob-cta-submit {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}
.ob-details-form .ob-h2 {
  margin: 0 0 10px;
  padding-top: 0;
  border-top: 0;
}
.ob-app .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— K1 Keys desk of record (Contract face TOP) —— */
.keys-desk.card {
  padding: 18px 20px 20px;
  margin-bottom: 14px;
  scroll-margin-top: 96px;
}
.keys-desk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.keys-desk-title h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  color: #141c26;
  letter-spacing: -0.02em;
}
.keys-desk-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #141c26;
  flex: 0 0 auto;
}
.keys-desk-ico svg { display: block; width: 22px; height: 22px; }
.keys-desk-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.keys-desk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.keys-filter select {
  min-height: 36px;
  min-width: 140px;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: #141c26;
  font-weight: 650;
  font-size: 13px;
}
.keys-issue-btn {
  background: #141c26;
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 650;
}
.keys-issue-btn:hover { background: #1b2430; color: #fff; }
.keys-issue-btn[disabled] { opacity: .45; cursor: not-allowed; }
.keys-desk-note {
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.keys-table-wrap { border-radius: 10px; }
.keys-table th {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
}
.keys-table td { vertical-align: middle; }
.keys-td-set { min-width: 140px; }
.keys-td-set strong { display: block; color: #141c26; font-weight: 650; }
.keys-count { display: block; font-size: 12px; margin-top: 2px; }
.keys-td-move span,
.keys-td-people span { display: block; line-height: 1.35; }
.keys-move-detail { font-size: 12px; margin-top: 2px; }
.keys-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  background: #141c26;
  color: #fff;
}
.keys-photo img { width: 40px; height: 40px; object-fit: cover; display: block; }
.keys-photo-ph svg { display: block; }
.keys-hold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.keys-hold-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
.keys-hold-issued { background: #dcfce7; color: #166534; }
.keys-hold-issued .keys-hold-dot { background: #22c55e; }
.keys-hold-pending { background: #e2e8f0; color: #475569; }
.keys-hold-pending .keys-hold-dot { background: #94a3b8; }
.keys-same { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.keys-same h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 650;
  color: #141c26;
}
.keys-same-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.keys-same-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}
.keys-same-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #141c26;
}
.keys-same-card p { color: var(--muted); font-size: 13px; margin: 0 0 12px; line-height: 1.4; }
.keys-pick-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 38, .46);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.keys-pick-overlay[hidden] { display: none; }
.keys-pick-panel {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(20, 28, 38, .22);
  padding: 16px 18px 18px;
}
.keys-pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.keys-pick-head h3 { margin: 0; font-size: 18px; color: #141c26; }
.keys-pick-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #141c26;
}
.keys-pick-lede { color: var(--muted); font-size: 13px; margin: 8px 0 12px; }
.keys-pick-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.keys-pick-list li + li { border-top: 1px solid #eef1f4; }
.keys-pick-list a {
  display: block;
  padding: 11px 14px;
  color: #141c26;
  text-decoration: none;
  font-weight: 650;
}
.keys-pick-list a:hover { background: #eef6ff; }
.keys-pick-list-page { margin-bottom: 16px; }
.keys-pick-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.keys-issue-page { max-width: 560px; margin-left: auto; margin-right: auto; }
.keys-issue-card { padding: 0 0 14px; overflow: hidden; }
.keys-issue-head {
  background: #141c26;
  color: #fff;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.keys-issue-head-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #fff;
  color: #141c26;
  flex: 0 0 auto;
}
.keys-issue-head-ico svg { display: block; width: 20px; height: 20px; }
.keys-issue-head h1 { font-size: 22px; color: #fff; margin: 0 0 4px; font-weight: 650; }
.keys-issue-head p { margin: 0; color: #d8dde4; font-size: 13px; }
.keys-issue-form {
  padding: 18px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.keys-field span,
.keys-sign-lab {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: #141c26;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.keys-field input[type="text"],
.keys-field input[type="number"],
.keys-field select,
.keys-file {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #f8fafc;
  color: #141c26;
  font-size: 15px;
}
.keys-file {
  position: relative;
  display: flex;
  align-items: center;
  color: #94a3b8;
}
.keys-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.keys-file-ph { pointer-events: none; }
.keys-file.has-file { color: #141c26; }
.keys-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: #141c26;
  font-size: 14px;
}
.keys-check input { accent-color: #141c26; width: 16px; height: 16px; }
.keys-sign-wrap { margin-top: 2px; }
.keys-sign-pad {
  position: relative;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
  min-height: 168px;
  overflow: hidden;
}
.keys-sign-canvas {
  display: block;
  width: 100%;
  height: 168px;
  touch-action: none;
  cursor: crosshair;
}
.keys-sign-hint {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}
.keys-sign-here {
  position: absolute;
  left: 16px;
  bottom: 10px;
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  pointer-events: none;
}
.keys-sign-pad.is-dirty .keys-sign-hint,
.keys-sign-pad.is-dirty .keys-sign-here { opacity: 0; }
.keys-issue-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.keys-issue-actions .btn-ghost {
  border-radius: 999px;
  padding: 8px 16px;
}
.keys-issue-foot {
  margin: 16px 20px 4px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.keys-asset-card .keys-issue-btn { display: inline-flex; }
.keys-desk .visually-hidden,
.keys-filter .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 860px) {
  .keys-same-grid { grid-template-columns: 1fr; }
  .keys-desk-head { flex-direction: column; }
}

/* —— K4 Receive-in / first custody (mock 01) —— */
.keys-recv {
  margin: 0 0 16px;
  padding: 14px 0 4px;
  border-top: 1px solid #eef1f4;
}
.keys-access-desk > .keys-recv,
.keys-access-desk .keys-recv {
  margin: 0;
  padding: 16px 20px 18px;
  border-top: 1px solid #eef1f4;
}
.keys-recv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.keys-recv-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.keys-recv-empty { margin: 0; font-size: 13px; }
.keys-recv-list { display: flex; flex-direction: column; gap: 10px; }
.keys-recv-event {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
  background: #f4f5f7;
  border: 1px solid #e2e5ea;
  border-radius: 6px;
  padding: 10px;
}
.keys-recv-thumb {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, #c5cad3 0%, #9aa3b0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}
.keys-recv-thumb img { width: 56px; height: 56px; object-fit: cover; display: block; }
.keys-recv-meta { font-size: 13px; color: #141c26; }
.keys-recv-meta strong { display: block; margin-bottom: 2px; font-weight: 650; }
.keys-recv-meta .row { color: #5c6570; font-size: 12px; }

/* —— K3 Site access pack (desk mock 01 + Field PWA mock 02) —— */
.keys-access-desk.card {
  padding: 0 0 12px;
  margin: 16px 0 14px;
  overflow: hidden;
  scroll-margin-top: 96px;
}
.keys-access-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 18px 20px 16px;
  background: #fff;
  border-bottom: 1px solid #eef1f4;
}
.keys-access-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.keys-access-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  color: #141c26;
  letter-spacing: -0.02em;
}
.keys-access-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.keys-access-pill {
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 650;
  background: #f1f5f9;
  color: #141c26;
  border: 1px solid #e2e8f0;
}
.keys-access-pill:hover { background: #e2e8f0; color: #141c26; }
.keys-access-sec {
  padding: 16px 20px 18px;
  border-top: 1px solid #eef1f4;
}
.keys-access-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.keys-access-sec-head h3,
.keys-access-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #141c26;
}
.keys-access-label { margin: 0 0 8px; color: #64748b; }
.keys-alarm-row,
.keys-video-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
}
.keys-alarm-code {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: .08em;
  color: #141c26;
}
.keys-access-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.keys-access-keys-note {
  margin: 0;
  color: #141c26;
  font-size: 15px;
}
.keys-access-steps {
  margin: 0;
  padding: 0 0 0 1.25em;
  color: #141c26;
  font-size: 15px;
  line-height: 1.45;
}
.keys-access-steps li + li { margin-top: 8px; }
.keys-access-empty { margin: 0; }
.keys-access-edit { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.keys-access-edit textarea,
.keys-access-edit input[type="text"] {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #f8fafc;
  color: #141c26;
  padding: 10px 14px;
  font-size: 15px;
}
.keys-access-edit textarea { min-height: 160px; resize: vertical; border-radius: 12px; }
.keys-access-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.keys-access-file { position: relative; display: inline-flex; }
.keys-access-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.keys-video-meta strong { display: block; color: #141c26; font-size: 15px; }
.keys-video-play { min-width: 108px; }
.keys-access-foot {
  margin: 4px 20px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.keys-video-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  width: min(720px, 96vw);
  background: #141c26;
  color: #fff;
}
.keys-video-dialog::backdrop { background: rgba(20, 28, 38, .55); }
.keys-video-dialog video { display: block; width: 100%; max-height: 70vh; background: #000; }
.keys-video-dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 0;
  background: rgba(255,255,255,.16);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
}

.keys-pwa { max-width: 390px; margin: 0 auto; padding: 0 0 24px; }
.keys-pwa-banner,
.keys-pwa-foot,
.keys-pwa-only {
  margin: 0 4px 10px;
  text-align: center;
  color: #8a929c;
  font-size: 12px;
}
.keys-pwa-foot { margin-top: 16px; }
.keys-pwa-only { text-align: left; margin: 10px 0 0; }
.keys-pwa-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px 16px;
  margin: 0 0 10px;
  box-shadow: 0 1px 2px rgba(20, 28, 38, .04);
}
.keys-pwa-card h2 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.keys-pwa-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #141c26;
}
.keys-pwa-card > p { margin: 0; color: #5c6570; font-size: 14px; }
.keys-pwa-alarm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
}
.keys-pwa-alarm strong {
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: .1em;
  color: #141c26;
}
.keys-pwa-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 12px;
  background: #f1f5f9;
  color: #141c26;
  font-size: 12px;
  font-weight: 650;
}
.keys-pwa-keys { font-size: 16px !important; color: #141c26 !important; font-weight: 650; }
.keys-pwa-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #141c26;
  color: #fff;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
}
.keys-pwa-play-ico {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  color: #141c26;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}
.keys-pwa-entry .m-card-kicker { color: #141c26; }
.keys-pwa-pick { max-width: 390px; margin: 0 auto; }
.keys-pwa-pick h1 { font-size: 22px; margin: 0 0 12px; color: #141c26; }
.keys-pwa-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 0 4px env(safe-area-inset-bottom, 0px);
  background: #141c26;
  color: rgba(255,255,255,.7);
}
.keys-pwa-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.keys-pwa-tab.on { color: #fff; }
.phone-app .m-main:has(.keys-pwa),
.phone-app .m-main:has(.keys-pwa-pick) { background: #f4f5f7; }

@media (max-width: 640px) {
  .keys-alarm-row,
  .keys-video-row { flex-direction: column; align-items: stretch; }
}

/* —— M3 Portrait photo (signed mock 03) —— */
.ob-guide-title {
  font-size: 16px;
  font-weight: 700;
  color: #141c26;
  margin: 0 0 6px;
}
.ob-ticks {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ob-ticks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #eef0f2;
  font-size: 15px;
  line-height: 1.4;
  color: #1a1f26;
}
.ob-ticks li:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}
.ob-tick {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ob-info {
  background: #fff6f4;
  border-left: 4px solid #BE1E2D;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 16px;
  color: #1a1f26;
  font-size: 14px;
  line-height: 1.45;
}
.ob-info p { margin: 0; }
.ob-saved { margin: 0 0 14px; }
.ob-saved-meta {
  margin: 8px 0 6px;
  font-size: 14px;
  font-weight: 650;
  color: #141c26;
}
.ob-preview,
.ob-preview-live {
  margin: 0 0 8px;
}
.ob-preview img,
.ob-preview-live img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  background: #f3f4f6;
}
.ob-drop {
  border: 1.5px dashed #c5cbd3;
  border-radius: 14px;
  padding: 28px 16px 24px;
  text-align: center;
  background: #fff;
  margin: 0 0 8px;
}
.ob-drop-ico {
  display: flex;
  justify-content: center;
  margin: 0 0 8px;
}
.ob-drop-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 16px;
  color: #141c26;
}
.ob-drop-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: #6b7280;
}
.ob-file-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ob-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  font-size: 14px;
  font-weight: 500;
  color: #1a1f26;
  cursor: pointer;
}
.ob-file-btn:hover { border-color: #141c26; background: #fff; }
.ob-file-name {
  font-size: 13px;
  color: #6b7280;
}
.ob-portrait-form .ob-actions { margin-top: 16px; }
.ob-portrait .banner { width: 100%; margin: 0 0 14px; }
.ob-app .ob-portrait .banner { width: 100%; }

/* —— M4 ID & clearances (portrait chrome + Details draft/submit) —— */
.ob-id-form .ob-actions { margin-top: 8px; }
.ob-id .banner { width: 100%; margin: 0 0 14px; }
.ob-app .ob-id .banner { width: 100%; }
.ob-slot-lab {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: middle;
}
.ob-slot-lab-required { color: #BE1E2D; }
.ob-slot-lab-soft,
.ob-slot-lab-conditional { color: #6b7280; }
.ob-id-slot .ob-drop { margin-top: 4px; }
.ob-saved-file {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 650;
}
.ob-saved-file a { color: #141c26; }
.ob-id-slot.is-err .ob-drop { border-color: #BE1E2D; }

/* —— M5 TFN & Super (same chrome as ID / Details / Portrait) —— */
.ob-tfn-form .ob-actions { margin-top: 8px; }
.ob-tfn .banner { width: 100%; margin: 0 0 14px; }
.ob-app .ob-tfn .banner { width: 100%; }
.ob-dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}
.ob-dl-row .ob-err { margin: 0; }

/* Thin onboarding published-documents desk (Staff) */
.pub-docs-list { display: grid; gap: 14px; }
.pub-docs-card h2 { margin: 0; font-size: 18px; color: #141c26; }
.pub-docs-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.pub-docs-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pub-docs-pill.is-on { background: #d1fae5; color: #047857; }
.pub-docs-pill.is-off { background: #fee2e2; color: #b91c1c; }
.pub-docs-missing { color: #BE1E2D; font-weight: 650; }
.pub-docs-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 8px;
}
.pub-docs-file { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 650; }

/* Asset face — site operating pack (CLEAR 15 Sep 2026). Navy #141c26. Long-scroll, no Sites tabs. */
.af-page { max-width: 1040px; }
.af-page .breadcrumb { margin: 0 0 10px; }
.af-page .settings-tabs,
.af-page .settings-chrome,
.af-page nav.settings-tabs { display: none !important; }
.af-page .af-access-k3 .keys-access-desk {
  margin: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}
.af-page .af-access-k3 .keys-access-head,
.af-page .af-access-k3 .keys-access-foot { display: none; }
.af-page .af-access-k3 .keys-access-sec { margin-top: 0; }
.af-map-chrome {
  position: relative;
  background: #141c26;
  border-radius: 8px;
  min-height: 168px;
  margin-bottom: 10px;
  overflow: hidden;
}
.af-map-chrome .af-map { height: 200px; margin: 0; background: #1a2330; }
.af-map-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  pointer-events: none;
  z-index: 1;
}
.af-map-chrome .leaflet-container ~ .af-map-label,
.af-map-chrome .azure-maps-control ~ .af-map-label,
.af-map-chrome.is-live .af-map-label { display: none; }
.af-block {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}
.af-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e5ea;
  background: #fafbfc;
}
.af-head h2 { font-size: 14px; font-weight: 650; margin: 0; color: #1a1f28; }
.af-body { padding: 14px 16px; }
.af-muted { color: #5c6570; font-size: 12px; }
.af-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px; padding: 7px 12px;
  font-size: 12px; font-weight: 650; font-family: inherit;
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.af-btn-sm { padding: 5px 10px; font-size: 11px; }
.af-btn-navy { background: #141c26; color: #fff; }
.af-btn-navy:hover { background: #0d131a; color: #fff; }
.af-btn-ghost { background: #f4f5f7; color: #1a1f28; border: 1px solid #e2e5ea; }
.af-btn-ghost:hover { background: #eef0f3; }
.af-name-input {
  width: 100%; padding: 10px 12px; border: 1px solid #e2e5ea; border-radius: 6px;
  font-size: 18px; font-weight: 700; background: #fff; color: #1a1f28;
}
.af-cascade {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 10px;
}
.af-box {
  background: #f4f5f7; border: 1px solid #e2e5ea; border-radius: 6px; padding: 10px;
  font-size: 14px;
}
.af-box strong {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: #5c6570; margin-bottom: 4px;
}
.af-box input {
  width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #e2e5ea;
  border-radius: 6px; font-size: 14px; background: #fff;
}
.af-map { height: 200px; border-radius: 8px; margin-bottom: 10px; }
.af-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.af-pill {
  font-size: 11px; font-weight: 650; background: #f4f5f7; border: 1px solid #e2e5ea;
  border-radius: 999px; padding: 4px 10px; color: #1a1f28;
}
.af-alarm {
  max-width: 160px; letter-spacing: .12em; font-weight: 700;
  padding: 10px 12px; border: 1px solid #e2e5ea; border-radius: 6px; font-size: 14px;
}
.af-table th { text-align: left; }
.af-table .af-tick, .af-tick { text-align: center; }
.af-tick-lab { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-right: 12px; }
.af-list { margin: 0; padding: 0 0 0 18px; }
.af-list li { margin: 6px 0; font-size: 13px; }
.af-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.af-add-form { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2e5ea; }
.af-add-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.af-inline { display: inline; }
.af-inline .af-btn { padding: 4px 8px; font-size: 11px; }
.af-rep-form {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr auto auto auto; gap: 8px; align-items: center;
}
.af-rep-form input[type="text"], .af-rep-form input:not([type]) {
  width: 100%; padding: 7px 8px; border: 1px solid #e2e5ea; border-radius: 6px; font-size: 13px;
}
.af-rep-edit { vertical-align: middle; }
.af-picker {
  border: 1px dashed #e2e5ea; border-radius: 8px; padding: 12px; background: #f4f5f7; margin-bottom: 12px;
}
.af-per-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; align-items: start; }
.af-cal { border: 1px solid #e2e5ea; border-radius: 8px; overflow: hidden; background: #f4f5f7; }
.af-cal-head {
  background: #141c26; color: #fff; padding: 8px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 650;
}
.af-cal-head .af-btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.af-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; padding: 8px;
  font-size: 11px; text-align: center;
}
.af-cal-day { padding: 4px 0; border-radius: 4px; }
.af-cal-day.is-today { background: #fff; border: 1px solid #141c26; font-weight: 700; }
.af-cal-day.has-due { background: #dfe6ef; }
.af-cal-note { padding: 0 8px 8px; }
.af-sow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.af-sow-copy { flex: 1; min-width: 200px; }
.af-sow-title { font-size: 14px; font-weight: 650; margin: 0 0 6px; }
.af-qr, .af-qr-img {
  width: 88px; height: 88px; border: 2px solid #141c26; background: #fff;
}
.af-qr {
  display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr);
  gap: 2px; padding: 6px;
}
.af-qr::before, .af-qr::after { content: ""; background: #141c26; }
.af-foot { text-align: center; font-size: 12px; color: #5c6570; margin: 8px 0 4px; }
.af-toggle-form { margin-bottom: 10px; }
.m-site .af-phone-pack { margin-top: 12px; }
.m-site .af-phone-pack h3 { margin: 0 0 6px; font-size: 15px; }
@media (max-width: 800px) {
  .af-cascade, .af-per-grid, .af-add-grid, .af-rep-form { grid-template-columns: 1fr; }
}

/* —— Schedules desk — same table family as Templates / Audits / Issues —— */
.sched-desk .page-head { align-items: flex-start; }
.sched-desk .lh-bar {
  margin-top: 0;
  background: #f4f5f7;
  border: 1px solid var(--line);
  border-bottom: 0;
}
.sched-desk .table-wrap {
  border: 1px solid var(--line);
  border-top: 0;
  overflow: visible;
}
.sched-work-table th {
  font-size: 13px; letter-spacing: 0; text-transform: none; color: #6b7280;
  background: #fff; font-weight: 600; padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.sched-work-table td { padding: 8px 12px; color: #111; border-bottom: 1px solid #eee; vertical-align: top; }
.sched-work-table tbody tr:hover { background: #f7f9fb; }
.sched-child-line a { font-weight: 650; }
.sched-child-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.chip-child-asset {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px;
  background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe;
}
.sched-dup-form { margin: 0; }
.sched-dup-btn {
  background: none; border: 0; padding: 0; color: var(--blue-d);
  font: inherit; font-weight: 650; cursor: pointer;
}
.sched-dup-btn:hover { text-decoration: underline; }
.sched-freq { display: flex; align-items: center; gap: 8px; }
.sched-freq input { max-width: 96px; }
.sched-hours-table select, .sched-hours-table input[type=time] {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line-2); background: #fff;
}
.sched-form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.sched-form-actions .btn-primary { margin-left: auto; }

.sched-asg-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 28, 38, .28);
  display: flex; justify-content: flex-end;
}
.sched-asg-panel {
  width: min(420px, 100%); background: #fff; height: 100%;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 24px rgba(20, 28, 38, .12);
}
.sched-asg-form { display: flex; flex-direction: column; height: 100%; }
.sched-asg-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px; border-bottom: 1px solid var(--line);
}
.sched-asg-head h2 { font-size: 20px; font-weight: 600; }
.sched-asg-x {
  border: 0; background: none; font-size: 22px; line-height: 1;
  color: #6b7280; text-decoration: none; padding: 0 4px;
}
.sched-asg-scroll { flex: 1; overflow: auto; padding: 14px 18px 8px; }
.sched-asg-h { font-size: 14px; margin: 14px 0 8px; }
.sched-asg-search {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2);
  margin-bottom: 10px; background: #fff;
}
.sched-asg-group { border: 1px solid var(--line); margin-bottom: 8px; background: #fff; }
.sched-asg-parent {
  list-style: none; cursor: pointer; padding: 8px 10px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: #f7f8fa;
}
.sched-asg-parent-name { font-weight: 650; }
.sched-asg-kids { padding: 4px 0; }
.sched-asg-leaf {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 12px; margin: 0; cursor: pointer;
}
.sched-asg-leaf:hover, .sched-asg-leaf:has(input:checked) { background: #e7f4fe; }
.sched-asg-leaf-lab { font-weight: 650; min-width: 80px; }
.sched-asg-extra { border-top: 0; margin-top: 16px; padding-top: 0; }
.sched-asg-extra .tpl-asg-row { grid-template-columns: 1fr; gap: 6px; }
.sched-asg-foot {
  padding: 12px 18px 16px; border-top: 1px solid var(--line);
  display: flex; gap: 8px; justify-content: flex-end;
}
