/* GenZNeer app, in the ISI E&C commercial-platform design (isiec-sale).
   Layout: white top bar with the company logo and the menu in one row; on phones a bottom bar with a raised orange Scan button.
   Brand (from isiec.com): orange #E0592A carries every action, navy #011E41 is the deep ground, near-black ink, paper #F9FAFB.
   Corners are square; only small chips are round. Headings bold with tight tracking; section labels bold capitals at 0.25em. */
@font-face { font-family: "MiSans Khmer"; src: url(/fonts/MiSansKhmer-Normal.woff2) format("woff2"); unicode-range: U+1780-17FF, U+19E0-19FF, U+200B-200D, U+25CC; size-adjust: 112%; font-weight: 400; font-display: swap; }
@font-face { font-family: "MiSans Khmer"; src: url(/fonts/MiSansKhmer-Medium.woff2) format("woff2"); unicode-range: U+1780-17FF, U+19E0-19FF, U+200B-200D, U+25CC; size-adjust: 112%; font-weight: 500; font-display: swap; }
@font-face { font-family: "MiSans Khmer"; src: url(/fonts/MiSansKhmer-Bold.woff2) format("woff2"); unicode-range: U+1780-17FF, U+19E0-19FF, U+200B-200D, U+25CC; size-adjust: 112%; font-weight: 700; font-display: swap; }
:root {
  --orange: #E0592A; --orange-deep: #C24A1F; --orange-soft: #FCEBE3;
  --navy: #011E41; --navy-2: #12305A; --navy-3: #2D4B73;
  /* older component names kept, now on the ISI palette */
  --gold: var(--orange); --gold-soft: var(--orange-soft);
  --bg: #F9FAFB; --surface: #FFFFFF; --surface-2: #EDF0F3; --ink: #0A0A0A; --muted: #65717F; --line: #DFE3E8;
  --primary: var(--orange); --primary-ink: #FFFFFF;
  --ok: #1D7A43; --ok-soft: #DDF1E4; --bad: #B91C1C; --bad-soft: #FBE3E3; --warn: #92570B; --warn-soft: #FDF3C8; --info: #24578F;
  /* Ginto is ISI's licensed face; Figtree stands in until its files are added here. MiSans Khmer sits in the same stack, so Khmer words switch face per character. */
  --f-body: "ABC Ginto", "Figtree", "MiSans Khmer", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: var(--f-body);
  --f-mono: var(--f-body);   /* codes and numbers use the app font (tabular figures below), not a typewriter font */
  --r: 0px; --tab-h: 60px; --top-h: 48px; --rail-w: 220px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.45 var(--f-body); -webkit-tap-highlight-color: transparent; font-feature-settings: "calt" 0; }   /* ABC Ginto turns "(2)" into "②" and "->" into arrows: show text as written */
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; margin: 0; letter-spacing: -0.025em; text-wrap: balance; color: var(--navy); }
h1 { font-size: 21px; line-height: 1.2; letter-spacing: -0.025em; } h2 { font-size: 18px; } h3 { font-size: 13.5px; margin-bottom: 8px; letter-spacing: -0.01em; }
p { margin: 6px 0; }
.num, td.r, th.r, td.n, input[type=number] { font-variant-numeric: tabular-nums; }   /* not on whole tables: in ABC Ginto tabular figures also widen the spaces between words */
.mono { font-family: var(--f-mono); font-size: .9em; }
.muted { color: var(--muted); } .sm { font-size: 12.5px; } .big { font-size: 18px; font-weight: 700; }
.ok-t { color: var(--ok); font-weight: 500; } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
.eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgb(101 113 127 / .75); }
.eyebrow a { color: inherit; text-decoration: none; } .eyebrow a:hover { color: var(--orange); }
.num { text-align: right; white-space: nowrap; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .mt { margin-top: 14px; }
.ico { width: 17px; height: 17px; flex: none; }
.boot { color: var(--muted); text-align: center; margin-top: 30vh; display: grid; gap: 14px; justify-items: center; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- sign in ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 22px; }
.login-mark { width: 230px; max-width: 70%; }
.login-sub { color: var(--muted); font-size: 13.5px; margin-top: -10px; }
.login-form { background: var(--surface); width: min(400px, 100%); padding: 20px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--navy); }
.login-form input { padding: 10px 12px; border: 1px solid var(--line); font-size: 16px; }
.login-note { font-size: 12.5px; color: var(--muted); }
.err { color: var(--bad); min-height: 18px; font-size: 13.5px; }
.wide { width: 100%; justify-content: center; }

/* ---------- shell ---------- */
.rail { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.rail-logo { display: flex; align-items: center; height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
.rail-logo img { height: 28px; max-width: 150px; object-fit: contain; } .rail-logo b { color: var(--navy); }
.rail-proj { padding: 8px 14px 6px; line-height: 1.25; } .rail-proj b { display: block; color: var(--navy); font-size: 13px; } .rail-proj small { color: var(--muted); font: 500 11px var(--f-mono); }
.rail-search { margin: 4px 10px 6px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 0 8px; color: var(--muted); background: var(--bg); }
.rail-search input { border: 0 !important; box-shadow: none !important; background: transparent; padding: 6px 0 !important; font-size: 12.5px !important; min-height: 0 !important; width: 100%; }
.rail-search:focus-within { border-color: var(--orange); }
.rail-nav { flex: 1; overflow-y: auto; padding: 2px 8px 8px; scrollbar-width: thin; }
.rail-g > span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: rgb(101 113 127 / .7); padding: 10px 8px 3px; }
.rail-nav a { display: flex; align-items: center; gap: 9px; padding: 5px 8px; min-height: 30px; font-size: 13px; text-decoration: none; color: #2B3742; }
.rail-nav a .ico { width: 16px; height: 16px; color: var(--muted); }
.rail-nav a:hover { background: var(--surface-2); }
.rail-nav a.on { background: var(--orange); color: #fff; font-weight: 500; } .rail-nav a.on .ico { color: #fff; }
.rail-user { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-top: 1px solid var(--line); text-decoration: none; }
.rail-user:hover, .rail-user.on { background: var(--surface-2); }
.rail-dev { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); padding: 0 12px 10px; } .rail-dev img { height: 14px; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 11.5px; flex: none; }
.un { display: flex; flex-direction: column; line-height: 1.2; font-size: 12px; min-width: 0; } .un b { color: var(--navy); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .un small { color: var(--muted); }
.main { min-height: 100%; display: flex; flex-direction: column; margin-left: var(--rail-w); }
.top { display: none; height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
.top-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.top-logo img { height: 26px; max-width: 110px; object-fit: contain; }
.top-logo span { font: 600 11.5px var(--f-mono); color: var(--muted); border-left: 1px solid var(--line); padding-left: 8px; white-space: nowrap; }
.top-ic { width: 40px; height: 40px; display: grid; place-items: center; color: var(--navy); }
.top-user { display: flex; text-decoration: none; padding: 4px; }
.view { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 14px 20px 24px; }
.view.full { max-width: none; padding: 0; display: flex; flex-direction: column; }
.foot-dev { display: none; align-items: center; gap: 8px; justify-content: center; font-size: 11px; color: var(--muted); padding: 6px 0 12px; }
.foot-dev img { height: 16px; }
.view.full ~ .foot-dev { display: none !important; }
.tabbar { display: none; }

/* ---------- building blocks ---------- */
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.head p { color: var(--muted); max-width: 80ch; margin: 3px 0 0; font-size: 13px; }
.head .eyebrow { margin-bottom: 2px; }
.banner { display: flex; gap: 10px; align-items: center; background: var(--warn-soft); border: 1px solid #F1D98A; color: #6B4709; padding: 7px 12px; margin-bottom: 10px; text-decoration: none; font-size: 13px; }
.banner.bad { background: var(--bad-soft); border-color: #F0B4B4; color: #8E2626; }
.card { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 10px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; } .card-h h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; } .grid2, .grid3 { margin-bottom: 10px; } .grid2 > div > .card:last-child { margin-bottom: 0; }
/* a ruled grid: cells share 1px rules instead of sitting apart (the isiec-sale shortcut row) */
.ruled { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 12px; } .ruled > * { background: var(--surface); margin: 0; border: 0; }
.ruled.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ruled.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat .v { font: 700 24px/1.1 var(--f-display); letter-spacing: -0.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; color: var(--navy); }
.empty { color: var(--muted); padding: 16px 4px; text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; min-height: 34px; color: var(--navy); }
.btn:hover:not(:disabled) { border-color: var(--navy-3); background: #FBFCFD; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
/* the action button, as isiec.com sets it: orange, square, small bold capitals */
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn .ico { width: 15px; height: 15px; }
.btn.primary:hover:not(:disabled) { background: var(--orange-deep); border-color: var(--orange-deep); }
.btn.sm { padding: 3px 9px; min-height: 28px; font-size: 12px; } .btn.primary.sm { font-size: 10.5px; }
.btn.icon { width: 40px; justify-content: center; padding: 0; font-size: 18px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 0; background: color-mix(in srgb, var(--c) 13%, #fff); color: color-mix(in srgb, var(--c) 82%, #000); white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pill.solid.open { background: var(--bad-soft); color: var(--bad); } .pill.solid.closed { background: var(--ok-soft); color: var(--ok); }
.tag { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; padding: 1px 6px; background: var(--surface-2); color: var(--muted); vertical-align: 2px; }
.note { border-left: 3px solid var(--orange); background: var(--orange-soft); padding: 7px 10px; font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; margin-top: 6px; }
.list { display: flex; flex-direction: column; }
.list .it { display: flex; gap: 10px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--line); text-decoration: none; min-width: 0; font-size: 13px; }
.list.tight .it { padding: 5px 2px; font-size: 12.5px; }
.list .it:last-child { border-bottom: 0; }
.list .it.link:hover { background: var(--surface-2); }
.when { font-size: 11.5px; color: var(--muted); white-space: nowrap; text-align: right; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 0; flex: none; background: var(--surface-2); }
.thumb.none { display: grid; place-items: center; color: var(--muted); }
.thumb-btn { border: 0; padding: 0; background: none; cursor: zoom-in; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 5px 12px; margin: 6px 0 4px; font-size: 13px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.stack { display: flex; height: 10px; border-radius: 0; overflow: hidden; background: var(--surface-2); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; } .legend i { width: 10px; height: 10px; border-radius: 0; } .legend b { color: var(--ink); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
/* filter chips: small boxes, the type stays the same size (isiec-sale .chip) */
.chip { border: 1px solid var(--line); background: var(--surface); padding: 3px 9px; min-height: 28px; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--navy); }
.chip.on { background: var(--orange); color: #fff; border-color: var(--orange); }
.chip-r input { position: absolute; opacity: 0; pointer-events: none; }
.chip-r span { display: inline-block; border: 1.5px solid var(--line); padding: 4px 11px; cursor: pointer; font-weight: 500; font-size: 12.5px; }
.chip-r input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 85%, #000); }
.chip-r input:focus-visible + span { outline: 2px solid var(--orange); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; } .filters input { flex: 1; min-width: 180px; } .filters select { max-width: 220px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input:not([type]), select, textarea { border: 1px solid var(--line); background: var(--surface); padding: 6px 9px; min-width: 0; font-size: 13.5px; min-height: 34px; }
textarea { min-height: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
input, select, textarea { scroll-margin-block: 5rem; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: var(--navy); }
.form label input, .form label select, .form label textarea { font-weight: 400; color: var(--ink); }
.form fieldset { border: 0; padding: 0; margin: 0; } .form legend { font-weight: 600; margin-bottom: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.searchrow { display: flex; gap: 8px; margin-top: 8px; } .searchrow input { flex: 1; }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em; color: rgb(101 113 127 / .8); font-weight: 700; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FBFCFD; }
td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
.chk-td { width: 36px; } .chk-td input { width: 18px; height: 18px; }
.chk { display: inline-flex; gap: 6px; align-items: center; }
.sec-h { margin: 14px 0 8px; font-size: 15px; } .sec-h .muted { font-weight: 400; }

/* ---------- home ---------- */
.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.hello p { color: var(--muted); margin: 2px 0 0; font-size: 12.5px; }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; overflow: hidden; }
.tile { background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; text-decoration: none; font-size: 11.5px; font-weight: 500; color: var(--navy); text-align: center; line-height: 1.2; }
.tile:hover { background: #FBFCFD; } .tile:hover .ti { background: var(--orange); color: #fff; }
.ti { position: relative; width: 40px; height: 40px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); transition: background .15s, color .15s; }
.ti .ico { width: 20px; height: 20px; stroke-width: 1.8; }
.ti em { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 0; background: var(--navy); color: #fff; font: 700 10px/18px var(--f-mono); font-style: normal; }
.tiles.sm { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 4px; }
/* number strip: a row of small counters, each one a link or a filter */
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; overflow: hidden; }
.strip .sc { background: var(--surface); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; padding: 8px 10px; text-align: left; text-decoration: none; cursor: pointer; display: flex; flex-direction: column; gap: 1px; color: var(--ink); min-width: 0; }
.strip div.sc { cursor: default; }
.sc b { font: 700 18px/1.15 var(--f-mono); color: var(--navy); letter-spacing: -0.02em; } .sc b span { font-size: 12px; color: var(--muted); }
.sc small { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: flex-start; gap: 5px; line-height: 1.25; }
.sc small i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; margin-top: 3px; }
.sc.warn b { color: var(--warn); } .sc.bad b { color: var(--bad); }
.sc:hover { background: #FBFCFD; } .sc.on { background: var(--navy); } .sc.on b, .sc.on small { color: #fff; }
.more-g { margin-bottom: 10px; } .more-g .eyebrow { margin-bottom: 4px; }

/* ---------- drawings ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dcard { text-decoration: none; display: flex; flex-direction: column; gap: 4px; margin: 0; }
.dcard:hover { border-color: var(--navy-3); }
.dcard-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.rev { background: var(--navy); color: #fff; border-radius: 0; padding: 0 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dcard-title { font: 700 17px/1.25 var(--f-display); }
.dcard-meta, .dcard-foot { font-size: 13px; color: var(--muted); }
.dv-wrap { display: flex; flex-direction: column; height: calc(100dvh - var(--top-h)); }
.dv-bar, .mv-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dv-title { min-width: 0; flex: 1 1 200px; line-height: 1.25; }
.dv-find { display: flex; gap: 6px; } .dv-find input { width: 190px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 0; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 8px 14px; cursor: pointer; font-weight: 500; min-height: 40px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--orange); color: #fff; }
.dv { position: relative; flex: 1; overflow: hidden; background: #DADDD8; touch-action: none; cursor: grab; user-select: none; }
.dv.marking { cursor: crosshair; }
.dv-base { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.18); }
.dv-detail { position: absolute; left: 0; top: 0; pointer-events: none; }
.dv-layer { position: absolute; inset: 0; pointer-events: none; }
.dv-load { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.dv-hint { font-size: 13px; color: var(--muted); padding: 6px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.pin { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; border: 2px solid #fff; background: var(--c); color: #fff; font: 700 12px var(--f-body); min-width: 28px; height: 28px; border-radius: 0; padding: 0 6px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.35); rotate: 0deg; }
.pin.closed { opacity: .55; } .pin.sq { border-radius: 0; } .pin.hl { outline: 3px solid var(--gold); z-index: 3; }
.area { position: absolute; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border-radius: 0; }
.ring { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid var(--gold); border-radius: 50%; box-shadow: 0 0 0 3px rgba(14,26,51,.55); animation: pulse 1.6s infinite; }
.ring span { position: absolute; left: 36px; top: 4px; background: var(--navy); color: var(--gold); font: 600 11px var(--f-mono); padding: 1px 5px; border-radius: 0; white-space: nowrap; }
@keyframes pulse { 50% { transform: scale(1.25); } }
.mark-pin { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--gold); border: 2px solid var(--navy); }
.mark-box { position: absolute; border: 2.5px dashed var(--navy); background: rgba(229,174,69,.22); }

/* ---------- model ---------- */
.mv { display: flex; flex-direction: column; height: calc(100dvh - var(--top-h)); }
.mv-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; }
.mv-3d { position: relative; background: #E1E5E7; min-height: 0; overflow: hidden; } .mv-3d canvas { display: block; }
.mv-panel { background: var(--surface); border-left: 1px solid var(--line); padding: 14px; overflow-y: auto; }
.mv-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 6px 12px; font-size: 13px; background: var(--surface); border-top: 1px solid var(--line); }
.mv-legend span { display: inline-flex; gap: 6px; align-items: center; } .mv-legend i { width: 11px; height: 11px; border-radius: 0; }

/* ---------- scan ---------- */
.scan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cam { position: relative; background: #000; border-radius: 0; overflow: hidden; aspect-ratio: 3 / 4; max-height: 70vh; width: 100%; }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-frame { position: absolute; inset: 18% 14%; border: 3px solid var(--gold); border-radius: 0; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.cam-msg { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 500; padding: 0 16px; text-shadow: 0 1px 3px #000; }

/* ---------- pieces ---------- */
.steps-h { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.sh { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.sh i { height: 8px; border-radius: 0; background: var(--surface-2); }
.sh.done i { background: var(--navy); } .sh.now i { background: var(--gold); } .sh.now { color: var(--ink); font-weight: 600; }
.card.act { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-color: var(--gold); background: var(--gold-soft); }
.labels { display: grid; grid-template-columns: repeat(3, 70mm); gap: 0; justify-content: center; background: #fff; }
.label { width: 70mm; height: 37mm; display: flex; gap: 3mm; align-items: center; padding: 3mm; border: 0.2mm dashed #bbb; overflow: hidden; }
.lq { width: 29mm; height: 29mm; flex: none; } .lq svg { width: 100%; height: 100%; }
.lt { font-size: 8pt; line-height: 1.25; min-width: 0; } .lm { font: 700 15pt/1.1 var(--f-display); } .lc { font-size: 8pt; } .lp { color: #555; font-size: 7pt; margin-top: 1mm; }

/* ---------- reports ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 8px 0; }
.ph { position: relative; border: 0; padding: 0; background: var(--surface-2); border-radius: 0; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; cursor: pointer; }
.photo-full { display: flex; flex-direction: column; gap: 10px; align-items: center; } .photo-full img { max-width: 100%; max-height: 78vh; border-radius: 0; }
.mprow { display: grid; grid-template-columns: 1fr 90px; gap: 8px; margin-top: 6px; }
.logo-prev { background: var(--surface-2); border-radius: 0; padding: 16px; display: grid; place-items: center; min-height: 90px; margin: 8px 0; } .logo-prev img { max-height: 70px; max-width: 100%; }
.print-head, .print-foot { display: none; }

/* ---------- sheet + toast ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(10, 16, 30, .5); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet { background: var(--surface); border-radius: 0; padding: 16px; width: min(520px, 100%); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 0; z-index: 80; max-width: min(560px, calc(100% - 32px)); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.bad { background: var(--bad); }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .rail { display: none; }
  .main { margin-left: 0; padding-bottom: calc(var(--tab-h) + 8px + env(safe-area-inset-bottom)); }
  .top { display: block; } .foot-dev { display: flex; }
  .view { padding: 10px max(12px, env(safe-area-inset-right)) 18px max(12px, env(safe-area-inset-left)); }
  /* bottom bar for the hand holding the phone; the raised centre is the one field action */
  .tabbar { display: flex; align-items: flex-end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 10px; }
  .tabbar a svg { opacity: .8; } .tabbar a.on { color: var(--orange); } .tabbar a.on svg { opacity: 1; stroke-width: 2.1; }
  .tabbar a.tb-scan { justify-content: flex-end; gap: 3px; }
  .tabbar a.tb-scan .fab { width: 52px; height: 52px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; margin-top: -20px; box-shadow: 0 6px 16px rgba(224, 89, 42, .35); transition: transform .1s; }
  .tabbar a.tb-scan .fab svg { opacity: 1; width: 23px; height: 23px; }
  .tabbar a.tb-scan:active .fab { transform: scale(.95); }
  html[data-keyboard="open"] .tabbar { display: none; }
  .dv-wrap, .mv { height: calc(100dvh - var(--top-h) - var(--tab-h) - 8px - env(safe-area-inset-bottom)); }
  .dv-find input { width: 130px; } #info { display: none; }
  .ruled.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ruled.c3 { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tiles:not(.sm) .tile[href="#/scan"], .tiles:not(.sm) .tile[href="#/diary"] { display: none; } .tile { padding: 10px 2px 8px; font-size: 10.5px; } .ti { width: 36px; height: 36px; }
  .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sc { padding: 7px 8px !important; } .sc b { font-size: 15px; } .sc small { font-size: 8.5px; letter-spacing: .08em; }
  .grid2, .grid3, .scan, .fgrid { grid-template-columns: minmax(0, 1fr); } .fgrid .span2 { grid-column: auto; }
  .mv-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; } .mv-panel { max-height: 36vh; border-left: 0; border-top: 1px solid var(--line); }
  h1 { font-size: 19px; } .head .intro { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  /* compact: the viewport (maximum-scale=1) stops iOS zooming into small fields */
  input, select, textarea { font-size: 14px !important; }
  input:not([type=checkbox]):not([type=radio]), select { min-height: 34px; }
  .btn:not(.sm) { min-height: 34px; }
  .sheet-bg { align-items: flex-end; padding: 0; } .sheet { padding-bottom: calc(16px + env(safe-area-inset-bottom)); max-height: 88vh; }
  .ed-h { display: none !important; } .ed-r { grid-template-columns: 1fr 1fr !important; padding: 8px 0; border-bottom: 1px solid var(--line); } .ed-r .ed-x { justify-self: end; }
  .rside .rthumb { width: 36px; height: 36px; }
  .week { gap: 2px; } .wk { padding: 4px 0; }
}

/* ---------- print (labels, daily report) ---------- */
@media print {
  @page { size: A4; margin: 10mm 0; }
  body { background: #fff; }
  .top, .tabbar, .foot-dev, .no-print, .btn, .actions, #toast { display: none !important; }
  .main { padding: 0; } .view { padding: 0; max-width: none; }
  .card { border: 0; padding: 0 0 8mm; break-inside: avoid; }
  .print-head { display: flex; gap: 12px; align-items: center; margin: 0 10mm 6mm; border-bottom: 1px solid #000; padding-bottom: 4mm; } .print-head img { height: 14mm; }
  .print-foot { display: block; text-align: center; font-size: 8pt; color: #666; margin-top: 6mm; }
  .grid2 { display: block; margin: 0 10mm; }
  .label { border-color: #ddd; }
}

/* ---------- documents ---------- */
.rpill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 0; white-space: nowrap; }
.rpill.ok { background: var(--ok-soft); color: var(--ok); } .rpill.warn { background: var(--warn-soft); color: var(--warn); }
.rpill.bad { background: var(--bad-soft); color: var(--bad); } .rpill.gray { background: var(--surface-2); color: var(--muted); }
.tag.tg { background: #E3EEF8; color: #22679E; } .tag.doc { background: var(--navy); color: #fff; text-decoration: none; letter-spacing: .04em; }
.nowrap { white-space: nowrap; }
.dtable td { vertical-align: top; }
.card.current { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; border-width: 2px; }
.card.current.ok { border-color: var(--ok); } .card.current.warn { border-color: #D9A441; } .card.current.bad { border-color: var(--bad); }
.cur-rev { font: 700 34px/1 var(--f-mono); color: var(--navy); letter-spacing: -0.02em; }
.guide { font-size: 14px; margin: 6px 0; max-width: 70ch; }
.cur-a { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.fchip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 0; padding: 3px 9px; font-size: 12.5px; text-decoration: none; background: var(--surface); }
.fchip b { font-size: 11.5px; letter-spacing: .03em; } .fchip.pdf b { color: #B83232; } .fchip.dwg b { color: #2A619C; } .fchip.sheet b { color: #257A4A; } .fchip.approved { border-color: var(--ok); } .fchip.approved b { color: var(--ok); }
.fchip:hover { border-color: var(--muted); }
.docgrid { align-items: start; }
.revs { display: flex; flex-direction: column; gap: 10px; }
.rv { border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; }
.rv.is-cur { border-color: var(--navy-3); box-shadow: inset 3px 0 0 var(--orange); }
.rv-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .rv-h .when { margin-left: auto; }
.rv-note { background: var(--surface-2); border-radius: 0; padding: 6px 9px; font-size: 13.5px; margin-top: 6px; white-space: pre-wrap; }
details summary { cursor: pointer; font-size: 13px; color: var(--info); margin-top: 6px; }
.thread { display: flex; flex-direction: column; gap: 4px; }
.msg { padding: 9px 0; border-bottom: 1px solid var(--line); } .msg:last-child { border-bottom: 0; }
.msg-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; } .msg-h .when { margin-left: auto; }
.msg p { margin: 4px 0 0; }
.msg .photos { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.day { font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 0 4px; }
.cform { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; gap: 8px; }
.dv-status { padding: 7px 12px; font-size: 14px; border-bottom: 1px solid var(--line); }
.dv-status.ok { background: var(--ok-soft); color: #1C5C38; } .dv-status.warn { background: var(--warn-soft); color: #6F450A; }
.dv-status.bad { background: var(--bad-soft); color: #8E2626; } .dv-status.gray { background: var(--surface-2); color: var(--ink); }
.dv-status .muted { margin-left: 8px; }
.pager { display: inline-flex; gap: 4px; align-items: center; } .pager select { padding: 8px; }
.pin.old { background: #fff; color: var(--c); border-color: var(--c); }
@media (max-width: 900px) {
  .card.current { grid-template-columns: minmax(0, 1fr); } .cur-a { align-items: flex-start; }
  .dtable th:nth-child(5), .dtable td:nth-child(5), .dtable th:nth-child(6), .dtable td:nth-child(6), .dtable th:nth-child(7), .dtable td:nth-child(7) { display: none; }
}

/* ---------- registers: compact rows ---------- */
.rlist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); }
.card .rlist { border: 0; margin: 0 -14px -12px; border-top: 1px solid var(--line); }
.rrow { display: flex; gap: 10px; align-items: center; padding: 7px 12px 7px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; position: relative; min-width: 0; }
.rrow:last-child { border-bottom: 0; }
.rrow.is-open::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.rrow:hover { background: #FBFCFD; }
.rrow.is-closed .rtitle { color: var(--muted); font-weight: 500; }
.rmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rtop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 14px; }
.rno { font: 600 10.5px var(--f-mono); color: var(--muted); letter-spacing: .02em; }
.rmod { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.rtitle { font-size: 13px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rmeta { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rside { display: flex; align-items: center; gap: 8px; flex: none; }
.rthumb { width: 40px; height: 40px; object-fit: cover; background: var(--surface-2); }
.rcm { font-size: 11px; color: var(--muted); }
.rnum { font: 700 13px var(--f-mono); color: var(--navy); } .rnum small { font-size: 10px; color: var(--muted); margin-left: 1px; }
.rdue { font-size: 10.5px; font-weight: 600; color: var(--muted); } .rdue.late { color: var(--bad); background: var(--bad-soft); padding: 0 5px; }
.lvl { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 85%, #000); }
.rgrp { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 8px 14px 4px; background: var(--bg); border-bottom: 1px solid var(--line); }
.week { display: flex; gap: 4px; align-items: stretch; margin-bottom: 10px; }
.wk, .wk-nav { flex: 1; border: 1px solid var(--line); background: var(--surface); padding: 5px 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0; position: relative; color: var(--navy); }
.wk-nav { flex: 0 0 34px; justify-content: center; color: var(--muted); }
.wk small { font-size: 9.5px; font-weight: 700; color: var(--muted); } .wk b { font: 700 14px var(--f-mono); }
.wk i { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.wk.today { border-color: var(--navy-3); } .wk.on { background: var(--orange); border-color: var(--orange); } .wk.on b, .wk.on small { color: #fff; } .wk.on i { background: #fff; }
.card.act { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-color: var(--orange); background: var(--orange-soft); padding: 10px 14px; }
.flow-form { display: flex; flex-direction: column; gap: 8px; width: 100%; } .flow-form .chips { margin: 0; }
.pgrp { margin-bottom: 10px; } .pgrp:last-child { margin-bottom: 0; } .pgrp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; } .pgrp-h b { font-size: 12.5px; } .pgrp-h .btn { margin-left: auto; }
.photos { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.msg.sys { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); padding: 5px 0; } .msg.sys span:first-child { flex: 1; }
.msg.sys::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); flex: none; align-self: center; }
.msg { padding: 7px 0; } .msg-h { font-size: 13px; } .msg p { font-size: 13px; }
.req { color: var(--bad); font-style: normal; }
/* two-column form */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; } .fgrid .span2 { grid-column: 1 / -1; }
.form.fgrid { display: grid; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 8px 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }
.tab i { font-style: normal; font: 700 10px var(--f-mono); background: var(--surface-2); color: var(--navy); padding: 1px 5px; border-radius: 0; margin-left: 3px; }
.tabs.in { margin: 0 0 0; padding: 0 6px; background: #FBFCFD; position: sticky; top: 0; z-index: 2; }
.card.flush > .dsec, .card.flush > .pad, .card-h.pad { padding: 12px 14px; } .card-h.pad { margin: 0; border-bottom: 1px solid var(--line); }
.dsec { display: none; } .dsec.on { display: block; } .dsec > * + * { margin-top: 8px; }
.ponly { display: none; }
.sticky-act { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); margin: 0; padding: 8px 14px; }
.sumline { font-size: 12.5px; color: var(--muted); } .sumline b { color: var(--navy); font-family: var(--f-mono); }
.sm-date { width: 140px; min-height: 28px !important; padding: 2px 6px !important; font-size: 12px !important; }
/* small editable table (diary rows) */
.ed { display: flex; flex-direction: column; gap: 4px; }
.ed-h, .ed-r { display: grid; grid-template-columns: var(--cols); gap: 4px; align-items: center; }
.ed-h span { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ed-r input, .ed-r select { width: 100%; min-height: 30px; padding: 4px 7px; font-size: 13px; }
.ed-x { border: 0; background: none; color: var(--muted); cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; } .ed-x:hover { color: var(--bad); }
.ed-none { padding: 4px 0; }
.stepper { display: flex; } .stepper input { text-align: center; width: 100%; min-width: 0; -moz-appearance: textfield; } .stepper input::-webkit-inner-spin-button { display: none; }
.stepper button { border: 1px solid var(--line); background: var(--surface-2); width: 30px; flex: none; cursor: pointer; font-weight: 700; color: var(--navy); }
/* setup */
.ltree { display: flex; flex-direction: column; } .lrow { display: flex; gap: 6px; align-items: center; padding: 5px 0 5px calc(var(--d) * 22px); border-bottom: 1px solid var(--line); font-size: 13px; }
.lrow:last-child { border-bottom: 0; }
.lgrip { flex: none; width: 14px; height: 14px; cursor: grab; touch-action: none; opacity: .55; background: radial-gradient(circle, currentColor 1.5px, transparent 2px) 0 0 / 7px 7px; }
.lgrip:hover { opacity: 1; } .lrow.dragging { opacity: .45; } .lrow.dragging .lgrip { cursor: grabbing; }
.lrow.drop-b { box-shadow: inset 0 2px 0 var(--orange); } .lrow.drop-a { box-shadow: inset 0 -2px 0 var(--orange); }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; } .codes small { font-weight: 400; }
.chk { font-size: 12.5px; font-weight: 400 !important; flex-direction: row !important; align-items: center; gap: 6px; color: var(--ink) !important; }
/* record picker after marking a drawing */
.picks { display: grid; gap: 6px; margin: 8px 0; }
.pick { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); padding: 8px 10px; cursor: pointer; }
.pick:hover { border-color: var(--orange); } .pick b { display: block; color: var(--navy); font-size: 13.5px; } .pick small { color: var(--muted); font-size: 12px; }
.pick .qi { width: 34px; height: 34px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); flex: none; }
@media print {
  .rail, .tabs, .sticky-act { display: none !important; } .main { margin: 0 !important; }
  .dsec { display: block !important; padding: 0 10mm 4mm !important; } .ponly { display: block; }
  .diary { display: block; } .diary > div { margin: 0 10mm; }
}
@media (min-width: 901px) { .grid2.diary { grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); } }
@media (max-width: 640px) { .fgrid { grid-template-columns: minmax(0, 1fr); } .fgrid .span2 { grid-column: auto; } .kv { grid-template-columns: 104px minmax(0, 1fr); } }

/* ---------- BOQ and schedule ---------- */
.vbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; }
.vsel { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.vsel select { max-width: 360px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); }
.vinfo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabsrow { margin-bottom: 10px; } .tabsrow input { min-width: 160px; }
.seg.sm button { padding: 4px 12px; min-height: 30px; font-size: 12.5px; }
.secgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.sect { display: flex; flex-direction: column; gap: 5px; text-align: left; background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; cursor: pointer; color: var(--ink); }
.sect:hover { border-color: var(--orange); }
.sect-h { display: flex; justify-content: space-between; gap: 8px; } .sect-h b { color: var(--navy); font-size: 13px; }
.sect-v { font: 700 18px var(--f-mono); color: var(--navy); }
.sect-f { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.bar { position: relative; display: block; height: 6px; background: var(--surface-2); overflow: hidden; } .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--orange); }
.bar.sm { height: 5px; min-width: 60px; } .bar u { position: absolute; top: -1px; bottom: -1px; width: 2px; background: var(--navy); opacity: .45; }
td .bar.sm { display: block; margin-bottom: 2px; }
.secrow td { background: #F4F6F8; font-weight: 700; color: var(--navy); font-size: 12px; letter-spacing: .02em; }
tfoot td { border-top: 2px solid var(--navy); background: #FBFCFD; }
input.cell { width: 96px; min-height: 28px !important; padding: 2px 6px !important; font-size: 12.5px !important; text-align: right; }
input.cell.pct { width: 70px; } input.cell.ok { border-color: #86C7A0; } input.cell.warn { border-color: #E2B65A; } input.cell.bad { border-color: #E09090; background: #FFF7F7; }
.boqt td:nth-child(2) { min-width: 240px; } .delc { min-width: 110px; }
.aname.click { cursor: pointer; } .aname.click:hover b { color: var(--orange); }
.schedt td { vertical-align: top; }
.gantt { overflow: hidden; }
.gscroll { overflow-x: auto; max-height: 70vh; overflow-y: auto; }
.gin { position: relative; width: calc(260px + var(--w)); }
.gr { display: flex; height: 26px; border-bottom: 1px solid #EEF1F4; }
.gn { position: sticky; left: 0; z-index: 2; flex: 0 0 260px; background: var(--surface); border-right: 1px solid var(--line); padding: 4px 10px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gn.click { cursor: pointer; } .gn.click:hover { color: var(--orange); }
.gt { position: relative; flex: 0 0 var(--w); background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(var(--wk) - 1px), #F1F3F5 calc(var(--wk) - 1px), #F1F3F5 var(--wk)); }
.gr.grp .gn { font-weight: 700; color: var(--navy); background: #F4F6F8; } .gr.grp { background: #F4F6F8; }
.ghead { position: sticky; top: 0; z-index: 3; height: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ghead .gn { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ghead .gt { background: var(--surface); } .ghead .gt span { position: absolute; top: 5px; font-size: 10.5px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 4px; white-space: nowrap; }
.gb { position: absolute; top: 6px; height: 11px; border: 1px solid color-mix(in srgb, var(--c) 70%, #fff); background: color-mix(in srgb, var(--c) 14%, #fff); overflow: hidden; }
.gb i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); }
.ga { position: absolute; top: 19px; height: 3px; background: var(--orange); }
.gtoday { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--orange); opacity: .6; z-index: 1; pointer-events: none; }
.glegend { display: flex; gap: 16px; flex-wrap: wrap; padding: 6px 12px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); }
.glegend i { display: inline-block; width: 18px; height: 8px; margin-right: 5px; vertical-align: middle; } .glegend .lp { background: #2A619C; } .glegend .la { height: 3px; background: var(--orange); } .glegend .lt { width: 2px; height: 12px; background: var(--orange); }
.scurve { width: 100%; height: auto; display: block; }
.scurve .gl { stroke: #E7EBEF; stroke-width: 1; } .scurve .ax { font: 10px var(--f-body); fill: var(--muted); }
.scurve .tl { stroke: #B8C4D4; stroke-dasharray: 3 3; } .scurve .pl { fill: none; stroke: var(--navy); stroke-width: 2; } .scurve .al { fill: none; stroke: var(--orange); stroke-width: 2.5; } .scurve .ad { fill: var(--orange); }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); }
.schedhint { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--surface-2); padding: 6px 10px; } .schedhint b { color: var(--navy); font-size: 13px; }
/* importer */
.sheet.wide { width: min(980px, 100%); }
.imap { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.impv { max-height: 260px; overflow: auto; border: 1px solid var(--line); margin: 6px 0; } .impv td { font-size: 11.5px; padding: 3px 8px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.imsec td { background: #F4F6F8; font-weight: 700; color: var(--navy); }
.imopt { border: 1px solid var(--line) !important; padding: 8px 10px !important; display: flex; flex-direction: column; gap: 6px; } .imopt legend { font-size: 12px; font-weight: 700; color: var(--navy); padding: 0 4px; }
.imopt input[name=vname] { min-height: 28px; padding: 2px 6px; font-size: 12.5px; margin-left: 6px; }
@media (max-width: 900px) { .gn { flex-basis: 150px; } .gin { width: calc(150px + var(--w)); } .vsel select { max-width: 220px; } }

/* ---------- MS Project sync, project folder, desktop app ---------- */
.sync2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .sync2 .card { margin: 0; } .sync2 .btn.primary { margin: 4px 0; }
.pvopt { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--surface-2); padding: 8px 10px; margin: 6px 0; }
.pvopt label:not(.chk) { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--navy); }
.pvl { max-height: 300px; overflow: auto; border: 1px solid var(--line); } .pvl td { font-size: 12px; padding: 4px 8px; }
.pvn { margin: 4px 0 8px; padding-left: 18px; font-size: 12.5px; max-height: 160px; overflow: auto; }
.slog { margin-top: 8px; } .chk + .chk { margin-top: 4px; } .card > .chk { display: flex; margin: 4px 0; }
.rail-inst { display: none; align-items: center; gap: 6px; margin: 0 12px 6px; padding: 5px 8px; font-size: 11.5px; font-weight: 600; color: var(--orange); background: var(--orange-soft); text-decoration: none; }
body.can-install .rail-inst { display: flex; }
@media (display-mode: standalone) { .rail-inst { display: none !important; } }
@media (max-width: 900px) { .sync2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- two-level menu (company, project) ---------- */
.rail-box { display: flex; align-items: center; gap: 8px; width: 100%; margin: 8px 0 2px; padding: 7px 9px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 12.5px; color: var(--navy); text-align: left; cursor: pointer; }
.rail-box span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rail-box b { font-weight: 700; }
.rail-box .ico { width: 15px; height: 15px; color: var(--muted); flex: none; } .rail-box .chev .ico { width: 14px; height: 14px; transition: transform .15s; }
.rail-box[aria-expanded="false"] .chev .ico { transform: rotate(-90deg); }
.rail-box.proj { cursor: default; margin-top: 10px; border-color: var(--navy-3); }
.rail-box.proj select { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; font: inherit; font-weight: 700; color: var(--navy); background: transparent; appearance: none; cursor: pointer; }
.rail-code { font: 500 10.5px var(--f-mono); color: var(--muted); padding: 2px 10px 0; }
.rail-nav a span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb { font-style: normal; font-size: 9.5px; font-weight: 600; padding: 0 6px; border-radius: 0; background: var(--surface-2); color: var(--muted); line-height: 16px; flex: none; }
.nb.new { background: #DDF1E4; color: var(--ok); } .rail-nav a.on .nb { background: rgba(255,255,255,.25); color: #fff; }
.rail-nav a.later { color: var(--muted); } .rail-nav a.later .ico { opacity: .6; }
.rail-g.accent { border: 1px solid #F2B79F; background: #FFF8F4; margin: 6px 0 2px; padding-bottom: 3px; } .rail-g.accent > span { color: var(--orange); }
.tile.later { opacity: .55; } .more-g.accent .eyebrow { color: var(--orange); }
.more-proj { margin: 12px 0 6px; padding: 7px 10px; border: 1px solid var(--navy-3); font-size: 13px; color: var(--navy); }
.tiles { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
/* tools on/off */
.toolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.toolg { border: 1px solid var(--line); padding: 8px 10px; } .toolg .eyebrow { margin-bottom: 4px; }
.chk.tool { display: flex !important; gap: 8px; padding: 4px 0; border-bottom: 1px solid #F0F2F4; } .chk.tool:last-child { border: 0; } .chk.tool .ico { color: var(--muted); width: 15px; height: 15px; }
/* portfolio */
.pfgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.pf { display: flex; flex-direction: column; gap: 8px; margin: 0; } .pf-h { display: flex; justify-content: space-between; gap: 8px; } .pf-h b { color: var(--navy); font-size: 15px; }
.pf-prog .bar { height: 8px; margin-top: 4px; }
.pf-k { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pf-k span { background: var(--surface); padding: 6px 8px; font-size: 10.5px; color: var(--muted); display: flex; flex-direction: column; } .pf-k b { font: 700 15px var(--f-mono); color: var(--navy); }
.pf-k .bad-t b { color: var(--bad); }
/* photos */
.pgh { margin-top: 6px; } .pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 3px; margin: 4px 0 8px; }
.pgi { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--surface-2); cursor: zoom-in; overflow: hidden; }
.pgi img { width: 100%; height: 100%; object-fit: cover; display: block; } .pgi:hover img { transform: scale(1.04); transition: transform .2s; }
.pgi i { position: absolute; left: 4px; bottom: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); border: 1.5px solid #fff; }
.pcap { width: 100%; font-size: 13px; }
/* manpower bars */
.mpbars { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line); }
.mpbars a { flex: 1; min-width: 3px; background: var(--navy-3); } .mpbars a:hover { background: var(--orange); }
.ptabs { margin-bottom: 12px; } .ptabs .tab { text-decoration: none; font-size: 13.5px; padding: 9px 14px; }
.dlv { align-items: start; }
@media (max-width: 900px) { .pfgrid { grid-template-columns: minmax(0, 1fr); } .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- diary photo control ---------- */
.dphotos .ph em { position: absolute; left: 4px; bottom: 4px; font-style: normal; font-size: 11px; background: rgba(0,0,0,.6); color: #fff; padding: 0 4px; }
.pv { display: flex; flex-direction: column; gap: 8px; }
.pv-img { position: relative; background: #111; display: grid; place-items: center; min-height: 240px; }
.pv-img img { max-width: 100%; max-height: 68vh; display: block; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 34px; cursor: pointer; }
.pv-nav.prev { left: 0; } .pv-nav.next { right: 0; } .pv-nav:disabled { opacity: .2; cursor: default; }
.pv-meta { display: flex; gap: 10px; align-items: baseline; }

/* ---------- company menu / project menu ---------- */
.rail-co { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 9px 10px; background: var(--navy); color: #fff; font-size: 13px; }
.rail-co .ico { color: #fff; width: 16px; height: 16px; } .rail-co b { font-weight: 700; }
.rail-pl span { display: flex; flex-direction: column; line-height: 1.2; } .rail-pl small { font: 500 10px var(--f-mono); color: var(--muted); }
.rail-nav a.rail-pl { min-height: 38px; }
.rail-back { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; padding: 3px 6px; font-size: 11.5px; color: var(--muted); text-decoration: none; }
.rail-back .ico { width: 14px; height: 14px; } .rail-back:hover { color: var(--orange); }
.rail-pbox { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 6px; padding: 10px 12px; background: var(--navy); color: #fff; border-left: 4px solid var(--orange); }
.rail-pbox small { font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #9FB0C6; }
.rail-pbox b, .rail-pbox select { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.01em; line-height: 1.25; }
.rail-pbox select { background: transparent; border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; appearance: auto; cursor: pointer; }
.rail-pbox select option { color: var(--ink); }
.rail-pbox .mono { font-size: 10.5px; color: #B8C4D4; }
.more-proj { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .more-co { margin-left: auto; font-size: 12px; color: var(--orange); text-decoration: none; }

.sect-c { font-size: 12px; color: var(--navy); } .sect-c b { font-family: var(--f-mono); color: var(--ok); }

/* ===== Capture ===== */
.cap-opts{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin:8px 0 14px}
.cap-o{display:grid;grid-template-columns:40px 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);color:inherit;text-decoration:none;cursor:pointer;min-height:64px}
.cap-o svg{grid-row:1/3;width:28px;height:28px;color:var(--primary)}
.cap-o b{font-size:15px}.cap-o small{color:var(--muted);font-size:12px}
.cap-o.first{background:var(--navy);color:#fff;border-color:transparent}.cap-o.first small{color:rgba(255,255,255,.75)}.cap-o.first svg{color:var(--orange)}
.cap-o:active{transform:scale(.98)}
.cap-prev{display:flex;gap:8px;overflow-x:auto;padding:4px 0}
.cap-prev .ph{position:relative;flex:0 0 96px;height:96px;border-radius:var(--r);overflow:hidden;background:var(--surface-2)}
.cap-prev .ph img{width:100%;height:100%;object-fit:cover}
.cap-prev .ph.doc span{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:6px;text-align:center;gap:2px}
.cap-prev .ph.doc small{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:84px}
.cap-prev .ph .x{position:absolute;top:4px;right:4px;width:24px;height:24px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;font-size:16px;line-height:1;cursor:pointer}
.cap-q{margin:16px 0 8px}
.cap-purposes{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.cap-p{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:12px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);color:inherit;text-align:left;cursor:pointer;font:inherit}
.cap-p svg{width:22px;height:22px;color:var(--muted)}.cap-p small{color:var(--muted);font-size:11.5px;line-height:1.3}
.cap-p.on{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary) inset}.cap-p.on svg{color:var(--primary)}
.cap-f{margin-top:12px}
.cap-f select[size]{height:auto;min-height:120px}
.cap-done{display:flex;gap:12px;align-items:center;border-left:4px solid var(--ok)}.cap-done>svg{width:28px;height:28px;color:var(--ok);flex:none}
@media (max-width:560px){.cap-purposes{grid-template-columns:1fr 1fr}.cap-opts{grid-template-columns:1fr}}

/* ===== form tables in the record form (MIR specification) ===== */
.lines-f, .checks-f { display: flex; flex-direction: column; gap: 6px; } .lines-f .lbl, .checks-f .lbl { font-weight: 500; font-size: 13px; }
.lines-f[hidden], .checks-f[hidden], label[hidden] { display: none !important; }
.ltab-w { overflow-x: auto; } .ltab { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 13px; }
.ltab th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ltab td { padding: 3px 4px; border-bottom: 1px solid var(--line); } .ltab td input { width: 100%; min-height: 36px; padding: 4px 6px; }
.ltab .x { border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.ltab.ro { min-width: 0; } .ltab.ro td { padding: 5px 6px; }
.checks-f .chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip-r input:checked + span { border-color: var(--primary); background: var(--orange-soft); }

/* ===== inspection cover form (A4), in the app's own fonts ===== */
.fm-paper { overflow-x: auto; padding: 4px 0 24px; }
.fm { --rule: #B9C1CB; --tint: #F2F4F7; --sub: #4F5D6E; width: 190mm; margin: 0 auto; background: #fff; color: #0E1B2C; padding: 10mm; box-shadow: 0 1px 6px rgba(0,0,0,.12); font: 400 8.6pt/1.3 var(--f-body); }
.fm .mono { font-family: var(--f-mono); font-size: .92em; }
.fm table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
.fm th, .fm td { border: .6pt solid var(--rule); padding: .9mm 1.8mm; text-align: left; vertical-align: middle; font: inherit; text-transform: none; letter-spacing: 0; white-space: normal; color: inherit; overflow-wrap: anywhere; }
.fm-h { display: grid; grid-template-columns: 30mm 1fr 52mm; align-items: stretch; padding-bottom: 3mm; border-bottom: 2pt solid var(--navy); }
.fm-logo { display: flex; align-items: center; } .fm-logo img { max-height: 11mm; max-width: 28mm; object-fit: contain; } .fm-logo-t { font-size: 14pt; color: var(--navy); }
.fm-co { display: flex; flex-direction: column; justify-content: center; gap: .3mm; padding: 0 3mm; border-left: .6pt solid var(--rule); color: var(--sub); }
.fm-co b { font-size: 10.5pt; font-weight: 700; color: var(--navy); }
.fm-no { display: flex; flex-direction: column; justify-content: center; gap: .3mm; padding: 2mm 3.5mm; background: var(--navy); color: #fff; font-size: 8pt; }
.fm-no > b { font: 700 16pt/1 var(--f-display); letter-spacing: .04em; color: var(--orange); margin-bottom: .8mm; } .fm-no .mono { color: #fff; font-weight: 500; }
.fm-t { font: 700 13pt/1.15 var(--f-display); letter-spacing: .03em; color: var(--navy); margin: 3mm 0 2mm; }
.fm-s { font: 700 7.4pt/1 var(--f-body); text-transform: uppercase; letter-spacing: .14em; color: var(--navy); margin: 3.2mm 0 1.3mm; padding: .2mm 0 .2mm 2mm; border: 0; border-left: 2.5pt solid var(--orange); background: none; }
.fm-kv th { width: 30mm; background: var(--tint); color: var(--sub); font-weight: 500; font-size: 7.8pt; }
.fm-what { border: .6pt solid var(--rule); border-left: 2.5pt solid var(--navy); padding: 1.6mm 2.2mm; margin-bottom: 1.2mm; } .fm-what b { font-size: 10pt; font-weight: 700; color: var(--navy); } .fm-what .pre { color: var(--sub); margin-top: .6mm; }
.fm-tab thead th, .fm-sign thead th { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 500; font-size: 7.6pt; }
.fm-tab .n { width: 7mm; text-align: center; color: var(--sub); } .fm-tab .yn { width: 11mm; text-align: center; } .fm-tab th.yn:last-child { width: 15mm; }
.fm-tab th.q, .fm-tab th.u { width: 13mm; } .fm-chk th.c { width: 92mm; }
.fm-tab tr.bl td { height: 5.4mm; } .fm-tab tbody tr:nth-child(even) td { background: #FAFBFC; }
.fm-box { display: inline-block; width: 3.3mm; height: 3.3mm; border: .8pt solid #0E1B2C; text-align: center; line-height: 3mm; font-size: 8pt; font-weight: 700; vertical-align: -.5mm; margin-right: 1.2mm; }
.fm-docs { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 1.2mm 3mm; border: .6pt solid var(--rule); padding: 1.6mm 2.2mm; }
.fm-res { display: flex; gap: 9mm; border: .6pt solid var(--rule); padding: 1.8mm 2.2mm; font-weight: 600; color: var(--navy); }
.fm-lines { border: .6pt solid var(--rule); border-top: 0; padding: .6mm 2.2mm 1.6mm; } .fm-lines i { display: block; height: 6mm; border-bottom: .6pt dotted var(--rule); } .fm-lines i span { font-style: normal; color: var(--sub); line-height: 6mm; }
.fm-sign { margin-top: 3mm !important; } .fm-sign tbody th { width: 22mm; background: var(--tint); color: var(--sub); font-weight: 500; font-size: 7.8pt; }
.fm-sign td { height: 5.6mm; } .fm-sign tr.sg td { height: 13mm; }
.fm-f { display: flex; justify-content: space-between; margin-top: 2.5mm; padding-top: 1.5mm; border-top: .6pt solid var(--rule); font-size: 7pt; color: #6B7785; }
@media print {
  .rail, .rail-pbox, .tabbar { display: none !important; }
  .fm-paper { padding: 0; overflow: visible; } .fm { box-shadow: none; margin: 0 auto; padding: 0 10mm; width: auto; }
  .fm, .fm * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fm-tab, .fm-sign, .fm-res, .fm-kv { break-inside: avoid; }
}
.row.tight { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; } .mt-s { margin-top: 4px; }

/* ===== notifications ===== */
.top-ic.bell, .rail-bell { position: relative; }
.bell-n { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 0; background: var(--primary); color: #fff; font: 600 10.5px/17px var(--f-sans, inherit); text-align: center; font-style: normal; }
.bell-n[hidden] { display: none; }
.rail-bell { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: inherit; text-decoration: none; font-size: 13px; border-top: 1px solid var(--line); }
.rail-bell .bell-n { position: static; margin-left: auto; }
.rail-bell.on { color: var(--primary); }
.nlist { padding: 0; }
.nrow { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.nrow:last-child { border-bottom: 0; } .nrow:hover { background: var(--surface-2); } .nrow.new { background: var(--orange-soft); }
.nrow .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .nrow b { font-weight: 600; }
.nic { flex: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.nmeta { font-size: 11.5px; color: var(--muted); } .nrow .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 6px; }
.pushc { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; } .pushc b svg { vertical-align: -3px; }
.mb { margin-bottom: 10px; }

/* ===== approvals ===== */
.apv { border-left: 4px solid #C98A12; } .apv.approved { border-left-color: var(--ok); } .apv.rejected { border-left-color: var(--bad); }
.apv-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .apv-h b svg { vertical-align: -3px; }
.apv-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.apv-steps li { display: flex; gap: 10px; padding: 6px 0; position: relative; }
.apv-steps li + li::before { content: ''; position: absolute; left: 12px; top: -6px; height: 12px; border-left: 2px solid var(--line); }
.apv-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--surface-2); color: var(--muted); border: 2px solid var(--line); }
.apv-steps li.done .apv-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.apv-steps li.no .apv-dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.apv-steps li.now .apv-dot { background: #fff; border-color: #C98A12; color: #C98A12; }
.apv-steps li.now b { color: #92570B; }
.apv-note { margin-top: 4px; padding: 6px 8px; background: var(--bad-soft); color: var(--bad); font-size: 13px; }
.apv-act { justify-content: flex-end; margin-top: 10px; }
.apmine h3 svg { vertical-align: -3px; } .bdg { display: inline-block; min-width: 20px; padding: 0 6px; background: var(--primary); color: #fff; font-size: 12px; text-align: center; border-radius: 0; }
.wfc .wf-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wf-steps { margin: 8px 0; padding-left: 20px; } .wf-steps li { margin: 3px 0; } .wf-steps li b { margin-right: 8px; }
.wf-step { border: 1px solid var(--line); padding: 10px; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.wf-n { width: 24px; height: 24px; display: grid; place-items: center; background: var(--navy); color: #fff; flex: none; }
.wf-ppl { display: flex; flex-wrap: wrap; gap: 6px; } .wf-ppl[hidden] { display: none; }
.chk { display: flex; gap: 8px; align-items: center; font-weight: 600; }

/* ===== share ===== */
.fpair { display: inline-flex; gap: 2px; align-items: stretch; }
.btn.icon { padding-left: 8px; padding-right: 8px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* a WIR has room to spare on the page: taller rows for writing by hand */
.fm.roomy th, .fm.roomy td { padding: 1.5mm 2mm; } .fm.roomy .fm-chk td { height: 8mm; } .fm.roomy .fm-lines i { height: 8mm; }
.fm.roomy .fm-sign td { height: 8mm; } .fm.roomy .fm-sign tr.sg td { height: 20mm; } .fm.roomy .fm-s { margin-top: 5mm; } .fm.roomy .fm-what { padding: 2.5mm 3mm; }
/* an MIR carries the material and spec table: tighter so it stays on one A4 sheet */
.fm.mir { font-size: 7.9pt; line-height: 1.2; } .fm.mir th, .fm.mir td { padding: .55mm 1.5mm; }
.fm.mir .fm-kv th, .fm.mir .fm-sign tbody th { font-size: 7.3pt; } .fm.mir .fm-tab thead th, .fm.mir .fm-sign thead th { font-size: 7.1pt; }
.fm.mir .fm-h { padding-bottom: 2mm; } .fm.mir .fm-logo img { max-height: 9mm; } .fm.mir .fm-no { padding: 1.4mm 3mm; } .fm.mir .fm-no > b { font-size: 13pt; margin-bottom: .4mm; }
.fm.mir .fm-t { font-size: 11.5pt; margin: 2mm 0 1.4mm; } .fm.mir .fm-s { margin: 2.2mm 0 1mm; }
.fm.mir .fm-what { padding: 1mm 2mm; margin-bottom: .8mm; } .fm.mir .fm-what b { font-size: 9pt; }
.fm.mir .fm-chk th.c { width: 104mm; } .fm.mir .fm-tab tr.bl td { height: 4.6mm; }
.fm.mir .fm-docs { padding: 1.1mm 2mm; gap: .8mm 3mm; } .fm.mir .fm-res { padding: 1.3mm 2mm; } .fm.mir .fm-lines i { height: 5mm; } .fm.mir .fm-lines i span { line-height: 5mm; }
.fm.mir .fm-sign { margin-top: 2mm !important; } .fm.mir .fm-sign td { height: 4.8mm; } .fm.mir .fm-sign tr.sg td { height: 11mm; } .fm.mir .fm-f { margin-top: 1.8mm; }
/* pages after the form: status and history, photos, attached PDFs */
.fm-page { margin-top: 8mm; break-before: page; page-break-before: always; }
.fm-ph { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; padding-bottom: 2mm; margin-bottom: 1mm; border-bottom: 2pt solid var(--navy); font-size: 8pt; color: var(--sub); }
.fm-ph b { font: 700 11pt var(--f-display); color: var(--navy); flex: 1; overflow-wrap: anywhere; }
.fm-tab th.dt, .fm-tab td.dt { width: 30mm; } .fm-tab th.dc { width: 18mm; } .fm-log th.by { width: 32mm; }
.fm-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-top: 3mm; }
.fm-photos figure { margin: 0; break-inside: avoid; } .fm-photos img { display: block; width: 100%; height: 72mm; object-fit: cover; background: var(--tint); border: .6pt solid var(--rule); }
.fm-photos figcaption { font-size: 7.6pt; color: var(--sub); padding-top: 1mm; } .fm-photos figcaption b { color: var(--navy); }
.fm-pdfp img { display: block; max-width: 100%; max-height: 255mm; margin: 2mm auto 0; border: .6pt solid var(--rule); }
@media print { .fm-page { margin-top: 0; } .fm-pdfp img { max-height: 262mm; } }
.tabbar a#tbcap { justify-content: center; } .tabbar a#tbcap .fab { margin-top: -22px; }
/* sign-off block, laid out like a consultant's review sheet */
.fm-so { margin-top: 3.5mm; border-top: .6pt solid var(--rule); padding-top: 2.5mm; }
.fm-ac, .fm-rl { display: grid; grid-template-columns: 36mm 1fr; gap: 2mm; align-items: start; margin-bottom: 1.6mm; }
.fm-ac > b, .fm-rl > b { font-weight: 700; color: var(--navy); font-size: 8.2pt; padding-top: .3mm; }
.fm-ac > div { display: flex; flex-direction: column; gap: 1mm; } .fm-ac span { display: flex; align-items: center; }
.fm-rl > div { display: flex; flex-direction: column; gap: .4mm; } .fm-blank { display: block; height: 4mm; border-bottom: .6pt dotted var(--rule); }
.fm-sg { margin-top: 2mm !important; } .fm-sg thead th { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 500; font-size: 7.6pt; }
.fm-sg th.nm { width: 34mm; } .fm-sg th.og { width: 32mm; } .fm-sg th.si { width: 30mm; } .fm-sg th.dt { width: 22mm; }
.fm-sg td { height: 11mm; } .fm-sg td.si { vertical-align: bottom; } .fm-esig { font-size: 6.5pt; color: #6B7785; }
.fm.mir .fm-so { margin-top: 2mm; padding-top: 1.6mm; } .fm.mir .fm-ac > div { flex-direction: row; flex-wrap: wrap; gap: .8mm 4mm; } .fm.mir .fm-ac, .fm.mir .fm-rl { margin-bottom: 1mm; }
.fm.mir .fm-sg td { height: 8mm; }
.fm.roomy .fm-chk td { height: 6.6mm; } .fm.roomy .fm-sg td { height: 9.5mm; } .fm.roomy .fm-s { margin-top: 4mm; }

/* A4 sheets fit the phone screen (full size when printed) */
@media screen { .fm-paper .fm { zoom: var(--fit, 1); } }
@media print { .fm-paper .fm { zoom: 1 !important; } }
@media (max-width: 760px) { .fm-paper { padding: 0 0 16px; overflow-x: hidden; } .fm-paper .fm-page { margin-top: 4mm; } }
/* Daily Report */
.fm-none { margin: 0; padding: 1.2mm 2mm; border: .6pt solid var(--rule); color: var(--sub); font-style: italic; }
.fm-txt { border: .6pt solid var(--rule); padding: 1.6mm 2.2mm; min-height: 7mm; }
.fm-sub { margin-top: 1.5mm !important; } .fm-tab td.r, .fm-tab th.q { text-align: right; } .fm-tab th.cd { width: 26mm; } .fm-tab th.st { width: 24mm; }
.fm-tab tr.tot td { background: var(--tint) !important; } .fm-note { font-size: .9em; color: var(--sub); }
.fm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.fm.dr th, .fm.dr td { padding: 1mm 1.8mm; } .fm-ac .row-l { flex-direction: row; flex-wrap: wrap; gap: 1mm 6mm; }
.fm.dr .fm-tab { break-inside: auto; } .fm.dr .fm-tab tr { break-inside: avoid; }
.fm-nil { margin-top: 3mm; font-style: normal; } .fm-nil b { color: var(--navy); font-weight: 600; }
.fm-tab th.cd { width: 37mm; }

/* ===== pile caps read from a drawing ===== */
.elbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 7px 12px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; }
.elbar[hidden] { display: none; } .elbar .grow { flex: 1; min-width: 120px; }
.elcounts { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; } .elcounts span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; } .elcounts i { width: 10px; height: 10px; border-radius: 0; display: inline-block; }
.dv-layer .elm { position: absolute; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); border-radius: 0; padding: 0; cursor: pointer; pointer-events: auto; }
.dv-layer .elm:hover { background: color-mix(in srgb, var(--c) 35%, transparent); }
.dv-layer .elm.on { border-color: #F2A91E; border-width: 3px; background: rgba(242, 169, 30, .35); box-shadow: 0 0 0 3px rgba(242, 169, 30, .35); }
.mv-legend .rcl { margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line); }
/* 3D: the drawing sheet and Mark mode */
.mv-sheet { display: inline-flex; align-items: center; gap: 6px; } .mv-sheet .lvl { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.mv-sheet .lvl input { width: 74px; min-height: 32px; padding: 2px 6px; } #shtitle { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-acts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; } .mk-acts .btn { justify-content: flex-start; }
.mk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 0; background: #2A619C; margin-right: 6px; }
.mv-panel .elcounts { margin: 6px 0; }
/* a record's drawing and markup */
.mk-prev { margin: 8px 0; border: 1px solid var(--line); background: #fff; min-height: 60px; display: grid; place-items: center; overflow: hidden; }
.mk-prev .mk-canvas { display: block; width: 100%; height: auto; } .mk-row { align-items: center; gap: 8px; } .mk-row svg { vertical-align: -3px; color: var(--ok); }
/* page headers after the form: one small line (long file names are cut, not wrapped) */
.fm-ph { padding-bottom: 1.2mm; border-bottom-width: 1.2pt; font-size: 7.4pt; gap: 3mm; }
.fm-ph b { font: 600 8.6pt/1.2 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fm-ph span { white-space: nowrap; flex: none; }
.fm-pdfp .fm-ph b { font-weight: 500; color: var(--sub); }
/* Status & Comment: where it stands now, in one row, above the timeline */
.fm-now { display: flex; flex-wrap: wrap; border: .6pt solid var(--rule); margin-bottom: 1.5mm; }
.fm-now span { flex: 1 1 auto; display: flex; flex-direction: column; padding: 1mm 2mm; border-right: .6pt solid var(--rule); } .fm-now span:last-child { border-right: 0; }
.fm-now small { font-size: 6.8pt; color: var(--sub); text-transform: uppercase; letter-spacing: .06em; } .fm-log th.ty { width: 16mm; }
.fm-now1 { margin-top: 2.5mm; }
/* site checklist on the inspection form */
.ck-f { display: flex; flex-direction: column; gap: 6px; } .ck-f .lbl { font-weight: 500; font-size: 13px; } .ck-f select { max-width: 360px; }
.ck-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; } .ck-list li { display: list-item; }
.ck-list li input { width: calc(100% - 36px); min-height: 34px; } .ck-list .x { border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; width: 30px; }
.ck-ro { margin: 4px 0 0; padding-left: 20px; } .ck-ro li { margin: 1px 0; }

/* ===== sheet form: the input page looks like the printed form ===== */
.sf-paper { padding-top: 4px; } .fm.sf { min-height: 0; }
.fm.sf .fm-t { margin-top: 0; }
.sf-no { margin: -1mm 0 2.5mm; font-size: 8.2pt; color: var(--sub); }
.sf-grid { --rule: #B9C1CB; --tint: #F2F4F7; --sub: #4F5D6E; display: grid; grid-template-columns: 30mm 1fr 30mm 1fr; border-top: .6pt solid var(--rule); border-left: .6pt solid var(--rule); }
.sf-f { display: contents; } .sf-f[hidden] { display: none; }
.sf-l, .sf-v { border-right: .6pt solid var(--rule); border-bottom: .6pt solid var(--rule); padding: .8mm 1.8mm; min-height: 8mm; display: flex; align-items: center; min-width: 0; }
.sf-l { background: var(--tint); color: var(--sub); font-size: 7.8pt; font-weight: 500; line-height: 1.2; }
.sf-f.w .sf-v { grid-column: span 3; }
.sf-v input, .sf-v select, .sf-v textarea, .sf-tab input:not([type=radio]) { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; padding: .6mm .4mm; min-height: 0; height: auto; box-shadow: none; border-radius: 0; outline: none; }
.sf-v select { cursor: pointer; padding-right: 0; } .sf-v textarea { resize: vertical; min-height: 14mm; }
.sf-v:focus-within, .sf-tab td:focus-within { background: #FFF6E0; box-shadow: inset 0 0 0 1.2pt var(--primary); }
.sf-v input::placeholder, .sf-tab input::placeholder { color: #A7B0BA; }
.sf-sec { margin-top: 1mm; } .sf-sh { display: flex; align-items: center; gap: 3mm; } .sf-sh span { flex: none; }
.sf-sh select { font: 600 8pt var(--f-body); text-transform: none; letter-spacing: 0; color: var(--navy); border: .6pt solid var(--rule); background: #fff; padding: .4mm 1.5mm; max-width: 80mm; min-height: 0; height: auto; }
.sf-tab td { padding: .4mm 1.4mm; } .sf-tab td.yn { text-align: center; } .sf-tab th.rm { width: 42mm; } .sf-tab th.x, .sf-tab td.x { width: 7mm; padding: 0; text-align: center; }
.sf-tab td.x .x { border: 0; background: none; color: #8A96A3; font-size: 13pt; cursor: pointer; line-height: 1; }
.sf-tab input[type=radio] { width: 4.2mm; height: 4.2mm; accent-color: var(--navy); cursor: pointer; margin: 0; }
.sf-add { margin-top: 1.5mm; } .sf-docs label { display: flex; align-items: center; gap: 1.5mm; cursor: pointer; } .sf-docs input { width: 3.6mm; height: 3.6mm; accent-color: var(--navy); }
.sf-ph { display: flex; flex-wrap: wrap; align-items: center; gap: 2mm; border: .6pt solid var(--rule); padding: 2mm; }
.sf-act { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding: 10px 0; justify-content: flex-end; }
.zbar { align-items: center; gap: 4px; } .zbar .zv { min-width: 44px; text-align: center; font: 500 12px var(--f-mono); color: var(--muted); }
.fm-paper.zoomed { overflow-x: auto; } .fm-paper.zoomed .fm { margin-left: 0; }
.fm-chk td.tk { font-weight: 700; color: var(--navy); }
/* record page: the same grid, fluid, in a card */
.sfc .sf-grid.ro { grid-template-columns: minmax(110px, 32%) 1fr; font-size: 13.5px; }
.sfc .sf-grid.ro .sf-f.w .sf-v { grid-column: auto; }
.sfc .sf-grid.ro .sf-l { font-size: 12px; } .sfc .sf-grid.ro .sf-v { display: block; padding-top: 6px; padding-bottom: 6px; }
.sfc .sf-v .ltab-w { margin: 0; }
.sf-tw { overflow-x: auto; } .ck-live { --rule: #B9C1CB; --tint: #F2F4F7; --sub: #4F5D6E; width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.ck-live th, .ck-live td { border: 1px solid var(--rule); padding: 5px 7px; text-align: left; }
.ck-live thead th { background: var(--navy); color: #fff; font-weight: 500; font-size: 12px; border-color: var(--navy); }
.ck-live td.n { width: 28px; text-align: center; color: var(--sub); } .ck-live th.yn, .ck-live td.yn { width: 46px; text-align: center; } .ck-live th.rm { width: 34%; }
.ck-live input[type=radio] { width: 20px; height: 20px; accent-color: var(--navy); cursor: pointer; }
.ck-live input.rmk { width: 100%; border: 0; background: transparent; padding: 4px 0; font: inherit; min-height: 0; }
.ck-live tr.r-yes td.n { background: #DDF1E4; color: var(--ok); } .ck-live tr.r-no td.n { background: var(--bad-soft); color: var(--bad); } .ck-live tr.r-na td.n { background: var(--surface-2); }
.ck-sum { margin-top: 6px; } .bad-t { color: var(--bad); }
.mk-docs { max-height: 50vh; overflow: auto; margin-top: 8px; } #mkq { width: 100%; }
@media (max-width: 760px) { .zbar { width: 100%; justify-content: flex-end; } }
.sf-f.w .sf-l { grid-column: 1; } .sf-fill .sf-l, .sf-fill .sf-v { background: #fff; }
.ck-live th, .sfc .ltab th { text-transform: none; letter-spacing: 0; } #ckc { margin-bottom: 14px; } .sfc .sf-v .ltab.ro { min-width: 0; font-size: 12.5px; }
.fm.sf input, .fm.sf select, .fm.sf textarea { font-size: inherit !important; line-height: 1.25; }

/* ===== New / Edit = the print form, with inputs in its cells ===== */
.fm.edit .fv { padding: .3mm .9mm; }
.fm .fx { display: block; width: 100%; border: 0; background: transparent; font: inherit !important; color: inherit; padding: .5mm .6mm; margin: 0; min-height: 0; height: auto; box-shadow: none; border-radius: 0; outline: none; line-height: 1.25; }
.fm select.fx { cursor: pointer; -webkit-appearance: menulist; appearance: auto; }
.fm textarea.fx { resize: vertical; min-height: 9mm; }
.fm .fx::placeholder { color: #A9B2BC; }
.fm.edit .fv { background: #FCFDFE; } .fm.edit .fv:hover { background: #F6F9FC; }
.fm.edit .fv:focus-within { background: #FFF6E0; box-shadow: inset 0 0 0 1.4pt var(--primary); }
.fm .fx-title { font-size: 10pt !important; font-weight: 700 !important; color: var(--navy); }
.fm.edit .fm-what textarea.fx { color: var(--sub); margin-top: .8mm; }
.fm .fx-h { display: inline-block; width: auto; max-width: 100%; font: 700 13pt/1.15 var(--f-display) !important; letter-spacing: .03em; color: var(--navy); padding: 0 .5mm; }
.fm-ck { display: flex; align-items: center; gap: 1.5mm; cursor: pointer; } .fm-ck input { width: 3.6mm; height: 3.6mm; accent-color: var(--navy); margin: 0; }
.fm.edit .fm-chk td.x, .fm.edit .sf-tab td.x { width: 7mm; }
.sf-photos { margin-top: 12px; } .sf-photos .card-h { gap: 10px; justify-content: flex-start; }

/* ===== tidy: short lines, tappable rows ===== */
.ap-list { display: flex; flex-direction: column; }
.ap-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.ap-row:first-child { border-top: 0; } .ap-row:hover { background: var(--surface-2); }
.ap-row .grow { display: flex; flex-direction: column; min-width: 0; } .ap-row b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row small { color: var(--muted); font-size: 12px; } .ap-row .chev { color: var(--muted); font-size: 20px; line-height: 1; }
.ap-more { display: block; padding: 8px 2px 0; font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 600; }
.head .intro, .head > div > p { margin-top: 2px; }

/* v35 list polish: search on its own line on phones, filters side by side; titles wrap to two lines */
@media (max-width: 640px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters input { grid-column: 1 / -1; min-width: 0; }
  .filters select { max-width: none; min-width: 0; }
}
.rtitle { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* record details: labels at the top; long fields (notes) get the full width under their label */
.sfc .sf-grid.ro .sf-l { align-items: flex-start; padding-top: 7px; }
.sfc .sf-grid.ro .sf-f.w .sf-l { grid-column: 1 / -1; padding-bottom: 5px; min-height: 0; }
.sfc .sf-grid.ro .sf-f.w .sf-v { grid-column: 1 / -1; }
@media (max-width: 640px) { .sfc .sf-grid.ro { grid-template-columns: minmax(84px, 30%) 1fr; } }

/* v36 one list style for every module (like the Site Diary), compact */
.rrow { padding: 8px 12px 8px 14px; gap: 8px; }
.rno { font-size: 11px; }
.rtitle { font-size: 14px; line-height: 1.3; }
.rmeta { font-size: 12px; }
.rside { gap: 6px; }
.rnum.ric { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; }
.rnum.ric svg { width: 14px; height: 14px; color: var(--muted); }
.rlist + .rlist, .strip + .rlist { margin-top: 0; }
@media (max-width: 640px) {
  .rrow { padding: 8px 10px 8px 12px; }
  .rside .pill { font-size: 10.5px; padding: 2px 7px; }
  .rside .rthumb { width: 32px; height: 32px; }
  .head { margin-bottom: 8px; }
}

/* site check: on a computer a table; on a phone one block per point — full text, Yes / No / N/A buttons, remark */
.ck-live td.yn label { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ck-live td.yn label span { display: none; }
@media (max-width: 640px) {
  .ck-live { min-width: 0; font-size: 14px; display: block; }
  .ck-live thead { display: none; }
  .ck-live tbody { display: block; }
  .ck-live tr { display: grid; grid-template-columns: 26px repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px 8px 8px 0; border: 1px solid var(--rule); margin-top: -1px; }
  .ck-live td { border: 0; padding: 0; }
  .ck-live td.n { grid-row: 1 / span 3; width: auto; padding-top: 2px; background: none !important; font-weight: 700; }
  .ck-live td.t { grid-column: 2 / -1; font-weight: 500; color: var(--navy); line-height: 1.35; }
  .ck-live td.yn { width: auto; }
  .ck-live td.yn label { gap: 6px; border: 1px solid var(--rule); padding: 7px 0; font-size: 13px; font-weight: 600; color: var(--sub); background: #fff; }
  .ck-live td.yn label span { display: inline; }
  .ck-live td.yn input { width: 16px; height: 16px; margin: 0; }
  .ck-live td.y-yes label:has(input:checked) { background: #DDF1E4; border-color: var(--ok); color: var(--ok); }
  .ck-live td.y-no label:has(input:checked) { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
  .ck-live td.y-na label:has(input:checked) { background: var(--surface-2); border-color: var(--sub); color: var(--navy); }
  .ck-live td.rm { grid-column: 2 / -1; }
  .ck-live td.rm:empty { display: none; }
  .ck-live input.rmk { border: 1px solid var(--rule); padding: 6px 8px; background: #fff; font-size: 16px !important; min-height: 36px; }
  .ck-live tr.r-yes { border-left: 3px solid var(--ok); } .ck-live tr.r-no { border-left: 3px solid var(--bad); }
}
/* team */
.tb-h { margin: 4px 0 8px; } .tmrow { width: 100%; text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; }
.tmrow .av { flex: none; } .tmrow:last-child { border-bottom: 0; } .warnc { border-color: var(--warn); background: var(--warn-soft); }
.rolehelp { margin-top: 10px; } .rolehelp summary { cursor: pointer; font-weight: 600; color: var(--navy); }
#ckc .card-h { position: sticky; top: var(--top-h, 56px); z-index: 3; background: var(--surface); }

/* Documents: folder browser */
.lib { display: grid; grid-template-columns: var(--tw, 230px) minmax(0, 1fr); gap: 14px; align-items: start; }
.lib-tree { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: calc(var(--top-h, 56px) + 10px); }
.lt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; text-decoration: none; color: var(--ink); font-size: 13px; border-bottom: 1px solid var(--line); }
.lt:last-child { border-bottom: 0; } .lt svg { width: 17px; height: 17px; color: #C98A12; flex: none; } .lt small { color: var(--muted); font: 600 11px var(--f-mono); }
.lt.on { background: var(--orange-soft, #FCEDE6); color: var(--navy); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }
.lib-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.lib-bar input { flex: 0 1 260px; min-width: 0; }
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 14px; min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--navy); text-decoration: underline; } .crumbs span { color: var(--muted); } .crumbs b { color: var(--navy); }
.folds { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.fold { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-width: 0; }
.fold:hover { border-color: var(--navy); } .fold svg { width: 28px; height: 28px; color: #E3A72F; flex: none; }
.fold b { display: block; font-size: 14px; color: var(--navy); } .fold small { display: block; font-size: 11.5px; color: var(--muted); }
.fold .fn { font: 700 13px var(--f-mono); color: var(--muted); }
.fic { flex: none; width: 34px; height: 40px; display: grid; place-items: end center; padding-bottom: 5px; font: 700 9px var(--f-mono); letter-spacing: .04em; color: #fff; background: #7A8794;
  clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.fic.pdf { background: #C2362B; } .fic.dwg { background: #2A619C; }
button.frow { width: 100%; text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; }
.frow.is-open::before { display: none; }
.flist .it { display: flex; align-items: center; gap: 10px; } .flist .it a.grow { text-decoration: none; color: inherit; min-width: 0; } .flist b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .lib { grid-template-columns: minmax(0, 1fr); }
  .lib-tree { display: none; }
  .lib-bar input { flex: 1 1 100%; }
  .folds { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); }
  .fold { border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; } .fold:last-child { border-bottom: 0; }
}

/* remove buttons */
.phw { position: relative; display: inline-block; }
.phx { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(1, 30, 65, .78); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lnk { border: 0; background: none; color: var(--muted); font-size: 11.5px; text-decoration: underline; cursor: pointer; padding: 0 0 0 8px; }
.lnk:hover { color: var(--bad); }

/* sign-in, invites, join link */
.btn.tg { background: #229ED9; border-color: #229ED9; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.tg:hover { background: #1B8BC0; } .btn.wide { width: 100%; }
.login-form h2 { margin: 0 0 4px; } .login-form .btn.wide + .btn.wide { margin-top: 8px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.kid-ok { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #E8F4FB; color: #1B6E99; margin-bottom: 10px; font-size: 13.5px; } .kid-ok svg { flex: none; }
.login-form .np { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.linkbox { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; } .linkbox input { font: 12.5px var(--f-mono); background: var(--surface-2); }

.wf-rule { border-top: 1px solid var(--line); padding: 8px 0 2px; } .wf-rh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wf-mode { margin: 6px 0; } .wfc > .btn.sm[data-newrule] { margin-top: 6px; }
.login-form form { display: flex; flex-direction: column; gap: 12px; } .login-form select { padding: 9px 10px; font-size: 16px; } .login-form .or { margin: 4px 0; }
/* "+ Add…" small form on top of everything */
.addlayer { position: fixed; inset: 0; z-index: 400; background: rgba(1, 30, 65, .35); display: grid; place-items: center; padding: 16px; }
.addbox { background: var(--surface); width: min(380px, 100%); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.addbox h3 { margin: 0; } .addbox label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; } .addbox .err { color: var(--bad); font-size: 13px; min-height: 0; }
select option[value="__new"] { font-weight: 700; color: #D9622B; }

/* approval step: tick the people who approve */
.wf-ppl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 8px; }
.wf-ppl .pp { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 400; }
.wf-ppl .pp:has(input:checked) { border-color: var(--orange); background: var(--orange-soft, #FCEDE6); }
.wf-ppl .pp input { width: 18px; height: 18px; accent-color: var(--orange); flex: none; margin: 0; }
.pp-n { display: flex; flex-direction: column; min-width: 0; } .pp-n b { font-size: 13.5px; color: var(--navy); } .pp-n small { font-size: 11.5px; color: var(--muted); }
.wf-skip { margin: 6px 0 0; color: var(--warn); } .wf-steps li.skip { opacity: .55; } .wf-steps li.skip b { text-decoration: line-through; }
.form .wf-ppl label.pp, .wf-ppl label.pp { flex-direction: row; align-items: center; text-align: left; gap: 10px; margin: 0; }

/* photo caption + mark-up */
.photo-full .pcap { width: 100%; margin: 8px 0 0; } .photo-full .pcap-t { margin: 8px 0 0; font-size: 14px; }
.phw { vertical-align: top; } .phw .phc { display: block; max-width: 96px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pvw { display: inline-flex; flex-direction: column; gap: 4px; width: 96px; vertical-align: top; } .pvw .ph { position: relative; } .pvw .ph img { cursor: pointer; }
.pvw .mk { position: absolute; left: 3px; bottom: 3px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--orange); color: #fff; font-size: 14px; cursor: pointer; }
.pvw .pvcap { width: 100%; font-size: 12px !important; padding: 4px 6px; min-height: 0 !important; }
.fm-photos figcaption .fcap { display: block; font-weight: 600; color: #111; margin-top: 1mm; }
/* full-screen mark-up editor */
body.pe-open { overflow: hidden; }
.pe { position: fixed; inset: 0; z-index: 500; background: #0B1220; display: flex; flex-direction: column; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.pe-top { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; }
.pe-b { background: none; border: 0; color: #fff; font: 600 15px var(--f-body); padding: 8px 10px; cursor: pointer; } .pe-done { color: #FF8A5B; }
.pe-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px; }
.pe-stage canvas { max-width: 100%; max-height: 100%; touch-action: none; background: #000; box-shadow: 0 4px 30px rgba(0,0,0,.5); }
.pe-bar { padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.pe-tools { display: flex; justify-content: space-around; } .pe-cols { display: flex; justify-content: center; gap: 14px; }
.pe-t { background: none; border: 0; color: #B7C0CC; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 6px; cursor: pointer; } .pe-t small { font-size: 10.5px; }
.pe-t.on { color: #FF8A5B; } .pe-c { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: var(--c); cursor: pointer; } .pe-c.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,138,91,.9); }

/* Project settings › Start */
.st-list { display: flex; flex-direction: column; border: 1px solid var(--line); }
.st-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); } .st-row:last-child { border-bottom: 0; }
.st-row b { display: block; color: var(--navy); } .st-row small { display: block; color: var(--muted); font-size: 12px; }
.st-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); color: var(--navy); }
.st-row.done .st-n { background: var(--ok); color: #fff; }
#stmsg { margin-top: 6px; min-height: 1em; } .busy { opacity: .5; pointer-events: none; }
.sg { border-top: 1px solid var(--line); padding: 10px 0; } .sg:first-of-type { border-top: 0; } .sg-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.sg-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; max-height: 360px; overflow: auto; }
.sg-it { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 400; } .sg-it.kid { padding-left: 26px; }
.sg-it input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--orange); }
.sg-name { flex: 1 1 140px; min-width: 0; padding: 5px 8px !important; min-height: 0 !important; }
.sg-it small { color: var(--muted); font-size: 11.5px; } .sg-from { margin-left: auto; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
/* logos on photos: preview as they will look (white on dark) */
.sl-list .it { display: flex; align-items: center; gap: 10px; } .sl-list input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--orange); }
.slogo { width: 76px; height: 34px; flex: none; background: #2B3542; display: grid; place-items: center; padding: 4px 6px; } .slogo img { max-width: 100%; max-height: 100%; filter: brightness(0) invert(1); }
.slogo.none { background: var(--surface-2); color: var(--muted); font-size: 10.5px; }

.pvw .pdft { width: 96px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #FBEAE8; color: #C2362B; padding: 6px; text-align: center; }
.pvw .pdft small { font-size: 10px; color: var(--muted); word-break: break-all; line-height: 1.2; max-height: 3.6em; overflow: hidden; }

/* review after the camera: big photo, mark up, caption */
.prv { position: fixed; inset: 0; z-index: 450; background: #0B1220; color: #fff; display: flex; flex-direction: column; }
.prv-list { flex: 1; overflow: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 14px; }
.prv-img { position: relative; } .prv-img img { width: 100%; max-height: 62vh; object-fit: contain; background: #000; display: block; }
.prv-x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 20px; cursor: pointer; }
.prv-row { display: flex; gap: 8px; margin-top: 8px; } .prv-mk { flex: none; border: 0; background: var(--orange); color: #fff; font: 700 14px var(--f-body); padding: 0 14px; cursor: pointer; }
.prv-cap { flex: 1; min-width: 0; background: #fff; color: #111; border: 0; padding: 10px 12px; font-size: 16px; }
.prv-doc { position: relative; padding: 14px; background: #1A2333; } .prv-bar { padding: 10px 10px calc(12px + env(safe-area-inset-bottom)); }
.cap-prev .ph .phc { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* profile: photo, position, signature */
.pf { display: flex; flex-direction: column; gap: 10px; } .pf-top { display: flex; gap: 12px; align-items: flex-start; }
.pf-av { width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 2px dashed var(--line); display: grid; place-items: center; cursor: pointer; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.pf-av img { width: 100%; height: 100%; object-fit: cover; }
.pf-sh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 13.5px; color: var(--navy); } .pf-cur { height: 26px; vertical-align: middle; }
.sigpad { position: relative; border: 1px solid var(--line); background: #fff; }
.sigpad canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; }
.sigpad::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 22%; border-bottom: 1px dashed #C8CFD8; pointer-events: none; }
.sig-hint { position: absolute; left: 0; right: 0; top: 40%; text-align: center; color: #B8C0CA; font-size: 14px; pointer-events: none; }
.sig-clr { position: absolute; right: 6px; top: 6px; }
.fm-sg td.si img.fm-sigimg { max-height: 9mm; max-width: 34mm; display: block; margin: 0 auto; }
.fm-cc { display: flex; flex-wrap: wrap; gap: 4px 14px; } .fm-cc label { display: inline-flex; gap: 5px; align-items: center; font-weight: 400; cursor: pointer; } .fm-cc small { color: #666; }

/* company look: no GenZNeer mark inside the app */
.boot img { border-radius: 0; } .boot-spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: bspin .8s linear infinite; }
@keyframes bspin { to { transform: rotate(360deg); } }
.login-co { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 4px 16px rgba(0,0,0,.08); } .login-name { font: 700 20px var(--f-body); color: var(--navy); margin: 8px 0 14px; }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; } .av { overflow: hidden; }

/* drop zone + upload review (Procore-style) */
.dz { border: 2px dashed #C5CDD6; background: var(--surface); margin-bottom: 10px; transition: background .15s, border-color .15s; }
.dz-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 14px; text-align: center; }
.dz-in b { color: var(--navy); } .dz.on { border-color: var(--orange); background: #FFF4EE; }
body.dz-page .dz { position: fixed; inset: 12px; z-index: 300; display: grid; place-items: center; border-width: 3px; background: rgba(255,244,238,.96); }
body.dz-page .dz .dz-in b { font-size: 22px; }
.up { position: fixed; inset: 0; z-index: 420; background: var(--bg); display: flex; flex-direction: column; }
.up-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--navy); color: #fff; }
.up-body { flex: 1; overflow: auto; padding: 10px 12px; } .up-hint { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.up-list { display: flex; flex-direction: column; gap: 8px; max-width: 1200px; margin: 0 auto; }
.up-row { background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: 28px minmax(140px, 1.2fr) 1.2fr 70px 2fr 1fr 1fr; gap: 6px 10px; align-items: end; padding: 8px 10px; }
.up-row.off { opacity: .5; } .up-row.done { border-color: var(--ok); } .up-row.err { border-color: var(--bad); }
.up-on { align-self: center; } .up-on input { width: 18px; height: 18px; accent-color: var(--orange); }
.up-f { display: flex; align-items: center; gap: 8px; min-width: 0; align-self: center; } .up-f small { color: var(--muted); font-size: 11.5px; word-break: break-all; }
.up-c { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); min-width: 0; }
.up-c input, .up-c select { font-weight: 500; font-size: 13.5px; padding: 6px 8px; min-height: 0; width: 100%; }
.up-st { grid-column: 2 / -1; font-size: 12.5px; } .up-bar { display: block; height: 6px; background: var(--surface-2); } .up-bar i { display: block; height: 100%; background: var(--orange); transition: width .2s; }
.up-bar-b { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
@media (max-width: 760px) {
  .up-row { grid-template-columns: 28px 1fr 1fr; } .up-f { grid-column: 2 / -1; } .up-num { grid-column: 2 / 3; } .up-rev { grid-column: 3 / 4; }
  .up-ttl { grid-column: 2 / -1; } .up-row > .up-c:nth-of-type(5), .up-row > .up-c:nth-of-type(6) { grid-column: auto; }
  .dz-in { padding: 10px; }
}

/* Telegram Login button + email folded away */
.tgw { display: flex; justify-content: center; min-height: 44px; margin: 6px 0; } .tgw iframe { max-width: 100%; }
.login-form details.em { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.login-form details.em summary { cursor: pointer; color: var(--muted); font-size: 13.5px; text-align: center; list-style: none; }
.login-form details.em[open] summary { margin-bottom: 10px; } .login-form details.em > form, .login-form details.em > label { display: flex; flex-direction: column; gap: 10px; }
.tg-off { text-align: center; margin: 0; }

/* install the company app */
.inst { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tab-h, 64px) + 10px + env(safe-area-inset-bottom)); z-index: 200; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 10px 12px; border-radius: 0; max-width: 480px; margin: 0 auto; }
.inst img { width: 40px; height: 40px; border-radius: 0; } .inst b { display: block; color: var(--navy); } .inst small { color: var(--muted); font-size: 12px; }
.inst-x { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; padding: 0 4px; }
@media (min-width: 900px) { .inst { bottom: 16px; left: auto; right: 16px; } }

.up-all { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.up-all-t { display: flex; gap: 8px; align-items: baseline; font-size: 13px; min-width: 0; } .up-all-t span:not(.up-pct) { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pct { font: 700 13px var(--f-mono); color: var(--navy); } .up-all .up-bar { height: 8px; }

.up-grp { font: 700 12px var(--f-body); color: var(--navy); padding: 10px 2px 2px; letter-spacing: .02em; }
.up-row { grid-template-columns: 28px minmax(140px, 1.2fr) 1.2fr 70px 2fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .up-row { grid-template-columns: 28px 1fr 1fr; } }

/* GenZNeer · Powered by KOOMPI */
.login-mark.gz { width: min(240px, 70vw); height: auto; }
.powered { display: inline-flex; align-items: center; gap: 8px; margin: 18px auto 0; color: var(--muted); font-size: 12px; text-decoration: none; opacity: .85; }
.powered:hover { opacity: 1; } .powered img { height: 18px; width: auto; display: block; }
.login > .powered { display: flex; justify-content: center; }
.rail-pow { display: flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.rail-pow .powered { margin: 0; font-size: 11px; } .rail-pow .powered img { height: 13px; }
.acc-pow { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin: 22px 0 8px; }
.acc-pow .powered { margin: 0; }

/* Sign in with Telegram through the bot (works on any address) */
.tgw { flex-direction: column; align-items: stretch; }
.tgw .btn.tg[aria-disabled] { opacity: .6; pointer-events: none; }
.tg-wait { text-align: center; margin: 8px 0 0; }
.tg-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 0 0; } .tg-qr-img { width: 168px; height: 168px; background: #fff; border-radius: 0; } .tg-qr-img svg { width: 100%; height: 100%; display: block; }
dd .tgw { display: inline-flex; margin: 0; } dd .tgw .btn.tg { width: auto; padding: 6px 12px; }

/* profile photo: the circle is a button; Telegram / camera / gallery, then fit it */
button.pf-av { padding: 0; font: inherit; }
button.cap-o { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.crop-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(1, 30, 65, .72); display: grid; place-items: center; padding: 16px; }
.crop-box { background: var(--surface, #fff); width: min(420px, 100%); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.crop-box h2 { margin: 0; } .crop-box p { margin: 0; }
.crop-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: #111; touch-action: none; }
.crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.crop-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -2px; }
.crop-zoom { width: 100%; accent-color: var(--accent, #E8622C); }
.crop-box .actions { display: flex; justify-content: flex-end; gap: 8px; }

/* GenZNeer mascot, small, before the name */
.gz-mini { height: 16px; width: auto; vertical-align: -3px; margin-right: 4px; }

/* GenZNeer: the mascot leads, the name stays small */
.gz-hero { display: grid; place-items: center; }
.gz-hero img { width: 104px; height: 104px; border-radius: 28px; box-shadow: 0 14px 34px -10px rgba(3, 9, 30, .45); animation: gzfloat 3.4s ease-in-out infinite; }
.gz-name { margin-top: 12px; font-weight: 700; font-size: 15px; letter-spacing: .04em; color: var(--ink, #111); text-align: center; }
.gz-name b { color: #E9A825; font-weight: 700; }
@keyframes gzfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.boot-gz { animation: gzbob 1.1s ease-in-out infinite; }
@keyframes gzbob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.boot-co { border-radius: 0; }
.boot-dots { display: flex; gap: 6px; } .boot-dots i { width: 7px; height: 7px; border-radius: 50%; background: #E9A825; opacity: .3; animation: gzdot 1.1s infinite; }
.boot-dots i:nth-child(2) { animation-delay: .18s; } .boot-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes gzdot { 0%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }
.rail-pow .gz-mini, .acc-pow .gz-mini { height: 20px; margin-right: 6px; }
@media (prefers-reduced-motion: reduce) { .gz-hero img, .boot-gz, .boot-dots i { animation: none; } }

/* inside Telegram, full screen: room for the phone's clock + Telegram's floating close / menu buttons at the top, the nav bar at the bottom */
html.tg-full { --tg-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); --tg-bot: var(--tg-safe-area-inset-bottom, 0px); }
html.tg-full .top { height: calc(var(--top-h) + var(--tg-top)); padding-top: var(--tg-top); }
html.tg-full .login { padding-top: calc(var(--tg-top) + 12px); }
html.tg-full .boot { margin-top: calc(30vh + var(--tg-top)); }
html.tg-full .pe-top { padding-top: calc(8px + var(--tg-top)); }
html.tg-full .crop-wrap { padding-top: calc(16px + var(--tg-top)); }
@media (max-width: 900px) {
  html.tg-full .tabbar { padding-bottom: max(4px, var(--tg-bot)); }
  html.tg-full .main { padding-bottom: calc(var(--tab-h) + 8px + var(--tg-bot)); }
  html.tg-full .dv-wrap, html.tg-full .mv { height: calc(100dvh - var(--top-h) - var(--tg-top) - var(--tab-h) - 8px - var(--tg-bot)); }
  html.tg-full .toast { bottom: calc(24px + var(--tg-bot)); }
}

/* clean, light: the mascot sits on the white/grey page; the name is small and grey */
.gz-hero img { width: 92px; height: auto; border-radius: 0; box-shadow: none; animation: gzfloat 3.4s ease-in-out infinite; }
.gz-name { margin-top: 10px; font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.gz-name b { color: #E9A825; }
/* the running mascot (loading) */
.gz-runner { display: block; width: 160px; height: 160px; }
.gz-runner.sm { width: 64px; height: 64px; margin: 0 auto 4px; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.boot .gz-runner + .boot-dots { display: none; }

/* the original mascot, animated inside its own file (bob, tilt, blink): no extra CSS motion; sits right on the name */
.gz-hero img { width: 104px; animation: none; display: block; }
.gz-name { margin-top: 4px; }
.gz-runner { width: 120px; height: auto; }
.gz-runner.sm { width: 56px; }
.boot .gz-runner + .boot-dots { display: flex; }
.login > .gz-name { margin-top: -18px; }

/* company card: the logo box is the picker; one Save bar when something changed */
.logo-prev.pick { position: relative; cursor: pointer; border: 1px dashed transparent; }
.logo-prev.pick:hover { border-color: var(--line); }
.logo-chg { position: absolute; right: 8px; bottom: 8px; font-size: 12px; font-weight: 600; background: #fff; border: 1px solid var(--line); padding: 3px 8px; color: var(--navy); }
.logo-new { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; background: #FFF4E5; color: #A15C00; padding: 2px 8px; }
.co-save { position: sticky; bottom: calc(var(--tab-h, 0px) + 8px); display: flex; align-items: center; gap: 8px; background: #FFF8EC; border: 1px solid #F3D9A8; padding: 10px 12px; margin-top: 4px; z-index: 5; }
@media (min-width: 901px) { .co-save { bottom: 12px; } }

/* capture choices: a tidy 2 x 2 on wider screens, even cards */
.cap-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.cap-o { min-height: 72px; align-content: center; }
@media (max-width: 560px) { .cap-opts { grid-template-columns: 1fr; } }

/* the document number next to a readable title */
.h1-no { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .02em; margin-top: 4px; }

/* row photo: almost the full height of the row */
.rthumb { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); }
.rside .rthumb { width: 56px; height: 56px; }
@media (max-width: 900px) { .rside .rthumb { width: 52px; height: 52px; } }


/* @mention suggestions under a comment box */
.mn-list { position: absolute; left: 0; right: 0; z-index: 30; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(3,9,30,.12); max-height: 260px; overflow: auto; }
.mn-it { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 8px 12px; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; }
.mn-it small { color: var(--muted); font-size: 12px; } .mn-it.on, .mn-it:hover { background: var(--surface-2); }
.cform { position: relative; }
.tg-steps { margin: 6px 0 10px; padding-left: 18px; } .tg-steps li { margin: 3px 0; }

/* first name and last name, one under the other */
.nf { display: flex; flex-direction: column; gap: 10px; }

/* the in-app camera */
.gcam { position: fixed; inset: 0; z-index: 2000; background: #000; display: flex; flex-direction: column; }
.gcam video { flex: 1; width: 100%; min-height: 0; object-fit: cover; background: #000; } .gcam video.mirror { transform: scaleX(-1); }
.gcam-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top) + var(--tg-top, 0px)) 14px 12px; }
.gcam-bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px calc(22px + env(safe-area-inset-bottom) + var(--tg-bot, 0px)); background: #000; }
.gcam-b { min-width: 72px; background: rgba(255,255,255,.14); color: #fff; border: 0; padding: 10px 14px; font: 600 15px var(--f-body); border-radius: 0; cursor: pointer; }
.gcam-flip { font-size: 22px; min-width: 52px; }
.gcam-shot { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 4px; cursor: pointer; }
.gcam-shot i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .1s; } .gcam-shot:active i { transform: scale(.88); }
.gcam-n { color: #fff; font-weight: 700; background: rgba(0,0,0,.45); padding: 6px 12px; border-radius: 0; }
.gcam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; } .gcam-flash.on { animation: gcamfl .25s ease-out; }
@keyframes gcamfl { from { opacity: .8; } to { opacity: 0; } }
.gcam-done[hidden] { display: inline-block; visibility: hidden; }

/* save / submit always in reach: the form's button row stays at the bottom of the screen (above the tab bar on a phone) */
:root { --act-b: 0px; }
@media (max-width: 900px) { :root { --act-b: calc(var(--tab-h) + max(4px, env(safe-area-inset-bottom)) + var(--tg-bot, 0px)); } }
.sf-act, .sticky-act, .main form > .actions:last-child, .main form > .actions:last-of-type {
  position: sticky; bottom: var(--act-b); z-index: 25; background: var(--surface); margin: 12px -2px 0; padding: 10px 12px;
  border-top: 1px solid var(--line); box-shadow: 0 -6px 16px -10px rgba(3, 9, 30, .25); }
.sf-act { background: var(--bg); }
/* in a pop-up sheet: the buttons stay at the bottom of the sheet while it scrolls */
.sheet form > .actions:last-child, .sheet > .actions:last-child { position: sticky; bottom: -16px; z-index: 5; background: var(--surface); margin: 12px -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
/* site check answers changed: a floating Save button, always visible */
#cksave:not([hidden]) { position: fixed; z-index: 45; right: 16px; bottom: calc(var(--act-b) + 14px); padding: 14px 22px; font-size: 15px; box-shadow: 0 10px 24px -8px rgba(3, 9, 30, .45); }
@media (max-width: 900px) { #cksave:not([hidden]) { left: 16px; } }
@media print { .sf-act, .sticky-act, #cksave { position: static !important; } }

/* Activity and comments, folded */
details.fold > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding-right: 26px; position: relative; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ''; position: absolute; right: 4px; top: 6px; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(-135deg); top: 10px; }
.fold-t { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .fold-t b { font-size: 15px; }
.fold-n { color: var(--muted); font-size: 12.5px; }
.fold-p { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.fold[open] > summary { margin-bottom: 10px; } details.fold[open] .fold-p { display: none; }
details.fold > summary { width: 100%; box-sizing: border-box; }

.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* diary rows: each box carries its own small label on a phone (the column headings show only on wide screens) */
.ed-c { display: flex; flex-direction: column; gap: 3px; min-width: 0; margin: 0; }
.ed-c > input, .ed-c > select, .ed-c > .stepper { width: 100%; }
.ed-l { display: none; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 900px) {
  .ed-l { display: block; }
  /* the diary's Save draft / Sign diary: fixed just above the tab bar, with room under the page so nothing hides behind it */
  .sticky-act { position: fixed !important; left: 0; right: 0; bottom: var(--act-b) !important; margin: 0 !important; z-index: 40; }
  .main:has(.sticky-act) { padding-bottom: calc(var(--tab-h) + 96px + env(safe-area-inset-bottom)) !important; }
}

.gcam-err { position: absolute; left: 16px; right: 16px; top: 30%; background: #fff; color: var(--ink); padding: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.gcam-err p { margin: 0; font-size: 14px; color: var(--muted); } .gcam-err small { color: var(--muted); font-size: 11px; }
.gcam-err-b { display: flex; gap: 8px; flex-wrap: wrap; }

/* Capture tray: tap a photo to edit it again */
.ph-ed { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.ph-ed img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-edt { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 0; pointer-events: none; }

/* site check: the checklist picker in the card header; add / remove lines (requester); answers (inspector) */
.ck-pick { max-width: 60%; font: 600 14px var(--f-body); padding: 6px 8px; border: 1px solid var(--line); background: #fff; }
.ck-who { margin: -4px 0 8px; }
.ck-rm { border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 0 4px; }
.ck-add { margin-top: 10px; gap: 8px; } .ck-add input { min-width: 0; }

/* marking a record: several places, then Done */
.mkbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); flex-wrap: wrap; }
.mkbar-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; } .mkbar-t b { font-size: 14px; }
.mkbar-b { display: flex; gap: 6px; flex-wrap: wrap; }
.mark-pin .mk-n, .mark-box .mk-n { position: absolute; top: -11px; right: -11px; min-width: 20px; height: 20px; border-radius: 0; background: var(--navy); color: #fff; font: 700 12px/20px var(--f-body); text-align: center; padding: 0 5px; }
.mark-pin .mk-n { top: -16px; right: -16px; }
.mk-fig { display: block; color: inherit; text-decoration: none; margin-bottom: 10px; } .mk-fig:last-child { margin-bottom: 0; }
.mk-cap { font-size: 13px; color: var(--muted); margin-top: 4px; }
.mk-on { display: flex; flex-direction: column; gap: 2px; }

/* who uploaded / checked / approved: photo and short name */
.whos { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 6px; }
.who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.who .av { width: 28px; height: 28px; font-size: 10.5px; }
.who-t { display: flex; flex-direction: column; line-height: 1.15; } .who-t small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.who-t b { font-size: 13px; white-space: nowrap; }
.who.bad .who-t small { color: var(--bad, #B3261E); }

/* language switch */
.lang-sw { position: absolute; top: 12px; right: 12px; display: inline-flex; border: 1px solid var(--line); background: #fff; border-radius: 0; overflow: hidden; z-index: 2; }
.lang-sw button { border: 0; background: none; padding: 5px 11px; font: 600 13px var(--f-body); color: var(--muted); cursor: pointer; }
.lang-sw button.on { background: var(--navy); color: #fff; }
.login { position: relative; }
.lang-seg button { min-width: 96px; }

/* Khmer: stacked letters need room above and below, and no squeezed or spaced-out letters */
html.km body { line-height: 1.65; }
html.km * { letter-spacing: 0 !important; }
html.km h1 { line-height: 1.35; } html.km h2, html.km h3 { line-height: 1.45; }
html.km .eyebrow, html.km .btn, html.km .tab-l, html.km .tag, html.km .pill, html.km .rpill, html.km small, html.km .who-t small { text-transform: none !important; }
html.km .eyebrow { font-size: 12.5px; }
html.km .btn { line-height: 1.3; padding-top: 7px; padding-bottom: 7px; }
html.km .tabbar a, html.km .tabbar span { font-size: 11.5px; line-height: 1.25; }
html.km .who-t small { font-size: 11px; }
html.km input::placeholder { line-height: 1.6; }
html.km small, html.km span, html.km label, html.km .sm { line-height: 1.5; }
html.km .btn.sm { line-height: 1.35; }

/* mark-up: above the in-app camera; the selected text's bar; writing a text */
.pe { z-index: 2100; }
.pe-sel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px 0; }
.pe-sb { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 0; padding: 7px 12px; font: 600 13px var(--f-body); }
.pe-hint { font-size: 11.5px; color: rgba(255,255,255,.65); }
.pe-tx { position: absolute; left: 10px; right: 10px; top: calc(56px + env(safe-area-inset-top)); background: #16233A; padding: 10px; border-radius: 0; box-shadow: 0 8px 30px rgba(0,0,0,.5); z-index: 3; }
html.tg-full .pe-tx { top: calc(56px + var(--tg-top)); }
.pe-tx textarea { width: 100%; box-sizing: border-box; font: 600 17px var(--f-body); padding: 10px; border: 0; border-radius: 0; resize: none; }
.pe-tx-b { display: flex; justify-content: space-between; margin-top: 8px; }
/* the collapsible sections (Discussion, Activity) are details.fold: not the folder-list .fold row — content opens below the title */
details.fold { display: block; align-items: initial; gap: 0; text-decoration: none; }
details.fold:last-child { border-bottom: 1px solid var(--line); }
details.fold:hover { border-color: var(--line); }
details.fold, details.fold:last-child { border: 1px solid var(--line); padding: 12px 14px; }

/* Telegram: share / save choices */
.tgs { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.tgs-b { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.tgs-b svg { width: 22px; height: 22px; flex: none; } .tgs-b > span { display: flex; flex-direction: column; min-width: 0; }
.tgs-b b { font-size: 15px; color: var(--navy); } .tgs-b small { font-size: 12.5px; color: var(--muted); }
.tgs-b:disabled { opacity: .6; }

/* mark-up, clean: white like the photo view; icons only; caption under the photo */
.pe { background: #fff; color: var(--ink); }
.pe-top { border-bottom: 1px solid var(--line); }
.pe-b { color: var(--navy); } .pe-done { color: var(--orange); font-weight: 700; }
.pe-stage { background: #fff; padding: 10px 12px 4px; }
.pe-stage canvas { background: #eee; box-shadow: none; }
.pe-cap { margin: 6px 12px 0; padding: 12px; border: 1.5px solid var(--line); font: 400 16px var(--f-body); color: var(--ink); background: #fff; }
.pe-cap:focus { outline: none; border-color: var(--orange); }
.pe-bar { border-top: 1px solid var(--line); margin-top: 8px; }
.pe-tools { align-items: center; justify-content: space-between; gap: 2px; flex-wrap: wrap; }
.pe-t { color: var(--muted); padding: 8px; border-radius: 50%; } .pe-t.on { color: var(--orange); background: var(--orange-soft); }
.pe-t svg { width: 24px; height: 24px; }
.pe-sep { width: 1px; height: 24px; background: var(--line); margin: 0 2px; }
.pe-c { width: 24px; height: 24px; border: 2px solid var(--line); } .pe-c.on { border-color: var(--navy); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
.pe-sel { padding: 6px 12px 0; }
.pe-sb { background: var(--bg); color: var(--navy); border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }
.pe-sb svg { width: 20px; height: 20px; }
.pe-hint { color: var(--muted); }
.pe-tx { background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(1,30,65,.18); }
.pe-tx textarea { border: 1.5px solid var(--orange); }
.pe-share svg { width: 22px; height: 22px; } .pe-share { color: var(--navy); }
/* the tool row stays above the phone's own buttons (Telegram full screen gives its bottom inset in --tg-bot) */
.pe-bar { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
html.tg-full .pe-bar { padding-bottom: calc(18px + var(--tg-bot, 0px)); }
html.tg-full .pe-top { padding-top: calc(8px + var(--tg-top, 0px)); }
/* the photo, then its caption right under it; the tools at the bottom */
.pe-stage { flex: 0 1 auto; padding-top: 14px; }
.pe-stage canvas { max-height: calc(100dvh - 250px); }
html.tg-full .pe-stage canvas { max-height: calc(100dvh - 250px - var(--tg-top, 0px) - var(--tg-bot, 0px)); }
.pe-cap { margin-top: 10px; }
.pe-bar { margin-top: auto; }

/* zoom in the mark-up: the photo moves inside its frame */
.pe-stage { position: relative; overflow: hidden; }
.pe-stage canvas { transform-origin: 0 0; will-change: transform; }
.pe-fit { position: absolute; right: 18px; top: 20px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(1,30,65,.75); color: #fff; display: grid; place-items: center; z-index: 2; }
.pe-fit svg { width: 20px; height: 20px; }
.pe-panning canvas { cursor: grab; }
/* mark-up as a panel over the page (like the photo view), not full screen: photo about half the screen, caption, tools right under */
.pe { inset: auto 0 0 0; top: auto; max-height: 94dvh; box-shadow: 0 0 0 100vmax rgba(1, 18, 40, .45), 0 -8px 30px rgba(0,0,0,.2); border-radius: 0; }
.pe-top { border-bottom: 0; padding-top: 10px; }
html.tg-full .pe-top { padding-top: 10px; }
.pe-stage { padding-top: 2px; }
.pe-stage canvas { max-height: 52dvh; }
html.tg-full .pe-stage canvas { max-height: 52dvh; }
.pe-bar { margin-top: 10px; }
.pe-tx { top: 52px; }
html.tg-full .pe-tx { top: 52px; }
@media (min-width: 900px) { .pe { left: 50%; right: auto; width: 720px; transform: translateX(-50%); } }
.by-who { display: inline-flex; align-items: center; gap: 6px; } .by-who .av { width: 22px; height: 22px; font-size: 9px; }

/* the sign-off table is the record's history: rejections stand out */
.fm-sg tr.k-rejected td { color: #B91C1C; } .fm-sg tr.k-comment td { color: #444; font-size: .95em; }

.apv-back { margin: 8px 0 2px; padding: 8px 10px; background: #FDECEC; color: #8F1D1D; font-size: 13.5px; }
.apv-hist { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.apv-hist ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.apv-hist li { padding-left: 12px; border-left: 3px solid var(--line); } .apv-hist li.h-rejected { border-color: #B91C1C; } .apv-hist li.h-approved, .apv-hist li.h-checked { border-color: #1D7A43; }

/* "Powered by KOOMPI": the Fuxineer mascot a little bigger than the KOOMPI logo */
.rail-pow .gz-mini, .acc-pow .gz-mini { height: 30px; margin-right: 8px; }
.rail-pow .powered img { height: 14px; } .acc-pow .powered img { height: 16px; }
/* mark-up panel, redesigned for phones: a clear top bar (below Telegram's own buttons), the photo, the caption,
   one row of tools, one row of colours; nothing wraps */
.pe { max-height: calc(100dvh - 12px); }
html.tg-full .pe { max-height: calc(100dvh - var(--tg-top, 0px) - 8px); }
.pe-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 14px 6px; }
.pe-top > :first-child { justify-self: start; } .pe-top > .pe-done { justify-self: end; grid-column: 3; } .pe-top > .pe-share { justify-self: center; grid-column: 2; }
.pe-b { font: 600 15px var(--f-body); color: var(--navy); padding: 8px 4px; }
.pe-done { background: var(--orange); color: #fff !important; border-radius: 0; padding: 8px 20px; font-weight: 700; }
.pe-stage { padding: 4px 14px 0; }
.pe-stage canvas { border-radius: 0; }
.pe-cap { margin: 10px 14px 0; padding: 11px 12px; border-radius: 0; border: 1.5px solid var(--line); font-size: 15px; }
.pe-bar { margin-top: 10px; padding: 10px 10px calc(12px + env(safe-area-inset-bottom)); gap: 10px; border-top: 1px solid var(--line); }
html.tg-full .pe-bar { padding-bottom: calc(12px + var(--tg-bot, 0px)); }
.pe-tools { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; flex-wrap: nowrap; justify-items: center; }
.pe-t { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border-radius: 0; color: #5B6878; }
.pe-t svg { width: 22px; height: 22px; }
.pe-t.on { color: var(--orange); background: var(--orange-soft); }
.pe-t[data-a="undo"] { color: var(--navy); }
.pe-sep { display: none; }
.pe-cols { display: flex; justify-content: center; gap: 18px; padding: 2px 0 0; }
.pe-c { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(1,30,65,.15); padding: 0; }
.pe-c[data-c="#FFFFFF"] { border-color: #C9D1DB; }
.pe-c.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); border-color: transparent; }
.pe-sel { padding: 8px 14px 0; gap: 10px; }

/* owner / admins, roles, the person sheet */
.tag.own { background: #FFF1D6; color: #8A5A00; } .tag.adm { background: #E3EDFA; color: #12305A; }
.own-row { margin: 4px 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ps-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .ps-h h2 { margin: 0; }
.av.lg { width: 52px; height: 52px; font-size: 18px; }
.ps-adm { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); }
.ps-adm small { display: block; color: var(--muted); font-size: 12.5px; }
tr.dir-ed { cursor: pointer; } tr.dir-ed:hover td { background: var(--bg); }
.role-it { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; display: flex; align-items: center; gap: 10px; font: inherit; color: inherit; }
.role-it small { display: block; font-size: 12px; } button.role-it { cursor: pointer; }

/* photo review (from the gallery or the phone's camera): clean, like mark-up; tap a photo to mark it up */
.prv { background: #fff; color: var(--ink); }
.prv-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; border-bottom: 1px solid var(--line); }
html.tg-full .prv-top { padding-top: calc(8px + var(--tg-top, 0px)); }
.prv-top b { font-size: 15px; color: var(--navy); }
.prv-list { padding: 12px 14px; gap: 18px; }
.prv-img img { background: #EEF1F4; border-radius: 0; max-height: 58vh; }
.prv-tap { display: block; width: 100%; padding: 0; border: 0; background: none; position: relative; cursor: pointer; }
.prv-pen { position: absolute; left: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(1,30,65,.75); color: #fff; display: grid; place-items: center; font-size: 18px; }
.prv-x { background: rgba(1,30,65,.7); top: 10px; right: 10px; }
.prv-cap { margin-top: 8px; width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 0; padding: 11px 12px; font-size: 15px; color: var(--ink); }
.prv-cap:focus { outline: none; border-color: var(--orange); }
.prv-doc { background: var(--bg); border: 1px solid var(--line); border-radius: 0; }
.prv-bar { border-top: 1px solid var(--line); padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
html.tg-full .prv-bar { padding-bottom: calc(12px + var(--tg-bot, 0px)); }
.prv-bar .btn { border-radius: 0; }
/* "Powered by KOOMPI" sits by the mascot's face (not its crown), right next to it */
.rail-pow, .acc-pow { gap: 2px; }
.rail-pow .gz-mini, .acc-pow .gz-mini { margin-right: 0; }
.rail-pow .powered, .acc-pow .powered { transform: translateY(5px); }
/* mascot → "Powered by": the same gap as "Powered by" → KOOMPI; the mascot clearly bigger than the KOOMPI logo */
.rail-pow, .acc-pow { gap: 8px; }
.rail-pow .gz-mini, .acc-pow .gz-mini { height: 36px; }
.rail-pow .powered, .acc-pow .powered { transform: translateY(6px); }
/* home: Recent activity folded, at the end; the latest action shows on the closed card */
.home-act .fold-t { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .home-act .fold-t h3 { margin: 0; }
.home-act .fold-p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* pile caps: count table, IFC check */
table.cnt { width: 100%; border-collapse: collapse; font-size: 13px; } table.cnt th, table.cnt td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.cnt th:first-child { text-align: left; } table.cnt .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.cnt-h { margin: 14px 0 6px; font-size: 14px; }
.cnt-n { border: 0; background: var(--bg); color: var(--navy); font: 700 13px var(--f-body); padding: 3px 9px; border-radius: 0; cursor: pointer; } .cnt-n:hover { background: var(--orange-soft); }
.ifc-v { padding: 10px 12px; font-weight: 700; margin: 6px 0 10px; } .ifc-v.ok { background: #E6F4EC; color: #1D7A43; } .ifc-v.warn { background: #FFF4DE; color: #8A5A00; }
.ifc-rows > div { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); } .ifc-rows b { min-width: 60px; font-size: 15px; color: var(--navy); }
.ifc-rows span { flex: 1; font-size: 13.5px; } .ifc-rows .bad b { color: #B91C1C; } .ifc-rows .warn b { color: #8A5A00; }
.fit-good { color: #1D7A43; } .fit-fair { color: #8A5A00; } .fit-poor { color: #B91C1C; }

/* site diary: the day on the drawings */
.dayels h3 { margin-bottom: 4px; }
.dayel { margin-top: 12px; } .dayel-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.dayel-pic canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 0; }
.dayel-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.dayel-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.fm-dayel { width: 100%; border: 1px solid #ccc; margin: 4px 0 8px; }

/* the decision sheet: comment + attachments */
.dc-att { display: flex; flex-direction: column; gap: 8px; }
.dc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-f { position: relative; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); }
.dc-f img, .dc-f b { width: 74px; height: 56px; object-fit: cover; border-radius: 0; border: 1px solid var(--line); display: grid; place-items: center; background: var(--bg); color: #B91C1C; }
.dc-f button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; font-size: 13px; cursor: pointer; }

.mk-next { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); margin-right: auto; }

/* switch project: the code in the top bar and the name on Home open the list */
.top-proj { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; border-radius: 0; padding: 4px 10px; font: 700 14px var(--f-mono); color: var(--navy); cursor: pointer; margin-left: 4px; }
.top-proj i { font-style: normal; font-size: 11px; color: var(--muted); }
.hello-proj { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.pj-it { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; display: flex; align-items: center; gap: 12px; padding: 12px 4px; font: inherit; color: inherit; cursor: pointer; }
.pj-it small { display: block; } .pj-it.on { background: var(--orange-soft); } .pj-c { font-weight: 700; color: var(--navy); min-width: 84px; } .pj-on { color: var(--orange); font-weight: 700; }

/* upload review: phone rows (Type, Discipline side by side, Location full width); the finished summary */
@media (max-width: 760px) {
  .up-row > .up-c.up-type.up-type { grid-column: 2 / 3; } .up-row > .up-c.up-disc.up-disc { grid-column: 3 / 4; } .up-row > .up-c.up-loc.up-loc { grid-column: 2 / -1; } .up-row > .up-st { grid-column: 2 / -1; }
}
.up-done { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.ifc-chip { border: 0; border-radius: 0; padding: 4px 10px; font: 700 12px var(--f-body); cursor: pointer; }
.ifc-chip.ok { background: #E6F4EC; color: #1D7A43; } .ifc-chip.warn { background: #FFF4DE; color: #8A5A00; }

/* model versions: the screen, each discipline's card, the upload steps */
.sheet:has(.mvh), .sheet:has(.mvu) { width: min(780px, 100%); }
.mvh, .mvu { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mvh-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.mvh-head h2 { margin: 2px 0 4px; }
.mvh-card { border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mvh-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.mvh-top h3 { margin: 2px 0; }
.mvh-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.mvh-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.mvh-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.mvh-checks li { display: flex; gap: 8px; align-items: baseline; }
.mvh-checks i { font-style: normal; font-weight: 700; width: 16px; height: 16px; display: inline-grid; place-items: center; font-size: 11px; flex: none; }
.mvh-checks li.ok i { background: var(--ok-soft); color: var(--ok); } .mvh-checks li.warn i { background: var(--warn-soft); color: var(--warn); }
.mvh-diff { margin: 0; }
.mvh-hist summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.mvh-tbl { width: 100%; border-collapse: collapse; margin-top: 6px; }
.mvh-tbl td { border-top: 1px solid var(--line); padding: 6px 6px 6px 0; vertical-align: top; }
.mvh-tbl tr.archived td { color: var(--muted); }
.mvh-acts { text-align: right; white-space: nowrap; } .mvh-acts .btn { margin-left: 4px; }
.pill.sm.current { --c: var(--ok); } .pill.sm.superseded { --c: var(--muted); } .pill.sm.archived { --c: var(--warn); }
.pill.sm.bad { --c: var(--bad); } .pill.sm.warn { --c: var(--warn); }
.mvh-add { display: flex; }
.mvh-foot { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.mvu-prog { display: flex; flex-direction: column; gap: 8px; padding: 18px 0; }
.mvu-groups { border: 1px solid var(--line); padding: 10px; margin: 0; min-width: 0; }
.mvu-groups legend { font-weight: 600; padding: 0 4px; }
.mvu-gl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 12px; margin: 6px 0; }
.mvu-diff { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.mvu-diff > div { border: 1px solid var(--line); padding: 8px; }
.mvu-diff b { font-size: 18px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.m-links { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.m-links a.row { color: var(--ink); text-decoration: none; gap: 6px; }
.ifc-rev { font-weight: 500; opacity: .75; margin-left: 2px; }
.note.warn { background: var(--warn-soft); color: var(--warn); padding: 8px 10px; }
@media (max-width: 600px) { .mvh-tbl td:nth-child(4) { display: none; } .mvh-acts { white-space: normal; } }

/* project setup › codes */
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cd-l { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .cd-l textarea { font-size: 13px; line-height: 1.5; }
.cd-prev { background: var(--surface-2); padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; overflow-x: auto; }

.cd-parts { border: 1px solid var(--line); padding: 10px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cd-parts legend { font-weight: 600; padding: 0 4px; }
.cd-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.cd-row select { min-width: 0; width: 100%; }
/* sheets never squeeze their parts: the sheet scrolls instead */
.sheet > *, .mvh > *, .mvu > *, #mvu-b > * { flex-shrink: 0; }

/* mark tools on the drawing: point, box, line */
.mktools { position: absolute; left: 50%; transform: translateX(-50%); top: 120px; z-index: 6; display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12); padding: 3px; }
.mktools button { border: 0; background: transparent; display: flex; align-items: center; gap: 5px; padding: 7px 10px; font: 600 13px var(--f-body); color: var(--ink); cursor: pointer; }
.mktools button svg { width: 20px; height: 20px; }
.mktools button.on { background: var(--navy); color: #fff; }
.mkt-line { display: flex; gap: 2px; border-left: 1px solid var(--line); margin-left: 4px; padding-left: 4px; }
.mkt-line #mkt-fin { background: #E0592A; color: #fff; }
@media (max-width: 600px) { .mktools { top: auto; bottom: calc(150px + env(safe-area-inset-bottom)); } .mktools button span { display: none; } .mkt-line button { font-size: 12px; } }
.dv-wrap { position: relative; }
.mk-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.mk-pline { fill: none; stroke: var(--c); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.mk-poly { fill: color-mix(in srgb, var(--c) 16%, transparent); stroke: var(--c); stroke-width: 3; stroke-linejoin: round; }
.mk-vx { fill: #fff; stroke: #E0592A; stroke-width: 2.5; } .mk-vx.first { fill: #E0592A; }
.mark-pin.bare::before, .mark-pin.bare::after { display: none; }

/* several checklists on one inspection */
.ck-pickbtn { border: 1px solid var(--line); background: var(--surface); padding: 5px 10px; font: 600 13px var(--f-body); color: var(--ink); cursor: pointer; text-align: left; max-width: 100%; }
.ck-pickl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.ck-g { display: flex; flex-direction: column; gap: 3px; }
tr.ck-sec td { background: var(--surface-2); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 5px 8px; }

/* the mark editor: tools, shapes, handles */
.mktools { flex-wrap: wrap; max-width: calc(100% - 24px); justify-content: center; }
.mktools button:disabled { opacity: .35; cursor: default; }
.mktools .mkt-sep { width: 1px; background: var(--line); margin: 4px 4px; align-self: stretch; }
.mktools #mkt-del { color: var(--bad); } .mktools #mkt-del:not([hidden]) { display: flex; }
.mkt-line .fin { background: #E0592A; color: #fff; }
.mk-svg .mk-s { stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.mk-svg .mk-fill { fill: color-mix(in srgb, var(--c) 12%, transparent); }
.mk-svg .mk-ln { fill: none; stroke: var(--c); stroke-width: 2.5; }
.mk-svg polyline.mk-s { fill: none; }
.mk-svg .mk-pt { fill: color-mix(in srgb, var(--c) 15%, transparent); stroke: var(--c); stroke-width: 2; }
.mk-svg .mk-dot, .mk-svg .mk-hd { fill: var(--c); stroke: none; }
.mk-svg .mk-s.on { filter: drop-shadow(0 0 3px rgba(1,30,65,.55)); }
.mk-svg .ghost { stroke-dasharray: 6 4; }
.mk-svg .mk-h { fill: #fff; stroke: var(--navy); stroke-width: 2; }
@media (max-width: 600px) { .mktools button { padding: 7px 7px; } }

/* mark tools: one strip above the drawing; it scrolls sideways on a phone */
.dv-wrap .mktools { position: static; transform: none; top: auto; bottom: auto; max-width: none; box-shadow: none; border: 0; border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 4px 8px; scrollbar-width: thin; }
.dv-wrap .mktools[hidden] { display: none; }
.dv-wrap .mktools button { flex: none; }
@media (max-width: 600px) { .dv-wrap .mktools button span { display: none; } .dv-wrap .mktools .mkt-line button { font-size: 12px; } }

/* punch list: items with their own before / after photos */
.pl-card .pl-bar { height: 6px; background: var(--surface-2); display: flex; margin: 4px 0 10px; }
.pl-card .pl-bar i { display: block; height: 100%; background: var(--ok); } .pl-card .pl-bar i.fx { background: #C98A12; }
.pl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-it { border: 1px solid var(--line); border-left: 4px solid #7A8794; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pl-it.st-fixed { border-left-color: #C98A12; } .pl-it.st-ok { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 4%, transparent); }
.pl-top { display: flex; gap: 10px; align-items: flex-start; }
.pl-n { min-width: 22px; height: 22px; display: inline-grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; }
.pl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pl-t > span { font-weight: 600; }
.pl-menu { padding: 2px 8px; }
.pl-rej { font-size: 12.5px; color: var(--bad); }
.pl-phs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-ph { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; }
.pl-phl { width: 100%; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.pl-th { border: 0; padding: 0; width: 56px; height: 56px; cursor: pointer; background: var(--surface-2); } .pl-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-add { width: 56px; height: 56px; border: 1px dashed var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 2px; color: var(--muted); cursor: pointer; font-weight: 700; }
.pl-add svg { width: 18px; height: 18px; }
.pl-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.pl-new { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pl-newr { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
@media (max-width: 600px) { .pl-newr { grid-template-columns: 1fr; } }
.fm-pl td { vertical-align: top; } .fm-plp img { width: 30mm; height: 22mm; object-fit: cover; margin: 0 1mm 1mm 0; }

.ck-sug { background: var(--surface-2); padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.fm-below th { width: 28%; text-align: left; vertical-align: top; } .fm-below td textarea.fx { min-height: 64px; width: 100%; } .fm-below td .pre { min-height: 1.4em; }

/* submittals register and handover readiness */
.sb-k { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.sb-k .kpi { cursor: pointer; }
.sb-tbl td small { font-size: 11.5px; }
.ho-all { display: flex; flex-direction: column; gap: 8px; }
.ho-big { display: flex; align-items: baseline; gap: 8px; } .ho-big b { font-size: 40px; font-variant-numeric: tabular-nums; } .ho-big span { color: var(--muted); }
.ho-bar { height: 10px; background: var(--surface-2); } .ho-bar i { display: block; height: 100%; background: var(--ok); } .ho-bar.sm { height: 6px; }
.ho-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 10px; }
.ho-it { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.ho-top { display: flex; justify-content: space-between; gap: 8px; } .ho-n { font-variant-numeric: tabular-nums; font-weight: 700; }
.ho-add { align-self: flex-start; margin-top: 4px; }
.prog-card { margin-bottom: 12px; }

.lt-no { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; margin-right: 2px; }
.zp-mode label.chk { align-items: flex-start; } .zp-f { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; margin-bottom: 6px; }

.sb-k .sc { border: 0; background: transparent; cursor: pointer; text-align: left; font: inherit; color: inherit; } .sb-k .sc.on { box-shadow: inset 0 -3px 0 var(--orange); }

.ct-rec { border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 0; padding: 10px 12px; margin: 10px 0; background: var(--soft, #F6F7F9); }
.ct-rec p { margin: 4px 0 0; }
.ct-tab td, .ct-cmp td { vertical-align: top; } .ct-tab input.cell { width: 72px; text-align: right; } .ct-tab tr.chg td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.ct-cmp th, .ct-cmp td { min-width: 120px; }

.cp-t { color: #B91C1C; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.cp-warn { border-left: 3px solid #C98A12; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gantt .gb.crit { box-shadow: 0 0 0 2px #B91C1C; } .glegend .lc { display: inline-block; width: 14px; height: 8px; border: 2px solid #B91C1C; border-radius: 0; }
.tia table td { vertical-align: top; } .tia .big { font-size: 22px; font-weight: 800; }
.acts-pick .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; } .acts-pick .chip { background: var(--soft, #EEF1F4); border-radius: 0; padding: 2px 8px; font-size: 12px; }
.acts-pick .chip button { border: 0; background: none; cursor: pointer; padding: 0 0 0 4px; } .acts-res { max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 0; margin-top: 4px; }
.acts-res button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; font: inherit; cursor: pointer; } .acts-res button:hover { background: var(--soft, #EEF1F4); }

.closed-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }

/* form header: party logos side by side, then the number box */
.fm-h { grid-template-columns: 1fr 52mm; }
.fm-logos { display: grid; grid-template-columns: repeat(var(--n), 1fr); align-items: stretch; margin-right: 3mm; }
.fm-lg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm; padding: 0 2mm; min-width: 0; text-align: center; }
.fm-lg + .fm-lg { border-left: .6pt solid var(--rule); }
.fm-lg img { max-height: 11mm; max-width: 100%; object-fit: contain; }
.fm-lg b { font: 700 10pt/1.15 var(--f-display); color: var(--navy); overflow-wrap: anywhere; }
.fm-lg small { font-size: 6.4pt; text-transform: uppercase; letter-spacing: .12em; color: var(--sub); }
.fm.mir .fm-lg img { max-height: 9mm; }

/* next steps: the buttons sit with Print / Edit / Delete; what to do next is one quiet line under them */
.hacts { display: contents; }
.next-note { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--orange); background: var(--soft, #F6F7F9); border-radius: 0; font-size: 14px; }
.next-note .apv-back { margin-bottom: 4px; } .next-note .muted.sm { display: inline; margin-left: 4px; }

.next-note b { font-weight: 600; }

.fm-pos { display: block; color: var(--sub); font-size: 7pt; margin-top: .3mm; }

.blw { display: grid; gap: 10px; } .blw-f { display: grid; gap: 4px; } .blw-f > span { font-size: 13px; font-weight: 600; color: var(--sub, #5A646C); }
.blw-f textarea, .blw-f input, .blw-f select { width: 100%; }

/* the app-style record form */
.af { display: grid; gap: 14px; } .af-c h3 { margin: 0 0 10px; } .af-sub { display: block; margin: 8px 0 6px; font-size: 13px; }
.af-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 14px; }
.af-f { display: grid; gap: 5px; align-content: start; min-width: 0; } .af-f.w, .af-only:has(.af-f.w) { grid-column: 1 / -1; }
.af-f > span { font-size: 13px; font-weight: 600; color: var(--sub, #5A646C); }
.af .fx { width: 100%; box-sizing: border-box; border: 1px solid var(--line, #D5DCE3); border-radius: 0; padding: 9px 10px; background: #fff; font: inherit; font-size: 15px; color: inherit; }
.af textarea.fx { min-height: 72px; resize: vertical; } .af .fm-tab .fx { padding: 6px 8px; font-size: 14px; }
.af-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; } .af-checks .chk { font-size: 14px; }
.af .sf-sh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.af-from { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 8px 10px; background: var(--soft, #F6F7F9); border-radius: 0; font-size: 13px; }
.af-from svg { width: 16px; height: 16px; flex: none; color: var(--orange); margin-top: 1px; }
.af-more > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; } .af-more > summary::-webkit-details-marker { display: none; }
.af-more > summary::before { content: '▸'; color: var(--sub, #5A646C); } .af-more[open] > summary::before { content: '▾'; } .af-more[open] > summary { margin-bottom: 12px; }

.draft-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-left: 3px solid var(--orange); margin-bottom: 12px; }

.act-w + .act-w { margin-top: 6px; } .act-why { font-size: 12px; padding: 2px 2px 3px; color: var(--sub, #5A646C); } .act-why b { color: var(--navy, #0F2A44); }
.act-why.late b, .act-why.late span { color: #B91C1C; } .act-why.soon span { color: #C98A12; font-weight: 600; }

/* phone: a round "+" stays above the bottom bar on every list, so New is always one tap away */
.fab-new { display: none; }
@media (max-width: 899px) {
  .fab-new { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%;
    background: var(--orange, #E0592A); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.22); z-index: 30; border: 0; }
  .fab-new svg { width: 26px; height: 26px; }
}

.dsub { margin: 14px 0 6px; font-size: 14px; } .ph .phno { position: absolute; left: 4px; bottom: 4px; font-style: normal; font-size: 10px; background: rgba(15,42,68,.8); color: #fff; padding: 1px 5px; border-radius: 0; } a.ph { position: relative; display: block; }

/* speak instead of type */
.mic-w { position: relative; display: block; width: 100%; } .mic-w > textarea { padding-right: 44px !important; }
.mic { position: absolute; right: 6px; bottom: 6px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line, #D5DCE3); background: #fff; color: var(--sub, #5A646C); display: grid; place-items: center; cursor: pointer; }
.mic svg { width: 18px; height: 18px; } .mic.on { background: #B91C1C; border-color: #B91C1C; color: #fff; animation: micp 1.2s infinite; }
@keyframes micp { 50% { box-shadow: 0 0 0 6px rgba(185,28,28,.18); } }
.af-f > .mic-w, .blw-f > .mic-w { font-size: inherit; font-weight: normal; color: inherit; }

a[data-k="home"] { position: relative; } .act-n { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 0; background: #C98A12; color: #fff; font: 700 11px/18px var(--f-body, sans-serif); font-style: normal; text-align: center; }
.act-n.late { background: #B91C1C; } .rail a[data-k="home"] .act-n { position: static; margin-left: auto; }

/* batch 1: one-tap chips, duplicate warning, no-connection bar */
.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; } .qc { border: 1px solid var(--line, #D5DCE3); background: #fff; border-radius: 0; padding: 4px 10px; font: inherit; font-size: 13px; color: var(--navy, #0F2A44); cursor: pointer; }
.qc.on { background: var(--navy, #0F2A44); color: #fff; border-color: var(--navy, #0F2A44); }
.dup-w { display: block; margin-top: 4px; color: #B45309; font-size: 13px; } .dup-w a { color: inherit; font-weight: 600; }

/* batch 2: lists */
.rage { white-space: nowrap; } .rage.old { color: #B45309; font-weight: 600; } .lstat { margin: 6px 2px; }
@media (max-width: 899px) { .rrow { min-height: 52px; } .filters select, .filters input, .filters .btn { min-height: 32px; } .strip .sc { min-height: 56px; } }

/* batch 3: record page */
.pnav { display: inline-flex; gap: 8px; align-items: center; margin-left: 10px; font-family: var(--f-body, sans-serif); letter-spacing: 0; }
.pnav a { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line, #D5DCE3); border-radius: 0; text-decoration: none; font-size: 16px; color: var(--navy, #0F2A44); background: #fff; }
.seen-l { display: grid; gap: 2px; } .seen-l a { display: block; padding: 8px 4px; border-bottom: 1px solid var(--line, #EEF1F4); text-decoration: none; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* batch 5 */
.fm { position: relative; } .fm-pgn { position: absolute; right: 12mm; bottom: 5mm; font-size: 7pt; color: var(--sub, #5A646C); }
.fm-qr { display: inline-block; width: 13mm; height: 13mm; } .fm-qr svg { width: 100%; height: 100%; } .fm-f { align-items: center; }
.qnew { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; } .qn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 0; background: #fff; border: 1px solid var(--line, #D5DCE3); text-decoration: none; color: var(--navy, #0F2A44); font-weight: 600; font-size: 14px; } .qn svg { width: 16px; height: 16px; color: var(--orange); }
.selbox { position: absolute; left: 6px; margin-top: 22px; z-index: 2; } .selbox input { width: 22px; height: 22px; } .rrow.in-sel { padding-left: 40px; } #rl .rlist { position: relative; }
.selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 40; background: var(--navy, #0F2A44); color: #fff; border-radius: 0; padding: 8px 10px; display: flex; gap: 8px; align-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: calc(100vw - 24px); flex-wrap: wrap; }
.selbar select { max-width: 160px; } #fsel.on { background: var(--navy, #0F2A44); color: #fff; }
@media (min-width: 900px) { .selbar { bottom: 20px; } }

.miss { font-size: 12px; color: #B45309; background: #FEF3C7; border-radius: 0; padding: 2px 8px; text-decoration: none; }

.tel { white-space: nowrap; font-weight: 600; } .cform .qchips { margin: 6px 0; }

:focus-visible { outline: 2px solid var(--orange, #E0592A); outline-offset: 2px; }

/* Today's work */
.tw { margin-bottom: 10px; display: grid; gap: 8px; } .tw.ch { box-shadow: inset 3px 0 0 var(--orange, #E0592A); }
.tw-h { display: flex; gap: 10px; align-items: flex-start; } .tw-p { font: 800 20px/1 var(--f-display, sans-serif); color: var(--navy, #0F2A44); }
.tw-g { margin: 16px 2px 8px; font-size: 14px; } .tw-q { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .tw-u { font-size: 16px; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line, #D5DCE3); border-radius: 0; overflow: hidden; }
.stepper button { width: 46px; font-size: 22px; border: 0; background: var(--soft, #F1F4F7); cursor: pointer; } .stepper input { width: 90px; text-align: center; font-size: 20px; font-weight: 700; border: 0; padding: 8px 4px; }
.tw-x { display: flex; gap: 8px; align-items: end; } .tw-x label { display: grid; gap: 2px; font-size: 12px; color: var(--sub, #5A646C); } .tw-x label input { width: 70px; } .tw-x input { padding: 8px; }
.tw-q input[type=range] { flex: 1; min-width: 140px; } .tw-act { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.qline { color: var(--navy, #0F2A44); }

/* the quick diary */
.qd { display: grid; gap: 14px; padding: 4px 2px; } .qd h4 { margin: 0 0 8px; font-size: 15px; display: flex; gap: 8px; align-items: baseline; } .qd-n { color: var(--orange, #E0592A); }
.qd-b { border-bottom: 1px solid var(--line, #EEF1F4); padding-bottom: 12px; } .qd .qc { padding: 8px 12px; font-size: 14px; }
.qd-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; } .qd-row .grow { min-width: 0; } .qd-dd { width: 100%; margin-top: 4px; padding: 6px; }
.stepper.sm button { width: 40px; font-size: 20px; } .stepper.sm input { width: 56px; font-size: 17px; padding: 6px 2px; }
.qd textarea { width: 100%; box-sizing: border-box; margin: 6px 0; } .qd-work { display: grid; gap: 4px; margin-bottom: 6px; font-size: 14px; } .qd-ph img { width: 64px; height: 64px; object-fit: cover; border-radius: 0; }

.qd-acts .qd-row { border-bottom: 1px dashed var(--line, #EEF1F4); } .qd-u { min-width: 22px; }
.qd-tl summary { list-style: none; cursor: pointer; } .qd-tl summary::-webkit-details-marker { display: none; } .qd-tl summary h4::after { content: ' ▸'; color: var(--sub, #5A646C); } .qd-tl[open] summary h4::after { content: ' ▾'; }
.qd-tlr { display: grid; grid-template-columns: 46px 1fr; gap: 6px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line, #F1F4F7); }

.cpf { border: 1px solid var(--line, #D5DCE3); border-radius: 0; padding: 10px 12px; } .cpf legend { font-weight: 600; padding: 0 6px; } .cpl { display: grid; gap: 6px; margin-top: 8px; }

.cpx { max-height: 60vh; overflow: auto; } .addmany { margin: 10px 0; } .addmany summary { cursor: pointer; font-weight: 600; }

.cpx-o { margin-left: 24px; font-size: 13px; } .chk.inl { display: inline-flex; margin-right: 10px; } #cpf { margin-top: 14px; }

.whosees td:not(:first-child) { text-align: center; white-space: nowrap; } .whosees th { text-align: center; }

/* dashboards */
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; } .dgrid h4 { margin: 10px 0 6px; font-size: 13px; color: var(--sub, #5A646C); }
.hb { display: grid; gap: 6px; } .hb-r { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hb-b { height: 10px; background: var(--soft, #EEF1F4); border-radius: 0; overflow: hidden; } .hb-b i { display: block; height: 100%; background: var(--navy, #0F2A44); border-radius: 0; }
.vc { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 6px; } .vc-c { flex: 1; display: flex; align-items: flex-end; gap: 1px; height: 100%; position: relative; min-width: 0; }
.vc-c i { flex: 1; border-radius: 0; min-height: 1px; } .vc-c small { position: absolute; bottom: -16px; left: 0; font-size: 9px; color: var(--sub, #5A646C); white-space: nowrap; overflow: hidden; width: 100%; }
.vc + .legend { margin-top: 22px; } .pf-t td, .pf-t th { white-space: nowrap; } .pf-t td:first-child { white-space: normal; min-width: 180px; }
@media print { .dgrid { grid-template-columns: 1fr 1fr; } .card { break-inside: avoid; } }

/* ---------- screens by device ----------
   phone held sideways (short and wide): thinner top and bottom bars, two columns where it helps, sheets fit the height;
   tablet: two columns for forms and dashboards, lists stay one column so rows read in full */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --top-h: 44px; }
  .tabbar { padding-top: 0; } .tabbar a span { display: none; } .tabbar .fab { width: 46px; height: 46px; margin-top: -10px; }
  .fab-new { bottom: calc(64px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
  .head h1 { font-size: 20px; } .head .intro { display: none; }
  .af-grid, .qd, .dgrid { grid-template-columns: 1fr 1fr; } .af-f.w, .qd > p { grid-column: 1 / -1; }
  .sheet, .sheet-in { max-height: 92vh; }
  .strip { grid-auto-flow: column; overflow-x: auto; } .tw { grid-template-columns: 1fr auto; }
  .main { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
@media (min-width: 700px) and (max-width: 1199px) {
  .af-grid { grid-template-columns: 1fr 1fr; } .dgrid { grid-template-columns: 1fr 1fr; } .qd { grid-template-columns: 1fr 1fr; } .qd > p, .qd > details { grid-column: 1 / -1; }
}
@media (min-width: 1200px) { .af-grid { grid-template-columns: repeat(3, 1fr); } .dgrid { grid-template-columns: repeat(3, 1fr); } }

/* diary activities: grouped, collapsed, tap to update */
.da-tools { display: grid; gap: 8px; margin: 8px 0 10px; } .da-q { width: 100%; } .da-tools .chips { margin: 0; } .da-c { font-weight: 700; margin-left: 2px; }
.dact-g { border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px; }
.dact-g > summary { list-style: none; cursor: pointer; padding: 10px 12px; display: grid; gap: 6px; position: relative; padding-right: 30px; }
.dact-g > summary::-webkit-details-marker, .dact > summary::-webkit-details-marker { display: none; }
.dact-g > summary::after { content: '›'; position: absolute; right: 12px; top: 10px; font-size: 20px; color: var(--sub, #5A646C); transition: transform .15s; }
.dact-g[open] > summary::after { transform: rotate(90deg); } .dact-g[open] > summary { border-bottom: 1px solid var(--line); background: var(--soft, #F5F7F9); }
.dg-h b { display: block; font-size: 14.5px; line-height: 1.3; } .dg-h small { display: block; color: var(--sub, #5A646C); font-size: 11.5px; margin-top: 2px; }
.dg-m { display: flex; align-items: center; gap: 8px; font-size: 12.5px; } .dg-m .da-bar { flex: 1; max-width: 180px; } .dg-m small { color: var(--sub, #5A646C); }
.dg-n { background: var(--soft, #EEF1F4); padding: 1px 7px; border-radius: 0; font-weight: 600; font-size: 11.5px; } .dg-b { color: #B42318; font-weight: 600; font-size: 11.5px; }
.dact { border-left: 3px solid transparent; border-bottom: 1px solid var(--line); } .dact:last-child { border-bottom: 0; }
.dact.behind { border-left-color: #D64545; } .dact.done { border-left-color: #1D7A43; } .dact.upd { background: #F3F8FF; }
.da-s { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
div.dact .da-s { cursor: default; }
.da-n { grid-column: 1 / -1; font-weight: 600; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dact[open] .da-n { -webkit-line-clamp: unset; display: block; }
.da-b { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; } .da-b .da-bar { flex: 1; } .da-v { min-width: 44px; text-align: right; font-size: 15px; }
.da-bar { position: relative; display: block; height: 8px; background: var(--soft, #E6EAEE); border-radius: 0; }
.da-bar i { display: block; height: 100%; background: var(--navy, #0F2A44); border-radius: 0; } .dact.done .da-bar i { background: #1D7A43; } .dact.behind .da-bar i { background: #D64545; }
.da-bar u { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--orange, #E0592A); margin-left: -1px; }
.da-m { grid-column: 1 / -1; font-size: 12px; color: var(--sub, #5A646C); }
.da-ed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 12px 12px; } .da-ed .btn { min-width: 48px; min-height: 40px; }
.da-in { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; } .da-in input.cell.pct { width: 76px; min-height: 40px; font-size: 16px; text-align: center; }
@media (min-width: 900px) { .da-s { grid-template-columns: minmax(0, 1fr) 260px; } .da-n { grid-column: 1; } .da-b { grid-column: 2; grid-row: 1; } .da-m { grid-column: 1 / -1; } }

label.da-in { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 4px; margin: 0; }
.da-ed .btn { min-width: 44px; padding-left: 8px; padding-right: 8px; }

/* workspace control */
.ws-list { display: grid; } .ws-p { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ws-p:last-child { border-bottom: 0; } .ws-p.is-closed { opacity: .75; } .ws-pm { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; } .ws-pa { display: flex; gap: 6px; }
.ws-closed > summary { cursor: pointer; font-weight: 600; padding: 10px 0 4px; color: var(--sub, #5A646C); }
.danger-t { color: #B42318; border-color: #F1B5B0; }
.ws-danger { border-color: #F1B5B0; } .ws-danger h3 { color: #B42318; }
.ws-dz { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; } .ws-dz > div { flex: 1 1 260px; } .ws-dz p { margin: 2px 0 0; }
.ws-warn { background: #FFF4F2; border-color: #F1B5B0; } .ws-warn h3 { color: #B42318; }
.ws-bar { display: block; background: #B42318; color: #fff; padding: 8px 16px; font-size: 13px; font-weight: 600; text-decoration: none; text-align: center; }
.ws-gone { max-width: 460px; margin: 18vh auto; padding: 0 16px; text-align: center; }

/* workspace switcher */
button.rail-co { width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 8px; }
button.rail-co:hover { background: rgba(255,255,255,.06); } .wsw-i { margin-left: auto; font-style: normal; opacity: .7; }
.more-ws { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.more-ws span { display: grid; flex: 1; min-width: 0; } .more-ws small { color: var(--sub, #5A646C); font-size: 12px; } .more-ws i { font-style: normal; font-size: 18px; color: var(--sub, #5A646C); }
.wsl { display: grid; gap: 6px; margin: 8px 0 14px; }
.wsl-r { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.wsl-r.on { border-color: var(--orange, #E0592A); box-shadow: inset 3px 0 0 var(--orange, #E0592A); cursor: default; }
.wsl-av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; background: var(--navy, #0F2A44); color: #fff; font-weight: 700; font-size: 13px; overflow: hidden; }
.wsl-av img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.wsl-m { display: grid; flex: 1; min-width: 0; } .wsl-m small { color: var(--sub, #5A646C); font-size: 12px; }
.wsl-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--sub, #5A646C); }
.wsl-r.on .wsl-t { color: var(--orange, #E0592A); }
.shared-tag { font-size: 10.5px; font-weight: 700; color: #2A619C; background: #EAF2FB; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* platform console */
.pf-lock { max-width: 520px; margin: 4vh auto; } .pf-lock h1 { margin-top: 4px; }
.pf-step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin: 10px 0; } .pf-step > b { width: 28px; height: 28px; display: grid; place-items: center; background: var(--navy, #0F2A44); color: #fff; font-size: 13px; }
.pf-step > div { display: grid; gap: 8px; } .pf-step input { font-size: 20px; letter-spacing: .25em; text-align: center; } .pf-bk input { letter-spacing: .1em; }
.pf-ol { padding-left: 18px; } .pf-key { border: 1px solid var(--line); padding: 12px; margin: 10px 0; background: var(--soft, #F5F7F9); }
.pf-secret { display: block; font-size: 17px; letter-spacing: .08em; padding: 10px; background: #fff; border: 1px dashed var(--line); word-break: break-all; user-select: all; }
.pf-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; } .pf-codes code { padding: 6px; background: #fff; border: 1px solid var(--line); text-align: center; font-size: 15px; }
.pf-tabs { margin-top: 14px; } .pf-q { width: 100%; margin-bottom: 10px; } .pf-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-t td { vertical-align: top; } .pf-acc { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } .pf-a { display: grid; gap: 4px; margin: 0; }
.pf-a.is-closed { opacity: .7; } .pf-w { display: inline-block; background: var(--soft, #EEF1F4); padding: 1px 7px; margin: 2px 2px 0 0; font-size: 12px; } .pf-w.off { text-decoration: line-through; opacity: .7; }

@media (max-width: 700px) {
  .pf-t thead { display: none; } .pf-t, .pf-t tbody, .pf-t tr { display: block; width: 100%; }
  .pf-t tr { border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .pf-t td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; white-space: normal !important; min-width: 0 !important; }
  .pf-t td:first-child, .pf-t td:last-child { grid-column: 1 / -1; } .pf-t td:last-child { margin-top: 6px; }
  .pf-t td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--sub, #5A646C); text-transform: uppercase; letter-spacing: .04em; }
}

.more-pf { text-decoration: none; border-color: #F1B5B0; margin-top: -4px; }

/* platform tables: one line per row, tap for details */
.pf-tt tbody tr { cursor: pointer; } .pf-tt tbody tr:hover, .pf-tt tbody tr:focus { background: var(--soft, #F5F7F9); outline: none; }
.pf-tt td small { display: block; color: var(--sub, #5A646C); font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.pf-tt td b { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.pf-st { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; white-space: nowrap; } .pf-st.ok { color: #1D7A43; background: #E8F5EC; } .pf-st.bad { color: #B42318; background: #FDECEA; } .pf-st.off { color: #5A646C; background: #EEF1F4; }
.pf-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 14px; font-size: 14px; } .pf-dl dt { color: var(--sub, #5A646C); } .pf-dl dd { margin: 0; }
.pf-sa { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
@media (max-width: 700px) {
  .pf-tt .pf-wide { display: none; } .pf-tt th, .pf-tt td { padding: 8px 6px; } .pf-tt td small, .pf-tt td b { max-width: 150px; }
}

.top-logo, .rail-logo, .gz-hero { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* people: photos with sign-in dots, filters, groups, picker */
.avw { position: relative; display: inline-flex; flex: none; } .avw .av { width: 38px; height: 38px; font-size: 13px; }
.avw.lg .av { width: 72px; height: 72px; font-size: 24px; } .avw.lg .sdot { width: 14px; height: 14px; right: 2px; bottom: 2px; }
.sdot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface, #fff); background: #B8C0C8; }
.sdot.s-now { background: #22A355; } .sdot.s-week { background: #7CC496; } .sdot.s-month { background: #E2B65A; } .sdot.s-old { background: #D99A6C; } .sdot.s-never { background: #fff; border-color: #B8C0C8; box-shadow: inset 0 0 0 2px #B8C0C8; } .sdot.s-off { background: #7A8794; }
.st-now { color: #1D7A43; font-weight: 600; } .st-never { color: #B45309; } .st-off { color: #7A8794; }
.pbar { display: grid; gap: 8px; margin: 8px 0 10px; } .pbar .chips { margin: 0; } .pbar .chip b { margin-left: 3px; }
.pgrp { margin-bottom: 12px; } .pgrp-h { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px; text-transform: uppercase; letter-spacing: .04em; font-size: 12px; color: var(--sub, #5A646C); }
.tmrow { gap: 12px; } .ps-h { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; } .ps-h h2 { margin: 0 0 2px; } .ps-ct { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.addtabs { margin: 4px 0 10px; } .pick { max-height: 46vh; overflow: auto; border: 1px solid var(--line); margin-top: 8px; }
.pick-r { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; margin: 0 !important; }
.pick-r:last-child { border-bottom: 0; } .pick-r input { width: 20px; height: 20px; flex: none; } .pick-r small { display: block; color: var(--sub, #5A646C); font-weight: 400; }
.pick-r:has(input:checked) { background: #F3F8FF; } .pick-all { justify-content: space-between; align-items: center; margin-top: 6px; }

.pick { display: grid !important; grid-template-columns: 1fr !important; overflow-x: hidden !important; } .pick-r { width: 100%; box-sizing: border-box; } .pick-r .grow { min-width: 0; } [data-pane] .pfind, .pbar .pfind { width: 100%; box-sizing: border-box; }

.mv-empty { max-width: 420px; margin: 12vh auto; text-align: center; padding: 0 16px; } .mv-empty h3 { margin-bottom: 6px; }

/* invite rows: text on one line, buttons below on phones */
.list .it:has(> [data-copy]) { flex-wrap: wrap; row-gap: 8px; } .list .it:has(> [data-copy]) > .grow { flex: 1 1 calc(100% - 60px); min-width: 0; }
@media (max-width: 700px) { .list .it:has(> [data-copy]) > .btn { flex: 1 1 0; } .list .it:has(> [data-copy]) > .avw { align-self: flex-start; } }

/* record header: next step + Edit visible, the rest under More */
.hrow { align-items: center; } .hmore { position: relative; display: inline-flex; }
.hmenu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); display: grid; min-width: 210px; padding: 4px; }
.hmenu .btn { border: 0; justify-content: flex-start; text-align: left; width: 100%; background: none; box-shadow: none; } .hmenu .btn:hover { background: var(--soft, #F5F7F9); }
.hacts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 700px) { .hrow { flex-wrap: wrap; } .hrow .hacts { flex: 1 1 100%; order: 3; } .hrow .hacts .btn { flex: 1 1 0; } .hmenu { left: 0; right: auto; } }

/* consultant reply: one choice per code */
.reply-codes { display: grid; gap: 8px; } .rc { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); cursor: pointer; margin: 0 !important; }
.rc input { position: absolute; opacity: 0; pointer-events: none; } .rc > b { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 18px; color: var(--c); border: 2px solid var(--c); }
.rc span { display: grid; } .rc small { color: var(--sub, #5A646C); font-weight: 400; } .rc:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); } .rc:has(input:checked) > b { background: var(--c); color: #fff; }
.rc:has(input:focus-visible) { outline: 2px solid var(--orange, #E0592A); } .rc-more { margin: 2px 0; } .rc-more > summary { cursor: pointer; padding: 4px 0; } .rc-more .rc { margin-top: 6px !important; }

/* sheets */
.btn-seg { display: inline-flex; align-items: center; padding: 0 14px; min-height: 36px; text-decoration: none; color: inherit; font-weight: 600; font-size: 13px; }
.sh-bar { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; } .sh-bar input { min-width: 220px; }
.sh-g { margin: 16px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--sub, #5A646C); }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sh-card { display: grid; border: 1px solid var(--line); background: var(--surface, #fff); text-decoration: none; color: inherit; } .sh-card:hover { border-color: var(--navy, #0F2A44); }
.sh-th { display: grid; place-items: center; aspect-ratio: 1.414; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; } .sh-th img { width: 100%; height: 100%; object-fit: contain; }
.sh-th.sm { width: 92px; aspect-ratio: 1.414; flex: none; border: 1px solid var(--line); }
.sh-m { display: grid; gap: 2px; padding: 8px 10px; min-width: 0; } .sh-m b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-t { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .sh-s { font-size: 11.5px; color: var(--sub, #5A646C); }
.sh-res { display: grid; gap: 6px; } .sh-r { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); background: var(--surface, #fff); text-decoration: none; color: inherit; }
.sh-snip { margin-top: 2px; } mark { background: #FFE58A; color: inherit; padding: 0 1px; }
.sh-ix { display: grid; gap: 6px; margin-bottom: 10px; }
.shnav { display: inline-flex; align-items: center; gap: 4px; } .shnav select { max-width: 160px; }
.txhit { position: absolute; border: 2px solid #E0A800; background: rgba(255, 221, 0, .28); pointer-events: none; animation: txp 1.2s ease-out 2; }
@keyframes txp { 0% { box-shadow: 0 0 0 0 rgba(224, 168, 0, .7); } 100% { box-shadow: 0 0 0 14px rgba(224, 168, 0, 0); } }
@media (max-width: 700px) { .sh-grid { grid-template-columns: repeat(2, 1fr); } .shnav select { max-width: 110px; } }

@media (max-width: 700px) { .dv-bar:has(.shnav:not([hidden])) .pager { display: none; } }

/* sheets: one section per building */
.sh-bld { margin-bottom: 4px; }
.sh-bld .chip { font-weight: 600; }
.sh-bk { border: 1px solid var(--line, #E3E6E8); border-radius: 0; padding: 4px 12px 12px; margin: 12px 0; background: var(--card, #fff); }
.sh-bk > summary { cursor: pointer; padding: 10px 0 4px; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sh-bk > summary::-webkit-details-marker { display: none; }
.sh-bk > summary::before { content: '▾'; color: var(--sub, #5A646C); }
.sh-bk:not([open]) > summary::before { content: '▸'; }
.sh-bk > summary b { font-size: 16px; }
.sh-bk .sh-g:first-of-type { margin-top: 8px; }

/* sheets: grouped by drawing, list or pictures */
.sh-bar { align-items: center; }
.sh-v button { display: grid; place-items: center; padding: 6px 10px; }
.sh-doc { margin: 8px 0 14px; }
.sh-dh { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: var(--surface-2, #F2F4F5); border: 1px solid var(--line); border-bottom: 0; text-decoration: none; color: inherit; flex-wrap: wrap; }
.sh-dh:hover { background: #E9EDF0; } .sh-dh b { font-size: 13px; }
.sh-dt { display: block; font-size: 13px; color: var(--sub, #5A646C); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-dn { white-space: nowrap; }
.sh-x { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface, #fff); }
.sh-x .chip { font-size: 12px; padding: 3px 9px; color: var(--sub, #5A646C); }
.sh-doc > .sh-grid, .sh-doc > .sh-list { border: 1px solid var(--line); padding: 8px; background: var(--surface, #fff); }
.sh-doc .sh-dh:last-child { border-bottom: 1px solid var(--line); }
.sh-list { display: grid; gap: 4px; }
.sh-row { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); background: var(--surface, #fff); text-decoration: none; color: inherit; min-height: 56px; }
.sh-row:hover, .sh-row:active { border-color: var(--navy, #0F2A44); }
.sh-row .sh-th { width: 76px; flex: none; border: 1px solid var(--line); }
.sh-row .sh-m { padding: 0; }
.sh-doc .sh-row { border-color: transparent; border-bottom-color: var(--line); } .sh-doc .sh-row:last-child { border-bottom-color: transparent; }
@media (max-width: 700px) {
  #shbld, #shdisc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; } #shbld::-webkit-scrollbar, #shdisc::-webkit-scrollbar { display: none; }
  #shbld .chip, #shdisc .chip { flex: none; }
  .sh-bar input { min-width: 0; }
  .sh-row .sh-th { width: 64px; }
}

/* drawing viewer: find and full screen buttons, a short status line on phones */
.dv-findbtn { display: none; }
.dv-status { cursor: pointer; }
.dv-wrap.max { position: fixed; inset: 0; z-index: 55; height: 100dvh !important; background: var(--surface); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.dv-wrap.max .dv-status:not(.bad), .dv-wrap.max .dv-hint { display: none; }
html.dv-max .tabbar { display: none; }
@media (max-width: 900px) {
  .dv-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "back title find full" "nav nav seg fit" "srch srch srch srch"; gap: 6px; padding: 6px 8px; }
  .dv-bar .dv-back { grid-area: back; } .dv-bar .dv-title { grid-area: title; } .dv-bar #findbtn { grid-area: find; display: grid; place-items: center; } .dv-bar #full { grid-area: full; display: grid; place-items: center; }
  .dv-bar .shnav, .dv-bar .pager { grid-area: nav; min-width: 0; } .dv-bar .seg { grid-area: seg; } .dv-bar #fit { grid-area: fit; }
  .dv-bar .shnav select { max-width: none; flex: 1; min-width: 0; } .dv-bar .shnav { display: flex; } .dv-bar .shnav[hidden] { display: none; }
  .dv-bar .dv-find { grid-area: srch; display: none; } .dv-bar.finding .dv-find { display: flex; } .dv-bar.finding .dv-find input { flex: 1; width: auto; }
  .dv-bar.finding #findbtn { background: var(--navy, #0F2A44); color: #fff; }
  .dv-title b { font-size: 13px; } .dv-title .muted { font-size: 12.5px; }
  .dv-status { font-size: 13px; padding: 5px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dv-status .muted { display: none; }
  .dv-status.open { white-space: normal; } .dv-status.open .muted { display: block; margin: 2px 0 0; }
  .dv-status.bad { white-space: normal; }
  .dv-wrap:not(.marking) .dv-hint { display: none; }
}

.sh-doc > summary { list-style: none; cursor: pointer; } .sh-doc > summary::-webkit-details-marker { display: none; }
.sh-doc > summary::before { content: '▸'; color: var(--sub, #5A646C); align-self: flex-start; margin-top: 1px; } .sh-doc[open] > summary::before { content: '▾'; }
.sh-doc:not([open]) > summary { border-bottom: 1px solid var(--line); }
.sh-doc { margin: 6px 0; } .sh-doc[open] { margin-bottom: 14px; }
.sh-dn { white-space: nowrap; text-align: right; } .sh-dn b { font-size: 15px; }
.sh-x .sh-dl { margin-left: auto; color: var(--navy, #0F2A44); }

@media (max-width: 900px) {
  .dv-bar .dv-title { display: grid; } .dv-bar .dv-title > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dv-bar .dv-title .rev { display: none; }
  .dv-bar .seg button { padding: 8px 10px; } .dv-bar #fit { padding: 8px 10px; }
  .dv-bar .btn.icon { min-width: 40px; }
}

.rev-m { display: none; } @media (max-width: 900px) { .dv-bar .rev-m { display: inline; color: var(--ink, #0F2A44); font-weight: 600; } }

.dv-wrap.max #full { background: var(--navy, #0F2A44); color: #fff; }

/* discipline on drawing rows */
.dtag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 0; background: #EAF0F6; color: #2A4A6B; margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
.dtag.none { background: #FDECEA; color: #A8322A; border: 1px dashed #E5A39C; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
button.dtag.none:hover { background: #F9D9D5; }
.rtop .dtag:first-child { margin-left: 0; }
.up-disc.need select { border-color: #D3453A; background: #FDECEA; }

.dpick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0; }
.dpo { display: grid; gap: 2px; text-align: left; padding: 12px; border: 1px solid var(--line); background: var(--surface, #fff); font: inherit; font-weight: 600; cursor: pointer; border-radius: 0; color: var(--ink, #0F2A44); }
.dpo:hover { border-color: var(--navy, #0F2A44); }
.dpo.on { border: 2px solid var(--orange, #D2643A); background: #FFF4EE; padding: 11px; }
.dpo small { font-weight: 500; font-size: 11.5px; color: var(--orange, #D2643A); }

/* select several documents: tick rows, act on them from the bar at the bottom */
.sel-btn.on { background: var(--navy, #0F2A44); color: #fff; }
.selecting a.rrow { position: relative; padding-left: 44px; cursor: pointer; }
.selecting a.rrow::before { content: ''; position: absolute; left: 12px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border: 2px solid #9AA5AE; border-radius: 0; background: #fff; }
.selecting a.rrow.pick-on { background: #FFF4EE; border-color: var(--orange, #D2643A); }
.selecting a.rrow.pick-on::before { border-color: var(--orange, #D2643A); background: var(--orange, #D2643A) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.selecting a.rrow .fic { display: none; }
.bsel-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 2px solid var(--orange, #D2643A); box-shadow: 0 -6px 20px rgba(3, 9, 30, .12); }
.bsel-bar[hidden] { display: none; }
.bsel-bar .btn.danger:not([disabled]) { background: #C0392B; color: #fff; border-color: #C0392B; }
body.sel-open .tabbar { display: none; }
body.sel-open main { padding-bottom: 90px; }
@media (min-width: 901px) { .bsel-bar { left: var(--rail-w, 220px); } }
.sel-list, .sel-bad { margin: 6px 0 10px; padding-left: 18px; max-height: 200px; overflow: auto; font-size: 13.5px; }
.sel-bad li { color: #8E2626; }

/* Select on the Sheets page: a tick on each drawing heading and sheet */
.selecting [data-pickdoc] { position: relative; cursor: pointer; }
.selecting [data-pickdoc]::after { content: ''; position: absolute; left: 8px; top: 8px; width: 20px; height: 20px; border: 2px solid #9AA5AE; border-radius: 0; background: #fff; z-index: 2; }
.selecting .sh-dh[data-pickdoc] { padding-left: 40px; } .selecting .sh-dh[data-pickdoc]::after { top: 50%; margin-top: -10px; }
.selecting .sh-dh[data-pickdoc]::before { display: none; }
.selecting [data-pickdoc].pick-on { outline: 2px solid var(--orange, #D2643A); outline-offset: -2px; background-color: #FFF4EE; }
.selecting [data-pickdoc].pick-on::after { border-color: var(--orange, #D2643A); background: var(--orange, #D2643A) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

@media (max-width: 700px) { .sh-bar #shq { flex: 1 1 100%; } .sh-bar .sel-btn { margin-right: auto; } }

/* drawings filed by building from their titles */
.place-ban { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-left: 4px solid var(--orange, #D2643A); margin: 10px 0; }
.place-ban i { color: var(--orange, #D2643A); font-style: normal; font-size: 12px; }
.place-list { display: grid; gap: 6px; max-height: 55vh; overflow: auto; margin: 8px 0; }
.place-row { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 0; }
.place-row .grow { display: grid; min-width: 0; } .place-row b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-row select { max-width: 46%; }
@media (max-width: 600px) { .place-row { flex-wrap: wrap; } .place-row select { max-width: none; flex: 1 1 100%; } }

/* ---------- drawing register: table and print ---------- */
.dr-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface, #fff); }
.dr-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.dr-t th { position: sticky; top: 0; background: #0F2A44; color: #fff; text-align: left; font-weight: 600; padding: 8px; white-space: nowrap; font-size: 12px; }
.dr-t td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dr-t tbody tr[data-href] { cursor: pointer; } .dr-t tbody tr[data-href]:hover { background: #F5F8FB; }
.dr-t td small, .dr-pt td small { display: block; color: var(--muted); font-size: 11px; font-family: inherit; }
.dr-t .mono { font-size: 12px; white-space: nowrap; } .dr-t .num, .dr-pt .num { color: var(--muted); text-align: right; }
.dr-t .b, .dr-pt .b { font-weight: 700; } .nw { white-space: nowrap; }
.dr-g td { background: #EAF0F6; font-weight: 700; color: #0F2A44; text-transform: uppercase; letter-spacing: .03em; font-size: 12px; }
.dr-g td span { color: var(--muted); margin-left: 6px; }
.dr-st { display: inline-block; font-weight: 600; font-size: 12px; padding: 1px 7px; white-space: nowrap; }
.dr-st.ok { background: var(--ok-soft); color: var(--ok); } .dr-st.warn { background: var(--warn-soft); color: var(--warn); } .dr-st.bad { background: var(--bad-soft); color: var(--bad); } .dr-st.gray { background: var(--surface-2); color: var(--muted); }
.rvs { white-space: nowrap; } .rvs .rv { display: inline-block; font: 600 11px/1 var(--mono, monospace); padding: 3px 5px; margin: 0 2px 2px 0; border: 1px solid var(--line); }
.rvs .rv.ok { border-color: #8CC6A2; color: var(--ok); } .rvs .rv.warn { border-color: #E5C27A; color: var(--warn); } .rvs .rv.bad { border-color: #E5A39C; color: var(--bad); } .rvs .rv.gray { color: var(--muted); }
.selecting .dr-t tr[data-pickdoc]::after { display: none; }
.selecting .dr-t tr[data-pickdoc] td:first-child { position: relative; padding-left: 32px; }
.selecting .dr-t tr[data-pickdoc] td:first-child::before { content: ''; position: absolute; left: 6px; top: 7px; width: 18px; height: 18px; border: 2px solid #9AA5AE; border-radius: 0; background: #fff; }
.selecting .dr-t tr.pick-on { outline: none; background: #FFF4EE; }
.selecting .dr-t tr.pick-on td:first-child::before { border-color: var(--orange, #D2643A); background: var(--orange, #D2643A) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }

.dr-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.dr-print { background: #fff; padding: 12mm; border: 1px solid var(--line); color: #000; font-size: 11px; overflow-x: auto; }
.dr-ph { display: flex; gap: 16px; align-items: center; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 8px; }
.dr-ph .fm-logos { flex: 1; max-width: 60%; }
.dr-ttl { display: grid; text-align: right; gap: 2px; } .dr-ttl b { font-size: 18px; letter-spacing: .06em; } .dr-ttl span { font-weight: 600; } .dr-ttl small { color: #444; }
.dr-sum { display: flex; gap: 0; border: 1px solid #000; margin-bottom: 8px; } .dr-sum div { flex: 1; padding: 4px 8px; border-right: 1px solid #000; display: grid; } .dr-sum div:last-child { border-right: 0; }
.dr-sum b { font-size: 16px; } .dr-sum small { font-size: 10px; }
.dr-pt { width: 100%; border-collapse: collapse; } .dr-pt th, .dr-pt td { border: 1px solid #555; padding: 3px 5px; vertical-align: top; text-align: left; }
.dr-pt th { background: #DCE3EA; font-size: 10px; text-transform: uppercase; } .dr-pt .mono { font-size: 10.5px; white-space: nowrap; }
.dr-pt thead { display: table-header-group; } .dr-pt tr { break-inside: avoid; }
.dr-pt td.dr-st { font-size: 10.5px; padding: 3px 5px; display: table-cell; }
.dr-pt .rh { font-size: 10px; white-space: nowrap; } .dr-pt .rh small { font-size: 9px; }
.dr-pt .rh.ok { background: #EAF6EE; } .dr-pt .rh.bad { background: #FBEAEA; } .dr-pt .rh.warn { background: #FFF6E3; }
.dr-key { margin-top: 6px; font-size: 9.5px; color: #333; }
.dr-sig { display: flex; gap: 24px; margin-top: 14mm; } .dr-sig div { flex: 1; font-size: 10px; } .dr-sig span { display: block; border-bottom: 1px solid #000; height: 12mm; }
.dr-print .dr-g td { background: #F0F3F6; font-size: 10.5px; }
.dr-print { page: drland; }
@page drland { size: A4 landscape; margin: 8mm; }
html.dr-a3 .dr-print { page: drland3; }
@page drland3 { size: A3 landscape; margin: 10mm; }
@media print {
  html.dr-printing .rail, html.dr-printing .top, html.dr-printing .tabbar, html.dr-printing .no-print { display: none !important; }
  html.dr-printing .main, html.dr-printing .view, html.dr-printing main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .dr-print { border: 0; padding: 0; overflow: visible; }
  .dr-pt th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dr-pt .rh, .dr-print .dr-g td, .dr-pt td.dr-st { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* building and discipline as dropdowns */
.sh-flt { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 10px; }
.sh-flt select { min-width: 180px; font-weight: 600; } .sh-flt select[hidden] { display: none; }
@media (max-width: 700px) { .sh-flt select { flex: 1 1 45%; min-width: 0; } }

/* every file picker looks like the app's buttons; a code field's hint is written in the normal font */
input[type=file] { font: 400 13px var(--f-body); color: var(--muted); max-width: 100%; padding: 6px; border: 1px dashed var(--line); background: var(--surface); width: 100%; box-sizing: border-box; cursor: pointer; }
input[type=file]::file-selector-button { font: 600 13px var(--f-body); color: var(--navy); background: var(--surface); border: 1px solid var(--navy); padding: 6px 14px; margin-right: 10px; cursor: pointer; min-height: 34px; }
input[type=file]::file-selector-button:hover { background: var(--navy); color: #fff; }
input[type=file]:hover { border-color: var(--navy); }
input.mono::placeholder, textarea.mono::placeholder { font-family: var(--f-body); font-size: 13px; letter-spacing: 0; }
.mic-w > textarea { width: 100%; box-sizing: border-box; }

/* register table in the app's own style: light heading, list-style drawing cell, dot pills */
.dr-t th { position: static; background: #FBFCFD; color: rgb(101 113 127 / .8); font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 9px 12px; }
.dr-t td { padding: 9px 12px; vertical-align: middle; font-size: 13px; border-bottom: 1px solid var(--line); }
.dr-t td.num, .dr-t th.num { width: 1%; color: var(--muted); font-size: 11px; text-align: right; }
.dr-t .dr-dw { display: grid; gap: 1px; min-width: 260px; } .dr-t .dr-dw .rtitle { white-space: normal; }
.dr-t .dr-dw small { font-size: 11px; color: var(--muted); }
.dr-t .sub { color: var(--sub, #5A646C); font-size: 12.5px; }
.dr-t .dr-g td { background: var(--bg); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 8px 12px 6px; }
.dr-t tbody tr[data-href]:hover { background: #F7F9FB; }
.rvd { display: inline-flex; align-items: center; gap: 4px; font: 600 11px var(--f-mono); color: var(--navy); margin-right: 8px; white-space: nowrap; }
.rvd i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

/* the drawing register printed as a house form, landscape */
.fm.fm-land { width: 277mm; page: fmland; }
html.dr-a3 .fm.fm-land { width: 400mm; page: fmland3; }
@page fmland { size: A4 landscape; margin: 8mm 0; }
@page fmland3 { size: A3 landscape; margin: 10mm 0; }
.dreg-t th.n { width: 7mm; } .dreg-t th.no { width: 54mm; } .dreg-t th.ds { width: 22mm; } .dreg-t th.rvc { width: 11mm; } .dreg-t th.dt { width: 17mm; } .dreg-t th.st { width: 25mm; } .dreg-t th.hs { width: 50mm; } .dreg-t td { overflow-wrap: normal; } .dreg-t td.mono { white-space: nowrap; font-size: .86em; } .dreg-t td.dst { white-space: nowrap; }
html.dr-a3 .dreg-t th.hs { width: 110mm; }
.dreg-t td.n { text-align: center; color: var(--sub); }
.dreg-t .drh { display: inline-block; margin-right: 2.5mm; white-space: nowrap; font-size: .92em; }
.dreg-t td.dst { font-weight: 700; } .dreg-t td.dst.ok { color: #1C5C38; } .dreg-t td.dst.bad { color: #8E2626; } .dreg-t td.dst.warn { color: #6F450A; } .dreg-t td.dst.gray { color: var(--sub); }
@media print { .dreg-t { break-inside: auto !important; } .dreg-t tr { break-inside: avoid; } .dreg-t thead { display: table-header-group; } }
@media print { .fm.fm-land { width: auto; } }

/* submittals as requests for approval */
.sub-no { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 4px 0 0; } .sub-no > b { font-size: 16px; color: var(--navy); }
.rfa-f { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.rfa-h { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-top: 4px; }
.rfa-g { gap: 8px; } .rfa-cmp { display: flex; gap: 16px; flex-wrap: wrap; }
.rfa-pt { display: flex; gap: 8px; align-items: flex-start; } .rfa-pt input { width: 100%; margin-top: 4px; }
.rfa-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.rfa-card { margin-top: 12px; } .rfa-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.rfa-kv { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 4px 12px; margin: 0 0 8px; font-size: 13.5px; } .rfa-kv dt { color: var(--muted); } .rfa-kv dd { margin: 0; }
.rfa-ol { margin: 4px 0 8px; padding-left: 20px; font-size: 13.5px; display: grid; gap: 4px; }
@media (max-width: 600px) { .rfa-kv { grid-template-columns: 1fr; } .rfa-kv dd { margin-bottom: 6px; } }

/* new submittal page: compliance as two choices, the attached files */
.af-cmp .qc { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.af-cmp .qc input { position: absolute; opacity: 0; pointer-events: none; }
.af-cmp .qc:has(input:checked) { background: var(--navy, #0F2A44); color: #fff; border-color: var(--navy, #0F2A44); }
.af-cmp .qc:has(input[value=deviation]:checked) { background: #A86200; border-color: #A86200; }
.sb-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; } .sb-files .fchip { display: inline-flex; gap: 6px; align-items: center; }
.sb-files .linkish { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted); padding: 0 2px; }

/* submittals: the documents-attached checklist */
.rfa-att { display: grid; gap: 4px; padding: 8px 10px; border: 1px dashed var(--line); background: var(--surface-2, #F7F9FA); }
.rfa-ah { font-size: 13px; font-weight: 600; color: var(--sub, #5A646C); margin-bottom: 2px; }
.rfa-att .chk { font-weight: 400; font-size: 13.5px; }
.fm-docs.rfa-docs { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }

/* submittal page: what happens next */
.flowc { border-left: 4px solid var(--c, var(--navy)); }
.flow-r { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .flow-r b { color: var(--navy); } .flow-r > .grow { flex: 1 1 240px; min-width: 0; }

/* upload: issue purpose */
.up-pur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; background: var(--surface); border: 1px solid var(--line); padding: 8px 10px; margin: 0 0 8px; }
.up-pur label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); } .up-pur select { width: auto; min-width: 190px; font-weight: 600; padding: 6px 8px; min-height: 0; }
.up-pur .muted { flex: 1 1 260px; }
.up-row { grid-template-columns: 28px minmax(140px, 1.2fr) 1.2fr 70px 2fr 1fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .up-row { grid-template-columns: 28px 1fr 1fr; } .up-row > .up-c.up-pp { grid-column: 2 / -1; } }
.purp { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12px; font-weight: 700; color: var(--muted); } .purp select { width: auto; padding: 3px 6px; min-height: 0; font-size: 13px; }
/* submittals: upload many */
.sbk-start { max-width: 760px; margin: 8px auto; display: grid; gap: 14px; } .sbk-start .dz { margin: 0; }
.sbk-row { grid-template-columns: 28px minmax(160px, 1.3fr) 1fr 2fr 1fr 1fr 1fr; }
.sbk-files { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; } .sbk-files small { margin-right: 6px; }
.up-c input.auto, .up-c select.auto { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 6%, var(--surface)); }
.sbk-more { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 10px; padding: 8px 0 2px; border-top: 1px dashed var(--line); }
.sbk-att { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; } .sbk-att b { width: 100%; font-size: 11px; color: var(--muted); } .sbk-att label { display: inline-flex; gap: 6px; align-items: center; }
.sbk-send { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; font-weight: 600; flex-wrap: wrap; }
@media (max-width: 760px) { .sbk-row { grid-template-columns: 28px 1fr 1fr; } .sbk-row > .sbk-ttl { grid-column: 2 / -1; } }
/* upload screens: the dark bar keeps a visible Cancel / Close */
.up-top { padding-top: calc(10px + env(safe-area-inset-top)); }
.up-top .pe-b { color: #fff; border: 1px solid rgba(255,255,255,.45); padding: 6px 14px; min-height: 36px; } .up-top .pe-b:hover { background: rgba(255,255,255,.12); }
.up-top > span:last-child { min-width: 80px; }

/* numbers and codes: the app font with even-width figures, so columns still line up */
.mono, .rnum, .rno, .sc b, .cur-rev, .sect-v, .up-pct, .wk b, .pf-k b, .fold .fn, .rail-code, .rail-proj small, .top-proj, .top-logo span { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.mono { font-size: 1em; }
/* drawings: star, recent, compare */
.dv-star.on { color: #C98A12; --st: #F5C443; } .sh-star { color: #C98A12; }
.sh-rec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; } .sh-rec .chip { max-width: 100%; } .sh-rec .chip span { color: var(--muted); font-weight: 500; }
.dv-cmp { margin-left: 8px; font-weight: 700; white-space: nowrap; }
.cmp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; } .cmp-pg { display: inline-flex; align-items: center; gap: 6px; } .cmp-pg select { width: auto; padding: 6px 8px; min-height: 0; }
.cmp-k { font-weight: 800; padding: 2px 8px; color: #fff; } .cmp-k.new { background: rgb(26,115,232); } .cmp-k.old { background: rgb(217,48,37); }
.cmp-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; margin: 0 0 8px; } .cmp-leg i { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.cmp-view { background: #fff; border: 1px solid var(--line); overflow: auto; height: calc(100vh - 260px); min-height: 360px; cursor: grab; } .cmp-c { display: block; max-width: none; }
@media (max-width: 700px) { .cmp-view { height: calc(100vh - 330px); } }
/* quick due dates (+3 +7 +14 +30) under every due / finish date */
.dq { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 2px; } .dq-b { border: 1px solid var(--line); background: var(--surface); color: var(--navy); font: 700 12px var(--f-body); padding: 3px 9px; min-height: 28px; cursor: pointer; } .dq-b:hover { border-color: var(--navy); } .dq-b.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.dq-d { font-size: 12px; color: var(--muted); margin-left: 4px; }
/* schedule: folding groups, group bar, edit in place */
.gfold { cursor: pointer; user-select: none; } .gfold:hover td, .gfold:hover .gn { background: var(--surface-2); } .gchev { display: inline-block; width: 14px; color: var(--muted); }
.gsum { position: absolute; top: 9px; height: 8px; background: #33415566; } .gsum i { display: block; height: 100%; background: var(--navy); }
.schedt.editing input.cell { width: 100%; min-height: 0; padding: 5px 7px; font-size: 13.5px; } .schedt.editing input.cell.sm { margin-top: 3px; font-size: 12.5px; } .schedt.editing input[type=date].cell { width: 140px; }
.schedt input.saved { border-color: var(--ok); box-shadow: 0 0 0 2px #1D7A4333; } .sedadd td { background: var(--surface-2); } .schedt.editing .dq { display: none; }
/* schedule milestones */
.ms-d { color: #C98A12; } .gms { position: absolute; top: 2px; font-size: 15px; line-height: 1; color: #C98A12; }
/* join link QR */
.jl-qr { width: 168px; margin: 6px 0 8px; background: #fff; padding: 4px; border: 1px solid var(--line); } .jl-qr svg { display: block; width: 100%; height: auto; }
/* Sign in with Google */
.gsi-btn { display: flex; justify-content: center; margin: 8px 0 4px; min-height: 44px; }
/* team: who can do what */
.rmx-t { width: 100%; border-collapse: collapse; font-size: 13px; } .rmx-t th, .rmx-t td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; } .rmx-t thead th { font-size: 12px; color: var(--muted); } .rmx-t tbody th { font-weight: 600; color: var(--navy); width: 28%; }

.tag.gst { background: var(--warn-soft); color: var(--warn); }

/* roles: one level per module */
.extras { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tg { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 7px 12px; background: var(--surface); font-weight: 600; font-size: 13px; cursor: pointer; }
.tg[aria-pressed="true"] { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.tg[disabled] { opacity: .45; cursor: not-allowed; }
.tg i { width: 14px; height: 14px; border: 1.5px solid currentColor; display: inline-grid; place-items: center; font-style: normal; font-size: 10px; }
.lvl-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
.lvl-legend div { padding: 6px 9px; font-size: 12px; } .lvl-legend b { display: block; font-size: 12.5px; }
.lvl-legend .l0 { background: var(--surface-2); } .lvl-legend .l1 { background: #E2ECF7; } .lvl-legend .l1 b { color: var(--info); } .lvl-legend .l2 { background: var(--ok-soft); } .lvl-legend .l2 b { color: var(--ok); } .lvl-legend .l3 { background: var(--orange-soft); } .lvl-legend .l3 b { color: var(--orange); }
.mx { overflow-x: auto; border: 1px solid var(--line); max-height: 52vh; overflow-y: auto; }
.mx table { border-collapse: collapse; width: 100%; }
.mx td { padding: 5px 9px; border-top: 1px solid var(--line); font-size: 13px; }
.mx .g td { background: var(--surface-2); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding-block: 4px; }
.mx td.m { font-weight: 600; white-space: nowrap; } .mx td.m small { font-weight: 400; color: var(--warn); margin-left: 6px; }
.lvl { display: inline-flex; border: 1px solid var(--line); }
.lvl button { border: 0; border-left: 1px solid var(--line); background: var(--surface); padding: 5px 9px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.lvl button:first-child { border-left: 0; } .lvl button[disabled] { opacity: .35; cursor: not-allowed; }
.lvl button[aria-pressed="true"][data-v="0"] { background: var(--surface-2); color: var(--ink); }
.lvl button[aria-pressed="true"][data-v="1"] { background: #E2ECF7; color: var(--info); }
.lvl button[aria-pressed="true"][data-v="2"] { background: var(--ok-soft); color: var(--ok); }
.lvl button[aria-pressed="true"][data-v="3"] { background: var(--orange-soft); color: var(--orange); }

.tgp { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }

/* approvals inbox */
.ibx-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ibx-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.ap-row.ibx { align-items: flex-start; gap: 12px; }
.ap-row.ibx small { display: block; }
.ibx-age { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; gap: 2px; }
.ibx-age small { color: var(--muted); font-size: 11.5px; }
.ap-row.ibx.late .ibx-age b { color: var(--bad); }
.wf-time { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.wf-time input { width: 64px; margin: 0 6px; }

.ap-row.ibx.pick { cursor: pointer; } .ap-row.ibx.pick input { margin-top: 3px; }
.ibx-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; }

.dv-refs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }

/* a menu of actions in a sheet */
.mlist .it { display: flex; width: 100%; text-align: left; background: var(--surface); border: 0; border-top: 1px solid var(--line); padding: 11px 12px; cursor: pointer; color: inherit; text-decoration: none; font: inherit; }
.mlist .it:first-child { border-top: 0; } .mlist .it:hover { background: var(--surface-2); } .mlist .it small { display: block; margin-top: 2px; }

/* icon-only toolbars (v250): the drop zone as two icons; dropping files on the page still opens the big drop target */
.dz.dz-c { display: inline-flex; border: 0; background: none; margin: 0; }
.dz-c .dz-in { padding: 0; gap: 8px; flex-wrap: nowrap; }
.dz-c .dz-in b { display: none; }
body.dz-page .dz.dz-c .dz-in b { display: block; } body.dz-page .dz.dz-c .dz-in label { display: none; }
.row.icons { gap: 8px; flex-wrap: wrap; } .row.icons .seg .btn-seg, .row.icons .seg button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; }
.filters .seg button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; }
.btn.icon.on { border-color: var(--orange); color: var(--orange); }
.btn.icon .bdg { margin-left: 4px; }
.filters.tb { display: flex; flex-wrap: nowrap; align-items: stretch; } .filters.tb input { flex: 1 1 auto; min-width: 0; } .filters.tb > .btn, .filters.tb > .seg { flex: 0 0 auto; }
.row.icons { flex-wrap: nowrap; }
@media (max-width: 760px) {
  .head:has(.row.icons) { align-items: center; } .row.icons { width: 100%; }
  .dz-c label[for="dzdir"] { display: none; }   /* a whole folder is a computer thing */
  .filters.tb .seg { display: none; }   /* phones always show the list */
}
.sh-bar { flex-wrap: nowrap; } .sh-bar input { min-width: 0; flex: 1 1 auto; } .sh-bar > .btn, .sh-bar > .seg { flex: 0 0 auto; }
.sh-flt[hidden] { display: none; }
/* section labels above page titles are noise; back-links (an eyebrow with a link) stay */
.head .eyebrow:not(:has(a)) { display: none; }
/* icon-only toolbars (see iconOnly in main.js): the words stay in the button for the tooltip, hidden from view */
.btn.io, .btn-seg.io { font-size: 0; gap: 0; min-width: 40px; padding-left: 10px; padding-right: 10px; justify-content: center; letter-spacing: 0; }
.btn.io > svg, .btn-seg.io > svg { flex: 0 0 auto; }
.btn.io .bdg { font-size: 12px; margin-left: 4px; }
.filters[hidden] { display: none; }
/* module icon tile before a page title */
.head h1:has(.mod-ico) { display: flex; align-items: center; gap: 10px; }
.mod-ico { flex: 0 0 auto; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 0; background: #FDEBE3; color: var(--orange); }
.mod-ico svg { width: 20px; height: 20px; }
/* drawing viewer: six controls on the bar; the rest in the More menu */
.dv-bar { position: relative; }
.dv-bar .dv-findbtn { display: inline-grid; place-items: center; }
.dv-bar .dv-find { display: none; } .dv-bar.finding .dv-find { display: flex; }
.dv-mark.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.dv-more { position: absolute; right: 8px; top: calc(100% + 4px); z-index: 60; display: grid; gap: 2px; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.dv-more[hidden] { display: none; }
.dv-more .btn, .dv-more .btn.icon { width: 100%; min-width: 0; justify-content: flex-start; gap: 10px; padding: 8px 10px; border: 0; background: none; font-size: 14px; }
.dv-more .btn:hover { background: #F4F6F8; }
@media (max-width: 760px) {
  .dv-bar { grid-template-columns: auto minmax(0, 1fr) auto auto auto; grid-template-areas: "back title find mark more" "nav nav nav nav nav" "srch srch srch srch srch"; }
  .dv-bar .dv-mark { grid-area: mark; } .dv-bar #dvmorebtn { grid-area: more; } .dv-bar #full { grid-area: auto; }
  .dv-bar .shnav[hidden] + .pager:has(select:empty) { display: none; }
}
.dv-bar .pager[hidden] { display: none !important; }
.dv-more { grid-template-columns: 1fr !important; grid-template-areas: none !important; }
.dv-more > .btn { display: flex !important; align-items: center; grid-area: auto !important; width: 100% !important; height: auto; }
.dv-more > .btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
/* page title and its icons share one line; icons sit on the right (wrap under only when they cannot fit) */
.head:has(> .row), .head:has(> div + .btn), .head:has(.row.icons) { align-items: center; }
.head > .row, .head > .row.icons { margin-left: auto; }
@media (max-width: 760px) { .row.icons { width: auto; } .head > .row.icons { justify-content: flex-end; } }
/* ⓘ details: who did what and when, on tap */
.info-d { display: inline-block; position: relative; vertical-align: middle; }
.info-d > summary { list-style: none; cursor: pointer; display: inline-grid; place-items: center; width: 28px; height: 28px; color: var(--muted); border-radius: 50%; }
.info-d > summary::-webkit-details-marker { display: none; }
.info-d[open] > summary, .info-d > summary:hover { color: var(--navy); background: #EEF1F4; }
.info-pop { position: absolute; z-index: 40; left: 0; top: calc(100% + 4px); min-width: 220px; max-width: min(320px, 80vw); padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); font-size: 13px; line-height: 1.5; color: var(--ink, #1B2430); white-space: normal; }
.info-pop .av { margin-right: 6px; vertical-align: middle; }
.head p:has(> .info-d), .head .row:has(> .info-d) { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btn.add-btn { gap: 6px; padding-left: 14px; padding-right: 16px; font-weight: 700; }
.dz-c .add-btn { display: inline-flex; align-items: center; }
.head .hmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
/* "+ Add" on Drawings: a small menu with Files and Folder (the folder choice is no longer hidden on narrow screens) */
.dz-c label[for="dzdir"] { display: inline-flex !important; }
.add-menu { position: relative; display: inline-block; }
.add-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.add-menu > summary::-webkit-details-marker { display: none; }
.add-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; display: grid; min-width: 160px; padding: 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.add-pop label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--navy); }
.add-pop label:hover { background: #F4F6F8; }
body.dz-page .dz.dz-c .add-menu { display: none; }

/* upload review as a table (v253): one line per file; the column names sit in a header row, so the labels inside each cell are hidden */
.up-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.up-list.up-tbl { gap: 0; max-width: none; min-width: 1180px; border: 1px solid var(--line); background: var(--surface); }
.up-tbl .up-row, .up-tbl .up-row.up-head {
  grid-template-columns: 34px minmax(170px, 1.4fr) minmax(150px, 1.2fr) 64px minmax(170px, 1.6fr) 120px 130px 140px 140px minmax(150px, 1.2fr) !important;
  align-items: center; gap: 0 8px; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.up-tbl .up-row > * { grid-column: auto !important; }
.up-tbl .up-head { position: sticky; top: 0; z-index: 2; background: #F4F6F8; font: 700 11px var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 8px; padding-bottom: 8px; }
.up-tbl .up-c { font-size: 0; gap: 0; } .up-tbl .up-c input, .up-tbl .up-c select { font-size: 13px; padding: 5px 7px; }
.up-tbl .up-f small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.up-tbl .up-f .fic { flex: 0 0 auto; transform: scale(.8); }
.up-tbl .up-st { font-size: 12px; line-height: 1.3; } .up-tbl .up-st .pill { white-space: normal; }
.up-tbl .up-row.done { background: color-mix(in srgb, var(--ok, #1D7A43) 6%, var(--surface)); } .up-tbl .up-row.err { background: #FDECEA; }
.up-tbl .up-row.busy { background: #FFF8F2; }
.up-tbl .up-grp { padding: 8px 10px 4px; background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; left: 0; }
.up-tbl .up-grp { position: static; }
.filters select[hidden] { display: none; }
/* upload table: the file name stays on the left and the status on the right while the middle scrolls sideways (phones, narrow windows) */
.up-tbl .up-row > .up-on, .up-tbl .up-row > .up-f, .up-tbl .up-head > span:nth-child(1), .up-tbl .up-head > span:nth-child(2) { position: sticky; z-index: 1; background: inherit; }
.up-tbl .up-row > .up-on, .up-tbl .up-head > span:nth-child(1) { left: 0; }
.up-tbl .up-row > .up-f, .up-tbl .up-head > span:nth-child(2) { left: 34px; box-shadow: 6px 0 6px -6px rgba(0,0,0,.18); }
.up-tbl .up-row > .up-st, .up-tbl .up-head > span:nth-child(10) { position: sticky; right: 0; z-index: 1; background: inherit; box-shadow: -6px 0 6px -6px rgba(0,0,0,.18); padding-left: 8px; }
.up-tbl .up-row { background: var(--surface); } .up-tbl .up-row > * { background-clip: padding-box; }
.up-tbl .up-row.done > .up-on, .up-tbl .up-row.done > .up-f, .up-tbl .up-row.done > .up-st { background: color-mix(in srgb, var(--ok, #1D7A43) 6%, var(--surface)); }
.up-tbl .up-row.err > .up-on, .up-tbl .up-row.err > .up-f, .up-tbl .up-row.err > .up-st { background: #FDECEA; }
.up-tbl .up-row.busy > .up-on, .up-tbl .up-row.busy > .up-f, .up-tbl .up-row.busy > .up-st { background: #FFF8F2; }
.up-tbl .up-head > span { background: #F4F6F8; }
@media (max-width: 760px) { .up-tbl .up-row, .up-tbl .up-row.up-head { grid-template-columns: 34px 150px minmax(150px, 1.2fr) 64px minmax(170px, 1.6fr) 120px 130px 140px 140px 120px !important; } }
/* where each guess came from, under the field (upload review) */
.up-c small.src { display: block; margin-top: 2px; font: 600 10px var(--f-body); letter-spacing: .03em; color: var(--muted); text-transform: none; }
.up-c input.auto + small.src, .up-c select.auto + small.src { color: var(--orange); }

/* upload review on a phone (v263): a tracking list, not a wide table. Each file: tick · name · status (with its own progress);
   tap the file to open its fields, stacked with their labels */
@media (max-width: 760px) {
  .up-scroll { overflow-x: visible; }
  .up-list.up-tbl { min-width: 0; }
  .up-tbl .up-row.up-head { display: none; }
  .up-tbl .up-row, .up-tbl .up-row.up-head { grid-template-columns: 30px minmax(0, 1fr) auto !important; gap: 6px 10px; padding: 10px 12px; align-items: center; }
  .up-tbl .up-row > .up-on, .up-tbl .up-row > .up-f, .up-tbl .up-row > .up-st { position: static; box-shadow: none; background: transparent !important; }
  .up-tbl .up-row > .up-on { grid-column: 1 !important; grid-row: 1; }
  .up-tbl .up-row > .up-f { grid-column: 2 !important; grid-row: 1; cursor: pointer; }
  .up-tbl .up-row > .up-st { grid-column: 3 !important; grid-row: 1; min-width: 92px; max-width: 46vw; text-align: right; padding-left: 0; }
  .up-tbl .up-f small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--navy); font-weight: 600; }
  .up-tbl .up-f::after { content: '▾'; margin-left: auto; color: var(--muted); font-size: 12px; } .up-tbl .up-row.open .up-f::after { content: '▴'; }
  .up-tbl .up-st .up-bar { display: block; width: 100%; height: 6px; } .up-tbl .up-rp { display: block; font: 700 11px var(--f-mono); color: var(--navy); margin-top: 2px; }
  .up-tbl .up-st .pill { white-space: normal; text-align: left; }
  /* the fields: hidden until the file is tapped, then stacked under it with their labels */
  .up-tbl .up-row > .up-c { display: none; }
  .up-tbl .up-row.open > .up-c { display: flex; grid-column: 1 / -1 !important; font-size: 11px; gap: 3px; }
  .up-tbl .up-row.open { grid-template-columns: 30px minmax(0, 1fr) auto !important; }
  .up-tbl .up-row.open > .up-c input, .up-tbl .up-row.open > .up-c select { font-size: 15px; padding: 8px 10px; }
  .up-tbl .up-grp { font-size: 12px; white-space: normal; }
  /* a row that needs a look shows a small orange dot by its name, even when closed */
  .up-tbl .up-row:has(.auto, .need) > .up-f small::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: 6px; vertical-align: 1px; }
}
/* phone tracking view: the status goes under the file name, so the name has the full width */
@media (max-width: 760px) {
  .up-tbl .up-row, .up-tbl .up-row.open { grid-template-columns: 30px minmax(0, 1fr) !important; }
  .up-tbl .up-row > .up-st { grid-column: 2 !important; grid-row: 2; min-width: 0; max-width: none; text-align: left; }
  .up-tbl .up-row > .up-on { grid-row: 1 / span 2; align-self: start; padding-top: 2px; }
  .up-tbl .up-st .up-bar { max-width: 100%; }
}
/* drawing flipbook: the new page slides in from the side it was swiped to; at the first / last page a small bump */
@keyframes flipN { from { transform: translateX(28%); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes flipP { from { transform: translateX(-28%); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes flipEnd { 0%, 100% { transform: none; } 30% { transform: translateX(-10px); } 60% { transform: translateX(10px); } }
.dv.flip-n > canvas, .dv.flip-n > .dv-layer { animation: flipN .22s ease-out; }
.dv.flip-p > canvas, .dv.flip-p > .dv-layer { animation: flipP .22s ease-out; }
.dv.flip-end > canvas, .dv.flip-end > .dv-layer { animation: flipEnd .25s ease-out; }
/* the Mark button when on: white pen on orange (the "lit icon" rule must not make it orange on orange) */
.dv-bar .btn.icon.dv-mark.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.dv-bar .btn.icon.dv-mark.on svg { stroke: #fff; }
/* v273 progress from the site diary, on the drawing: green, the latest day brighter */
.mk-svg .pg { opacity: .55; }
.mk-svg .pg.new { opacity: 1; }
.mk-svg .pg .mk-fill { fill: color-mix(in srgb, var(--c) 30%, transparent); }
.dv-more #pgtog.on svg { stroke: #2F9E44; }
.qd-pg a.qd-row { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line, #e5e5e5); } .qd-pg a.qd-row:last-child { border-bottom: 0; }
.qd-pg .qi svg, .qd-pg a.qd-row > svg { width: 18px; height: 18px; flex: none; }
/* v279 setup in order */
.sg-guide .sgg { list-style: none; margin: 8px 0 6px; padding: 0; }
.sg-guide .sgg li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, #e5e5e5); }
.sg-guide .sgg li:last-child { border-bottom: 0; }
.sg-guide .sgg li small { display: block; color: var(--muted, #6b7785); }
.sg-guide .sgg-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #eef1f4; color: #0f2236; }
.sg-guide .sgg li.ok .sgg-n { background: #2F9E44; color: #fff; }
.sg-guide .sgg-bar { height: 6px; background: #eef1f4; border-radius: 0; overflow: hidden; } .sg-guide .sgg-bar i { display: block; height: 100%; background: #2F9E44; }
.pt-t { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; } .pt-t th, .pt-t td { border-bottom: 1px solid var(--line, #e5e5e5); padding: 5px; text-align: left; }
#ptl { width: 100%; }
.plb-list { display: grid; gap: 8px; margin: 10px 0; } .plb-r { display: flex; gap: 8px; align-items: center; } .plb-r img { width: 64px; height: 64px; object-fit: cover; border-radius: 0; flex: none; } .plb-r select { flex: 1; min-width: 0; }
.ck-foot { align-items: center; margin-top: 6px; }
/* v279 where the time goes */
.ts h4 { margin: 14px 0 6px; font-size: 13px; color: var(--muted, #6b7785); text-transform: uppercase; letter-spacing: .04em; }
.ts-bars { display: grid; gap: 6px; } .ts-r { display: grid; grid-template-columns: minmax(140px, 38%) 1fr 70px; gap: 10px; align-items: center; }
.ts-l small { display: block; color: var(--muted, #6b7785); } .ts-b { height: 10px; background: #eef1f4; border-radius: 0; overflow: hidden; } .ts-b i { display: block; height: 100%; background: #E0592A; }
.ts-v { text-align: right; font-weight: 600; } .ts-t { width: 100%; } .ts-t .num { text-align: right; }
@media (max-width: 600px) { .ts-r { grid-template-columns: 1fr 60px; } .ts-b { grid-column: 1 / -1; order: 3; } }
/* v280 capture and run: the last photo by the shutter; tap it to mark it up */
.gcam-last { width: 52px; height: 52px; border-radius: 0; border: 2px solid #fff; padding: 0; overflow: hidden; position: relative; background: #000; cursor: pointer; }
.gcam-last img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcam-last span { position: absolute; right: 2px; bottom: 0; color: #fff; font-size: 14px; text-shadow: 0 0 3px #000; }
@media (max-width: 760px) { .cap-f .actions { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--card, #fff); padding: 8px 0; margin: 0; z-index: 3; } .cap-f .actions .btn.primary { flex: 1; min-height: 48px; font-size: 16px; } }
/* the message never blocks a tap (the camera button sits under it on phones), and on phones it sits above the bottom bar */
.toast { pointer-events: none; }
@media (max-width: 760px) { .toast { bottom: calc(88px + env(safe-area-inset-bottom) + var(--tg-bot, 0px)); } }
.inst[hidden] { display: none; }

/* v281 a new notification pops up with its text */
#npop { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 20px)); z-index: 300; display: grid; gap: 8px; pointer-events: none; }
.npop { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c); box-shadow: 0 10px 30px rgba(1, 30, 65, .18); padding: 11px 10px 11px 12px; cursor: pointer; animation: npopIn .25s ease-out; }
.npop.out { opacity: 0; transform: translateY(-12px); transition: .25s; }
.npop-i { flex: none; width: 32px; height: 32px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.npop-i svg { width: 18px; height: 18px; }
.npop-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.npop-t small { color: var(--muted); font-size: 11.5px; font-weight: 600; } .npop-t b { color: var(--navy); font-size: 14px; line-height: 1.3; }
.npop-t span { color: #33475b; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.npop-x { flex: none; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); padding: 0 4px; cursor: pointer; }
@keyframes npopIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* messages are always on top: over the upload review, sheets and the camera */
.toast { z-index: 5000; }
#npop { z-index: 450; }
.up-row.flash { animation: upFlash 1.6s ease-out; } @keyframes upFlash { 0%, 40% { background: #FCEBE3; } 100% { background: transparent; } }

/* WBS: BOQ lines split into schedule lines */
.wbs-page .wg { padding: 0; margin-bottom: 10px; overflow: hidden; }
.wbs-page .wg > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.wbs-page .wg > summary::-webkit-details-marker { display: none; }
.wg-n { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 0; background: #FCEBE3; color: var(--orange, #D9622B); white-space: nowrap; }
.wg-n.ok { background: #E3F4EA; color: #1D7A43; }
.wrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-top: 1px solid var(--line, #E3E7EB); background: none; font: inherit; color: inherit; cursor: pointer; }
.wrow:hover { background: #F6F8FA; } .wrow .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .wrow b { font-weight: 600; overflow-wrap: anywhere; }
.wrow .wq { white-space: nowrap; font-size: 13px; } .wrow .wp { width: 44px; text-align: right; font-weight: 700; font-size: 13px; }
.wsplit { display: flex; align-items: center; gap: 8px; } .wsplit .bar { flex: 0 0 90px; }
.bar.full i { background: #1D7A43; } .bar.part i { background: #C98A12; } .bar.over i { background: #B91C1C; }
.wl-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line, #E3E7EB); }
.wl-row .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .wl-row input.cell { width: 96px; text-align: right; }
.wpick { margin-top: 12px; } .wpick input { width: 100%; } .wpick .list { max-height: 280px; overflow: auto; margin-top: 6px; }
.wpick .it .grow { display: flex; flex-direction: column; min-width: 0; }
.wsug { max-height: 55vh; overflow: auto; } .wsug .it .grow { display: flex; flex-direction: column; min-width: 0; }
.tw-pc { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted, #5A646C); } .tw-pc input { width: 64px; text-align: right; }
/* BOQ built by day */
.blog { padding: 0; margin-bottom: 10px; overflow: hidden; } .blog-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #F6F8FA; }
.blog-r { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 14px; border: 0; border-top: 1px solid var(--line, #E3E7EB); background: none; font: inherit; color: inherit; cursor: pointer; }
.blog-r .grow { min-width: 0; } .blog-r b { white-space: nowrap; }
@media (max-width: 640px) { .wrow .wq { display: none; } .wl-row input.cell { width: 76px; } }
.wbs-page #wt { max-width: 220px; } @media (max-width: 640px) { .wbs-page #wt { max-width: 46%; } }
/* v285 contract BOQ: checks, section path rows, line types */
.sc.ckbtn.ok b { color: var(--ok); }
.cklist { display: flex; flex-direction: column; max-height: 62vh; overflow: auto; border-top: 1px solid var(--line); }
.ck { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.ck .ckd { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 6px; }
.ck.okd { opacity: .6; }
.boqt tr.pathrow td { background: #FAFBFC; padding-top: 4px; padding-bottom: 4px; font-weight: 600; }
.boqt tr.dim td { color: var(--muted); }
.ellip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vname { font-size: 15px; }
@media (max-width: 700px) { .vbar .vinfo { flex: 1 1 100%; order: 2; } .vbar > .row { order: 3; } .vbar .vname { order: 1; } }
/* v286 schedule from BOQ */
.pm-ctl { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.pm-ctl label:not(.chk) { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pm-b > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.pm-b > summary::-webkit-details-marker { display: none; }
.pm-b[open] > summary { margin-bottom: 8px; }
.pm-bs { width: auto; padding: 4px 6px; font-size: 13px; }
.pmt td { vertical-align: middle; } .pmt select { padding: 4px 6px; font-size: 13px; } .pmt input.cell { width: 64px; }
.pm-gc { width: 28%; min-width: 120px; }
.pm-bar { position: relative; display: block; height: 10px; background: #F1F3F5; border-radius: 0; }
.pm-bar i { position: absolute; top: 0; bottom: 0; border-radius: 0; background: var(--navy); }
.pm-bar i.ph0 { background: #9AA5B1; } .pm-bar i.ph1 { background: #8D6E63; } .pm-bar i.ph2 { background: #6D4C41; } .pm-bar i.ph3 { background: #546E7A; }
.pm-bar i.ph4 { background: #1F4E79; } .pm-bar i.ph5 { background: #2E7D9A; } .pm-bar i.ph6 { background: #C98A12; } .pm-bar i.ph7 { background: #7B1FA2; } .pm-bar i.ph8 { background: #2E7D32; }
.pm-go { display: flex; gap: 14px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 700px) { .pm-gc { display: none; } }
.pmt input.cell.set { border-color: var(--navy); font-weight: 700; }
/* v288 productivity norms */
.nm-f > summary { display: flex; gap: 10px; align-items: center; cursor: pointer; flex-wrap: wrap; }
.nm-fg { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.nm-fg label { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; color: var(--muted); }
.nm-fg input { width: 90px; }
.nm-mt th, .nm-mt td { padding: 3px; font-size: 12px; white-space: nowrap; }
.nm-mt input { width: 52px; padding: 3px 4px; font-size: 12px; }
.nm-c { display: inline-block; min-width: 18px; text-align: center; font: 700 11px/18px var(--f-mono); color: #fff; background: var(--c); border-radius: 0; padding: 0 4px; }
.nmt tr.dim td { opacity: .5; }
/* v290 piece counts on a task (Today's work) */
.tw-cnt { margin: 4px 0; } .tw-cnt .tw-e { min-width: 110px; display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; } .tw-cnt .tw-e small { font-size: 12px; } .tw-cnt .tw-u { font-size: 14px; }
.pc-h, .pc-r { display: grid; grid-template-columns: 1.6fr 1fr .7fr .6fr; gap: 6px; } .pc-h { margin: 6px 0 2px; } .pc-r { margin-bottom: 6px; } .pc-r input { min-width: 0; }

/* v310 a field that must be filled before the action asked for: pulses until it has a value */
.need { position: relative; border-radius: 0; animation: needPulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 2px var(--accent, #E2582B); }
.need input, .need textarea, .need select, input.need, textarea.need, select.need { border-color: var(--accent, #E2582B) !important; background: #FFF4EE; }
@keyframes needPulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(226, 88, 43, .9); } 50% { box-shadow: 0 0 0 7px rgba(226, 88, 43, .15); } }
.need-bar { background: #FFF4EE; border-left: 4px solid var(--accent, #E2582B); padding: 10px 12px; border-radius: 0; font-weight: 600; margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .need { animation: none; } }

/* v311 billing (owner) and the platform's billing tab */
.pf-st.warn { color: #9A5B00; background: #FFF4DE; }
.ws-bar.bill-due { background: #FFF4DE; color: #7A4A00; }
.bl-st .bl-top { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.bl-due { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; } .bl-due small { color: var(--muted, #5A646C); } .bl-due b { font-size: 34px; letter-spacing: -.02em; }
.bl-st.bl-bad { border-left: 4px solid #B42318; } .bl-st.bl-warn { border-left: 4px solid #E0A100; } .bl-st.bl-ok { border-left: 4px solid #1D7A43; }
.bl-calc { color: var(--muted, #5A646C); font-size: 13px; margin-top: 6px; }
.bl-payin { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.bl-qr { width: 200px; max-width: 100%; height: auto; border: 1px solid var(--line, #E3E7EB); background: #fff; } .bl-qr.sm { width: 120px; }
.bl-steps { margin: 12px 0; padding-left: 20px; display: grid; gap: 4px; }
.bl-rc img { display: block; max-width: 100%; max-height: 50vh; margin: 0 auto 12px; border: 1px solid var(--line, #E3E7EB); }
.pf-tt td small { display: block; }
/* v312 KOOMPI Pay */
.bl-kp { width: 100%; font-size: 17px; padding: 14px; margin: 6px 0 4px; }
.bl-other { margin-top: 14px; border-top: 1px solid var(--line, #E3E7EB); padding-top: 10px; } .bl-other summary { cursor: pointer; font-weight: 600; color: var(--muted, #5A646C); } .bl-other[open] summary { margin-bottom: 10px; }

/* portfolio as a list */
.pf-t tbody tr { cursor: pointer; } .pf-t tbody tr:hover { background: var(--surface-2); }
.pf-t td { vertical-align: middle; white-space: nowrap; } .pf-bar { display: block; width: 80px; margin: 4px 0 0 auto; }
.pf-v { margin-right: 8px; }
.tscroll { overflow-x: auto; }

/* look-ahead and catch-up Gantt */
.gin { --gn: 260px; } @media (max-width: 900px) { .gin { --gn: 150px; } }
.gn .gnote { margin-left: 4px; font-size: 11px; color: var(--muted); }
.gr.grp.late .gn { color: #B91C1C; }
.gb.cutl { border-left: 2px dashed var(--c); } .gb.cutr { border-right: 2px dashed var(--c); }
.gfc { position: absolute; top: 6px; height: 11px; border: 1px solid #B91C1C; border-left: 0; background: repeating-linear-gradient(45deg, #B91C1C44 0 3px, transparent 3px 6px); }
.gfc.open { border-right: 0; background: linear-gradient(90deg, #B91C1C44, transparent); }
.glegend .lf { border: 1px solid #B91C1C; background: repeating-linear-gradient(45deg, #B91C1C44 0 3px, transparent 3px 6px); }
.cdet { margin-top: 12px; } .cdet summary { cursor: pointer; padding: 10px 14px; font-weight: 700; color: var(--navy); font-size: 12.5px; }
/* tasks and groups as a tree: each level indented */
.schedt td.tind, .secrow td[style*="--ind"] { padding-left: calc(10px + var(--ind, 0px)); }
.gantt .gn[style*="--ind"] { padding-left: calc(10px + var(--ind, 0px)); }
.secrow.lv1 td, .gr.grp.lv1, .gr.grp.lv1 .gn { background: #F8F9FB; } .secrow.lv2 td, .secrow.lv3 td, .gr.grp.lv2, .gr.grp.lv2 .gn, .gr.grp.lv3, .gr.grp.lv3 .gn { background: #FCFCFD; font-weight: 600; }
.gr.grp.phead .gn { color: var(--navy); }
/* the diary: copy from the last day, above the tabs */
.cpbar { display: flex; justify-content: flex-end; padding: 10px 14px 0; }
/* phone: the essentials; computer: every detail */
.ed-more { display: none; }
@media (max-width: 700px) {
  .m-hide { display: none !important; }
  .ed.ed-all .m-hide { display: flex !important; }
  .ed-more { display: inline-block; margin-top: 4px; }
  .schedt:not(.editing) tr:not(.secrow) > :nth-child(n+2):nth-child(-n+5) { display: none; }
  .schedt:not(.editing) tr.secrow > td:nth-child(n+2) { display: none; }
}
/* 3D model: every property of the tapped element, folded by group */
.mprops { margin: 8px 0; } .mprops > summary, .mpg > summary { cursor: pointer; padding: 6px 0; }
.mpg { border-top: 1px solid var(--line); } .mpg > summary { font-size: 12.5px; font-weight: 600; color: var(--navy); }
.mpg .kv dd { word-break: break-word; }
/* 3D model tools: the tree drawer, the measure label */
.mv-body { position: relative; }
.mv-tree { position: absolute; left: 0; top: 0; bottom: 0; z-index: 5; width: 270px; max-width: 86%; overflow: auto; background: var(--surface); border-right: 1px solid var(--line); box-shadow: 2px 0 10px rgba(0,0,0,.12); padding: 6px 8px 16px; font-size: 12.5px; }
.mt-h { display: flex; align-items: center; gap: 8px; padding: 4px 0 8px; position: sticky; top: 0; background: var(--surface); } .mt-h b { flex: 1; }
.mt-d > summary { list-style: none; cursor: pointer; } .mt-d > summary::-webkit-details-marker { display: none; }
.mt-r { display: flex; align-items: center; gap: 6px; padding: 3px 0 3px calc(var(--l, 0) * 14px); } .mt-r .chk { flex: 1; min-width: 0; margin: 0; } .mt-r .chk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-r .lnk { opacity: .55; } .mt-r:hover .lnk { opacity: 1; }
.mv-tools { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; } .mv-tools select { max-width: 160px; }
.m-tools { margin: 6px 0; flex-wrap: wrap; }
.mv-3d { position: relative; }
.m-lbl { position: absolute; transform: translate(-50%, -130%); background: #1f2a36; color: #fff; font: 700 12px var(--f-body); padding: 3px 7px; border-radius: 0; pointer-events: none; white-space: nowrap; z-index: 4; }

/* Codes tab: zones and levels as they come from the locations (read only) */
.cd-ro { border: 1px solid var(--line); background: var(--surface-2, #F4F6F8); padding: 8px 10px; font-size: 13px; line-height: 1.6; min-height: 120px; }
.cd-ro b { display: inline-block; min-width: 44px; color: var(--navy); }
/* drawing upload, short form: number, rev, title, discipline and the status; type, location and purpose set for all (or with All fields) */
.up-tbl.up-short { min-width: 760px; }
.up-tbl.up-short .up-row, .up-tbl.up-short .up-row.up-head { grid-template-columns: 34px minmax(160px, 1.3fr) minmax(150px, 1.2fr) 64px minmax(170px, 1.8fr) 140px minmax(150px, 1.2fr) !important; }
.up-tbl.up-short .up-type, .up-tbl.up-short .up-loc, .up-tbl.up-short .up-pp, .up-tbl.up-short .up-head > :nth-child(6), .up-tbl.up-short .up-head > :nth-child(8), .up-tbl.up-short .up-head > :nth-child(9) { display: none !important; }
.up-tbl.up-short .src { display: none; }
/* upload: a CAD file that goes with a drawing */
.up-with { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); grid-column: 2 / -1; } .up-with select { max-width: 260px; font-size: 12.5px; padding: 4px 6px; }
/* Drawings: the drawing number opens the drawing */
.sh-no { color: var(--navy); text-decoration: none; } .sh-no:hover { color: var(--orange); text-decoration: underline; }
/* dashboard: drawing uploads, read or not yet */
.dwu { margin: 12px 0; } .dwu-more { display: block; width: 100%; padding: 8px 12px; text-align: center; font-size: 13px; border-top: 1px solid var(--line); } .dwu-more:hover { color: var(--navy); background: #FBFCFD; }
.dwu-r { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 13px; line-height: 1.3; min-width: 0; }
.dwu-r:last-child { border-bottom: 0; } .dwu-r:hover { background: #FBFCFD; }
.dwu-dot { flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.dwu-r.is-read .dwu-dot { background: transparent; border: 1px solid #C5CDD6; }
.dwu-t { flex: 0 1 auto; max-width: 45%; } .dwu-r.is-read .dwu-t { font-weight: 500; color: var(--muted); }
.dwu-c { flex: 1 1 0; min-width: 0; font-size: 12px; } .dwu-w, .dwu-n { flex: none; font-size: 12px; } .dwu-n { min-width: 26px; text-align: right; }
@media (max-width: 640px) { .dwu-c { display: none; } .dwu-t { max-width: none; flex: 1 1 0; min-width: 0; } }

.dwu .card-h .chip { padding: 2px 8px; font-size: 12px; min-height: 0; }

.doc-ids { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0 0; min-width: 0; font-size: 12px; line-height: 1.4; color: var(--sub, #5A646C); } .doc-ids > * { overflow-wrap: anywhere; min-width: 0; } .doc-ids > a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); } .doc-ids > a:hover { color: var(--navy); }

.fchip { max-width: 100%; min-width: 0; align-items: baseline; } .fchip b { flex: none; } .fc-n { min-width: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.35; } .fchip small { flex: none; font-size: 11.5px; white-space: nowrap; }
.card.current { grid-template-columns: auto minmax(0, 1fr) minmax(0, 340px); } .cur-a { min-width: 0; max-width: 100%; } .cur-a .fchips { justify-content: flex-end; max-width: 100%; }
@media (max-width: 900px) { .card.current { grid-template-columns: minmax(0, 1fr); } .cur-a .fchips { justify-content: flex-start; } }

/* compact pass (v363): small filters and dropdowns, tighter groups, square everywhere */
.filters select, .sh-bar select, .filters input, .sh-bar input { min-height: 32px; padding: 4px 8px; font-size: 13px; }
.filters select { max-width: 200px; } .filters { gap: 6px; margin-bottom: 8px; } .sh-bar { gap: 6px; margin: 8px 0; }
.btn.icon { min-height: 32px; min-width: 32px; padding: 4px 6px; }
.seg button { padding: 5px 10px; min-height: 32px; }
.sh-bk { padding: 2px 10px 8px; margin: 8px 0; } .sh-bk > summary { padding: 7px 0 3px; } .sh-bk > summary b { font-size: 15px; }
.sh-g { margin: 10px 0 6px; }
.card { padding: 10px 12px; margin-bottom: 8px; } details.fold, details.fold:last-child { padding: 10px 12px; }
@media (max-width: 760px) { .filters:not(.tb) { grid-template-columns: repeat(3, minmax(0, 1fr)); } .filters select { width: 100%; max-width: none; min-width: 0; padding-right: 2px; } }

/* kept on the phone (v366): progress pill, offline strip, group button, mark */
.dlpill { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 8px; background: var(--navy, #0F2A44); color: #fff; padding: 7px 12px; font-size: 12.5px; max-width: calc(100vw - 32px); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.dlpill[hidden] { display: none; }
.dlpill i { flex: none; width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(#fff var(--p, 0%), rgba(255,255,255,.25) 0); }
.dlpill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 95; background: #6F4B00; color: #fff; font-size: 12px; text-align: center; padding: 3px 8px; }
.offbar[hidden] { display: none; }
.kp { margin-left: auto; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0; }
.kp:hover { color: var(--navy); border-color: var(--muted); } .kp.on { color: #fff; background: var(--ok, #1D7A43); border-color: var(--ok, #1D7A43); }
.sh-g { display: flex; align-items: center; gap: 6px; } .sh-bk > summary { align-items: center; }
.kept { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #1D7A43); margin-right: 5px; vertical-align: middle; }
@media (max-width: 760px) { .offbar { bottom: calc(var(--tab-h, 60px) + env(safe-area-inset-bottom)); } }

/* Today's work (v369): compact card, big tap targets, icons */
.card.tw { padding: 8px 10px; margin-bottom: 6px; overflow: hidden; }
.card.tw.ch { border-color: var(--orange, #D9622B); }
.tw-h { display: flex; gap: 8px; align-items: flex-start; } .tw-h .grow { min-width: 0; } .tw-h b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tw-p { flex: none; font: 800 17px/1.2 var(--f-display, sans-serif); color: var(--navy, #0F2A44); }
.tw-sub { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; flex-wrap: wrap; } .tw-sub svg { width: 12px; height: 12px; }
.card.tw .bar { margin: 6px 0; }
.tw-in { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0; min-width: 0; }
.tw-in .stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); }
.tw-in .stepper button { width: 36px; min-height: 34px; border: 0; background: var(--surface-2, #F1F3F5); font-size: 18px; cursor: pointer; }
.tw-in .stepper input { width: 58px; min-height: 34px !important; border: 0; text-align: center; font-weight: 700; padding: 2px; }
.tw-in .qchips { display: inline-flex; gap: 4px; flex-wrap: wrap; margin: 0; }
.tw-in .qc { min-width: 36px; min-height: 30px; padding: 2px 8px; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.tw-in .qc small { color: var(--muted); font-size: 10.5px; } .tw-in .qc.on { background: var(--navy, #0F2A44); color: #fff; border-color: var(--navy, #0F2A44); }
.tw-in .qc svg { width: 14px; height: 14px; }
.tw-u { font-size: 13px; color: var(--muted); }
.tw-x { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.tw-x .tw-crew { display: inline-flex; font-size: 0; align-items: center; gap: 4px; border: 1px solid var(--line); padding: 0 0 0 6px; color: var(--muted); }
.tw-crew svg { width: 16px; height: 16px; } .tw-x .tw-crew input { width: 44px; border: 0; min-height: 30px !important; padding: 2px 4px; text-align: center; }
.tw-x .btn.icon.on { color: var(--orange, #D9622B); border-color: var(--orange, #D9622B); }
.tw-note { width: 100%; margin-top: 6px; } .tw-note[hidden] { display: none; }
.tw-g { margin: 10px 2px 6px; font-size: 13px; }
.tabsrow:has(#tq) { gap: 6px; flex-wrap: nowrap; } .tabsrow:has(#tq) .seg button { padding: 5px 10px; white-space: nowrap; } .tabsrow:has(#tq) input { min-width: 0; }

/* compact, icon-first everywhere (v369) */
.head { gap: 8px; margin-bottom: 8px; } .head > div:first-child { min-width: 0; }
h1 { font-size: 19px; } .head h1 { font-size: 19px; }
.head .row { gap: 6px; } .head .btn { padding: 4px 10px; min-height: 32px; } .head .btn.io { min-width: 34px; padding: 4px 8px; }
.head .btn > svg { width: 16px; height: 16px; flex: none; }
.btn > svg { width: 16px; height: 16px; }
.card h3, details.fold > summary b { font-size: 13.5px; }
.muted.sm, .sm.muted, small.muted { font-size: 12px; }
@media (max-width: 760px) { h1, .head h1 { font-size: 18px; } .head .btn:not(.sm) { min-height: 32px; } .card { padding: 9px 10px; } }

/* review pass (v371) */
/* counter tiles that filter (buttons): one row of small chips that scrolls sideways */
.strip:has(> button.sc) { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; background: none; border: 0; padding: 0 0 2px; scrollbar-width: none; }
.strip:has(> button.sc)::-webkit-scrollbar { display: none; }
.strip:has(> button.sc) > .sc { flex: none; display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 5px; border: 1px solid var(--line); margin: 0; padding: 4px 9px; min-height: 30px !important; }
.strip:has(> button.sc) > .sc b { font-size: 13px; } .strip:has(> button.sc) > .sc small { font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; align-items: center; }
.strip:has(> button.sc) > .sc small i { margin-top: 0; }
/* counter tiles that only show numbers: smaller */
.strip:not(:has(> button.sc)) > .sc { padding: 6px 8px; min-height: 0 !important; } .strip:not(:has(> button.sc)) > .sc b { font-size: 15px; }
.strip:not(:has(> button.sc)) > .sc small { font-size: 9px; letter-spacing: .06em; }
/* list counts under filters: gone */
#lstat, #sbstat { display: none; }
/* record rows: the status pill never squeezes the number and title */
.rmain { flex: 1; min-width: 0; } .rtop { gap: 4px 6px; }
@media (max-width: 760px) { .rside .pill { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; font-size: 10.5px; } }
.crumbs[hidden] { display: none; }
.cp-warn { padding: 8px 10px; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* handover: one line per part */
.ho-big b { font-size: 28px; } .ho-list { gap: 6px; } .ho-it { gap: 6px; padding: 8px 10px; }
.ho-top { align-items: center; } .ho-top b { flex: 1; min-width: 0; font-size: 13.5px; } .ho-add { margin: 0; }
/* a record's type is already in its number (SI, RFI, HSE…): only the number shows */
.rmod:has(+ .rno) { display: none; }

/* portfolio on a phone: one compact card per project, small labels (v374) */
@media (max-width: 700px) {
  .pf-list { padding: 0; border: 0; background: none; }
  .pf-t tr { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; padding: 8px 10px; margin-bottom: 6px; }
  .pf-t td:first-child { grid-column: 1 / 4; } .pf-t td:nth-child(2) { grid-column: 4; justify-self: end; align-self: start; }
  .pf-t td.pf-done { grid-column: 1 / 3; } .pf-t td.pf-done b { font-size: 15px; } .pf-t .pf-bar { display: block; margin-top: 3px; }
  .pf-t td.pf-dates { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; order: 20; }
  .pf-t td:last-child { grid-column: auto; margin-top: 0; }
  .pf-t td[data-l] { font-size: 13px; }
  .pf-t td[data-l]::before { font-size: 9.5px; letter-spacing: .06em; margin-bottom: 1px; }
}
/* portfolio sort (v375) */
.pf-th { cursor: pointer; user-select: none; white-space: nowrap; } .pf-th:hover { color: var(--navy); } .pf-th.on { color: var(--orange, #D9622B); }
.filters.pf-flt { display: flex; gap: 6px; width: 100%; box-sizing: border-box; } .pf-flt input { flex: 1; min-width: 0; } .pf-flt select { width: auto; max-width: 150px; } .pf-flt .btn.icon { min-width: 32px; font-weight: 700; }
@media (max-width: 760px) { .filters.pf-flt { display: grid; grid-template-columns: minmax(0, 1fr) 110px 36px; } .filters.pf-flt input { grid-column: auto; } }

/* upload review, compact desktop table (v379) */
.up-top { padding: 6px 12px; } .up-top .pe-b { min-height: 30px; padding: 4px 12px; } .up-top b { font-size: 15px; }
.up-body { padding: 8px 12px; }
.up-pur { padding: 6px 10px; gap: 6px 12px; margin-bottom: 6px; } .up-pur select { min-width: 160px; padding: 4px 8px; }
.up-note { margin-left: auto; font-size: 12px; color: var(--muted); }
.up .up-tbl .h-fn, .up .up-tbl .up-row > .up-num { display: none !important; }
.up-fx { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.up-fnm { font: 600 12.5px/1.3 var(--f-body); color: var(--navy); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.up-fx small { font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (min-width: 761px) {
  .up .up-scroll { overflow-x: visible; }
  .up .up-list.up-tbl { min-width: 0; }
  .up .up-list.up-tbl .up-row, .up .up-list.up-tbl .up-row.up-head { grid-template-columns: 30px minmax(220px, 2fr) 64px minmax(180px, 1.6fr) 130px 140px 160px 150px minmax(130px, 1fr) !important; gap: 0 10px; padding: 4px 10px; align-items: center; min-height: 40px; }
  .up .up-list.up-tbl.up-short .up-row, .up .up-list.up-tbl.up-short .up-row.up-head { grid-template-columns: 30px minmax(240px, 2.2fr) 64px minmax(200px, 2fr) 150px minmax(140px, 1fr) !important; }
  .up .up-tbl .up-row.up-head { min-height: 0; padding-top: 6px; padding-bottom: 6px; font-size: 10.5px; }
  .up .up-tbl .up-row > *, .up .up-tbl .up-head > span { position: static !important; box-shadow: none !important; }
  .up .up-tbl .up-c input, .up .up-tbl .up-c select { height: 30px; min-height: 30px; padding: 3px 7px; font-size: 13px; }
  .up .up-tbl .up-f { gap: 6px; } .up .up-tbl .up-f .fic { transform: scale(.7); margin: -4px; }
  .up .up-tbl .up-f small { white-space: nowrap; display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
  .up .up-tbl .up-st { padding-left: 0; } .up .up-tbl .up-st .pill, .up .up-tbl .up-st b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: inline-block; font-size: 11.5px; vertical-align: middle; }
  .up .up-tbl .up-row > .up-with { grid-column: 2 / -2 !important; grid-row: 2; padding: 2px 0 4px; }
  .up .up-tbl .up-grp { padding: 5px 10px 3px; font-size: 11.5px; }
}
@media (max-width: 760px) { .up-note { margin-left: 0; flex-basis: 100%; } .up-fnm { font-size: 13px; } }

/* selection action bars: one tidy row, icons, one main action (v384) */
.bsel-bar { flex-wrap: nowrap; gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
.bsel-bar .btn, .selbar .btn { min-height: 36px; }
.bsel-bar .btn.icon, .selbar .btn.icon { width: 36px; min-width: 36px; padding: 0; display: inline-grid; place-items: center; }
.bsel-bar .btn.icon svg, .selbar .btn.icon svg, .bs-main svg { width: 18px; height: 18px; }
.bsel-bar .btn.icon.on { background: var(--navy, #0F2A44); color: #fff; border-color: var(--navy, #0F2A44); }
.bs-n { min-width: 22px; text-align: center; font: 700 15px var(--f-mono); color: var(--navy, #0F2A44); }
.bs-main { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; white-space: nowrap; }
.bs-more .it { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 4px; font: inherit; cursor: pointer; }
.bs-more .it .ti { display: inline-grid; place-items: center; width: 22px; color: var(--muted); } .bs-more .it.bad-t, .bs-more .it.bad-t .ti { color: #C0392B; }
.selbar { left: 0; right: 0; transform: none; max-width: none; bottom: 0; background: var(--surface, #fff); color: inherit; border-top: 2px solid var(--orange, #D2643A); box-shadow: 0 -6px 20px rgba(3, 9, 30, .12); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); flex-wrap: nowrap; gap: 6px; z-index: 45; }
.selbar select { max-width: 150px; min-width: 0; flex: 0 1 auto; }
@media (max-width: 900px) { .selbar { bottom: calc(var(--tab-h, 60px) + env(safe-area-inset-bottom)); padding-bottom: 8px; } }
@media (min-width: 901px) { .selbar { left: var(--rail-w, 220px); } }
.elbar .btn.icon { width: 34px; min-width: 34px; padding: 0; display: inline-grid; place-items: center; } .elbar .btn svg { width: 17px; height: 17px; }

/* ---- ui-kit build (v385): kit.css ---- */
/* ===== ui kit (docs/ui-kit.md): sheet, menuPop, toast, tooltip, selection bar, tap sizes, Khmer sizing ===== */

/* --- sheet: phone = bottom sheet with a drag handle; 900px+ = panel on the right --- */
.sh-grab { display: none; }
.sh-h { display: flex; align-items: center; gap: 8px; touch-action: none; }
.sh-h h2 { flex: 1; min-width: 0; font-size: 16px; }
.sh-h .btn.icon { flex: none; margin: -6px -8px -6px 0; border-color: transparent; }
.sheet.shake { animation: shShake .25s; }
@keyframes shShake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.sh-ask { position: sticky; top: 0; z-index: 7; display: flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; padding: 8px 10px; }
.sh-ask b { flex: 1; min-width: 0; }
.sh-ask .btn:not(.danger) { background: transparent; color: #fff; border-color: rgb(255 255 255 / .45); }
@media (max-width: 899px) {
  .sheet-bg { align-items: flex-end; padding: 0; }
  .sheet { width: 100%; max-height: 88vh; max-height: 88dvh; transition: transform .18s ease-out; overscroll-behavior: contain; }
  .sh-grab { display: block; position: sticky; top: -16px; z-index: 6; flex: none; height: 22px; margin: -16px -16px -8px; background: var(--surface); touch-action: none; cursor: grab; }
  .sh-grab::after { content: ''; position: absolute; left: 50%; top: 8px; width: 36px; height: 4px; margin-left: -18px; background: var(--line); }
}
@media (min-width: 900px) {
  .sheet-bg { justify-content: flex-end; align-items: stretch; padding: 0; background: rgb(10 16 30 / .28); }
  .sheet { width: min(520px, 100%); height: 100vh; height: 100dvh; max-height: none; border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgb(1 30 65 / .18); animation: shIn .16s ease-out; }
  .sheet.wide { width: min(980px, 100%); }
  .sheet-bg.sm { align-items: flex-end; background: rgb(10 16 30 / .18); }
  .sheet-bg.sm .sheet { height: auto; max-height: 90vh; width: min(380px, 100%); margin: 0 16px 16px 0; border: 1px solid var(--line); }
}
@keyframes shIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* --- menuPop: square anchored menu, 44px rows, danger last in red --- */
.mpop { position: fixed; z-index: 4000; display: flex; flex-direction: column; min-width: 210px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgb(1 30 65 / .18); }
.mpop.in-sheet { position: static; min-width: 0; padding: 0; border: 0; box-shadow: none; overflow: visible; }
.mp-it, .mp-back { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--navy); text-align: left; cursor: pointer; }
.mp-it:hover:not(:disabled), .mp-back:hover { background: var(--surface-2); }
.mp-it:disabled { opacity: .45; cursor: default; }
.mp-it.sep { border-top: 1px solid var(--line); }
.mp-it.bad, .mp-it.bad .mp-ic { color: var(--bad); }
.mp-ic { flex: none; width: 20px; display: inline-grid; place-items: center; color: var(--muted); }
.mp-ic svg, .mp-back svg, .mp-c svg { width: 18px; height: 18px; }
.mp-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-v { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 500 12px var(--f-mono); }
.mp-c { flex: none; display: inline-grid; color: var(--muted); }
.mp-back { font-weight: 600; border-bottom: 1px solid var(--line); }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
.mp-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; color: var(--navy); cursor: pointer; }
.mp-chip:hover { border-color: var(--navy-3); }
.mp-chip.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.mp-x { padding: 8px 12px; }

/* --- toast: action on the right; placed above the bottom bar by toast() --- */
.toast { display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(560px, calc(100% - 32px)); }
.toast[hidden] { display: none; }
.toast.t-act { pointer-events: auto; }
.toast.bad.t-act { cursor: pointer; }
.t-m { flex: 1; min-width: 0; }
.t-a { flex: none; margin-left: auto; min-height: 32px; padding: 0 4px; border: 0; background: none; color: #FFB899; font: 700 12px var(--f-body); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.toast.bad .t-a { color: #fff; text-decoration: underline; }

/* --- long-press tooltip --- */
.tip { position: fixed; z-index: 6000; max-width: min(260px, calc(100vw - 16px)); padding: 6px 10px; background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.35; pointer-events: none; box-shadow: 0 6px 16px rgb(1 30 65 / .25); }

/* --- selection bar (selbar.js) --- */
.sel-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 2px solid var(--orange); box-shadow: 0 -6px 20px rgb(3 9 30 / .12); }
.sel-bar[hidden] { display: none; }
html.tg-full .sel-bar { padding-bottom: calc(8px + var(--tg-bot, 0px)); }
html[data-keyboard="open"] .sel-bar { display: none; }
@media (min-width: 901px) { .sel-bar { left: var(--rail-w, 220px); } }
.sel-bar .btn { flex: none; min-height: 40px; }
.sel-bar .btn.icon { width: 40px; min-width: 40px; padding: 0; display: inline-grid; place-items: center; }
.sel-bar .btn.icon svg, .sb-main svg { width: 18px; height: 18px; }
.sel-bar .btn.icon.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.sel-bar .btn.icon.bad:not(:disabled) { color: var(--bad); }
.sel-bar .grow { flex: 1 1 0; min-width: 0; overflow: hidden; }
.sb-n { flex: none; min-width: 2ch; text-align: center; font: 700 15px var(--f-mono); color: var(--navy); white-space: nowrap; }
.sb-main { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
.sb-prog { position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: var(--navy); transition: width .2s; }
@media (max-width: 419px) { .sb-main { width: 40px; min-width: 40px; padding: 0; justify-content: center; } .sb-main span { display: none; } }
@media (max-width: 379px) {
  .sel-bar { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .sel-bar .btn.icon, .sb-main { width: 36px; min-width: 36px; min-height: 36px; }
}
/* rows of a list that can be selected: a long press must not open the link preview or select text */
.sel-able .sel-row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.selecting .sel-row:not(a.rrow):not([data-pickdoc]):not(tr) { position: relative; padding-left: 44px; cursor: pointer; }
.selecting .sel-row:not(a.rrow):not([data-pickdoc]):not(tr)::before { content: ''; position: absolute; left: 12px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border: 2px solid #9AA5AE; background: #fff; }
.selecting .sel-row.pick-on { background: #FFF4EE; }
.selecting .sel-row.pick-on:not(a.rrow):not([data-pickdoc]):not(tr)::before { border-color: var(--orange); background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
body.sel-open .tabbar { display: none; }
.sel-bad { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }

/* --- list toolbar: active filters as chips (filterChips) --- */
.afc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.afc button { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 6px 0 10px; border: 1px solid var(--orange); background: var(--orange-soft); color: var(--navy); font: inherit; font-size: 12.5px; cursor: pointer; }
.afc button svg { width: 14px; height: 14px; }
.afc .afc-all { padding: 0 8px; border-color: var(--line); background: var(--surface); color: var(--muted); }

/* --- page head (P5): back · title + status · primary · one icon · ⋯ --- */
.phead { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.phead > .ph-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.phead > .ph-t h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phead > .ph-t .pill { flex: none; }
.phead > .ph-a { flex: none; display: flex; align-items: center; gap: 6px; }
@media (max-width: 700px) {
  .phead { flex-wrap: wrap; }
  .phead > .ph-a { flex: 1 1 100%; }
  .phead > .ph-a .btn.primary { flex: 1 1 auto; }
}

/* --- tap sizes on phones (P8) --- */
@media (max-width: 900px) {
  .btn.icon:not(.sm) { min-width: 40px; min-height: 40px; }
  .chip { min-height: 36px; }
  .phx, .cap-prev .x { min-width: 32px; min-height: 32px; }
}

/* --- Khmer sizing (P8): taller script, no squeezed labels --- */
html.km .tabbar a, html.km .tabbar span { font-size: 11px; line-height: 1.25; }
html.km .tab { font-size: 12px; }
html.km .tile > span:not(.ti) { font-size: 11.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.km .sc small { font-size: 11px; line-height: 1.3; }
html.km .eyebrow { font-size: 11px; color: var(--muted); }
html.km .t-a { text-transform: none; letter-spacing: 0; font-size: 13px; }
html.km .mp-it, html.km .mp-back { font-size: 13px; }

/* ---- ui-kit build (v385): drawings.css ---- */
/* ===== drawings & documents (key: drawings): document page head, filter chips, upload review, Telegram share ===== */
/* document page head (P5): back · eyebrow / title / number · status · one orange action · Edit · ⋯ */
.dhead .ph-tt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dhead .ph-tt h1 { margin: 0; }
.dhead .ph-tt .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhead .doc-ids { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhead .dtag svg { width: 12px; height: 12px; vertical-align: -1px; }
.dhead .ph-a .btn.primary span { white-space: nowrap; }
.doc-note { margin: 0 0 10px; }
.cur-a .btn svg { width: 16px; height: 16px; }
@media (max-width: 600px) {
  .dhead .ph-a { width: 100%; }
  .dhead .ph-a .btn.primary { flex: 1; justify-content: center; }
}
/* comment count on a list row */
.rcm { display: inline-flex; align-items: center; gap: 3px; }
.rcm svg { width: 13px; height: 13px; }
/* selection: the table view's tick box when ticked */
.selecting .dr-t tr[data-pickdoc].pick-on td:first-child::before { border-color: var(--orange); background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
/* upload review: the kit's sheets and toasts sit above the full-screen review */
body.up-open .sheet-bg { z-index: 430; }
body.up-open .toast { z-index: 440; }
.up-top .pe-b svg { width: 18px; height: 18px; }
.up-grp { display: flex; align-items: center; gap: 6px; }
.up-grp svg { width: 14px; height: 14px; flex: none; color: var(--muted); }
.up-st .ok-t svg, .up-done .ok-t svg, .up-done .warn-t svg { width: 14px; height: 14px; vertical-align: -2px; }
/* the number box, shown when the number clashes, is missing or is a guess */
.up-nm { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.up-nm input { flex: 1; min-width: 0; height: 32px; padding: 0 8px; font-size: 13px; text-transform: none; letter-spacing: 0; border: 1px solid var(--line); background: var(--surface); }
.up-nm input.auto { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 6%, var(--surface)); }
/* Telegram share sheet: the status line only while working */
.tgs-b small:empty { display: none; }
/* viewer: icon buttons in the bar */
.dv-bar .btn.icon svg { width: 18px; height: 18px; }
.dv-refs > span[title] svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ---- ui-kit build (v385): records.css ---- */
/* ===== records: registers, submittals, approvals inbox, record / submittal head, capture (key: records) ===== */

/* phone strip: at most four tiles, one row on every width */
.strip.st4 { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: hidden; }
.strip.st4 .sc { min-height: 52px; }
.strip.st4 .sc.on { box-shadow: inset 0 -3px 0 var(--orange); }

/* filter panel: status chips with counts, then the dropdowns */
.fpanel .fst { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.fst .chip { display: inline-flex; align-items: center; gap: 6px; }
.fst .chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.fst .chip b { font-weight: 600; opacity: .75; }
.fst .chip.on i { background: #fff; }
#afc, #sbafc { min-height: 0; }
#wkb .week, #sbwk .week { margin-bottom: 8px; }
.card.empty .btn.icon[data-fx] { margin: 0 auto; display: inline-grid; place-items: center; }

/* record / submittal head (P5): long titles wrap; status row under the title */
.rec-h > .ph-t > .grow { min-width: 0; flex: 1; }
.rec-h > .ph-t h1 { white-space: normal; overflow: visible; text-overflow: clip; margin: 2px 0 4px; }
.rec-h > .ph-t .row { flex-wrap: wrap; gap: 6px; }
.rec-h > .ph-a .hacts { display: contents; }
.rec-h > .ph-a .btn.primary svg { width: 16px; height: 16px; }
@media (max-width: 700px) { .rec-h > .ph-a .hacts .btn.primary { flex: 1 1 auto; } }
.next-note.flowc { border-left-color: var(--c, var(--orange)); }
.next-note:empty { display: none; }

/* my approval step: Approve / Reject stay at the bottom */
.apv-act.sticky-act { display: flex; gap: 8px; align-items: center; }
.apv-act .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.apv-act .btn svg { width: 18px; height: 18px; }

/* approvals inbox: rows that can be ticked */
.ap-list .ap-row[data-pick] { cursor: pointer; }

/* capture: square icon tiles, name under the icon, no subtitles */
.cap-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-width: 560px; }
.cap-grid .cap-p { aspect-ratio: 1 / 1; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 6px 4px; border-radius: 0; min-width: 0; }
.cap-grid .cap-p svg { width: 26px; height: 26px; }
.cap-grid .cap-p b { font-size: 12px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.km .cap-grid .cap-p b { font-size: 11.5px; line-height: 1.3; }
@media (max-width: 560px) { .cap-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 340px) { .cap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cap-o { grid-template-rows: auto; border-radius: 0; min-height: 56px; }
.cap-o svg { grid-row: auto; }
@media (max-width: 560px) { .cap-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cap-o { grid-template-columns: 28px 1fr; padding: 10px; column-gap: 8px; } .cap-o b { font-size: 13px; } }

/* ---- ui-kit build (v385): daily.css ---- */
/* ===== daily (Today's work, Schedule, Diary): day control, card highlight, % unit, diary icon tabs ===== */

/* the same '‹ date ›' day control on Today's work, the Diary and the Schedule */
.daynav { display: inline-flex; align-items: stretch; gap: 0; flex: none; }
.daynav .btn.icon { min-width: 36px; min-height: 36px; padding: 0 6px; }
.daynav .btn.icon + input, .daynav input + .btn.icon { margin-left: -1px; }
.daynav input[type=date] { width: 136px; min-height: 36px; padding: 2px 6px; font-size: 13px; border-radius: 0; text-align: center; }
.daynav [data-dn="0"] { margin-left: 4px; }
@media (max-width: 420px) { .daynav input[type=date] { width: 124px; font-size: 12.5px; } }
.tw-head { align-items: center; }
.dhacts { align-items: center; flex-wrap: nowrap; }

/* Today's work: the card opened from the Diary or the Schedule */
.card.tw.tw-hl { outline: 2px solid var(--orange); outline-offset: -2px; transition: outline-color .6s; }
.tw-in .stepper input { font-size: 16px; }   /* 16px: iOS does not zoom while typing */

/* Schedule: Actual % with its unit */
.pctw { display: inline-flex; align-items: center; gap: 2px; }
.pctw i { font-style: normal; font-size: 12px; color: var(--muted); }
.schedt a.qline { display: block; color: inherit; text-decoration: none; }
.schedt a.qline b { color: var(--blue, #2A619C); text-decoration: underline; text-underline-offset: 2px; }

/* Diary: icon tabs with a count, the active tab's name as the section heading */
.tabs.dtabs { overflow-x: visible; padding: 0; }
.dtabs .tab { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 6px 2px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; position: relative; }
.dtabs .tab svg { width: 20px; height: 20px; flex: none; }
.dtabs .tab .dt-n { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; padding: 0 3px; min-width: 14px; line-height: 14px; text-align: center; font: 700 9.5px/14px var(--f-mono); background: var(--navy); color: #fff; }
.dtabs .tab.on .dt-n { background: var(--orange); }
.dsec-h { margin: 0 0 8px; font-size: 14px; color: var(--navy); }
html.km .dsec-h { font-size: 13.5px; }

/* ---- ui-kit build (v385): shell.css ---- */
/* ---- shell (Home, Portfolio, Directory, Team, Notifications, Settings, QR scan) ---- */

/* Home: one-line project name with two icon buttons; the greeting only on wide screens */
.hello.hh { flex-wrap: nowrap; align-items: center; gap: 8px; }
.hh .hh-m { flex: 1; min-width: 0; }
.hh .hh-hi { margin: 0 0 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh .hh-t { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh .hh-t .hello-proj { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; color: inherit; text-decoration: none; font: inherit; }
.hh .hh-t .hello-proj > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh .hh-t .hello-proj svg { flex: none; width: 16px; height: 16px; color: var(--muted); }
.hh .hh-a { flex: none; display: flex; gap: 6px; }
@media (max-width: 699px) { .hh .hh-hi { display: none; } .hh .hh-t { font-size: 19px; } }

/* QR scan: short states only */
.cam-msg[hidden] { display: none; }
.cam-msg.bad { color: #fff; }
.cam-msg.bad::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #E5484D; vertical-align: middle; }
#man .searchrow input { text-transform: uppercase; }
#man .searchrow input:placeholder-shown { text-transform: none; }

/* Portfolio cards open on tap (no orange button on every card) */
.pfgrid .pf[data-open] { cursor: pointer; }
.pfgrid .pf[data-open]:hover { border-color: var(--navy-3, #9AA5B1); }
.pfgrid .pf[data-open]:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }

/* Team / Company people: the search + one filter toolbar (was a grid of chips) */
.filters.pbar { display: flex; margin: 8px 0 6px; }
.filters.pbar .pfind { flex: 1; min-width: 0; width: auto; }
.pfc:empty { display: none; }
.pnone.card.empty { display: flex; justify-content: center; }
.pnone[hidden] { display: none !important; }

/* Notifications: the tick (Mark all read) disabled when all is read */
#nall:disabled { opacity: .4; }
#nafc:empty, #pfafc:empty, #dafc:empty { display: none; }
.card.empty > .btn.icon { margin: 0 auto; }

/* ---- ui-kit build (v385): offline.css ---- */
/* offline outbox: sync chip (offline.js renderSyncChip) and the "Not sent" sheet */
.sync-chip { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--navy, #0F2A44); cursor: pointer; border-radius: 0; }
.sync-chip[hidden] { display: none; }
.sync-chip em { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font: 600 10.5px/16px system-ui, sans-serif; font-style: normal; text-align: center; color: #fff; background: var(--orange, #E8590C); border-radius: 0; }
.sync-chip.off { color: #6F4B00; }
.sync-chip.bad em { background: var(--red, #C92A2A); }
.sync-chip.busy svg { animation: syncp 1s ease-in-out infinite; }
@keyframes syncp { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sync-chip.busy svg { animation: none; } }
.ob-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; max-height: 50vh; overflow: auto; }
.ob-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line, #E3E7EA); }
.ob-row b { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.ob-row small { font-size: 12px; color: var(--red, #C92A2A); }

/* ---- ui-kit build (v385): review.css ---- */
/* review: integration glue */
.sync-slot { display: contents; }
/* drawing viewer: links to other sheets, changed areas, Changes / Seen buttons in the status line */
.dvlink { position: absolute; border-bottom: 2px solid #1A73E8; background: rgba(26, 115, 232, .10); pointer-events: none; }
.dvchg { position: absolute; border: 1.5px dashed #E8590C; background: rgba(232, 89, 12, .13); pointer-events: none; }
.dv-chip { margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: inherit; font: inherit; font-size: 12px; font-weight: 600; vertical-align: middle; cursor: pointer; white-space: nowrap; }
.dv-chip svg { width: 14px; height: 14px; }
.dv-chg.on { border-color: #E8590C; color: #E8590C; }
/* activity tree (Today's work, Diary, WBS): a fold per level of the plan, each level indented with a guide line */
.atree { margin: 0 0 6px; }
.atree > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 4px 8px 2px; cursor: pointer; font-weight: 700; font-size: 14px; line-height: 1.3; }
.atree > summary::-webkit-details-marker { display: none; }
.atree > summary::before { content: ''; flex: none; width: 7px; height: 7px; margin: 0 4px 0 3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; opacity: .55; }
.atree[open] > summary::before { transform: rotate(45deg); }
.atree.lv0 > summary { font-size: 15px; color: var(--ink, inherit); }
.atree.lv1 > summary, .atree.lv2 > summary, .atree.lv3 > summary { font-weight: 600; }
.at-n { flex: 1; min-width: 0; }
.at-c { flex: none; font-size: 12px; font-weight: 600; color: var(--sub, #5A646C); min-width: 20px; text-align: right; }
.at-b { margin-left: 8px; padding-left: 10px; border-left: 2px solid var(--line); }
.at-b > .card.tw { margin: 0 0 8px; }
.at-b > .dact-g:last-child, .at-b > .wg:last-child { margin-bottom: 4px; }
.atree > summary .wg-n { flex: none; }
@media (max-width: 600px) { .at-b { margin-left: 5px; padding-left: 7px; } }
/* diary deliveries: one card per delivery note; the add form with photos and a materials list */
.dlv { display: grid; gap: 8px; margin-bottom: 10px; }
.dlv-c { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); background: var(--surface); padding: 8px; }
.dlv-ph { flex: none; width: 56px; height: 56px; border: 1px solid var(--line); background: var(--soft, #F5F7F9); padding: 0; position: relative; display: grid; place-items: center; cursor: pointer; border-radius: 0; }
.dlv-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dlv-ph i { position: absolute; right: 0; bottom: 0; background: var(--ink, #011E41); color: #fff; font: 600 10px/1 inherit; font-style: normal; padding: 2px 4px; }
.dlv-ph.none { cursor: default; color: var(--sub, #5A646C); }
.dlv-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.dlv-l { display: grid; gap: 2px; margin-top: 4px; font-size: 13px; }
.dlv-f { display: grid; gap: 10px; }
.dlv-phs { display: flex; flex-wrap: wrap; gap: 6px; }
.dlv-phs:empty { display: none; }
.dlv-t { position: relative; width: 72px; height: 72px; border: 1px solid var(--line); }
.dlv-t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dlv-t button { position: absolute; top: 0; right: 0; width: 22px; height: 22px; border: 0; border-radius: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; line-height: 1; }
.dlv-r { display: grid; grid-template-columns: minmax(0, 1fr) 64px 56px 32px; gap: 4px; margin-bottom: 4px; }
.dlv-r.b { grid-template-columns: minmax(0, 1fr) 64px 56px minmax(0, .9fr) 32px; }
.dlv-r input, .dlv-r select { min-width: 0; }
@media (max-width: 600px) { .dlv-r.b { grid-template-columns: minmax(0, 1fr) 60px 52px 32px; } .dlv-r.b select { grid-column: 1 / -2; grid-row: 2; } }
.dsec[data-s=notes] > .qd-b { margin: 0 0 12px; }
/* upload progress strip (api.js): every file upload over 100 KB, top centre, above sheets */
.upstrip { position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 95; width: min(360px, calc(100% - 32px)); background: var(--navy); color: #fff; padding: 8px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 13px; pointer-events: none; }
.upstrip-t { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; } .upstrip-t span { opacity: .8; font-size: 12px; }
.upstrip-b { height: 4px; background: rgba(255,255,255,.2); } .upstrip-b i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .2s; }
/* Drawings: building groups reorder by their grip (sheets.js), same look as Setup › Locations */
.sh-bk > summary .lgrip { align-self: center; } .sh-bk.dragging { opacity: .45; }
.sh-bk.drop-b { box-shadow: 0 -3px 0 var(--orange); } .sh-bk.drop-a { box-shadow: 0 3px 0 var(--orange); }
/* Drawings: file name, upload date and ··· on a drawing's line, desktop only */
.sh-dh .sh-fn { flex: 0 1 260px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.sh-dh .sh-du { flex: none; width: 92px; font-size: 12px; color: var(--muted); }
.sh-dh .sh-act { flex: none; align-self: center; }
@media (max-width: 899px) { .sh-dh .sh-fn, .sh-dh .sh-du, .sh-dh .sh-act { display: none; } }

/* ===== Drawings page v402 (HCI redesign): status tabs, location tree, fixed-column rows, side panel; phones: cards ===== */
.dw-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dw-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 2px 0 12px; }
.dw-tab { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 0; background: transparent; font: 500 13px var(--f-body); color: #3C4651; cursor: pointer; }
.dw-tab:hover { background: var(--surface-2); } .dw-tab b { color: var(--navy); font-weight: 700; }
.dw-tab.on { font-weight: 700; color: var(--navy); box-shadow: inset 0 -3px 0 var(--orange); }
.dw-tab.me { margin-right: 8px; border-right: 1px solid var(--line); } .dw-tab.me.has b { background: var(--orange); color: #fff; padding: 0 6px; line-height: 18px; font-size: 12px; }
.dw-d { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dw-d.st-c { background: var(--ok); } .dw-d.st-w { background: #24578F; } .dw-d.st-r { background: #8A4B00; } .dw-d.st-o { background: #9AA4AE; }
.stp { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.stp.st-c { color: var(--ok); background: var(--ok-soft); } .stp.st-w { color: #24578F; background: #E3ECF6; } .stp.st-r { color: #8A4B00; background: var(--warn-soft); } .stp.st-o { color: #3C4651; background: var(--surface-2); }
.dw-wrap { display: flex; align-items: flex-start; }
.dw-main { flex: 1 1 auto; min-width: 0; } .dw-main .sh-bar { margin-top: 0; }
.dw-wrap > .dw-tree { flex: 0 0 220px; position: sticky; top: 8px; max-height: calc(100vh - 140px); overflow: auto; padding: 4px 6px 10px 0; margin-right: 16px; border-right: 1px solid var(--line); }
.dw-lt { padding: 4px 8px 8px; }
.dw-li { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 8px 0 calc(8px + var(--d, 0) * 14px); border: 0; background: transparent; cursor: pointer; font: 500 13px var(--f-body); color: var(--ink); text-align: left; }
.dw-li:hover { background: var(--surface-2); } .dw-li.on { background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange); }
.dw-li .lgrip { opacity: .35; } .dw-li:hover .lgrip { opacity: .9; } .dw-sp { width: 14px; flex: none; }
.dw-ln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-ln b { color: var(--navy); } .dw-n { font-size: 12px; color: var(--muted); }
.dw-li.dragging { opacity: .45; } .dw-li.drop-b { box-shadow: inset 0 2px 0 var(--orange); } .dw-li.drop-a { box-shadow: inset 0 -2px 0 var(--orange); }
.dw-tree.in-sheet .dw-li { height: 44px; font-size: 14px; } .dw-tree.in-sheet .lgrip { visibility: hidden; } .dw-tree.in-sheet .dw-lt { display: none; }
.dw-locb { display: none; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); max-width: 40%; } .dw-locb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-locb svg { color: var(--orange); flex: none; }
.dw-tbl { --cols: 10px minmax(170px, 1.1fr) minmax(140px, 1.4fr) 44px 150px 100px 96px 48px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.dw-hd, .dw-r { display: grid; grid-template-columns: var(--cols); gap: 8px; align-items: center; padding: 0 12px; }
.dw-hd { height: 32px; border-bottom: 1px solid var(--line); }
.dw-hd > span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); } .dw-hd > .r { text-align: right; }
.dw-g { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; background: #F4F6F8; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--navy); letter-spacing: .04em; text-transform: uppercase; }
.dw-g > span { font-weight: 500; color: var(--muted); } .dw-g .kp { margin-left: auto; width: 26px; height: 26px; }
.dw-r { min-height: 44px; border-bottom: 1px solid #EDF0F3; text-decoration: none; color: inherit; }
.dw-r:hover { background: #F4F6F8; } .dw-r.sel { background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange); }
.dw-dot { width: 7px; height: 7px; border-radius: 50%; } .dw-r .dw-dot.new { background: var(--orange); }
.dw-c { font-size: 13px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dw-ti { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-rv, .dw-du { font-size: 13px; color: #3C4651; }
.dw-nx { font-size: 12.5px; color: #9AA4AE; } .dw-nx.soon { color: #8A4B00; font-weight: 700; } .dw-nx.late { color: var(--bad); font-weight: 700; }
.dw-sh { display: flex; justify-content: flex-end; align-items: center; gap: 6px; font-size: 13px; }
.dw-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dw-wrap > .dw-panel { flex: 0 0 360px; position: sticky; top: 8px; max-height: calc(100vh - 90px); overflow: auto; margin-left: 16px; background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.dw-ph { display: flex; gap: 8px; align-items: flex-start; } .dw-pc { color: var(--navy); font-size: 14px; overflow-wrap: anywhere; } .dw-pt { font-size: 16px; font-weight: 600; }
.dw-panel .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .dw-panel .row b { color: var(--navy); }
.dw-v { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; font-size: 13px; }
.dw-v.ok { background: var(--ok-soft); color: #14532D; } .dw-v.info { background: #E3ECF6; color: #1C4672; } .dw-v.warn { background: var(--warn-soft); color: #6B3A00; } .dw-v.gray { background: var(--surface-2); color: #3C4651; }
.dw-pv { position: relative; display: grid; place-items: center; height: 200px; border: 1px solid var(--line); background: #fff; overflow: hidden; text-decoration: none; }
.dw-pv img { max-width: 100%; max-height: 100%; object-fit: contain; } .dw-pn { position: absolute; left: 8px; bottom: 8px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; }
.dw-pa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .dw-pa .primary { grid-column: span 2; }
.dw-pa .btn { display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; } .dw-pa .btn svg { width: 15px; height: 15px; }
.dw-dl { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 6px 10px; margin: 0; font-size: 13px; } .dw-dl dt { color: var(--muted); } .dw-dl dd { margin: 0; overflow-wrap: anywhere; }
.dw-rev { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 32px; border-top: 1px solid #EDF0F3; font-size: 13px; } .dw-rev b { color: var(--navy); }
@media (max-width: 1099px) { .dw-wrap > .dw-tree, .dw-wrap > .dw-panel { display: none !important; } .dw-locb { display: inline-flex; } }
@media (max-width: 760px) {
  .dw-tabs { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 8px; } .dw-tab { flex: none; }
  .dw-hd { display: none; } .dw-tbl { background: transparent; border: 0; overflow: visible; }
  .dw-g { position: sticky; top: 0; z-index: 1; background: var(--bg); border: 0; padding: 8px 0 6px; }
  .dw-r { grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: "dot c rv" "dot ti sh" "dot st nx"; row-gap: 3px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); min-height: 72px; }
  .dw-r .dw-dot { grid-area: dot; align-self: start; margin-top: 5px; } .dw-c { grid-area: c; font-size: 12px; } .dw-rv { grid-area: rv; font-weight: 700; color: var(--navy); }
  .dw-ti { grid-area: ti; font-size: 15px; font-weight: 600; } .dw-sh { grid-area: sh; color: var(--muted); font-size: 12px; } .dw-st { grid-area: st; } .dw-nx { grid-area: nx; text-align: right; }
  .dw-du { display: none; }
}
.sh-bar > .dw-locb { width: auto; min-width: 64px; padding: 0 10px; flex: 0 1 auto; }
.dw-tabs { scrollbar-width: none; } .dw-tabs::-webkit-scrollbar { display: none; }
.dw-shl { display: none; }
@media (max-width: 760px) { .dw-rv, .dw-sh, .dw-nx { justify-self: end; } .dw-shl { display: inline; } }
/* drag to reorder, no handle (dragsort.js): the row itself moves; a line shows where it lands */
.lrow.drag, .dw-li[data-top], .dw-hd > [data-col] { touch-action: pan-y; } .lrow.drag { cursor: grab; } .dw-hd > [data-col] { cursor: grab; touch-action: pan-x; }
body.dragsorting, body.dragsorting * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.dragging { opacity: .45; } .drop-b { box-shadow: inset 0 2px 0 var(--orange) !important; } .drop-a { box-shadow: inset 0 -2px 0 var(--orange) !important; }
.drop-l { box-shadow: inset 2px 0 0 var(--orange) !important; } .drop-r { box-shadow: inset -2px 0 0 var(--orange) !important; }
.dw-hd > [data-col] { padding: 8px 0; } .dw-hd > [data-col]:hover { color: var(--navy); }
/* v406: the panel holds the drawing's whole record (master-detail), resizable; columns resizable */
.dw-wrap > .dw-panel { flex: none; width: 520px; padding: 0 16px 16px; gap: 0; }
.dw-split { position: absolute; left: 0; top: 0; bottom: 0; width: 12px; cursor: col-resize; z-index: 2; }
.dw-split::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: transparent; } .dw-split:hover::after { background: var(--orange); }
.dw-pbar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: 8px 0 4px; background: var(--surface); }
.dw-doc .dhead { margin-top: 0; } .dw-doc .dhead h1 { font-size: 18px; } .dw-doc .phead { flex-wrap: wrap; }
.dw-doc .card.current { grid-template-columns: minmax(0, 1fr); gap: 10px; } .dw-doc .cur-a { align-items: flex-start; } .dw-doc .cur-a .fchips { justify-content: flex-start; }
.dw-doc .docgrid { grid-template-columns: minmax(0, 1fr); }
.dw-doc .dw-pv { margin: 10px 0; }
.dw-hd > [data-col] { position: relative; overflow: visible; }
.dw-rz { position: absolute; right: -10px; top: 0; bottom: 0; width: 16px; cursor: col-resize; z-index: 1; }
.dw-rz::after { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: transparent; } .dw-rz:hover::after { background: var(--orange); }
body.dwresizing, body.dwresizing * { cursor: col-resize !important; user-select: none !important; }
/* v409: register columns under Columns (the extra ones are not part of the phone card) */
.dw-x { font-size: 13px; color: #3C4651; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-cc b { color: var(--navy); } .dw-op { text-align: right; }
.dw-hd > .dw-x { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) { .dw-r > .dw-x, .dw-hd > .dw-x { display: none; } }
.dw-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; margin: 8px 0 12px; }
.dw-colc { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; cursor: pointer; } .dw-colc input { width: 18px; height: 18px; accent-color: var(--orange); }
/* v410 upload review: steps, what each file becomes, ready / to fix / skipped */
.up-tt { display: flex; align-items: center; gap: 18px; min-width: 0; }
.up-steps { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: #B9C6D6; }
.up-steps li { display: flex; align-items: center; gap: 6px; } .up-steps li + li::before { content: ''; width: 16px; height: 1px; background: #5D7593; margin-right: 2px; }
.up-steps li.on { color: #fff; font-weight: 700; } .up-steps li.on::after { content: ''; order: -1; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.up-steps li.ok { color: #B9E3C6; } .up-steps li.ok::after { content: '✓'; order: -1; font-size: 11px; }
@media (max-width: 700px) { .up-steps { display: none; } }
.up-bec { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; } .up-bec b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bec small { font-size: 11.5px; line-height: 1.3; } .info-t { color: #24578F; } .up-exl { color: var(--navy); } .up-exl:hover { color: var(--orange); }
.up-st .up-exl { font-weight: 700; margin: 0 4px; } .up-fix { padding: 2px 8px; min-height: 26px; margin-top: 2px; }
.up-ok { display: inline-flex; align-items: center; gap: 4px; } .up-ok svg { width: 14px; height: 14px; }
.up-cnt { display: flex; align-items: center; gap: 14px; font-size: 13px; } .up-cnt b { display: inline-flex; align-items: center; gap: 4px; } .up-cnt svg { width: 14px; height: 14px; }
.up-bar-b .grow { flex: 1; } @media (max-width: 700px) { .up-keep { display: none; } }
/* v410: the File name column is now "Becomes" (the code each file gets): shown again */
.up .up-tbl .h-fn, .up .up-tbl .up-row > .up-num.up-bec { display: flex !important; }
.up .up-tbl .up-head > .h-fn { display: block !important; }
@media (min-width: 761px) {
  .up .up-list.up-tbl .up-row, .up .up-list.up-tbl .up-row.up-head { grid-template-columns: 30px minmax(200px, 1.6fr) minmax(190px, 1.4fr) 64px minmax(160px, 1.4fr) 130px 140px 160px 150px minmax(150px, 1fr) !important; }
  .up .up-list.up-tbl.up-short .up-row, .up .up-list.up-tbl.up-short .up-row.up-head { grid-template-columns: 30px minmax(200px, 1.7fr) minmax(200px, 1.5fr) 64px minmax(170px, 1.6fr) 150px minmax(170px, 1fr) !important; }
}
.up-steps li + li::before { order: -2; }
.up-bec b { color: var(--navy); } .up-bec b.muted { color: var(--muted); }
/* v412 audit: quieter shared code prefix, phone-only controls off on desktop, phone toolbar on two rows */
.dw-cp { font-weight: 500; color: #7A8794; }
.dw-kept { display: inline-flex; color: var(--ok); }
@media (hover: hover) and (pointer: fine) { .dw-tbl .kp, .dw-kept { display: none !important; } }
.dw-r { min-height: 40px; } .dw-g { min-height: 28px; }
.stp { height: 20px; font-size: 11.5px; padding: 0 7px; }
@media (max-width: 760px) {
  .dw-main .sh-bar { flex-wrap: wrap; } .dw-main .sh-bar > #shq { order: -1; flex: 1 1 100%; min-width: 0; }
  .dw-main .sh-bar > .dw-colb { display: none; } .dw-main .sh-bar > .dw-locb { flex: 1 1 auto; max-width: none; justify-content: flex-start; }
  .dw-r { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "c rv" "ti sh" "st nx"; padding: 10px 12px; min-height: 0; }
  .dw-r .dw-dot { position: absolute; margin: 0; left: 4px; top: 14px; } .dw-r { position: relative; }
  .dw-cp { display: none; }
}
/* v413: a drawing whose sheets are not read yet; a row just added flashes once */
.dw-rd0 { font-size: 12px; color: var(--muted); font-style: italic; white-space: nowrap; }
@keyframes dwflash { from { background: #FFF1C2; } to { background: transparent; } } .dw-r.flash { animation: dwflash 2.4s ease-out; }
/* v417: Drawings uses the whole width; New revision: pick or drop; a file dragged over a drawing */
.view.wide { max-width: none; }
.nr-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; margin: 10px 0 4px; border: 2px dashed #C9D0D8; background: var(--surface-2); cursor: pointer; text-align: center; padding: 16px; }
.nr-drop svg { width: 26px; height: 26px; color: var(--orange); } .nr-drop b { color: var(--navy); font-size: 15px; } .nr-drop:hover, .nr-drop.on { border-color: var(--orange); background: var(--orange-soft); }
.dw-r.drop-on { box-shadow: inset 0 0 0 2px var(--orange); background: var(--orange-soft); }
.up-chg input { min-width: 240px; } .up-pur input[type=date] { padding: 4px 8px; }
/* v418: a tight register: the whole table one width (group rows run to the end when scrolled), short rows, small gaps */
.dw-tbl { display: grid; grid-template-columns: minmax(max-content, 1fr); }
.dw-hd, .dw-r { gap: 6px; padding: 0 10px; }
.dw-hd { height: 28px; } .dw-hd > span { font-size: 10.5px; letter-spacing: .06em; }
.dw-hl { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-r { min-height: 32px; font-size: 13px; } .dw-c { font-size: 12.5px; } .dw-x, .dw-rv, .dw-du, .dw-nx, .dw-sh { font-size: 12.5px; }
.dw-g { min-height: 26px; padding: 0 10px; font-size: 11.5px; }
.stp { height: 18px; font-size: 11px; padding: 0 6px; gap: 4px; } .stp svg { width: 10px; height: 10px; }
@media (max-width: 760px) { .dw-tbl { display: block; } .dw-r { min-height: 0; font-size: 14px; } .dw-c { font-size: 12px; } }
/* v419: the table fits the screen: every cell can shrink (… and the full text on hover) */
.dw-r > *, .dw-hd > * { min-width: 0; } .dw-st { overflow: hidden; } .dw-st .stp { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dw-ti, .dw-c, .dw-x { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the Locations list folds away */
.dw-lth { display: flex; align-items: center; justify-content: space-between; padding-right: 2px; } .dw-fold { width: 26px; height: 26px; min-height: 0; padding: 0; font-size: 14px; color: var(--muted); }
.dw-notree .dw-wrap > .dw-tree { display: none !important; } .dw-notree .dw-locb { display: inline-flex !important; }
/* a long code is cut at its start (…F01-DWG-ST-0001): the end tells drawings apart */
@media (min-width: 761px) { .dw-r .dw-c { direction: rtl; text-align: left; } }
/* v422: the table in its own box: the sideways scrollbar sits at the bottom of the window, headings stay on top */
@media (min-width: 761px) {
  .dw-tbl { overflow: auto; overscroll-behavior: contain; align-content: start; }
  .dw-hd { position: sticky; top: 0; z-index: 3; background: var(--surface); }
  .dw-r .dw-c { direction: ltr; }
}
/* heading filter: ▾ beside the name, orange when the column is filtered */
.dw-hd > [data-col] { display: flex; align-items: center; gap: 2px; }
.dw-hf { flex: none; width: 18px; height: 18px; padding: 0; border: 0; background: transparent; color: #9AA4AE; font-size: 11px; line-height: 1; cursor: pointer; opacity: 0; }
.dw-hd > [data-col]:hover .dw-hf, .dw-hf.on, .dw-hf:focus-visible { opacity: 1; } .dw-hf:hover { color: var(--navy); background: var(--surface-2); } .dw-hf.on { color: var(--orange); }
@media (hover: none) { .dw-hf { opacity: 1; } }
.dw-pop { position: fixed; z-index: 90; width: 250px; max-height: min(420px, 70vh); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(1,30,65,.18); padding: 8px; font-size: 13px; }
.dw-pop-s { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.dw-pop-s button { text-align: left; border: 0; background: transparent; padding: 6px 8px; font: inherit; cursor: pointer; } .dw-pop-s button:hover { background: var(--surface-2); } .dw-pop-s button.on { color: var(--orange); font-weight: 700; }
.dw-pop-q { margin-bottom: 6px; height: 30px; }
.dw-pop label { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 6px; cursor: pointer; } .dw-pop label:hover { background: var(--surface-2); }
.dw-pop label span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-pop label b { font-weight: 500; color: var(--muted); font-size: 12px; }
.dw-pop input[type=checkbox] { accent-color: var(--orange); width: 15px; height: 15px; } .dw-pop-all { border-bottom: 1px solid var(--line); }
.dw-pop-l { overflow: auto; flex: 1; min-height: 0; } .dw-pop-a { display: flex; justify-content: flex-end; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
/* v423: the heading filter ▾ is always there (faint), so people find it */
.dw-hf { opacity: .5; font-size: 12px; width: 20px; } .dw-hd > [data-col]:hover .dw-hf { opacity: 1; } .dw-hf.on { opacity: 1; }
.dw-fm { display: block; } .dw-fl { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; } .dw-fl:hover { color: var(--orange); }
.dw-rp { font-weight: 600; } .dw-rp.st-c { color: var(--ok); } .dw-rp.st-r { color: #8A4B00; } .dw-rp.st-o { color: #3C4651; }
/* v427: the date filter: quick ranges as chips, then From – To */
.dw-dpop { width: 280px; }
.dw-dq { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 10px; border-bottom: 1px solid var(--line); }
.dw-dq button { height: 28px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; font: 500 12.5px var(--f-body); color: var(--navy); cursor: pointer; }
.dw-dq button:hover { border-color: var(--navy); } .dw-dq button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.dw-dr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0 4px; }
.dw-dr label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-height: 0; padding: 0; cursor: default; }
.dw-dr label:hover { background: transparent; } .dw-dr input { height: 32px; padding: 0 6px; font: 400 13px var(--f-body); text-transform: none; letter-spacing: 0; color: var(--ink); }
/* v427: in the side panel the drawing's title and code wrap instead of being cut */
.dw-doc .phead > .ph-t { flex-wrap: wrap; align-items: flex-start; } .dw-doc .phead > .ph-t h1 { white-space: normal; overflow: visible; font-size: 17px; }
.dw-doc .phead .ph-tt { min-width: 0; flex: 1 1 100%; } .dw-doc .doc-ids { overflow-wrap: anywhere; }
/* v430: Files reads "PDF · DWG", side by side */
.dw-r .dw-fm { display: block; } .dw-fm .dw-fl + .dw-fl::before { content: '·'; display: inline-block; margin: 0 6px; color: var(--muted); font-weight: 400; text-decoration: none; }
/* v433: New submittal › Drawing: pick a drawing from Drawings */
.pd-list { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; margin-top: 8px; border: 1px solid var(--line); }
.pd-it { display: grid; grid-template-columns: auto 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 44px; padding: 6px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; font: 400 13.5px var(--f-body); cursor: pointer; }
.pd-it:hover { background: var(--orange-soft); } .pd-it b { color: var(--navy); font-size: 12.5px; } .pd-r { color: #3C4651; } .pd-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pd-s { font-size: 11.5px; color: #24578F; font-weight: 600; }
.dw-sl { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; } .dw-sl:hover { color: var(--orange); }
/* v442: Sheets pictures follow the Drawings list: discipline group rows, tight cards, phone-only keep */
.sh-gh { margin: 10px 0 0; border: 1px solid var(--line); border-bottom: 0; } .sh-gh:first-child { margin-top: 0; }
.sh-gh + .sx-ws { border: 1px solid var(--line); background: var(--surface, #fff); margin-bottom: 4px; }
.sh-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.sh-m { padding: 6px 8px; gap: 1px; } .sh-m b { font-size: 12.5px; color: var(--navy); }
.sh-t { font-size: 12px; color: #3C4651; } .sh-s { display: flex; align-items: center; gap: 6px; font-size: 11.5px; margin-top: 2px; } .sh-s .mono { font-weight: 700; color: var(--navy); }
.sh-s .pill, .sh-s [class*="pill"] { font-size: 10.5px; padding: 0 5px; line-height: 16px; }
.sx-w { padding: 0 8px 10px; border-top: 1px solid var(--line); } .sx-w:first-child { border-top: 0; } .sx-w.on { background: var(--orange-soft, #FFF3EC); box-shadow: inset 3px 0 0 var(--orange); }
.sx-h { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-height: 34px; padding: 4px 0; text-decoration: none; color: inherit; font-size: 12.5px; cursor: pointer; } .sx-h:hover .sx-t { color: var(--orange); }
.sx-h b { color: var(--navy); white-space: nowrap; } .sx-t { flex: 1 1 140px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3C4651; } .sx-r { font-weight: 700; color: var(--navy); } .sx-n { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.sx-w .sh-s { display: none; } .sx-h [class*="pill"] { font-size: 10.5px; padding: 0 5px; line-height: 16px; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .sh-gh .kp, .sh-card .kept { display: none !important; } }
@media (max-width: 760px) { .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sh-gh { border: 0; padding: 8px 0 6px; } .sh-gh + .sx-ws { border: 0; background: transparent; } .sx-w { padding: 0 0 10px; } .sx-h { flex-wrap: wrap; row-gap: 2px; } .sx-t { flex-basis: 100%; order: 9; white-space: normal; } }
/* v445 planned drawings (master list): their status, a late plan date */
.stp.st-p { color: #5B3FA0; background: #EFEAF8; } .dw-d.st-p { background: #7B61C0; }
.dw-ps.late { color: var(--bad, #B3261E); font-weight: 700; }
/* v447 Suggest from Schedule: a wide sheet with one row per schedule group */
.sheet:has(.sgw) { max-width: 1080px; width: calc(100vw - 32px); }
.sgh { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; margin: 4px 0 10px; } .sgh label { display: grid; gap: 3px; font-size: 12px; } .sgh input[type=number] { width: 80px; } .sgh .btn { margin-left: auto; }
.sgb { max-height: 62vh; overflow: auto; border: 1px solid var(--line); }
.sgt { width: 100%; border-collapse: collapse; font-size: 13px; } .sgt th { position: sticky; top: 0; z-index: 1; background: #F4F6F8; text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sgt td { padding: 5px 8px; border-bottom: 1px solid #EDF0F3; vertical-align: middle; } .sgt tr:not(.on) td { color: var(--muted); } .sgt tr.on { background: #FFFBF8; }
.sgt td:nth-child(2) { min-width: 240px; } .sgt td:nth-child(2) input { width: 100%; height: 30px; font-size: 13px; } .sgt td:nth-child(2) small { display: block; margin-top: 2px; font-size: 11.5px; }
.sgt select { height: 30px; font-size: 12.5px; max-width: 170px; } .sgt td.mono { white-space: nowrap; font-size: 12px; } .sgt td.late { color: var(--bad, #B3261E); font-weight: 700; }
@media (max-width: 760px) { .sgt thead { display: none; } .sgt tr { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 4px 6px; padding: 8px 6px; border-bottom: 1px solid var(--line); } .sgt td { border: 0; padding: 0; } .sgt td:first-child { grid-row: span 3; } .sgt td:nth-child(2) { grid-column: 2 / 4; min-width: 0; } .sgt select { max-width: none; width: 100%; } }
/* v450 the drawing page says each thing once: status in the head, who as one line, the latest files in the card only */
.who-l b { display: inline !important; } .who-l { font-size: 13px; color: #3C4651; display: flex; flex-wrap: wrap; gap: 2px 0; } .who-l b { color: var(--navy); font-weight: 600; } .who-l i { font-style: normal; color: var(--muted); padding: 0 4px; }
.cur-m .who-l { margin-bottom: 4px; } .rv .who-l { margin-top: 4px; font-size: 12.5px; }
.tag.cur-t { background: var(--orange-soft, #FFF3EC); color: var(--orange, #C2410C); border-color: transparent; }
/* v452 drawings the work needs: the Dashboard card, the Schedule badges */
.dn-card { padding: 12px 14px; } .dn-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; } .dn-h h3 { margin: 0; }
.dn-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.dn-r { display: grid; grid-template-columns: 10px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid #EDF0F3; text-decoration: none; color: inherit; font-size: 13px; }
.dn-r:hover { background: var(--orange-soft, #FFF3EC); } .dn-r > i { width: 9px; height: 9px; border-radius: 50%; background: #9AA4AE; }
.dn-r.r-red > i { background: var(--bad, #B3261E); } .dn-r.r-amber > i { background: #D9A441; } .dn-r.r-soon > i { background: #2A619C; }
.dn-t { display: grid; min-width: 0; } .dn-t b, .dn-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dn-t small { color: var(--muted); }
.dn-s { color: #3C4651; font-size: 12.5px; } .dn-d { white-space: nowrap; font-size: 12.5px; font-weight: 600; } .dn-r.r-red .dn-d { color: var(--bad, #B3261E); } .dn-more { margin-top: 6px; }
.dn-l { display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 600; padding: 1px 6px; text-decoration: none; border-left: 3px solid #2A619C; background: #EEF3F9; color: #24578F; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-l.r-red { border-color: var(--bad, #B3261E); background: #FCEDEC; color: var(--bad, #B3261E); } .dn-l.r-amber { border-color: #D9A441; background: #FBF3E2; color: #8A5A00; }
a.dn-warn { display: block; text-decoration: none; color: var(--bad, #B3261E); }
@media (max-width: 760px) { .dn-r { grid-template-columns: 10px minmax(0, 1fr) auto; } .dn-s { display: none; } }
/* v454 Drawings says what the Schedule needs that is not in Drawings yet */
.dw-sug { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 9px 14px; margin-bottom: 10px; border-left: 3px solid var(--orange, #C2410C); font-size: 13.5px; }
.dw-sug .btn { margin-left: auto; } .card.empty .mt { margin-top: 12px; } .card.empty [data-sug] { display: inline-flex; gap: 6px; align-items: center; }
/* v455 Schedule sheet: MS Project's Gantt Chart view (schedgrid.js) */
.mspw { overflow: hidden; }
.msp-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.msp-bar .seg button { min-width: 56px; } .msp-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; } .msp-hint { font-size: 12px; }
.msp { overflow: auto; position: relative; font-size: 12.5px; outline: none; background: var(--surface, #fff); }
.msp-row { display: flex; height: var(--h); width: calc(var(--L) + var(--tw)); border-bottom: 1px solid #EDF0F3; position: relative; }
.msp-cells { position: sticky; left: 0; z-index: 2; display: grid; grid-template-columns: var(--cols); width: var(--L); flex: none; background: var(--surface, #fff); border-right: 1px solid var(--line); }
.msp-c { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-right: 1px solid #EDF0F3; position: relative; color: #1F2A37; }
.msp-c.r { justify-content: flex-end; font-variant-numeric: tabular-nums; } .msp-c.ed { cursor: cell; }
.msp-c.on { box-shadow: inset 0 0 0 2px var(--orange, #C2410C); background: #FFF8F3; }
.msp-c.editing { padding: 0; } .msp-in { width: 100%; height: 100%; border: 0; padding: 0 6px; font: inherit; background: #fff; outline: 2px solid var(--orange, #C2410C); outline-offset: -2px; }
.msp-head { position: sticky; top: 0; z-index: 4; height: 44px; border-bottom: 1px solid var(--line); }
.msp-head .msp-cells { background: #F4F6F8; z-index: 5; } .msp-hc { align-items: flex-end; padding-bottom: 7px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; overflow: visible; }
.msp-rz { position: absolute; right: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 2; } .msp-rz:hover { background: rgba(194, 65, 12, .25); }
.msp-tl { position: relative; width: var(--tw); flex: none; height: 100%; }
.msp-scale { background: #F4F6F8; } .msp-scale .t1, .msp-scale .t2 { position: relative; height: 22px; }
.msp-scale span { position: absolute; top: 0; height: 22px; line-height: 22px; padding-left: 4px; border-left: 1px solid #DDE2E7; font-size: 11px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.msp-scale .t1 span { font-weight: 700; color: var(--navy); } .msp-scale .t2 { border-top: 1px solid #E6EAEE; }
.msp-body { position: relative; }
.msp-grid { position: absolute; top: 0; bottom: 0; left: var(--L); width: var(--tw); background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--wk) - 1px), #EEF1F4 calc(var(--wk) - 1px) var(--wk)); }
.msp-grid.month { background-image: none; }
.msp-links { position: absolute; top: 0; left: var(--L); pointer-events: none; overflow: visible; }
.msp-links path { fill: none; stroke: #8A949C; stroke-width: 1.2; } .msp-links path.crit { stroke: #B91C1C; } .msp-links marker path { fill: #8A949C; stroke: none; } .msp-links marker path.crit { fill: #B91C1C; }
.msp-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--orange, #C2410C); opacity: .6; }
.msp-row:hover .msp-cells { background: #FAFBFC; } .msp-row.done .c-name { color: var(--muted); }
.msp-g .msp-cells, .msp-row.msp-g:hover .msp-cells { background: #F6F7F9; } .msp-g .msp-c { font-weight: 700; color: var(--navy); }
.msp-nm { display: inline-flex; align-items: center; gap: 5px; padding-left: calc(var(--lv) * 16px); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.msp-nm > span:last-child { overflow: hidden; text-overflow: ellipsis; } .msp-nm .gchev { cursor: pointer; width: 14px; color: var(--muted); } .msp-nm .ms { font-style: normal; color: var(--navy); }
.msp-addr .msp-c { color: var(--muted); } .msp-add { display: inline-flex; align-items: center; gap: 5px; padding-left: calc(var(--lv, 0) * 16px); } .msp-add svg { width: 13px; height: 13px; }
.msp-addr:hover .c-name { color: var(--orange, #C2410C); }
.msp-pc { display: inline-block; width: 26px; height: 4px; background: #E6EAEE; margin-right: auto; } .msp-pc i { display: block; height: 100%; background: var(--navy); }
.msp-ok svg { width: 14px; height: 14px; color: var(--ok, #1D7A43); } .msp-cr { font-style: normal; font-weight: 800; color: #B91C1C; padding: 0 3px; }
.msp-nt svg { width: 13px; height: 13px; color: var(--muted); }
.msp-dw { display: inline-grid; place-items: center; width: 15px; height: 15px; font-size: 10px; font-weight: 800; color: #fff; background: #2A619C; text-decoration: none; }
.msp-dw.r-red { background: #B91C1C; } .msp-dw.r-amber { background: #C98A12; }
.msp-st { font-size: 11.5px; font-weight: 600; color: var(--c); }
.msp .tb { position: absolute; top: 7px; height: 15px; background: color-mix(in srgb, var(--c) 26%, white); border: 1px solid var(--c); cursor: grab; touch-action: none; }
.msp .tb i { position: absolute; left: 0; top: 5px; height: 3px; background: var(--c); } .msp .tb.crit { border-color: #B91C1C; box-shadow: 0 0 0 1px #B91C1C; }
.msp .tb.drag { opacity: .75; cursor: grabbing; } .msp .tb-r { position: absolute; right: -4px; top: -2px; bottom: -2px; width: 8px; cursor: ew-resize; }
.ta { position: absolute; top: 24px; height: 3px; background: #1F2937; opacity: .55; }
.tms { position: absolute; top: 4px; font-size: 15px; line-height: 1; color: var(--navy); cursor: grab; touch-action: none; }
.tsum { position: absolute; top: 10px; height: 7px; background: #3C4651; } .tsum::before, .tsum::after { content: ''; position: absolute; top: 100%; border: 4px solid transparent; border-top-color: #3C4651; }
.tsum::before { left: 0; border-left-color: #3C4651; } .tsum::after { right: 0; border-right-color: #3C4651; } .tsum i { display: block; height: 100%; background: var(--ok, #1D7A43); opacity: .85; }
.tl { position: absolute; top: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.msp-undo { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 9999; display: flex; gap: 14px; align-items: center; background: #1F2937; color: #fff; padding: 9px 16px; font-size: 13.5px; }
.msp-undo .lnk { color: #FDBA74; font-weight: 700; }
.msp-cm { position: absolute; z-index: 9999; width: 220px; padding: 10px 12px; display: grid; gap: 6px; font-size: 13px; }
.msp .msp-body .msp-row.dragging { opacity: .5; } .msp .msp-body .msp-row.drop-b { box-shadow: 0 -2px 0 var(--orange); } .msp .msp-body .msp-row.drop-a { box-shadow: 0 2px 0 var(--orange); }
.msp .msp-c { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; } .msp .msp-c.r { justify-content: flex-end; }
.msp .msp-hc { align-items: flex-end; white-space: nowrap; text-overflow: ellipsis; } .msp .msp-c > * { flex: none; } .msp .msp-c > .msp-nm { flex: 1 1 auto; }
.msp .msp-hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; } .msp .msp-hc.r .msp-hl { text-align: right; }
/* v462 the drawing each task is built from: the Drawing column, the submit-by flag on the timeline */
.msp .dwc { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; font-size: 12px; text-decoration: none; color: #3C4651; border: 0; background: none; padding: 0; font-family: inherit; cursor: pointer; }
.msp .dwc > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .msp .dwc small { color: var(--muted); white-space: nowrap; }
.msp .dwc.ok { color: var(--ok, #1D7A43); } .msp .dwc.ok svg { width: 13px; height: 13px; flex: none; }
.msp .dwc.pl { color: #5B3FA0; } .msp .dwc.rv { color: #24578F; } .msp .dwc.late small, .msp .dwc.late { color: #B91C1C; }
.msp .dwc.no { color: #B91C1C; } .msp .dwc.no b { flex: none; font-size: 11px; color: #fff; background: var(--orange, #C2410C); padding: 1px 6px; }
.msp .dwc.no:hover b { background: #9A3412; } .msp .dwc:disabled { opacity: .5; }
.msp .c-dwg { gap: 2px; }
.tdw { position: absolute; top: 6px; width: 12px; text-align: center; font-size: 11px; line-height: 1; color: #5B3FA0; z-index: 1; }
.tdw.none, .tdw.late { color: #B91C1C; } .tdw.review { color: #24578F; }
.tdl { position: absolute; top: 12px; border-top: 1px dashed #A99BD0; } .tdl.late { border-top-color: #E5A39C; }
.msp .dwc.dn { color: var(--muted); cursor: default; }
/* v466 work sequence: a step's links (step, FS/SS/FF, lag, where) in one row */
.sq-l { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px 120px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.sq-l input, .sq-l select { min-width: 0; }
.sq-l [data-c] { grid-column: 1 / -2; }
.sqt td:first-child { min-width: 220px; }
@media (max-width: 600px) { .sq-l { grid-template-columns: minmax(0, 1fr) 58px 56px; } .sq-l select[data-f=w] { grid-column: 1 / 3; } }
.seg a.btn-seg.on { background: var(--orange); color: #fff; } .seg .btn-seg + .btn-seg { border-left: 1px solid var(--line); }
/* v470 proposed schedule from the BOQ: sheet + timeline (computer), list (phone), manpower and equipment */
.pp-ctl { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.pp-ctl label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pp-ctl input[type=number] { width: 76px; } .pp-ctl select, .pp-ctl input { min-height: 32px; font-size: 13px; }
.pp-prio { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); padding: 3px 8px; font-size: 13px; cursor: grab; user-select: none; }
.pp-chip.over { border-color: var(--orange); box-shadow: inset 3px 0 0 var(--orange); } .pp-chip .btn.icon.sm { min-height: 26px; min-width: 26px; padding: 0; }
.pp-tabs { margin-top: 4px; } .pp-tabs .row.tight { gap: 6px; } .btn.icon.warn { border-color: var(--orange); color: var(--orange); }
.pp-tbl { max-height: calc(100vh - 230px); overflow: auto; }
.pp-t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.pp-t thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pp-t td { padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; background: var(--surface); }
.pp-t td.pp-n { min-width: 230px; max-width: 320px; } .pp-t td.pp-n > span { font-weight: 600; }
.pp-t input.cell { width: 58px; min-height: 26px !important; } .pp-t input.cell.pp-pr { width: 128px; text-align: left; font-family: var(--f-mono); font-size: 12px !important; }
.pp-t input.cell.set { border-color: var(--orange); background: var(--orange-soft); }
.pp-h { cursor: grab; color: var(--muted); width: 14px; padding: 0 2px !important; user-select: none; text-align: center; letter-spacing: -2px; }
.pp-id { cursor: pointer; color: var(--muted); width: 34px; }
.pp-r.sel td { background: #FFF4EE; } .pp-r.sel .pp-id { color: var(--orange); font-weight: 700; }
.pp-r.pre td { background: #EEF4FB; } .pp-r.suc td { background: #F1F8F2; }
.pp-r.over td { box-shadow: inset 0 2px 0 var(--orange); }
.pp-gr td { background: var(--surface-2); cursor: pointer; } .pp-gr .pp-tw { font: 700 15px var(--f-mono); color: var(--navy); text-align: center; }
th.pp-tl, td.pp-tl { min-width: 380px; width: 40%; position: relative; padding: 0 !important; }
.pp-mo { position: relative; height: 16px; } .pp-mo span { position: absolute; top: 0; font-size: 10px; letter-spacing: 0; text-transform: none; border-left: 1px solid var(--line); padding-left: 3px; white-space: nowrap; }
.pp-bar { position: absolute; top: 9px; height: 12px; background: #6B7A8F; display: block; }
.pp-bar.grp { top: 12px; height: 6px; background: var(--navy); }
.pp-bar.ms { width: 10px !important; height: 10px; margin-left: -5px; transform: rotate(45deg); background: var(--navy); top: 10px; }
.pp-dot { position: absolute; right: -6px; top: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--navy); cursor: crosshair; opacity: 0; }
.pp-r:hover .pp-dot { opacity: 1; } .pp-bar.ms .pp-dot { display: none; }
.pp-lk { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; } .pp-lk line { stroke: var(--orange); stroke-width: 2; stroke-dasharray: 5 4; }
.tr-civ .pp-bar:not(.ms), i.tr-civ { background: #6B7A8F; } .tr-stl .pp-bar:not(.ms), i.tr-stl { background: #E0592A; } .tr-arc .pp-bar:not(.ms), i.tr-arc { background: #2E8B57; }
.tr-mep .pp-bar:not(.ms), i.tr-mep { background: #6A3FA0; } .tr-ext .pp-bar:not(.ms), i.tr-ext { background: #8A6D3B; } .tr-gen .pp-bar:not(.ms), i.tr-gen { background: #24323F; }
.pp-m > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; } .pp-m > summary::-webkit-details-marker { display: none; }
.pp-m[open] > summary { margin-bottom: 6px; }
.pp-mr { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pp-mb { position: relative; display: block; height: 6px; background: var(--surface-2); margin-top: 4px; } .pp-mb .pp-bar { top: 0; height: 6px; } .pp-mb .pp-bar.ms { width: 6px !important; height: 6px; margin-left: -3px; top: 0; }
.pp-ch { display: flex; align-items: flex-end; height: 220px; gap: 1px; } .pp-col { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; min-width: 2px; } .pp-col i { display: block; }
.pp-ax { display: flex; justify-content: space-between; margin-top: 6px; } .pp-key { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; }
.pp-eq td.pp-tl { padding: 4px 6px !important; } .pp-hm { display: flex; gap: 1px; height: 14px; } .pp-hm i { flex: 1; background: var(--orange); min-width: 2px; }
.pp-t td.pp-n { width: 280px; min-width: 280px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pp-t td.pp-n div { overflow: hidden; text-overflow: ellipsis; }
.pp-t td.pp-n .tag { vertical-align: 1px; }
.pp-set > summary { display: none; list-style: none; } .pp-set > summary::-webkit-details-marker { display: none; }
@media (max-width: 899px) { .pp-set > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; } .pp-set[open] > summary { margin-bottom: 10px; } }
/* BOQ upload: one box to drop or pick the Excel and PDF (v475) */
.ub-dz { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 12px; border: 2px dashed #C5CDD6; background: var(--surface); cursor: pointer; text-align: center; font-weight: 500; color: var(--navy); }
.ub-dz:hover { border-color: var(--orange); background: #FFF4EE; }
.ub-dz svg { width: 22px; height: 22px; flex: none; }
/* predecessor picker (v478): a panel over the page; full screen on a phone */
.pk-ov { position: fixed; inset: 0; z-index: 400; background: rgba(1,30,65,.35); display: grid; place-items: center; }
.pk { background: var(--surface, #fff); width: min(640px, calc(100vw - 32px)); height: min(720px, calc(100vh - 48px)); display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(1,30,65,.25); }
.pk-h { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pk-h b { color: var(--navy); font-size: 15px; }
.pk-sel { padding: 6px 14px; border-bottom: 1px solid var(--line); max-height: 40%; overflow: auto; flex: none; }
.pk-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pk-row:last-child { border-bottom: 0; }
.pk-what { flex: 1; min-width: 0; } .pk-what .pk-n { font-weight: 500; }
.pk-id { display: inline-block; min-width: 2.6em; color: var(--muted); }
.pk-n { overflow: hidden; text-overflow: ellipsis; }
.pk-t button { min-width: 34px; }
.pk-g { display: flex; align-items: center; gap: 2px; } .pk-g input { width: 48px; height: 28px; text-align: center; padding: 0 2px; }
.pk-q { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.pk-q input { flex: 1; height: 34px; } .pk-qi svg { width: 16px; height: 16px; opacity: .6; }
.pk-list { flex: 1; overflow: auto; padding: 0 6px 8px; }
.pk-gh { position: sticky; top: 0; background: var(--surface, #fff); font-size: 12px; font-weight: 600; color: var(--navy); padding: 8px 8px 4px; border-bottom: 1px solid var(--line); }
.pk-o { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 7px 8px; cursor: pointer; font: inherit; color: inherit; }
.pk-o:hover { background: var(--orange-soft); } .pk-o.on { background: #EAF4EE; }
.pk-o[disabled] { opacity: .4; cursor: not-allowed; } .pk-o .pk-n { flex: 1; min-width: 0; white-space: nowrap; }
.pk-o svg { width: 14px; height: 14px; flex: none; color: var(--ok); } .pk-dot { width: 14px; height: 14px; border: 1.5px solid #C5CDD6; flex: none; }
.pk-w { white-space: nowrap; }
.pk-f { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.pk-none { padding: 6px 2px; margin: 0; }
.pk-btn { display: block; width: 100%; min-height: 30px; text-align: left; background: none; border: 1px solid transparent; padding: 3px 6px; cursor: pointer; font: inherit; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-btn:hover, .pk-btn:focus-visible { border-color: var(--orange); background: #FFF4EE; } .pk-btn.set { color: var(--orange-deep); font-weight: 500; } .pk-btn:empty::before { content: '—'; color: var(--muted); }
@media (max-width: 760px) { .pk { width: 100vw; height: 100dvh; } .pk-ov { place-items: stretch; } .pk-row { flex-wrap: wrap; } .pk-what { flex-basis: 100%; } }
/* proposed schedule: name, crews, men edited in place; predecessors picked (v478) */
.pp-t .pp-nr { display: flex; align-items: center; gap: 4px; overflow: visible !important; }
.pp-t input.cell.pp-nm { width: auto; flex: 1; min-width: 0; font-weight: 600; color: var(--navy); border-color: transparent; background: transparent; padding-left: 2px; }
.pp-t input.cell.pp-nm:hover, .pp-t input.cell.pp-nm:focus { border-color: var(--line); background: var(--surface, #fff); }
.pp-t input.cell.pp-nm.set { border-color: var(--orange); background: var(--orange-soft); }
.pp-t input.cell.sm { width: 52px; }
.pp-x { border: 0; background: none; padding: 2px; cursor: pointer; opacity: 0; color: var(--muted); flex: none; } .pp-x svg { width: 14px; height: 14px; }
.pp-r:hover .pp-x, .pp-x:focus-visible { opacity: 1; } .pp-x:hover { color: var(--bad); }
.pp-t .pk-btn.pp-pr { width: 132px; font-family: var(--f-mono); font-size: 12px; }
/* the sheet's column names cover the whole header: the timeline's second scale line no longer shows under them (v480) */
.msp-head { display: flex; } .msp-head .msp-cells { align-self: stretch; height: auto; min-height: 100%; } .msp-head .msp-hc { height: 100%; }
/* schedule linking (v480): the ID picks rows, a dot at a bar's end drags a link, a hovered task shows its links */
.msp .c-id { cursor: pointer; } .msp-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.msp-row.rsel .msp-cells, .msp-row.rsel:hover .msp-cells { background: #E8EEF6; } .msp-row.rsel .c-id { box-shadow: inset 3px 0 0 var(--navy); } .msp-row.rsel .msp-no { color: var(--navy); font-weight: 700; }
.msp-row.lkpre .msp-cells { box-shadow: inset 3px 0 0 #2E7D4F; } .msp-row.lksuc .msp-cells { box-shadow: inset 3px 0 0 var(--orange); }
.msp-row.lktarget .msp-cells, .msp-row.lktarget { background: var(--orange-soft) !important; }
.tb .tb-lk { position: absolute; right: -11px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--surface, #fff); border: 2px solid var(--navy); cursor: crosshair; opacity: 0; z-index: 2; }
.msp-row:hover .tb .tb-lk { opacity: 1; } .tb .tb-lk:hover { background: var(--orange); border-color: var(--orange); }
.sg-drag { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 500; } .sg-drag line { stroke: var(--orange); stroke-width: 2; stroke-dasharray: 5 3; }
.sg-lk { gap: 6px; align-items: center; } .sg-lk .btn svg { width: 14px; height: 14px; }
/* the rail's top stays (company, project, Home · Approvals · Dashboard · Documents); the modules scroll below it (v481) */
.rail-fix { flex: none; overflow: visible; position: relative; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rail-fix .rail-g { margin-bottom: 0; }
button.rail-pbox { width: 100%; text-align: left; border: 0; border-left: 4px solid var(--orange); font: inherit; cursor: pointer; position: relative; padding-right: 30px; }
button.rail-pbox:hover { background: var(--navy-2); } button.rail-pbox[aria-expanded="true"] { background: var(--navy-2); }
.psw-i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: #B8C4D4; font-size: 14px; }
.psw { position: absolute; left: 8px; width: 300px; max-height: min(60vh, 460px); display: flex; flex-direction: column; background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(1,30,65,.2); z-index: 60; }
.psw-q { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); } .psw-q svg { width: 15px; height: 15px; opacity: .6; } .psw-q input { flex: 1; height: 30px; }
.psw-l { overflow: auto; flex: 1; }
.psw-o { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #EEF1F4; padding: 8px 10px; cursor: pointer; font: inherit; color: inherit; }
.psw-o:hover { background: var(--orange-soft); } .psw-o.on { background: #EEF2F7; }
.psw-c { flex: none; min-width: 74px; font-size: 11.5px; color: var(--navy); font-weight: 600; }
.psw-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .psw-n b { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .psw-n small { font-size: 11px; color: var(--muted); }
.psw-o svg { width: 14px; height: 14px; color: var(--ok); flex: none; }
.psw-all { display: block; padding: 8px 10px; font-size: 12.5px; color: var(--orange-deep); text-decoration: none; border-top: 1px solid var(--line); } .psw-all:hover { background: var(--surface-2); }
.psw-none { padding: 10px; margin: 0; }
@media (max-height: 600px) { .rail { overflow-y: auto; } .rail > .rail-nav { flex: none; overflow: visible; } }   /* a short window: the whole rail scrolls */
/* v484: the workspace's own app link; a project's logo */
.ws-link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; }
.pl-img { display: inline-flex; align-items: center; min-height: 48px; } .pl-img img { max-height: 48px; max-width: 180px; object-fit: contain; }
.boot .boot-co[hidden] { display: none; }
/* v485: the workspace's own Telegram bot */
.ws-bot form input { flex: 1; min-width: 0; font-family: var(--f-mono); font-size: 12.5px; } .ws-steps { margin: 4px 0 8px; padding-left: 18px; } .ws-steps li { margin: 2px 0; }

/* v501: the portfolio list, what is worth a look every day: progress, on track or behind, time left, open items, the last diary (and value when shown).
   desktop one line per project; phone three lines (code + schedule, name + progress, time + open + diary) */
.pf-tbl { background: var(--surface); border: 1px solid var(--line); }
.pf-hd, .pf-r { display: grid; grid-template-columns: minmax(200px, 1fr) 160px 116px 130px 80px 104px; gap: 10px; align-items: center; padding: 0 12px; }
.pf-tbl.has-v .pf-hd, .pf-tbl.has-v .pf-r { grid-template-columns: minmax(200px, 1fr) 160px 116px 130px 80px 104px 86px; }
.pf-hd { min-height: 32px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pf-r { min-height: 42px; border-bottom: 1px solid #EDF0F3; font-size: 13px; cursor: pointer; } .pf-r:last-child { border-bottom: 0; }
.pf-r:hover, .pf-r:focus { background: #F4F6F8; outline: none; }
.pf-r > *, .pf-hd > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-r .pf-n { display: flex; align-items: baseline; gap: 8px; } .pf-r .pf-n b { color: var(--navy); overflow: hidden; text-overflow: ellipsis; }
.pf-c { font-size: 12px; color: var(--muted); flex: none; } .pf-stx { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 0 5px; flex: none; }
.pf-pg { display: flex; align-items: center; gap: 8px; } .pf-pg b { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; } .pf-pg .pf-bar2 { flex: 1; }
.pf-bar2 { position: relative; display: block; height: 5px; background: #E8ECF0; }
.pf-bar2 i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--orange); } .pf-bar2 u { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--navy); text-decoration: none; }
.pf-chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; } .pf-chip.ok { color: #1D7A43; background: #E6F2EA; } .pf-chip.bad { color: #9B1C1C; background: #FBE9E9; } .pf-chip.muted { color: var(--muted); padding-left: 0; }
.pf-op, .pf-v { text-align: right; font-variant-numeric: tabular-nums; } .pf-hd .pf-op, .pf-hd .pf-v { text-align: right; }
.pf-tm.warn-t { color: #8A5A00; } .pf-c2 { display: none; }
.pf-hd .pf-th { cursor: pointer; user-select: none; } .pf-hd .pf-th:hover { color: var(--navy); } .pf-hd .pf-th.on { color: var(--orange, #D9622B); }
@media (max-width: 1100px) { .pf-hd, .pf-r, .pf-tbl.has-v .pf-hd, .pf-tbl.has-v .pf-r { grid-template-columns: minmax(160px, 1fr) 130px 110px 120px 70px 96px; } .pf-v { display: none; } }
@media (max-width: 760px) {
  .pf-tbl { background: none; border: 0; } .pf-hd { display: none; }
  .pf-r, .pf-tbl.has-v .pf-r { position: relative; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "c c sc" "n n pg" "tm op dy"; row-gap: 3px; column-gap: 10px; padding: 10px 12px 12px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); min-height: 0; font-size: 13px; }
  .pf-r:last-child { border-bottom: 1px solid var(--line); }
  .pf-r .pf-c2 { grid-area: c; display: block; font-size: 12px; color: var(--navy); font-weight: 600; } .pf-r .pf-n { grid-area: n; display: block; } .pf-r .pf-n b { font-size: 15px; font-weight: 600; } .pf-r .pf-n .pf-c { display: none; } .pf-r .pf-stx { margin-left: 6px; }
  .pf-r .pf-sc { grid-area: sc; justify-self: end; } .pf-r .pf-pg { grid-area: pg; } .pf-r .pf-pg b { font-size: 15px; } .pf-r .pf-pg .pf-bar2 { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
  .pf-r .pf-0 { visibility: hidden; } .pf-r .pf-tm { grid-area: tm; font-size: 12px; } .pf-r .pf-op { grid-area: op; font-size: 12px; } .pf-r .pf-dy { grid-area: dy; font-size: 12px; text-align: right; } .pf-r .pf-v { display: none; }
}
/* v493: the BOQ overview is a bill summary. The composition bar shows how the contract splits into bills (share, not progress);
   each bill row: amount, share, and delivered as its own progress bar (track + green fill), so size and progress never share one look */
.bs { background: var(--surface); border: 1px solid var(--line); }
.bs-mix { display: flex; height: 10px; gap: 2px; margin: 12px 12px 6px; } .bs-mix i { display: block; min-width: 3px; }
.bs-hd, .bs-r { display: grid; grid-template-columns: minmax(160px, 1fr) 130px 64px 150px; gap: 12px; align-items: center; padding: 0 12px; }
.bs.has-d .bs-hd, .bs.has-d .bs-r { grid-template-columns: minmax(160px, 1fr) 130px 64px 150px 110px; }
.bs.has-c .bs-hd, .bs.has-c .bs-r { grid-template-columns: minmax(160px, 1fr) 130px 64px 150px 150px; }
.bs.has-d.has-c .bs-hd, .bs.has-d.has-c .bs-r { grid-template-columns: minmax(160px, 1fr) 130px 64px 150px 110px 150px; }
.bs-hd { min-height: 30px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.bs-hd .r, .bs-r .r { text-align: right; }
.bs-r { min-height: 48px; width: 100%; border: 0; border-bottom: 1px solid #EDF0F3; background: none; text-align: left; color: var(--ink); cursor: pointer; font: inherit; }
button.bs-r:hover { background: #F4F6F8; } .bs-r:last-child { border-bottom: 0; }
.bs-sw { width: 10px; height: 10px; display: block; }
.bs-n { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-width: 0; } .bs-n b { color: var(--navy); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bs-n small { font-size: 11.5px; }
.bs-a { font: 700 14px var(--f-mono); color: var(--navy); font-variant-numeric: tabular-nums; } .bs-s, .bs-d { font-size: 13px; font-variant-numeric: tabular-nums; }
.bs-pg { display: flex; align-items: center; gap: 8px; } .bs-pg b { font-size: 12.5px; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.bs-tr { flex: 1; height: 6px; background: #E8ECF0; position: relative; } .bs-tr i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); }
.bs-pg.cl .bs-tr i { background: var(--navy); } .bs-of { display: none; }
.bs-t { cursor: default; background: #F7F9FA; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .bs-hd { display: none; } .bs-mix { margin: 10px 10px 4px; }
  .bs .bs-r, .bs.has-d .bs-r, .bs.has-c .bs-r, .bs.has-d.has-c .bs-r { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n a" "s s" "pg pg"; row-gap: 4px; padding: 10px 12px; min-height: 0; }
  .bs.has-d .bs-r { grid-template-areas: "n a" "s d" "pg pg"; }
  .bs-sw { grid-area: sw; align-self: start; margin-top: 4px; } .bs-n { grid-area: n; } .bs-a { grid-area: a; align-self: start; }
  .bs-s { grid-area: s; text-align: left !important; font-size: 12px; color: var(--muted); }
  .bs-r > .bs-pg:not(.cl) { grid-area: pg; } .bs-d { grid-area: d; text-align: right; font-size: 12px; } .bs-d.muted { visibility: hidden; }
  .bs-r > .bs-pg.cl { display: none; } .bs-of { display: inline; }
}
/* v497: BOQ lines pasted from Excel: a paste box, then the rows with a column picker on top, what each row becomes, and what to check */
.bp-top { display: flex; gap: 10px; margin-bottom: 8px; } .bp-top label { flex: 1; max-width: 360px; }
.bp-in { width: 100%; min-height: 96px; border: 2px dashed var(--line); background: #FAFBFC; font: 14px var(--f-mono, monospace); padding: 10px; }
.bp-in:focus { border-color: var(--orange); outline: none; background: #fff; }
.bp-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; margin: 4px 0 8px; } .bp-sum .chk { margin-left: auto; }
.bp-tw { max-height: 52vh; overflow: auto; border: 1px solid var(--line); }
.bp-t { border-collapse: collapse; font-size: 12.5px; width: max-content; min-width: 100%; }
.bp-t th { position: sticky; top: 0; background: var(--surface); z-index: 1; padding: 4px; border-bottom: 1px solid var(--line); }
.bp-t th select { height: 28px; font-size: 12px; min-width: 96px; }
.bp-t td { padding: 4px 8px; border-bottom: 1px solid #EDF0F3; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bp-t td.r { text-align: right; font-variant-numeric: tabular-nums; }
.bp-t td.bp-skip { color: #A9B1B9; } .bp-t .bp-head td { font-weight: 700; color: var(--navy); background: #F7F9FA; } .bp-t .bp-total td { color: #A9B1B9; text-decoration: line-through; }
.bp-t .bp-w td { background: #FFF6E5; } .bp-t td.bp-st { white-space: nowrap; }

/* v499: column widths dragged on desktop (colsize.js): a handle on each heading's right edge; a list of grid rows follows --gc */
@media (min-width: 761px) and (pointer: fine) {
  .cz-c { position: relative; } th.cz-c { overflow: visible; }
  .cz-h { position: absolute; right: 0; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 2; }
  .cz-h::after { content: ''; position: absolute; right: 0; top: 4px; bottom: 4px; width: 2px; background: transparent; } .cz-h:hover::after, .cz-resizing .cz-h:active::after { background: var(--orange); }
  .cz-grid[style*="--gc"] > * { grid-template-columns: var(--gc) !important; } .cz-grid[style*="--gc"] { overflow-x: auto; }
  .cz-grid[style*="--gc"] > * { min-width: max-content; }
  body.cz-resizing, body.cz-resizing * { cursor: col-resize !important; user-select: none !important; }
}
/* v502: Switch project, with many projects: a search box; closed projects only when searched */
.pj-q { width: 100%; margin: 0 0 8px; }

/* v504: the workspace structure (Workspace control) and the opportunities register */
.st-tabs { margin: 6px 0 10px; flex-wrap: wrap; } .st-t { border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.st-t th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-t td { padding: 3px 4px; border-bottom: 1px solid #EDF0F3; } .st-t input:not([type=checkbox]), .st-t select { height: 30px; font-size: 13px; min-width: 70px; width: 100%; } .st-t td:first-child input { min-width: 64px; }
.op-tbl { background: var(--surface); border: 1px solid var(--line); }
.op-hd, .op-r { display: grid; grid-template-columns: 128px minmax(200px, 1fr) 72px 52px 120px 92px 96px 104px; gap: 10px; align-items: center; padding: 0 12px; }
.op-tbl.has-v .op-hd, .op-tbl.has-v .op-r { grid-template-columns: 128px minmax(200px, 1fr) 72px 52px 120px 92px 96px 96px 104px; }
.op-hd { min-height: 32px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.op-r { min-height: 40px; border-bottom: 1px solid #EDF0F3; font-size: 13px; cursor: pointer; } .op-r:hover, .op-r:focus { background: #F4F6F8; outline: none; }
.op-r > *, .op-hd > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .op-r .op-c { color: var(--navy); font-weight: 600; }
.op-sb, .op-a { text-align: right; font-variant-numeric: tabular-nums; } .op-hd .op-sb, .op-hd .op-a { text-align: right; }
.op-hd .pf-th { cursor: pointer; } .op-hd .pf-th.on { color: var(--orange, #D9622B); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin: 6px 0; } .kv > div { display: flex; flex-direction: column; } .kv .muted { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 1100px) { .op-hd, .op-r, .op-tbl.has-v .op-hd, .op-tbl.has-v .op-r { grid-template-columns: 120px minmax(160px, 1fr) 52px 92px 96px 104px; } .op-co, .op-sp, .op-a { display: none; } }
@media (max-width: 760px) {
  .op-tbl { background: none; border: 0; } .op-hd { display: none; }
  .op-r, .op-tbl.has-v .op-r { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "c st" "n n" "ls sb"; row-gap: 3px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); }
  .op-r .op-c { grid-area: c; } .op-r .op-st { grid-area: st; justify-self: end; } .op-r .op-n { grid-area: n; font-size: 15px; font-weight: 600; color: var(--navy); }
  .op-r .op-ls { grid-area: ls; font-size: 12px; color: var(--muted); } .op-r .op-sb { grid-area: sb; font-size: 12px; } .op-r .op-sb::after { content: ' sub.'; } .op-r .op-co, .op-r .op-l, .op-r .op-sp, .op-r .op-a { display: none; }
}
.op-sub td, .op-sub th { white-space: nowrap; } .op-sub td:last-child { white-space: normal; min-width: 180px; }
/* v506: opportunities are projects (Portfolio › Opportunities): name, company, line, sale, submissions, last, value, status → the project it became */
.pf-types { margin: 0 0 10px; flex-wrap: wrap; } .pf-types b { font-weight: 600; opacity: .7; margin-left: 3px; }
.op-hd, .op-r { grid-template-columns: minmax(220px, 1fr) 72px 52px 120px 92px 96px 150px; }
.op-tbl.has-v .op-hd, .op-tbl.has-v .op-r { grid-template-columns: minmax(220px, 1fr) 72px 52px 120px 92px 96px 96px 150px; }
.op-r > .op-c { display: none; } .op-n2 b { color: var(--navy); }
@media (max-width: 1100px) { .op-hd, .op-r, .op-tbl.has-v .op-hd, .op-tbl.has-v .op-r { grid-template-columns: minmax(180px, 1fr) 52px 92px 96px 150px; } .op-co, .op-sp, .op-a { display: none; } }
@media (max-width: 760px) {
  .op-r, .op-tbl.has-v .op-r { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "c st" "n n" "ls sb"; }
  .op-r > .op-c { display: block; grid-area: c; } .op-r .op-n2 { grid-area: n; font-size: 15px; } .op-r .op-n2 .mono { display: none; }
}
/* v511: BOQ › Quotations */
.q-t td, .q-t th { white-space: nowrap; } .q-t td.q-note { white-space: normal; min-width: 220px; } .q-t tr.q-won td { background: #EEF7F1; font-weight: 600; }
/* v512: the portfolio lists' columns follow each person's choice and order (--pfc); a heading being dragged, and where it lands */
@media (min-width: 761px) {
  .pf-cols:not([style*="--gc"]) > .pf-hd, .pf-cols:not([style*="--gc"]) > .pf-r, .pf-cols:not([style*="--gc"]) > .op-hd, .pf-cols:not([style*="--gc"]) > .op-r { grid-template-columns: var(--pfc) !important; }
  .pf-cols { overflow-x: auto; } .pf-cols > * { min-width: max-content; }
  .pf-cols > .pf-r > .pf-c2, .pf-cols > .pf-hd > .pf-c2, .pf-cols > .op-r > .op-c, .pf-cols > .op-hd > .op-c { display: block; } .pf-cols .pf-c2 { color: var(--navy); font-weight: 600; font-size: 12.5px; }
  .pf-cols > .pf-r > *, .pf-cols > .op-r > * { display: block; } .pf-cols > .pf-r > .pf-pg { display: flex; } .pf-cols > .pf-r > .pf-n { display: flex; }
  .pf-cols > .pf-hd > *, .pf-cols > .op-hd > * { display: block; }
  .pf-hd [draggable], .op-hd [draggable] { cursor: grab; } .pf-drag { opacity: .45; } .pf-dropl { box-shadow: inset 3px 0 0 var(--orange); }
}
@media (max-width: 760px) { .pf-r .pf-x, .op-r .op-x { display: none !important; } }
/* v513: Portfolio on the Drawings page shell: project names stand out, the picked project's panel (facts, contracts) */
.pf-tbl2 .dw-ti { font-weight: 600; color: var(--navy); } .pf-tbl2 .dw-r { cursor: pointer; } .pf-tbl2 .dw-r > .r, .pf-tbl2 .dw-hd > .r { text-align: right; justify-content: flex-end; }
.pf-tbl2 .dw-st .stp + .sm { color: var(--muted); }
.pfp h2 { font-size: 18px; line-height: 1.25; margin: 2px 0 8px; } .pfp > .row { gap: 8px; flex-wrap: wrap; } .pfp > .actions { margin: 12px 0 10px; justify-content: flex-start; }
.pfp-g { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
.pfp-f { display: contents; } .pfp-f > span, .pfp-f > b { padding: 6px 0; border-bottom: 1px solid #EDF0F3; font-size: 13px; } .pfp-f > span { color: var(--muted); } .pfp-f > b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pfp-h { margin: 18px 0 4px; } .pfp-h .muted { margin-left: 4px; }
.pfp-r { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #EDF0F3; font-size: 13px; } .pfp-r > .r { text-align: right; font-variant-numeric: tabular-nums; }
.pfp-s { padding: 0 0 6px; border-bottom: 1px solid #EDF0F3; margin-top: -1px; } .pfp-t { font-weight: 700; border-bottom: 0; }
@media (max-width: 760px) { .pf-tbl2 .dw-r .pf-pg { justify-self: end; } .pf-tbl2 .dw-r .pf-pg .pf-bar2 { display: none; } }
/* v515: editing a project's register fields in the Portfolio panel */
.pfe { display: flex; flex-direction: column; gap: 8px; } .pfe label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.pfe input, .pfe select { height: 32px; font-size: 13px; color: var(--ink); } .pfe-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .pfe .actions { margin-top: 6px; justify-content: flex-end; }
.pfp > .actions .btn svg { width: 14px; height: 14px; }
/* v516: the Portfolio map (Leaflet): the map fills the list's place; dots in the status colours; places still missing */
.pf-mapw { position: relative; border: 1px solid var(--line); background: var(--surface); }
.pf-map { width: 100%; min-height: 360px; background: #E8ECF0; z-index: 0; }
.pf-mapn { padding: 6px 10px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.pf-mapn .linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--orange); font-weight: 600; cursor: pointer; text-decoration: underline; }
.pf-map .leaflet-tooltip { font: 500 12px var(--f-body); border-radius: 0; padding: 3px 7px; } .pf-map .leaflet-control-layers, .pf-map .leaflet-bar a { border-radius: 0 !important; }
.pf-pop { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font: 13px var(--f-body); } .pf-pop .btn { margin-top: 4px; }
.pf-map .leaflet-popup-content-wrapper { border-radius: 0; }
.pf-nop { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; }
.pf-nopr { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 40px; padding: 0 6px; border: 0; border-bottom: 1px solid #EDF0F3; background: none; text-align: left; font: 13px var(--f-body); cursor: pointer; }
.pf-nopr:hover { background: var(--surface-2); } .pf-nopr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v519: the site's place in Project settings, with a button that opens it in Google Maps */
.place-in { display: flex; gap: 6px; } .place-in input { flex: 1; min-width: 0; } .place-in .btn { flex: none; width: 40px; padding: 0; justify-content: center; } .place-in .btn svg { width: 16px; height: 16px; }
/* v523: Open in browser (inside Telegram): a link-out icon with the word, plain like the other top icons */
.top-web { width: auto; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border: 0; background: none; font: 700 12px var(--f-body); color: var(--navy); cursor: pointer; }
.top-web svg { width: 18px; height: 18px; } .top-web:focus { outline: none; } .top-web:focus-visible { outline: 2px solid var(--orange); }
/* v524: Open in browser in the side menu (Telegram on a wide screen), styled as the Notifications row */
.rail-web { width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: none; font: inherit; font-size: 13px; text-align: left; cursor: pointer; } .rail-web:hover { background: var(--surface-2); }
.rail-web svg { width: 18px; height: 18px; flex: none; }
/* v525: Project info: facts on the left in compact rows, requests / team / timeline on the right */
.pi-wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.pi-main { padding: 6px 18px 16px; } .pi-side { display: flex; flex-direction: column; gap: 12px; } .pi-side .card { margin: 0; }
.pi-text { white-space: pre-wrap; margin: 2px 0 8px; font-size: 13.5px; line-height: 1.5; }
.pi-bl { border: 1px solid var(--line); margin: 6px 0 4px; } .pi-b { display: grid; grid-template-columns: minmax(0, 1fr) 140px 50px; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #EDF0F3; font-size: 13px; } .pi-b:last-child { border-bottom: 0; } .pi-b .r { text-align: right; }
.pi-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 12px; }
.pi-rq { display: flex; flex-direction: column; } .pi-r { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #EDF0F3; }
.pi-r:last-child { border-bottom: 0; } .pi-r.late { box-shadow: inset 3px 0 0 var(--bad, #9B1C1C); padding-left: 8px; }
.pi-rk { display: flex; flex-direction: column; min-width: 0; } .pi-rk b { font-size: 13.5px; color: var(--navy); } .pi-rk small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-team { display: flex; flex-wrap: wrap; gap: 6px; } .pi-tm { display: flex; flex-direction: column; padding: 5px 9px; border: 1px solid var(--line); background: var(--surface); } .pi-tm b { font-size: 13px; } .pi-tm small { font-size: 11.5px; color: var(--muted); }
.pi-tl { list-style: none; margin: 4px 0 0; padding: 0 0 0 14px; border-left: 2px solid #E8ECF0; }
.pi-tl li { position: relative; padding: 0 0 12px 6px; display: flex; flex-direction: column; } .pi-tl li::before { content: ''; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.pi-td { font-size: 11.5px; color: var(--muted); } .pi-tl b { font-size: 13px; font-weight: 600; } .pi-tl small { font-size: 12px; color: var(--muted); }
.pi-er { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr 34px; gap: 6px; margin-bottom: 6px; } .pi-er.pi-bd { grid-template-columns: 1.5fr 1fr 80px 34px; }
.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
@media (max-width: 900px) { .pi-wrap { grid-template-columns: 1fr; } .pi-er { grid-template-columns: 1fr 1fr; } .pi-er.pi-bd { grid-template-columns: 1fr 1fr; } .pi-er .btn { grid-column: 1 / -1; justify-self: end; } }
/* v526: BOQ lines against the revision before: new and changed lines marked, the count in the strip filters them */
.boqt tr.chg-new > td:first-child { box-shadow: inset 3px 0 0 #1D7A43; } .boqt tr.chg-mod > td:first-child { box-shadow: inset 3px 0 0 #C98A12; }
.tag.chg-t { background: #FFF3DC; color: #8A4B00; } .boqt tr.chg-new .tag.chg-t { background: #E6F2EA; color: #1D7A43; }
.sc.ckbtn.on { box-shadow: inset 0 -3px 0 var(--orange); }
/* v527: BOQ quick add: one row, Enter adds and starts the next; past lines suggested under the description */
.bq-add { margin-top: 10px; padding: 10px 12px; } .bq-ah { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.bq-ar { display: grid; grid-template-columns: 90px minmax(220px, 1fr) 70px 90px 110px 110px auto; gap: 6px; align-items: center; }
.bq-ar input { height: 32px; font-size: 13px; min-width: 0; } .bq-ds { position: relative; } .bq-ds input { width: 100%; }
.bq-sug { position: absolute; left: 0; right: 0; top: 34px; z-index: 20; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(11, 37, 69, .14); max-height: 320px; overflow: auto; }
.bq-s { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 6px 10px; border: 0; border-bottom: 1px solid #EDF0F3; background: none; text-align: left; cursor: pointer; font: 13px var(--f-body); }
.bq-s small { color: var(--muted); font-size: 11.5px; } .bq-s:hover, .bq-s.on { background: var(--orange-soft); }
.bq-add > small { display: block; margin-top: 6px; }
@media (max-width: 760px) { .bq-ar { grid-template-columns: 1fr 1fr; } .bq-ds { grid-column: 1 / -1; } .bq-ar .btn { grid-column: 1 / -1; } }
/* v528: BOQ on the Drawings pattern: bill groups with their subtotal, cells you type in, the line in the panel */
.bq-g { gap: 10px; } .bq-g .bq-gs { margin-left: 6px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.bq-tot { background: #E8ECF0; border-top: 2px solid var(--navy); }
.bq-r .r { text-align: right; justify-content: flex-end; font-variant-numeric: tabular-nums; } .dw-hd > .r { text-align: right; justify-content: flex-end; }
.bq-r input.cell { width: 100%; height: 26px; padding: 0 6px; font-size: 12.5px; text-align: right; border: 1px solid transparent; background: transparent; }
.bq-r input.cell:hover { border-color: var(--line); background: var(--surface); } .bq-r input.cell:focus { border-color: var(--orange); background: var(--surface); outline: none; }
.bq-r.dim > *:not(.dw-dot) { opacity: .6; } .bq-r .tag { font-size: 10.5px; }
.bq-r.chg-new { box-shadow: inset 3px 0 0 #1D7A43; } .bq-r.chg-mod { box-shadow: inset 3px 0 0 #C98A12; }
.bq-r .bar.sm { display: inline-block; width: 50px; vertical-align: middle; margin-right: 6px; }
.bq-pv { padding: 0 2px 12px; } .bq-pv .strip { flex-wrap: wrap; } .bq-ph { display: none; }
@media (max-width: 760px) { .bq-ph { display: inline; } .bq-g .bq-gs { font-size: 12px; } }
/* v530: registers on the Drawings pattern: a table on a computer (columns you can size), the record in the panel */
.rg-tbl { --cols: 10px 120px 300px 150px 90px 160px 170px 110px 110px minmax(0, 1fr); }
.rg-tbl > .dw-hd, .rg-tbl > .dw-r { grid-template-columns: var(--gc, var(--cols)); }
.rg-r { text-decoration: none; color: inherit; } .rg-r.is-closed .dw-ti b { font-weight: 500; color: var(--muted); } .rg-r .dw-ti b { font-weight: 600; color: var(--navy); }
.rg-r .dw-c { font-size: 12px; } .rg-r .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rg-noloc .dw-wrap > .dw-tree { display: none !important; } .rg-noloc .rg-tb > .dw-locb { display: none !important; }
.rg-tb > .dw-locb { width: auto; max-width: 40%; } .dw-tab.rg-all { margin-left: 8px; border-left: 1px solid var(--line); }
.dw-tab.bad-t b { color: var(--bad, #9B1C1C); } .dw-tab.warn-t b { color: #8A4B00; }
.rg-pv { padding: 0 4px 12px; } .rg-pv .head { margin-top: 0; }
.dw-open .rg-wrap > .dw-panel { max-height: calc(100vh - 120px); }
/* v532: the left panel's heading is a button: what the list is grouped by, with a menu of the module's choices */
.tp-b { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 0; border: 0; background: none; cursor: pointer; font: 700 11px var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tp-b i { font-style: normal; font-size: 10px; color: var(--orange); } .tp-b:hover { color: var(--navy); }
.dw-tree.in-sheet .dw-lth { display: flex; } .dw-tree.in-sheet .tp-b { font-size: 13px; padding: 8px 0; } .dw-tree.in-sheet .dw-fold { display: none; }
/* v533: Submittals, Photos, Deliveries, Site diary and Documents on the same frame: tabs, the choosable left panel, the list */
.sb-tbl { --cols: 10px 130px 320px 170px 150px 150px 150px 120px 100px minmax(0, 1fr); }
.lib-tree > .dw-lth { padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--line); } .lib-tree .dw-fold { display: none; }
.lib-tree > .dw-li { border-bottom: 1px solid var(--line); height: 36px; }
.lib-grp { display: none; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); max-width: 100%; } .lib-grp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lib-grp svg { color: var(--orange); flex: none; }
@media (max-width: 900px) { .lib-grp { display: inline-flex; } }
.lib-sheet .lt { padding: 12px 10px; font-size: 14px; }
.dlv-p { margin-top: 14px; }
.lib-tree > .dw-lth { padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--line); } .lib-tree .dw-fold { display: none; }
.lib-tree > .dw-li { border-bottom: 1px solid var(--line); height: 36px; }
.lib-grp { display: none; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); max-width: 100%; } .lib-grp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lib-grp svg { color: var(--orange); flex: none; }
@media (max-width: 900px) { .lib-grp { display: inline-flex; } }
.lib-sheet .lt { padding: 12px 10px; font-size: 14px; }
.dlv-p { margin-top: 14px; }
.tm-grp { margin: 4px 0 2px; }
.dw-tree.in-sheet .dw-lt.tp-b { display: inline-flex; }
.push-ask svg { width: 20px; height: 20px; color: var(--orange); flex: none; } .push-ask b { flex: 1; }
.bq-cur { font-weight: 600; color: var(--orange); letter-spacing: .04em; margin-left: 3px; }
/* v539: Claims & payments */
.cl-sum { flex-wrap: wrap; } .cl-sum .sc b .muted { font-weight: 500; }
.cl-bar { position: relative; height: 6px; background: var(--surface-2, #EEF1F4); margin: 6px 0 14px; } .cl-bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.cl-bc { background: #F2C9A8; } .cl-bk { background: #1D7A43; }
.cl-tbl > .dw-hd, .cl-tbl > .dw-r { grid-template-columns: 110px 120px 130px 1fr 1fr 1fr 1fr 160px; }
.cl-r { text-decoration: none; color: inherit; } .cl-r .r, .cl-tbl .dw-hd .r { text-align: right; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.cl-set { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 12px 14px; margin-bottom: 12px; }
.cl-f { display: flex; flex-direction: column; gap: 3px; min-width: 110px; } .cl-f small { font-size: 11px; color: var(--muted); font-weight: 600; }
.cl-f input { height: 32px; font-size: 13px; width: 130px; } .cl-fi { display: flex; align-items: center; gap: 4px; } .cl-fi i { font-style: normal; font-size: 12px; color: var(--muted); }
.cl-wrap { display: flex; gap: 16px; align-items: flex-start; } .cl-main { flex: 1; min-width: 0; }
.cl-side { flex: 0 0 330px; position: sticky; top: 8px; padding: 12px 14px; }
.cl-lines td, .cl-lines th { font-size: 12.5px; padding: 5px 8px; white-space: nowrap; } .cl-lines td.cl-d { white-space: normal; min-width: 220px; }
.cl-lines .num { text-align: right; font-variant-numeric: tabular-nums; } .cl-g td { background: var(--surface-2, #F3F5F7); font-weight: 700; color: var(--navy); font-size: 12px; }
.cl-in { width: 90px; height: 26px; font-size: 12.5px; text-align: right; padding: 0 6px; }
.cl-site { display: block; font-size: 11px; color: #1D7A43; }
.cl-h { margin: 18px 0 8px; }
.cl-sums { width: 100%; border-collapse: collapse; font-size: 13px; } .cl-sums td, .cl-sums th { padding: 4px 2px; } .cl-sums .num { text-align: right; font-variant-numeric: tabular-nums; }
.cl-sums th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cl-sums tr.b1 td { font-weight: 700; border-top: 1px solid var(--line); } .cl-sums tr.b2 td { font-weight: 800; color: var(--navy); border-top: 2px solid var(--navy); font-size: 14px; }
.cl-owed { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 700; }
@media (max-width: 1099px) { .cl-wrap { flex-direction: column-reverse; } .cl-side { position: static; flex: none; width: 100%; } }
@media (max-width: 760px) { .cl-tbl > .dw-hd { display: none; } .cl-tbl > .dw-r { grid-template-columns: 1fr auto; } .cl-tbl > .dw-r > :nth-child(n+5) { display: none; } }
@media print { .rail, .top, .tabbar, .cl-set input, .head .row, .filters { display: none !important; } .cl-wrap { display: block; } .cl-side { width: 100%; } }
/* v542: BOQ line types: a small tag per line; types not in the total are grey, a credit or discount red */
.bq-k { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; padding: 1px 6px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.bq-k-measured { border-color: transparent; background: none; padding-left: 0; }
.bq-k-lump, .bq-k-prelim, .bq-k-prov_qty { color: #24578F; border-color: #C9D8EA; background: #EEF3F9; }
.bq-k-provisional, .bq-k-pc, .bq-k-risk, .bq-k-contingency, .bq-k-pct { color: #6E48AA; border-color: #DCD1EE; background: #F4F0FA; }
.bq-k-credit, .bq-k-adjust { color: #9B1C1C; border-color: #EBC9C9; background: #FBEFEF; }
.bq-k-optional, .bq-k-rate_only, .bq-k-included, .bq-k-excluded, .bq-k-note, .bq-k-daywork { color: var(--muted); border-style: dashed; }
.bq-ar #qa-kind { width: 120px; flex: none; height: 32px; font-size: 13px; }
.bq-empty .dw-g { justify-content: space-between; }
/* v543: Start the BOQ from a template, another project or the 3D model */
.bs-tabs { margin: 4px 0 12px; flex-wrap: wrap; } .bs-tabs .dw-tab svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.bs-list .it { width: 100%; text-align: left; } .bs-list .it small { display: block; } .bs-list .it svg { color: var(--orange); }
.bs-bills { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 8px; max-height: 180px; overflow: auto; }
.bs-prev { max-height: 300px; overflow: auto; border: 1px solid var(--line); } .bs-t { width: 100%; border-collapse: collapse; font-size: 12.5px; } .bs-t td, .bs-t th { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; } .bs-t .num { text-align: right; }
.bs-save { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* v544: the line type picked from a list that says what each type means */
.kp-b { width: 100%; justify-content: space-between; } .kp-b i { font-style: normal; color: var(--orange); } .kp-h { display: block; margin-top: 3px; font-size: 12px; }
.kp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; border: 1px solid var(--line); max-height: 320px; overflow: auto; }
.kp-o { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; font: inherit; }
.kp-o b { font-size: 13px; color: var(--navy); } .kp-o small { font-size: 11.5px; color: var(--muted); } .kp-o:hover { background: var(--surface-2); } .kp-o.on { box-shadow: inset 3px 0 0 var(--orange); background: var(--orange-soft); }
@media (max-width: 760px) { .kp-list { grid-template-columns: 1fr; max-height: none; } .kp-o { padding: 10px 12px; } .kp-o b { font-size: 14px; } }

/* v545: the dimension sheet beside the drawing */
.sheet:has(.dm-wrap) { width: min(1280px, 97vw); max-width: none; }
.dm-wrap { display: flex; gap: 14px; align-items: flex-start; } .dm-left { flex: 0 0 470px; min-width: 0; } .dm-right { flex: 1; min-width: 0; }
.dm-t { width: 100%; border-collapse: collapse; font-size: 12.5px; } .dm-t th { font-size: 11px; color: var(--muted); text-align: left; padding: 2px 3px; } .dm-t td { padding: 2px 3px; border-bottom: 1px solid var(--line); }
.dm-t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .dm-t tr.neg td { color: var(--bad, #9B1C1C); }
.dm-in { width: 64px; height: 28px; font-size: 12.5px; text-align: right; padding: 0 5px; } .dm-note { width: 100%; height: 28px; font-size: 12px; padding: 0 5px; }
.dm-bar { margin-bottom: 6px; } .dm-bar select { flex: 1; min-width: 0; height: 32px; font-size: 13px; }
.dm-pdf { position: relative; max-height: 70vh; overflow: auto; border: 1px solid var(--line); background: #fff; } .dm-hint { padding: 10px; }
.dm-page { position: relative; } .dm-page canvas { display: block; }
.dm-num { position: absolute; padding: 0; border: 0; background: rgba(217, 98, 43, .14); outline: 1px solid rgba(217, 98, 43, .55); cursor: pointer; }
.dm-num:hover { background: rgba(217, 98, 43, .38); } .dm-num.used { background: rgba(29, 122, 67, .25); outline-color: #1D7A43; }
@media (max-width: 900px) { .dm-wrap { flex-direction: column; } .dm-left { flex: none; width: 100%; } .dm-in { width: 52px; } }

/* v548: the blank rows under the BOQ lines, typed like a spreadsheet */
.bq-eh { color: var(--orange); gap: 6px; } .bq-eh { justify-content: flex-start !important; } .bq-eh > b { font-weight: 700; } .bq-eh svg { width: 14px; height: 14px; } .bq-eh > span { text-transform: none; letter-spacing: 0; }
.dw-r.bq-e { min-height: 34px; background: #FCFCFD; } .dw-r.bq-e:hover { background: #F7F9FA; }
.bq-e > span { min-width: 0; } .bq-e .bq-ds { position: static; }
.bq-e .ec { width: 100%; height: 28px; padding: 0 6px; font-size: 13px; border: 1px solid transparent; background: transparent; border-radius: 0; min-width: 0; }
.bq-e .ec:hover { border-color: var(--line); background: var(--surface); } .bq-e .ec:focus { border-color: var(--orange); background: var(--surface); outline: none; box-shadow: none; }
.bq-e input.ec.r { text-align: right; font-variant-numeric: tabular-nums; } .bq-e select.ec { padding: 0 2px; }
.bq-e input.ec::placeholder { color: #B7BFC7; }
.bq-e.err [data-f="description"] { border-color: var(--bad, #B3261E); background: #FDF2F1; }
.bq-sug.fx { position: fixed; z-index: 80; max-height: 250px; }
/* v549: blank rows look like a sheet (cell lines), the New lines row stays in view when the table scrolls sideways */
.bq-eh { position: sticky; left: 0; flex-wrap: wrap; row-gap: 4px; padding-top: 4px; padding-bottom: 4px; } .bq-eb { margin-left: 8px; text-transform: none; letter-spacing: 0; }
.bq-e .ec { border-color: #E3E7EB; background: var(--surface); }
.bq-e select.ec { color: var(--muted); font-size: 12.5px; } .bq-e select.ec:focus, .bq-e select.ec:hover { color: var(--ink, #1B2733); }
.dw-tbl.bq-tbl { grid-template-columns: minmax(min-content, 1fr); }   /* v549: a long description wraps into its cell, the table keeps to the screen */
/* v550: the narrow Type column: a short mark (PS, PC, LS…), the full list behind it */
.bq-kp { position: relative; display: block; height: 28px; }
.bq-ks { display: flex; align-items: center; height: 28px; padding: 0 14px 0 6px; border: 1px solid #E3E7EB; background: var(--surface); font-size: 11.5px; font-weight: 700; color: var(--navy); overflow: hidden; white-space: nowrap; }
.bq-ks::after { content: ""; position: absolute; right: 6px; top: 12px; border: 3.5px solid transparent; border-top-color: #9AA4AE; }
.bq-kp select.ec { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bq-kp:hover .bq-ks { border-color: var(--line); } .bq-kp:focus-within .bq-ks { border-color: var(--orange); }

/* v551: the Type field in the line form (it shared a class with the pin button), a heading row among the blank rows */
.ktp { display: block; min-width: 0; }
.bq-e.hd { background: #F4F6F8; } .bq-e.hd input[data-f="description"] { font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; }
.bq-e.hd input.ec.r, .bq-e.hd [data-f="unit"] { visibility: hidden; } .bq-e.hd .bq-ks { color: var(--orange); }
.bq-sg { background: var(--surface); padding-left: 26px; font-size: 11px; color: var(--navy); min-height: 26px; } .bq-sg > span:first-child { color: var(--navy); font-weight: 700; }

/* v553: building and trade typed on the row; a line being dragged and where it lands */
.bq-r input.tcell { width: 100%; height: 26px; padding: 0 5px; font-size: 12.5px; border: 1px solid transparent; background: transparent; min-width: 0; text-overflow: ellipsis; }
.bq-r input.tcell:hover { border-color: var(--line); background: var(--surface); } .bq-r input.tcell:focus { border-color: var(--orange); background: var(--surface); outline: none; }
.bq-r.dragging { opacity: .45; } .bq-r.drop-b, .bq-g.drop-b, .bq-g.drop-a { box-shadow: inset 0 2px 0 var(--orange); } .bq-r.drop-a { box-shadow: inset 0 -2px 0 var(--orange); }
.bq-g[data-first].drop-b, .bq-g[data-first].drop-a { background: var(--orange-soft); }
@media (hover: hover) and (pointer: fine) { .bq-tbl .bq-r[data-id] { cursor: grab; } .bq-tbl .bq-r[data-id] input, .bq-tbl .bq-r[data-id] select { cursor: text; } }

/* v560: a cell that drops down its list (location tree, trade, discipline) */
input[data-pick] { padding-right: 18px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0h8L4 5z' fill='%239AA4AE'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 6px center !important; cursor: pointer; }
.bq-r input.tcell[data-pick] { border-color: #E3E7EB; background-color: var(--surface); }
.pk-pop { position: fixed; z-index: 90; max-height: 300px; overflow: auto; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(11, 37, 69, .16); }
.pk-o { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-bottom: 1px solid #EDF0F3; background: none; text-align: left; cursor: pointer; font: 13px var(--f-body); color: var(--ink, #1B2733); }
.pk-o small { color: var(--muted); font-size: 11px; white-space: nowrap; } .pk-o:hover, .pk-o.on { background: var(--orange-soft); }
.pk-none { padding: 10px 12px; font-size: 13px; color: var(--muted); } .pk-none a { color: var(--orange); font-weight: 600; }

/* v562: Edit is on (the table's cells can be typed) */
.btn.bq-edon { background: var(--orange); border-color: var(--orange); color: #fff; }

/* v567: a building type's parts and elements to tick */
.tp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 15px; }
.tp-parts { max-height: 58vh; overflow: auto; border: 1px solid var(--line); }
.tp-p { padding: 8px 10px; border-bottom: 1px solid var(--line); } .tp-p:last-child { border-bottom: 0; }
.tp-ph { font-size: 13.5px; } .tp-ph .mono { display: inline-block; min-width: 18px; text-align: right; }
.tp-els { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 4px 0 0 26px; } .tp-e { font-size: 13px; } .tp-e small { margin-left: 2px; }
.tp-go { justify-content: space-between; align-items: center; }

/* v568: "+ Add location…" at the end of a dropdown cell */
.pk-add { position: sticky; bottom: 0; display: block; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--orange); font: 600 13px var(--f-body); text-align: left; cursor: pointer; }
.pk-add:hover { background: var(--orange-soft); }

/* v569: Edit on: every cell of a line typed in place */
.bq-r input.tcell:not([data-pick]) { border-color: #E3E7EB; background-color: var(--surface); }
.bq-r input.tcell.mono { font-family: var(--f-mono, ui-monospace, monospace); font-weight: 700; font-size: 12px; }
.bq-r .bq-kp select.tcell { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bq-tbl:has(.bq-r input.tcell) .bq-r[data-id] { cursor: default; }

/* v571: with Edit on, a section heading is typed over; "+ Section" shows on hover */
.bq-gh input.gname { height: 26px; min-width: 160px; max-width: 420px; padding: 0 6px; border: 1px solid #E3E7EB; background: var(--surface); font: 700 12px var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: var(--navy); }
.bq-gh input.gname:focus { border-color: var(--orange); outline: none; }
.bq-addsec { margin-left: auto; height: 24px; padding: 0 8px; border: 1px solid var(--orange); background: var(--surface); color: var(--orange); font: 600 11.5px var(--f-body); text-transform: none; letter-spacing: 0; cursor: pointer; opacity: 0; display: inline-flex; align-items: center; gap: 4px; }
.bq-addsec svg { width: 12px; height: 12px; } .bq-gh:hover .bq-addsec, .bq-addsec:focus { opacity: 1; } .bq-addsec:hover { background: var(--orange-soft); }
@media (hover: none) { .bq-addsec { opacity: 1; } }

/* v572: a row changed (saved when left), just saved, or not saved */
.bq-r.dirty { box-shadow: inset 3px 0 0 #C98A12; background: #FFFBEF; } .bq-r.saved { box-shadow: inset 3px 0 0 var(--ok, #1D7A43); transition: box-shadow .6s; }
.bq-r.bad { box-shadow: inset 3px 0 0 var(--bad, #B3261E); }

/* v573: the + between lines (Edit on): insert an item or a section right below */
.bq-tbl .bq-r { position: relative; }
.bq-ins { position: absolute; left: 0; bottom: -9px; z-index: 3; width: 18px; height: 18px; padding: 0; border: 1px solid var(--orange); border-radius: 50%; background: var(--surface); color: var(--orange); font: 700 13px/1 var(--f-body); cursor: pointer; opacity: 0; transition: opacity .1s; }
.bq-ins:hover, .bq-ins:focus-visible { opacity: 1; } .bq-ins:hover { background: var(--orange); color: #fff; }
.bq-r:hover { z-index: 2; }

/* v574: the BOQ grid: heading stays on top, the code column stays on the left, cells selected and edited in place, row icons on hover */
.bq-tbl .dw-hd { position: sticky; top: 0; z-index: 6; background: var(--surface); }
.bq-tbl .dw-r { background-color: var(--surface); } .bq-tbl .dw-r:hover { background-color: #F1F4F7; }
.bq-tbl .bq-cc, .bq-tbl .dw-hd > .bqh-c { position: sticky; left: 0; z-index: 4; background: inherit; box-shadow: 6px 0 6px -6px rgba(11, 37, 69, .25); }
.bq-tbl .dw-hd > .bqh-c { z-index: 7; }
.bq-grid { outline: none; } .bq-grid .bq-r { cursor: default; }
.gc { display: block; min-width: 0; min-height: 28px; line-height: 26px; padding: 0 6px; border: 1px solid transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: cell; }
.gc.r { text-align: right; font-variant-numeric: tabular-nums; } .gc.mono { font-weight: 700; font-size: 12px; } .gc.gk { font-size: 11.5px; font-weight: 700; color: var(--navy); }
.bq-grid .gc:hover { border-color: #DCE2E8; }
.gc.cur { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); background: var(--surface); }
.gc.edited { background: #FFF1C2; } .gc.edited.cur { background: #FFF1C2; }
.gc.editing { padding: 0; border-color: transparent; overflow: visible; }
.gc-ed { width: 100%; height: 28px; padding: 0 6px; border: 2px solid var(--orange); background: var(--surface); font: inherit; font-size: 13px; outline: none; }
.gc.invalid .gc-ed { border-color: var(--bad, #B3261E); background: #FDF2F1; }
.gc.r .gc-ed { text-align: right; }
.bq-acts { display: inline-flex; gap: 2px; justify-content: flex-end; visibility: hidden; }
.bq-r:hover .bq-acts { visibility: visible; } .bq-acts .btn.icon.sm { width: 28px; height: 28px; } .bq-acts [data-act="del"]:hover { color: var(--bad, #B3261E); border-color: var(--bad, #B3261E); }
@media (max-width: 760px) { .bq-acts { display: none; } }
.dw-hm { margin-left: 4px; width: 18px; height: 18px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 10px; line-height: 1; cursor: pointer; opacity: 0; vertical-align: middle; }
.dw-hd > span:hover .dw-hm, .dw-hm.on { opacity: 1; } .dw-hm.on { color: var(--orange); }
.bq-fbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; } .bq-fbar .chip { height: 26px; font-size: 12px; }
.hf-pop { position: fixed; z-index: 95; padding: 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(11, 37, 69, .16); }
.hf-pop input { width: 230px; height: 32px; font-size: 13px; }

/* v577: the menu folded to icons; folded, it opens over the page on hover (and while something in it has focus) */
.rail-logo { position: relative; padding-right: 38px; }
.rail-tog { position: absolute; top: 13px; left: calc(var(--rail-w) - 34px); z-index: 2; width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 14px/1 var(--f-body); cursor: pointer; }
.rail-tog:hover { color: var(--orange); border-color: var(--orange); }
:root.rail-mini { --rail-w: 56px; }
/* v596: folded, the menu keeps its full layout and is only uncovered: nothing moves while it opens (labels fade, icons stay put) */
.rail-mini .rail { overflow: hidden; contain: layout paint; transition: width .16s cubic-bezier(.2, .7, .3, 1) .15s, box-shadow .16s ease .15s; }
.rail-mini .rail:hover, .rail-mini .rail:focus-within { width: 236px; box-shadow: 8px 0 24px rgba(11, 37, 69, .18); transition-delay: .08s; }
.rail-mini .rail > * { width: 236px; flex-shrink: 0; box-sizing: border-box; }
.rail-mini .rail .rail-tog { width: 26px; left: 202px; transition: opacity .12s; }
.rail-mini .rail :is(.rail-nav a > span, .rail-g > span, .rail-back > span, .rail-bell > span, .rail-user .un, .rail-search input, .rail-co > span, .rail-co .wsw-i, .nb, .rail-inst, .rail-dev, .rail-tog) { transition: opacity .12s ease .1s; }
.rail-mini .rail:not(:hover):not(:focus-within) :is(.rail-nav a > span, .rail-g > span, .rail-back > span, .rail-bell > span, .rail-user .un, .rail-search input, .rail-co > span, .rail-co .wsw-i, .nb, .rail-inst, .rail-dev, .rail-tog) { opacity: 0; transition-delay: 0s; }
.rail-mini .rail:not(:hover):not(:focus-within) .rail-nav { overflow-y: hidden; }
.rail-mini .rail-nav a, .rail-mini .rail-bell, .rail-mini .rail-user { white-space: nowrap; }
@media (max-width: 900px) { .rail-tog { display: none; } }

/* v582: the menu's pin (pinned: orange, upright; not pinned: grey, tilted); every module uses the whole width, as Drawings does */
.rail-tog { display: inline-grid; place-items: center; border-color: transparent; background: transparent; }
.rail-tog .ico { width: 16px; height: 16px; transform: rotate(45deg); transition: transform .15s; }
.rail-tog.on { color: var(--orange); } .rail-tog.on .ico { transform: none; }
.rail-tog:hover { background: var(--surface-2); border-color: var(--line); }
.view { max-width: none; }

/* v584: the small "New location / company / discipline" form: fields fill their column, normal weight, labels small grey; Level column narrower */
.addbox { width: min(460px, calc(100vw - 32px)); padding: 18px 20px 16px; gap: 12px; box-sizing: border-box; }
.addbox h3 { font-size: 15px; margin-bottom: 2px; }
.addbox label { min-width: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.addbox :is(input, select) { width: 100%; box-sizing: border-box; font-weight: 400; font-size: 13.5px; color: var(--navy); height: 34px; }
.addbox .row2 { gap: 10px; }
.addbox .row2:has([data-loclevel]) { grid-template-columns: minmax(0, 1fr) 130px; }
.addbox .row2:has([data-loccode]) { grid-template-columns: minmax(0, 1fr) 110px; }
.addbox .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.addbox .err:empty { display: none; }
@media (max-width: 520px) { .addbox .row2:has([data-loclevel]), .addbox .row2:has([data-loccode]) { grid-template-columns: minmax(0, 1fr) 100px; } }

/* v585: the project sits at the top of the page (not in the menu), so it shows even with the menu hidden; click to switch */
.pbar { position: relative; padding: 10px 20px 0; display: flex; }
.pbar .rail-pbox { flex-direction: row; align-items: baseline; gap: 10px; margin: 0; padding: 6px 34px 6px 12px; width: auto; max-width: 100%; min-height: 34px; }
.pbar .rail-pbox small { font-size: 9px; }
.pbar .rail-pbox b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pbar .rail-pbox .mono { white-space: nowrap; }
.pbar .psw { left: 20px; }
@media (max-width: 900px) { .pbar { display: none; } }
@media print { .pbar { display: none !important; } }
.pbar .rail-pbox small { display: none; } /* v586: no "Project" label on the top bar */

/* v589: BOQ grouping: the chips (drag to reorder), nested group headings, "+ Line" / "+ Section" in a group */
.bq-gbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; font-size: 12px; }
.bq-gbar > i { color: var(--muted); font-style: normal; }
.bq-gbar .chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; font-size: 12px; }
.bq-gc { cursor: grab; background: var(--surface); border: 1px solid var(--line); }
.bq-gc button { border: 0; background: none; padding: 0 0 0 2px; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.bq-gc button:hover { color: var(--bad); }
.bq-gc0 { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.bq-gadd { border: 1px dashed var(--line); background: none; cursor: pointer; color: var(--orange-deep); }
.bq-tbl .bq-lv { padding-left: calc(8px + var(--lv, 0) * 18px); }
.bq-tbl .bq-gl { font-weight: 600; background: #FAFBFC; color: var(--navy); }
.bq-tbl .bq-gl .muted { font-weight: 500; }
.bq-addln { display: none; border: 1px dashed var(--line); background: var(--surface); color: var(--orange-deep); font-size: 11.5px; padding: 1px 8px; cursor: pointer; margin-left: 6px; }
.bq-gh:hover .bq-addln, .bq-gh:focus-within .bq-addln { display: inline-flex; align-items: center; gap: 3px; }
.bq-acts [data-act="sec"] { font-weight: 700; font-size: 13px; }

/* v589: "set for all these lines" on a group heading; the Tags view button */
.bq-gset { display: none; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; }
.bq-gset .ico { width: 14px; height: 14px; }
.bq-gh:hover .bq-gset, .bq-gh:focus-within .bq-gset { display: inline-grid; place-items: center; }
.bq-gset:hover { color: var(--orange-deep); }
#bqtagv.on { color: var(--orange-deep); border-color: var(--orange); }
/* v594: Section is a chip too; where a dragged chip will land */
.bq-gc.dl { box-shadow: -3px 0 0 var(--orange); } .bq-gc.dr { box-shadow: 3px 0 0 var(--orange); }
.bq-tbl .bq-s0 { font-weight: 700; }
.bq-gc { touch-action: none; user-select: none; } .bq-gc.drag { opacity: .5; }

/* v596: a group heading is a row of the table's own columns: the name and count on the left, the subtotal under Amount; ▸ / ▾ folds it */
.bq-tbl .bq-lv { display: grid; grid-template-columns: var(--cols); align-items: center; padding-left: 0; }
.bq-tbl .bq-lv .bq-gl0 { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: calc(4px + var(--lv, 0) * 18px); position: sticky; left: 0; }
.bq-tbl .bq-lv .bq-gl0 > span:not(.bq-gn) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bq-tbl .bq-lv .bq-gn { color: var(--muted); font-weight: 500; }
.bq-tbl .bq-lv .bq-gs { text-align: right; padding-right: 8px; white-space: nowrap; }
.bq-fold { border: 0; background: none; width: 18px; padding: 0; color: var(--muted); cursor: pointer; font-size: 11px; flex: none; }
.bq-fold:hover { color: var(--orange-deep); }
.bq-lv { cursor: pointer; } .bq-lv input { cursor: text; }
.bq-lv.bq-folded { background: #F3F5F8; }
.bq-gbar .grow { flex: 1; }
.bq-tbl .bq-lv { column-gap: 6px; padding-left: 10px; padding-right: 10px; } .bq-tbl .bq-lv .bq-gl0 { padding-left: calc(var(--lv, 0) * 18px); }   /* v596: same columns as the lines */
.bq-tbl .bq-cc, .bq-tbl .dw-hd > .bqh-c { box-shadow: none; }   /* v598: the frozen Code column without a shadow (it looked like a white card over the header) */
.up-tbl .up-row > .up-f, .up-tbl .up-head > span:nth-child(2), .up-tbl .up-row > .up-st, .up-tbl .up-head > span:nth-child(10) { box-shadow: none; }   /* v598: frozen columns without shadows, everywhere */

.chip.da-all .ico { width: 15px; height: 15px; }
.bq-tbl .dw-hd { height: auto; min-height: 34px; align-items: stretch; } .bq-tbl .dw-hd > span { display: flex; align-items: center; }   /* v600: the titles fit the header row (they hung over its line) */

/* v600: a note line (a quote's own heading words) reads as a heading in the lines; "¶" turns a section into one */
.bq-tonote { display: none; border: 1px dashed var(--line); background: var(--surface); color: var(--orange-deep); font-weight: 700; padding: 0 7px; cursor: pointer; margin-left: 4px; }
.bq-gh:hover .bq-tonote { display: inline-block; }
#bqfold.on { color: var(--orange-deep); border-color: var(--orange); }

/* v604: BOQ: the code small and light and not frozen; Items stays at the left when the table scrolls right; the group headings stay on top while it scrolls down */
.bq-tbl .bq-cc, .bq-tbl .dw-hd > .bqh-c { position: static; }
.bq-tbl .dw-c, .bq-tbl .bq-cc .gc { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.bq-tbl .bq-r > .bq-it, .bq-tbl .bq-r > span:has(> .bq-it), .bq-tbl .dw-hd > .bqh-ti { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.bq-tbl .bq-r.sel > .bq-it, .bq-tbl .bq-r:hover > .bq-it { background: inherit; }
.bq-tbl .dw-hd { height: 34px; }
.bq-tbl .bq-lv { position: sticky; top: calc(34px + var(--lv, 0) * 30px); height: 30px; min-height: 30px; box-sizing: border-box; z-index: calc(5 - var(--lv, 0)); }
.bq-tbl .bq-lv:not(.bq-gl) { background: #F1F4F7; } .bq-tbl .bq-lv.bq-gl { background: #F8FAFC; }

/* v604: a group's name stays in view when the table scrolls right; its subtotal reads like the line amounts (same size, same right edge) */
.bq-tbl .bq-lv .bq-gl0 { justify-self: start; width: max-content; max-width: 100%; background: inherit; }
.bq-tbl .bq-lv .bq-gs { justify-self: stretch; text-align: right; padding-right: 0; font-size: 12.5px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.bq-tbl .dw-rv, .bq-tbl .dw-x.r, .bq-tbl .dw-sh.r { font-variant-numeric: tabular-nums; }

.bq-tbl .bq-lv .bq-gl0, .bq-tbl .bq-lv .bq-gl0 * { white-space: nowrap; }   /* v606: a group heading is one line */

.bq-grp { display: block; min-width: 0; }   /* v607: a group box: its heading sticks only while its own lines pass */
.bq-tbl .bq-lv { z-index: calc(20 - var(--lv, 0)); } .bq-tbl .dw-hd { z-index: 30; }   /* v607: headings above the frozen Items cells */

input[data-partof] { background: var(--surface-2); color: var(--muted); cursor: default; }   /* v613: the part, set by the element */

/* v622: upload, several of the same (2 × one) */
.ub-lot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.ub-lot select { height: 28px; font-size: 13px; padding: 0 6px; width: auto; }
#ubf .boqt td:nth-child(2) { white-space: normal; min-width: 150px; overflow-wrap: anywhere; }
#ubf .boqt { min-width: 0; width: 100%; }
.ub-names { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ub-names[hidden] { display: none; }
.ub-names input { height: 28px; min-height: 28px; font-size: 13px; padding: 0 6px; width: 150px; flex: 1 1 130px; }
#ubf .boqt th, #ubf .boqt td { padding-left: 6px; padding-right: 6px; } #ubf .boqt td:nth-child(2) { min-width: 110px; } #ubf .boqt th { letter-spacing: 0; } #ubf .boqt { table-layout: auto; min-width: 0 !important; }
/* v632: the header's titles are exactly as tall as the row (they were 1px taller: the white CODE and ITEMS cells covered its line) */
.bq-tbl .dw-hd > span, .bq-tbl .dw-hd > [data-col] { padding-top: 0; padding-bottom: 0; min-height: 0; height: 100%; box-sizing: border-box; }
.bq-tbl .dw-hd > .bqh-c { background: transparent; }

/* v635: one sort-and-filter menu for every table */
.cm-pop { width: 280px; max-height: min(480px, 76vh); } .cm-pop .cm-s { display: flex; align-items: center; } .cm-pop .cm-s > button:first-child { flex: 1; } .cm-pop .cm-then { flex: none; font-size: 12px; color: var(--muted); } .cm-pop .cm-then:hover { color: var(--orange); }
.cm-pop .dw-dq { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; } .cm-pop .dw-dr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; } .cm-pop .dw-dr label { display: block; font-size: 11px; color: var(--muted); padding: 0; } .cm-pop .dw-dr input { width: 100%; height: 30px; font-size: 13px; }
.cm-pop .dw-pop-q { width: 100%; height: 32px; font-size: 13px; } .cm-pop .cm-has { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 7px 8px; font: inherit; font-weight: 600; color: var(--orange); cursor: pointer; text-align: left; }
.cm-pop .cm-only { flex: none; border: 0; background: none; font: inherit; font-size: 12px; color: var(--orange); cursor: pointer; padding: 0 2px; opacity: 0; } .cm-pop .dw-pop-l label:hover .cm-only, .cm-pop .cm-only:focus-visible { opacity: 1; } @media (hover: none) { .cm-pop .cm-only { opacity: 1; } }
.cm-b { opacity: .5; margin-left: 2px; vertical-align: middle; } .cm-b:hover, .cm-b.on, th:hover > .cm-b, .dw-hd > span:hover > .cm-b { opacity: 1; } .cm-b.on { color: var(--orange); } .cm-b sup { font-size: 8px; line-height: 0; }
table.smart th { white-space: nowrap; } table.smart tr[hidden], .smart-grid > .dw-r[hidden] { display: none !important; }

/* v640: source files and Refresh from Excel */
.sf-h { display: flex; align-items: center; gap: 10px; } .sf-h h2 { margin: 0; } .sf-r { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); } .sf-old { padding: 2px 0 2px 14px; } .sf-old summary { cursor: pointer; padding: 4px 0; } .sf-st:empty { display: none; }
.rf-t { font-size: 15px; margin: 4px 0 10px; } .rf-t span { color: var(--muted); } .rf-s { border-top: 1px solid var(--line); padding: 4px 0; } .rf-s summary { cursor: pointer; padding: 6px 0; } .rf-l { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 2px 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; } .rf-l > .mono { color: var(--muted); font-size: 12px; }
.rf-w { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rf-f { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: var(--muted); } .rf-f b { font-weight: 500; } .rf-f em { font-style: normal; color: var(--navy); font-weight: 600; } .rf-ask { color: #8A4B00; } .rf-ask select { height: 26px; font-size: 12px; width: auto; padding: 0 4px; margin-left: 4px; } .rf-x { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }

/* v642: the section tree: every level, edited in place; dragging */
.dw-lw { position: relative; } .dw-tw { flex: none; width: 14px; text-align: center; font-style: normal; font-size: 10px; color: var(--muted); cursor: pointer; align-self: stretch; display: inline-flex; align-items: center; justify-content: center; } .dw-lw > .dw-li { padding-left: calc(2px + var(--d, 0) * 14px); gap: 4px; }
.dw-more { position: absolute; right: 2px; top: 4px; width: 26px; height: 26px; border: 0; background: var(--surface); color: var(--navy); cursor: pointer; font-size: 16px; line-height: 1; opacity: 0; } .dw-lw:hover > .dw-more, .dw-more:focus-visible { opacity: 1; } @media (hover: none) { .dw-more { opacity: 1; position: static; float: right; } }
.dw-ren { width: 100%; height: 26px; min-height: 26px; padding: 0 4px; font-size: 13px; } .dw-add { color: var(--orange); } .dw-add svg { width: 14px; height: 14px; } .dw-li.drop-in { background: var(--orange-soft); box-shadow: inset 0 0 0 2px var(--orange); }
.bq-r.dragging, .bq-g.dragging { opacity: .45; } body.dragsorting .bq-tbl, body.dragsorting #bqtree { cursor: grabbing; user-select: none; }

/* v644: the light / dark switch */
button.rail-th { width: 100%; border-width: 1px 0 0; background: none; cursor: pointer; text-align: left; font: inherit; } .th-ic { display: inline-flex; } button.top-ic { border: 0; background: none; cursor: pointer; } .login-th { position: absolute; top: 12px; left: 12px; }

/* v645: cells selected, copied and filled as in Excel (cells.js); lines are moved by their left edge or code */
.cr { background-color: rgba(224, 89, 42, .13) !important; } .cr .gc, .cr input, .cr select { background-color: transparent !important; } .cpd { outline: 1px dashed var(--orange); outline-offset: -1px; }
.cfill { position: fixed; left: 0; top: 0; z-index: 40; width: 8px; height: 8px; background: var(--orange); border: 1px solid var(--surface); cursor: crosshair; } .cfill[hidden] { display: none; }
body.cellsel, body.cellsel * { user-select: none !important; } .bq-grid .gc { user-select: none; }
@media (hover: hover) and (pointer: fine) { .bq-tbl .bq-r[data-id] { cursor: default; } .bq-tbl .bq-r[data-id] .dw-dot, .bq-tbl .bq-r[data-id] .bq-cc { cursor: grab; } .bq-tbl .bq-r > .dw-dot { align-self: stretch; height: auto; border-radius: 0; } .bq-tbl .bq-r:hover > .dw-dot { background: radial-gradient(circle, var(--muted) 1px, transparent 1.4px) 0 0 / 4px 6px; } }
@media print { .cfill { display: none !important; } .cr { background: none !important; } .cpd { outline: 0; } }
.logo-d { display: none; } :root[data-theme="dark"] .logo-d { display: inline; } @media print { .logo-d { display: none !important; } }
.logo-prev.lg-d { background: #121B2B; color: #C9D5E8; } .logo-prev.lg-d label { display: grid; place-items: center; cursor: pointer; } .logo-prev.lg-d #colgx { position: absolute; top: 6px; right: 6px; }
.bq-tbl .bq-r.dim > .bq-it, .bq-tbl .bq-r.dim > .bq-cc, .bq-tbl .bq-r.dim > span:has(> .bq-cc) { opacity: 1; color: var(--muted); }

/* v646: Edit stays calm: the + shows only under the pointer, a heading reads as text until it is clicked */
.bq-tbl .bq-r > .bq-ins { opacity: 0; } .bq-tbl .bq-r > .bq-ins:hover, .bq-tbl .bq-r > .bq-ins:focus-visible { opacity: 1; }
.bq-gh input.gname { height: 24px; min-height: 0; line-height: 22px; width: auto; min-width: 60px; max-width: min(640px, 60vw); field-sizing: content; border-color: transparent; background: transparent; box-shadow: none; text-overflow: ellipsis; } .bq-gh input.gname:hover { border-color: var(--line); } .bq-gh input.gname:focus { border-color: var(--orange); background: var(--surface); }
.bq-tbl .bq-lv .bq-gl0 { height: 28px; overflow: hidden; } .bq-addsec { display: none; margin-left: 0; } .bq-gh:hover .bq-addsec, .bq-gh:focus-within .bq-addsec { display: inline-flex; opacity: 1; }
.bq-tbl .bq-lv .bq-addln, .bq-tbl .bq-lv .bq-addsec, .bq-tbl .bq-lv .bq-tonote, .bq-tbl .bq-lv .bq-gset { height: 22px; min-height: 0; line-height: 20px; box-sizing: border-box; }
.bq-tbl .bq-r.dim > *:not(.bq-ins) { opacity: 1; } .bq-tbl .bq-r.dim > *:not(.dw-dot):not(.bq-acts):not(.bq-ins), .bq-tbl .bq-r.dim .gc { color: var(--muted); }

/* v647: the page follows the menu; its search box stays inside it */
:root.rail-mini.rail-open { --rail-w: 236px; } .rail-mini.rail-open .rail { box-shadow: none !important; }
.rail-mini .rail > .rail-search { width: 216px; } .rail-search input { background: transparent !important; }

/* v648: the section list lines up: All, the numbers, the names */
.dw-lw > .dw-li .dw-ln > b.mono { display: inline-block; min-width: calc(var(--nw, 1ch) + 2px); font-variant-numeric: tabular-nums; }
.dw-tree > .dw-lth, .dw-lth { min-height: 34px; } .dw-lth .dw-fold { width: 26px; height: 26px; min-width: 0; min-height: 0; border-color: transparent; background: transparent; } .dw-lth .dw-fold:hover { border-color: var(--line); background: var(--surface); }
.dw-li:has(> .dw-tw), .dw-li.dw-add { gap: 2px; padding-left: calc(4px + var(--d, 0) * 14px); } .dw-li.dw-add svg { flex: none; margin-right: 0; }
.dw-lw > .dw-li:has(> .dw-tw) { padding-left: calc(4px + var(--d, 0) * 14px + min(var(--d, 0), 1) * (var(--nw, 1ch) - 8px)); }

/* v649: the page's own colour shows behind the Android buttons: the same as the bottom menu */
@media (max-width: 900px) { html { background: var(--surface); } body { background: var(--bg); min-height: 100%; } .tabbar { box-shadow: 0 60px 0 60px var(--surface); clip-path: inset(-40px 0 -80px 0); } }
@media print { html, body { background: #fff !important; } }

/* v649: the Directory, one row a person */
.dir-n { display: flex; align-items: center; gap: 10px; min-width: 0; } .dir-av { width: 28px; height: 28px; flex: none; font-size: 11px; } .dir-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dir-p { border: 0; background: none; padding: 4px 0; font: inherit; color: var(--navy); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; } .dir-p b { font-weight: 600; } .dir-p i { font-style: normal; font-size: 10px; color: var(--muted); } .dir-p:hover b, .dir-p.on b { color: var(--orange-deep); }
.dir-more > td { background: var(--bg); padding: 10px 12px 10px 50px !important; } .dir-l { display: grid; grid-template-columns: 130px 1fr; gap: 4px 14px; padding: 4px 0; } .dir-l > span { font-weight: 600; font-size: 12.5px; } .dir-l small { display: block; font-weight: 400; color: var(--muted); } .dir-l p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-content: start; align-items: start; }
@media (max-width: 700px) { .dir-more > td { padding-left: 12px !important; } .dir-l { grid-template-columns: 1fr; } }

/* v650 */
.tg-num { display: inline-block; font-size: 20px; letter-spacing: .12em; font-variant-numeric: tabular-nums; } .tg-num.big { display: block; font-size: 40px; font-weight: 700; text-align: center; margin: 8px 0; }

/* v654: the loading and sign-in logo follows the mode; the loading screen sits in the middle */
.co-logo { max-width: 190px; max-height: 84px; width: auto; height: auto; object-fit: contain; } .login .co-logo { margin: 0 auto; }
#app > .boot:only-child { position: fixed; inset: 0; margin: 0; align-content: center; }
.login-brand .login-name { text-align: center; width: 100%; }

/* v662: delete a BOQ line from its left edge */
.bq-tbl .bq-r > .dw-dot { position: relative; } .bq-rx { display: none; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; z-index: 4; place-items: center; } .bq-rx svg { width: 14px; height: 14px; }
.bq-rx:hover { color: var(--bad, #B3261E); border-color: var(--bad, #B3261E); } @media (hover: hover) and (pointer: fine) { .bq-tbl .bq-r:hover > .dw-dot .bq-rx, .bq-tbl .bq-r:focus-within > .dw-dot .bq-rx { display: grid; } }

/* v666: room in Edit: a gutter for the handle, the + and the trash (never over the code), taller rows, wider gaps */
@media (min-width: 761px) {
.bq-grid .dw-r.bq-r, .bq-grid .dw-r.bq-e { min-height: 38px; } .bq-grid .dw-hd, .bq-grid .dw-r { column-gap: 10px; } .bq-grid .dw-hd { min-height: 38px; height: 38px; }
.bq-grid .bq-r > .dw-dot { width: 100%; } .bq-grid .bq-rx { left: 18px; width: 26px; height: 26px; border-color: transparent; background: none; } .bq-grid .bq-rx:hover { background: var(--surface); border-color: var(--bad, #B3261E); }
.bq-grid .bq-r > .bq-ins { left: 2px; }
}
@media (min-width: 761px) and (hover: hover) and (pointer: fine) { .bq-grid .bq-r:hover > .dw-dot { background-repeat: repeat-y; background-size: 8px 6px; background-position: 2px 0; background-image: radial-gradient(circle at 2px 3px, var(--muted) 1px, transparent 1.4px), radial-gradient(circle at 6px 3px, var(--muted) 1px, transparent 1.4px); } }

/* v668: the total first, frozen under the titles; the group headings freeze under it, the amounts stay at the right edge */
.bq-tbl { --hh: 34px; --cg: 6px; --th: 32px; } .bq-tbl:not(:has(> .bq-tot)) { --th: 0px; }
.bq-tbl .bq-tot { border: 0; box-shadow: inset 0 -2px 0 var(--navy); background: #E8ECF0; color: var(--navy); font-weight: 700; } .bq-tbl .bq-tot .bq-gn { color: var(--muted); font-weight: 500; }
@media (min-width: 761px) {
.bq-tbl.bq-grid { --hh: 38px; --cg: 10px; }
.bq-tbl .bq-tot { display: grid; grid-template-columns: var(--cols); column-gap: var(--cg); align-items: center; padding: 0 10px; position: sticky; top: var(--hh); height: var(--th); min-height: var(--th); box-sizing: border-box; z-index: 28; }
.bq-tbl .bq-tot .bq-gl0 { display: flex; gap: 10px; align-items: center; justify-self: start; position: sticky; left: 10px; white-space: nowrap; background: inherit; }
.bq-tbl .bq-lv { top: calc(var(--hh) + var(--th) + var(--lv, 0) * 30px); column-gap: var(--cg); }
.bq-tbl .bq-lv .bq-gs, .bq-tbl .bq-tot > .bq-gs { position: sticky; right: 0; background: inherit; margin: 0; justify-self: stretch; text-align: right; padding: 0 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; align-self: stretch; display: flex; align-items: center; justify-content: flex-end; }
.bq-tbl .bq-tot > .bq-gs { font-size: 13.5px; box-shadow: inset 0 -2px 0 var(--navy); }
}
@media (max-width: 760px) { .bq-tbl .bq-tot { display: flex; align-items: center; gap: 10px; } .bq-tbl .bq-tot .bq-gl0 { display: flex; gap: 10px; flex: 1; } }

/* v669: the bar of a selection (sum, average, count; line actions), rows picked with Ctrl+click, find and replace */
.cbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: var(--surface); border: 1px solid var(--navy); box-shadow: 0 4px 16px rgba(1, 30, 65, .18); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cbar[hidden] { display: none; } .cbar span { color: var(--muted); } .cbar b { margin-right: 6px; color: var(--ink); } .cbar i { width: 1px; height: 18px; background: var(--line); } .cbar .btn.bad { color: var(--bad); }
.bq-tbl .bq-r.mkr, .bq-tbl .bq-r.mkr > * { background: var(--orange-soft) !important; } @media (max-width: 760px) { .cbar { display: none; } #bqun, #bqre, #bqfr { display: none; } }
.fr-x { margin-top: 6px; border-left: 2px solid var(--line); padding-left: 8px; } .fr-x del { display: block; color: var(--muted); } .fr-x span { display: block; }
#bqun.dim svg { opacity: .4; }

/* v670: a workspace of one's own, offered under every sign-in and invite form */
.login-nw { width: min(400px, 100%); justify-content: center; color: var(--orange); border-color: var(--orange); margin-top: -10px; }

/* v670: the left list: its edge drags, its heading and search stay on top */
.dw-wrap > .dw-tree { flex: 0 0 var(--tw, 220px); margin-right: 0; border-right: 0; padding-top: 0; }
.dw-wrap > .dw-tree > .dw-lth { position: sticky; top: 0; z-index: 3; background: var(--bg); }
.dw-ts { width: 100%; height: 32px; min-height: 32px; font-size: 13px; padding: 0 8px; margin: 0 0 4px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); } .dw-ts[hidden] { display: none; } .dw-wrap > .dw-tree > .dw-ts { position: sticky; top: 34px; z-index: 3; }
.lib-tree > .dw-ts { border-width: 0 0 1px; margin: 0; }
.dw-off, .dw-q .dw-add { display: none !important; } .dw-q.dw-none::after { content: '—'; display: block; padding: 8px; color: var(--muted); }
.dw-tg { flex: 0 0 17px; align-self: stretch; cursor: col-resize; touch-action: none; position: relative; } .dw-tg::before { content: ''; position: absolute; top: 0; bottom: 0; left: 1px; width: 1px; background: var(--line); } .dw-tg:hover::before, .dw-tg.on::before { width: 3px; left: 0; background: var(--orange); }
.dw-tg.in { position: absolute; top: 0; bottom: 0; right: -9px; width: 12px; z-index: 4; } .dw-tg.in::before { left: 3px; background: transparent; }
.dw-notree .dw-wrap > .dw-tg, .rg-noloc .dw-wrap > .dw-tg { display: none; } @media (max-width: 1099px) { .dw-wrap > .dw-tg { display: none; } } @media print { .dw-tg { display: none; } }

/* v671: full screen in Telegram: the sign-in page's buttons stay below the phone's bar; the company link */
html.tg-full .login-th, html.tg-full .lang-sw { top: calc(var(--tg-top) + 12px); } html.tg-full .login { padding-top: calc(var(--tg-top) + 64px); }
#colk:not(:empty) { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 14px; display: grid; gap: 8px; } .colk-a { gap: 8px; }

/* v672: the company level of someone on no project yet */
.no-proj .tabbar a[href="#/home"].tb-scan { display: none; } .cs-t { margin-top: 12px; } .no-proj .rail-g:has(> .rail-pl), .no-proj .more-g:has(a[href="#/projects-list"]), .newcomer .tabbar a[data-k="admin"] { display: none; }

/* v673: BOQ Edit: the page is the table; a line fits the screen */
.bq-in .vbar, .bq-in .strip, .bq-in:not(.bq-kind) .dw-tabs { display: none !important; } .view:has(> .bq-in) > .ptabs, .main:has(.view > .bq-in) > .pbar { display: none; }
.bq-in .head { margin-bottom: 8px; } .bq-s i { font-style: normal; color: var(--muted); }
.bq-tbl.bq-grid.bq-inv { --cg: 6px; } .bq-inv .bq-acts { display: none; } .bq-inv > .dw-hd, .bq-inv .bq-r, .bq-inv .bq-e { column-gap: 6px; }
.bq-inv > .dw-hd > :last-child .dw-rz { right: 0; width: 8px; }
.bq-inv > .dw-hd > [data-col="a"] .dw-rz { right: 0 !important; width: 6px !important; margin: 0 !important; }
.bq-inv > .dw-hd { overflow-x: clip; }
@media (max-width: 760px) { #bqinv { display: none !important; } }

/* v674: other people in the BOQ */
.bq-r .peer.gc, .bq-r.peer { box-shadow: inset 0 0 0 2px var(--pc) !important; } .bq-r .peer-ed.gc { background: color-mix(in srgb, var(--pc) 14%, var(--surface)) !important; } .bq-r.peer-new { box-shadow: inset 0 -3px 0 var(--pc) !important; }
.peer-l { position: fixed; z-index: 27; padding: 0 5px; height: 15px; line-height: 15px; font: 600 11px/15px var(--f-body); color: #fff; background: var(--pc); pointer-events: none; white-space: nowrap; }
.peer-b { display: inline-flex; align-items: center; } .peer-a { width: 28px; height: 28px; padding: 0; margin-left: -5px; border: 2px solid var(--pc); border-radius: 50%; background: var(--pc); color: #fff; font: 700 10px var(--f-body); overflow: hidden; cursor: pointer; flex: none; } .peer-a img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bq-r.theirs > * { animation: theirs 1.6s ease-out; } @keyframes theirs { from { background-color: #CFE3FF; } to { background-color: transparent; } }
