/* ---- the site engineer's projects: a card per project, today first (owner, 2026-10-08) ----------------------------- */
.site-due { color: var(--check); font-weight: 650; }
.site-grid:has(.pcard) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.pcard { display: grid; gap: 16px; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.pcard h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; font-size: 19px; color: var(--ink); overflow-wrap: anywhere; }
.pcard h2 .code { font-family: var(--font); font-size: 14px; color: var(--ibs-indigo); }
.today { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.today.to-send { background: var(--check-bg); border-color: var(--check-line); }
.today.sent { background: var(--ibs-indigo-soft); border-color: var(--ibs-indigo-soft); }
.today .what { display: flex; align-items: center; gap: 12px; margin: 0; }
.today .what .icon { width: 26px; height: 26px; color: var(--ink-3); }
.today.to-send .what .icon, .today.to-send .what b { color: var(--check); }
.today.sent .what .icon { color: var(--ibs-indigo); }
.today .what > span { display: grid; gap: 2px; }
.today .what b { font-size: 16px; line-height: 1.3; }
.today .what span span { color: var(--ink-2); font-size: 13px; }
.today .btn { margin: 0; min-height: 52px; gap: 10px; font-size: 16px; }
.pmod { display: grid; gap: 8px; }
.pmod-h { display: flex; justify-content: space-between; gap: 10px; margin: 0; color: var(--ink-3); font-size: 13px; }
.pmod-h b { color: var(--ink); font-weight: 600; }
.sbar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); }
.sbar i { flex: 0 1 0; min-width: 0; }
.skey { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.skey span { display: inline-flex; align-items: center; gap: 6px; }
.pfacts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.pfacts a { display: grid; gap: 2px; min-height: 56px; padding: 12px 4px 2px 0; color: var(--ink); text-decoration: none; }
.pfacts a + a { padding-left: 14px; border-left: 1px solid var(--line); }
.pfacts .k { color: var(--ink-3); font-size: 12px; }
.pfacts .v { display: flex; align-items: center; gap: 7px; font-weight: 600; overflow-wrap: anywhere; }
.pfacts .v.bad { color: var(--check); }
.pfacts a:hover .v { color: var(--ibs-indigo); }
.popen { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ibs-indigo); font-weight: 600; text-decoration: none; }
.popen:hover { background: var(--ibs-indigo-soft); border-color: var(--ibs-indigo); color: var(--ibs-indigo-ink); }
.popen .icon { width: 18px; height: 18px; }
/* Projects the tracker keeps itself (spec 2026-10-21): the Ongoing / Archived filter, the archived mark, a job's files
   and the new-project form. */
.pl-state { display: flex; flex-wrap: wrap; gap: 6px; margin-right: 6px; padding-right: 12px; border-right: 1px solid var(--line); }
.chip-archived { background: var(--surface-2); border-color: var(--line-2); color: var(--ink-2); }
.job-files .card-head .hint { flex-basis: 100%; }
.files-upload { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding: 4px 20px 16px; }
.files-upload .field { flex: 1 1 220px; }
.files-upload .btn { min-height: 44px; }
.files-upload .form-error, .files-hint { flex-basis: 100%; margin: 0; }
.files-wrap { overflow-x: auto; padding: 0 20px 16px; }
.files-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.files-table th { padding: 8px 12px 8px 0; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.files-table td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: break-word; }
.files-table .btn { white-space: nowrap; }
.files-table .num { text-align: right; white-space: nowrap; }
.files-table form { margin: 0; text-align: right; }
.new-project { max-width: 760px; padding: 20px; }
.new-project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 20px; align-items: start; }
.new-project-grid > .field { align-content: start; }
.new-project .form-error { margin: 0; padding: 6px 10px; font-size: 13px; }
.new-project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
/* Change password (the owner, 2026-11-03): one column, about as wide as the sign-in card. */
.password-form { max-width: 440px; padding: 20px; display: grid; gap: 16px; }
.password-form .form-error { margin: 0; padding: 6px 10px; font-size: 13px; }
.password-form-actions { margin: 4px 0 0; }
.password-form-actions .btn { margin: 0; }
/* The test copy's strip above every page (the owner, 2026-11-03), in the warning colours; never on the real site. */
.site-label { padding: 6px 16px; background: var(--check-bg); border-bottom: 1px solid var(--check-line); color: var(--check); font-size: 13px; font-weight: 600; text-align: center; }
/* Profile (the owner, 2026-11-03: like Infinity's profile, our details only): headed sections of read-only details. */
.profile { max-width: 760px; display: grid; gap: 24px; }
.profile-section h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.profile-card { display: flex; align-items: flex-start; gap: 24px; padding: 20px; }
.profile-avatar { flex: none; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--side-bg); color: var(--side-ink); font-family: var(--font-brand); font-size: 30px; font-weight: 700; }
.profile-facts { flex: 1; min-width: 0; display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 12px 28px; margin: 0; }
.profile-facts dt { font-size: 13px; color: var(--ink-3); }
.profile-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.profile-facts .btn { margin: 0; }
.profile-jobs { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
/* My projects (the owner, 2026-11-04): a PM ticks their codes and chooses each one's team. */
.myproj { max-width: 860px; display: grid; gap: 16px; }
.myproj-filter { display: grid; gap: 6px; max-width: 420px; font-size: 13px; color: var(--ink-2); }
.myproj-filter input { font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; }
.myproj-form { display: grid; gap: 20px; }
.myproj-group h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.myproj-list { margin: 0; padding: 0; list-style: none; }
.myproj-row { padding: 10px 16px; border-top: 1px solid var(--line); }
.myproj-row:first-child { border-top: 0; }
.myproj-pick { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; }
.myproj-pick input, .myproj-team input { width: 18px; height: 18px; flex: none; }
.myproj-team { margin: 8px 0 4px 28px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.myproj-team legend { padding: 0 4px; font-size: 12.5px; color: var(--ink-3); }
.myproj-team label { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.myproj-role { font-size: 12.5px; color: var(--ink-3); }
.myproj-note { margin: 4px 0 0 28px; font-size: 12.5px; color: var(--ink-3); }
.myproj-save { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; background: var(--bg, #fff); }
.myproj-save .btn { margin: 0; }
.myproj-save .myproj-note { margin: 0; }
/* On a phone the avatar sits above the details, so a username or an email keeps its line. */
@media (max-width: 640px) {
  .profile-card { flex-direction: column; gap: 16px; }
  .profile-avatar { width: 64px; height: 64px; font-size: 22px; }
}
@media (max-width: 640px) {
  .pl-state { border-right: 0; padding-right: 0; }
  .files-upload, .files-wrap { padding-left: 16px; padding-right: 16px; }
  /* On a phone each file is a short card: its name, then kind, size and who, with Remove beside them. */
  .files-table thead { display: none; }
  .files-table, .files-table tbody { display: block; }
  .files-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .files-table td { display: block; padding: 0; border: 0; grid-column: 1; }
  .files-table td:first-child { font-weight: 600; }
  .files-table td:nth-child(n+2) { font-size: 13px; color: var(--ink-3); }
  .files-table .num { text-align: left; }
  .files-table td:last-child { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
}
/* A job's logistics (owner, 2026-10-20): the chain of steps with their counts, installed last, then the items. */
.logi .card-head .hint { flex-basis: 100%; }
.logi-body { padding: 0 20px 16px; }
.logi-chain { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.logi-step { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.logi-step.has-items { background: var(--ibs-indigo-soft); border-color: var(--ibs-indigo); }
.logi-step-label { font-size: 12.5px; color: var(--ink-3); overflow-wrap: break-word; }
.logi-step-n { font-size: 18px; font-weight: 650; color: var(--ink); }
.logi-installed { background: transparent; border-style: dashed; }
.logi-installed .logi-step-n { font-size: 15px; }
.logi-off { margin: 0 0 12px; color: var(--ink-3); font-size: 13px; }
.chip-step { background: var(--surface-2); border-color: var(--line-2); color: var(--ink-2); }
.chip-step.chip-site { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.chip-step.chip-hold { background: var(--act-bg); border-color: var(--act-line); color: var(--act); }
@media (max-width: 900px) { .logi-chain { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .logi-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logi-body { padding: 0 16px 16px; } }
/* The site engineer's daily report after marking the model: each element marked today, then manpower and notes (owner, 2026-10-21). */
.wiz { max-width: 560px; padding: 16px 18px 18px; }
.wiz-steps { display: flex; gap: 4px; margin: 0 0 14px; }
.wiz-steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.wiz-steps i.done { background: var(--ibs-indigo); }
.wiz-steps i.now { background: var(--ibs-indigo-line, #8b95d6); }
.wiz-kicker { margin: 0 0 2px; font-size: 12.5px; color: var(--ink-3); }
.wiz-title { margin: 0 0 4px; font-size: 19px; }
.wiz .hint { margin: 0 0 10px; }
.wiz .field { margin: 12px 0 0; }
.wiz .field-label { display: block; margin: 12px 0 6px; }
.wiz-marks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.wiz-marks li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.wiz-marks span { color: var(--ink-2); }
.wiz-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.wiz-seg-b { min-height: 46px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink-2); font: 600 14px var(--font); cursor: pointer; }
.wiz-seg-b.on { background: var(--ibs-indigo); border-color: var(--ibs-indigo); color: #fff; }
.wiz-trade { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.wiz-stepper { display: inline-flex; align-items: center; gap: 10px; }
.wiz-step-b { width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ibs-indigo); font-size: 20px; cursor: pointer; }
.wiz-step-n { min-width: 26px; text-align: center; font-size: 17px; }
.wiz-total { display: flex; justify-content: flex-end; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); font-weight: 700; }
.wiz-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 4px; }
.wiz-sum div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.wiz-sum b { display: block; font-size: 18px; }
.wiz-sum span { font-size: 12.5px; color: var(--ink-3); }
.wiz textarea.input { width: 100%; min-height: 92px; resize: vertical; }
.wiz-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin: 18px 0 0; }
.wiz-nav .btn { min-height: 48px; justify-content: center; }
.wiz .form-error { margin: 0 0 10px; }
@media (max-width: 520px) { .wiz { padding: 14px 16px 16px; } .wiz-filters { grid-template-columns: 1fr; } }
/* The PM's review (owner's approved sample, 2026-10-21): the summary first, then marks by work type and floor. */
.report-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.report-tile { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.report-tile b { font-size: 20px; color: var(--ink); }
.report-tile span { font-size: 12.5px; color: var(--ink-3); }
.mark-group { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.mark-group small { font-weight: 600; color: var(--ink-3); }
.mark-floor { margin: 8px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
/* Recorded reports and drafted marks say so (the owner's label sample, 2026-10-28) */
.chip-recorded { background: var(--surface); border-color: var(--ibs-indigo-line); color: var(--ibs-indigo); }
.mark-part { margin: 16px 0 4px; padding: 12px 14px 4px; border: 1px solid var(--ibs-indigo-line); border-radius: 8px; background: var(--surface-2); }
.mark-part-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin: 0; font-size: 15px; }
.mark-part-note { margin: 4px 0 6px; color: var(--ink-3); font-size: 13px; }
.mark-part .mark-group:first-of-type { border-top: 0; padding-top: 4px; }
.mark-follows { margin: 0; color: var(--ink-3); font-size: 13px; }
.mark-approve { display: inline-flex; margin: 0; }
.btn-approve { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.btn-approve:hover { background: var(--ok-line); }
.report-detail .chip-approved { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }

.edit-proposal-hint { margin: 16px 0 0; }

/* ---- one look: soft status labels (the owner, 2026-11-05) ------------------
   Chips lost their borders, so the chips that were only an outline get a soft fill and keep their shape. Two
   classes, so these also win over plans.css. */
.chip.chip-replaced, .chip.chip-moved-read, .chip.chip-notplan { background: var(--surface-2); color: var(--ink-3); }
.chip.chip-fresh, .chip.chip-moved, .chip.chip-recorded { background: var(--ibs-indigo-soft); color: var(--ibs-indigo); }
/* Fields are 36 px with 15-px text on a laptop; phones keep 44 px and 16-px text so they do not zoom on focus. */
@media (max-width: 640px) { .input { min-height: 44px; font-size: 16px; } }

/* ---- one look: motion (the owner, 2026-11-05, Smoother INOVUS picks 1, 3 and 12) ----------------------------
   The name menu grows out of its button; a button at work shows a spinner in place of its words (dashboard.js sets
   aria-busy when its form is sent); a count bumps when new work landed since the last page. Procurement's
   index.css matches. Keyframes move with `translate`, `scale` and `rotate`, so they never fight a transform. */
.user-menu-caret { transition: transform 150ms var(--ease-out); }
.user-menu[open] .user-menu-caret { transform: rotate(180deg); }
.user-menu[open] .user-menu-list { animation: menu-in 180ms var(--ease-out) both; transform-origin: top right; }
.btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.btn[aria-busy="true"]:disabled { opacity: 1; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: btn-spin 700ms linear infinite;
}
.btn-quiet[aria-busy="true"]::after, .btn-approve[aria-busy="true"]::after { border-color: rgba(54, 65, 145, 0.25); border-top-color: var(--ibs-indigo); }
.nav-badge.bump, .subnav-badge.bump { animation: bump 320ms var(--ease-out); }
@keyframes menu-in { from { opacity: 0; translate: 0 -4px; scale: 0.97; } }
/* Rare page actions under More (pick 11), a menu like the name menu; a question asked before a form is sent opens
   in a dialog over the dimmed page (pick 13, confirm.js); tier pills lose their border like the chips. */
.more-menu { position: relative; display: inline-block; }
.more-menu > summary { list-style: none; gap: 6px; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-caret { width: 16px; height: 16px; transition: transform 150ms var(--ease-out); }
.more-menu[open] .more-caret { transform: rotate(180deg); }
.more-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 200px; padding: 6px;
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-pop);
}
.more-menu[open] .more-list { animation: menu-in 180ms var(--ease-out) both; transform-origin: top right; }
.more-list form { margin: 0; }
.more-list a, .more-list button {
  display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none;
  color: var(--ink-strong); font: inherit; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
}
.more-list a:hover, .more-list button:hover { background: var(--ibs-indigo-soft); color: var(--ink-strong); }
.ask-dialog { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
.ask-dialog[open] { animation: ask-in 240ms var(--ease-out) both; }
.ask-dialog::backdrop { background: rgba(28, 32, 37, 0.4); animation: ask-dim 200ms ease-out both; }
.ask-text { margin: 0; font-size: 15px; color: var(--ink-strong); }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.ask-actions .btn { margin: 0; }
.tierpill, .tierpill.tier-act, .tierpill.tier-check { border-color: transparent; }
.tierpill:not(.tier-act):not(.tier-check) { background: var(--surface-2); }
@keyframes ask-in { from { opacity: 0; translate: 0 8px; scale: 0.98; } }
@keyframes ask-dim { from { opacity: 0; } }
@keyframes btn-spin { to { rotate: 360deg; } }
@keyframes bump { 40% { scale: 1.3; } }
@media (prefers-reduced-motion: reduce) {
  .user-menu-caret { transition: none; }
  .user-menu[open] .user-menu-list, .nav-badge.bump, .subnav-badge.bump, .more-menu[open] .more-list,
  .ask-dialog[open], .ask-dialog::backdrop { animation: none; }
  .more-caret { transition: none; }
  .btn[aria-busy="true"]::after { animation-duration: 1.6s; }
}

