/* Taimaka logistics. The dashboards' design (OTP dashboard app.css, v2 of 12 Oct 2026), so the pages look the same
   inside a dashboard's Requests tab: the same tokens, chips, buttons and cards. Orange for what needs attention,
   teal only for links and buttons, grey chips for plain labels. Change the tokens there and here together. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("/static/fonts/plex-sans.woff2?v=1") format("woff2"); }

:root {
  --ground: #F1F4F3;
  --surface: #FFFFFF;
  --inset: #F6F8F7;
  --line: #CDD5D2;
  --line-soft: #DFE5E2;
  --line-strong: #8C9893;
  --ink: #111816;
  --ink-2: #2F3A37;
  --muted: #46534E;
  --faint: #66716C;
  --teal: #0A6767;
  --teal-dark: #064545;
  --teal-bg: #E2F0EF;
  --teal-line: #9BCDC9;
  --hot: #B03F05;
  --hot-bg: #FFF3E9;
  --hot-line: #F5C9A6;
  --chip: #EDF0EF;
  --shadow: 0 1px 2px rgba(17, 24, 22, .05), 0 1px 1px rgba(17, 24, 22, .03);
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--ground); font-size: 15px; line-height: 1.5; }
body.embed { background: transparent; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
h1, h2, h3 { margin: 0; }
.lbl { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.hot { color: var(--hot) !important; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar: only on this app's own pages, never inside a dashboard's frame */
.topbar { display: flex; align-items: center; gap: 32px; height: 60px; padding: 0 40px; background: var(--surface); border-bottom: 1px solid var(--line-soft); box-shadow: var(--shadow); white-space: nowrap; position: sticky; top: 0; z-index: 30; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand::before { content: ""; width: 22px; height: 22px; border-radius: 6px; background: url("/static/favicon.svg?v=1") center / 100% no-repeat; }
.nav { display: flex; align-self: stretch; gap: 2px; }
.nav a { display: flex; align-items: center; padding: 0 12px; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.nav a[aria-current="page"] { color: var(--teal); border-bottom-color: var(--teal); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }

main { max-width: 1240px; margin: 0 auto; padding: 28px 40px 64px; display: flex; flex-direction: column; gap: 22px; }
body.embed main { max-width: none; padding: 0 0 8px; }
main.wide { max-width: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 36px; font-weight: 700; letter-spacing: -0.025em; }
body.embed .page-head h1 { font-size: 28px; }
.page-head .sub { font-size: 15px; color: var(--muted); margin-top: 2px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 20px 24px; box-shadow: var(--shadow); }
.chip { font-size: 12px; padding: 4px 8px; border-radius: 6px; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.chip.hot { background: var(--hot-bg); color: var(--hot); font-weight: 600; }
.notice { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--hot-bg); color: var(--hot); font-size: 13px; }
.notice.ok { background: var(--teal-bg); color: var(--teal-dark); }
.switch { display: flex; gap: 6px; flex-wrap: wrap; }

/* buttons and fields: tap targets at least 34px, borders 3:1 */
select, .btn, input[type="text"], input[type="number"], textarea { font: inherit; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; text-decoration: none; cursor: pointer; line-height: 1.2; min-height: 44px; }
.btn:hover { color: var(--ink); border-color: var(--teal); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--teal-dark); color: #fff; }
.btn.small { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.btn.go { background: var(--teal-bg); border-color: var(--teal-line); color: var(--teal-dark); font-weight: 600; }
.btn.go:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.linkish { font: inherit; font-size: 13px; color: var(--teal); background: none; border: 0; padding: 0 4px; min-height: 36px; cursor: pointer; text-decoration: underline; }
input[type="text"], input[type="number"], select { padding: 10px 12px; min-height: 44px; font-size: 15px; }
input[type="text"] { width: 100%; }
input:focus-visible, select:focus-visible, .btn:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---- the board: one column per step, the most urgent and oldest first ------------------------------------------ */
main.wide { max-width: none; padding-left: 20px; padding-right: 20px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: stretch; }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 160px; padding: 8px; border-radius: 12px; border: 1px dashed transparent; background: rgba(255, 255, 255, .45); }
.col.can-drop { border-color: var(--teal-line); background: var(--teal-bg); }
.col.over { border-color: var(--teal); border-style: solid; }
.col > h2 { font-size: 16px; display: flex; gap: 6px; align-items: center; }
.col > h2 .num { font-size: 13px; color: var(--muted); font-weight: 400; }
.col-sub { margin-top: -6px; }
.route { display: flex; flex-direction: column; gap: 10px; }
.route > h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 0 0; }
/* the steps, numbered (2 Nov 2026: for people who seldom use web pages); on a phone they are tabs, one step at a time */
.how { font-size: 14px; color: var(--ink-2); }
.how .narrow-only, .steps { display: none; }
.step { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
.step[aria-current="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.step[aria-current="true"] .step-n { background: #fff; color: var(--teal); }
.step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--ink-2); font-size: 12px; font-weight: 700; flex: none; }
@media (max-width: 760px) {
  .how .wide-only { display: none; }
  .how .narrow-only { display: inline; }
  .steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .board { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  html.js .board[data-one] .col { display: none; }
  html.js .board[data-one] .col.on { display: flex; }
  main { padding: 20px 16px 48px; }
  .topbar { padding: 0 16px; gap: 16px; }
  .topbar .who { display: none; }             /* a phone: the name doesn't fit beside the pages and Sign out */
  .brand { font-size: 16px; }
  .page-head h1 { font-size: 28px; }
}

/* a facility in a step: a white card with its items, each moved on its own (Justin, 10 Nov 2026) */
.grp { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.grp-h { font-size: 14px; color: var(--muted); padding-bottom: 2px; }
.grp-h b { color: var(--ink); }

/* ---- an item (the board, a facility's request, a refused item) ------------------------------------------------- */
.it { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.grp-h + .it, .basket-head + .it, .decide > p + .it, .decide > h2 + .it, .fold-body > .it:first-child { border-top: 0; }
.it[draggable="true"] { cursor: grab; }
.it.dragging { opacity: .45; }
.it:target { outline: 2px solid var(--teal-line); outline-offset: 4px; border-radius: 6px; }
.it-t { font-size: 15px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.meta { font-size: 14px; }
.note { margin: 0; font-size: 14px; color: var(--ink-2); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btns form { margin: 0; }
.btn.wide { width: 100%; justify-content: center; }
.acts { margin-top: 4px; }
.box { display: grid; gap: 8px; padding: 6px 0 2px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.row form { margin: 0; }
details > summary { cursor: pointer; list-style: none; font-size: 13px; color: var(--teal); min-height: 34px; display: inline-flex; align-items: center; }
details > summary::-webkit-details-marker { display: none; }
.when > summary { font-size: 14px; }
.more[open] > summary, .when[open] > summary, .hist[open] > summary { color: var(--ink); font-weight: 600; }
.when input[type="date"] { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); min-height: 40px; max-width: 12em; }
.undo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; background: var(--teal-bg); color: var(--teal-dark); border-radius: 8px; padding: 6px 10px; }
.hist ol { margin: 4px 0 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.fold > summary { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; min-height: 0; }
.fold > summary h2 { display: inline; font-size: 17px; color: var(--teal); }
.fold-body { max-width: 760px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 4px 16px; }

/* a facility's requests: what needs a decision first, then each request as it was made */
.reqs { display: grid; gap: 12px; max-width: 820px; }
.basket { padding: 12px 16px; display: flex; flex-direction: column; max-width: 820px; }
.basket:target { outline: 2px solid var(--teal-line); }
.basket-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; padding-bottom: 4px; }
.basket-head b { font-size: 15px; }
.decide > h2 { font-size: 18px; }
.decide > p { margin: 2px 0 4px; }

/* the form: one facility, then an item per line */
.form-card { max-width: 760px; display: grid; gap: 16px; }
.lab { font-weight: 600; font-size: 14px; }
.fixed { display: flex; align-items: baseline; gap: 8px; }
.line { border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--inset); }
.line-head { display: flex; justify-content: space-between; align-items: center; }
.line-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.line-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.line-grid select, .line-grid input { width: 100%; }
.line-grid .wide { grid-column: 1 / -1; }
.qty { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 6px; }
.dupe { margin: 0; padding: 8px 10px; background: var(--surface); border-radius: 8px; color: var(--ink-2); font-size: 13px; }
@media (max-width: 760px) { .line-grid { grid-template-columns: minmax(0, 1fr); } }   /* a phone: one question a row */
.pick-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .pick-row { grid-template-columns: minmax(0, 1fr); } }
.pick { position: relative; display: block; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pick span { display: flex; align-items: center; gap: 6px; height: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 14px; line-height: 1.3; cursor: pointer; }
.pick input:checked + span { background: var(--teal-bg); border-color: var(--teal); color: var(--teal-dark); font-weight: 600; }
.pick input:checked + span::before { content: "✓"; }
.pick input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.pick.small span { min-height: 36px; font-size: 13px; padding: 6px 10px; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
html:not(.js) [data-js] { display: none !important; }
table.plain { border-collapse: collapse; font-size: 14px; }
table.plain td, table.plain th { text-align: left; padding: 6px 14px 6px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }

.btns > details[open] { flex-basis: 100%; }
.contents { display: contents; }
.refuse > summary.btn { color: var(--ink); font-weight: 400; }
details > summary.btn { color: var(--teal-dark); font-size: 13px; min-height: 36px; }
.row .linkish { text-decoration: none; padding: 0; font-size: 13px; }
