/* OM Office — brand tokens (04_BRAND_UI_GUIDE.md). Black and white; red is the single accent. */
:root {
  --ink: #000000; --paper: #FFFFFF; --grey: #F2F2F2; --line: #DCDCDC; --muted: #6E6E6E;
  --red: #E8402A; --red-hover: #C4331E; --red-tint: #FDECEA;
  --ok: #639922; --warn-f: #BA7517; --warn-t: #854F0B; --bad-f: #E24B4A; --bad-t: #A32D2D;
  font-family: 'Lexend', system-ui, sans-serif;
  color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.5; padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0); }
.wrap { max-width: 760px; margin: 0 auto; padding: 20px 20px 80px; }
.wrap.wide { max-width: 1080px; }
.wrap.narrow { max-width: 440px; }
a { color: var(--ink); }

/* Header */
header.top { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 28px; min-height: 44px; }
header.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
header.top img { height: 22px; width: auto; display: block; }
header.top .product { color: var(--muted); font-size: 14px; }
header.top .right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.usermenu { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.usermenu .who { color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; min-height: 0; font: inherit; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); text-decoration: underline; cursor: pointer; }
.linkbtn.danger { color: var(--red); }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 14px; min-height: 32px; }
.back:hover { color: var(--ink); }

/* Type */
h1 { font-size: 28px; font-weight: 700; margin: 0 0 6px; text-transform: lowercase; letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 700; margin: 0 0 12px; text-transform: lowercase; }
p.lead { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* Ticket card */
.ticket { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); padding: 20px; }
.ticket + .ticket, section + section { margin-top: 28px; }
.ticket.soft { background: var(--grey); border-color: var(--line); box-shadow: none; }

/* Forms */
.field { margin-bottom: 16px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=search], input[type=number], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink);
}
input.code { font-size: 24px; letter-spacing: 0.3em; text-align: center; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 4px 0 18px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 180px; margin-bottom: 0; }
.keyrow { display: flex; gap: 10px; flex-wrap: wrap; }
.keyrow input { flex: 1 1 260px; width: auto; }

/* Buttons */
button { font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 13px; border-radius: 4px; padding: 10px 16px; min-height: 44px; cursor: pointer; }
.btn-primary { background: var(--red); color: var(--paper); border: 1.5px solid var(--red); }
.btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn-secondary { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }
.btn-secondary:hover { background: var(--grey); }
.btn-small { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }
button[disabled] { opacity: 0.5; cursor: wait; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; align-items: center; }

/* Messages */
.error { background: var(--red-tint); border: 1.5px solid var(--red); color: var(--bad-t); border-radius: 4px; padding: 10px 12px; margin: 0 0 16px; }
.error ul { margin: 6px 0 0; padding-left: 18px; }
.notice { background: var(--grey); border-radius: 4px; padding: 10px 12px; margin: 0 0 16px; font-size: 14px; }
.notice.red { background: var(--red-tint); }
.hidden { display: none !important; }

/* Stamps (status) */
.stamp { display: inline-block; justify-self: start; align-self: start; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border: 1.5px solid currentColor; border-radius: 3px; transform: rotate(-4deg); white-space: nowrap; }
.stamp.pass { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.stamp.warn { color: var(--warn-t); border-color: var(--warn-f); }
.stamp.fail { color: var(--bad-t); border-color: var(--bad-f); }
.stamp.wait { color: var(--muted); border-style: dashed; }
.stamp.beta { color: var(--red); border-color: var(--red); }
.stamp.ink { color: var(--ink); }

/* Tags */
.tag { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--grey); border: 1px solid var(--ink); white-space: nowrap; }
.tag.black { background: var(--ink); color: var(--paper); }
.tag.red { background: var(--paper); border-color: var(--red); color: var(--red); }

/* Lists of items (sessions, authenticators) */
ul.items { list-style: none; margin: 0; padding: 0; }
ul.items li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
ul.items li:first-child { border-top: 0; padding-top: 0; }
ul.items .main { flex: 1 1 240px; min-width: 0; }
ul.items .title { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
ul.items .meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.empty { color: var(--muted); text-align: center; padding: 16px 0; }

/* Health list */
ul.checks { list-style: none; margin: 0; padding: 0; }
ul.checks li { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
ul.checks li:first-child { border-top: 0; padding-top: 4px; }
.check-name { font-weight: 600; }
.check-detail { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.check-fix { margin-top: 8px; background: var(--red-tint); padding: 8px 10px; border-radius: 4px; font-size: 14px; }
.check-fix.soft { background: var(--grey); }
.results { margin-top: 28px; }
.summary { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.summary h2 { margin: 0; }
.summary .when { color: var(--muted); font-size: 13px; }
.email-out { margin-top: 12px; font-size: 14px; }

/* QR enrolment */
.enrol { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.enrol img { width: 200px; height: 200px; border: 1.5px solid var(--ink); border-radius: 4px; image-rendering: pixelated; background: #fff; }
.secret { font-size: 15px; font-weight: 600; letter-spacing: 0.08em; overflow-wrap: anywhere; background: var(--grey); padding: 6px 8px; border-radius: 4px; display: inline-block; }
ol.steps { margin: 0 0 16px; padding-left: 20px; font-size: 14px; }
ol.steps li { margin-bottom: 4px; }

/* Home tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tile { display: block; text-decoration: none; color: inherit; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); padding: 16px; min-height: 96px; }
.tile:hover { box-shadow: 3px 3px 0 var(--red); border-color: var(--red); }
.tile .t-name { font-weight: 700; text-transform: lowercase; font-size: 18px; }
.tile .t-desc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tile.soon { border-color: var(--line); box-shadow: none; color: var(--muted); pointer-events: none; }

/* Audit table */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.filters .field { margin: 0; }
.tablewrap { overflow-x: auto; }
table.log { width: 100%; border-collapse: collapse; font-size: 14px; }
table.log th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
table.log td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.log td.when { white-space: nowrap; }
table.log .act { font-weight: 600; overflow-wrap: anywhere; }
table.log tr.detail td { background: var(--grey); }
pre.json { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 14px; font-size: 14px; }

/* Toast */
.tierbox { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.sugline { margin: 2px 0 6px; }
.tkamt { font-size: 22px; font-weight: 700; margin: 4px 0 0; }
.ok-text { color: var(--ok); font-weight: 600; }
.warn-text { color: var(--warn-t); }
.stalebar { position: sticky; top: 0; z-index: 20; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--ink); color: var(--paper); padding: 10px 16px; font-size: 14px; }
.stalebar button { flex: none; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 10; max-width: calc(100% - 32px); text-align: center; }

.holding { min-height: 50vh; display: grid; place-content: center; text-align: center; gap: 10px; }
.holding p { color: var(--muted); margin: 0; }

/* ---- drop 1.2: people, roles, settings, links ---- */
a.btn-primary, a.btn-secondary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 13px; border-radius: 4px; padding: 10px 16px; min-height: 44px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { min-height: 80px; resize: vertical; }
input[type=number] { max-width: 120px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar select { flex: 0 1 200px; }
.stamp.s-active { color: var(--ink); }
.stamp.s-invited { color: var(--warn-t); border-color: var(--warn-f); }
.stamp.s-disabled { color: var(--muted); border-style: dashed; }
.stamp.s-retired { color: var(--muted); border-style: dashed; }

/* Role chips (checkboxes that look like tags) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip > span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--paper); }
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.chip .lock { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.65; }

/* Modal (native <dialog>) */
dialog.modal { border: 2px solid var(--ink); border-radius: 6px; padding: 0; width: min(640px, calc(100% - 24px)); max-height: calc(100% - 24px); color: var(--ink); }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog.modal .m-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 1; }
dialog.modal .m-head h2 { margin: 0; flex: 1; }
dialog.modal .m-close { background: none; border: 0; font-size: 26px; line-height: 1; padding: 4px 8px; min-height: 0; cursor: pointer; }
dialog.modal .m-body { padding: 20px; }
dialog.modal .row, .ticket form .row, form.ticket .row { align-items: flex-start; margin-bottom: 16px; }
dialog.modal .row > button, .ticket form .row > button, form.ticket .row > button { align-self: flex-end; }
dialog.modal .m-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); }
dialog.modal .m-foot .spacer { flex: 1; }
.danger-zone { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 14px; }

/* People list */
ul.items .person-roles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
ul.items li.clickable { cursor: pointer; }
ul.items li.clickable:hover .title { text-decoration: underline; }

/* Permission grid */
.gridwrap { overflow: auto; max-height: 75vh; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); }
table.grid { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: 8px 10px; background: var(--paper); }
table.grid thead th { position: sticky; top: 0; z-index: 2; border-bottom: 1.5px solid var(--ink); vertical-align: bottom; text-align: center; font-weight: 600; min-width: 92px; }
table.grid thead th.retired { color: var(--muted); }
table.grid th.perm { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 400; min-width: 220px; max-width: 280px; border-right: 1px solid var(--line); }
table.grid thead th.perm { z-index: 3; }
table.grid tr.mod th { background: var(--grey); text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); position: sticky; left: 0; }
table.grid td { text-align: center; }
table.grid td input { width: 20px; height: 20px; accent-color: var(--ink); cursor: pointer; }
table.grid td.rule { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
table.grid .key { display: block; color: var(--muted); font-size: 11px; }
table.grid .rolehead { display: grid; gap: 4px; justify-items: center; }
table.grid .rolehead .n { font-size: 11px; color: var(--muted); font-weight: 400; }

/* Settings rows */
.setrow { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.setrow:first-child { border-top: 0; padding-top: 0; }
.setrow .main { flex: 1 1 240px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--ink); }
.mailbox .head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.mailbox .head .name { font-weight: 700; font-size: 16px; }
.mailbox + .mailbox { margin-top: 20px; }
details.mailbox > summary { list-style: none; cursor: pointer; }
details.mailbox > summary::-webkit-details-marker { display: none; }
details.mailbox > summary .head { margin-bottom: 0; }
details.mailbox[open] > summary .head { margin-bottom: 12px; }
details.mailbox > summary .head::after { content: 'Set up'; margin-left: auto; font-size: 13px; text-decoration: underline; }
details.mailbox[open] > summary .head::after { content: 'Close'; }
.testblock { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.enrol a.btn-secondary { margin: 4px 0 12px; }
section.reset { border-top: 1px solid var(--line); padding-top: 28px; }

@media (max-width: 560px) {
  dialog.modal { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; margin: 0; }
  h1 { font-size: 24px; }
  ul.checks li { grid-template-columns: 1fr; gap: 6px; }
  .enrol { grid-template-columns: 1fr; }
  .usermenu .who { display: none; }
  table.log .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- drop 1.3: module menu, home, projects, my details, settings sections, PWA ---- */
header.top { flex-wrap: wrap; }
.modnav { order: 3; flex-basis: 100%; display: flex; gap: 22px; margin: 6px 0 -19px; overflow-x: auto; scrollbar-width: none; }
.modnav::-webkit-scrollbar { display: none; }
.modnav a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 0 9px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 40px; }
.modnav a svg { width: 17px; height: 17px; flex: none; }
.modnav a:hover { color: var(--ink); }
.modnav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.modnav .short { display: none; }

@media (max-width: 720px) {
  .modnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; gap: 0; justify-content: space-around; background: var(--paper); border-top: 1.5px solid var(--ink); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0)); overflow: visible; }
  .modnav a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 10px; letter-spacing: 0.04em; border-bottom: 0; min-height: 52px; justify-content: center; }
  .modnav a svg { width: 22px; height: 22px; }
  .modnav a.active { color: var(--ink); }
  .modnav a.active svg { stroke-width: 2.4; }
  .modnav a.active .short { border-bottom: 2px solid var(--ink); }
  .modnav .full { display: none; }
  .modnav .short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  body.has-nav .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0)); }
  body.has-nav .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0)); }
}

/* Home */
.home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home-head .today { color: var(--muted); font-size: 13px; }
.tile .t-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile .t-icon svg { width: 24px; height: 24px; display: block; }
.tile .t-name { margin-top: 10px; }
.tile .stamp { font-size: 10px; }
.tile.module.waiting { border-color: var(--ink); }
.tiles + h2, .tiles + .label { margin-top: 32px; }
.home-group { margin-top: 32px; }
.install { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.install .main { flex: 1 1 260px; }
.install .main strong { display: block; }
.install ol { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }

/* Module holding page */
ul.can { margin: 0; padding-left: 18px; }
ul.can li { margin-bottom: 4px; }

/* Definition list (my details, storage) */
dl.facts { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 10px 16px; margin: 0; }
dl.facts dt { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.phone-edit { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.phone-edit input { flex: 1 1 200px; width: auto; }

/* Settings section index */
.secnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.secnav a { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; }
.secnav a:hover { background: var(--grey); }
section[id] { scroll-margin-top: 16px; }
.keystate { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.backend { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.backend:first-child { border-top: 0; padding-top: 0; }
.backend .main { flex: 1 1 260px; min-width: 0; }

/* Projects */
ul.items .code { font-variant-numeric: tabular-nums; }
ul.items li.closed .title { color: var(--muted); }

@media (max-width: 560px) {
  dl.facts { grid-template-columns: 1fr; gap: 2px 0; }
  dl.facts dd { margin-bottom: 10px; }
}
input[type=tel] { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink); }
.phone-edit .phone-label { flex-basis: 100%; margin: 16px 0 0; }

/* ---- drop 2: Site Punch ---- */
.subtabs { display: flex; gap: 22px; margin: 4px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs a { padding: 8px 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
.center { text-align: center; }
.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
ul.items .tags { margin-top: 6px; }
.stamp.ptype { font-size: 10px; min-width: 38px; text-align: center; }

/* IN / OUT segmented control */
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); overflow: hidden; margin: 6px 0 20px; }
.seg-btn { border: 0; border-radius: 0; background: var(--paper); color: var(--ink); min-height: 56px; font-size: 18px; letter-spacing: 0.1em; }
.seg-btn + .seg-btn { border-left: 1.5px solid var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Site suggestions */
.sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.sugg-label { flex-basis: 100%; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.chip-s { display: inline-flex; gap: 6px; align-items: baseline; min-height: 36px; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.chip-s small { color: var(--muted); font-size: 11px; }
.chip-s:hover { background: var(--grey); }
.linked { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* Camera */
.cam { margin: 4px 0 14px; }
.cam-empty { border: 1.5px dashed var(--ink); border-radius: 4px; padding: 16px; text-align: center; }
.cam-empty p { margin: 10px 0 0; }
/* Live drop 1.0: full-screen camera (above the phone tab bar); the preview shows the whole frame that is captured. */
.cam-live { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: #000; }
.cam-live.hidden { display: none; }
.cam-live video { display: block; flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cam-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0)) 16px 10px; background: rgba(0,0,0,0.75); color: var(--paper); }
.cam-top .linkbtn { color: var(--paper); font-size: 16px; }
.cam-gps { flex: 1; text-align: right; font-size: 13px; color: #D8D8D8; }
.cam-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px calc(20px + env(safe-area-inset-bottom, 0)); background: rgba(0,0,0,0.75); }
.cam-bar .linkbtn { color: var(--paper); }
.cam-spacer { width: 52px; }
body.cam-open { overflow: hidden; }
.shutter { width: 72px; height: 72px; min-height: 0; padding: 0; border-radius: 50%; border: 4px solid var(--paper); background: var(--red); box-shadow: 0 0 0 2px #000; }
.shutter:active { transform: scale(0.94); }
.cam-shot img { display: block; width: 100%; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); }
.cam-shot .actions { margin-top: 10px; }

/* GPS status */
.gps { font-size: 14px; margin: 0 0 16px; min-height: 22px; }
.gps.ok, .gps.warn, .gps.bad { padding: 10px 12px; border-radius: 4px; }
.gps.ok { background: var(--grey); }
.gps.warn { background: var(--grey); border-left: 4px solid var(--warn-f); }
.gps.bad { background: var(--red-tint); border-left: 4px solid var(--red); }
.gps .actions { margin-top: 8px; }
.punch-go { min-height: 56px; font-size: 16px; margin-top: 4px; }
#goHint { margin: 8px 0 0; }
.ticket.done { margin: 20px 0 8px; display: grid; gap: 6px; }
.done-line { font-weight: 700; font-size: 16px; }
#vPunch > section { margin-top: 28px; }

/* Lists and tables */
.day + .day { margin-top: 22px; }
.day .label { margin-bottom: 10px; }
.photo-box { margin-bottom: 18px; }
.photo-box img { display: block; width: 100%; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--grey); min-height: 120px; }
#vAll .filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
#vAll .filters input[type=date] { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink); }
input[type=month] { font: inherit; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink); }
.flagcheck { align-self: center; margin: 0; }
.exportbar { margin-bottom: 10px; }
table.log tr.clickable { cursor: pointer; }
table.log tr.clickable:hover td { background: var(--grey); }
table.log td .tag { margin-left: 6px; }
@media (max-width: 720px) {
  table.punchtable thead { display: none; }
  table.punchtable, table.punchtable tbody, table.punchtable tr, table.punchtable td { display: block; width: 100%; }
  table.punchtable tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.punchtable td { border: 0; padding: 2px 0; }
  table.punchtable td.when { font-weight: 600; }
}

/* ---------- KPI (drop 3.1) ---------- */
.monthbar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.monthbar .field { margin-bottom: 0; flex: 0 1 240px; }
.monthstate { display: flex; gap: 10px; align-items: center; min-height: 44px; }
ul.items li .right { display: flex; gap: 12px; align-items: center; }
.kscore { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin: 12px 0 18px; }
.detail-head h2 { margin: 0; }
.scorers { display: flex; gap: 6px; flex-wrap: wrap; }
.sheet-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 14px; }
.sheet-head .linkbtn { margin-left: auto; }
.crit { padding: 14px 0; border-top: 1px solid var(--line); }
.crit:first-child { border-top: 0; padding-top: 0; }
.chead { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.chead > div { flex: 1; min-width: 0; }
.cpts { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scale { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.sbtn { min-height: 44px; padding: 0; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); font-variant-numeric: tabular-nums; }
.sbtn:hover { border-color: var(--ink); }
.sbtn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sbtn:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.guide { font-size: 13px; color: var(--muted); margin: 8px 0 0; padding: 8px 10px; background: var(--grey); border-radius: 4px; }
.sheet-foot { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-top: 1.5px solid var(--ink); padding-top: 14px; }
.sheet-foot .actions { margin-top: 0; }
.livetotal { display: flex; align-items: baseline; gap: 8px; }
.livetotal .label { margin: 0; }
.livetotal .num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.scorebox { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 4px 0 18px; }
.scorebox .big { display: flex; align-items: baseline; gap: 6px; }
.scorebox .n { font-size: 52px; font-weight: 700; line-height: 1; color: var(--red); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.scorebox .of { font-size: 15px; color: var(--muted); }
.scorebox .side { display: grid; gap: 8px; justify-items: end; text-align: right; }
.kblock { margin-top: 18px; }
.kblock p { margin: 0; padding: 12px 14px; background: var(--grey); border-radius: 4px; white-space: pre-line; }
.kblock.none p { color: var(--muted); }
.kblock.note p { background: var(--paper); border: 1.5px solid var(--ink); }
.kresult { padding-top: 16px; }
table.log.breakdown { margin-top: 4px; }
table.log th.num, table.log td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.log.breakdown tfoot td { font-weight: 700; border-top: 1.5px solid var(--ink); border-bottom: 0; }
details.ticket.month { padding: 0; }
details.ticket.month + details.ticket.month { margin-top: 16px; }
details.ticket.month summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; }
details.ticket.month summary::-webkit-details-marker { display: none; }
details.ticket.month summary .mname { font-weight: 700; flex: 1; text-transform: lowercase; }
details.ticket.month summary .mscore { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
details.ticket.month[open] summary { border-bottom: 1px solid var(--line); }
details.ticket.month > .kresult { padding: 16px 20px 20px; }
.lockbox { margin-bottom: 20px; }
.lockline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.rowacts { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.sheetview { margin-bottom: 16px; }
.sheetview p { margin: 8px 0 0; }
dl.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 8px; margin: 0 0 18px; }
dl.glance dt { grid-row: 2; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px; background: var(--grey); }
dl.glance dd { grid-row: 1; margin: 0; padding: 10px 12px 0; font-size: 22px; font-weight: 700; background: var(--grey); font-variant-numeric: tabular-nums; }
table.kpitable td { vertical-align: middle; }
table.kpitable td.strong { font-weight: 700; }
table.kpitable td.bad { color: var(--bad-t); }
table.kpitable td.acts { white-space: nowrap; text-align: right; }
table.kpitable td.acts .linkbtn + .linkbtn { margin-left: 12px; }
.show-sm { display: none; }
.rolecard + .rolecard { margin-top: 20px; }
.rolecard.retired { opacity: 0.7; }
.role-head { display: flex; gap: 12px; align-items: flex-end; }
.role-head .field { flex: 1; }
.critrow { padding: 12px 0; border-top: 1px solid var(--line); }
.cr-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cr-top input[data-n] { flex: 1; min-width: 0; }
.wbox { display: flex; align-items: center; gap: 4px; flex: 0 0 96px; }
.wbox input { width: 70px; text-align: right; }
.wtotal { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wtotal.bad { color: var(--red); }
.mapgrid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin: 4px 0 18px; }
.mapcell { display: grid; gap: 4px; justify-items: center; font-size: 12px; }
.mapcell .sc { font-weight: 700; font-size: 14px; }
.mapcell input { text-align: center; padding-left: 2px; padding-right: 2px; }
.mapcell .pc { color: var(--muted); }
.addmonth { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.addmonth .field { flex: 0 1 220px; }
.sigpreview img { max-width: 260px; max-height: 110px; display: block; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
label.filebtn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 4px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; }
label.filebtn:focus-within { outline: 2px solid var(--red); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pick select { min-width: 190px; }
@media (max-width: 720px) {
  .scale { grid-template-columns: repeat(5, 1fr); }
  .mapgrid { grid-template-columns: repeat(5, 1fr); }
  dl.glance { grid-template-columns: repeat(2, 1fr); }
  dl.glance { row-gap: 0; }
  dl.glance dd:nth-of-type(n+3) { margin-top: 8px; }
  dl.glance dt:nth-of-type(n+3) { grid-row: 4; }
  dl.glance dd:nth-of-type(n+3) { grid-row: 3; }
  .scorebox .n { font-size: 44px; }
  .pick, .pick select { width: 100%; }
}
@media (max-width: 560px) {
  .show-sm { display: block; }
  table.kpitable td, table.kpitable th { padding: 8px 6px; }
  table.log.breakdown { font-size: 13px; }
  table.log.breakdown th, table.log.breakdown td { padding: 8px 5px; }
  table.log.breakdown th:first-child, table.log.breakdown td:first-child { padding-left: 0; }
  table.log.breakdown th:last-child, table.log.breakdown td:last-child { padding-right: 0; }
  details.ticket.month summary { padding: 14px 16px; }
  details.ticket.month > .kresult { padding: 14px 16px 16px; }
}
a.btn-small { min-height: 34px; padding: 6px 12px; font-size: 12px; }
p.ok { color: #3E6B12; font-weight: 600; }
p.bad { color: var(--bad-t); font-weight: 600; }

/* ---------- Bell + push (drop 3.1) ---------- */
.usermenu .bell { position: relative; background: none; border: 0; padding: 4px; min-height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-transform: none; letter-spacing: 0; }
.usermenu .bell:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; border-radius: 4px; }
.bell-n { position: absolute; top: 0; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: var(--paper); font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }
.bellpanel { position: fixed; top: 64px; right: max(16px, calc((100vw - 760px) / 2)); width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); padding: 14px 16px; z-index: 60; }
.bp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bp-list { list-style: none; margin: 0; padding: 0; }
.bp-list li { border-top: 1px solid var(--line); }
.bp-list li:first-child { border-top: 0; }
.bp-list button { display: grid; gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 0 10px 14px; min-height: 0; font: inherit; text-transform: none; letter-spacing: 0; color: var(--ink); cursor: pointer; position: relative; }
.bp-list li.unread button::before { content: ''; position: absolute; left: 0; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.bp-list .t { font-weight: 600; font-size: 14px; }
.bp-list li.read .t { font-weight: 400; }
.bp-list .b { font-size: 13px; color: var(--muted); }
.bp-list .w { font-size: 12px; color: var(--muted); }
.bp-foot { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pushcard { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pushcard span { flex: 1 1 200px; }
@media (max-width: 720px) { .bellpanel { top: 56px; right: 16px; } }

/* ---------- Claims (drop 4.1) ---------- */
/* Stage stamps (04_BRAND_UI_GUIDE §5): shapes differ so stages read without colour. */
.stamp.c-awaiting { color: #854F0B; border-color: #BA7517; }
.stamp.c-verified { color: #185FA5; border-color: #378ADD; }
.stamp.c-approved { color: #534AB7; border: 3px double #7F77DD; }
.stamp.c-processing { color: #0F6E56; border-color: #1D9E75; border-style: dashed; }
.stamp.c-paid { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.stamp.c-rejected { color: var(--bad-t); border-color: var(--bad-f); }
.pickrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pickbtn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 4px; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; text-align: center; padding: 8px 12px; }
.pickbtn.primary { background: var(--red); color: var(--paper); border: 1.5px solid var(--red); }
.pickbtn.secondary { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }
.pickbtn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pickbtn:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.dropzone { border: 1.5px dashed var(--ink); border-radius: 4px; padding: 26px 16px; text-align: center; transition: background 0.15s; }
.dropzone.over { background: var(--red-tint); border-color: var(--red); }
.dropzone p { margin: 0 0 12px; }
.dropzone .pickbtn { display: inline-flex; width: auto; }
.drafts { display: grid; gap: 22px; margin-top: 24px; }
.draft { position: relative; }
.draft .x { position: absolute; top: 10px; right: 10px; background: none; border: 0; min-height: 36px; min-width: 36px; padding: 4px; font-size: 20px; line-height: 1; color: var(--ink); text-transform: none; }
.draft .no { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.pages { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding-right: 30px; }
.pthumb { position: relative; width: 72px; height: 92px; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; background: var(--grey); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; text-align: center; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb .pn { position: absolute; left: 3px; bottom: 3px; background: var(--ink); color: var(--paper); font-size: 10px; padding: 0 5px; border-radius: 3px; }
.pthumb .px { position: absolute; top: 2px; right: 2px; min-height: 22px; min-width: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--ink); background: var(--paper); font-size: 13px; line-height: 1; text-transform: none; }
.addpage { width: 72px; height: 92px; border: 1.5px dashed var(--ink); border-radius: 4px; background: var(--paper); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px; min-height: 0; }
.scan { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 12px; flex-wrap: wrap; }
.scan.err { color: var(--bad-t); }
.scan.ok { color: var(--muted); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: omspin 0.8s linear infinite; flex: none; }
@keyframes omspin { to { transform: rotate(360deg); } }
.seg.small { margin: 4px 0 6px; box-shadow: none; }
.seg.small .seg-btn { min-height: 44px; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: 1.1fr 1fr 1.1fr; gap: 0 12px; }
.claims-page input[type=date] { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink); }
.claims-page input[type=number] { max-width: none; }
.dupbox label { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-weight: 600; cursor: pointer; }
.dupbox input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.submitbar { position: sticky; bottom: 0; background: var(--paper); padding: 14px 0 calc(10px + env(safe-area-inset-bottom, 0)); margin-top: 20px; border-top: 1px solid var(--line); z-index: 5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.stat { border: 1.5px solid var(--ink); border-radius: 4px; padding: 12px; }
.stat .k { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .h { font-size: 12px; color: var(--muted); }
ul.items.claims li .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
ul.items.claims li .right { display: grid; justify-items: end; gap: 6px; }
.list-title { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.cfacts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; margin: 14px 0; }
.cfacts dt { color: var(--muted); }
.cfacts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.cfiles { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.cfiles a { text-decoration: none; color: inherit; }
.hist { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.hist li { padding: 8px 0; border-top: 1px solid var(--line); }
.hist li:first-child { border-top: 0; }
.hist .w { color: var(--muted); }
.hist .chg { color: var(--muted); overflow-wrap: anywhere; }
.catrow { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.catrow:first-child { border-top: 0; }
.catrow .nm { flex: 1 1 200px; min-width: 0; }
.catrow .nm input { min-height: 38px; padding: 6px 10px; }
.numrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
@media (max-width: 560px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: span 2; }
  .stat .v { font-size: 18px; }
}
.actions .grow-field { flex: 1 1 220px; margin: 0; }
.catrow .tag { flex: none; }
.ctitle { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
/* Phones: the module bar is fixed at the bottom (about 62px), so the Submit bar sits just above it. */
@media (max-width: 720px) {
  body:has(.modnav) .submitbar { bottom: calc(62px + env(safe-area-inset-bottom, 0)); padding-bottom: 10px; }
}
/* Ledger (drop 4.2): stage cards (brand guide §5 option A: 5px colour bar, numbers black). */
.gcards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 12px; }
.gcard { display: grid; gap: 2px; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-top: 5px solid var(--line); border-radius: 4px; padding: 8px 10px; min-height: 0; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); cursor: pointer; }
.gcard.on { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.gcard .gl { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.gcard .gn { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gcard .gs { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gcard.g-awaiting { border-top-color: #BA7517; } .gcard.g-verified { border-top-color: #378ADD; } .gcard.g-approved { border-top-color: #7F77DD; }
.gcard.g-processing { border-top-color: #1D9E75; } .gcard.g-paid { border-top-color: #639922; } .gcard.g-rejected { border-top-color: #E24B4A; }
.chip-s.on { background: var(--ink); color: var(--paper); }
#lstages { margin: 0 0 16px; }
.ltools { margin-top: 4px; }
.bulkbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; }
.bulkbar .selall { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.bulkbar #bulkCount { flex: 1 1 auto; }
.bulkbar .retcount { flex: 1 1 auto; } /* live 1.5: return ticked claims from a report */
.bulkbar .error { flex-basis: 100%; margin: 0; }
.bulkbar input, ul.items.ledger input.pick { width: 20px; height: 20px; accent-color: var(--ink); margin: 2px 0 0; flex: none; }
ul.items.ledger li { flex-wrap: nowrap; }
ul.items.ledger .pick-gap { width: 20px; flex: none; }
ul.items.ledger li .main { flex: 1 1 auto; }
.ledgeracts { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.ledgeracts .row { margin-bottom: 4px; }
@media (max-width: 720px) {
  .gcards { grid-template-columns: repeat(3, 1fr); }
  .gcard .gn { font-size: 17px; }
}
@media (max-width: 560px) {
  ul.items.ledger li { flex-wrap: wrap; }
  ul.items.ledger li .right { flex-basis: 100%; grid-auto-flow: column; justify-content: space-between; align-items: center; padding-left: 32px; }
}
/* Reports (drop 4.3) */
#candidates { margin: 6px 0 22px; }
#candidates .ticket + .ticket { margin-top: 18px; }
.cand ul.items li { flex-wrap: nowrap; align-items: center; }
.cand ul.items input.pick { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.cand .actions strong { font-variant-numeric: tabular-nums; }
.payrow { width: 100%; align-items: flex-end; }
.payrow .field { flex: 1 1 220px; margin: 0; }
/* ---------- Leave (drop 5.1) ---------- */
/* Status stamps (leave_DESIGN §3): Pending amber outline, Approved solid green, Rejected red outline,
   Cancelled grey outline; Cancel requested amber dashed. */
.stamp.l-pending { color: var(--warn-t); border-color: var(--warn-f); }
.stamp.l-approved { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.stamp.l-rejected { color: var(--bad-t); border-color: var(--bad-f); }
.stamp.l-cancelled { color: var(--muted); border-color: var(--line); }
.stamp.l-cancel_requested { color: var(--warn-t); border-color: var(--warn-f); border-style: dashed; }
.leave-go { margin: 0 0 6px; }
a.pickbtn { text-decoration: none; }
.lbal { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.lstat .v small { font-size: 12px; font-weight: 400; color: var(--muted); }
.lstat .v.none { font-size: 16px; color: var(--muted); }
.ltypes { margin: 2px 0 16px; }
.calhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 10px; }
.calhead strong { font-size: 16px; }
.calhead button { min-width: 44px; font-size: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 2px 0; }
.cday { position: relative; min-height: 44px; padding: 0; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); font-variant-numeric: tabular-nums; }
.cday:hover:not([disabled]) { border-color: var(--ink); }
.cday.off { background: var(--grey); color: var(--muted); border-color: var(--grey); }
.cday.hol { background: var(--red-tint); color: var(--bad-t); border-color: var(--red-tint); }
.cday i { position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.cday.block, .cday[disabled] { opacity: 0.35; cursor: not-allowed; }
.cday.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cday.sel.off, .cday.sel.hol { background: #5A5A5A; border-color: #5A5A5A; color: var(--paper); }
.cday.today { box-shadow: inset 0 0 0 2px var(--red); }
.calkey { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); margin: 6px 0 14px; }
.calkey span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; }
.calkey span:first-child { margin-left: 0; }
.calkey .k-off { background: var(--grey); border: 1px solid var(--line); }
.calkey .k-hol { background: var(--red-tint); }
.calkey .k-block { background: var(--line); opacity: 0.5; }
.lcount { margin: 16px 0; }
.lsum { display: flex; gap: 16px; align-items: center; border: 1.5px solid var(--ink); border-radius: 4px; padding: 12px 14px; margin-bottom: 10px; }
.lsum .big { font-size: 26px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lsum .side { font-size: 14px; display: grid; gap: 2px; }
.lsum .neg { color: var(--bad-t); font-weight: 600; }
.leave-page input[type=date] { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink); }
.leave-page input[disabled], .leave-page select[disabled] { background: var(--grey); border-color: var(--line); color: var(--muted); }
.leave-page .seg.small { margin-bottom: 16px; }
.leave-page .seg.small .seg-btn { font-size: 12px; }
.ldetail .kblock p { background: none; padding: 0; margin: 0 0 8px; }
.entrow { padding: 14px 0; border-top: 1px solid var(--line); }
.entrow:first-of-type { border-top: 0; }
.entgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 12px; align-items: end; margin-top: 10px; }
.entgrid .field { margin-bottom: 8px; }
.entrow .actions { margin-top: 4px; }
.adjrow { margin-bottom: 14px; }
.adjrow .field.grow { flex: 2 1 240px; }
.adjrow button { flex: none; }
@media (max-width: 560px) {
  .cal { gap: 3px; }
  .cday { min-height: 42px; font-size: 13px; }
  .lsum { flex-wrap: wrap; gap: 6px 14px; }
}
/* Leave approvals + team calendar (drop 5.2) */
.lglance { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.lglance .gcard { cursor: default; }
.acards { display: grid; gap: 22px; }
.acard.urgent { border-color: var(--red); box-shadow: 3px 3px 0 var(--red); }
.acard .detail-head { margin: 0 0 10px; align-items: flex-start; }
.aflags { margin: 0 0 6px; }
.acard .cfacts dd.neg, .neg { color: var(--bad-t); font-weight: 600; }
.acard .actions { margin-top: 12px; }
.tcalhead { max-width: 360px; }
.tcalwrap { border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); }
.tcal { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.tcal th, .tcal td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; padding: 0; }
.tcal thead th { position: sticky; top: 0; background: var(--paper); font-weight: 600; min-width: 30px; height: 40px; z-index: 1; }
.tcal thead th .dn { display: block; font-size: 12px; }
.tcal thead th .dw { display: block; font-size: 9px; color: var(--muted); letter-spacing: 0.06em; }
.tcal thead th.we .dn { color: var(--muted); }
.tcal thead th.today { box-shadow: inset 0 -3px 0 var(--red); }
.tcal th.who { position: sticky; left: 0; background: var(--paper); text-align: left; padding: 0 10px; min-width: 120px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; z-index: 2; }
.tcal thead th.who { z-index: 3; color: var(--muted); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.tcal tr.me th.who { color: var(--red); }
.tcal td.c { height: 34px; min-width: 30px; font-size: 9px; font-weight: 700; letter-spacing: 0.02em; }
.tcal td.off { background: var(--grey); }
.tcal td.hol { background: var(--red-tint); }
.tcal td.lv.appr { background: var(--ink); color: var(--paper); }
.tcal td.lv.pend { background: repeating-linear-gradient(135deg, var(--paper) 0 4px, #F4E3C8 4px 8px); color: var(--warn-t); box-shadow: inset 0 0 0 1.5px var(--warn-f); }
.tcal td.lv.half.appr { background: linear-gradient(135deg, var(--ink) 50%, var(--paper) 50%); color: var(--paper); }
.tcal td.today { box-shadow: inset 2px 0 0 var(--red), inset -2px 0 0 var(--red); }
.calkey .k-appr { background: var(--ink); }
.calkey .k-pend { background: repeating-linear-gradient(135deg, var(--paper) 0 3px, #F4E3C8 3px 6px); border: 1px solid var(--warn-f); }
@media (max-width: 720px) { .lglance { grid-template-columns: repeat(2, 1fr); } }
.calkey i.kk { font-style: normal; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; }
.calkey i.kk span { margin-left: 0; }
/* Leave records, holidays, settings (drop 5.3) */
.leave-admin .toolbar { flex-wrap: wrap; align-items: center; gap: 10px; }
.leave-admin .toolbar select, .leave-admin .toolbar input[type=month] { width: auto; min-width: 140px; }
.leave-admin input[type=month] { font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink); }
.ltable { border-collapse: collapse; width: 100%; font-size: 13px; }
.ltable th { text-align: left; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.ltable td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ltable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ltable td strong { font-size: 15px; }
.rowacts { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-top: 6px; }
.rowform { flex-basis: 100%; width: 100%; margin-top: 8px; }
.rowform .row { align-items: flex-end; gap: 0 12px; }
.rowform .row .field.grow { flex: 2 1 220px; }
.rowform .row > button { margin-bottom: 18px; }
.items li.retired .title, .items li.retired .meta { opacity: 0.55; }
.swlist { display: grid; gap: 6px; margin: 12px 0; }
.swlist.cols { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.items.hol .tag.red { margin-left: 6px; }
/* Directors away (drop 5.3.1) */
.tcal td.lv.away { background: var(--red); color: var(--paper); }
.tcal td.lv.half.away { background: linear-gradient(135deg, var(--red) 50%, var(--paper) 50%); }
.calkey .k-away { background: var(--red); }
#awayBox { margin-top: 22px; }
.awayform { margin: 4px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.awayform .row { gap: 0 12px; }

/* ---- drop 6.1: CRM pipeline board, lead panel ---- */
dialog.modal.wide { width: min(880px, calc(100% - 24px)); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-page .glance { margin-top: 14px; }
.kanban { display: flex; gap: 12px; overflow-x: auto; padding: 4px 3px 16px; align-items: flex-start; scroll-snap-type: x proximity; }
.kanban > .kcol { margin-top: 0; }
.kcol { flex: 0 0 248px; background: var(--grey); border-radius: 4px; padding: 10px; scroll-snap-align: start; min-height: 120px; }
.kcol.over { outline: 2px dashed var(--red); outline-offset: -2px; }
.kcol.won .khead span:first-child::after { content: ' ✓'; color: var(--ok); }
.kcol.lost { background: #F8F8F8; }
.khead { display: flex; gap: 8px; align-items: baseline; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 2px 10px; }
.khead span:first-child { flex: 1; }
.kbody { display: grid; gap: 8px; }
.kempty { color: var(--muted); text-align: center; padding: 8px 0; }
button.kcard { display: grid; gap: 4px; width: 100%; min-height: 0; text-align: left; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 2px 2px 0 var(--ink); padding: 10px; cursor: pointer; }
button.kcard:hover { background: #FAFAFA; }
button.kcard.late { border-color: var(--red); box-shadow: 2px 2px 0 var(--red); }
button.kcard.dragging { opacity: 0.4; }
.kcard .kname { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.kcard .kmeta { color: var(--muted); font-size: 12px; }
.kcard .kfoot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.crm-page section + section:not(.kcol) { margin-top: 22px; }
.crm-page .keyrow select { flex: 1 1 160px; width: auto; }
@media (max-width: 640px) { .kcol { flex-basis: 78vw; } }

/* ---- drop 6.2: CRM dashboard + ads ---- */
.crm-page .stats.dash { grid-template-columns: repeat(3, 1fr); }
.stat.alert { border-color: var(--red); box-shadow: 2px 2px 0 var(--red); }
.stat.alert .v { color: var(--red); }
.dashgrid { gap: 20px; margin-bottom: 28px; align-items: start; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.bar .bn { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar .track { grid-column: 1 / -1; height: 8px; background: var(--grey); border-radius: 999px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.bar .fill.won { background: var(--ok); }
.bar .fill.lost { background: var(--muted); }
.ltable tfoot td { border-top: 1.5px solid var(--ink); border-bottom: 0; font-weight: 700; }
.ltable.wide { min-width: 1060px; }
.ltable.adentry { min-width: 760px; }
.ltable.wide td:first-child, .ltable.adentry td:first-child { min-width: 170px; }
.ltable.adentry input { min-height: 38px; padding: 6px 8px; text-align: right; min-width: 90px; }
.ltable.cmp .up { color: var(--ok); font-weight: 700; }
.ltable.cmp .down { color: var(--red); font-weight: 700; }
h2.sub2 { font-size: 14px; margin: 24px 0 8px; }
.dashbar select { flex: 0 1 180px; }
.crm-page .exportbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
.crm-page .exportbar .check { margin: 0; }
@media (max-width: 640px) {
  .crm-page .stats.dash { grid-template-columns: 1fr 1fr; }
  .crm-page .stats.dash .stat:last-child { grid-column: auto; }
  .dashgrid { grid-template-columns: 1fr; }
}

/* ---- drop 6.3: CRM follow-ups, messages, AI replies, settings ---- */
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.block { display: block; }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; flex: none; }
.msgbox { background: var(--grey); border-radius: 4px; padding: 12px 14px; font-size: 14px; line-height: 1.5; max-height: 320px; overflow-y: auto; }
.airesults { display: grid; gap: 10px; margin-top: 12px; }
.aireply { border: 1.5px solid var(--ink); border-radius: 4px; padding: 10px 12px; font-size: 14px; }
.aireply .actions { margin-top: 8px; }
.crm-page .ticket.soft textarea + input, .crm-page .ticket.soft input + .actions, .crm-page .ticket.soft textarea + .actions { margin-top: 8px; }
section.fu + section.fu { margin-top: 24px; }
section.fu.late h2 { color: var(--red); }
ul.fulist li { flex-wrap: wrap; }
ul.fulist li.late { border-left: 3px solid var(--red); padding-left: 10px; }
ul.fulist .due { font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
ul.fulist .due.overdue { color: var(--red); }
ul.fulist .rowacts { flex-basis: 100%; }
ul.setlist li.retired .title span:first-child { color: var(--muted); text-decoration: line-through; }
ul.setlist .rowacts { margin-top: 0; }
ul.setlist .rowacts .linkbtn { min-width: 28px; }
.addrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.addrow input { flex: 1 1 180px; width: auto; }
.addrow select { flex: 0 1 140px; width: auto; }
.setgrid { gap: 8px 24px; }
.sublist h3 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 14px 0 4px; }
.tplrow + .tplrow { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tplrow textarea { margin: 6px 0 8px; }
.ivgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.iv { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.iv input { min-height: 40px; padding: 6px 8px; width: 100%; }
@media (max-width: 640px) { .setgrid { grid-template-columns: 1fr; } .ivgrid { grid-template-columns: 1fr 1fr; } }
input[type=url] { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink); }
dialog.modal .keyrow { flex-wrap: nowrap; }
dialog.modal .keyrow select { flex: 1 1 auto; min-width: 0; width: auto; }

/* ---- drop 6.4: CRM import ---- */
ol.steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 4px; }
.importrep { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
h3.sub3 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 18px 0 6px; }
input[type=file] { font: inherit; max-width: 100%; }

/* Notices (drop 7.1): titles keep the poster's capitals (h2 is lowercase elsewhere); tracker spacing */
h2.ntitle { text-transform: none; margin: 6px 0 4px; }
#trackerBox { margin-top: 16px; }
#trackerBox .gcards { grid-template-columns: repeat(3, 1fr); }
#detailCard .rowacts { margin-top: 14px; }

/* Notices 7.2: memo body (headings, tables, bold leads) and the TO / FROM / REF block, like the PDF */
.nbody p { margin: 0 0 10px; line-height: 1.55; }
.nbody h3.nhead { font-size: 12px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.nbody h4.nsub { font-size: 14px; margin: 12px 0 6px; text-transform: none; }
.nbody ul, .nbody ol { margin: 0 0 10px; padding-left: 22px; line-height: 1.55; }
.ntablewrap { margin: 4px 0 16px; overflow-x: auto; }
.ntitlebar { background: var(--ink); color: var(--paper); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 8px; min-width: 520px; }
table.ntable { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 12px; }
table.ntable th { background: var(--grey); font-weight: 400; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; }
table.ntable th, table.ntable td { border: 1px solid var(--ink); padding: 6px 7px; vertical-align: top; }
dl.nmeta { display: grid; grid-template-columns: 64px 1fr; gap: 3px 10px; margin: 6px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-size: 13px; }
dl.nmeta dt { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
dl.nmeta dd { margin: 0; }
details.aibox { margin: 6px 0 16px; }
details.aibox summary { cursor: pointer; }
details.aibox[open] summary { margin-bottom: 10px; }
.notice.small { font-size: 12px; padding: 6px 10px; margin: 6px 0 0; }

/* Drop 1.5: Holders page (reset reasons as radio rows) */
#resetForm label.switch { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; }
#resetForm label.switch input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; }
#reqs .actions input.code { max-width: 160px; }

/* Drop 1.4: Settings → Storage & backups, Settings → Cutover */
.actions .spacer { flex: 1; }
#startForm label.switch { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; }
.cklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.cklist li { display: flex; gap: 10px; align-items: flex-start; }
.cklist li .stamp { flex: 0 0 auto; min-width: 46px; text-align: center; }
#clRows tr.blocked td { color: var(--muted); }
#routeRows select { width: 100%; }
#driveList .bar { margin-top: 8px; max-width: 420px; }
#mvFailed, #moveFailed { margin: 12px 0 0; padding-left: 18px; color: var(--bad-t); }
#clDates input[type=date] { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 4px; min-height: 44px; background: var(--paper); color: var(--ink); }

/* Live drop 1.1: in-app file viewer (receipts, MCs, memo PDFs) — stays inside the home-screen app. */
.viewer { position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; background: #111; color: var(--paper); }
.viewer.hidden { display: none; }
.viewer-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0)) 16px 10px; background: #000; }
.viewer-top .linkbtn { color: var(--paper); font-size: 16px; white-space: nowrap; }
.viewer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: #D8D8D8; text-align: right; }
.viewer-stage { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; }
.viewer-stage img { display: block; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.viewer-stage.zoom { display: block; }
.viewer-stage.zoom img { width: 200%; height: auto; cursor: zoom-out; }
.viewer-msg { margin: 0; padding: 24px 16px; text-align: center; color: #D8D8D8; }
.viewer-msg:empty { display: none; }
.viewer-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0)); background: #000; }
.viewer-page { font-size: 14px; color: #D8D8D8; }
.viewer-page:empty { display: none; }
.viewer-bar .linkbtn { color: var(--paper); font-size: 14px; }
.viewer-bar .btn-secondary { background: var(--paper); }
body.viewer-open { overflow: hidden; }

/* Live drop 2.1: client link screens */
.pre-line { white-space: pre-line; }
.spot { outline: 3px solid var(--red); outline-offset: 4px; transition: outline-color 0.6s; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.thumb { display: flex; flex-direction: column; gap: 4px; }
.thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; background: var(--grey); display: block; }
a.linkish { display: inline-flex; align-items: center; text-decoration: none; }

/* Live drop 2.2: Client link progress bar + client comments (job page) */
button.chip { min-height: 34px; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
button.chip.on { background: var(--ink); color: var(--paper); }
#progSec .p-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
#progSec .p-label .label { margin: 0; }
.p-track { height: 12px; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; margin: 6px 0 14px; background: var(--paper); }
.p-track span { display: block; height: 100%; width: 0; background: var(--red); }
#progForm .grow { flex: 1 1 220px; }
#progForm input[type=range] { width: 100%; accent-color: var(--red); min-height: 34px; }
#comSec .comment { padding: 14px 0; border-top: 1px solid var(--line); }
#comSec .comment:first-child { border-top: 0; }
#comSec .comment.is-hidden { opacity: 0.75; }
#comSec .c-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
#comSec .c-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
#comSec .reply { margin: 10px 0 0 14px; padding: 8px 12px; border-left: 3px solid var(--red); background: var(--grey); border-radius: 0 4px 4px 0; }
#comSec .c-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; }
#comSec .c-media .vid { grid-column: 1 / -1; }
#comSec .c-media video { width: 100%; max-height: 360px; background: #000; border-radius: 4px; display: block; margin-bottom: 4px; }
#comSec .ph { display: block; padding: 0; border: 0; border-radius: 4px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--grey); min-height: 0; cursor: zoom-in; }
#comSec .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
#comSec .ph.wait { display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; cursor: default; }
#comSec .replybox textarea { margin-top: 10px; min-height: 64px; }
#comSec .actions { margin-top: 8px; }
#comFilter { margin-bottom: 10px; }
/* Live drop 2.2: Projects Sort by + My order (#258) */
.projbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.projbar #q { flex: 1 1 140px; min-width: 120px; width: auto; }
.projbar select { width: auto; flex: 0 1 172px; min-width: 0; }
.projbar #dir { flex: none; min-height: 46px; white-space: nowrap; }
@media (min-width: 640px) { .projbar { flex-wrap: nowrap; } }
@media (max-width: 639px) { .projbar #q { flex-basis: 100%; } .projbar select { flex: 1 1 140px; } }
ul.items li.draggable { cursor: grab; }
ul.items li.dragging { opacity: 0.5; }
ul.items li.over { box-shadow: inset 0 3px 0 var(--red); }
ul.items li .mover { display: flex; gap: 6px; align-items: center; }
@media (min-width: 900px) { ul.items li .mover { opacity: 0.6; } }

/* ---- Live drop 1.4: KPI quarter / year + year-end ---- */
.ticket.spans { margin-bottom: 24px; }
.ticket.spans > .label { display: block; margin-bottom: 10px; }
ul.kpi-spans li .right { display: flex; gap: 12px; align-items: center; }
.ticket.spans details.older { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.ticket.spans details.older summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.ticket.spans details.older ul { margin-top: 12px; }
.yq { padding: 16px 0; border-top: 1px solid var(--line); }
.yq:first-of-type { border-top: 0; padding-top: 4px; }
.yq .qtext { font-weight: 600; margin: 0 0 10px; }
.scale.five { grid-template-columns: repeat(5, 1fr); max-width: 360px; }
.scale-ends { display: flex; justify-content: space-between; max-width: 360px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.yq.missing .qtext { color: var(--red); }
table.yeres td.flag { white-space: nowrap; }
table.yeres tr.flagged td { background: var(--red-tint); }
ul.yecomments { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.yecomments li { background: var(--grey); border-radius: 4px; padding: 10px 12px; }
ul.yeqs li .qacts, ul.meets li .qacts { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
ul.meets li .qacts { margin-top: 10px; }
ul.meets li .qacts .linkbtn, ul.yeqs li .qacts .linkbtn { padding: 8px 2px; font-size: 15px; }
ul.yeqs li.retired .title { color: var(--muted); text-decoration: line-through; }
.slots { display: grid; gap: 8px; }
.slots input { max-width: 260px; }
ul.meets li .when { font-weight: 600; }
.pillnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.pillnav button { min-height: 36px; padding: 0 14px; font-size: 12px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.pillnav button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#cfSlots .check { margin: 6px 0 8px; }

/* Live 1.6: year-end reasons for 1–2 + Section B */
.yq .ywhy { margin-top: 10px; }
.yq .ywhy textarea, .yq textarea { width: 100%; }
.yewhy { margin: 10px 0 14px; }
.yewhy .strong { font-weight: 600; margin: 0 0 4px; }
.yeself summary { cursor: pointer; font-weight: 600; }
.yeb { margin-top: 8px; }
.yeb .small { margin: 0 0 2px; }
.yeans { margin: 0; white-space: pre-wrap; }
.yq.missing .label { color: var(--red); }
.ticket.draft.behalf { border-color: var(--red); }
.forfield select { max-width: 320px; }
.catrow.sub { padding-left: 28px; }
.catrow.sub.tools { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 6px; }
.catrow select { max-width: 200px; }
.limrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 8px 0 12px 28px; }
.limrow .field { margin: 0; }
.amt.neg { color: var(--red); }

/* live 1.10: ?navdebug=1 readout for the bottom-menu fix (iPhone testing only) */
.navdbg { position: fixed; top: env(safe-area-inset-top, 0); left: 0; z-index: 200; background: #000; color: #fff; font: 11px/1.3 monospace; padding: 4px 6px; pointer-events: none; }
/* live 1.10: claims queries */
.qcard { margin-top: 10px; }
.qcard.closed { opacity: 0.75; }
ul.hist.qthread li .qbody { white-space: pre-wrap; margin-top: 2px; }
ul.hist.qthread li.mine { border-left: 3px solid var(--ink); padding-left: 10px; }
.qcompose { display: grid; gap: 8px; margin-top: 8px; }
.qcompose textarea { width: 100%; }
.qthumbs:empty { display: none; }
/* live 1.11: "OK, next" ticks while approving */
.tick { display: inline-flex; align-items: center; justify-content: center; color: var(--ok); font-weight: 700; margin-right: 6px; }
.tick.big { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.okbar { display: grid; gap: 8px; margin: 16px 0 4px; padding: 12px; border: 1.5px solid var(--ok); border-radius: 4px; background: var(--paper); }
.okbar .btn-primary { min-width: 160px; }

/* Live drop 2.3: Site Activity */
.actions .spacer { flex: 1; }
.thumb.pick { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.thumb.pick img { outline: 3px solid transparent; outline-offset: -3px; }
.thumb.pick.on img { outline-color: var(--red); }
.thumb.pick .pick-mark { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--paper); background: rgba(0, 0, 0, 0.35); color: var(--paper); font-size: 14px; line-height: 20px; text-align: center; }
.thumb.pick.on .pick-mark { background: var(--red); }
.thumb.vid { grid-column: span 2; }
.thumb.vid video { width: 100%; max-height: 260px; background: #000; border-radius: 4px; display: block; }
.vid-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: 4px; background: var(--ink); color: var(--paper); font-size: 11px; padding: 6px; text-align: center; overflow: hidden; word-break: break-all; }
.person { padding: 10px 0; border-top: 1px solid var(--line); }
.person:first-of-type { border-top: 0; }
.person .tag { margin-left: 8px; }
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; margin: 8px 0 12px; }
.counts .count { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.counts .count input { width: 64px; }
.site-prompt { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.site-prompt .row { margin-top: 8px; }
#item > .actions { margin: 14px 0 18px; }
section[data-sec] .chips { margin: 26px 0 14px; }
section[data-sec] > .actions { margin: 16px 0; }
section[data-sec] > p.small { margin: 4px 0 14px; }
section[data-sec] > .ticket + .ticket, section[data-sec] > form.ticket + .ticket { margin-top: 16px; }
/* Live drop 2.3.1: tick boxes, day heads, today card spacing */
.items li.has-tick { justify-content: flex-start; }
.items li.has-tick .grow { flex: 1 1 auto; min-width: 0; }
.items li.has-tick .actions { margin-left: auto; }
.bulk-tick { width: 22px; height: 22px; flex: none; margin: 2px 12px 0 0; accent-color: var(--ink); align-self: flex-start; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.thumbs .empty { grid-column: 1 / -1; }
#todayCard form { margin-top: 18px; }
#todayCard .actions { margin-top: 6px; }
#makeBar select, #qcBar select { max-width: 220px; min-height: 36px; }
/* Live drop 2.4: pins (Projects + Site Activity jobs), client report thread on a QC item */
.pin { flex: none; width: 34px; height: 34px; margin: 0 10px 0 0; padding: 0; border: 0; background: none; font-size: 20px; line-height: 34px; color: var(--muted); cursor: pointer; align-self: flex-start; }
.pin.on { color: var(--red); }
.pin:focus-visible { outline: 2px solid var(--ink); border-radius: 4px; }
#jobs li { justify-content: flex-start; }
#jobs li .grow { flex: 1 1 auto; min-width: 0; }
#jobs li .actions { margin-left: auto; }
.stamp.red { color: var(--red); border-color: var(--red); }
.issue .thread { margin-top: 10px; }
.issue .comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.issue .comment.reply { margin-left: 14px; padding: 8px 12px; border-left: 3px solid var(--red); background: var(--grey); border-bottom: 0; border-radius: 0 4px 4px 0; }
.issue .comment.is-hidden { opacity: 0.6; }
.issue .c-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.issue .c-media img.c-ph { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; display: block; }
.issue .c-media .vid video { max-width: 260px; max-height: 200px; background: #000; border-radius: 4px; display: block; }
.issue .replybox textarea { width: 100%; margin-top: 12px; }
#revDlg .check { display: flex; gap: 8px; margin: 6px 0; }
/* Live drop 2.5: handover checklist (templates, scope, BQ review, walk mode, signatures) */
.tpl textarea { width: 100%; margin-top: 8px; }
.tpl + .tpl { margin-top: 16px; }
.scope-panel { flex: 1 1 100%; margin: 4px 0 0; padding: 10px 12px; background: var(--grey); border-radius: 4px; }
.scope-panel .row { margin-top: 10px; }
.scope-panel select, .scope-panel input { min-height: 36px; }
.scope-panel input.qty { width: 70px; }
.col-pick { padding: 8px 0; border-top: 1px solid var(--line); }
.col-pick .field:first-child { flex: 2 1 260px; }
.bq-table { display: grid; gap: 0; margin: 12px 0; }
.bq-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 170px; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.bq-row.bq-head { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-top: 0; padding-bottom: 4px; }
.bq-row p { margin: 4px 0 0; }
.bq-row textarea { width: 100%; }
.bq-row textarea.saved { border-color: var(--ok); }
.bq-row select { width: 100%; min-height: 36px; }
.bq-row.off { opacity: 0.55; }
@media (max-width: 720px) { .bq-row { grid-template-columns: 30px minmax(0, 1fr); } .bq-row > :nth-child(3), .bq-row > :nth-child(4) { grid-column: 2; } .bq-row.bq-head { display: none; } }
.add-check { margin-top: 10px; }
.walk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sync-pill { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--ink); white-space: nowrap; }
.sync-pill.ok { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.sync-pill.wait { color: var(--warn-t); border-color: var(--warn-f); }
.sync-pill.off { background: var(--red); border-color: var(--red); color: var(--paper); }
.walk-rooms { display: flex; gap: 8px; align-items: center; position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 8px 0; }
.walk-rooms select { flex: 1 1 auto; min-height: 44px; font-weight: 600; }
.walk-rooms button { min-width: 44px; min-height: 44px; font-size: 20px; }
ul.walk-items { list-style: none; margin: 0 0 16px; padding: 0; }
.witem { padding: 12px 0; border-top: 1px solid var(--line); }
.witem .wtext { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.witem.r-ok .wtext > span:first-child { color: var(--muted); }
.witem.r-defect { background: var(--red-tint); margin: 0 -10px; padding: 12px 10px; }
.wbtns { display: grid; grid-template-columns: 1fr 1fr 0.7fr; gap: 8px; }
.wbtn { min-height: 46px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.wbtn.ok.on { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.wbtn.bad.on { background: var(--red); border-color: var(--red); color: var(--paper); }
.wbtn.na.on { background: var(--ink); color: var(--paper); }
.wbtn:disabled { opacity: 0.5; cursor: default; }
.walk-foot { padding: 12px 0; border-top: 1px solid var(--line); }
.walk-counts { font-weight: 700; font-size: 15px; }
.def-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.sig-box { border: 1.5px dashed var(--ink); border-radius: 4px; background: #fff; margin: 6px 0 4px; }
.sig-pad { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.sign-wording { background: var(--grey); padding: 10px 12px; border-radius: 4px; }
#signCard .chips { margin: 12px 0 16px; }
#signCard .label { display: block; margin-top: 10px; }
