@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/static/fonts/inter-Regular.woff) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(/static/fonts/inter-Medium.woff) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/static/fonts/inter-SemiBold.woff) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 700 800; font-display: swap; src: url(/static/fonts/inter-Bold.woff) format('woff'); }
@font-face { font-family: 'Lora'; font-weight: 400 700; font-display: swap; src: url(/static/fonts/lora.woff) format('woff'); }
:root {
  --ink: #1F2328;
  --muted: #555B62;
  --line: #D9D9D9;
  --bg: #F2F2F2;
  --card: #ffffff;
  --brand: #2E6E70;
  --brand-dark: #1F4D4F;
  --brand-tint: #E3EFEF;
  --accent: #2E6E70;
  --accent-ink: #ffffff;
  --good: #1F7A4A;
  --good-bg: #E5F3EB;
  --bad: #B42318;
  --warn: #9A4A00;
  --warn-bg: #FEF3E2;
  --radius: 14px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* hidden always wins over button styles */
body { margin: 0; background: var(--bg); line-height: 1.45; }
a { color: inherit; }
button, input { font: inherit; }

/* Top bar */
.topbar { background: var(--brand); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.brand small { display: block; font-weight: 500; opacity: .7; font-size: 12px; letter-spacing: 0; }
.topbar .spacer { flex: 1; }
.topbar .link-btn { color: #fff; opacity: .8; background: none; border: 0; cursor: pointer; padding: 6px; }

main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0; }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stack > * + * { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 18px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 26px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row .spacer { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .stat b { font-size: 22px; } }

/* Project cards */
.project-card { display: block; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.project-card:hover { border-color: #b9c0ca; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.project-card h3 { margin: 0 0 2px; font-size: 16px; }
.project-card .meta { color: var(--muted); font-size: 14px; }
.project-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #eef0f3; color: var(--muted); }
.badge.live { background: var(--good-bg); color: var(--good); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.section-label { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 28px 0 10px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { border-color: #b9c0ca; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.96); }
.btn.dark { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.danger { color: var(--bad); border-color: #e7c4c1; }
.btn.danger:hover { border-color: var(--bad); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field + .field { margin-top: 14px; }
input[type=text], input[type=tel], input[type=password] { width: 100%; padding: 12px; border: 1px solid #c9cfd7; border-radius: 10px; background: #fff; font-size: 16px; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--brand); }
.error { color: var(--bad); font-size: 14px; min-height: 1em; margin: 10px 0 0; }
.hint { color: var(--muted); font-size: 13px; }

/* People lists & tables */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; padding-top: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #e9edf2; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--muted); flex: none; }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; }
.person .who span { color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); padding: 8px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-top: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; border-top: 0; }
.table-wrap { overflow-x: auto; }

/* QR */
.qr-box { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 10px; border: 1px dashed var(--line); }
.qr-box img, .qr-box canvas { width: 220px !important; height: 220px !important; }
.url { font-size: 13px; word-break: break-all; color: var(--muted); }

/* Dialog */
dialog { border: 0; border-radius: var(--radius); padding: 22px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 16, 26, .45); }

/* Worker sign-in page */
.signin-wrap { max-width: 460px; margin: 0 auto; padding: 18px 16px 40px; }
.site-head { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.site-head small { opacity: .7; text-transform: uppercase; letter-spacing: .07em; font-size: 12px; }
.site-head h1 { margin: 4px 0 2px; font-size: 21px; }
.site-head p { margin: 0; opacity: .8; font-size: 14px; }
.success { text-align: center; }
.tick { width: 64px; height: 64px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; margin: 4px auto 12px; font-size: 34px; }

/* Print: only the QR poster */
.poster { display: none; }
@media print {
  body { background: #fff; }
  .no-print, .topbar, .poster-page main > *:not(.poster) { display: none !important; }
  .poster { display: block !important; text-align: center; padding-top: 40px; }
  .poster h1 { font-size: 40px; margin-bottom: 6px; }
  .poster .addr { font-size: 20px; color: #444; }
  .poster .big { font-size: 30px; font-weight: 800; margin: 30px 0 10px; }
  .poster .qr-print img, .poster .qr-print canvas { width: 420px !important; height: 420px !important; }
  .poster .qr-print { display: inline-block; margin: 10px auto; }
  .poster .steps { font-size: 18px; color: #333; }
  .poster .brandline { margin-top: 40px; font-weight: 700; letter-spacing: .05em; }
}

/* Top menu */
#nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
#nav a { color: #fff; opacity: .75; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; }
#nav a:hover { opacity: 1; }
#nav a.on { opacity: 1; background: rgba(255,255,255,.12); }
@media (max-width: 560px) { .brand small { display: none; } #nav a, .topbar .link-btn { font-size: 14px; padding: 6px 7px; } }

/* Login / setup pages */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 40px 16px; }
.auth-wrap .brand { color: var(--ink); justify-content: center; margin-bottom: 22px; }
.auth-wrap h1 { text-align: center; }
.auth-wrap .sub { text-align: center; margin-bottom: 18px; }
.notice { background: #fff7e3; border: 1px solid #f1d58e; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.notice.ok { background: var(--good-bg); border-color: #b8dfc8; }
.temp-pw { font: 600 20px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .03em; background: #fff; border: 1px dashed #c9cfd7; border-radius: 8px; padding: 10px 12px; margin: 10px 0; user-select: all; text-align: center; }
select { width: 100%; padding: 12px; border: 1px solid #c9cfd7; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; }
input[type=email] { width: 100%; padding: 12px; border: 1px solid #c9cfd7; border-radius: 10px; background: #fff; font-size: 16px; }

/* Team list */
.member { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; padding-top: 0; }
.member .who b { display: block; }
.member .who span { color: var(--muted); font-size: 14px; }
.member .controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.member .controls select { width: auto; padding: 6px 8px; font-size: 14px; }
.member.inactive { opacity: .55; }
.badge.money { background: #fff2d6; color: #8a5a00; }
@media (max-width: 640px) { .member { grid-template-columns: auto 1fr; } .member .controls { grid-column: 1 / -1; justify-content: flex-start; } }

textarea { width: 100%; padding: 12px; border: 1px solid #c9cfd7; border-radius: 10px; background: #fff; font: inherit; font-size: 15px; resize: vertical; }
textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.person .who a { color: inherit; }
dialog { max-height: calc(100vh - 32px); overflow-y: auto; }

/* Site diary */
.date-bar { display: flex; gap: 8px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.date-bar input[type=date] { padding: 8px 10px; border: 1px solid #c9cfd7; border-radius: 10px; font: inherit; background: #fff; min-height: 38px; }
.weather-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.weather-row .field + .field { margin-top: 0; }
input[type=number] { width: 100%; padding: 12px; border: 1px solid #c9cfd7; border-radius: 10px; background: #fff; font-size: 16px; }
.save-bar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; background: var(--card); padding: 12px 0 2px; margin-top: 10px; border-top: 1px solid var(--line); }
.entry-link { display: block; padding: 10px 8px; border-top: 1px solid var(--line); text-decoration: none; border-radius: 8px; }
.entry-link:first-child { border-top: 0; }
.entry-link:hover, .entry-link.on { background: #f4f5f7; }
.entry-link b, .entry-link span { display: block; }
.entry-link span { color: var(--muted); font-size: 14px; }
.print-only { display: none; }
@media print {
  .print-only { display: block !important; font-size: 12pt; color: #000; }
  .print-only h1 { font-size: 20pt; margin: 4px 0; }
  .print-only h2 { font-size: 14pt; margin: 10px 0 2px; }
  .print-only h3 { font-size: 11pt; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #999; padding-bottom: 2px; }
  .print-only .pre { white-space: pre-wrap; margin: 0; }
  .print-only table { font-size: 10pt; }
  .print-only th, .print-only td { border-top: 1px solid #ccc; padding: 4px 6px; }
  .print-only .print-foot { margin-top: 24px; font-size: 9pt; color: #555; }
  .diary-page main { display: none !important; }
}

/* Toolbox talks */
dialog.wide { width: min(640px, calc(100vw - 24px)); }
.pre { white-space: pre-wrap; }
.people-pick { border: 1px solid var(--line); border-radius: 10px; max-height: 300px; overflow-y: auto; }
.people-pick .empty { padding: 10px 12px; margin: 0; }
.check.pick { padding: 10px 12px; border-top: 1px solid var(--line); align-items: center; margin: 0; cursor: pointer; }
.check.pick:first-child { border-top: 0; }
.check.pick > span:nth-child(2) { flex: 1; }
.check.pick .hint { font-weight: 400; }
.extra-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.extra-row input { padding: 10px; }
@media (max-width: 480px) { .extra-row { grid-template-columns: 1fr auto; } .extra-row .extra-company { grid-column: 1; grid-row: 2; } .extra-row button { grid-row: 1 / span 2; } }

/* Incidents & hazards */
.tabs { display: flex; gap: 6px; margin: 16px 0; }
.tab { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.incident-card { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.incident-card:hover { border-color: #b9c0ca; }
.badge.bad { background: #fde8e6; color: var(--bad); }
.badge.warn { background: #fff2d6; color: #8a5a00; }
.badge.open { background: #fde8e6; color: var(--bad); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { margin: 0; font-weight: 600; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 9px 14px; border: 1px solid #c9cfd7; border-radius: 999px; cursor: pointer; background: #fff; }
.seg input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.alert { background: #fde8e6; border: 1px solid #f0b9b4; color: #5c1410; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert a { color: inherit; }
.alert label { color: inherit; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #e9edf2; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; font-size: 13px; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; font-size: 15px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
#view h3, .print-only h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 6px; }
.close-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
input[type=datetime-local] { width: 100%; padding: 11px; border: 1px solid #c9cfd7; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
@media print {
  dialog { display: none !important; }
  .print-only .details { font-size: 11pt; }
  .print-only .print-photos { grid-template-columns: 1fr 1fr; gap: 10px; }
  .print-only .print-photos img { width: 100%; max-height: 300px; object-fit: contain; break-inside: avoid; }
}
@media (max-width: 560px) { .stats:has(> :nth-child(4)) { grid-template-columns: repeat(2, 1fr); } }

/* SWMS & subcontractors */
.check.hrcw { font-size: 14px; font-weight: 500; padding: 4px 0; }
.hrcw-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 12px; background: #eef0f3; color: var(--muted); border-radius: 999px; padding: 3px 9px; }
.chip.on { background: var(--good-bg); color: var(--good); }
.list-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.list-card:first-child { border-top: 0; padding-top: 0; }
.list-card .grow { flex: 1; min-width: 0; }
.list-card .grow > b { display: block; }
.list-card .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.review-note { background: #fde8e6; border-radius: 8px; padding: 8px 10px; font-size: 14px; margin-top: 8px; white-space: pre-wrap; }
.search { width: 100%; padding: 11px 12px; border: 1px solid #c9cfd7; border-radius: 10px; font-size: 16px; margin: 14px 0; }
.or-line { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0; }

/* Defects */
input[type=date].date-input { width: 100%; padding: 11px; border: 1px solid #c9cfd7; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; }
.defect-card { padding: 14px 0; border-top: 1px solid var(--line); }
.defect-card:first-child { border-top: 0; padding-top: 0; }

/* Project tools grid */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 0; }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 6px; text-decoration: none; font-weight: 600; font-size: 14px; min-height: 84px; }
.tool:hover { border-color: #b9c0ca; }
.tool-icon { font-size: 22px; line-height: 1; }
.tool .badge { font-size: 11px; padding: 2px 7px; }
@media (max-width: 640px) { .tools { grid-template-columns: repeat(3, 1fr); } }

/* Financials */
.scroll-tabs { overflow-x: auto; white-space: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.scroll-tabs .tab { flex: none; }
.money-table th:not(:first-child), .money-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.money-table tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.money-table.clickable tbody tr:not(.total) { cursor: pointer; }
.money-table.clickable tbody tr:not(.total):hover { background: #f4f5f7; }
.neg { color: var(--bad); }
.pos { color: var(--good); }
.warn-text { color: #8a5a00; }
.nowrap { white-space: nowrap; }
.fin-stats .stat b { font-size: 22px; }
.claim-table input.pct { width: 70px; padding: 7px 8px; border: 1px solid #c9cfd7; border-radius: 8px; text-align: right; font-size: 16px; }
.claim-table input.pct.bad { border-color: var(--bad); outline-color: var(--bad); }
.claim-totals { max-width: 420px; margin-left: auto; }
.claim-totals dd { text-align: right; }
@media print {
  .claim-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 12px; }
  .claim-title { font-size: 16pt; font-weight: 800; text-align: right; }
  .print-only td:not(:first-child), .print-only th:not(:first-child) { text-align: right; }
  .claim-sum { width: 60%; margin: 14px 0 0 auto; }
  .claim-sum tr.grand td { border-top: 2px solid #000; font-size: 13pt; }
}

.steps-list { padding-left: 20px; margin: 0; }
.steps-list li { margin-bottom: 8px; }
code { background: #eef0f3; padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.xero-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #13b5ea; font-weight: 700; }
.import-table td { vertical-align: top; }
.import-table select { width: auto; max-width: 170px; padding: 6px; font-size: 13px; }

.claim-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; min-width: 220px; }

/* Estimates */
.est-row { text-decoration: none; align-items: center; }
.est-row:hover b { text-decoration: underline; }
.est-amt { text-align: right; white-space: nowrap; }
.est-amt b, .est-amt span { display: block; }
main.est-main { max-width: 1240px; }
.title-input { width: 100%; font-size: 22px; font-weight: 700; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: #f6f7f9; }
.title-input:focus { border-color: var(--accent); background: #fff; outline: none; }
.est-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.est-side { position: sticky; top: 12px; display: grid; gap: 16px; }
@media (max-width: 900px) { .est-grid { grid-template-columns: minmax(0, 1fr); } .est-grid > * { min-width: 0; } .est-side { position: static; } }
.trade { padding: 14px; margin-bottom: 10px; }
.trade-head { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.cell { width: 100%; padding: 8px; border: 1px solid #d5dae0; border-radius: 8px; font: inherit; font-size: 15px; background: #fff; min-width: 0; }
.cell:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.cell.num { text-align: right; min-width: 70px; }
.cell.unit { min-width: 56px; }
.cell.tname { font-weight: 600; }
.edit-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.edit-table th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: left; padding: 4px; border: 0; }
.edit-table td { padding: 3px 4px; border: 0; }
.edit-table td:first-child { min-width: 160px; }
.edit-table .line-total { text-align: right; padding-right: 6px; }
.x-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 6px; border-radius: 6px; }
.x-btn:hover { background: #f1f2f4; color: var(--bad); }
.small-seg span { padding: 6px 12px !important; font-size: 14px; }
.big-total { font-size: 18px; }
.totals-card .details { font-size: 14px; }
.totals-card .details dd { text-align: right; }
.pick-list { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: #fff; border: 0; border-top: 1px solid var(--line); padding: 10px 12px; cursor: pointer; font: inherit; }
.pick-row:first-child { border-top: 0; }
.pick-row:hover { background: #f4f5f7; }

/* Tender: scope checklist + payment schedule */
.scope-panel { border: 1px solid var(--line); background: #fafbfc; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.scope-item { font-size: 14px; font-weight: 400; padding: 4px 0; display: flex; gap: 8px; align-items: flex-start; }
.scope-item.custom { justify-content: space-between; color: var(--ink); }
.scope-item input { margin-top: 3px; }
.pay-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 6px; align-items: center; margin-bottom: 6px; font-size: 14px; }

/* =====================================================================
   Uplift: Paramount look, side menu on computers, bottom tabs on phones
   ===================================================================== */
.topbar { background: var(--brand-dark); }
.brand-mark { display: none; }
.brand > span { letter-spacing: .22em; font-size: 17px; }
.brand small { letter-spacing: .02em; font-size: 12px; opacity: .75; font-weight: 400; }
.card { border-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.stat { border-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); filter: none; }
.badge.warn, .badge.money { background: var(--warn-bg); color: var(--warn); }
.tab.on, .seg input:checked + span { background: var(--brand); border-color: var(--brand); }
h1 { font-size: 26px; }

/* Side menu (computer) */
.side-nav { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #E3EFEF; text-decoration: none; font-size: 15px; background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }
.side-nav a:hover, .side-nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; }
.side-nav svg { width: 20px; height: 20px; flex: none; }
.side-nav .count { margin-left: auto; background: #fff; color: var(--brand-dark); font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 8px; }
.side-nav .sep { height: 1px; background: rgba(255,255,255,.14); margin: 10px 4px; }
.me-btn { display: none; }

@media (min-width: 1000px) {
  body.has-nav:not(.compact-nav) { padding-left: 232px; }
  body.has-nav:not(.compact-nav) .topbar { position: fixed; top: 0; left: 0; bottom: 0; width: 232px; flex-direction: column; align-items: stretch; padding: 24px 14px; gap: 22px; overflow-y: auto; z-index: 20; }
  body.has-nav:not(.compact-nav) .topbar .brand { padding: 0 10px; }
  body.has-nav:not(.compact-nav) .topbar .spacer { display: none; }
  body.has-nav:not(.compact-nav) #nav { display: block; flex: 1; }
  body.has-nav:not(.compact-nav) main { max-width: 1180px; padding: 32px 32px 56px; }
}
/* Compact (e.g. the take-off screen): menu stays across the top */
body.compact-nav #nav .side-nav { flex-direction: row; flex-wrap: wrap; }
body.compact-nav #nav .side-nav a, body.compact-nav #nav .side-nav button { width: auto; min-height: 36px; font-size: 14px; }
body.compact-nav #nav .side-nav svg, body.compact-nav #nav .sep { display: none; }

/* Bottom tabs (phone) */
.bottom-tabs { display: none; }
@media (max-width: 999px) {
  body.has-nav:not(.compact-nav) #nav { display: none; }
  body.has-nav:not(.compact-nav) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.has-nav:not(.compact-nav) .me-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
  body.has-nav:not(.compact-nav) .bottom-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
  .bottom-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; text-decoration: none; color: var(--muted); font-size: 12px; position: relative; }
  .bottom-tabs a.on { color: var(--brand); font-weight: 700; }
  .bottom-tabs svg { width: 24px; height: 24px; }
  .bottom-tabs .count { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 1px 6px; }
  body.has-nav:not(.compact-nav) .save-bar { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .btn { min-height: 48px; }
  .btn.small { min-height: 40px; }
}
.more-sheet { padding: 8px; }
.more-sheet a, .more-sheet button { display: flex; align-items: center; min-height: 52px; padding: 0 16px; border-radius: 10px; text-decoration: none; font-size: 16px; font-weight: 600; background: none; border: 0; width: 100%; cursor: pointer; color: var(--ink); }
.more-sheet a:hover, .more-sheet button:hover { background: var(--bg); }
.more-sheet .who { padding: 12px 16px 8px; color: var(--muted); font-size: 14px; }
@media print { .bottom-tabs { display: none !important; } body.has-nav { padding: 0 !important; } }

/* Home dashboard */
.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 20px 0; }
.kpi { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.07); text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
a.kpi:hover { box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.kpi .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.kpi b { font-size: 32px; line-height: 1.1; color: var(--brand); }
.kpi b.bad { color: var(--bad); } .kpi b.warn { color: var(--warn); } .kpi b.plain { color: var(--ink); }
.kpi .note { font-size: 13px; color: var(--muted); }
.attn { padding: 4px 0; }
.attn h2 { padding: 12px 18px 6px; margin: 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.attn-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; min-height: 56px; text-decoration: none; border-top: 1px solid #ECECEC; }
.attn-row:hover { background: #FAFAFA; }
.attn-row .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; background: var(--brand-tint); color: var(--brand-dark); }
.attn-row .n.bad { background: #FDECEA; color: var(--bad); } .attn-row .n.warn { background: var(--warn-bg); color: var(--warn); }
.attn-row .t { flex: 1; min-width: 0; } .attn-row .t b { display: block; font-size: 16px; } .attn-row .t span { font-size: 13px; color: var(--muted); }
.attn-row .chev { color: #8A9096; flex: none; }
.all-clear { padding: 16px 18px; color: var(--good); font-weight: 700; border-top: 1px solid #ECECEC; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick .btn { min-height: 60px; font-size: 16px; }
.home-cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-top: 18px; }
.home-cols > .main-col { flex: 3 1 480px; min-width: 0; display: grid; gap: 18px; }
.home-cols > .side-col { flex: 2 1 320px; min-width: 0; display: grid; gap: 18px; }
.mail-row { display: block; padding: 12px 0; border-top: 1px solid #ECECEC; text-decoration: none; }
.mail-row:first-of-type { border-top: 0; }
.mail-row .top { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.mail-row .top span { font-size: 13px; white-space: nowrap; color: var(--muted); }
.mail-row .top span.bad { color: var(--bad); } .mail-row .top span.warn { color: var(--warn); }
.mail-row .subj { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--brand-tint); color: var(--brand-dark); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }

/* Inbox */
.seg-tabs { display: flex; background: #E6E6E6; border-radius: 12px; padding: 3px; gap: 3px; }
.seg-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 10px; background: none; font-weight: 600; color: var(--muted); cursor: pointer; font-size: 15px; }
.seg-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; color: var(--ink); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.mail-card { background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.07); display: grid; gap: 6px; }
.mail-card + .mail-card { margin-top: 10px; }
.mail-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mail-card .from { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-card .age { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mail-card .age.bad { color: var(--bad); } .mail-card .age.warn { color: var(--warn); }
.mail-card .subj { font-size: 15px; }
.mail-card .snip { font-size: 13px; color: var(--muted); }
.mail-card .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.mail-card .acts .spacer { flex: 1; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--bad); border-color: #e7c4c1; }
.thread-msg { border-top: 1px solid var(--line); padding: 12px 0; }
.thread-msg:first-child { border-top: 0; }
.thread-msg .meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.thread-msg .body { white-space: pre-wrap; font-size: 15px; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 50; display: flex; gap: 14px; align-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast button { background: none; border: 0; color: #9FD3D4; font-weight: 700; cursor: pointer; font-size: 15px; }
@media (min-width: 1000px) { .toast { bottom: 28px; } }
@media (max-width: 640px) {
  .hello .row { display: none; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
  .kpi { padding: 12px; gap: 2px; }
  .kpi .label { font-size: 10px; letter-spacing: .04em; line-height: 1.25; }
  .kpi b { font-size: 24px; }
  .kpi .note { display: none; }
  .home-cols { margin-top: 12px; gap: 14px; }
  .home-cols > .main-col, .home-cols > .side-col { gap: 14px; }
  main { padding-top: 16px; }
}


/* =====================================================================
   Luxe — Paramount's premium look (warm ivory, deep teal, champagne gold)
   Sits on top of everything above, so every page picks it up.
   ===================================================================== */
:root {
  --ink: #16191B; --muted: #6B6F72; --line: #E8E3DA; --bg: #F6F3EE; --card: #FFFFFF;
  --brand: #1E4E4F; --brand-dark: #0F2C2D; --brand-tint: #E9F0EF; --accent: #1E4E4F; --accent-ink: #fff;
  --gold: #B4925A; --gold-soft: #F4EDE1; --gold-line: #DCC9A6;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -14px rgba(16, 24, 40, .14);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .05), 0 18px 40px -14px rgba(16, 24, 40, .22);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
body { background: var(--bg); color: var(--ink); }
::selection { background: var(--gold-soft); }

/* headings */
h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; letter-spacing: -.015em; line-height: 1.15; }
h2 { font-weight: 600; letter-spacing: -.005em; }
.sub { color: var(--muted); }

/* side menu */
.topbar { background: linear-gradient(180deg, #123536 0%, #0C2425 100%); }
.topbar .brand { color: #fff; }
.topbar .brand > span:not(.brand-mark) { display: block; width: 150px; height: 46px; background: url(/static/brand/logo-white.png) left center / contain no-repeat; text-indent: -9999px; overflow: hidden; white-space: nowrap; }
.side-nav { gap: 1px; }
.side-nav a, .side-nav button { color: rgba(255, 255, 255, .72); font-size: 14.5px; min-height: 40px; border-radius: 10px; transition: background .15s, color .15s; }
.side-nav a:hover, .side-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on { background: rgba(255, 255, 255, .08); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.side-nav a.on svg { color: var(--gold); }
.side-nav svg { width: 18px; height: 18px; opacity: .9; }
.side-nav .nav-label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .38); margin: 18px 12px 6px; }
.side-nav .sep { background: rgba(255, 255, 255, .1); }
.side-nav .count { background: var(--gold); color: #fff; }
.side-nav .nav-search { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .6); margin-bottom: 4px; }
.side-nav .nav-search:hover { border-color: rgba(180, 146, 90, .6); }
.side-nav kbd, .jump kbd { margin-left: auto; font: 600 11px 'Inter', sans-serif; padding: 2px 6px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .55); }
@media (min-width: 1000px) {
  body.has-nav:not(.compact-nav) { padding-left: 248px; }
  body.has-nav:not(.compact-nav) .topbar { width: 248px; padding: 28px 16px; }
  body.has-nav:not(.compact-nav) main { max-width: 1240px; padding: 40px 44px 64px; }
}
@media (max-width: 999px) {
  .topbar .brand > span:not(.brand-mark) { width: 120px; height: 34px; }
  body.has-nav:not(.compact-nav) .me-btn { background: rgba(180, 146, 90, .25); border: 1px solid rgba(180, 146, 90, .55); }
  body.has-nav:not(.compact-nav) .bottom-tabs { background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottom-tabs a.on { color: var(--brand); }
  .bottom-tabs a.on::before { content: ''; position: absolute; top: -6px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
  h1 { font-size: 27px; }
}

/* cards, stats, tiles */
.card, .stat { background: var(--card); border: 1px solid rgba(20, 30, 30, .06); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 22px; }
.stat { padding: 18px 20px; }
.stat b { font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: -.01em; color: var(--brand-dark); }
.stat span { letter-spacing: .01em; }
.project-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--gold-line); }
.section-label { font-size: 11px; letter-spacing: .16em; color: var(--muted); }

/* project tools, grouped */
.tool-groups { display: grid; gap: 22px; margin: 26px 0 6px; }
.tool-group:not(:has(.tool:not([hidden]))) { display: none; }
.tool-label { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tool-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.tool-groups .tools { margin: 0; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tool { position: relative; border: 1px solid rgba(20, 30, 30, .06); border-radius: 16px; box-shadow: var(--shadow); min-height: 104px; gap: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--gold-line); }
.tool-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); font-size: 0; }
.tool:hover .tool-icon { background: var(--gold-soft); color: #8A6A35; }
.tool-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool .badge { position: absolute; top: 8px; right: 8px; }
@media (max-width: 640px) { .tool-groups .tools { grid-template-columns: repeat(3, 1fr); gap: 8px; } .tool { min-height: 92px; font-size: 12.5px; } }

/* buttons */
.btn { border-radius: 12px; font-weight: 600; letter-spacing: .005em; border-color: var(--line); transition: transform .12s ease, box-shadow .15s ease, border-color .15s, background .15s; }
.btn:hover { border-color: var(--gold-line); }
.btn.primary, .btn.dark { background: linear-gradient(180deg, #245C5D 0%, #1A4546 100%); border-color: #1A4546; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 18px -8px rgba(15, 44, 45, .55); }
.btn.primary:hover, .btn.dark:hover { background: linear-gradient(180deg, #2A6667 0%, #1E4E4F 100%); border-color: #1E4E4F; transform: translateY(-1px); }
.btn.primary:active, .btn.dark:active { transform: none; }
.btn.danger { color: #A3261B; border-color: #EBCFCB; }
.btn:disabled { transform: none; }

/* forms */
input[type=text], input[type=tel], input[type=password], input[type=email], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  border: 1px solid #DED7CB; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180, 146, 90, .22); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
label { color: #2B2F31; }

/* tables, tabs, badges */
table th { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.money-table.clickable tbody tr:not(.total):hover { background: #FAF7F1; }
.tab { border-color: var(--line); color: var(--muted); }
.tab.on, .seg input:checked + span { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.badge { font-weight: 600; letter-spacing: .01em; }
.badge.warn, .badge.money { background: var(--gold-soft); color: #8A6A35; }

/* dialogs, toasts */
dialog { border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(10, 20, 20, .45); }
dialog::backdrop { background: rgba(10, 24, 25, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.toast { background: #0F2C2D; border: 1px solid rgba(180, 146, 90, .35); }
.toast button { color: var(--gold); }

/* quick search */
dialog.jump { padding: 0; width: min(620px, calc(100vw - 24px)); margin-top: 12vh; overflow: hidden; }
.jump-in { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.jump-in svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.jump-in input { border: 0 !important; box-shadow: none !important; padding: 6px 0 !important; font-size: 17px !important; }
.jump kbd { color: var(--muted); border-color: var(--line); }
.jump-list { max-height: min(60vh, 460px); overflow-y: auto; padding: 8px; }
.jump-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.jump-list a svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.jump-list a span { display: flex; flex-direction: column; min-width: 0; }
.jump-list a b { font-weight: 600; font-size: 14.5px; }
.jump-list a small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jump-list a.sel, .jump-list a:hover { background: var(--gold-soft); }
.jump-empty { color: var(--muted); padding: 14px; margin: 0; }

/* gentle page entrance */
@media (prefers-reduced-motion: no-preference) {
  main { animation: luxeIn .38s ease both; }
  @keyframes luxeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

.kpi b { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
.kpi { transition: transform .18s ease, box-shadow .18s ease; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
