/* SGS screens.
   The Solo house style (the Tower OS brochure): black and white, hairlines and
   space, a wide uppercase display face, square corners, no shadows. Colour is
   used only for state (a dot plus a word) and, in orange, for the current tab. */

@font-face {
  font-family: Michroma;
  src: url("/fonts/michroma-latin-400-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #0b0b0c;
  --ink2: #3c3c41;
  --ink3: #76767c;
  --hair: #dedede;
  --tint: #f5f5f5;
  --d-body: rgba(255, 255, 255, .85);
  --d-mute: rgba(255, 255, 255, .55);
  --d-hair: rgba(255, 255, 255, .2);
  --orange: #f28c00;
  --green: #1fa64a;
  --green-ink: #1a8a3e;
  --red: #d9302c;
  --amber: #e7a100;
  --amber-ink: #9a6400;
  --grey-st: #8d8d94;
  --disp: Michroma, "Eurostile Extended", Eurostile, system-ui, sans-serif;
  --body: "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 14px/1.5 var(--body); color: var(--ink2); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
b, strong { color: var(--ink); font-weight: 600; }
.boot { padding: 40px; color: var(--ink3); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.bar :focus-visible, .signin :focus-visible { outline-color: #fff; }

/* ------------------------------ Type ------------------------------ */
.eyebrow, .kick { font: 500 11px/1.25 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); }
.title { font: 700 28px/1.08 var(--disp); letter-spacing: -.01em; text-transform: uppercase; color: var(--ink); -webkit-text-stroke: .35px currentColor; margin: 10px 0 8px; overflow-wrap: anywhere; }
.lead { font-size: 16px; line-height: 1.45; font-weight: 300; color: var(--ink2); max-width: 760px; }
.lead b { font-weight: 500; }
.muted { color: var(--ink3); }
.small { font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* --------------------------- Top bar ------------------------------ */
.bar { background: #000; color: #fff; min-height: 56px; display: flex; align-items: center; gap: 20px; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.bar img { height: 20px; width: auto; display: block; }
.bar .div { width: 1px; height: 24px; background: var(--d-hair); }
.bar .name { font: 700 12px/1 var(--disp); letter-spacing: .14em; }
.bar .sp { flex: 1; }
.bar .me { font-size: 13px; color: var(--d-body); text-align: right; line-height: 1.3; }
.bar .me small { display: block; font-size: 11px; color: var(--d-mute); }
.bar button.link { background: none; border: 0; color: #fff; font: 600 10.5px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; padding: 10px 0; cursor: pointer; }

/* Chips: an outline with a dot (live), or a hatched swatch (a trial or a test). */
.chip { display: inline-flex; align-items: center; gap: 7px; font: 600 9.5px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; padding: 6px 9px; white-space: nowrap; }
.chip.live { box-shadow: inset 0 0 0 1px currentColor; }
.chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.trial { background: #000; color: #fff; }
.chip.trial::before { content: ""; width: 12px; height: 8px; background: repeating-linear-gradient(135deg, #fff 0 1px, transparent 1px 2.6px); }
.bar .chip.trial { background: #fff; color: #000; }
.bar .chip.trial::before { background: repeating-linear-gradient(135deg, #000 0 1px, transparent 1px 2.6px); }
.chip.next { border: 1px dashed currentColor; padding: 5px 8px; }

/* ----------------------------- Shell ------------------------------ */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: calc(100vh - 56px); }
/* The supplier portal: no menu, one column. */
.shell.solo { grid-template-columns: minmax(0, 1fr); }
.nav { border-right: 1px solid var(--hair); padding: 22px 0 40px; position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto; }
.nav .group { padding: 0 28px; margin: 18px 0 6px; }
.nav a { display: block; padding: 7px 28px; font-size: 14px; color: var(--ink2); text-decoration: none; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a.on { color: var(--ink); font-weight: 700; box-shadow: inset 2px 0 0 var(--orange); }
.main { padding: 36px 40px 72px; max-width: 1320px; width: 100%; }
.foot { margin-top: 48px; padding-top: 14px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 16px; font: 500 11px/1.3 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.head .back { text-decoration: none; }
.head .back:hover { color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sec { margin-top: 36px; }
.sec > .sechead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid #000; margin-bottom: 4px; min-height: 40px; }
.sec > .sechead h2 { font: 700 13px/1.25 var(--disp); letter-spacing: -.005em; text-transform: uppercase; color: var(--ink); }
.sec > p.sub { margin: 10px 0 4px; max-width: 820px; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; }
.cols2 > * > .sec:first-child { margin-top: 0; }

/* ----------------------------- Tiles ------------------------------ */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #000; border-bottom: 1px solid var(--hair); }
.tiles > div { padding: 16px 18px 18px 0; }
.tiles > div + div { padding-left: 18px; border-left: 1px solid var(--hair); }
.tiles b { display: block; font: 700 30px/1 var(--disp); letter-spacing: -.01em; margin-top: 12px; color: var(--ink); }
.tiles b small { font-size: 13px; margin-left: 5px; }
.tiles .sub { font-size: 13px; color: var(--ink3); margin-top: 8px; }

/* ----------------------------- Tables ----------------------------- */
.tablewrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font: 500 11px/1.25 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); padding: 14px 14px 10px 0; border-bottom: 1px solid #000; white-space: nowrap; }
.sec table.list th { border-bottom-color: var(--hair); }
table.list td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
table.list td:first-child { font-weight: 700; color: var(--ink); }
table.list th.num, table.list td.num { text-align: right; padding-right: 0; padding-left: 14px; }
table.list td a { text-decoration-color: var(--hair); text-underline-offset: 3px; }
table.list td a:hover { text-decoration-color: var(--ink); }
table.list td .actions { gap: 6px; }
.subline { font-size: 12.5px; font-weight: 400; color: var(--ink3); margin-top: 2px; }
.empty { padding: 18px 0; color: var(--ink3); border-bottom: 1px solid var(--hair); }

/* Facts: label over value, split by hairlines. */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; border-top: 1px solid #000; }
.facts > div { padding: 12px 0 13px; border-bottom: 1px solid var(--hair); min-width: 0; }
.facts dt { font: 500 11px/1.25 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); margin-bottom: 5px; }
.facts dd { color: var(--ink); overflow-wrap: anywhere; white-space: pre-line; }
.facts > div.wide { grid-column: 1 / -1; }

/* Stat rows: label left, number right. */
.stats .st { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.stats .st span { font: 500 11px/1.3 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); }
.stats .st b { font: 700 18px/1 var(--disp); color: var(--ink); }

/* ------------------------- State: dot + word ---------------------- */
.stx { font-weight: 700; white-space: nowrap; color: var(--ink3); }
.stx i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 7px 1px 0; vertical-align: middle; background: var(--grey-st); }
.stx.r { color: var(--red); } .stx.r i { background: var(--red); }
.stx.g { color: var(--green-ink); } .stx.g i { background: var(--green); }
.stx.a { color: var(--amber-ink); } .stx.a i { background: var(--amber); }

/* Checklist */
.checks li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.checks li a { color: var(--ink); text-decoration-color: var(--hair); text-underline-offset: 3px; }
.checks li small { display: block; color: var(--ink3); font-size: 12.5px; }

/* Order stages */
.stages { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid #000; border-bottom: 1px solid var(--hair); margin-bottom: 28px; overflow-x: auto; }
.stages > div { padding: 12px 14px 12px 0; font: 500 11px/1.3 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); white-space: nowrap; min-width: 118px; }
.stages > div + div { padding-left: 14px; border-left: 1px solid var(--hair); }
.stages > div.done { color: var(--ink); }
.stages > div.now { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 #000; }
.stages > div small { display: block; letter-spacing: 0; text-transform: none; font-size: 12px; margin-top: 4px; color: var(--ink3); font-weight: 400; }

/* ----------------------------- Buttons ---------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: #000; font: 600 11px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; padding: 12px 18px; text-decoration: none; white-space: nowrap; border: 0; box-shadow: inset 0 0 0 1px #000; cursor: pointer; border-radius: 0; }
.btn:hover { background: var(--tint); }
.btn.blk { background: #000; color: #fff; }
.btn.blk:hover { background: var(--ink2); }
.btn.sm { font-size: 10px; padding: 8px 11px; }
.btn.wht { background: #fff; color: #000; box-shadow: none; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.why { font-size: 12.5px; color: var(--ink3); max-width: 420px; }

/* ----------------------------- Notes ------------------------------ */
.note { border: 1px solid var(--hair); padding: 14px 16px; margin: 0 0 20px; color: var(--ink2); }
.note > .stx { display: block; margin-bottom: 4px; }
.note ul { margin-top: 6px; }
.note li { position: relative; padding-left: 14px; }
.note li + li { margin-top: 3px; }
.note li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: currentColor; opacity: .9; }
.note.err { border-color: var(--red); }
.note.warn { border-color: #000; padding-left: 28px; position: relative; }
.note.warn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: repeating-linear-gradient(135deg, #000 0 1px, transparent 1px 3px); border-right: 1px solid #000; }
.note.plain { border-style: dashed; border-color: #000; }
.card { border: 1px solid var(--hair); padding: 16px 18px; }
.card + .card { margin-top: 16px; }
.card h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.card .cardfoot { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
iframe.pdf { width: 100%; height: 78vh; min-height: 520px; border: 1px solid var(--hair); background: var(--tint); display: block; }
pre.json { margin: 10px 0 0; padding: 12px 14px; background: var(--tint); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
details > summary { cursor: pointer; font: 600 10.5px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); padding: 6px 0; }

/* ------------------------------ Forms ----------------------------- */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.fields > .f.wide { grid-column: 1 / -1; }
.f label, .f .lab { display: block; font: 500 11px/1.25 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); margin-bottom: 6px; }
.f input, .f select, .f textarea { width: 100%; font: 400 14px/1.4 var(--body); color: var(--ink); background: #fff; border: 1px solid var(--hair); border-radius: 0; padding: 10px 12px; appearance: none; -webkit-appearance: none; }
.f select { background-image: linear-gradient(45deg, transparent 50%, #000 50%), linear-gradient(135deg, #000 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.f textarea { min-height: 84px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: #000; outline: none; }
.f .hint { font-size: 12.5px; color: var(--ink3); margin-top: 5px; }
.f.check { display: flex; align-items: center; gap: 10px; }
.f.check input { width: 18px; height: 18px; padding: 0; appearance: auto; -webkit-appearance: checkbox; accent-color: #000; flex: none; }
.f.check label { margin: 0; letter-spacing: 0; text-transform: none; font-size: 14px; color: var(--ink2); }
.filters { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 8px; }
.filters .f { min-width: 200px; }
.formfoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* Order lines editor */
.lines { border-top: 1px solid #000; margin-top: 8px; }
.lines .line { display: grid; grid-template-columns: 1.1fr 2fr .6fr 1fr auto auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); align-items: end; }
.lines .line .f.check { padding-bottom: 10px; }
.totals { display: flex; justify-content: flex-end; gap: 32px; padding: 14px 0; flex-wrap: wrap; }
.totals div { text-align: right; }
.totals b { display: block; font: 700 16px/1.2 var(--disp); margin-top: 4px; }

/* Dialog */
dialog.dlg { border: 1px solid #000; border-radius: 0; padding: 0; width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--ink2); }
dialog.dlg::backdrop { background: rgba(0, 0, 0, .55); }
dialog.dlg form { padding: 26px 28px 24px; }
dialog.dlg h2 { font: 700 16px/1.2 var(--disp); text-transform: uppercase; letter-spacing: -.005em; color: var(--ink); margin-bottom: 8px; }
dialog.dlg .lead { font-size: 14px; font-weight: 400; margin-bottom: 18px; }
dialog.dlg .note { margin: 16px 0 0; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #000; color: #fff; padding: 12px 18px; font-size: 13.5px; z-index: 20; max-width: calc(100vw - 32px); }

/* ----------------------------- Sign in ---------------------------- */
.signin { min-height: 100vh; background: #000; color: #fff; display: grid; place-items: center; padding: 32px 20px; }
.signin .box { width: min(460px, 100%); padding: 40px 36px 36px; --bc: rgba(255, 255, 255, .45); --bl: 22px;
  background:
    linear-gradient(var(--bc), var(--bc)) left top / var(--bl) 1px no-repeat,
    linear-gradient(var(--bc), var(--bc)) left top / 1px var(--bl) no-repeat,
    linear-gradient(var(--bc), var(--bc)) right top / var(--bl) 1px no-repeat,
    linear-gradient(var(--bc), var(--bc)) right top / 1px var(--bl) no-repeat,
    linear-gradient(var(--bc), var(--bc)) left bottom / var(--bl) 1px no-repeat,
    linear-gradient(var(--bc), var(--bc)) left bottom / 1px var(--bl) no-repeat,
    linear-gradient(var(--bc), var(--bc)) right bottom / var(--bl) 1px no-repeat,
    linear-gradient(var(--bc), var(--bc)) right bottom / 1px var(--bl) no-repeat; }
.signin img { height: 26px; width: auto; display: block; margin-bottom: 30px; }
.signin .eyebrow { color: var(--d-mute); }
.signin .title { color: #fff; font-size: 24px; }
.signin p { color: var(--d-body); margin: 10px 0 24px; }
.signin .f label { color: var(--d-mute); }
.signin .f input { background: #000; color: #fff; border-color: rgba(255, 255, 255, .45); }
.signin .f input:focus { border-color: #fff; }
.signin .btn { margin-top: 18px; width: 100%; }
.signin .note { border-color: #fff; color: #fff; margin: 18px 0 0; }
.signin .note .stx.r { color: #fff; }
.signin .fine { margin: 22px 0 0; font-size: 12px; color: var(--d-mute); }

/* ---------------------------- Narrow ------------------------------ */
@media (max-width: 980px) {
  .bar { padding: 0 16px; gap: 12px; flex-wrap: wrap; }
  .bar .me small, .bar .div { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--hair); padding: 0 8px; display: flex; overflow-x: auto; white-space: nowrap; }
  .nav .group { display: none; }
  .nav a { padding: 14px 10px; }
  .nav a.on { box-shadow: inset 0 -2px 0 var(--orange); }
  .main { padding: 24px 16px 56px; }
  .title { font-size: 21px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .tiles > div:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .cols2 { grid-template-columns: minmax(0, 1fr); }
  .tablewrap table.list { min-width: 620px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .lines .line { grid-template-columns: 1fr 1fr; }
  .checks li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dialog.dlg form { padding: 20px 18px; }
}
