/* GO Project Manager — Go Engineering brand ("navy is authority, green is momentum") */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(../fonts/poppins-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(../fonts/poppins-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(../fonts/poppins-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(../fonts/poppins-latin-700-normal.woff2) format("woff2"); }

:root {
  --navy: #25265E; --navy-700: #1d1e4b; --navy-900: #15163a;
  --charcoal: #2C3E50; --slate: #627182; --slate-200: #c4ccd5;
  --bg: #F0F4F8; --white: #ffffff; --line: #e2e8f0;
  --green-deep: #53A127; --green: #6DB82F; --green-hi: #98D846;
  --amber: #b7791f; --amber-bg: #fdf3e1; --red: #b42318; --red-bg: #fdecea;
  --green-bg: #eef7e6; --navy-bg: #e9eaf3;
  --radius: 8px; --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(21,22,58,.06), 0 1px 3px rgba(21,22,58,.08);
  --shadow-md: 0 8px 28px rgba(21,22,58,.18);
  --font-head: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Aptos", "Segoe UI", system-ui, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg-bg, var(--bg)); color: var(--fg-charcoal, var(--charcoal)); font: 15px/1.5 var(--font-body); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--fg-navy, var(--navy)); margin: 0; line-height: 1.2; }
h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.01em; font-weight: 600; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
a { color: var(--fg-navy, var(--navy)); }
a:hover { color: var(--fg-2f5a10, #2f5a10); }
.muted { color: var(--fg-slate, var(--slate)); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--bg-white, var(--white));
  border-bottom: 3px solid var(--green); position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.brand-app { font-family: var(--font-head); font-weight: 600; color: var(--fg-navy, var(--navy)); border-left: 1px solid var(--bd-line, var(--line)); padding-left: 12px; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius);
  text-decoration: none; color: var(--fg-charcoal, var(--charcoal)); font-family: var(--font-head); font-size: .9rem; font-weight: 500; }
.nav a:hover { background: var(--bg-bg, var(--bg)); color: var(--fg-navy, var(--navy)); }
.nav a.active { background: var(--navy); color: var(--white); }
.bottombar, .more-sheet { display: none; }   /* the phone's bar at the foot and its More sheet (Task 10): on a phone only, below */
.userbox { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.userbox .who { text-align: right; line-height: 1.25; }
.userbox .who b { display: block; color: var(--fg-navy, var(--navy)); font-family: var(--font-head); font-weight: 600; }

.main { max-width: 1560px; margin: 0 auto; padding: 28px 24px 64px; outline: 0; }
@media (min-width: 721px) { body:has(> #rob) .main { padding-right: max(24px, var(--rob-gutter, 24px)); } }

/* ---------- headings ---------- */
.eyebrow { font-family: var(--font-head); font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--fg-2f5a10, #2f5a10); margin: 0 0 6px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { padding-bottom: 8px; border-bottom: 3px solid var(--green); display: inline-block; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: var(--radius);
  padding: 8px 14px; font: 500 .9rem var(--font-head); cursor: pointer; text-decoration: none; transition: transform .08s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--green); color: var(--white); }   /* white words on the green: the MD's decision (24/11/2026, the brand guide), knowingly 2.5:1, the app's one exception to AA; white on the dark screen too */
.btn-primary:hover { background: var(--green-deep); color: var(--white); }   /* white on green-deep: the MD's decision (24/11/2026, the brand guide), knowingly 3.2:1 */
.btn-primary:disabled { background: var(--green); }   /* theme: keep - after :hover, the same weight: a disabled green button does not light up under the pointer */
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); color: var(--white); }
.btn-ghost { background: var(--bg-white, var(--white)); color: var(--fg-navy, var(--navy)); border-color: var(--bd-line, var(--line)); }
.btn-ghost:hover { border-color: var(--bd-navy, var(--navy)); color: var(--fg-navy, var(--navy)); }
.btn-sm { padding: 5px 10px; font-size: .8rem; min-height: 32px; min-width: 32px; justify-content: center; }   /* every small button a 32 x 32 target (R22: My Day's ‹ › were 26 x 30) */
.icon-btn { border: 0; background: transparent; color: var(--fg-slate, var(--slate)); cursor: pointer; padding: 5px; border-radius: 6px;
  display: inline-flex; align-items: center; font-size: 1.3rem; line-height: 1; min-width: 32px; min-height: 32px; justify-content: center; }
.icon-btn:hover { background: var(--bg-bg, var(--bg)); color: var(--fg-navy, var(--navy)); }
.icon-btn.danger:hover { color: var(--fg-red, var(--red)); background: var(--bg-red-bg, var(--red-bg)); }
.row-actions { display: inline-flex; gap: 2px; justify-content: flex-end; }

/* help behind "?" and one menu per row (the UI review, 22 Nov 2026) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.help summary { list-style: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--fg-slate, var(--slate)); }
.help summary::-webkit-details-marker { display: none; }
.help summary:hover, .help[open] summary { color: var(--fg-navy, var(--navy)); background: var(--bg-bg, var(--bg)); }
.help[open] { flex-basis: 100%; order: 1; }          /* opened, it takes a line of its own below the head */
.section-head > .help { margin-right: auto; }         /* the "?" sits beside what it explains; what follows keeps to the right */
.section-head > .grow { flex: 1 1 0; min-width: 0; }  /* a long line of text that keeps its "?" beside it (the availability review's title) */
.help-body { font-size: .85rem; color: var(--fg-slate, var(--slate)); background: var(--bg-white, var(--white)); border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius); padding: 10px 14px; margin-top: 6px; max-width: 72ch; }   /* a panel like a card, on the bare page and in a dialog (R8) */
.rowmenu { display: inline-flex; }
.menu { position: fixed; z-index: 30; min-width: 190px; display: grid; padding: 4px; background: var(--bg-white, var(--white)); border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.menu[hidden] { display: none; }
.menu.capped { overflow-y: auto; overscroll-behavior: contain; }   /* no room for all of it above or below its row (a phone on its side): its height is capped to the room and it scrolls inside (R20) */
.menu button { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border: 0; background: transparent; font: inherit; text-align: left; color: var(--fg-charcoal, var(--charcoal)); border-radius: 6px; cursor: pointer; }
.menu button:hover { background: var(--bg-bg, var(--bg)); }
.menu button.danger { color: var(--fg-red, var(--red)); }

/* ---------- cards & stats ---------- */
.card { background: var(--bg-white, var(--white)); border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .task-cards > .card + .card, .person-cards > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.grid > * { min-width: 0; }
.statband { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--bg-white, var(--white)); border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius-lg); padding: 14px 18px; box-shadow: var(--shadow-sm); }
.stat .v { font: 600 1.7rem/1.1 var(--font-head); color: var(--fg-navy, var(--navy)); font-variant-numeric: tabular-nums; }
.stat .v small { font-size: .9rem; color: var(--fg-slate, var(--slate)); font-weight: 500; }
.stat .l { font-size: .8rem; color: var(--fg-slate, var(--slate)); margin-top: 4px; }
.stat.bad .v { color: var(--fg-red, var(--red)); }
.stat.feature { border-left: 4px solid var(--green); }

.facts { background: var(--navy-900); color: var(--bg); border-radius: var(--radius-lg); padding: 18px 22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 24px; margin-bottom: 18px; }
.facts dt { font: 700 .68rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--green-hi); }
.facts dd { margin: 2px 0 0; color: var(--white); }
.facts .muted { color: #c4ccd5; }   /* theme: keep - the panel is navy in both themes: slate-200 on navy-900 is 10.7:1 (slate was 3.5:1) */
.facts a { color: var(--white); }   /* theme: keep - a link on the navy panel (the pipeline lead, a task's From): white is 17.4:1 (navy was 1.26:1); its underline marks it */
.facts a:hover { color: var(--green-hi); }   /* theme: keep - 10.1:1 on navy-900 (#2f5a10 was 2.1:1) */
.facts .wide { grid-column: 1 / -1; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font: 600 .74rem var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-slate, var(--slate));
  padding: 10px 12px; border-bottom: 2px solid var(--bd-line, var(--line)); background: var(--bg-f8fafc, #f8fafc); white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--bd-line, var(--line)); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--bg-fafbfd, #fafbfd); }
.tbl tr.clickable { cursor: pointer; }
.tbl tfoot td { font-weight: 600; color: var(--fg-navy, var(--navy)); border-top: 2px solid var(--bd-line, var(--line)); background: var(--bg-f8fafc, #f8fafc); }
.empty { padding: 28px; text-align: center; color: var(--fg-slate, var(--slate)); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.section-head .filters { margin: 0; }
.filters button[aria-pressed="true"], .filters a[aria-current] { background: var(--bg-navy-bg, var(--navy-bg)); border-color: var(--bd-navy-bg, var(--navy-bg)); color: var(--fg-navy, var(--navy)); }
.filters button .n { margin-left: 6px; font-weight: 400; opacity: .7; }

/* WBS tree */
.wbs td.name { min-width: 260px; }
.wbs td, .wbs th { padding-left: 8px; padding-right: 8px; }
.wbs .row-actions .icon-btn { padding: 4px; }
.footnote { font-size: .78rem; color: var(--fg-slate, var(--slate)); padding: 10px 14px; margin: 0; border-top: 1px solid var(--bd-line, var(--line)); }
.wbs tr.node td { background: var(--bg-f8fafc, #f8fafc); }
.wbs tr.node.depth-0 td { background: var(--bg-navy-bg, var(--navy-bg)); }
.wbs tr.node .code { font: 600 .82rem var(--font-head); color: var(--fg-navy, var(--navy)); margin-right: 8px; }
.wbs tr.node .title { font-family: var(--font-head); font-weight: 600; color: var(--fg-navy, var(--navy)); }
.wbs tr.task td.name .title { font-weight: 500; }
.wbs .desc { display: block; font-size: .8rem; color: var(--fg-slate, var(--slate)); }
.wbs tr.node.depth-0 .desc, .wbs tr.node.depth-0 .muted, .wbs tr.node.depth-0 .pct { color: var(--fg-charcoal, var(--charcoal)); }   /* on the lavender top rows: 9.2:1 (slate was 4.2:1) */
.indent { display: inline-block; }
.lvl-1 { padding-left: 22px; } .lvl-2 { padding-left: 44px; } .lvl-3 { padding-left: 66px; }
.lvl-4 { padding-left: 88px; } .lvl-5 { padding-left: 110px; } .lvl-6 { padding-left: 132px; }
.task-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: middle; }

/* ---------- pills, chips, bars ---------- */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 500 .74rem var(--font-head); white-space: nowrap; background: var(--bg-bg, var(--bg)); color: var(--fg-slate, var(--slate)); }
.pill.s-in-progress, .pill.s-active { background: var(--bg-navy-bg, var(--navy-bg)); color: var(--fg-navy, var(--navy)); }
.pill.s-complete { background: var(--bg-green-bg, var(--green-bg)); color: var(--fg-2f5a10, #2f5a10); }
.pill.s-on-hold { background: var(--bg-amber-bg, var(--amber-bg)); color: var(--fg-7a5200, #7a5200); }
.pill.s-planning { background: var(--bg-bg, var(--bg)); color: var(--fg-charcoal, var(--charcoal)); }
.pill.s-cancelled { background: var(--bg-red-bg, var(--red-bg)); color: var(--fg-red, var(--red)); }
.pill.overdue { background: var(--bg-red-bg, var(--red-bg)); color: var(--fg-red, var(--red)); }
.pill.nonbill { background: var(--bg-eceef7, #eceef7); color: var(--fg-navy, var(--navy, var(--fg-25265e, #25265E))); }
.chip { display: inline-block; color: var(--fg-charcoal, var(--charcoal)); padding: 1px 8px; margin: 1px 4px 1px 0; border: 1px solid var(--bd-line, var(--line)); border-radius: 999px; font-size: .78rem; background: var(--bg-white, var(--white)); white-space: nowrap; }
.chip.me { border-color: var(--green); background: var(--bg-green-bg, var(--green-bg)); }
.bar { position: relative; height: 8px; border-radius: 999px; background: var(--bg-line, var(--line)); overflow: hidden; min-width: 70px; }
.bar > span { position: absolute; inset: 0 auto 0 0; background: var(--green); border-radius: 999px; }
.bar.over > span { background: var(--red); }
.bar.navy > span { background: var(--navy); }
[data-teams-theme="dark"] .bar.navy > span { background: #9098db; }   /* theme: keep - the light navy the dark screen gives navy lines: 4.6:1 on the dark track (navy was 1.10:1 there) */
/* the billing card from Go Time: billable, then non-billable; the bare track is not logged. Three steps of lightness, each at least 3:1
   against the track and against the part beside it on both screens (tests/test_bar_contrast.py works them out from this sheet). The track
   is the card's own colour with a slate edge. Light: navy 13.8:1 on the track, green-deep 3.2:1 on it, navy 4.3:1 beside green-deep. Dark,
   the other way up: white 14.4:1 on the track, green-deep 4.4:1 on it, white 3.2:1 beside green-deep. (green on the line-grey track was 1.99:1) */
.bar.parts { background: var(--bg-white, var(--white)); border: 1px solid var(--slate); }
[data-teams-theme="dark"] .bar.parts { border-color: #a6b7c9; }   /* theme: keep - the dark screen's slate: 7.0:1 on the dark card (slate is 2.9:1 there) */
.bar.parts > span { border-radius: 0; }
.bar.parts > .part-bill { background: var(--navy); }
[data-teams-theme="dark"] .bar.parts > .part-bill { background: var(--white); }   /* theme: keep - billable is the lightest step on the dark screen: white, 3.2:1 beside green-deep and 14.4:1 on the track (navy was 1.10:1) */
.bar.parts > .part-non { background: var(--green-deep); }
.barcell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.barcell .bar { flex: 1; }
.barcell .pct { font-size: .78rem; color: var(--fg-slate, var(--slate)); width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.var-over { color: var(--fg-red, var(--red)); font-weight: 600; }
.var-under { color: var(--fg-2f5a10, #2f5a10); }

/* tabs: links in the address (#/projects/<code>?tab=schedule), the current one underlined in green */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--bd-line, var(--line)); margin: 6px 0 16px; flex-wrap: wrap; }
.tabs button, .tabs a, .tabs-row > button { border: 0; background: transparent; padding: 10px 16px; font: 500 .9rem var(--font-head); color: var(--fg-slate, var(--slate));
  cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.tabs button.active, .tabs a[aria-current="page"] { color: var(--fg-navy, var(--navy)); border-bottom-color: var(--green); }
.tabs a:hover { color: var(--fg-navy, var(--navy)); }
/* the Calendar's Month/Week and its Event…, Leave… and Day in lieu… buttons share one line */
.tabs-row { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; border-bottom: 2px solid var(--bd-line, var(--line)); margin: 6px 0 16px; }
.tabs-row > .tabs { border-bottom: 0; margin: 0; }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }

/* my tasks */
.task-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.task-card { display: flex; flex-direction: column; gap: 10px; }
.task-card.featured { border-left: 4px solid var(--green); }
.task-card .meta { font-size: .82rem; color: var(--fg-slate, var(--slate)); }
.task-card .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; background: var(--bg-bg, var(--bg)); border-radius: var(--radius); padding: 8px; }
.task-card .nums b { display: block; font: 600 1.05rem var(--font-head); color: var(--fg-navy, var(--navy)); }
.task-card .nums span { font-size: .72rem; color: var(--fg-slate, var(--slate)); }
.task-card .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; flex-wrap: wrap; }
/* log time on the card: hours, what was done, Log (Enter) */
.quicklog { display: grid; grid-template-columns: 88px 1fr auto; gap: 8px; align-items: center; }
.quicklog input, .quicklog .btn { min-height: 40px; }
.quicklog .form-error { grid-column: 1 / -1; margin: 0; }

/* sign in */
.signin { max-width: 560px; margin: 40px auto; }
.signin .notice { background: var(--bg-amber-bg, var(--amber-bg)); color: var(--fg-7a5200, #7a5200); border-radius: var(--radius); padding: 10px 14px; font-size: .85rem; margin: 14px 0; }
.user-list { display: grid; gap: 8px; margin-top: 14px; }
.user-pick { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 16px;
  border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius); background: var(--bg-white, var(--white)); cursor: pointer; font: inherit; }
.user-pick:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.user-pick b { color: var(--fg-navy, var(--navy)); font-family: var(--font-head); font-weight: 600; }

/* ---------- forms & modal ---------- */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font: 500 .8rem var(--font-head); color: var(--fg-navy, var(--navy)); }
.field .hint { font-size: .75rem; color: var(--fg-slate, var(--slate)); }
input, select, textarea { font: inherit; color: var(--fg-charcoal, var(--charcoal)); padding: 8px 10px; border: 1px solid var(--slate); border-radius: var(--radius); background: var(--bg-white, var(--white)); width: 100%; }   /* the edge of a field is slate: 5.0:1 (slate-200 was 1.6:1) */
:focus-visible { outline: 2px solid var(--bd-navy, var(--navy)); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }
.facts :focus-visible { outline-color: var(--green-hi); } /* theme: keep - the panel stays navy in both themes, so the ring stays bright */
input[type="checkbox"] { width: auto; padding: 0; accent-color: var(--green-deep); }
textarea { min-height: 76px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { color: var(--fg-red, var(--red)); background: var(--bg-red-bg, var(--red-bg)); margin: 0 22px 12px; padding: 8px 12px; border-radius: var(--radius); font-size: .88rem; }
.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(680px, calc(100vw - 32px)); box-shadow: var(--shadow-md); color: var(--fg-charcoal, var(--charcoal)); }
.modal::backdrop { background: rgba(21,22,58,.55); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 3px solid var(--green); }
.modal-body { padding: 18px 22px; max-height: 68vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--bd-line, var(--line)); background: var(--bg-f8fafc, #f8fafc); }
.assign-row { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.team-row { border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 8px; background: var(--bg-f8fafc, #f8fafc); }
.team-row .assign-row { grid-template-columns: 1fr 220px 36px; margin-bottom: 4px; }
.criteria { padding-left: 4px; }
.criteria-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.criteria-row input[type="date"] { width: 150px; } .criteria-row input[type="number"] { width: 80px; } .criteria-row input:not([type]) { width: 160px; }
.pdf-preview { height: 56vh; overflow: auto; background: var(--bg-f3f4f6, #f3f4f6); border-radius: var(--radius); margin-bottom: 10px; }
.statement { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; }
.statement input { width: auto; margin-top: 3px; }
.check, .field label.check { display: flex; gap: 8px; align-items: flex-start; white-space: normal; font-weight: 400; }
.check input { flex: none; margin-top: 3px; }
h3.small { font-size: .9rem; margin: 6px 0 4px; }
.steps { list-style: none; padding: 10px 14px; margin: 0 0 12px; background: var(--bg-white, var(--white)); border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius); font-size: .88rem; }
.steps li.ok { color: var(--fg-2f5a10, #2f5a10); } .steps li.warn { color: var(--fg-7a5200, #7a5200); } .steps li.bad { color: var(--fg-red, var(--red)); }
.grid-week td.cell { min-width: 84px; vertical-align: top; font-size: .8rem; }
.grid-week td.cell.planned { background: var(--bg-green-bg, var(--green-bg)); } .grid-week td.cell.off { background: var(--bg-bg, var(--bg)); color: var(--fg-slate, var(--slate)); }
.roster-note { color: var(--fg-7a5200, #7a5200); }
.pin { display: inline-flex; vertical-align: -2px; } .pin .i { width: 14px; height: 14px; }   /* the pin (Lucide) by a date set by hand; its words are its aria-label */
.chk { display: block; padding: .15rem 0; }
.pill.c-green { background: var(--bg-green-bg, var(--green-bg)); color: var(--fg-2f5a10, #2f5a10); } .pill.c-amber { background: var(--bg-amber-bg, var(--amber-bg)); color: var(--fg-7a5200, #7a5200); }
.pill.c-navy { background: var(--bg-navy-bg, var(--navy-bg)); color: var(--fg-navy, var(--navy)); } .pill.c-grey { background: var(--bg-bg, var(--bg)); color: var(--fg-slate, var(--slate)); }
.checklist { list-style: none; padding: 0; margin: 0 0 .6rem; } .checklist li { padding: .15rem 0; } .checklist li.ok { color: var(--fg-2f5a10, #2f5a10); } .checklist li.todo { color: var(--fg-slate, var(--slate)); }
tr.row-link { cursor: pointer; }
.avail-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.avail-card { display: flex; flex-direction: column; gap: .45rem; }
.avail-head { display: flex; align-items: center; gap: .7rem; }
.avail-head h3 { margin: 0; font-size: 1rem; }
.avatar { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--bg-navy-bg, var(--navy-bg)); color: var(--fg-navy, var(--navy)); display: grid; place-items: center; font: 600 1.05rem var(--font-head); overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.avatar img.loaded { display: block; }
.avail-pct { display: flex; align-items: baseline; gap: .4rem; } .avail-pct b { font: 600 1.9rem var(--font-head); color: var(--green-deep); } .avail-pct span { color: var(--fg-slate, var(--slate)); font-size: .85rem; }
/* the percentage is a button: a click shows how it is worked out (the MD, 24/11/2026). It looks as it did; "billed" is underlined to say so */
button.avail-pct { display: inline-flex; align-self: flex-start; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: var(--radius); }
button.avail-pct span { text-decoration: underline dotted; text-underline-offset: 3px; }
button.avail-pct:hover span, button.avail-pct:focus-visible span { text-decoration-style: solid; }
.how-days { margin: .8rem 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.avail-card .bar { width: 100%; }
/* one Team page (the UI review, 22 Nov 2026): a card per person; one column on a phone (min() keeps a card inside a narrow page) */
.person-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: .8rem; }
.person-card { display: flex; flex-direction: column; gap: .45rem; }
.person-card .who { min-width: 0; }
.person-card .email { overflow-wrap: anywhere; }
.person-card .bar { width: 100%; }
.person-billing, .person-line { display: flex; flex-direction: column; gap: .4rem; }
.person-line { border-top: 1px solid var(--bd-line, var(--line)); padding-top: .6rem; margin-top: .15rem; }
.person-line .foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.person-line .foot a, .person-line .foot .btn, .filters a { min-height: 32px; display: inline-flex; align-items: center; }   /* 32 px targets */
.team-people { margin-top: 18px; }
.team-head { margin-bottom: 8px; justify-content: flex-start; }   /* the caption stays by the heading when its "?" opens onto a line of its own */
.team-head h2 { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-slate, var(--slate)); }   /* the people's own heading (R19), quiet: the h1 and the filter above already say whose */
.team-cap { margin: 0; padding-left: 12px; border-left: 1px solid var(--bd-line, var(--line)); font-size: .85rem; color: var(--fg-slate, var(--slate)); }   /* the billing's title, a caption beside its "?" (R19) */
.icon-link { display: inline-flex; align-items: center; gap: 6px; }   /* an icon and its words: the gap is the link's, not an underlined space (R19) */
.footnote.team-foot { border-top: 0; padding: 14px 0 6px; }
.alloc-summary { font-size: .85rem; margin-top: 6px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy-900); color: var(--white);
  padding: 10px 18px; border-radius: var(--radius); box-shadow: var(--shadow-md); z-index: 50; font-size: .9rem; border-left: 4px solid var(--green); }
.toast.error { border-left-color: var(--red); }

@media (max-width: 720px) {
  .topbar { padding: 10px 16px; gap: 10px; position: static; }
  .brand-app { display: none; }
  .userbox { margin-left: auto; }
  /* the top menu gives way to the bar at the foot: the core four and More (Task 10); Rob stands at its right end */
  #nav { display: none; }
  .bottombar:not([hidden]) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: 2px; padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px)); background: var(--bg-white, var(--white)); border-top: 1px solid var(--bd-line, var(--line)); box-shadow: var(--shadow-sm); }
  .bottombar a, .bottombar button { flex: 1; min-height: 44px; display: grid; justify-items: center; align-content: center; gap: 2px; border: 0; border-radius: var(--radius); background: transparent; color: var(--fg-charcoal, var(--charcoal)); font: 500 .72rem var(--font-head); text-decoration: none; cursor: pointer; }
  .bottombar [aria-current="page"], .bottombar .active { color: var(--fg-navy, var(--navy)); background: var(--bg-navy-bg, var(--navy-bg)); }
  .more-sheet:not([hidden]) { display: grid; position: fixed; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 41; min-width: 200px; padding: 6px; background: var(--bg-white, var(--white)); border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
  .more-sheet a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; color: var(--fg-charcoal, var(--charcoal)); text-decoration: none; border-radius: var(--radius); }
  /* only while the bar shows (R20): before sign-in and on a new starter's Welcome it is in the page but hidden, and those keep no 64 px foot */
  body:has(> .bottombar:not([hidden])) { --rob-w: 44px; --rob-h: 55px; }
  body:has(> .bottombar:not([hidden])), body:has(> .bottombar:not([hidden])):has(> #rob) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }   /* the second outranks rob.css's body:has(> #rob) */
  body:has(> #rob) .bottombar { padding-right: var(--rob-gutter); }
  body:has(> .bottombar:not([hidden])) .rob { right: 8px; bottom: calc(4px + env(safe-area-inset-bottom, 0px)); }
  /* a control reached with Tab is scrolled clear of the bar, never left behind it (R20; WCAG 2.2 2.4.11): the bar lies over the window's foot,
     and the browser scrolls a focused control into view only when it is outside the window */
  html { scroll-padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .brand-logo { height: 36px; }
  .main { padding: 18px 16px 48px; }
  .form-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .task-cards { grid-template-columns: 1fr; }
  .quicklog input, .quicklog .btn { min-height: 44px; }
  .task-card .foot .btn { min-height: 44px; }   /* Done / Reopen and Log time…: a card's main phone actions */
  button.avail-pct { min-height: 44px; }        /* the billed percentage: a full-size target on a phone */
}
@media print {
  .topbar, .actions, .row-actions, .tabs, .tabs-row, .bottombar, .more-sheet { display: none !important; }   /* A4 at Chrome's margins is phone-wide: the bar would print at every page's foot (R20) */
  body { background: var(--bg-white, var(--white)); }
}

/* ---- the Manager tab's Roster and Timesheets (as Contracting Management draws them) ---- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.monthnav { display: inline-flex; align-items: center; gap: 4px; }
.monthnav .label { min-width: 150px; text-align: center; font-weight: 600; color: var(--fg-navy, var(--navy)); }
.monthnav .btn { min-width: 32px; min-height: 32px; justify-content: center; }   /* < > and Today / This week: 32 px targets */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--bd-line, var(--line)); border-left: 1px solid var(--bd-line, var(--line)); border-radius: 12px; overflow: hidden; background: var(--bg-white, var(--white)); }
.cal-dow { padding: 8px 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-slate, var(--slate)); background: var(--bg-bg, var(--bg)); border-right: 1px solid var(--bd-line, var(--line)); border-bottom: 1px solid var(--bd-line, var(--line)); }
.cal-cell { min-height: 92px; border: 0; border-right: 1px solid var(--bd-line, var(--line)); border-bottom: 1px solid var(--bd-line, var(--line)); padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; background: var(--bg-white, var(--white)); text-align: left; font: inherit; color: inherit; }
.cal-cell:hover, .cal-cell:focus-visible { background: var(--bg-navy-bg, var(--navy-bg)); }
.cal-cell.dim { background: var(--bg-bg, var(--bg)); color: var(--fg-slate, var(--slate)); }
.cal-cell.weekend .cal-daynum { color: var(--fg-2f5a10, #2f5a10); }
.cal-cell.today .cal-daynum { background: var(--navy); color: #fff; }
.cal-cell.locked { background: repeating-linear-gradient(135deg, var(--bg-white, var(--white)), var(--bg-white, var(--white)) 8px, var(--bg-f4f5fa, #f4f5fa) 8px, var(--bg-f4f5fa, #f4f5fa) 16px); }
.cal-top { display: flex; align-items: center; }
.cal-daynum { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.cal-lock { margin-left: auto; display: inline-flex; } .cal-lock .i { width: 13px; height: 13px; }   /* the lock (Lucide) on a locked day, at full strength */
.icon-line { display: flex; align-items: center; gap: 8px; }   /* a sentence led by its icon */
.rchip { border-radius: 8px; padding: 4px 6px; font-size: .78rem; font-weight: 700; line-height: 1.2; border-left: 3px solid transparent; }
.rchip small { display: block; font-weight: 500; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rchip.shift { background: var(--bg-e9f6dd, #e9f6dd); color: var(--fg-2f5a10, #2f5a10); border-left-color: #69b231; }
.rchip.leave { background: var(--bg-fff4d6, #fff4d6); color: var(--fg-7a5200, #7a5200); border-left-color: var(--bd-ffc000, #ffc000); }
.rchip.other { background: var(--bg-navy-bg, var(--navy-bg)); color: var(--fg-navy, var(--navy)); border-left-color: var(--bd-navy, var(--navy)); }
.rchip.review { background: var(--bg-ffe8d6, #ffe8d6); color: var(--fg-9a3412, #9a3412); border-left-color: #ff6600; }
.rchip.rejected { background: var(--bg-red-bg, var(--red-bg)); color: var(--fg-red, var(--red)); border-left-color: var(--red); text-decoration: line-through; }
.rchip.off { background: transparent; color: var(--fg-slate, var(--slate)); border-left-color: transparent; font-weight: 500; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--fg-slate, var(--slate)); margin-top: 10px; align-items: center; }
.legend .rchip { display: inline-block; padding: 2px 8px; }
.ts { width: 100%; border-collapse: collapse; background: var(--bg-white, var(--white)); }
.ts th, .ts td { padding: 8px 8px; border-bottom: 1px solid var(--bd-line, var(--line)); text-align: left; vertical-align: middle; font-size: .9rem; }
.ts th { background: var(--navy); color: #fff; font-weight: 500; font-size: .78rem; white-space: nowrap; }
.ts tr.weekend td { background: var(--bg-fafbff, #fafbff); }
.ts tr.off td { color: var(--fg-slate, var(--slate)); }
.ts tr.leave td { background: var(--bg-fffaf0, #fffaf0); }
.ts tr.lock td { background: var(--bg-f6f7fb, #f6f7fb); } .ts tr.lock input { background: transparent; border-color: var(--bd-line, var(--line)); }   /* a signed day's boxes: the quiet line, not a live box's slate edge, so they read as locked (light and dark: it outweighs both edges) */
.ts input[type=time] { font: inherit; padding: 5px 6px; border: 1px solid var(--slate); border-radius: 8px; background: var(--bg-white, var(--white)); width: 128px; }
.ts input[type=text] { font: inherit; padding: 5px 8px; border: 1px solid var(--slate); border-radius: 8px; background: var(--bg-white, var(--white)); width: 100%; min-width: 120px; }
.ts .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts .ot { color: var(--fg-9a3412, #9a3412); font-weight: 700; }
.ts .day { white-space: nowrap; font-weight: 600; }
.ts .day small { display: block; font-weight: 500; color: var(--fg-slate, var(--slate)); }
.tcard { border-left: 4px solid var(--bd-line, var(--line)); }
.tcard.out { border-left-color: #ff6600; } .tcard.signed { border-left-color: var(--green); }
.tcard .row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 600px) { .cal-cell { min-height: 64px; padding: 4px; } .rchip small { display: none; } .rchip { font-size: .72rem; padding: 3px 4px; } .monthnav .label { min-width: 110px; } }
@media (max-width: 760px) { .ts thead { display: none; } .ts tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; padding: 8px; border-bottom: 1px solid var(--bd-line, var(--line)); } .ts td { border: 0; padding: 2px 0; } .ts td.day { grid-column: 1 / -1; } }

/* ---- the team availability review ---- */
.review-person h3 { margin: 14px 0 8px; }
.review-days { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.review-day { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--bd-line, var(--line)); background: var(--bg-white, var(--white)); }
.review-day.flagged { border-left: 4px solid var(--amber); background: var(--bg-amber-bg, var(--amber-bg)); }
.review-day.claimed { border-left: 4px solid var(--green); background: var(--bg-green-bg, var(--green-bg)); }
.warn-text { color: var(--fg-7a5200, #7a5200); font-weight: 600; }

/* ---- My Day ---- */
.day-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.day-head input[type=date] { padding: 6px 8px; border: 1px solid var(--slate); border-radius: var(--radius); font: inherit; background: var(--bg-white, var(--white)); width: auto; }   /* its own width: at 100% it pushed the arrows onto lines of their own */
.team-strip { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.team-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.team-card:hover { border-color: var(--green); }
.team-card.active { border-color: var(--green); background: var(--bg-green-bg, var(--green-bg)); }
.team-card .av { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font: 600 .85rem var(--font-head); flex: none; }
.team-card .nums { font-size: .8rem; color: var(--fg-slate, var(--slate)); }
.team-card .nums b { color: var(--fg-navy, var(--navy)); }
.team-card .nums .warn, .team-card .nums .warn b { color: var(--fg-red, var(--red)); }
.task-card.done { border-left: 4px solid var(--green-deep); }   /* no dimming: the words stay at full strength (they were 3.4:1) */
.task-card.overdue { border-left: 4px solid var(--red); }
.task-card .today-h { color: var(--fg-2f5a10, #2f5a10); font-weight: 600; }
.viewing { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius); background: var(--bg-navy-bg, var(--navy-bg)); margin-bottom: 14px; }
.viewing svg { flex: none; }
.day-h { margin: 18px 0 8px; }

/* ---- the prompt beneath the scope ---- */
details.prompt { margin-top: 6px; }
details.prompt summary { cursor: pointer; }
details.prompt p { white-space: pre-wrap; margin: 6px 0 0; }

/* ---- a task's name opens its popup ---- */
.linklike { border: 0; background: transparent; padding: 0; font: inherit; color: var(--fg-navy, var(--navy)); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; cursor: pointer; text-align: left; }
.linklike:hover { text-decoration-color: var(--green); color: var(--fg-2f5a10, #2f5a10); }
.task-card h3 .linklike { font: inherit; }
.task-facts { margin-bottom: 12px; }
.task-facts .prewrap { white-space: pre-wrap; }

/* ---- the Task report tab: a project's month, and the signature pad ---- */
.report-card + .report-card { margin-top: 14px; }
.report-card > .section-head { align-items: flex-start; }
.report-card .nums { display: flex; gap: 14px; text-align: center; }
.report-card .nums b { display: block; font: 600 1.05rem var(--font-head); color: var(--fg-navy, var(--navy)); }
.report-card .nums span { font-size: .75rem; color: var(--fg-slate, var(--slate)); }
.report-card .foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 10px; }
.sig label { display: block; font-weight: 600; margin-bottom: 6px; }
#sig-pad { display: block; width: 100%; max-width: 520px; height: 160px; border: 1px dashed var(--slate); border-radius: var(--radius); background: var(--white); touch-action: none; cursor: crosshair; }   /* theme: keep - the pad stays white paper on the dark screen too: the signature is drawn in navy (app.js) */
.sig .row-actions { margin-top: 8px; align-items: center; gap: 10px; }
tr.sub > td { background: var(--bg-bg, var(--bg)); padding: 6px 12px; }
details.lines summary { cursor: pointer; }
details.lines table { margin-top: 8px; }

/* a training shift on the roster (21 Oct 2026) */
.rchip.training { background: var(--bg-e8eefb, #e8eefb); color: var(--fg-1e3a8a, #1e3a8a); border-left-color: #3b82f6; }

/* ---- the Calendar (9 Nov 2026): a month grid of task chips, a week table ---- */
.tcal .cal-cell { cursor: default; min-height: 104px; }
.tcal .cal-cell:hover { background: var(--bg-white, var(--white)); }
.tcal .cal-cell.dim, .tcal .cal-cell.dim:hover { background: var(--bg-bg, var(--bg)); }
.tcal .cal-cell.holiday { background: var(--bg-fffaf0, #fffaf0); }
.tcal .cal-daynum { border: 0; background: transparent; cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: .8rem; color: inherit; }
.tcal .cal-daynum:hover, .tcal .cal-daynum:focus-visible { background: var(--bg-navy-bg, var(--navy-bg)); }
.tcal .cal-cell.today .cal-daynum { background: var(--navy); color: #fff; }
.cal-hours { margin-left: auto; font-size: .72rem; color: var(--fg-slate, var(--slate)); white-space: nowrap; }
.cal-hours b { color: var(--fg-2f5a10, #2f5a10); }
.cal-holiday { font-size: .7rem; color: var(--fg-7a5200, #7a5200); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tchip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--bd-navy, var(--navy)); border-radius: 4px; padding: 3px 6px; font-family: inherit; font-size: .74rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--bg-navy-bg, var(--navy-bg)); color: var(--fg-navy, var(--navy)); }
.tchip small { display: block; font-weight: 500; }   /* not dimmed: at .85 it was 3.4:1 on a done chip */
.tchip.logged { background: var(--bg-e9f6dd, #e9f6dd); color: var(--fg-2f5a10, #2f5a10); border-left-color: #69b231; }
.tchip.due { background: var(--bg-red-bg, var(--red-bg)); color: var(--fg-red, var(--red)); border-left-color: var(--red); }
.tchip.done { background: var(--bg-bg, var(--bg)); color: var(--fg-slate, var(--slate)); border-left-color: var(--bd-c4ccd5, #c4ccd5); text-decoration: line-through; }
.tchip.nonbill { border-left-style: dashed; }
.tchip:hover { filter: brightness(.95); }
.legend .tchip { display: inline-block; width: auto; padding: 2px 8px; cursor: default; }
.tcal-more { font-size: .72rem; }
.wk td.wk-cell { vertical-align: top; min-width: 84px; }
.wk td.wk-cell.win { background: var(--bg-f6f7fb, #f6f7fb); }
.wk td.wk-cell.hol { background: var(--bg-fffaf0, #fffaf0); }
.wk td.wk-cell .tchip { display: inline-block; width: auto; margin: 1px 2px 1px 0; }
.wk th small { display: block; font-weight: 500; }
.wk th.today { text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 4px; }
.wk tr.done .linklike { text-decoration: line-through; }   /* a finished task: struck through, not dimmed below 4.5:1 */
/* ---- My Day's Week (the UI review, 22 Nov 2026): a week of hours at once. The grid scrolls inside its card (.table-wrap), never the page;
   the task column stays put on the page background while the days scroll under it. ---- */
.wkgrid tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--bg-bg, var(--bg)); min-width: 150px; max-width: 240px; white-space: normal; }
.wkgrid tbody th { font: 400 .85rem var(--font-body); letter-spacing: 0; text-transform: none; color: var(--fg-slate, var(--slate)); border-bottom: 1px solid var(--bd-line, var(--line)); vertical-align: top; }
.wkgrid tbody th b { display: block; font: 600 .9rem var(--font-head); color: var(--fg-navy, var(--navy)); }
.wkgrid td.wk-day { width: 64px; min-width: 64px; padding: 6px 4px; vertical-align: top; }
.wkgrid th.wk-dh { padding: 10px 4px; text-align: center; white-space: normal; }   /* the weekday over its date: the column stays 64 px */
.wk-date { display: block; }
.wkgrid td.wk-day.hol { background: var(--bg-fffaf0, #fffaf0); }
.wkgrid td.wk-comment { padding: 6px 8px; vertical-align: top; }
.wkgrid input { min-height: 40px; }
.wkgrid td.wk-day input { width: 56px; padding: 6px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }   /* typed hours bold, the plan figure regular */
.wkgrid td.wk-comment input { min-width: 200px; }
.wkgrid input:disabled { background: var(--bg-bg, var(--bg)); color: var(--fg-slate, var(--slate)); cursor: not-allowed; }
.wkgrid input[aria-invalid="true"] { border-color: var(--red); }
.wk-logged { display: block; font-size: .72rem; color: var(--fg-slate, var(--slate)); }
.wkgrid td.wk-day input::placeholder { color: var(--fg-slate, var(--slate)); opacity: 1; font-weight: 400; }   /* the plan figure: information, not a faint hint (4.8:1) */
.wkgrid .wk-total, .wkgrid .wk-week { white-space: nowrap; font-variant-numeric: tabular-nums; }
.wk-total.over { color: var(--fg-red, var(--red)); font-weight: 600; }
.wk-errors { margin: 0 0 12px; padding: 8px 12px 8px 30px; border-radius: var(--radius); background: var(--bg-red-bg, var(--red-bg)); color: var(--fg-red, var(--red)); font-size: .88rem; }
.wkgrid .form-error { margin: 0 0 12px; }
.wk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.wk-foot p { margin: 0; flex: 1 1 280px; }
@media (max-width: 720px) {   /* after the rules above: the same weight, so the later wins */
  .wkgrid input, .wk-foot .btn { min-height: 44px; }   /* the week grid's boxes and Log the week */
  .wkgrid tr > :first-child { min-width: 120px; max-width: 140px; }
}
@media (max-width: 600px) { .tcal .cal-cell { min-height: 72px; } .tchip small, .cal-hours, .cal-holiday { display: none; } .tchip { font-size: .66rem; padding: 2px 4px; } }

/* ---- the Calendar's month: a week per row, one bar per task across its days ---- */
.tcal { border: 1px solid var(--bd-line, var(--line)); border-radius: 12px; overflow: hidden; background: var(--bg-white, var(--white)); }
.cal-dows { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tcal .cal-dow { border-bottom: 1px solid var(--bd-line, var(--line)); padding: 10px 8px; font-size: .8rem; }
.tcal .cal-dow + .cal-dow { border-left: 1px solid var(--bd-line, var(--line)); }
.cal-week { position: relative; border-top: 1px solid var(--bd-line, var(--line)); }
.cal-week:first-of-type, .cal-dows + .cal-week { border-top: 0; }
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tcal .cal-cell { border: 0; border-radius: 0; min-height: 100px; padding: 4px 6px; }
.tcal .cal-cell + .cal-cell { border-left: 1px solid var(--bd-line, var(--line)); }
.cal-week.lanes-1 .cal-cell { min-height: 122px; } .cal-week.lanes-2 .cal-cell { min-height: 152px; } .cal-week.lanes-3 .cal-cell { min-height: 182px; }
.cal-week.lanes-4 .cal-cell { min-height: 212px; } .cal-week.lanes-5 .cal-cell { min-height: 242px; }
.cal-bars { position: absolute; left: 0; right: 0; top: 36px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 28px; row-gap: 2px; padding: 0 3px; pointer-events: none; }
.tbar { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 6px; margin: 1px 3px; height: 26px; border: 0; border-radius: 6px; padding: 0 8px; text-align: left; font-family: inherit;
  font-size: .74rem; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap; overflow: hidden; background: var(--bg-navy-bg, var(--navy-bg)); color: var(--fg-navy, var(--navy)); }
.tbar .tname { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tbar .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); }
.tbar .i { flex: none; width: 13px; height: 13px; }
.tbar .tflag { flex: none; display: inline-flex; opacity: .85; margin-left: auto; }
.tchip .i { width: 11px; height: 11px; vertical-align: -1px; }
.tbar .tmeta { flex: none; font-size: .68rem; font-weight: 500; }   /* not dimmed: at .8 it was 3.1:1 on a done bar, 4.1 on a site or overdue one */
.tbar .tmeta::before { content: "·"; margin-right: 6px; }
.tbar .tmeta b { color: var(--fg-2f5a10, #2f5a10); font-weight: 700; }
.tbar.active { background: var(--bg-green-bg, var(--green-bg)); color: var(--fg-2f5a10, #2f5a10); } .tbar.active .dot { background: var(--green); }
.tbar.due { background: var(--bg-red-bg, var(--red-bg)); color: var(--fg-red, var(--red)); } .tbar.due .dot { background: var(--red); }
.tbar.done { background: var(--bg-bg, var(--bg)); color: var(--fg-slate, var(--slate)); } .tbar.done .i { color: var(--fg-2f5a10, #2f5a10); }   /* no dimming (slate was 2.8:1 under it): its tick says done */
.tbar.nonbill { border: 1px dashed currentColor; }
.tbar.cont { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; padding-left: 6px; }
.tbar.more { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.tbar.span-1 .tmeta { display: none; }
.tbar:hover { filter: brightness(.95); }
.tcal-more.lane-5 { pointer-events: auto; text-align: left; padding-left: 8px; }
.col-1 { grid-column-start: 1; } .col-2 { grid-column-start: 2; } .col-3 { grid-column-start: 3; } .col-4 { grid-column-start: 4; } .col-5 { grid-column-start: 5; } .col-6 { grid-column-start: 6; } .col-7 { grid-column-start: 7; }
.span-1 { grid-column-end: span 1; } .span-2 { grid-column-end: span 2; } .span-3 { grid-column-end: span 3; } .span-4 { grid-column-end: span 4; } .span-5 { grid-column-end: span 5; } .span-6 { grid-column-end: span 6; } .span-7 { grid-column-end: span 7; }
.lane-1 { grid-row: 1; } .lane-2 { grid-row: 2; } .lane-3 { grid-row: 3; } .lane-4 { grid-row: 4; } .lane-5 { grid-row: 5; }
@media (max-width: 600px) { .cal-bars { top: 30px; grid-auto-rows: 18px; } .tbar { font-size: .64rem; padding: 1px 4px; } .tbar small { display: none; }
  .cal-week.lanes-1 .cal-cell { min-height: 56px; } .cal-week.lanes-2 .cal-cell { min-height: 76px; } .cal-week.lanes-3 .cal-cell { min-height: 96px; } .cal-week.lanes-4 .cal-cell { min-height: 116px; } .cal-week.lanes-5 .cal-cell { min-height: 136px; } }
.tbar.site, .tchip.site { background: var(--bg-fff4d6, #fff4d6); color: var(--fg-7a5200, #7a5200); border-left-color: var(--bd-ffc000, #ffc000); } .tbar.site { box-shadow: inset 3px 0 0 #ffc000; }
.wk td.wk-cell.site { background: var(--bg-fffaf0, #fffaf0); }
.tchip.lieu { background: var(--bg-ede7f6, #ede7f6); color: var(--fg-4a2b8a, #4a2b8a); border-left-color: #7e57c2; display: inline-block; width: auto; margin-top: 2px; padding: 1px 6px; }
.tchip.lieu.ask { border-left-style: dashed; }   /* asked for: the dashed edge and the ? after DIL say so (not faded: 8.7:1) */
.tabs-row .cal-lieu { margin-left: auto; }
.tchip.leave { background: var(--bg-fff4d6, #fff4d6); color: var(--fg-7a5200, #7a5200); border-left-color: var(--bd-ffc000, #ffc000); display: inline-block; width: auto; margin-top: 2px; padding: 1px 6px; }
.tchip.leave.ask { border-left-style: dashed; }   /* waiting for approval: the dashed edge and the ? after the code say so (not faded: 6.3:1; at .85 it was 4.50:1) */
.tchip.event { background: var(--bg-e3f2fd, #e3f2fd); color: var(--fg-0d47a1, #0d47a1); border-left-color: #1976d2; margin-top: 2px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tcal .cal-cell .tchip.event { position: relative; z-index: 2; }
.cal-evs { margin-top: 6px; } .cal-evs .tchip.event { display: block; width: 100%; }      /* under the week's task bars, whatever their lanes */
.cal-week.lanes-1 .cal-evs { margin-top: 38px; } .cal-week.lanes-2 .cal-evs { margin-top: 68px; } .cal-week.lanes-3 .cal-evs { margin-top: 98px; } .cal-week.lanes-4 .cal-evs { margin-top: 128px; } .cal-week.lanes-5 .cal-evs { margin-top: 158px; }
@media (max-width: 600px) { .cal-week.lanes-1 .cal-evs { margin-top: 26px; } .cal-week.lanes-2 .cal-evs { margin-top: 50px; } .cal-week.lanes-3 .cal-evs { margin-top: 74px; } .cal-week.lanes-4 .cal-evs { margin-top: 98px; } .cal-week.lanes-5 .cal-evs { margin-top: 122px; } }
.tabs-row .cal-event { margin-left: auto; } .tabs-row .cal-event + .cal-leave, .tabs-row .cal-event ~ .cal-lieu { margin-left: 4px; }
.ev-people .ev-list { max-height: 168px; overflow: auto; border: 1px solid var(--bd-line, var(--line)); border-radius: var(--radius); padding: 6px 10px; margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 12px; }
.ev-people { margin-top: 12px; } .ev-more { margin-top: 12px; } .ev-more textarea { min-height: 64px; }
.ev-people .ev-person { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; padding: 3px 0; } .ev-people .ev-person[hidden] { display: none; } .ev-people .ev-person input { width: auto; margin: 0; }
.tabs-row .cal-leave { margin-left: auto; }
.tabs-row .cal-leave + .cal-lieu { margin-left: 4px; }

/* ---- the big Calendar (10 Nov 2026): tall cells, one soft pill per task per week (status dot, progress line, due flag), + to add a task ---- */
.cal-add { margin-left: 4px; width: 22px; height: 22px; border: 1px dashed var(--slate); border-radius: 50%; background: transparent; color: var(--fg-slate, var(--slate)); font: 600 .9rem/1 var(--font-head); cursor: pointer; opacity: 0; }
.tcal .cal-cell:hover .cal-add, .tcal .cal-cell:focus-within .cal-add, .cal-add:focus-visible { opacity: 1; }
[data-teams-theme="dark"] .cal-add { border-color: #a6b7c9; }   /* theme: keep - the dark screen's slate (7.0:1; slate is 2.9:1 there); before :hover below, so the green edge still wins */
.cal-add:hover, .cal-add:focus-visible { border-color: var(--green); color: var(--fg-2f5a10, #2f5a10); }
@media (hover: none) { .cal-add { opacity: 1; } }   /* a touch screen has no hover: the + shows at full strength, its dashed edge slate */
@media (max-width: 600px) { .tcal .cal-cell { min-height: 72px; } .cal-bars { grid-auto-rows: 22px; } .tbar { height: 20px; font-size: .66rem; padding: 0 5px; gap: 4px; } .tbar .tmeta { display: none; } .cal-add { width: 18px; height: 18px; font-size: .75rem; }
  .cal-week.lanes-1 .cal-cell { min-height: 96px; } .cal-week.lanes-2 .cal-cell { min-height: 120px; } .cal-week.lanes-3 .cal-cell { min-height: 144px; } .cal-week.lanes-4 .cal-cell { min-height: 168px; } .cal-week.lanes-5 .cal-cell { min-height: 192px; } }

/* ---------- My Day: the person's Trigger Pipeline actions (14 Nov 2026) — shown, never tasks ---------- */
.pipe-list { display: grid; gap: 10px; }
.pipe-list .card + .card { margin-top: 0; }
.pipe-act { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 16px; border-left: 4px solid var(--bd-slate-200, var(--slate-200, var(--bd-c4ccd5, #c4ccd5))); }
.pipe-act.lead { border-left-color: var(--green); }
.pipe-act.overdue { border-left-color: var(--red); }
.pipe-main { display: grid; gap: 2px; min-width: 0; }
.pipe-side { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 700px) { .pipe-act { flex-direction: column; align-items: stretch; } }

/* ---------- The Manager tab: acting for a team member (15 Nov 2026) ---------- */
.form-grid .field[hidden] { display: none; }           /* the employment form shows the fields of the kind chosen */
.field input[type="file"] { padding: 6px; }
.head-right { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---- the project's Timeline (the UI review, 22 Nov 2026): a read-only Gantt by work breakdown. It scrolls inside its card
   (.gantt-wrap is a .table-wrap), the names held at the left; bars, week columns and lines are placed by data-x / data-w through
   applyBars(). Every task bar has a navy edge, so a bar with nothing done still shows where it runs. ---- */
table.gantt { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; font-size: .9rem; }
.gantt th, .gantt td { border-bottom: 1px solid var(--bd-line, var(--line)); }
.gantt thead th { font: 600 .74rem var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-slate, var(--slate)); background: var(--bg-f8fafc, #f8fafc); padding: 10px 12px; text-align: left; vertical-align: bottom; border-bottom-width: 2px; }
.gantt thead th:first-child { position: sticky; left: 0; z-index: 2; width: 240px; background: var(--bg-f8fafc, #f8fafc); }
.gantt th[scope=row] { position: sticky; left: 0; z-index: 1; background: var(--bg-white, var(--white)); width: 240px; text-align: left; font-weight: 500; padding: 6px 12px; overflow-wrap: anywhere; vertical-align: middle; }
.gantt tr.g-wbs > * { background: var(--bg-f8fafc, #f8fafc); }
.gantt tr.g-wbs.depth-0 > * { background: var(--bg-navy-bg, var(--navy-bg)); }
.gantt tr.g-wbs th { font-family: var(--font-head); font-weight: 600; color: var(--fg-navy, var(--navy)); }
.gantt .code { font: 600 .82rem var(--font-head); color: var(--fg-navy, var(--navy)); margin-right: 8px; }
.gantt th[scope=row] .indent { display: block; }   /* the indent stays inside the names column at every level (R18) */
/* the axis, top down: the year (over the first week and the first week of each new year), the weeks, Today, Deadline */
.gantt th.gaxis { position: relative; height: 78px; padding: 0; }
.gweek { position: absolute; top: 22px; padding-left: 4px; border-left: 1px solid var(--bd-line, var(--line)); font-size: .72rem; font-weight: 500; letter-spacing: 0; color: var(--fg-slate, var(--slate)); white-space: nowrap; }
.gweek .gyr { position: absolute; bottom: 100%; left: 0; padding-left: 4px; font-weight: 700; color: var(--fg-navy, var(--navy)); }
.glabel { position: absolute; padding: 0 5px; border-left: 2px solid; font-size: .72rem; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.glabel.end { transform: translateX(-100%); border-left: 0; border-right: 2px solid; }   /* right of the middle: the label ends at its line */
.glabel.today { top: 40px; color: var(--fg-2f5a10, #2f5a10); border-color: var(--green-deep); }
.glabel.deadline { top: 58px; color: var(--fg-red, var(--red)); border-color: var(--red); }
.gtrack { position: relative; height: 40px; padding: 0; isolation: isolate; }   /* its own layer: the lines go over its bars, never over the held names */
.gtrack > .small { position: relative; display: block; padding: 0 10px; line-height: 40px; }   /* Not dated yet */
.gtick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--bd-line, var(--line)); pointer-events: none; }
.gbar { position: absolute; top: 4px; height: 32px; min-width: 6px; border: 1px solid var(--bd-navy, var(--navy)); padding: 0; border-radius: 6px; overflow: hidden; background: var(--bg-navy-bg, var(--navy-bg)); cursor: pointer; }
.gbar .gfill { position: absolute; inset: 0 auto 0 0; background: var(--navy); }
.gbar.s-in-progress .gfill { background: var(--green); }
.gbar.overdue { background: var(--bg-red-bg, var(--red-bg)); border: 2px solid var(--red); }
.gbar.nonbill { border-style: dashed; }
.gbar.wbs { top: 15px; height: 10px; border: 0; background: var(--navy); cursor: default; }
.gbar.task:hover { filter: brightness(.95); }
.gmark { position: absolute; top: 0; bottom: 0; width: 2px; pointer-events: none; z-index: 1; outline: 1px solid var(--bd-white, var(--white)); }   /* over the bars, with a thin light edge so it shows on navy, green and the lavender rows */
.gmark.today { background: var(--green-deep); }
.gmark.deadline { background: var(--red); }
/* the key under the chart (R16): one wrapping row beside the "?", each swatch drawn in its mark's own colours; an opened "?" takes the line below */
.gantt-foot { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; margin-top: 8px; }
.gkey { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; font-size: .8rem; color: var(--fg-charcoal, var(--charcoal)); }
.gkey li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.gk-line { display: inline-block; width: 2px; height: 16px; }
.gk-line.today { background: var(--green-deep); }
.gk-line.deadline { background: var(--red); }
.gk-sum { display: inline-block; width: 28px; height: 6px; border-radius: 3px; background: var(--navy); }
.gk-bar { position: relative; display: inline-block; width: 28px; height: 14px; border: 1px solid var(--bd-navy, var(--navy)); border-radius: 4px; background: var(--bg-navy-bg, var(--navy-bg)); overflow: hidden; }
.gk-bar .gk-fill { position: absolute; inset: 0 auto 0 0; width: 50%; background: var(--navy); }
.gk-bar.s-in-progress .gk-fill { background: var(--green); }
.gk-bar.overdue { background: var(--bg-red-bg, var(--red-bg)); border: 2px solid var(--red); }
.gk-bar.nonbill { border-style: dashed; }
/* the dark screen: navy on the dark card would vanish and the red lines would sink, so there they turn light (the dark screen's own light navy and red); the key turns with them */
[data-teams-theme="dark"] .gbar .gfill, [data-teams-theme="dark"] .gbar.wbs, [data-teams-theme="dark"] .gk-bar .gk-fill, [data-teams-theme="dark"] .gk-sum { background: #9098db; }   /* theme: keep - the light navy the dark screen gives navy lines */
[data-teams-theme="dark"] .gbar.s-in-progress .gfill, [data-teams-theme="dark"] .gk-bar.s-in-progress .gk-fill { background: var(--green); }   /* theme: keep - in progress stays green */
[data-teams-theme="dark"] .gmark.deadline, [data-teams-theme="dark"] .gk-line.deadline { background: #ff9c8d; }   /* theme: keep - the dark screen's red */
[data-teams-theme="dark"] .gbar.overdue, [data-teams-theme="dark"] .glabel.deadline, [data-teams-theme="dark"] .gk-bar.overdue { border-color: #ff9c8d; }   /* theme: keep - the dark screen's red */
/* a field's edge on the dark screen: slate is 2.9:1 on the dark card, so there it is the dark screen's own slate (7.0:1); a red edge on a refused box still wins */
[data-teams-theme="dark"] input, [data-teams-theme="dark"] select, [data-teams-theme="dark"] textarea, [data-teams-theme="dark"] .ts input, [data-teams-theme="dark"] .day-head input { border-color: #a6b7c9; }   /* theme: keep - the dark screen's slate */
[data-teams-theme="dark"] .wkgrid input[aria-invalid="true"] { border-color: #ff9c8d; }   /* theme: keep - the dark screen's red: 7.1:1 on the dark card (#b42318 was 2.2:1, the dimmest edge there) */
/* a field that cannot be changed: the page's grey fill and the quiet line, so it does not look like a live box (after the dark edge above: the same weight, so this wins on both screens) */
input:disabled, select:disabled, textarea:disabled, input[readonly], textarea[readonly] { background: var(--bg-bg, var(--bg)); border-color: var(--bd-line, var(--line)); }
@media (max-width: 720px) {   /* after the rules above: the same weight, so the later wins */
  .gantt th[scope=row] { width: 140px; padding: 6px 8px; }   /* more of the weeks beside the names */
  .gantt thead th:first-child { width: 140px; }
  .gantt .lvl-1 { padding-left: 10px; } .gantt .lvl-2 { padding-left: 20px; } .gantt .lvl-3 { padding-left: 30px; }   /* 10 px a level: level 6 still leaves 64 px for the words */
  .gantt .lvl-4 { padding-left: 40px; } .gantt .lvl-5 { padding-left: 50px; } .gantt .lvl-6 { padding-left: 60px; }
}
