/* PitBoard. Cool steel plane, coal-slate bar, hard-hat yellow for the one primary action. */
@font-face { font-family: "Plex"; src: url(fonts/plex-sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url(fonts/plex-sans-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex"; src: url(fonts/plex-sans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "PlexCond"; src: url(fonts/plex-cond-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PlexCond"; src: url(fonts/plex-cond-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  /* Brand (Resources ID logo): navy #1a3159, teal #0b7169 / #03a399, blue #559bd3, red #e7392f, coral #ea6a6a, orange #f2a33b */
  --navy: #1a3159;
  --brand-orange: #f2a33b;
  --brand-teal: #079488;
  --plane: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --ink: #15233d;
  --ink-2: #485670;
  --muted: #74819a;
  --line: #dce3ec;
  --line-2: #c6d0dd;
  --bar: #ffffff;
  --bar-ink: #1a3159;
  --bar-link: #485670;
  --bar-line: #dce3ec;
  --hivis: #f2a33b;
  --hivis-ink: #1a3159;
  --focus: #1e64a6;
  --ob: #2a78d6;
  --coal: #eb6834;
  --s1: #079488;
  --s2: #6250d6;
  --plan: #8f9399;
  --grid: #e6e9ed;
  --axis: #c3c7cc;
  --good: #0ca30c;
  --good-ink: #006300;
  --warn: #fab219;
  --serious: #ec835a;
  --crit: #d03b3b;
  --crit-ink: #b42323;
  --div-neg-3: #b8333a; --div-neg-2: #e06a64; --div-neg-1: #f3b8b1;
  --div-mid: #eceae6;
  --div-pos-1: #b7d3f6; --div-pos-2: #5598e7; --div-pos-3: #1c5cab;
  --radius: 6px;
  font-family: "Plex", system-ui, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --plane: #0d1524; --surface: #152038; --surface-2: #1a2742; --ink: #e9eef6; --ink-2: #b6c2d6;
    --muted: #8796ae; --line: #253452; --line-2: #33456a; --bar: #10203d; --bar-ink: #ffffff; --bar-link: #b6c2d6; --bar-line: #253452;
    --focus: #6aa8e6; --ob: #3987e5; --coal: #d95926; --s1: #13a094; --s2: #9085e9; --plan: #9a9ea5;
    --grid: #262c32; --axis: #3a4148; --good-ink: #0ca30c; --crit-ink: #ef7d7d;
    --div-neg-3: #e06a64; --div-neg-2: #a8423f; --div-neg-1: #5a2a29; --div-mid: #2c3136;
    --div-pos-1: #1f3a5c; --div-pos-2: #2a6bbd; --div-pos-3: #6da7ec;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plane: #0d1524; --surface: #152038; --surface-2: #1a2742; --ink: #e9eef6; --ink-2: #b6c2d6;
  --muted: #8796ae; --line: #253452; --line-2: #33456a; --bar: #10203d; --bar-ink: #ffffff; --bar-link: #b6c2d6; --bar-line: #253452;
  --focus: #6aa8e6; --ob: #3987e5; --coal: #d95926; --s1: #13a094; --s2: #9085e9; --plan: #9a9ea5;
  --grid: #262c32; --axis: #3a4148; --good-ink: #0ca30c; --crit-ink: #ef7d7d;
  --div-neg-3: #e06a64; --div-neg-2: #a8423f; --div-neg-1: #5a2a29; --div-mid: #2c3136;
  --div-pos-1: #1f3a5c; --div-pos-2: #2a6bbd; --div-pos-3: #6da7ec;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--plane); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: var(--focus); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; }
h1 { font-size: 1.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar: white, brand logo, orange underline on the current page */
.bar { background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid var(--bar-line); }
.bar-in { max-width: 1320px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--bar-ink); text-decoration: none; font-weight: 600; letter-spacing: .01em; font-size: 1.05rem; }
.brand-logo { width: 32px; height: 32px; object-fit: contain; background: #fff; border-radius: 7px; padding: 2px; flex: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { color: var(--bar-link); text-decoration: none; padding: 17px 10px 15px; font-size: .92rem; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--bar-ink); }
.nav a[aria-current="page"] { color: var(--bar-ink); font-weight: 500; border-bottom-color: var(--brand-orange); }
.bar-user { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--bar-link); }
.bar-user a { color: var(--bar-ink) !important; }
.bar-user form { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--bar-link); font: inherit; cursor: pointer; padding: 4px; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--bar-ink); }

main { max-width: 1320px; margin: 0 auto; padding: 20px 16px 64px; }
.pagehead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead .sub { color: var(--ink-2); margin-top: 4px; }
.pagehead .tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* flashes */
.flashes { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.flash { padding: 10px 14px; border-radius: var(--radius); border-left: 4px solid; background: var(--surface); font-size: .92rem; }
.flash.ok { border-color: var(--good); }
.flash.error { border-color: var(--crit); }
.flash.warn { border-color: var(--warn); }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; font-size: .92rem; padding: 7px 14px; border-radius: var(--radius); cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--hivis); border-color: var(--hivis); color: var(--hivis-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(.95); }
.btn.good { background: var(--good-ink); border-color: var(--good-ink); color: #fff; }
.btn.danger { color: var(--crit-ink); }
.btn.sm { padding: 4px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=password], input[type=time], input[type=number], input[type=month], input[type=file], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 8px; min-height: 36px; }
textarea { width: 100%; min-height: 64px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
label.f { display: grid; gap: 4px; font-size: .88rem; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg a { padding: 6px 12px; text-decoration: none; color: var(--ink-2); font-size: .88rem; }
.seg a + a { border-left: 1px solid var(--line-2); }
.seg a[aria-current="true"] { background: var(--ink); color: var(--surface); }
.monthnav { display: inline-flex; align-items: center; gap: 4px; }
.monthnav .m { font-weight: 600; min-width: 9.5em; text-align: center; }
select.sitepick { font-weight: 600; }

/* status chips: icon + label, never colour alone */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.chip.APPROVED::before { background: var(--good); }
.chip.SUBMITTED::before { background: var(--warn); border-radius: 1px; transform: rotate(45deg); }
.chip.RETURNED::before { background: var(--crit); border-radius: 1px; }
.chip.DRAFT::before { background: transparent; border: 2px solid var(--muted); width: 6px; height: 6px; }
.chip.NONE::before { background: transparent; border: 1px dashed var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }
.panel-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-h .note { color: var(--muted); font-size: .85rem; }
.panel-h .right { margin-left: auto; }

table.t { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.t th, table.t td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { font-weight: 500; color: var(--ink-2); font-size: .82rem; }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); }
.login-art { background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login-badge { display: flex; align-items: center; gap: 16px; }
.login-badge img { width: 84px; height: 84px; object-fit: contain; background: #fff; border-radius: 18px; padding: 8px; }
.login-badge b { font-size: 1.6rem; font-weight: 600; letter-spacing: .01em; }
.login-art .tag { color: #c9d4e6; max-width: 36ch; font-size: 1.05rem; margin-top: 22px; }
.login-board { display: grid; grid-template-columns: repeat(31, 1fr); gap: 3px; max-width: 620px; }
.login-board i { aspect-ratio: 1 / 1.6; border-radius: 2px; background: #243f6e; }
.login-board i:nth-child(7n+3) { background: #03a399; }
.login-board i:nth-child(11n+5) { background: #559bd3; }
.login-board i:nth-child(13n+9) { background: #ea6a6a; }
.login-board i:nth-child(17n+2) { background: #f2a33b; }
.login-board i:nth-child(19n+12) { background: #e7392f; }
.login-org { color: #9fb0cc; font-size: .85rem; }
.login-form { background: var(--surface); padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.login-form input { width: 100%; }
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-art { padding: 20px; gap: 16px; justify-content: flex-start; }
  .login-art .tag, .login-org { display: none; }
  .login-form { padding: 24px 20px; justify-content: flex-start; }
  .login-badge img { width: 52px; height: 52px; border-radius: 12px; padding: 5px; }
  .login-badge b { font-size: 1.35rem; }
}

/* ---------- home ---------- */
.week { display: grid; gap: 0; }
.week table td.cell { text-align: center; }
.week a.daycell { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--ink); padding: 4px 6px; border-radius: 4px; }
.week a.daycell:hover { background: var(--surface-2); }

/* ---------- board (the whiteboard) ---------- */
.board-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table.board { border-collapse: separate; border-spacing: 0; font-family: "PlexCond", "Plex", system-ui, sans-serif; font-size: .88rem; width: 100%; min-width: 1320px; }
table.board th, table.board td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 8px; text-align: center; white-space: nowrap; }
table.board thead th { background: var(--surface-2); color: var(--ink-2); font-weight: 600; position: sticky; top: 0; z-index: 2; }
table.board thead tr:nth-child(2) th { top: 31px; font-weight: 500; font-size: .8rem; }
table.board td.n { text-align: right; font-variant-numeric: tabular-nums; }
table.board td.day { font-weight: 600; font-size: 1rem; background: var(--surface); position: sticky; left: 0; z-index: 1; }
table.board tr.s2 td { border-bottom-color: var(--line-2); }
table.board tr.weekend td.day { color: var(--crit-ink); }
table.board tr:hover td { background: var(--surface-2); }
table.board tr.clickable { cursor: pointer; }
table.board td.stat { min-width: 150px; }
table.board td.rem { text-align: left; max-width: 280px; overflow: hidden; text-overflow: ellipsis; font-family: "Plex", sans-serif; font-size: .82rem; color: var(--ink-2); }
table.board tfoot td { font-weight: 600; background: var(--surface-2); border-top: 2px solid var(--line-2); position: sticky; bottom: 0; }
table.board td.act { font-weight: 600; }
.ach { display: inline-block; min-width: 3.4em; padding: 1px 6px; border-radius: 3px; font-size: .78rem; font-weight: 600; color: var(--ink); }
.a-n3 { background: var(--div-neg-3); color: #fff; } .a-n2 { background: var(--div-neg-2); color: #fff; } .a-n1 { background: var(--div-neg-1); }
.a-0 { background: var(--div-mid); } .a-p1 { background: var(--div-pos-1); } .a-p2 { background: var(--div-pos-2); color: #fff; } .a-p3 { background: var(--div-pos-3); color: #fff; }
.flagdot { color: var(--crit-ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: .82rem; color: var(--ink-2); }
.legend .sw { display: inline-block; width: 18px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.legend .ln { display: inline-block; width: 16px; height: 2px; vertical-align: 3px; margin-right: 5px; }
.legend .ln.dash { background: repeating-linear-gradient(90deg, var(--dash-c, var(--ob)) 0 4px, transparent 4px 7px); }

/* ---------- day form ---------- */
.dayhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dayhead h1 { font-size: 1.45rem; }
.daynav { display: inline-flex; gap: 4px; }
.banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; }
.banner.RETURNED { border-left-color: var(--crit); }
.banner.SUBMITTED { border-left-color: var(--warn); }
.banner.APPROVED { border-left-color: var(--good); }
.banner.LOCKED { border-left-color: var(--ink); }
.entry { display: grid; grid-template-columns: 200px repeat(2, minmax(0, 1fr)) 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.entry > div { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; min-width: 0; }
.entry .lab { color: var(--ink-2); font-size: .9rem; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
.entry .lab b { color: var(--ink); font-weight: 500; font-size: .95rem; }
.entry .hd { background: var(--surface-2); font-weight: 600; flex-direction: column; align-items: flex-start; gap: 0; }
.entry .hd .muted { font-weight: 400; font-size: .82rem; }
.entry .tot { background: var(--surface-2); justify-content: flex-end; font-variant-numeric: tabular-nums; font-weight: 600; flex-direction: column; align-items: flex-end; gap: 0; }
.entry .tot .muted { font-weight: 400; font-size: .78rem; }
.entry .sec { grid-column: 1 / -1; background: var(--plane); padding: 6px 14px; font-size: .8rem; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.cellin { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; width: 100%; }
.cellin input { width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; font-size: 1rem; }
.cellin .unit { color: var(--muted); font-size: .8rem; }
.cellin .meta { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; min-height: 1.1em; }
.cellin .meta .good { color: var(--good-ink); font-weight: 500; }
.cellin .meta .bad { color: var(--crit-ink); font-weight: 500; }
.cellin input.err { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 8%, var(--surface)); }
.rainlist { display: grid; gap: 6px; width: 100%; }
.rainrow { display: flex; gap: 6px; align-items: center; }
.rainrow input { width: 6.4em; }
.rainrow .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 2px 6px; }
.addrain { border: 1px dashed var(--line-2); background: none; color: var(--ink-2); border-radius: 4px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: .85rem; justify-self: start; }
.entry textarea { min-height: 40px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.actions .hint { color: var(--muted); font-size: .85rem; }
.draftnote { font-size: .82rem; color: var(--muted); }
@media (max-width: 860px) {
  .entry { grid-template-columns: 1fr 1fr; }
  .entry .lab { grid-column: 1 / -1; background: var(--surface-2); padding: 6px 14px; flex-direction: row; gap: 8px; align-items: baseline; }
  .entry .hd.corner, .entry .tot, .entry .hd.totc { display: none; }
}

/* ---------- approvals ---------- */
.cards { display: grid; gap: 14px; }
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: grid; gap: 12px; }
.acard-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.acard-h h2 { font-size: 1.1rem; }
.mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 18px; }
.mini .k { font-size: .8rem; color: var(--ink-2); }
.mini .v { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini .d { font-size: .8rem; }
.acard form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.acard form textarea { flex: 1 1 260px; min-height: 40px; }

/* ---------- dashboard ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.hero-main { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; }
.hero-q { font-size: .95rem; color: var(--ink-2); }
.hero-fig { font-size: 3.4rem; font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; margin: 6px 0 4px; }
.hero-fig small { font-size: 1.1rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; margin-left: 6px; }
.hero-say { font-size: 1rem; color: var(--ink); max-width: 60ch; }
.hero-say b { font-weight: 600; }
.meter { position: relative; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--ob) 16%, var(--surface)); margin: 14px 0 6px; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ob); }
.meter > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.meter-l { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tile { background: var(--surface); padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.tile .k { font-size: .82rem; color: var(--ink-2); }
.tile .v { font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.tile .v small { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.tile .d { font-size: .82rem; color: var(--ink-2); }
.tile .d.good { color: var(--good-ink); }
.tile .d.bad { color: var(--crit-ink); }
.stat-flag { display: inline-flex; align-items: center; gap: 5px; }
.stat-flag::before { content: ""; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--crit); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid2 > .panel + .panel { margin-top: 0; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: "Plex", system-ui, sans-serif; fill: var(--muted); font-size: 11px; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .ax { stroke: var(--axis); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12); padding: 8px 10px; font-size: .82rem; min-width: 150px; z-index: 5; display: none; }
.tip .t { color: var(--ink-2); margin-bottom: 4px; font-size: .78rem; }
.tip .r { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .r .nm { color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.tip .r .nm i { display: inline-block; width: 12px; height: 2px; }
.tip .r .vl { font-weight: 600; font-variant-numeric: tabular-nums; }
/* heat board */
.heat { display: grid; grid-template-columns: 54px repeat(31, minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat .rl { font-size: .78rem; color: var(--ink-2); }
.heat .dl { font-size: .72rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.heat .dl.today { color: var(--ink); font-weight: 600; }
.heat a.c { display: block; height: 30px; border-radius: 3px; background: var(--div-mid); text-decoration: none; position: relative; }
.heat a.c.empty { background: transparent; border: 1px dashed var(--line-2); }
.heat a.c.future { background: var(--surface-2); border: 1px solid var(--line); }
.heat a.c.a-n3 { background-color: var(--div-neg-3); } .heat a.c.a-n2 { background-color: var(--div-neg-2); } .heat a.c.a-n1 { background-color: var(--div-neg-1); }
.heat a.c.a-0 { background-color: var(--div-mid); } .heat a.c.a-p1 { background-color: var(--div-pos-1); } .heat a.c.a-p2 { background-color: var(--div-pos-2); } .heat a.c.a-p3 { background-color: var(--div-pos-3); }
.heat a.c.pend { background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,.55) 4px 6px); }
.heat a.c:hover, .heat a.c:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat .na { grid-column: span 1; }
.scale { display: flex; gap: 2px; align-items: center; }
.scale span { width: 26px; height: 10px; }
.defs { font-size: .85rem; color: var(--ink-2); }
.defs dt { font-weight: 600; color: var(--ink); margin-top: 8px; }
.defs dd { margin: 0; }
details.how summary { cursor: pointer; color: var(--ink-2); font-size: .9rem; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: .88rem; color: var(--ink-2); }
@media (max-width: 980px) { .hero, .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .hero-fig { font-size: 2.5rem; }
  .heat { grid-template-columns: 34px repeat(31, minmax(0, 1fr)); gap: 1px; }
  .heat .dl { font-size: .55rem; }
  .heat a.c { height: 22px; border-radius: 1px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile .v { font-size: 1.2rem; }
}

/* portfolio */
.pf td .bul { position: relative; height: 8px; width: 140px; border-radius: 4px; background: color-mix(in srgb, var(--ob) 14%, var(--surface)); }
.pf td .bul i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--ob); }
.pf td .bul i.c { background: var(--coal); }
.pf td .bul b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.pf .spark svg { display: block; }

/* plan */
table.plan input { width: 7.5em; text-align: right; }
.planhead { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }

@media print {
  .bar, .tools, .actions, .flashes, .nav { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .board-wrap { border: 0; overflow: visible; }
  table.board { min-width: 0; font-size: 9px; }
  table.board thead th, table.board tfoot td, table.board td.day { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* admin rows: one form per row (forms cannot sit inside table rows) */
.frows { display: grid; gap: 0; min-width: 980px; }
.frows .fh, .frows .fr { display: grid; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.frows .fh { font-size: .82rem; color: var(--ink-2); font-weight: 500; }
.frows.sites .fh, .frows.sites .fr { grid-template-columns: 90px minmax(160px,1.6fr) 100px 130px 130px 90px 100px 110px 90px 90px 70px 130px; }
.frows.sites { min-width: 1340px; }
.frows .tpair { display: grid; gap: 4px; }
.frows .fh span { font-size: .78rem; }
.frows.users .fh, .frows.users .fr { grid-template-columns: minmax(130px,1fr) minmax(150px,1.2fr) 150px 90px 80px 190px 110px; }
.frows input[type=text], .frows input[type=password], .frows select { width: 100%; }

/* v1.1: WhatsApp report, material pairs, units working, loaders */
.cellin.pair { grid-template-columns: minmax(0, 6em) auto minmax(0, 1fr) auto; }
.cellin input.derived, table.ld input.derived { background: var(--surface-2); color: var(--ink-2); border-style: dashed; }
.cellin.pair input.rit { font-weight: 600; }
.eqgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; width: 100%; }
.eqgrid label { display: grid; gap: 2px; font-size: .75rem; color: var(--ink-2); }
.eqgrid input { width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
details.wa summary { cursor: pointer; }
details.wa textarea { font-family: inherit; }
table.ld { font-size: .85rem; min-width: 1100px; }
table.ld td, table.ld th { padding: 4px 6px; vertical-align: middle; }
table.ld input, table.ld select { min-height: 32px; padding: 4px 6px; font-size: .88rem; }
table.ld input[inputmode] { text-align: right; font-variant-numeric: tabular-nums; }
table.ld .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
table.ld [data-prod] { font-weight: 600; min-width: 4em; }
.warnline { color: var(--crit-ink); font-weight: 500; }
.kendala { white-space: pre-line; font-size: .85rem; color: var(--ink-2); }
.lp td .bar { position: relative; height: 10px; width: 160px; border-radius: 3px; background: var(--surface-2); }
.lp td .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ob); }
.eqrow { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--ink-2); margin-top: 10px; }
.eqrow b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tiles.t8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
