/* DragonFly look: white background, gray outlines, dark gray text, green for actions and "going well",
   yellow for "needs attention", red for "problem". Light only.
   Each part of the work has its own color (a "tone"), on its menu section and its pages: green for orders
   going out, blue for what is coming in, purple for what sits on the floor and the rules, teal for stock.
   An order's steps use the same colors: yellow waiting, blue being worked, purple ready, green done. */
:root {
  --ink: #1F1F1F; --ink-2: #6B6B6B; --dark: #3A3A3A; --outline: #DDDDDD; --line: #EBEBEB; --soft: #FAFAFA;
  --green: #1F9D55; --green-ink: #157A40; --green-soft: #E9F6EE; --green-line: #BFE3CD;
  --yellow: #D9A400; --yellow-ink: #8A6A00; --yellow-soft: #FFF7DB; --yellow-line: #F2DC8C;
  --red: #D93A3A; --red-ink: #A42828; --red-soft: #FDECEC; --red-line: #F3C3C3;
  --blue: #2F7FD1; --blue-ink: #17558F; --blue-soft: #E8F2FC; --blue-line: #BCD8F3;
  --purple: #7168D6; --purple-ink: #463DA3; --purple-soft: #EFEEFD; --purple-line: #CFCBF5;
  --teal: #1A9A8A; --teal-ink: #0E6B60; --teal-soft: #E3F5F2; --teal-line: #AEDFD8;
  --tone: var(--green); --tone-ink: var(--green-ink); --tone-soft: var(--green-soft);
  --action: #A8679A; --action-ink: #6E2A5E; --action-soft: #F4E8F1; --action-line: #DDC0D6;
  --body: "Geist", "Segoe UI", system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
.tone-green { --tone: var(--green); --tone-ink: var(--green-ink); --tone-soft: var(--green-soft); }
.tone-blue { --tone: var(--blue); --tone-ink: var(--blue-ink); --tone-soft: var(--blue-soft); }
.tone-purple { --tone: var(--purple); --tone-ink: var(--purple-ink); --tone-soft: var(--purple-soft); }
.tone-teal { --tone: var(--teal); --tone-ink: var(--teal-ink); --tone-soft: var(--teal-soft); }
.tone-gray { --tone: #8A8A8A; --tone-ink: var(--dark); --tone-soft: #F3F3F3; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #fff; }
body { color: var(--ink); font: 14px/1.45 var(--body); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
a { color: var(--green-ink); text-underline-offset: 2px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.nw { white-space: nowrap; }
.small { font-size: 12px; }
.r { text-align: right; }
.hidden { display: none !important; }

/* shell */
/* The menu stays where it is while the page beside it scrolls. */
#root { height: 100%; }
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; }
.side { border-right: 1px solid var(--outline); padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; overflow: auto; }
.brand { display: flex; flex-direction: column; padding: 0 8px; }
.brand b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.brand small { color: var(--ink-2); font-size: 11.5px; }
/* the three apps, and the floor or client the current one is seen through */
.apps { display: flex; flex-direction: column; gap: 6px; }
.apps a { display: flex; justify-content: space-between; align-items: baseline; border: 1px solid var(--outline); border-radius: 14px; padding: 9px 12px; text-decoration: none; color: var(--ink); }
.apps a small { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.apps a:hover { background: var(--soft); }
.apps a[aria-current="true"] { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.apps a[aria-current="true"] b, .apps a[aria-current="true"] small { color: var(--green-ink); }
.viewing select { width: 100%; }
.navgroup { display: flex; flex-direction: column; gap: 1px; }
/* A category heading in the menu: darker and heavier than the page links under it, with a line above each
   category after the first so the groups read as groups. */
.navgroup h3 { padding: 0 6px 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--tone-ink); display: flex; align-items: center; gap: 9px; }
/* The section's picture, on a tile in the section's color. */
.gi { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 24%, #fff); }
.gi svg { width: 15px; height: 15px; }
.navgroup + .navgroup { border-top: 1px solid var(--outline); padding-top: 16px; }
/* The pages of a section hang off a thin rail in its color, which runs down from the tile. The open page fills in on the rail. */
.nav a { position: relative; display: flex; justify-content: space-between; align-items: center; margin-left: 17px; padding: 7px 12px 7px 16px; border-radius: 0 10px 10px 0; color: #525252; font-weight: 500; text-decoration: none; }
.nav a::before { content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--tone) 26%, #fff); }
.nav a:hover { background: color-mix(in srgb, var(--tone-soft) 55%, #fff); color: var(--ink); }
.nav a:hover::before { background: color-mix(in srgb, var(--tone) 60%, #fff); }
.nav a[aria-current="page"] { background: var(--tone-soft); color: var(--tone-ink); font-weight: 600; }
.nav a[aria-current="page"]::before { background: var(--tone); width: 3px; }
/* The page the tour is talking about. */
.nav a[data-touring] { outline: 2px solid var(--tone); outline-offset: 1px; border-radius: 10px; }
.brand-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tour-btn { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--outline); background: #fff; color: var(--ink-2); font-weight: 700; font-size: 13px; cursor: pointer; line-height: 1; margin-right: 6px; }
.tour-btn:hover { border-color: var(--action); color: var(--action); background: var(--soft); }
.badge { font-family: var(--mono); font-size: 11px; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 10px; background: #F3F3F3; color: #525252; }
/* A count of things waiting for someone: the attention yellow, as a pastel fill with bolder text like the rest of the look. */
.badge.hot { background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--yellow-line); }
.who { margin-top: auto; border: 1px solid var(--outline); border-radius: 16px; padding: 12px 14px; background: var(--soft); display: flex; flex-direction: column; gap: 2px; }
.who small { font-size: 11.5px; color: var(--ink-2); }
.who .btn { align-self: flex-start; margin-top: 8px; }
main { overflow: auto; padding: 32px 40px 64px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.mh { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.mh .sub { color: var(--ink-2); margin-top: 8px; max-width: 72ch; }
.mh h1 { border-left: 6px solid var(--tone); padding-left: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* buttons and inputs */
.btn { border: 1px solid var(--outline); background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: #cfcfcf; background: var(--soft); }
/* The main action on a page ("New Inbound Shipment", "Ship Order"). Made the way the rest of the look is made,
   a pastel fill with bolder text in the same color, in a plum kept for these buttons alone. */
.btn.pri { background: var(--action-soft); border-color: var(--action-line); color: var(--action-ink); font-weight: 600; transition: background .12s ease, border-color .12s ease; }
.btn.pri:hover { background: color-mix(in srgb, var(--action-soft) 60%, var(--action-line)); border-color: var(--action); color: var(--action-ink); }
.btn.pri:active { background: var(--action-line); }
.btn.pri:focus-visible { outline-color: var(--action); }
.btn.sm { padding: 4px 11px; font-size: 12px; }
.btn.danger { color: var(--red-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], select, textarea {
  border: 1px solid var(--outline); background: #fff; border-radius: 10px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: transparent; }
input[type=file] { font-size: 13px; max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 500; font-size: 13px; border: 1px solid var(--outline); background: #fff; border-radius: 999px; padding: 7px 14px; margin-right: 10px; cursor: pointer; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form .s2 { grid-column: span 2; } .form .s3 { grid-column: span 3; } .form .s4 { grid-column: span 4; } .form .s6 { grid-column: span 6; }
.checks { display: flex; gap: 6px; flex-wrap: wrap; }
label.ck { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--outline); border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--ink); cursor: pointer; }
.tbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
/* short inputs inside a table row or a sentence */
.in-n { width: 84px; }
td .in-t { width: 120px; }
td input[type=date].in-t { width: 150px; }
.row.foot { margin-top: 14px; }
.tbar input[type=search] { width: 260px; }
.tbar .count { margin-left: auto; font-size: 12px; color: var(--ink-2); }

/* panels, tiles, tables */
.panel { border: 1px solid var(--outline); border-radius: 18px; padding: 20px 22px; min-width: 0; background: #fff; }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel > header h2::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); margin-right: 8px; vertical-align: 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--outline); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; }
.kpi .k-l { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 500; }
.kpi .k-v { font-size: 32px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .k-s { font-size: 12px; color: var(--ink-2); }
.kpi.good { background: var(--green-soft); border-color: var(--green-line); } .kpi.good .k-v { color: var(--green-ink); }
.kpi.warn { background: var(--yellow-soft); border-color: var(--yellow-line); } .kpi.warn .k-v { color: var(--yellow-ink); }
.kpi.bad { background: var(--red-soft); border-color: var(--red-line); } .kpi.bad .k-v { color: var(--red-ink); }
.kpi.info { background: var(--blue-soft); border-color: var(--blue-line); } .kpi.info .k-v { color: var(--blue-ink); }
.kpi.ready { background: var(--purple-soft); border-color: var(--purple-line); } .kpi.ready .k-v { color: var(--purple-ink); }
.tbl { overflow-x: auto; margin: 0 -22px; }
.tbl.scroll { max-height: 560px; overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #8a8a8a; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff; position: sticky; top: 0; }
th[title] { cursor: help; }
td { padding: 11px 14px; border-bottom: 1px solid #F2F2F2; vertical-align: top; }
th:first-child, td:first-child { padding-left: 22px; } th:last-child, td:last-child { padding-right: 22px; }
tr:last-child td { border-bottom: 0; }
th.r, td.r { text-align: right; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--soft); }
.empty { padding: 26px; text-align: center; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 20px; white-space: nowrap; background: #F5F5F5; color: #525252; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.good { background: var(--green-soft); color: var(--green-ink); }
.chip.warn { background: var(--yellow-soft); color: var(--yellow-ink); }
.chip.bad { background: var(--red-soft); color: var(--red-ink); }
.chip.info { background: var(--blue-soft); color: var(--blue-ink); }
.chip.ready { background: var(--purple-soft); color: var(--purple-ink); }
.pill { display: inline-block; border: 1px solid var(--outline); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; margin: 1px 2px 1px 0; white-space: nowrap; }
.t-bad { color: var(--red-ink); } .t-warn { color: var(--yellow-ink); } .t-good { color: var(--green-ink); }
.strong { font-weight: 600; }
.note { border-radius: 14px; padding: 11px 14px; font-size: 13px; border: 1px solid var(--outline); background: var(--soft); }
.note.warn { background: var(--yellow-soft); border-color: var(--yellow-line); color: var(--yellow-ink); }
.note.bad { background: var(--red-soft); border-color: var(--red-line); color: var(--red-ink); }
.note.good { background: var(--green-soft); border-color: var(--green-line); color: var(--green-ink); }
.hint { font-size: 12px; color: var(--ink-2); }
.err { color: var(--red-ink); font-size: 12.5px; min-height: 1.2em; }

/* overview: what needs a person, then one lane of numbers for each part of the work */
.needs { display: flex; flex-direction: column; }
.need { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.need:first-child { border-top: 0; } .need:hover { background: var(--soft); }
.need .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); flex: none; } .need.bad .dot { background: var(--red); }
.need .btn { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--outline); border-top: 3px solid var(--tone); color: var(--ink); text-decoration: none; }
.stat:hover { background: var(--soft); }
.stat .k-l { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 500; }
.stat b { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat small { font-size: 12px; color: var(--ink-2); }
.stat.warn { background: var(--yellow-soft); border-color: var(--yellow-line); border-top-color: var(--yellow); } .stat.warn b { color: var(--yellow-ink); }
.stat.bad { background: var(--red-soft); border-color: var(--red-line); border-top-color: var(--red); } .stat.bad b { color: var(--red-ink); }
.stat.info { background: var(--blue-soft); border-color: var(--blue-line); border-top-color: var(--blue); } .stat.info b { color: var(--blue-ink); }
.stat.ready { background: var(--purple-soft); border-color: var(--purple-line); border-top-color: var(--purple); } .stat.ready b { color: var(--purple-ink); }
.stat.good { background: var(--green-soft); border-color: var(--green-line); border-top-color: var(--green); } .stat.good b { color: var(--green-ink); }
.lanes { align-items: stretch; }
@media (max-width: 1100px) { .lanes { grid-template-columns: minmax(0, 1fr); } }

/* the 3D map: the scene on the left, what is chosen and what is waiting on the right */
.viewing + .viewing { margin-top: 8px; }
.map-bar { flex-wrap: wrap; margin-bottom: 12px; } .map-bar input { min-width: 240px; }
.seg-l { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-left: 8px; }
.btn[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; margin-top: 12px; }
#map-host { height: max(460px, calc(100vh - 250px)); border: 1px solid var(--outline); border-radius: 18px; overflow: hidden; background: #EEF1F4; position: sticky; top: 0; }
.map3d { position: relative; width: 100%; height: 100%; } .map3d canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.map-hint { position: absolute; left: 12px; right: 12px; bottom: 10px; font-size: 12px; color: var(--ink-2); pointer-events: none; }
.putaway { flex-wrap: nowrap; gap: 6px; } .putaway input[name="to"] { width: 130px; }
#pick-host { height: min(60vh, 560px); border: 1px solid var(--outline); border-radius: 14px; overflow: hidden; background: #EEF1F4; }
.map-side .panel { padding: 16px; } .map-side .tbl { margin: 0; }
.map-give { flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.move { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); } .move:first-of-type { border-top: 0; padding-top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13px; } .kv dt { color: var(--ink-2); } .kv dd { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; margin-bottom: 8px; }
.fc { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: #C9CDD2; }
.fc0 { background: #2F7FD1; } .fc1 { background: #7168D6; } .fc2 { background: #1A9A8A; } .fc3 { background: #B07A3C; }
.fc4 { background: #C0567F; } .fc5 { background: #5A6776; } .fc6 { background: #8A6A00; } .fc7 { background: #3F6B9A; }
.fc.pick { background: var(--green); } .fc.from { background: var(--yellow); } .fc.to { background: var(--blue); } .fc.free { background: #E3E6E9; }
@media (max-width: 1150px) { .map-wrap { grid-template-columns: minmax(0, 1fr); } #map-host { position: static; height: 460px; } }

/* an order opened under its own row: the row and what hangs from it share a color bar, so they read as one */
.caret { display: inline-block; width: 16px; color: var(--ink-2); }
tr.opened > td { background: var(--tone-soft); border-bottom: 0; } tr.opened > td:first-child { box-shadow: inset 4px 0 0 var(--tone); }
tr.open-row > td { padding: 0; background: var(--tone-soft); box-shadow: inset 4px 0 0 var(--tone); border-bottom: 2px solid var(--tone); }
.open-box { margin: 0 14px 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.open-box .panel { background: #fff; }

/* a SKU is something to click: it shows the item's photo */
.dlg-scroll .tbl { margin: 0; overflow: visible; }
.sku { cursor: pointer; border-bottom: 1px dotted var(--ink-2); } .sku:hover, .sku:focus-visible { color: var(--green-ink); border-bottom-color: var(--green); }
.sku-card { min-width: 0; } .sku-item { display: flex; flex-direction: column; gap: 8px; } .sku-item + .sku-item { border-top: 1px solid var(--line); padding-top: 14px; }
.sku-item img { width: 100%; max-height: 52vh; object-fit: contain; border: 1px solid var(--outline); border-radius: 14px; background: var(--soft); }
.no-photo { display: grid; place-items: center; height: 150px; border: 1px dashed var(--outline); border-radius: 14px; color: var(--ink-2); background: var(--soft); }
@media print { .sku { border-bottom: 0; } }

/* weight-based items: the columns to write in beside the scale, and the box form at the pack station */
th.fill, td.fill { background: #FFF7DB !important; }
.blank { display: inline-block; min-width: 64px; height: 16px; border-bottom: 1.5px solid var(--ink); vertical-align: -2px; } .blank.s { min-width: 28px; }
.weigh { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); } .weigh:first-of-type { border-top: 0; padding-top: 0; }
.weigh .tbl { margin: 0; } .weigh-add { align-items: flex-end; } .weigh-add .in-n { width: 96px; }

/* pipeline steps */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.step { border: 1px solid var(--outline); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.step b { font-size: 13px; } .step span { font-size: 12px; color: var(--ink-2); }
.step .n { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.step.done { background: var(--green-soft); border-color: var(--green-line); } .step.done .n { color: var(--green-ink); }
.step.now { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

/* automation: the three levels, and each rule's Manual / Suggest / Auto switch */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.level { border: 1px solid var(--outline); background: #fff; border-radius: 18px; padding: 14px 16px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.level span { font-size: 12px; color: var(--ink-2); }
.level[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--green-soft); }
.seg { display: inline-flex; border: 1px solid var(--outline); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 13px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
/* The chosen side is made like the rest of the look: a pastel fill with bolder text in the same color. */
.seg button[aria-pressed="true"] { background: var(--green-soft); color: var(--green-ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--green-line); }
/* a Yes/No switch: Yes is green when chosen, No is gray */
.seg.yn button[data-on="0"][aria-pressed="true"] { background: #F1F1F1; color: var(--dark); box-shadow: inset 0 0 0 1px var(--outline); }
.seg button:disabled { cursor: default; }
.rule p { max-width: 86ch; } .rule p + p, .rule form { margin-top: 8px; }

/* pick list: a tick box per line and a quantity that reads from arm's length; printed without the app around it */
td.tick { width: 28px; font-size: 16px; color: var(--ink-2); }
td.big { font-size: 15px; }
tr.band td { background: var(--soft); }
tr.grp td { border-top: 2px solid var(--outline); }
tr.sub td { font-size: 12px; font-weight: 600; color: var(--dark); background: var(--green-soft); }
.print-only { display: none; }
.sheet-head { align-items: baseline; gap: 18px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; font-size: 12.5px; }
.sheet-head b { font-size: 20px; margin-right: auto; }
.sheet-labels { font-size: 12.5px; margin: -6px 0 14px; }
.sheet-totals { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); } .sheet-totals .all { margin-left: auto; color: var(--ink); font-weight: 600; }
.sheet-head .sign { border-bottom: 1px solid var(--ink); min-width: 150px; }
@media print {
  @page { margin: 12mm; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .mh { display: none; }
  .sheet-head.print-only { display: flex; }
  p.print-only { display: block; } span.print-only { display: inline; }
  .panel + .panel { margin-top: 18px; }
  .panel header .hint { margin-left: 10px; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  td, th { padding-top: 5px; padding-bottom: 5px; }
  html, body { height: auto; }
  .app { display: block; height: auto; }
  .side, .mh .row, .no-print, .toasts { display: none !important; }
  main { overflow: visible; padding: 0; }
  .panel { border: 0; padding: 0; }
  .tbl { margin: 0; overflow: visible; }
  th { position: static; }
}

/* sign in */
.login { display: grid; place-items: center; min-height: 100%; padding: 24px; }
.login-card { width: min(400px, 100%); border: 1px solid var(--outline); border-radius: 22px; padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; }

/* dialog and toasts */
dialog { border: 1px solid var(--outline); border-radius: 22px; padding: 24px; width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: 0 24px 64px rgba(0, 0, 0, .12); }
dialog.wide { width: min(940px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(10, 10, 10, .22); }
dialog form { display: flex; flex-direction: column; gap: 14px; }
dialog h2 { font-size: 17px; }
dialog .f input, dialog .f select, dialog .f textarea { width: 100%; }
dialog .kpi { padding: 12px 14px; } dialog .kpi .k-v { font-size: 24px; }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
textarea.mono { font-family: var(--mono); font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.dlg-scroll { max-height: 40vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.dlg-scroll th:first-child, .dlg-scroll td:first-child { padding-left: 14px; }
.dlg-scroll th:last-child, .dlg-scroll td:last-child { padding-right: 14px; }
.who .row { margin-top: 8px; } .who .row .btn { margin-top: 0; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 40; width: min(380px, calc(100% - 32px)); }
.toast { background: #fff; border: 1px solid var(--outline); border-left: 3px solid var(--green); border-radius: 12px; padding: 10px 13px; box-shadow: 0 12px 32px rgba(0, 0, 0, .08); font-size: 13px; }
.toast.bad { border-left-color: var(--red); }

@media (max-width: 900px) {
  html, body { height: auto; }
  .app { grid-template-columns: 1fr; height: auto; }
  .side { border-right: 0; border-bottom: 1px solid var(--outline); }
  .who { margin-top: 0; }
  main { overflow: visible; padding: 20px 16px 48px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .levels { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; } .form .s2, .form .s3, .form .s4, .form .s6 { grid-column: auto; }
  .tbl { margin: 0 -22px; }
}

/* ---------- distinction: a light gray page with white sections on it, each section headed by a strip in its
   part's color, and tables with a clear header row, alternating rows and a marked row under the pointer ---------- */
main { background: #F4F5F7; }
.side { background: #fff; }
.brand b::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--green); margin-right: 8px; }
.mh { padding-bottom: 18px; border-bottom: 1px solid var(--outline); }

/* sections */
.panel { border-color: #D9DCE0; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .04); }
.panel > header { margin: -20px -22px 16px; padding: 11px 22px; background: var(--tone-soft); border-bottom: 1px solid color-mix(in srgb, var(--tone) 24%, #fff); border-radius: 17px 17px 0 0; }
.panel > header h2 { color: var(--tone-ink); font-size: 14.5px; }
.panel > header h2::before { width: 8px; height: 8px; border-radius: 2px; }
.panel > header .hint { color: color-mix(in srgb, var(--tone-ink) 70%, #6B6B6B); }
.map-side .panel > header { margin: -16px -16px 12px; padding: 9px 16px; }
/* Buttons and windows are made like the tiles ("Units Available"): a white or pastel face, a darker edge along
   the top, a soft shadow underneath. The main action's edge and face are plum; a plain button's are gray. */
.btn, input[type=file]::file-selector-button { border-radius: 11px; border-color: #D9DCE0; border-top: 2px solid #C3C8CE; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); padding-top: 6px; }
.btn:hover { border-color: #CBD0D6; border-top-color: #A9B0B8; background: #FAFBFC; }
.btn.sm { border-radius: 9px; padding-top: 3px; }
.btn.pri { border-color: var(--action-line); border-top-color: var(--action); }
.btn.pri:hover { border-color: var(--action-line); border-top-color: var(--action-ink); }
.btn.danger { border-top-color: var(--red); }
.btn:disabled { box-shadow: none; }
dialog { border-color: #D9DCE0; border-top: 4px solid var(--action); }
.tour { border-radius: 18px; }
.kpi, .stat, .apps a, .who { background: #fff; }
.kpi { border-top: 3px solid #C9CDD2; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.kpi.good { border-top-color: var(--green); } .kpi.warn { border-top-color: var(--yellow); } .kpi.bad { border-top-color: var(--red); }
.kpi.info { border-top-color: var(--blue); } .kpi.ready { border-top-color: var(--purple); }
.who { background: #F7F8F9; }
.tbar { background: #F7F8F9; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.map-bar, .open-box .tbar, form.tbar { background: #fff; }

/* tables */
th { background: #F1F3F5; color: #55595E; font-weight: 600; border-top: 1px solid var(--line); border-bottom: 1px solid #D9DCE0; }
.panel > header + .tbl th, .panel > header + .tbar + .tbl th { border-top: 0; }
td { border-bottom-color: #E9EBEE; }
:where(tbody tr:nth-child(even)) > td { background: #FAFBFC; }
:where(tbody tr:hover) > td { background: #F1F5F3; }
tr.click:hover td { background: var(--tone-soft); }
tr.click:hover td:first-child { box-shadow: inset 4px 0 0 var(--tone); }
td:first-child { font-weight: 500; }
.empty { background: #fff; font-weight: 400; }

@media print {
  main { background: #fff; }
  .panel { box-shadow: none; }
  .panel > header { margin: 0 0 10px; padding: 0; background: none; border: 0; }
  .panel > header h2, .panel > header .hint { color: var(--ink); }
  th { background: none; border-top: 0; }
  :where(tbody tr:nth-child(even)) > td, :where(tbody tr:hover) > td { background: none; }
}

/* ---------- the tour: a card over the corner of the page it is explaining ---------- */
.tour { position: fixed; right: 24px; bottom: 24px; z-index: 30; width: min(380px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--outline); border-top: 4px solid var(--tone);
  border-radius: 18px; padding: 16px 18px; display: grid; gap: 10px; box-shadow: 0 18px 44px -14px rgb(31 31 31 / .32), 0 2px 6px rgb(31 31 31 / .08); }
.tour h2 { font-size: 19px; letter-spacing: -.02em; }
.tour-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-where { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tone-ink); }
.tour-x { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--ink-2); cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.tour-x:hover { background: #F3F3F3; color: var(--ink); }
.tour-apps { display: flex; gap: 6px; flex-wrap: wrap; }
.tour-apps button { border: 1px solid var(--outline); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.tour-apps button[aria-pressed="true"] { border-color: var(--tone); background: var(--tone-soft); color: var(--tone-ink); font-weight: 600; }
progress.tour-bar { appearance: none; -webkit-appearance: none; width: 100%; height: 4px; border: 0; border-radius: 4px; background: #EFEFEF; overflow: hidden; }
progress.tour-bar::-webkit-progress-bar { background: #EFEFEF; }
progress.tour-bar::-webkit-progress-value { background: var(--tone); border-radius: 4px; }
progress.tour-bar::-moz-progress-bar { background: var(--tone); }
@media print { .tour { display: none; } }

/* ---------- approval requests: the button at the foot of the warehouse menu, and the mark on a flagged page ---------- */
.req-box { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border: 1px dashed var(--action-line); border-radius: 16px; padding: 12px 14px; background: #fff; }
.req-box .btn { justify-content: center; }
.req-box small { font-size: 11.5px; color: var(--ink-2); text-align: center; }
.req-box + .who { margin-top: 0; }
.note.flagged { margin-bottom: 16px; }
td.wrap { white-space: pre-wrap; min-width: 200px; max-width: 420px; overflow-wrap: anywhere; }
/* A pick line that has been pulled. */
tr.pulled td { background: var(--green-soft); color: var(--ink-2); }
/* The line or box that is selected: the one a Request Approval would be about. */
tr[data-sel] { cursor: pointer; }
tr.sel > td { background: var(--action-soft) !important; color: var(--ink); }
tr.sel > td:first-child { box-shadow: inset 4px 0 0 var(--action); }
td.tick input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; margin: 0; }

/* ---------- support tickets: the conversation, each message a small tile ---------- */
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: min(680px, 88%); border: 1px solid #D9DCE0; border-top: 3px solid #C3C8CE; border-radius: 14px; padding: 10px 14px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.msg.office { border-top-color: var(--green); background: var(--green-soft); border-color: var(--green-line); }
.msg.customer { border-top-color: var(--blue); background: var(--blue-soft); border-color: var(--blue-line); }
.msg.mine { align-self: flex-end; }
.msg-who { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
form.reply { display: grid; gap: 10px; }
form.reply textarea { width: 100%; }

/* ---------- scanning: the step the cursor is on, and what a scan did ---------- */
.panel.step-now { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); }
.panel.step-now > header h2::before { background: var(--action); }
.panel.step-done > header h2::after { content: "✓"; margin-left: 8px; color: var(--green-ink); }
.scan-ok { color: var(--green-ink); font-weight: 600; font-size: 13px; }
@keyframes scan-good { from { box-shadow: 0 0 0 4px var(--green-line); background: var(--green-soft); } to { box-shadow: 0 0 0 0 transparent; background: #fff; } }
@keyframes scan-bad { from { box-shadow: 0 0 0 4px var(--red-line); background: var(--red-soft); } to { box-shadow: 0 0 0 0 transparent; background: #fff; } }
input.scan-good { animation: scan-good .9s ease-out; }
input.scan-bad { animation: scan-bad 1.2s ease-out; }

/* ---------- billing: what each day cost, by type ---------- */
.pbody { display: grid; gap: 16px; }
/* One connected store on the Connections page. */
.pbody.store { border-top: 1px solid var(--line); padding-top: 20px; }
.pbody.store h3 { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.c-shipping { fill: color-mix(in srgb, var(--blue) 50%, #fff); background: color-mix(in srgb, var(--blue) 50%, #fff); }
.c-materials { fill: color-mix(in srgb, var(--teal) 50%, #fff); background: color-mix(in srgb, var(--teal) 50%, #fff); }
.c-handling { fill: color-mix(in srgb, var(--purple) 50%, #fff); background: color-mix(in srgb, var(--purple) 50%, #fff); }
.c-receiving { fill: color-mix(in srgb, var(--green) 50%, #fff); background: color-mix(in srgb, var(--green) 50%, #fff); }
.c-storage { fill: #C4C8CD; background: #C4C8CD; }
.c-other { fill: #E1E3E6; background: #E1E3E6; }
svg.costs { display: block; width: 100%; height: auto; max-height: 260px; }
svg.costs text { font-size: 11px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
svg.costs line { stroke: var(--line); stroke-dasharray: 3 3; } svg.costs line.axis { stroke: var(--outline); stroke-dasharray: none; }
svg.costs .hit { fill: transparent; } svg.costs g:hover .hit { fill: var(--soft); }
.cost-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
td.share { width: 40%; min-width: 120px; } td.share svg { display: block; width: 100%; height: 8px; border-radius: 4px; }
td.share .track { fill: var(--line); }
.chip.teal { background: var(--teal-soft); color: var(--teal-ink); }

/* The company logo beside the name, in place of the green square. */
.brand.has-logo { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.brand.has-logo .logo { grid-row: span 2; width: 40px; height: 40px; object-fit: contain; }
.brand.has-logo b::before { display: none; }

/* The sign-in page takes the logo's blue: the card's top edge, the button, and the outline of the box being typed in. */
.login-card { border-color: #D9DCE0; border-top: 4px solid var(--blue); background: #fff; box-shadow: 0 2px 10px rgba(16, 24, 40, .06); }
.login .btn.pri { background: var(--blue-soft); color: var(--blue-ink); border-color: var(--blue-line); border-top-color: var(--blue); justify-content: center; padding-top: 9px; padding-bottom: 10px; font-size: 14px; }
.login .btn.pri:hover { background: color-mix(in srgb, var(--blue-soft) 60%, var(--blue-line)); border-color: var(--blue-line); border-top-color: var(--blue-ink); color: var(--blue-ink); }
.login .btn.pri:active { background: var(--blue-line); }
.login input:focus, .login .btn:focus-visible { outline-color: var(--blue); }
.login .brand b { color: var(--blue-ink); font-size: 20px; }
.login .brand.has-logo .logo { width: 56px; height: 56px; }

/* ---------- Color Codes page ---------- */
.swatch { display: inline-block; width: 44px; height: 22px; border-radius: 7px; border: 1px solid rgb(0 0 0 / .06); vertical-align: middle; }
.sec-sw { display: inline-flex; align-items: center; gap: 9px; color: var(--tone-ink); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
