:root {
  --bg: #eef3f4; --surface: #ffffff; --raised: #f7fafa; --ink: #13262d; --muted: #566c74; --line: #d3dee1;
  --accent: #0d7680; --accent-ink: #ffffff; --tint: #dff0f1; --navy: #1c3554;
  --good: #2c7a4c; --good-tint: #e2f2e8; --warn: #9a6200; --warn-tint: #fbf0d9; --bad: #b0352d; --bad-tint: #fbe7e5;
  --f-display: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --f-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 10px; color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0e171b; --surface: #162329; --raised: #1b2b32; --ink: #e2ebed; --muted: #9bb0b7; --line: #2a3c44;
  --accent: #3db3bc; --accent-ink: #052528; --tint: #133b41; --navy: #0a2a40;
  --good: #6cc492; --good-tint: #163527; --warn: #e6ab3e; --warn-tint: #3a2c10; --bad: #f07d74; --bad-tint: #3d1c19;
  color-scheme: dark; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--f-body); padding-bottom: env(safe-area-inset-bottom, 0px); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--navy); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; }
p { margin: 0; }
.wrap { max-width: 780px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--f-mono); font-size: .86em; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.eyebrow { font: 600 .74rem/1 var(--f-body); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--navy); color: #fff; }
.bar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; min-height: 54px; }
.brand { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.brand b { font: 700 1.15rem/1 var(--f-display); white-space: nowrap; }
.brand span { font-size: .85rem; color: #c9d8e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
main.wrap { padding-block: 20px 64px; display: grid; gap: 18px; }

button, .btn { font: 600 .95rem/1 var(--f-body); border-radius: 8px; padding: 11px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 44px; }
button:hover { border-color: var(--accent); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ghost { background: transparent; } .danger { color: var(--bad); }
button[disabled] { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .spread { justify-content: space-between; }

label.f { display: grid; gap: 6px; min-width: 0; }
label.f > span { font-weight: 600; font-size: .92rem; }
label.f small { color: var(--muted); font-size: .82rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], select, textarea {
  font: 400 1rem/1.3 var(--f-body); color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%; min-height: 44px; }
textarea { min-height: 84px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 .93rem/1.2 var(--f-body); padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); cursor: pointer; min-height: 42px; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.q { display: grid; gap: 8px; } .q > .lbl { font-weight: 600; font-size: .95rem; }

em.req, em.opt { font: 600 .66rem/1 var(--f-body); font-style: normal; letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
em.req { color: var(--warn); background: var(--warn-tint); border: 1px solid var(--warn); }
em.opt { color: var(--muted); border: 1px solid var(--line); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 16px; min-width: 0; }
.note { border-radius: 8px; padding: 12px 14px; font-size: .93rem; display: grid; gap: 4px; }
.note b { font-weight: 600; }
.note.bad { background: var(--bad-tint); border-left: 4px solid var(--bad); }
.note.warn { background: var(--warn-tint); border-left: 4px solid var(--warn); }
.note.info { background: var(--tint); border-left: 4px solid var(--accent); }
.note.good { background: var(--good-tint); border-left: 4px solid var(--good); }

.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem/1 var(--f-body); letter-spacing: .04em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-Draft, .s-pending, .s-disabled { background: var(--raised); color: var(--muted); border: 1px solid var(--line); }
.s-Submitted { background: var(--tint); color: var(--accent); }
.s-Needs { background: var(--warn-tint); color: var(--warn); }
.s-Approved, .s-Shipped, .s-approved { background: var(--good-tint); color: var(--good); }

.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-align: left; width: 100%; font: inherit; color: inherit; cursor: pointer; }
.item .t { font-weight: 600; font-size: 1.02rem; min-width: 0; }
.item .m { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; display: flex; gap: 6px 14px; flex-wrap: wrap; }
.item .flag { grid-column: 1 / -1; font-size: .88rem; color: var(--warn); }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; padding: 12px 12px 10px; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.steps button { min-height: 0; padding: 0 0 8px; border: 0; background: transparent; text-align: left; display: grid; gap: 6px; font: 500 .78rem/1.2 var(--f-body); color: var(--muted); }
.steps button::before { content: ""; height: 5px; border-radius: 3px; background: var(--line); }
.steps button.done::before { background: var(--accent); opacity: .55; }
.steps button.on { color: var(--ink); font-weight: 600; } .steps button.on::before { background: var(--accent); }
@media (max-width: 480px) { .steps button span.l { display: none; } .steps button.on span.l { display: inline; } }
.foot { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.slot { border: 1.5px dashed var(--line); border-radius: var(--r); background: var(--raised); display: grid; grid-template-rows: auto 1fr; overflow: hidden; min-width: 0; }
.slot.has { border-style: solid; border-color: var(--accent); }
.slot.need { border-color: var(--warn); }
.slot .pv { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.slot .pv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.slot .pv svg { width: 38px; height: 38px; color: var(--muted); }
.slot .pv .rm { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(10,20,25,.72); color: #fff; font: 600 1.25rem/1 var(--f-body); display: grid; place-items: center; z-index: 1; }
.slot .meta { padding: 10px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.slot .meta b { font-size: .92rem; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; overflow-wrap: anywhere; }
.slot .meta b em { margin-left: 0; }
.slot .meta small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.slot label.up { position: relative; display: inline-flex; align-items: center; justify-content: center; font: 600 .86rem/1 var(--f-body); color: var(--accent); border: 1px solid var(--accent); border-radius: 7px; padding: 9px 10px; margin-top: 6px; cursor: pointer; min-height: 40px; }
.slot label.up input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.busy { opacity: .6; pointer-events: none; }

.ruler { display: grid; gap: 6px; }
.ruler .r { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; font-size: .86rem; }
.ruler .track { height: 10px; background: var(--raised); border: 1px solid var(--line); border-radius: 5px; position: relative; overflow: hidden; }
.ruler .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); opacity: .75; border-radius: 5px; }
.ruler .r.q .fill { background: var(--navy); opacity: .9; }

.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; border-top: 1px solid var(--line); }
.kv > div { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(odd) { color: var(--muted); padding-right: 12px; }
.unit { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 16px; background: var(--surface); }
.unit > header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.fit { border: 2px solid var(--accent); background: var(--tint); }
.tag { font: 600 .72rem/1 var(--f-body); letter-spacing: .07em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; background: var(--warn-tint); color: var(--warn); }
.kit { display: flex; flex-wrap: wrap; gap: 6px; }
.kit span { font-size: .85rem; padding: 6px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.lightbox { position: fixed; inset: 0; background: rgba(5,15,20,.88); display: grid; place-items: center; z-index: 20; padding: 16px; }
.lightbox img { max-height: 86vh; max-width: 100%; border-radius: 8px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 8px; font-weight: 500; z-index: 30; max-width: calc(100% - 32px); }
.login { max-width: 440px; margin: 6vh auto 0; }
.code-in { font: 600 1.6rem/1 var(--f-mono) !important; letter-spacing: .3em; text-align: center; }
.person { display: grid; gap: 8px; }
