/* Argo-OT. Cool concrete base, navy for structure, high-vis amber only where something needs a person. */

:root {
  --bg: #eceff2;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --ink: #16202b;
  --muted: #5b6674;
  --line: #d4dae1;
  --brand: #1d3a5c;
  --brand-ink: #ffffff;
  --signal: #f2ad00;
  --signal-ink: #2a1f00;
  --focus: #2b6cdf;

  --st-pending: #a86a00;
  --st-open: #2a62c4;
  --st-filling: #2a62c4;
  --st-filled: #1f7a4a;
  --st-unfilled: #b8381f;
  --st-completed: #66717e;
  --st-cancelled: #98a1ab;

  --radius-s: 6px;
  --radius-m: 10px;
  --shadow: 0 1px 0 rgba(22, 32, 43, .06), 0 1px 3px rgba(22, 32, 43, .06);

  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161c; --surface: #19212a; --surface-2: #1f2832; --ink: #e8edf2; --muted: #9aa6b3; --line: #2d3946;
    --brand: #8fb3dc; --brand-ink: #0d1620; --signal: #f2b51c; --signal-ink: #1f1600; --focus: #7aa7ff;
    --st-pending: #e3a43a; --st-open: #7aa7ff; --st-filling: #7aa7ff; --st-filled: #58c08a; --st-unfilled: #f0785f;
    --st-completed: #8c97a3; --st-cancelled: #66717d;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161c; --surface: #19212a; --surface-2: #1f2832; --ink: #e8edf2; --muted: #9aa6b3; --line: #2d3946;
  --brand: #8fb3dc; --brand-ink: #0d1620; --signal: #f2b51c; --signal-ink: #1f1600; --focus: #7aa7ff;
  --st-pending: #e3a43a; --st-open: #7aa7ff; --st-filling: #7aa7ff; --st-filled: #58c08a; --st-unfilled: #f0785f;
  --st-completed: #8c97a3; --st-cancelled: #66717d;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font); font-feature-settings: "tnum" 1;
}
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */

.demo-bar {
  background: var(--signal); color: var(--signal-ink); font-size: 13px; font-weight: 600;
  padding: 6px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.demo-bar select { background: rgba(255,255,255,.6); border: 1px solid rgba(0,0,0,.25); border-radius: var(--radius-s); padding: 3px 6px; font-weight: 600; max-width: 100%; }

.shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 34px); align-items: start; }
.side {
  background: var(--brand); color: var(--brand-ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--signal); color: var(--signal-ink); display: grid; place-items: center; font: 700 17px var(--font-cond); }
.brand-name { font: 700 20px/1 var(--font-cond); letter-spacing: .01em; }
.brand-sub { font-size: 12px; opacity: .75; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-s);
  color: inherit; text-decoration: none; font-weight: 600; font-size: 14.5px; opacity: .86;
}
.nav a:hover { background: rgba(255,255,255,.08); opacity: 1; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.14); opacity: 1; }
.nav .count { margin-left: auto; background: var(--signal); color: var(--signal-ink); border-radius: 999px; font-size: 12px; padding: 0 7px; font-weight: 700; }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; font-size: 12px; padding: 8px; white-space: nowrap; }
.side-foot a { color: inherit; opacity: .8; text-decoration: underline; text-underline-offset: 2px; }
.side-foot a:hover { opacity: 1; }
.brand-ver { font: 600 13px var(--font); opacity: .7; margin-left: 2px; letter-spacing: 0; }

main { padding: 28px 32px 80px; max-width: 1180px; width: 100%; }
.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }

.tabbar { display: none; }

@media (max-width: 640px) {
  .demo-bar { padding: 6px 16px; }
  .demo-bar > span { display: none; }
  .demo-bar label { display: flex; gap: 8px; align-items: center; width: 100%; white-space: nowrap; }
  .demo-bar select { flex: 1; min-width: 0; }
  .shell { display: block; }
  .side { display: none; }
  main { padding: 18px 16px 96px; }
  h1 { font-size: 22px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; position: relative; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .count { position: absolute; top: 2px; left: 55%; background: var(--signal); color: var(--signal-ink); border-radius: 999px; font-size: 10px; padding: 0 5px; font-weight: 700; }
}

/* ---------- building blocks ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 14px;
  border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.signal { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
.btn.danger { color: var(--st-unfilled); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow); }
.panel-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-body { padding: 16px; }
.stack { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-pending_approval { color: var(--st-pending); }
.st-open, .st-filling { color: var(--st-filling); }
.st-filled { color: var(--st-filled); }
.st-unfilled { color: var(--st-unfilled); }
.st-completed { color: var(--st-completed); }
.st-cancelled { color: var(--st-cancelled); }

.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.warn { background: color-mix(in srgb, var(--signal) 22%, transparent); border-color: color-mix(in srgb, var(--signal) 60%, transparent); color: var(--ink); }
.tag.bad { color: var(--st-unfilled); border-color: color-mix(in srgb, var(--st-unfilled) 40%, transparent); }

/* Job ticket: the time block is the thing you read first. */
.tickets { display: grid; gap: 10px; }
.ticket {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--stripe, var(--line));
  border-radius: var(--radius-m); padding: 12px 14px; text-decoration: none; color: inherit; box-shadow: var(--shadow);
}
a.ticket:hover { border-color: var(--muted); border-left-color: var(--stripe); }
.ticket.s-pending_approval { --stripe: var(--st-pending); }
.ticket.s-open, .ticket.s-filling { --stripe: var(--st-filling); }
.ticket.s-filled { --stripe: var(--st-filled); }
.ticket.s-unfilled { --stripe: var(--st-unfilled); }
.ticket.s-completed { --stripe: var(--st-completed); }
.ticket.s-cancelled { --stripe: var(--st-cancelled); opacity: .75; }
.when { font-family: var(--font-cond); line-height: 1; }
.when .d { font-size: 15px; font-weight: 600; color: var(--muted); }
.when .n { font-size: 30px; font-weight: 700; }
.when .t { font-size: 14px; font-weight: 600; margin-top: 3px; color: var(--muted); }
.ticket-main { min-width: 0; }
.ticket-title { font-weight: 700; font-size: 15.5px; }
.ticket-meta { color: var(--muted); font-size: 13px; display: flex; gap: 4px 12px; flex-wrap: wrap; margin-top: 2px; }
.ticket-side { text-align: right; display: grid; gap: 4px; justify-items: end; }
@media (max-width: 560px) {
  .ticket { grid-template-columns: 64px 1fr; }
  .ticket-side { grid-column: 1 / -1; justify-items: start; text-align: left; display: flex; gap: 8px; flex-wrap: wrap; }
  .when .n { font-size: 26px; }
}

.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

.callout { border: 1px solid color-mix(in srgb, var(--signal) 65%, transparent); background: color-mix(in srgb, var(--signal) 14%, var(--surface)); border-radius: var(--radius-m); padding: 14px 16px; display: grid; gap: 10px; }
.callout.info { border-color: var(--line); background: var(--surface-2); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Forms */
.field { display: grid; gap: 5px; align-content: start; } /* keep label, box, hint at the top when a neighbour in the row is taller */
.field > label, .field > .label { font-weight: 600; font-size: 13.5px; }
.field .hint { font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=password], select, textarea {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface);
}
textarea { min-height: 72px; resize: vertical; }
input[type=date], input[type=time] { padding-left: 8px; padding-right: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .span-4, .span-3, .span-2 { grid-column: span 6; } }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }

.modes { display: grid; gap: 8px; }
.mode { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; background: var(--surface); }
.mode:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.mode:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.mode input { margin-top: 3px; }
.mode strong { display: block; }
.mode span { font-size: 13px; color: var(--muted); }

.error { color: var(--st-unfilled); font-weight: 600; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(520px, calc(100vw - 32px));
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-m); font-weight: 600; font-size: 14px;
}
@media (max-width: 640px) { .toast { bottom: 84px; } }
.toast.bad { background: var(--st-unfilled); color: #fff; }

dialog { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(10, 16, 24, .45); }
dialog form { padding: 18px; display: grid; gap: 14px; }

/* Lists page: the rotation pointer is the one bold element. */
.roster { list-style: none; margin: 0; padding: 0; }
.roster li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); position: relative; }
.roster li:last-child { border-bottom: 0; }
.roster .seat { font: 700 22px/1 var(--font-cond); color: var(--muted); text-align: center; }
.roster li.next { background: color-mix(in srgb, var(--signal) 13%, var(--surface)); }
.roster li.next::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--signal); }
.roster li.next .seat { color: var(--ink); }
.roster li.out { opacity: .6; }
.roster .who strong { display: block; }
.roster .nums { display: flex; gap: 16px; font-size: 13px; color: var(--muted); text-align: right; }
.roster .nums b { display: block; font: 700 17px/1.1 var(--font-cond); color: var(--ink); }
.next-flag { font-size: 12px; font-weight: 700; color: var(--signal-ink); background: var(--signal); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
@media (max-width: 560px) { .roster li { grid-template-columns: 32px 1fr; } .roster .nums { grid-column: 2; justify-content: flex-start; text-align: left; } }

/* Offer order on a job */
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ladder li:last-child { border-bottom: 0; }
.ladder .pos { font: 700 16px var(--font-cond); color: var(--muted); }
.ans { font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 4px; white-space: nowrap; }
.ans-queued { color: var(--muted); background: var(--surface-2); }
.ans-sent { color: var(--signal-ink); background: var(--signal); }
.ans-accepted, .ans-awarded { color: #fff; background: var(--st-filled); }
.ans-declined, .ans-expired { color: var(--st-unfilled); background: color-mix(in srgb, var(--st-unfilled) 12%, transparent); }
.ans-not_awarded, .ans-withdrawn { color: var(--muted); background: var(--surface-2); }

/* Timeline log */
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--muted); font-size: 12.5px; }
@media (max-width: 560px) { .log li { grid-template-columns: 1fr; gap: 2px; } }

/* Calendar */
.cal-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cal-bar .title { font: 700 22px var(--font-cond); margin: 0 6px; min-width: 170px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 12px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.cal-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.cal-filters select { width: auto; min-height: 36px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: var(--line); gap: 1px; }
.month .dow { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; }
.month .day { background: var(--surface); min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.month .day.other { background: var(--surface-2); }
.month .day .num { font: 600 15px var(--font-cond); color: var(--muted); }
.month .day.today .num { color: var(--signal-ink); background: var(--signal); border-radius: 4px; padding: 0 5px; align-self: flex-start; }
.chip { display: block; font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: 4px; text-decoration: none; color: var(--ink); background: var(--surface-2); border-left: 3px solid var(--stripe, var(--line)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.s-pending_approval { --stripe: var(--st-pending); } .chip.s-open, .chip.s-filling { --stripe: var(--st-filling); }
.chip.s-filled { --stripe: var(--st-filled); } .chip.s-unfilled { --stripe: var(--st-unfilled); }
.chip.s-completed { --stripe: var(--st-completed); } .chip.s-cancelled { --stripe: var(--st-cancelled); text-decoration: line-through; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week .col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); min-height: 260px; display: flex; flex-direction: column; }
.week .col-head { padding: 8px 10px; border-bottom: 1px solid var(--line); font-family: var(--font-cond); }
.week .col-head .n { font-size: 24px; font-weight: 700; line-height: 1; }
.week .col-head .d { font-size: 14px; color: var(--muted); font-weight: 600; }
.week .col.today .col-head { background: color-mix(in srgb, var(--signal) 18%, var(--surface)); }
.week .col-body { padding: 8px; display: grid; gap: 6px; align-content: start; }
.wjob { display: block; text-decoration: none; color: inherit; font-size: 13px; padding: 6px 8px; border-radius: var(--radius-s); background: var(--surface-2); border-left: 4px solid var(--stripe, var(--line)); }
.wjob b { display: block; font: 700 14px var(--font-cond); }
.wjob.s-pending_approval { --stripe: var(--st-pending); } .wjob.s-open, .wjob.s-filling { --stripe: var(--st-filling); }
.wjob.s-filled { --stripe: var(--st-filled); } .wjob.s-unfilled { --stripe: var(--st-unfilled); }
.wjob.s-completed { --stripe: var(--st-completed); } .wjob.s-cancelled { --stripe: var(--st-cancelled); opacity: .7; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 640px) {
  .week { grid-template-columns: minmax(0, 1fr); }
  .week .col { min-height: 0; }
  .week .col-head { display: flex; gap: 8px; align-items: baseline; }
  .month .day { min-height: 64px; padding: 4px; }
  .month .chip { font-size: 0; padding: 0; height: 6px; border-left: 0; background: var(--stripe); border-radius: 3px; }
  .cal-filters { margin-left: 0; width: 100%; }
  .cal-filters select { flex: 1; }
}
.daylist { margin-top: 14px; }

/* Stat line */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.stats > div { background: var(--surface); padding: 12px 14px; }
.stats b { display: block; font: 700 28px/1 var(--font-cond); }
.stats span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Offer card for employees */
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow); }
.offer-top { padding: 14px 16px; display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.offer-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.offer-actions button { min-height: 52px; border: 0; background: var(--surface); font-weight: 700; font-size: 16px; cursor: pointer; }
.offer-actions button + button { border-left: 1px solid var(--line); }
.offer-actions .yes { color: var(--st-filled); }
.offer-actions .no { color: var(--st-unfilled); }
.offer-note { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--surface-2); }

/* Rules page */
.rule { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.rule:last-child { border-bottom: 0; }
.rule .src { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 700px) { .rule { grid-template-columns: minmax(0, 1fr); } }

/* Messages */
.msg { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.msg:last-child { border-bottom: 0; }
.msg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.msg-body { font-size: 14px; overflow-wrap: anywhere; }
.chan { font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line); }
.chan.sms { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* PIN screen */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.gate .panel { width: min(380px, 100%); }

@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in .18s ease-out; }
  @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 6px); } }
}

.demo-bar label { display: flex; gap: 8px; align-items: center; white-space: nowrap; }

/* Employees */
.row-off td { opacity: .55; }
.emp-table td a { color: inherit; text-decoration: none; }
.emp-table td a:hover strong { text-decoration: underline; }
.skill-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--surface); font-size: 14px; }
.pick:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); font-weight: 600; }
.pick input { width: 16px; height: 16px; margin: 0; }
.skill-list li { grid-template-columns: 40px 1fr auto; }
.skill-list .who strong { display: inline; }
.skill-list .who .small { display: block; }
@media (max-width: 560px) { .skill-list li { grid-template-columns: 32px 1fr; } .skill-list .btn-row { grid-column: 2; } }

/* New version banner */
.update-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; gap: 12px; align-items: center;
  background: var(--ink); color: var(--bg); padding: 8px 10px 8px 16px; border-radius: var(--radius-m); font-weight: 600; font-size: 14px;
  max-width: calc(100vw - 32px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.brand-name { white-space: nowrap; }
.brand > div:last-child { min-width: 0; }
.side .brand { gap: 8px; padding-left: 4px; padding-right: 4px; }
.side .brand-name { font-size: 19px; }
.side .brand-ver { font-size: 12px; }

/* Grid children must be allowed to shrink, or a wide table pushes the page sideways on phones. */
.stack > *, .grid-2 > * { min-width: 0; }
@media (max-width: 640px) {
  /* Employees on a phone: name, classification, status. The rest is one tap away. */
  .emp-table th:nth-child(3), .emp-table td:nth-child(3),
  .emp-table th:nth-child(4), .emp-table td:nth-child(4),
  .emp-table th:nth-child(5), .emp-table td:nth-child(5),
  .emp-table th:nth-child(7), .emp-table td:nth-child(7) { display: none; }
}

select.locked { background: var(--surface-2); pointer-events: none; }
.sub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sub-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Reports */
.linknum { border: 0; background: none; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-variant-numeric: tabular-nums; }
.row-now td { background: color-mix(in srgb, var(--signal) 10%, transparent); }
dialog .table-wrap { max-height: 60vh; overflow: auto; }

/* Printing: just the page content */
@media print {
  .demo-bar, .side, .tabbar, .no-print, .toast, .update-bar, .btn { display: none !important; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  body { background: #fff; color: #000; font-size: 12px; }
  .panel, .stats > div { box-shadow: none; border-color: #bbb; }
  .linknum { color: #000; text-decoration: none; }
  a { color: #000; text-decoration: none; }
}

/* Half screen (Bill: the calendar next to other systems). Between phone and full desktop the menu becomes an icon rail. */
@media (min-width: 641px) and (max-width: 1100px) {
  .shell { grid-template-columns: 60px 1fr; }
  .side { padding: 12px 8px; align-items: center; }
  .side .brand { padding: 4px 0 14px; justify-content: center; }
  .side .brand > div:last-child, .side .nav a span:not(.count), .side-foot { display: none; }
  .side .nav { width: 100%; }
  .side .nav a { justify-content: center; padding: 10px 0; position: relative; }
  .side .nav .count { position: absolute; top: 2px; right: 2px; margin: 0; font-size: 10px; padding: 0 5px; }
  main { padding: 20px 20px 60px; }
  .week { gap: 4px; }
  .week .col-head { padding: 6px; }
  .week .col-body { padding: 4px; gap: 4px; }
  .wjob { font-size: 12px; padding: 4px 5px; border-left-width: 3px; }
  .wjob b { font-size: 13px; }
  .cal-bar .title { min-width: 0; font-size: 19px; }
  .cal-filters { margin-left: 0; }
}

/* Week view with hourly rows, like Outlook (Nick, Nov 5).
   One scroll box: day names stay at the top, hours stay at the left.
   A job block runs from its start minute to its end minute; overlapping jobs share the column. */
.tgrid {
  --hour: 44px; --gutter: 56px; position: relative;
  display: grid; grid-template-columns: var(--gutter) repeat(7, minmax(0, 1fr)); grid-template-rows: auto calc(var(--hour) * 24);
  max-height: min(70vh, 720px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface);
  overscroll-behavior: contain;
}
.tg-corner { position: sticky; top: 0; left: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.tg-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line);
  padding: 6px 8px; font-family: var(--font-cond); white-space: nowrap; }
.tg-head .d { font-size: 14px; color: var(--muted); font-weight: 600; }
.tg-head .n { font-size: 20px; font-weight: 700; }
.tg-head.today { background: color-mix(in srgb, var(--signal) 22%, var(--surface)); }
.tg-hours { position: sticky; left: 0; z-index: 2; background: var(--surface); grid-row: 2; grid-column: 1; }
.tg-hour { height: var(--hour); font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.tg-day { grid-row: 2; position: relative; border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% var(--hour); }
.tg-day.today { background-color: color-mix(in srgb, var(--signal) 6%, transparent); }
.tg-now { position: absolute; left: 0; right: 0; top: calc(var(--at) / 60 * var(--hour)); border-top: 2px solid var(--st-unfilled); z-index: 1; }
.tjob {
  position: absolute; z-index: 1; overflow: hidden; text-decoration: none; color: var(--ink);
  top: calc(var(--start) / 60 * var(--hour)); height: max(22px, calc((var(--end) - var(--start)) / 60 * var(--hour) - 2px));
  left: calc(var(--lane) / var(--lanes) * 100% + 2px); width: calc(100% / var(--lanes) - 4px);
  background: color-mix(in srgb, var(--stripe, var(--line)) 16%, var(--surface)); border-left: 4px solid var(--stripe, var(--line));
  border-radius: 4px; padding: 3px 6px; font-size: 12px; line-height: 1.25; box-shadow: 0 0 0 1px var(--surface);
}
.tjob:hover, .tjob:focus-visible { z-index: 2; box-shadow: 0 0 0 2px var(--brand); }
.tjob b { display: block; font: 700 12px var(--font-cond); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tjob .t { display: block; font-weight: 600; }
.tjob .w { display: block; color: var(--muted); }
.tjob.cont { border-top: 2px dashed var(--stripe, var(--line)); border-top-left-radius: 0; border-top-right-radius: 0; }
.tjob.goes-on { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tjob.s-pending_approval { --stripe: var(--st-pending); } .tjob.s-open, .tjob.s-filling { --stripe: var(--st-filling); }
.tjob.s-filled { --stripe: var(--st-filled); } .tjob.s-unfilled { --stripe: var(--st-unfilled); }
.tjob.s-completed { --stripe: var(--st-completed); } .tjob.s-cancelled { --stripe: var(--st-cancelled); opacity: .7; text-decoration: line-through; }
.cal-filters { margin-bottom: 14px; }
.who-pick { border: 0; padding: 0; margin: 0; }
.who-pick .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.print-only { display: none; }

/* Phone: one day fills the width. Swipe sideways for the next day; the hours stay put. */
@media (max-width: 640px) {
  .tgrid { --gutter: 44px; grid-template-columns: var(--gutter) repeat(7, calc(100vw - 32px - 2px - var(--gutter)));
    scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); max-height: 68vh; }
  .tg-head, .tg-day { scroll-snap-align: start; }
}

/* Print the calendar on one landscape page: all 24 hours, smaller rows. */
@page cal { size: letter landscape; margin: 0.4in; }
@media print {
  .print-only { display: block; }
  .print-title { font-weight: 600; margin: 0 0 6px; }
  .cal-bar, .cal-filters, .legend { display: none !important; }
  main:has(.cal-print) .page-head { display: none !important; }
  .cal-print { page: cal; }
  .tg-day { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tgrid { --hour: 20px; max-height: none; overflow: visible; grid-template-columns: 46px repeat(7, minmax(0, 1fr)); }
  .tg-hour { font-size: 8px; white-space: nowrap; transform: translateY(-5px); }
  .tg-head, .tg-corner, .tg-hours { position: static; }
  .tg-now { display: none; }
  .tjob { font-size: 8px; padding: 1px 3px; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tjob b { font-size: 8px; } .tjob .w { display: none; }
  .month .day { min-height: 70px; break-inside: avoid; }
  .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.filt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.filt-grid .who-pick { grid-column: 1 / -1; }
@media (max-width: 640px) { .filt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.install-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.side-install { display: block; background: none; border: 1px solid rgba(255,255,255,.35); color: inherit; border-radius: var(--radius-s); padding: 4px 8px; margin-bottom: 8px; font: inherit; cursor: pointer; }
.side-install:hover { background: rgba(255,255,255,.08); }
ol.steps { padding-left: 20px; display: grid; gap: 6px; }
.row-bad td { background: color-mix(in srgb, var(--st-unfilled) 8%, transparent); }
.small.warn { color: var(--ink); background: color-mix(in srgb, var(--signal) 18%, transparent); border-radius: 4px; padding: 1px 4px; margin-top: 2px; }

/* Job record: printable, plain */
.rec { display: grid; gap: 18px; }
.rec-head { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.rec-title { font-size: 24px; margin: 2px 0; }
.rec-meta { line-height: 1.6; }
.rec-sec h2 { font-size: 17px; margin: 0 0 6px; }
.rec-sec h3 { font-size: 14px; margin: 12px 0 4px; }
.rec-table { width: 100%; font-size: 13px; }
.rec-table th, .rec-table td { padding: 4px 6px; }
.rec-list { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }
.rec-when { font-variant-numeric: tabular-nums; color: var(--muted); }
@media print {
  .rec { box-shadow: none; border: 0; padding: 0; }
  .rec-sec { break-inside: auto; }
  .rec-table tr { break-inside: avoid; }
  .rec-rules { break-before: page; }
}
.rec-rules .rec-table { table-layout: fixed; }
.rec-rules .rec-table td:nth-child(1) { width: 34%; }
.rec-rules .rec-table td:nth-child(2) { width: 20%; }

/* Text messages opt-in (My overtime). The consent words sit right next to the box people tick. */
.sms-form { display: grid; gap: 12px; }
.check.consent { max-width: 680px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2, transparent); }
.check.consent input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
.check.consent span { font-size: 14px; line-height: 1.5; }
.sms-panel .btn-row { align-items: center; }
