/* Prima Transfab – Radiator Quality Portal */
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url('/static/fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('/static/fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('/static/fonts/montserrat-latin-700-normal.woff2') format('woff2'); }

:root {
  --navy: #1A1650;
  --navy-2: #2A2672;
  --navy-soft: #ECEBF5;
  --orange: #F25C22;
  --orange-2: #D94A14;
  --orange-soft: #FDEEE7;
  --ink: #171533;
  --ink-2: #3E3B5C;
  --muted: #6E6B85;
  --line: #E1E0EA;
  --line-2: #F0EFF5;
  --bg: #F6F6FA;
  --panel: #FFFFFF;
  --pass: #17804A;
  --pass-bg: #E2F4EA;
  --fail: #B42318;
  --fail-bg: #FDECEB;
  --hold: #8A5A00;
  --hold-bg: #FDF3DC;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 21, 51, .05), 0 3px 10px rgba(23, 21, 51, .04);
  --head: 'Montserrat', system-ui, sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); line-height: 1.25; margin: 0 0 .5rem; font-weight: 700; color: var(--navy); letter-spacing: -.005em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.08rem; font-weight: 600; }
h3 { font-size: .95rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .86em; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .93em; }
.nowrap { white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 0 var(--orange); }
.topbar-inner { max-width: 1400px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 22px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand .sub { font-family: var(--head); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .7; border-left: 1px solid rgba(255,255,255,.25); padding-left: 12px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: rgba(255,255,255,.78); padding: 19px 12px 17px; white-space: nowrap; font-size: 14px; font-weight: 500; border-bottom: 3px solid transparent; position: relative; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.on { color: #fff; border-bottom-color: var(--orange); }
.nav .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }
.userbox .who { text-align: right; line-height: 1.2; }
.userbox .who span { display: block; opacity: .65; font-size: 11.5px; }
.userbox form { margin: 0; }
.userbox button, .userbox a.icon { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 7px; padding: 6px 10px; cursor: pointer; font: inherit; }
.userbox button:hover, .userbox a.icon:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.syncbar { display: none; background: var(--hold-bg); color: var(--hold); border-bottom: 1px solid #f0d9a8; font-size: 13.5px; font-weight: 600; }
.syncbar.show { display: block; }
.syncbar .in { max-width: 1400px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.syncbar.ok { background: var(--pass-bg); color: var(--pass); border-color: #b9e2c8; }

/* ---------- Page ---------- */
.page { max-width: 1400px; margin: 0 auto; padding: 22px 16px 70px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin: 2px 0 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 14px 18px 4px; }
.card.accent { border-top: 3px solid var(--orange); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-family: var(--head); font-size: 1.6rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 2px; }
.stat .hint { font-size: 12px; color: var(--muted); }
a.stat:hover { text-decoration: none; border-color: #c9c6dd; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 500; }

.note { border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.note b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.note.spec { background: var(--navy-soft); color: var(--navy); border-left: 4px solid var(--navy); }
.note.internal { background: var(--orange-soft); color: #7a2c0b; border-left: 4px solid var(--orange); }
.note.warn { background: var(--hold-bg); color: var(--hold); border-left: 4px solid #e2b04a; }
.note.bad { background: var(--fail-bg); color: var(--fail); border-left: 4px solid var(--fail); }
.note .pre { white-space: pre-wrap; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; line-height: 1.3; white-space: nowrap; }
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-accent { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-accent:hover { background: var(--orange-2); }
.btn-ok { background: var(--pass); border-color: var(--pass); color: #fff; }
.btn-ok:hover { background: #106a3c; }
.btn-danger { color: var(--fail); border-color: #f1c4c0; }
.btn-danger:hover { background: var(--fail-bg); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--navy-2); cursor: pointer; font: inherit; }
.linkbtn.danger { color: var(--fail); }
form.inline { display: inline; margin: 0; }

label.field { display: block; margin-bottom: 14px; }
label.field > span, .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
label.field > span em { font-style: normal; color: var(--fail); }
.help { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid #CFCDDC; border-radius: 8px; padding: 8px 10px; min-height: 40px;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(42, 38, 114, .14); }
input[readonly], select[disabled], input[disabled] { background: var(--line-2); color: var(--ink-2); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--navy); vertical-align: -3px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.size-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.size-row label span { font-weight: 500; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 4px; margin: 0 0 16px; }
legend { font-family: var(--head); font-weight: 600; padding: 0 6px; color: var(--navy); font-size: 14px; }
details.fold > summary { cursor: pointer; font-weight: 600; color: var(--navy-2); list-style: none; padding: 4px 0; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: '▸ '; }
details.fold[open] > summary::before { content: '▾ '; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters label { margin: 0; flex: 1 1 160px; }
.filters .grow { flex: 2 1 240px; }
.checklist { columns: 2; column-gap: 24px; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; break-inside: avoid; }
.checklist .tag { margin-left: auto; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #FAFAFD; white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FBFBFE; }
.tbl tr.dev td { background: var(--fail-bg); }
.tbl td.sec { background: var(--navy-soft); color: var(--navy); font-weight: 700; font-size: 12.5px; font-family: var(--head); }
.empty { text-align: center; color: var(--muted); padding: 26px 12px; }

/* ---------- Badges & progress ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.pass, .badge.approved { background: var(--pass-bg); color: var(--pass); }
.badge.fail, .badge.rejected { background: var(--fail-bg); color: var(--fail); }
.badge.hold, .badge.submitted { background: var(--hold-bg); color: var(--hold); }
.badge.draft { background: #EEF0F6; color: #4B5578; }
.badge.info { background: var(--navy-soft); color: var(--navy); }
.badge.dark { background: var(--navy); color: #fff; }
.badge.orange { background: var(--orange-soft); color: #9b3610; }
.badge.na, .badge.none, .badge.nobatch { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.tick { color: var(--pass); font-weight: 700; }
.progress { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; min-width: 70px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--orange)); border-radius: 99px; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .pct { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.frac { font-variant-numeric: tabular-nums; font-size: 13px; }
.frac.full { color: var(--pass); font-weight: 700; }

/* stage tiles on WO page */
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.stage .t { font-family: var(--head); font-weight: 600; color: var(--navy); font-size: 14px; }
.stage .n { font-family: var(--head); font-size: 1.35rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stage .who { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stage .btn { margin-top: auto; }
.stage.done { border-color: #b9e2c8; }
.stage.done .n { color: var(--pass); }

/* customer tracker */
.tracker { display: flex; overflow-x: auto; padding: 6px 0 2px; }
.tracker .st { flex: 1 0 96px; text-align: center; position: relative; font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.tracker .st::before { content: ''; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.tracker .st:first-child::before { display: none; }
.tracker .st .c { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--line); margin: 0 auto 6px; position: relative; z-index: 1; }
.tracker .st.done { color: var(--ink-2); }
.tracker .st.done .c { background: var(--navy); border-color: var(--navy); }
.tracker .st.done::before { background: var(--navy); }
.tracker .st.now { color: var(--navy); font-weight: 700; }
.tracker .st.now .c { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242, 92, 34, .2); }
.tracker .st.now::before { background: var(--navy); }
.steps3 { display: flex; gap: 6px; flex-wrap: wrap; }
.steps3 span { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--line-2); color: var(--muted); font-weight: 600; }
.steps3 span.on { background: var(--navy); color: #fff; }

/* ---------- Entry forms ---------- */
.qsec { margin-bottom: 20px; }
.qrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, 1.6fr); gap: 14px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.qrow:last-child { border-bottom: 0; }
.qrow .lbl { font-weight: 600; padding-top: 8px; }
.qrow .lbl .badge { margin-left: 6px; vertical-align: 1px; }
.qrow .spec { font-size: 13px; color: var(--muted); padding-top: 9px; }
.qrow.flag { background: var(--fail-bg); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 8px; }
.inline-pair { display: flex; gap: 8px; align-items: center; }
.inline-pair input { max-width: 140px; }
.inline-pair span { color: var(--muted); font-size: 13px; }
.seg { display: inline-flex; border: 1px solid #CFCDDC; border-radius: 8px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 8px 14px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); border-left: 1px solid #CFCDDC; user-select: none; background: #fff; }
.seg label:first-of-type { border-left: 0; }
.seg input:checked + label.ok { background: var(--pass); color: #fff; }
.seg input:checked + label.ng { background: var(--fail); color: #fff; }
.seg input:checked + label.na { background: var(--muted); color: #fff; }
.seg input:focus-visible + label { outline: 2px solid var(--navy-2); outline-offset: -2px; }
.seg input:disabled + label { cursor: default; opacity: .8; }
table.samples { border-collapse: collapse; font-size: 13.5px; }
table.samples th { font-size: 11.5px; color: var(--muted); text-align: left; padding: 4px 6px; font-weight: 600; }
table.samples td { padding: 3px 4px; }
table.samples input { width: 92px; min-height: 34px; padding: 5px 8px; }
table.samples td.idx { color: var(--muted); font-size: 12px; text-align: right; padding-right: 8px; }
table.samples tr.bad input { border-color: var(--fail); background: var(--fail-bg); }
.tally { display: flex; gap: 12px; flex-wrap: wrap; }
.tally label { display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); }
.tally input { width: 90px; }
.photo-in { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.photo-in input[type=file] { display: none; }
.photo-in .cnt { font-size: 12.5px; color: var(--muted); }
.photo-in .cnt.has { color: var(--pass); font-weight: 600; }
.req-photo { font-size: 12px; color: var(--hold); font-weight: 600; }

/* grids */
.gridwrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.egrid { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
table.egrid th { position: sticky; top: 0; z-index: 2; background: #FAFAFD; border-bottom: 1px solid var(--line); padding: 8px 8px; text-align: left; vertical-align: bottom; font-size: 11.5px; color: var(--ink-2); font-weight: 600; min-width: 96px; max-width: 160px; line-height: 1.3; }
table.egrid th .spec { display: block; font-weight: 500; color: var(--muted); font-size: 11px; margin-top: 2px; }
table.egrid th .fill { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--navy-2); background: none; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; cursor: pointer; }
table.egrid td { border-bottom: 1px solid var(--line-2); padding: 5px 6px; vertical-align: middle; background: #fff; }
table.egrid th:first-child, table.egrid td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; border-right: 1px solid var(--line); min-width: 150px; }
table.egrid th:first-child { z-index: 3; background: #FAFAFD; }
table.egrid td:first-child .mono { font-weight: 700; color: var(--navy); }
table.egrid input[type=text], table.egrid select { min-height: 34px; padding: 5px 7px; font-size: 14px; width: 100%; min-width: 74px; }
table.egrid input.dft { width: 62px; min-width: 62px; text-align: right; }
table.egrid td.flag input, table.egrid td.flag select, table.egrid input.flag, table.egrid select.flag { border-color: var(--fail); background: var(--fail-bg); color: var(--fail); font-weight: 600; }
table.egrid tr.locked td { background: #FAFAFD; }
table.egrid tr.dirty td:first-child { box-shadow: inset 4px 0 0 var(--orange); }
table.egrid .ph { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; color: var(--navy-2); white-space: nowrap; }
table.egrid .ph input { display: none; }
table.egrid .ph.has { color: var(--pass); font-weight: 600; }
table.egrid .verdict { font-weight: 700; font-size: 12.5px; white-space: nowrap; }
table.egrid .verdict.ok { color: var(--pass); }
table.egrid .verdict.ng { color: var(--fail); }
.sticky-bar { position: sticky; bottom: 0; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 12px 16px; margin: 18px -16px -70px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; z-index: 20; box-shadow: 0 -4px 14px rgba(23,21,51,.05); }
.sticky-bar .msg { font-weight: 600; font-size: 14px; }

/* ---------- Photos ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.photo a.thumb { display: block; aspect-ratio: 4 / 3; background: #EEEDF4; }
.photo a.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .pdf { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--fail-bg); color: var(--fail); font-weight: 800; font-size: 20px; }
.photo .cap { padding: 6px 8px; font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.photo .cap .muted { display: block; }
.photo .tools { padding: 0 8px 8px; font-size: 12px; display: flex; gap: 10px; }
.lightbox { position: fixed; inset: 0; background: rgba(10, 9, 30, .92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; flex-direction: column; gap: 10px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 100px); border-radius: 6px; }
.lightbox .lb-cap { color: #fff; font-size: 14px; text-align: center; }
.lightbox .lb-close { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 30px; cursor: pointer; }

/* ---------- Flash, login ---------- */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.flash.success { background: var(--pass-bg); color: var(--pass); border-color: #b9e2c8; }
.flash.error { background: var(--fail-bg); color: var(--fail); border-color: #f1c4c0; }
.flash.info { background: var(--navy-soft); color: var(--navy); border-color: #d2d0e6; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { background: radial-gradient(120% 90% at 0% 100%, rgba(242, 92, 34, .45) 0%, rgba(242, 92, 34, 0) 55%), linear-gradient(160deg, #241f6a 0%, var(--navy) 55%, #110e3a 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ''; position: absolute; right: -60px; bottom: -40px; width: 380px; height: 300px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 16px, transparent 16px 36px); border-radius: 12px; transform: rotate(-8deg); }
.login-art img { height: 54px; width: auto; align-self: flex-start; }
.login-art h1 { color: #fff; font-size: 2rem; max-width: 460px; }
.login-art p { opacity: .82; max-width: 430px; }
.login-art ul { list-style: none; padding: 0; margin: 18px 0 0; opacity: .92; }
.login-art li { padding: 4px 0 4px 26px; position: relative; }
.login-art li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 12px; height: 3px; background: var(--orange); border-radius: 2px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: #fff; }
.login-form .box { width: 100%; max-width: 360px; }
.login-form .logo-sm { display: none; height: 44px; margin-bottom: 20px; }

.cred { background: var(--navy-soft); border-radius: 10px; padding: 16px; font-size: 15px; }
.cred .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed #cfcce4; }
.cred .row:last-child { border-bottom: 0; }
.cred b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; }

.po-group { margin-bottom: 22px; }
.po-group > h2 { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.po-group > h2 small { font-family: var(--font); font-weight: 400; color: var(--muted); font-size: 13px; }
.wo-card { display: block; color: inherit; }
.wo-card:hover { text-decoration: none; border-color: #c9c6dd; }
.wo-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wo-card .meta { font-size: 13px; color: var(--muted); }
.wo-card .nums { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.wo-card .nums b { font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs a:hover { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-form .logo-sm { display: block; }
}
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: 0 8px; padding: 8px 12px 0; }
  .brand .sub { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .nav a { padding: 10px 10px 9px; }
  .userbox .who { display: none; }
  .userbox { margin-left: auto; }
  .page { padding: 16px 12px 70px; }
  .grid-2, .grid-3, .grid-5, .form-grid, .form-grid-3, .form-grid-4, .stages { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: auto; }
  .size-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qrow { grid-template-columns: 1fr; gap: 4px; }
  .qrow .lbl, .qrow .spec { padding-top: 0; }
  .card { padding: 14px; }
  .checklist { columns: 1; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tbl.stack td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 12px; text-align: right; }
  .tbl.stack td::before { content: attr(data-l); color: var(--muted); font-size: 11.5px; text-transform: uppercase; text-align: left; }
  .sticky-bar { margin: 18px -12px -70px; }
  dl.kv { grid-template-columns: 1fr; gap: 0; }
  dl.kv dd { margin-bottom: 8px; }
  .gridwrap { max-height: none; }
}
@media print {
  .topbar, .no-print, .flash, .sticky-bar, .syncbar { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; }
}
