:root {
  --bg: #f4f5f7; --card: #ffffff; --ink: #1b2430; --muted: #5d6877; --line: #dde1e7;
  --brand: #1f3a5f; --brand-ink: #ffffff; --accent: #e06a1b;
  --go: #1e7a46; --go-ink: #fff; --stop: #b3261e; --stop-ink: #fff; --warn-bg: #fff4e0; --warn-ink: #7a4a00;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161d; --card: #1a212b; --ink: #e8ecf1; --muted: #9aa5b3; --line: #2c3542;
    --brand: #27466f; --accent: #f08a43; --warn-bg: #3a2c12; --warn-ink: #ffd38a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161d; --card: #1a212b; --ink: #e8ecf1; --muted: #9aa5b3; --line: #2c3542;
  --brand: #27466f; --accent: #f08a43; --warn-bg: #3a2c12; --warn-ink: #ffd38a; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: 76px; }
header.top { background: var(--brand); color: var(--brand-ink); padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
header.top .logo { font-weight: 800; letter-spacing: .5px; }
header.top .who { margin-left: auto; font-size: 14px; opacity: .9; text-align: right; }
.demo { background: var(--warn-bg); color: var(--warn-ink); padding: 8px 16px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo select { max-width: 100%; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 10px; font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
textarea { min-height: 84px; resize: vertical; }
button { font: inherit; border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; background: var(--line); color: var(--ink); }
button.primary { background: var(--brand); color: var(--brand-ink); }
button.big { width: 100%; font-size: 22px; font-weight: 700; padding: 20px; border-radius: 16px; margin-top: 14px; }
button.go { background: var(--go); color: var(--go-ink); }
button.stop { background: var(--stop); color: var(--stop-ink); }
button:disabled { opacity: .5; cursor: default; }
.status { display: flex; align-items: center; gap: 12px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--go); box-shadow: 0 0 0 4px rgba(30,122,70,.18); }
.bigtime { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.list li:first-child { border-top: 0; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--ink); }
.pill.db { background: var(--accent); color: #fff; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; }
.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }
.err { color: var(--stop); font-size: 14px; margin-top: 8px; }
.ok { color: var(--go); font-size: 14px; margin-top: 8px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; }
.checks label { display: flex; gap: 8px; align-items: center; color: var(--ink); margin: 4px 0; }
.checks input { width: auto; }
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: center; z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
nav.tabs button { flex: 1; max-width: 160px; background: none; border-radius: 0; padding: 10px 4px 12px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
nav.tabs button .ic { font-size: 20px; line-height: 1; }
nav.tabs button.active { color: var(--brand); font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) nav.tabs button.active { color: var(--accent); } }
:root[data-theme="dark"] nav.tabs button.active { color: var(--accent); }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog .inner { padding: 16px; }
.right { text-align: right; }
/* v2: AI daily log */
button.talk { background: var(--accent); color: #fff; min-height: 96px; font-size: 26px; }
button.talk.on { background: var(--stop); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(179,38,30,.18); } }
@media (prefers-reduced-motion: reduce) { button.talk.on { animation: none; } }
.live { min-height: 1.4em; margin-top: 8px; }
h3.sub { font-size: 15px; margin: 14px 0 4px; }
ol.said { margin: 4px 0 8px; padding-left: 20px; font-size: 15px; }
ol.said li { margin: 4px 0; overflow-wrap: anywhere; }
button.link { background: none; padding: 0 4px; color: var(--brand); text-decoration: underline; font-size: 14px; }
label.inline { display: flex; gap: 8px; align-items: center; color: var(--ink); }
label.inline input { width: auto; }
.q { border-top: 1px solid var(--line); padding: 10px 0; }
.q:first-of-type { border-top: 0; }
.qrow { flex-wrap: nowrap; }
.qrow input { flex: 1 1 auto; min-width: 0; }
.qrow button { flex: 0 0 52px; font-size: 20px; }
.qrow button.on { background: var(--stop); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { border-radius: 99px; padding: 8px 14px; min-height: 40px; }
.chip.picked { background: var(--brand); color: var(--brand-ink); }
.chip.skip { background: none; border: 1px solid var(--line); }
.note { background: var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }
.pill.flag { background: var(--stop); color: #fff; margin: 2px 0; }
.pill.flag.f-delay { background: #8a5a00; }
.pill.flag.f-owner_architect { background: #1f5f8a; }
.card.flagged { border-left: 4px solid var(--stop); }
.flagcard .flagrow { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; border-top: 1px solid var(--line); padding: 10px 0; }
.flagcard .flagrow:first-of-type { border-top: 0; }
.flagcard ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.flagrow > div { min-width: 0; overflow-wrap: anywhere; }
p.pre { white-space: pre-line; margin: 2px 0 8px; overflow-wrap: anywhere; }
.ph { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.ph img { width: 96px; flex: none; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
figure { margin: 0; } figcaption { font-size: 12px; color: var(--muted); }
.jobrow { flex-direction: column; }
details summary { cursor: pointer; color: var(--brand); margin: 6px 0; }
.warn ul { margin: 4px 0 0; padding-left: 18px; }
/* v3: time clock rules and crew entries */
nav.tabs.many button { font-size: 11.5px; padding-left: 1px; padding-right: 1px; }
.pill.pend { background: var(--warn-bg); color: var(--warn-ink); }
.pill.ok-pill { background: var(--go); color: #fff; }
.pill.self { background: #6a3d9a; color: #fff; }
.pill.flag.f-sub_notice { background: #6a3d9a; }
.subcard { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }
button.wide { width: 100%; margin-top: 8px; }
.list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.btns { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.btns button { padding: 8px 12px; }
.alert12 { border-left: 4px solid var(--stop); }
.alert12 h2 { color: var(--stop); }
b.over12 { color: var(--stop); }
.person { flex-direction: column; }
.person details select { margin-bottom: 4px; }
ul.entries { list-style: none; margin: 4px 0; padding: 0; }
li.entry { border-top: 1px solid var(--line); padding: 8px 0; font-size: 15px; overflow-wrap: anywhere; }
li.entry:first-child { border-top: 0; }
li.entry .pre { white-space: pre-line; }
.crewsrc { background: var(--bg); border-radius: 10px; padding: 4px 10px 8px; margin: 10px 0; }
.nosuper { margin-top: 8px; }
.brow { flex-wrap: nowrap; margin-bottom: 6px; }
.brow input { min-width: 0; }
dialog { max-height: calc(100vh - 32px); overflow-y: auto; }
/* ================================================================ v4: office desktop layout (28 Nov 2026)
   Only applies with body.desk (a wide screen and a person whose permissions give them office sections).
   The phone layout above is unchanged. BGN brand: lime #80CD00, charcoal #2A2B2B / #1E1F1F, Poppins
   (served from vendor/fonts so it works offline; falls back to the system font). */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: local('Poppins Regular'), local('Poppins-Regular'), url('vendor/fonts/poppins-regular.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: local('Poppins Medium'), local('Poppins-Medium'), url('vendor/fonts/poppins-medium.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: local('Poppins Bold'), local('Poppins-Bold'), url('vendor/fonts/poppins-bold.woff2') format('woff2'); }
.print-only { display: none; }
body.desk {
  --lime: #80CD00; --lime-dark: #5E9A00; --char: #2A2B2B; --char2: #1E1F1F;
  --bg: #F4F5F1; --card: #ffffff; --ink: #1E1F1F; --muted: #5B5F5A; --line: #DFE2DA;
  --brand: #2A2B2B; --brand-ink: #ffffff; --go: #80CD00; --go-ink: #1E1F1F; --accent: #C26A12;
  --warn-bg: #FFF4DE; --warn-ink: #6B4500;
  color-scheme: light; background: var(--bg); color: var(--ink); padding-bottom: 0; min-height: 100vh;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px;
}
body.desk input, body.desk select, body.desk textarea, body.desk button { font-family: inherit; }
body.desk button.primary { background: var(--lime); color: var(--char2); font-weight: 600; }
body.desk button.primary:hover { background: #8EDB0A; }
body.desk button.go { background: var(--lime); color: var(--char2); }
body.desk button:hover { filter: brightness(.97); }
body.desk :focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.desk-head { display: flex; align-items: center; gap: 18px; background: #fff; padding: 10px 24px; border-bottom: 4px solid var(--lime); position: sticky; top: 0; z-index: 6; }
.desk-logo { height: 40px; width: auto; display: block; }
.desk-app { font-weight: 700; font-size: 17px; color: var(--char2); border-left: 1px solid var(--line); padding-left: 18px; }
.desk-app span { font-weight: 500; color: var(--lime-dark); margin-left: 6px; }
.desk-who { margin-left: auto; text-align: right; line-height: 1.25; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.desk-who b { color: var(--ink); font-size: 15px; }
.desk-who a { color: var(--lime-dark); }
body.desk .demo { padding: 6px 24px; font-size: 13px; }
body.desk .demo select { width: auto; max-width: 460px; padding: 4px 8px; }
body.desk .demo button { padding: 4px 10px; }
.desk-wrap { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.desk-side { background: var(--char); color: #E8EAE4; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.desk-side nav { display: flex; flex-direction: column; gap: 2px; }
.side-group { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9EA39A; margin: 12px 10px 4px; }
body.desk .desk-side button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; color: #E8EAE4; padding: 9px 10px; border-radius: 8px; font-size: 14px; border-left: 3px solid transparent; }
body.desk .desk-side button:hover { background: #343535; filter: none; }
body.desk .desk-side button.active { background: var(--char2); color: var(--lime); border-left-color: var(--lime); font-weight: 600; }
.desk-side button svg { flex: none; }
.desk-side .badge { margin-left: auto; background: var(--lime); color: var(--char2); border-radius: 99px; font-size: 12px; font-weight: 700; padding: 0 8px; line-height: 20px; }
.side-foot { margin-top: auto; padding: 12px 10px 4px; font-size: 12px; color: #9EA39A; }
body.desk main.desk-main { padding: 20px 28px 40px; min-width: 0; max-width: none; margin: 0; }
.desk-phone { max-width: 760px; }
.desk-toolbar { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; margin: 0 0 14px; }
.desk-toolbar h1 { margin: 0; font-size: 24px; font-weight: 700; color: var(--char2); }
.desk-toolbar p { margin: 4px 0 0; max-width: 880px; }
.desk-toolbar .tools { display: flex; gap: 8px; align-items: center; flex: none; }
.desk-toolbar .tools .row { flex-wrap: nowrap; min-width: 320px; }
body.desk .card { border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
body.desk .card.flush { padding: 0; overflow: hidden; }
body.desk .card h2 { font-size: 17px; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; border-top: 4px solid var(--lime); }
body.desk button.tile { background: #fff; color: var(--ink); }
.tile b { font-size: 28px; line-height: 1.1; color: var(--char2); }
.tile span { font-size: 13px; color: var(--muted); }
.tile.bad { border-top-color: var(--stop); } .tile.bad b { color: var(--stop); }
.tile.warnt { border-top-color: #E2A400; }
.tile:disabled { opacity: 1; cursor: default; }
.desk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.desk-grid #onClock { grid-row: span 2; }
table.dtable { width: 100%; font-size: 14px; }
table.dtable th { background: #F1F2EE; color: #3F433E; font-weight: 600; font-size: 13px; position: sticky; top: 0; z-index: 1; }
table.dtable th, table.dtable td { white-space: normal; vertical-align: top; padding: 8px 10px; }
table.dtable tbody tr:hover td { background: #FAFBF7; }
table.dtable td.c, table.dtable th.c { text-align: center; }
table.dtable select, table.dtable input:not([type=checkbox]) { padding: 6px 8px; font-size: 14px; border-radius: 7px; min-width: 0; }
table.dtable input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--lime-dark); }
td.jobcell { background: #FAFBF7; }
table.grid th.pcell { background: #fff; position: static; min-width: 150px; font-weight: 400; }
table.grid td.daycell { min-width: 96px; padding: 6px; }
table.grid td.tot { white-space: nowrap; }
table.grid td.actcell { min-width: 150px; }
table.grid td.actcell button { font-size: 13px; padding: 8px 10px; }
.otv { color: var(--accent); font-weight: 600; font-size: 13px; }
.shift { border: 1px solid var(--line); border-left: 4px solid #E2A400; border-radius: 7px; padding: 5px 7px; margin-bottom: 6px; font-size: 12.5px; line-height: 1.35; background: #fff; }
.shift.ap { border-left-color: var(--lime); background: #F7FBEF; }
.shift.open { border-left-color: var(--stop); }
.shift .muted { font-size: 12px; }
.shift .pill { font-size: 10.5px; padding: 1px 6px; }
.shift-b { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.shift-b button { font-size: 12px; padding: 4px 8px; border-radius: 6px; }
.ptable th[scope=row] { background: #fff; position: static; font-weight: 400; min-width: 200px; }
.ptable select { width: 100%; }
tr.inactive td, tr.inactive th { opacity: .55; }
.tiny { font-size: 11px; }
.okbar, .errbar { border-radius: 8px; padding: 9px 12px; margin: 0 0 12px; font-size: 14px; }
.okbar { background: #EEF8DF; color: #2F5200; border: 1px solid #CDE8A3; }
.errbar { background: #FDECEA; color: var(--stop); border: 1px solid #F3C2BD; }
.frow { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.frow > div { flex: 1 1 200px; }
.frow > .fbtn { flex: 0 0 auto; }
.frow label.inline { margin: 0 0 10px; }
body.desk .filters { padding: 10px 16px 12px; }
body.desk .filters .frow > div { flex: 0 1 240px; }
.logs-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
#logTable tr[data-open] { cursor: pointer; }
#logTable tr.sel td { background: #EEF8DF; }
#logTable tr.sel td:first-child { box-shadow: inset 4px 0 0 var(--lime); }
b.unseen { color: var(--stop); font-size: 12px; }
.logs-right { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
.logdetail .ld-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.logdetail .ld-head h2 { margin: 0; }
.logdetail .tools { display: flex; gap: 8px; flex: none; }
.ld-flags { background: #FDF3F2; border: 1px solid #F3C2BD; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.ld-flags.seen { background: #F6F7F4; border-color: var(--line); }
.ld-flags ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.ld-sec { margin: 10px 0; }
.ld-sec h3 { font-size: 14px; margin: 0 0 3px; color: var(--char2); text-transform: uppercase; letter-spacing: .04em; }
.ld-photos { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.said-sec { background: #F6F7F4; border-radius: 8px; padding: 8px 12px; }
p.qa { margin: 4px 0; }
.desk-main .tablewrap table { font-size: 14px; }
.tc-wide .card { max-width: none; }

/* ---------------------------------------------------------------- v4: printing on letter paper */
/* ---- v5: "Fix my time" requests */
.fxkinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.fxkinds .chip { flex: 1 1 140px; }
#fixCard .row > textarea { flex: 1 1 200px; min-height: 88px; }
button.fxtalk { flex: 0 0 64px; min-height: 64px; font-size: 24px; padding: 0; align-self: flex-start; }
.fxblock { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 6px 8px; font-size: 13px; margin: 6px 0 2px; }
.fxblock button.link { color: inherit; font-size: 13px; }
.list li:has(> .fxblock) { flex-wrap: wrap; }
.list li > .fxblock { flex: 1 1 100%; }
#myFix .list li > button, .fxcard .list li > .btns { align-self: center; flex: 0 0 auto; }
.fxnote { font-style: italic; overflow-wrap: anywhere; }
.fxanswer { display: inline-block; font-size: 14px; margin-top: 4px; padding: 4px 8px; border-radius: 8px; background: var(--line); overflow-wrap: anywhere; }
.fxanswer.accepted { background: #e3f3e9; color: #145233; }
.fxanswer.declined { background: #fbe7e5; color: #8a1c15; }
.pill.fxno { background: var(--stop); color: #fff; }
.pill.fxmark { background: #1f5f8a; color: #fff; }
#myFix .list li > span, .fxcard .list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
dialog#fixDlg .row > * { flex: 1 1 180px; }
body.desk .fxcard .list li { align-items: center; }
body.desk .shift .fxblock { font-size: 12px; padding: 3px 6px; }
@media (prefers-color-scheme: dark) { .fxanswer.accepted { background: #143a26; color: #bfe8cf; } .fxanswer.declined { background: #3e1714; color: #f3c2bd; } }

@media print {
  @page { size: letter; margin: 0.5in; }
  html, body, body.desk { background: #fff !important; color: #000; padding: 0; min-height: 0; font-size: 11pt; }
  .desk-head, .desk-side, .demo, nav.tabs, .no-print, dialog, .pvnote, .desk-toolbar, #pMsg, #jMsg, .alert12, .tiles, header.top { display: none !important; }
  .print-only { display: block !important; }
  body.desk .desk-wrap { display: block; min-height: 0; }
  body.desk main.desk-main { padding: 0; }
  body.desk .card, .card { box-shadow: none; border: 0; padding: 0; margin: 0 0 10px; break-inside: auto; }
  .print-head { display: flex !important; align-items: center; gap: 14px; border-bottom: 2px solid #80CD00; padding-bottom: 6px; margin-bottom: 10px; font-size: 10pt; }
  .print-head img { height: 30px; width: auto; }
  .tablewrap { overflow: visible !important; }
  table.dtable th { position: static; }
  button { display: none !important; }
  .pill { border: 1px solid #999; background: #fff !important; color: #000 !important; }
  /* One daily log: only the open log prints. */
  body.print-log .desk-main > :not(.logs-layout), body.print-log .logs-left { display: none !important; }
  body.print-log .logs-layout { display: block; }
  body.print-log .logs-right { position: static; max-height: none; overflow: visible; }
  body.print-log .logdetail .ld-head { padding-bottom: 4px; margin-bottom: 6px; }
  body.print-log .ld-sec { margin: 6px 0; break-inside: avoid; }
  body.print-log .ld-sec h3 { font-size: 9.5pt; }
  body.print-log .logdetail { font-size: 9.5pt; line-height: 1.35; }
  body.print-log .ld-sec { margin: 4px 0; }
  body.print-log .ld-sec h3 { margin-bottom: 1px; }
  body.print-log p.pre { margin: 0 0 4px; }
  body.print-log .ld-flags { padding: 4px 8px; margin-bottom: 6px; }
  body.print-log .photos, body.print-log .ld-photos { grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 4px; }
  body.print-log .photos img { max-height: 0.8in; }
  body.print-log ol.said { font-size: 9.5pt; margin: 2px 0 4px; }
  body.print-log .said-sec { padding: 4px 8px; }
  body.print-log .logdetail .ld-head h2 { font-size: 13pt; }
  body.print-log h3.sub { margin: 4px 0 2px; }
  body.print-log figcaption { font-size: 7.5pt; }
  body.print-log li.entry { padding: 3px 0; font-size: 9.5pt; }
  body.print-log .history li { padding: 3px 0; }
  body.print-log .muted { font-size: 8.5pt; }
  body.print-log .said-sec { background: #fff; border: 1px solid #ccc; }
  /* v6: the weather table and the weather delay, compact (the official record is the Daily Report PDF). */
  body.print-log .wxraw, body.print-log .wdhist, body.print-log .wdbox .btns { display: none !important; }
  body.print-log .wxcard table.wxt { display: none !important; }
  body.print-log p.wxprint { font-size: 9pt; margin: 0; display: inline !important; }
  body.print-log .wxcard h3 { display: inline; margin-right: 6px; }
  body.print-log .wxcard h3 .pill { display: none; }
  body.print-log .wxcard.ld-sec { margin: 2px 0 4px; }
  body.print-log table.wxt { font-size: 8.5pt; margin: 2px 0; }
  body.print-log table.wxt th, body.print-log table.wxt td { padding: 1px 6px; }
  body.print-log .wxcard h3 { margin: 2px 0; }
  body.print-log .wxcard p.muted { display: none; }
  body.print-log .wdbox { font-size: 8.5pt; padding: 3px 8px; margin: 4px 0; gap: 1px; background: #fff; border: 1px solid #b3261e; border-left-width: 4px; }
  body.print-log .ownerform { font-size: 8.5pt; padding: 3px 8px; margin: 4px 0; }
  body.print-log .wdbox { display: block; line-height: 1.3; }
  body.print-log .wdbox > div { display: inline; margin-right: 6px; }
  body.print-log .wdbox > div.muted { display: none; }
  body.print-log .logdetail .photos img, body.print-log .logdetail li.entry img { max-height: 0.55in; width: auto; }
  /* A week's timecards: summary and every shift, no buttons. */
  body.print-tc .tc-wide .warn { border: 1px solid #ccc; background: #fff; color: #000; padding: 4px 8px; margin: 4px 0; font-size: 9pt; }
  body.print-tc .tc-wide table { font-size: 8.5pt; }
  body.print-tc .tc-wide th, body.print-tc .tc-wide td { padding: 3px 4px; }
  body.print-tc #shiftTable td:nth-child(-n+8) { white-space: nowrap; }
  body.print-tc #shiftTable td:last-child, body.print-tc #shiftTable th:last-child { display: none; }
  body.print-tc .tc-wide .muted { font-size: 8.5pt; }
  body.print-tc .tc-wide h2 { font-size: 12pt; margin: 6px 0; }
  body.print-tc .tc-wide .row { display: none; } /* week picker */
}
/* v4 desktop refinements */
body.desk .pill { white-space: nowrap; }
td.nw, th.nw { white-space: nowrap !important; }
#logTable { font-size: 13px; }
#logTable td, #logTable th { padding: 7px 8px; }
.ptable select[data-pf=role] { min-width: 96px; }
.ptable select[data-pf=clock_mode] { min-width: 170px; }
.ptable select[data-pf=approve_scope] { min-width: 120px; }
.ptable select[data-pf=classification] { min-width: 140px; }
.checks-box ul { columns: 2; column-gap: 24px; }
table.dtable tfoot th { background: #F1F2EE; position: static; }
.desk-toolbar .tools > .row { flex: 0 0 auto; }
.shift-h { margin-top: 1px; }
#logTable .muted { font-size: 12px; }
#logTable .pill { white-space: normal; border-radius: 6px; }
#weekGrid { table-layout: fixed; }
#weekGrid thead th:first-child { width: 160px; }
#weekGrid thead th:nth-last-child(2) { width: 76px; }
#weekGrid thead th:last-child { width: 150px; }
#weekGrid td.daycell { min-width: 0; }
body.desk .desk-side { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto; }

/* ---------------------------------------------------------------- v6: weather detail, weather delays, Daily Report */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wxcard h2, .wxcard h3 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wxinline { margin: 10px 0; }
table.wxt { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0; table-layout: fixed; }
table.wxt th, table.wxt td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 2px solid var(--card); background: var(--line); overflow-wrap: anywhere; }
table.wxt thead th { background: #2B2B2B; color: #fff; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
table.wxt tbody th { width: 34%; font-weight: 700; }
details.wxraw { margin-top: 6px; font-size: 13px; }
table.wxr td, table.wxr th { padding: 3px 6px; font-size: 12px; }
.pill.flag.f-weather_delay { background: #b3261e; color: #fff; }
.wdbox { border-left: 5px solid #b3261e; background: rgba(179, 38, 30, .08); border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 14px; display: grid; gap: 4px; }
.wdbox .btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.wdzone { margin: 12px 0; }
button.wdbtn { width: 100%; background: #b3261e; color: #fff; font-weight: 600; min-height: 48px; }
.notice { font-weight: 600; }
.notice.overdue { color: #b3261e; }
.notice.notset { color: #8a5a00; }
.notice.sent { color: var(--go); }
.ownerform { border-left: 4px solid #80CD00; }
.wdwx { font-size: 14px; margin: 8px 0; }
.wdhours { align-items: flex-end; }
.wdhours > div { flex: 1 1 140px; }
label.wdfull { flex: 0 0 auto; padding-bottom: 10px; }
.nsform { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.nsform input { width: auto; padding: 6px 8px; }
.nsform button { padding: 6px 10px; }
td.wxshort { font-size: 13px; max-width: 240px; }
.jcontract summary { cursor: pointer; }
.jcgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 12px; margin: 8px 0; }
.jcgrid label { font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.jcgrid label.inline { display: flex; color: var(--ink); align-self: end; }
td.jc { min-width: 220px; }
.reportzone { margin: 10px 0; }
button.dlreport { background: #2B2B2B; color: #fff; }
body.desk button.dlreport { background: var(--char); color: #fff; }
.logdetail .wxcard h3, .ld-sec.wxcard h3 { margin-top: 0; }
td.ndue { min-width: 100px; max-width: 190px; }
table.wxt th, table.wxt td { white-space: normal; }
.logdetail .tools { flex-wrap: wrap; justify-content: flex-end; flex: 0 1 auto; }
.logdetail .ld-head > div:first-child { min-width: 180px; }
