/* ProGoat(TM) brand colors */
:root {
  --slate: #2B3440;
  --green: #A8D72E;       /* hi-vis green, on slate */
  --green-deep: #5E8A12;  /* green on white */
  --white: #ffffff;
  --bg: #f4f5f2;
  --fg: #1f252d;
  --muted: #5d6670;
  --line: #d9ddd3;
  --good: #3f6b0c; --good-bg: #e6f2d0;
  --warn: #8a5a00; --warn-bg: #f7e8c4;
  --bad: #9b2c25;  --bad-bg: #f6dcd9;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 16px/1.5 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green-deep); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* header */
.top { background: var(--slate); color: var(--white); display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
/* FB0034: header stays at the top while scrolling up; slides away while scrolling down (app.js watchScroll). */
header.top { position: sticky; top: 0; z-index: 40; transition: transform .2s ease; }
header.top.top-hide { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { header.top { transition: none; } }
.top > a { display: block; }
.logo { height: 56px; width: auto; display: block; }
.install { font-size: 13px; color: var(--slate); background: var(--green); border-radius: 999px; padding: 3px 12px; font-weight: 600; white-space: nowrap; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.who-name { font-weight: 600; }
.who-name small { font-weight: 400; opacity: .75; margin-left: 4px; }
.top .btn.ghost { color: var(--white); border-color: rgba(255,255,255,.35); background: transparent; }

/* page */
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 20px 16px 32px; flex: 1; }
.page-title { font-size: 24px; margin: 0 0 14px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head .page-title { margin: 0; }
.crumb { margin: 0 0 8px; font-size: 14px; }
.crumb a { text-decoration: none; font-weight: 600; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card h1 { margin: 0 0 8px; font-size: 22px; }
.card h2 { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 16px; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { display: block; background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--green-deep); border-radius: 10px; padding: 16px; text-decoration: none; color: var(--fg); }
.tile b { display: block; font-size: 17px; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 14px; }
a.tile:hover { border-color: var(--green-deep); }
.tile.soon { border-left-color: var(--line); background: repeating-linear-gradient(-45deg, #fff, #fff 12px, #f7f8f5 12px, #f7f8f5 24px); }

/* build checklist */
.checks { list-style: none; padding: 0; margin: 16px 0; }
.checks li { padding: 8px 0 8px 32px; border-top: 1px solid var(--line); position: relative; color: var(--muted); }
.checks li:first-child { border-top: 0; }
.checks li::before { content: ''; position: absolute; left: 4px; top: 12px; width: 16px; height: 16px; border: 2px solid var(--line); border-radius: 4px; }
.checks li[data-ok]::before { background: var(--green-deep); border-color: var(--green-deep); }
.checks li[data-ok] { color: var(--fg); font-weight: 600; }
/* distribution lists: tick who's on it (big tap targets for phones) */
.pick-people { display: grid; grid-template-columns: 1fr; gap: 0; margin: 8px 0 12px; max-width: 640px; } /* FB0030: one list going down */
.pick-people .check { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-people .check input { width: 20px; height: 20px; flex: none; }
.job-pick { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); }
.job-pick select { width: auto; padding: 4px 8px; font-size: 13px; }
/* Sub bid page */
.pre { white-space: pre-wrap; }
.actions.left { justify-content: flex-start; }
#alt-add, #unit-add { margin-bottom: 14px; }
/* Proposal document (Module 2C): looks like the approved Word form on screen and prints clean */
.doc { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 8px; padding: 28px 32px; margin: 8px 0 24px; font-family: Calibri, Carlito, Arial, sans-serif; font-size: 15px; line-height: 1.45; }
.doc h3 { color: #2B3440; font-size: 15px; margin: 18px 0 4px; letter-spacing: .02em; }
.doc p { margin: 6px 0; }
.doc-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #2B3440; padding-bottom: 10px; }
.doc-head img { max-height: 54px; max-width: 160px; }
.doc-title { font-size: 22px; margin: 16px 0 6px; }
.doc-t { width: 100%; border-collapse: collapse; margin: 6px 0; }
.doc-t th, .doc-t td { border: 1px solid #bbb; padding: 5px 8px; text-align: left; }
.doc-t th { background: #eef1f4; }
.doc-t .r { text-align: right; white-space: nowrap; }
.doc-t tfoot td { font-weight: 700; }
.doc-note { font-size: 12px; color: #555; font-style: italic; }
.doc-miss { color: #b45309; }
.sec-title { margin: 18px 0 4px; }
/* Company Profile and sign-up steps */
.steps-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.steps-bar .step { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--white); }
.steps-bar .step.on { border-color: var(--green-deep); color: var(--slate); font-weight: 600; }
.steps-bar .step.done { background: var(--green); color: var(--slate); }
.rate-row { display: flex; gap: 10px; align-items: center; }
.rate-row input[type=checkbox] { width: 24px !important; height: 24px; flex: 0 0 24px; margin: 0; }
.rate-row input[type=number] { flex: 1 1 auto; min-width: 90px; width: auto !important; }
.rate-row small { white-space: nowrap; }
.seg-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 10px; }
a.setup-nudge { display: block; text-decoration: none; margin-bottom: 14px; }
.saved-ok { color: var(--green-deep); }
.toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 50; background: var(--green); color: var(--slate); border: 1px solid var(--green-deep); border-radius: 10px; padding: 10px 18px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.toast[hidden] { display: none; }
/* Substantial Completion certificate signatures */
.sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.sig { border-top: 1px solid #111; padding-top: 6px; }
.sig-auth { font-size: 12px; font-style: italic; margin-bottom: 2px; }
.sig-role { font-size: 12px; color: #555; text-transform: uppercase; letter-spacing: .04em; }
.sig-name { font-family: 'Brush Script MT', cursive; font-size: 20px; }
.sig-name.muted { font-family: inherit; font-size: 14px; }
@media print { .page-break { page-break-before: always; } }
@media (max-width: 560px) { .doc { padding: 16px; font-size: 14px; } }
@media print {
  .no-print, .top, .foot, #edit, #co, #bar, .help-btn, .fbbtn { display: none !important; }
  body, .wrap { background: #fff !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .doc { border: 0; padding: 0; margin: 0; }
}

.sign-pick { margin-top: 6px; }
.ref-row { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.terms-gate { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.terms-box { max-width: 460px; width: 100%; margin: 0; }
.legal { max-width: 760px; line-height: 1.55; }
.legal h2 { font-size: 18px; margin: 20px 0 6px; }
.legal li { margin: 4px 0; }
.chk.inline { display: inline-flex; gap: 4px; align-items: center; margin: 0 10px 0 6px; }

/* Estimate (Module 2C) */
.est-line { border-bottom: 1px solid var(--line); padding: 10px 0; }
.est-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.est-head b { flex: 1 1 auto; }
.est-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; margin-top: 6px; }
.est-grid .wide { grid-column: 1 / -1; }
.est-total { display: flex; justify-content: space-between; padding: 10px 0 0; font-size: 15px; }
.est-total.big { font-size: 18px; border-top: 2px solid var(--ink, #2B3440); margin-top: 8px; }
.addon-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 110px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.addon-row .chk { margin: 0; }
.addon-row .a-amt { text-align: right; }
.addon-row .pct { display: flex; align-items: center; gap: 4px; }
.addon-row input[type=number] { width: 100%; padding: 6px 8px; }
.x-price { align-self: center; min-width: 100px; text-align: right; }
.dlg { border: 0; border-radius: 12px; padding: 20px; max-width: min(460px, calc(100vw - 32px)); width: 100%; }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg #rates-rows .addon-row { grid-template-columns: minmax(0, 1fr) 120px; }
@media (max-width: 480px) { .addon-row { grid-template-columns: minmax(0, 1fr) 96px; } .addon-row .a-amt { grid-column: 1 / -1; } }
.mini-row { display: flex; gap: 6px; margin-bottom: 8px; padding-bottom: 8px; flex-wrap: wrap; border-bottom: 1px dashed var(--line); }
.mini-row input { flex: 1 1 140px; padding: 8px 10px; }
.mini-row .a-amt, .mini-row .u-price, .mini-row .u-unit { flex: 0 1 130px; }
/* Bidding */
#p-scope { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; }
.bidder { padding: 10px 0; border-bottom: 1px solid var(--line); }
.bidder .chk { display: flex; gap: 10px; align-items: flex-start; }
.bidder.dropped { opacity: .55; }
.bidder.flagged { background: var(--bad-bg); margin: 0 -12px; padding: 10px 12px; border-radius: 8px; border: 2px solid #e0433a; margin-bottom: 8px; }
.flag-box { margin: 8px 0 0 30px; font-size: 14px; color: var(--bad); }
.flag-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.flag-acts select, .flag-acts input { width: auto; flex: 1 1 160px; padding: 6px 8px; font-size: 14px; }
/* Report card */
.bad-text { color: var(--bad); }
.rc-top { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.rc-score { text-align: center; min-width: 110px; }
.pill.rc-num { font-size: 30px; border-radius: 12px; line-height: 1.1; font-weight: 700; padding: 8px 14px; display: inline-block; }
.rc-top .facts { flex: 1 1 220px; }
.rc-proj { border-top: 1px solid var(--line); padding: 10px 0; }
.rc-proj summary { cursor: pointer; }
.rc-ans > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14px; border-bottom: 1px dotted var(--line); }
.rc-v { white-space: nowrap; flex: none; }
.q-row { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.seg6 span { padding: 9px 12px; }
/* New lead */
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.warn-text { color: var(--warn); }
.flabel { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 14px; font-size: 14px; border-left: 1px solid var(--line); background: var(--white); }
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--green-deep); color: #fff; font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--green-deep); outline-offset: -2px; }
.seg.big { display: flex; margin: 4px 0 14px; }
.seg.big label { flex: 1 1 0; }
.seg.big span { text-align: center; padding: 12px 8px; height: 100%; }
.seg input:disabled + span { opacity: .45; cursor: default; }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc-row .other-name { flex: 1 1 180px; }
.chk.pick { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
button.mini.match { display: block; width: 100%; text-align: left; font: inherit; cursor: pointer; margin-bottom: 8px; }
.up-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.up-row > div { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.email-preview { border: 2px dashed var(--green-deep); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.email-preview pre { white-space: pre-wrap; font-family: inherit; margin: 10px 0 0; }
.counts { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }

/* forms */
label.f { display: block; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
label.f input, label.f select { display: block; width: 100%; margin-top: 6px; font-weight: 400; font-size: 16px; padding: 11px 12px; border: 1px solid #b9c0b3; border-radius: 8px; background: var(--white); min-height: 46px; }
.hint { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 6px; }
label.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; }
label.chk input { width: 18px; height: 18px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.btn { display: inline-block; border: 1px solid #b9c0b3; background: var(--white); border-radius: 8px; padding: 10px 16px; min-height: 44px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--fg); text-align: center; }
.btn:hover { background: #eef0ea; }
.btn.primary { background: var(--green-deep); border-color: var(--green-deep); color: var(--white); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: 14px; }
.btn.wide { display: block; width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }

.msg { border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.good { background: var(--good-bg); color: var(--good); }
.pill { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; vertical-align: 2px; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

/* email preview (laptop / failed send) */
.preview { border: 2px dashed var(--green-deep); border-radius: 10px; background: var(--white); padding: 14px; margin-bottom: 16px; }
.preview-note { font-size: 13px; font-weight: 600; color: var(--green-deep); margin-bottom: 8px; }
.preview-subj { font-weight: 700; margin-bottom: 6px; }
.preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.5 var(--sans); margin: 0; }

/* people list */
.list { margin-bottom: 16px; }
.row-card { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; }
.row-main { min-width: 0; overflow-wrap: anywhere; }
.row-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.outbox summary { cursor: pointer; font-weight: 600; }
.ob { border-top: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }

/* header: buyer's logo left, ProGoat(TM) right */
.brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.co-logo { display: block; height: 48px; width: auto; max-width: 220px; object-fit: contain; background: var(--white); border-radius: 6px; padding: 4px 8px; }
.co-name { color: var(--white); font-weight: 800; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-mark { display: flex; align-items: center; padding-left: 12px; margin-left: 4px; border-left: 1px solid rgba(255,255,255,.2); }
.pg-full { height: 44px; width: auto; display: block; }
.pg-head { display: none; height: 26px; width: auto; }
.top .who { margin-left: auto; }

/* Sections strip under the header (Fixes #5, #7): computers and tablets. Lists open on a tap, never on hover. */
.sections { display: flex; flex-wrap: wrap; gap: 4px; align-items: stretch; background: #3a4552; padding: 6px 12px; position: relative; z-index: 20; }
.sections .sec { position: relative; }
.sec-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--white); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; }
.sec-btn .caret { font-size: 11px; opacity: .75; }
.sec-btn:focus-visible { outline: 3px solid var(--green); outline-offset: 0; }
.sec-btn[aria-expanded="true"] { background: rgba(255,255,255,.12); }
.sec-btn.on { background: var(--green); color: var(--slate); }  /* Fixes #7: the section you're in */
.sec.soon .sec-btn { opacity: .6; }
.sec-list { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; display: grid; }
.sec-item { display: block; padding: 10px 12px; border-radius: 6px; color: var(--fg); text-decoration: none; font-size: 15px; }
a.sec-item:hover, a.sec-item:focus-visible { background: #eef3e4; }
.sec-item.sec-home { font-weight: 700; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 4px; }
.sec-item.soon { color: var(--muted); }
.sec-item.soon small { display: block; font-size: 12px; }
/* Phones: the strip hides; the sections are in the Menu instead (Fixes #6). */
.menu-sections { display: none; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.msec summary { list-style: none; text-align: left; }
.msec summary.on { background: var(--green); border-color: var(--green-deep); color: var(--slate); }
.msec summary::-webkit-details-marker { display: none; }
.msec summary::after { content: ' ▾'; font-size: 12px; opacity: .7; }
.msec[open] summary::after { content: ' ▴'; }
.msec-list { display: grid; padding: 4px 0 4px 12px; }
/* Short section names (PreCon) on phones only; spelled out on tablets and computers (Scub 11/15/2026). */
.nm-short { display: none; }
.tile b span { color: inherit; font-size: inherit; }
@media (max-width: 699px) {
  .sections { display: none; }
  .menu-sections { display: grid; }
  .nm-full { display: none; }
  .nm-short { display: inline; }
}
/* Fixes #10: on Oakside, phones and tablets don't show "Under construction" (computers still do). Test shows it everywhere. */
@media (max-width: 1023px) {
  .pg-oakside .sec.soon, .pg-oakside .msec.soon, .pg-oakside .sec-item.soon, .pg-oakside .tile.soon, .pg-oakside .tile.soon-tile { display: none; }
}

/* Back-to-the-list buttons (and Home for Subs and Clients) */
.navbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.nav-btn { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.nav-btn.ghost { background: transparent; }

/* groups and dashboards */
.group-tiles .tile { padding: 18px; }
.group-tiles .tile b { font-size: 19px; }
.tile.soon-tile { border-left-color: #c9cfc3; }
.tile-n { display: block; margin-top: 8px; font-style: normal; font-weight: 600; font-size: 14px; color: var(--slate); }
.tile-n:empty { display: none; }
/* Fixes #3: the search box on Home */
.home-search { position: relative; margin-bottom: 14px; }
.home-search input { width: 100%; font-size: 16px; padding: 12px 14px; }
.hs-out:empty { display: none; }
.hs-out { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 6px; margin-top: 6px; display: grid; gap: 4px; }
.dash-card h2 { font-size: 17px; }
.jump-select { width: 100%; font: 400 16px var(--sans); padding: 10px 12px; border: 2px solid var(--green-deep); border-radius: 8px; background: var(--white); min-height: 46px; }
.statbar { display: grid; grid-template-columns: 110px 1fr 28px; gap: 8px; align-items: center; font-size: 14px; padding: 3px 0; }
.statbar .bar { margin: 0; }
.statbar b { text-align: right; }
.cz-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
.cz-row label.chk { margin: 0; }
.cz-row span { display: flex; gap: 4px; }
.cz-admin { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }

/* company settings preview */
.logo-preview { margin: 8px 0 14px; border-radius: 8px; overflow: hidden; }
.preview-bar { justify-content: space-between; }

/* Menu */
.menu-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 320px; }
.menu-btn .who-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn .who-first { display: none; }
.menu-btn .caret { font-size: 12px; opacity: .8; }
.avatar.avatar-sm { width: 26px; height: 26px; font-size: 11px; line-height: 1; background: var(--green); color: var(--slate); }
.dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: #e0433a; border: 2px solid var(--slate); }
.menu-who { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--fg); }
.menu-who:hover { border-color: var(--green-deep); }
.avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; background: var(--slate); color: var(--green); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.menu-link { color: var(--green-deep); font-weight: 600; font-size: 14px; }
.menu-list { display: grid; gap: 8px; margin-bottom: 10px; }
.menu-item { text-align: left; font-size: 17px; min-height: 52px; position: relative; }
.menu-item .dot, .msg.needs .dot { position: static; display: inline-block; flex: 0 0 auto; vertical-align: middle; margin-left: 10px; border-color: var(--white); }
.msg.needs { display: flex; align-items: center; gap: 10px; background: var(--bad-bg); color: var(--bad); border: 1px solid #e0433a; }
.msg.needs .dot { margin-left: 0; }

/* header help / feedback */
.hbtn { width: 36px; padding-left: 0; padding-right: 0; font-size: 16px; }
.fbbtn { white-space: nowrap; font-weight: 600; }
/* Phone: two header lines. The Menu button shows the first name only. */
@media (max-width: 600px) {
  .top { padding: 8px 12px; gap: 8px; flex-wrap: nowrap; }
  .logo { height: 40px; }
  /* Phone: line 1 = company logo + goat head, line 2 = buttons. */
  .top { flex-wrap: wrap; row-gap: 6px; }
  .brand { order: 1; flex: 1 1 auto; }
  .pg-mark { order: 2; padding-left: 8px; margin-left: 0; }
  .top .who { order: 3; flex: 1 1 100%; justify-content: flex-end; margin-left: 0; }
  .co-logo { height: 36px; max-width: 200px; padding: 3px 6px; }
  .co-name { font-size: 17px; max-width: 220px; }
  .pg-full { display: none; }
  .pg-head { display: block; }
  .who .btn.small { white-space: nowrap; }
  .install { display: none; }
  .who { gap: 6px; flex-wrap: nowrap; }
  .who-name, .menu-btn .who-name { display: none; }
  .menu-btn .who-first { display: inline; }
  .menu-btn { gap: 6px; }
  .avatar.avatar-sm { width: 22px; height: 22px; font-size: 10px; }
  .who .btn.small { padding: 4px 9px; min-height: 34px; font-size: 13px; }
  .hbtn { width: 34px; }
}

/* lists */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.toolbar input[type=search], .toolbar select { font-size: 16px; padding: 10px 12px; border: 1px solid #b9c0b3; border-radius: 8px; background: var(--white); min-height: 44px; }
.toolbar input[type=search] { flex: 1 1 220px; min-width: 0; }
.toolbar select { max-width: 100%; }
#filters { display: contents; }
a.row-card.link, a.mini.link { text-decoration: none; color: var(--fg); }
a.row-card.link:hover { border-color: var(--green-deep); }
.clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { text-align: center; }
.empty b { display: block; font-size: 17px; }

/* record view */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px; margin: 0; }
.fact.wide { grid-column: 1 / -1; }
.fact dt { font-size: 13px; color: var(--muted); }
.fact dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sec-head h2 { margin: 0; }
.mini { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
.mini:first-of-type { border-top: 0; }
a.mini.link:hover b { text-decoration: underline; }
.mini-split { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mini-right { white-space: nowrap; }
.danger-zone { margin: 24px 0 8px; text-align: right; }
.btn.danger { color: var(--bad); border-color: #e3b5b0; }

/* edit form */
label.f textarea { display: block; width: 100%; margin-top: 6px; font: 400 16px/1.4 var(--sans); padding: 11px 12px; border: 1px solid #b9c0b3; border-radius: 8px; resize: vertical; }
.grid .wide { grid-column: 1 / -1; }
.req { color: var(--bad); }
details.more summary { cursor: pointer; font-weight: 700; font-size: 17px; }
details.more h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 8px; }
.actions.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }

/* dashboards */
.jump { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; min-width: min(100%, 280px); }
.jump select { font: 400 16px var(--sans); padding: 10px 12px; border: 2px solid var(--green-deep); border-radius: 8px; background: var(--white); min-height: 46px; }
.small-tiles { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.small-tiles .tile { padding: 12px 14px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 0 16px; }
.section-title { font-size: 18px; margin: 8px 0 10px; }
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fact-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.fact-val { font-weight: 700; overflow-wrap: anywhere; }
.bar { height: 8px; background: #e6e9e1; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green-deep); }

/* pop-up panel */
.overlay { position: fixed; inset: 0; background: rgba(20, 26, 33, .55); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; z-index: 50; }
.sheet { background: var(--bg); border-radius: 12px; width: 100%; max-width: 640px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 19px; }
.sheet-body { padding: 16px 18px; }
.help-item { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.help-item h3 { margin: 0 0 4px; font-size: 16px; }
.help-item p { margin: 0 0 6px; }
.help-item ol { margin: 6px 0 8px; padding-left: 22px; }
.help-more { margin: 4px 0 0; font-weight: 600; }
.chapter summary { cursor: pointer; font-weight: 700; font-size: 18px; }
.ch-sub { margin: 16px 0 8px; font-size: 16px; color: var(--green-deep); }
.first-day { border-left: 6px solid var(--green); }
.first-day ol { margin: 0; padding-left: 22px; }

/* log-in style pages */
body.gate { background: var(--slate); }
.gate-box { width: 100%; max-width: 420px; margin: 0 auto; padding: 28px 16px; flex: 1; }
.gate-logo { display: block; width: 240px; max-width: 70%; height: auto; margin: 0 auto 20px; }
.gate-foot { color: rgba(255,255,255,.7); font-size: 13px; text-align: center; }
.gate .preview { background: var(--white); }
.gate-brand { display: flex; justify-content: center; margin: 0 auto 20px; min-height: 60px; }
.gate-co { display: block; max-width: 280px; max-height: 120px; width: auto; height: auto; background: var(--white); border-radius: 10px; padding: 10px 16px; }
.gate-co-name { color: var(--white); font-size: 28px; font-weight: 800; text-align: center; }
.gate-powered { display: flex; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,.7); font-size: 13px; margin-top: 18px; }
.gate-powered img { height: 40px; width: auto; }

/* ---------- Module 3A: Daily Report and Photos (phone first) ---------- */
.dr-date { margin: 0; min-width: 160px; }
.dr-sec h2 { color: var(--slate, #2B3440); }
.dr-check { display: flex; gap: 8px; align-items: center; margin: 10px 0; font-size: 16px; }
.dr-check input { width: 22px; height: 22px; }
.dr-rows { margin: 6px 0 8px; }
.dr-row { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; padding: 10px 40px 10px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf8; }
.dr-row .f { margin: 0; }
.dr-row .dr-area { grid-column: 1 / -1; }
.dr-x { position: absolute; top: 6px; right: 6px; }
.dr-ticket img, .dr-thumb { display: block; max-width: 140px; max-height: 100px; margin: 4px 0; border-radius: 6px; border: 1px solid var(--line); }
.dr-problems { color: #9b1c1c; margin: 8px 0 90px; }
.dr-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 14px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
.dr-count { margin-right: auto; font-weight: 600; padding: 6px 10px; border-radius: 6px; }
.dr-count.warn { background: #fff4d6; color: #7a5200; }
.dr-count.good { background: #e6f4d7; color: #2f5a05; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ph-day { grid-column: 1 / -1; margin: 10px 0 0; font-size: 15px; }
.ph { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.ph img { display: block; width: 100%; height: 150px; object-fit: cover; background: #eee; }
.ph figcaption { padding: 6px 8px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.ph-cap { width: 100%; padding: 6px; font-size: 13px; }
.ph-acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mk-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.mk-sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #999; margin-right: 4px; vertical-align: -1px; }
.mk-wrap { max-height: 65vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #222; }
.mk-wrap canvas { display: block; width: 100%; height: auto; cursor: crosshair; }
@media (max-width: 600px) { .dr-row { grid-template-columns: 1fr 1fr; } .ph-grid { grid-template-columns: 1fr 1fr; } .ph img { height: 120px; } }

/* Module 3D Safety */
.simple { border-collapse: collapse; width: 100%; font-size: 14px; }
.simple th, .simple td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.simple th { background: #f2f2f2; }

/* 3C Sub Kickoff (pre-award) sheet: kickoff.html, kickoff-sign.html, kickoffsheet.js */
.ko-sheet h3 { margin: 18px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; }
.ko-sheet textarea, .ko-sheet input:not([type=checkbox]), .ko-sheet select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #b9c0b3; border-radius: 8px; margin-top: 4px; }
.ko-tb, .ko-att { border-collapse: collapse; width: 100%; font-size: 14px; margin: 6px 0; }
.ko-tb th, .ko-tb td, .ko-att th, .ko-att td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.ko-tb th { width: 34%; background: #f2f2f2; }
.ko-att th { background: #f2f2f2; }
.ko-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 10px; }
.ko-auto { background: #eef7ea; border-radius: 6px; padding: 6px 8px; }
.ko-min { background: #f7f7f2; border-left: 3px solid var(--green-deep); padding: 6px 8px; margin: 6px 0; font-weight: 400; }
.ko-big { font-size: 20px; font-weight: 800; text-align: center; margin: 8px 0; }
.ko-ack { border: 3px solid #111; padding: 14px; margin: 12px 0; font-weight: 700; font-size: 16px; text-align: center; line-height: 1.45; }
.ko-ack-h { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.ko-init { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.ko-box { display: inline-block; min-width: 70px; height: 32px; border: 2px solid #111; text-align: center; line-height: 28px; font-size: 18px; }
.ko-sigs img { max-height: 60px; max-width: 220px; }
.ko-pad { width: 100%; height: 140px; border: 2px dashed #888; border-radius: 8px; background: #fff; touch-action: none; }
.ko-sign { border: 2px solid var(--green-deep); border-radius: 10px; padding: 12px; margin: 12px 0; }
@media print { .ko-sheet textarea, .no-print, header.top, footer.foot { display: none !important; } .ko-sheet h3 { break-after: avoid; } }
