/* TradeNester storefront — design direction D (Trade Merchant) */
:root {
  --ink: #1A1D1F;
  --muted: #545B60;
  --line: #E1E6E8;
  --line-2: #CFDDDB;
  --brand: #0E3B43;
  --brand-dark: #0A2C32;
  --brand-mid: #133F48;
  --brand-tint: #E7F0EF;
  --accent: #F28C28;
  --accent-tint: #FFF3E6;
  --ok: #1F7A4D;
  --warn: #8A4B0A;
  --bg-soft: #F4F6F6;
  --img: #F1F3F4;
  --radius: 8px;
  --wrap: 1320px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; color: var(--ink); background: #fff; font-size: 16px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input, select { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.section__head { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
.h2 { font-size: 26px; font-weight: 800; color: var(--brand); margin-bottom: 4px; }
.muted { color: var(--muted); }
.row-gap { display: flex; flex-wrap: wrap; gap: 12px; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--bg-soft); border-radius: var(--radius); }
.note { margin-top: 10px; font-size: 14px; color: var(--warn); background: var(--accent-tint); padding: 10px 12px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 6px; font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn--lg { min-height: 50px; padding: 12px 22px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #E07B17; color: var(--ink); }
.btn--light { background: #fff; color: var(--brand); border-color: var(--line-2); }

/* Top bar */
.topbar { background: var(--brand-dark); color: #DCE8E7; font-size: 13px; }
.topbar__in { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; align-items: center; min-height: 36px; }
.topbar__points { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.topbar__right { display: flex; gap: 16px; align-items: center; }
.topbar a { color: #DCE8E7; text-decoration: none; }
.topbar a:hover { color: #fff; }
.lang a { padding: 6px 2px; }
.lang a[aria-current] { color: #fff; font-weight: 700; }

/* Header */
.header { background: var(--brand); color: #fff; }
.header__in { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; flex-direction: column; color: #fff; text-decoration: none; line-height: 1; }
.logo:hover { color: #fff; }
.logo__name { font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.logo__tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-top: 5px; }
.search { flex: 1 1 320px; display: flex; align-items: center; background: #fff; border-radius: 6px; height: 46px; padding: 0 5px 0 14px; gap: 8px; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 15px; color: var(--ink); background: transparent; }
.search button { width: 36px; height: 36px; border: 0; border-radius: 4px; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.header__actions { display: flex; gap: 12px; align-items: center; }
.header__signin { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; padding: 10px 4px; }
.header__signin:hover { color: #fff; text-decoration: underline; }

/* Sector nav */
.sectors { background: var(--brand-tint); border-bottom: 1px solid var(--line-2); }
.sectors__in { display: flex; gap: 0 28px; overflow-x: auto; font-weight: 600; font-size: 15px; scrollbar-width: none; }
.sectors__in::-webkit-scrollbar { display: none; }
.sectors a { text-decoration: none; padding: 13px 0; white-space: nowrap; }
.sectors a[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); }

/* Hero */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; padding-top: 24px; }
.hero__main { min-height: 340px; background: var(--brand-mid); border-radius: var(--radius); padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; color: #fff; }
.hero__main h1 { font-size: 42px; font-weight: 800; letter-spacing: -0.02em; max-width: 680px; }
.hero__main p { font-size: 17px; color: #DCE8E7; max-width: 560px; }
.hero__side { display: grid; gap: 12px; }
.tile { min-height: 164px; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; color: #fff; text-decoration: none; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.tile:hover { color: #fff; }
.tile--teal { background-color: var(--brand-mid); }
.tile--slate { background-color: #2A2F33; }
.tile--earth { background-color: #5B4A3A; }
.tile[style]::before { content: ''; position: absolute; inset: 0; background: rgba(10, 20, 22, 0.55); }
.tile > * { position: relative; }
.tile__title { font-size: 22px; font-weight: 800; }
.tile__btn { align-self: flex-start; background: var(--brand-tint); color: var(--brand); font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 6px; }

/* Category grid */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 16px; }
.catlink { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); border-radius: 6px; padding: 12px 14px; text-decoration: none; font-weight: 600; font-size: 15px; }
.catlink:hover { border-color: var(--brand); background: var(--brand-tint); }
.catlink__icon { width: 34px; height: 34px; border-radius: 6px; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; flex: none; }
.catlink__name { flex: 1; }

/* Product grid + card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.card__img { display: block; aspect-ratio: 4 / 3; background: var(--img); }
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__name { font-size: 16px; font-weight: 700; line-height: 1.35; }
.card__name a { color: var(--ink); text-decoration: none; }
.card__name a:hover { text-decoration: underline; }
.card__price { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price { font-size: 20px; font-weight: 800; }
.unit { font-size: 12px; color: var(--muted); }
.stock { font-size: 13px; font-weight: 600; }
.stock--in { color: var(--ok); }
.stock--out { color: var(--warn); }

/* Band: how to buy */
.band { background: var(--brand-tint); }
.steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.step { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.step__n { width: 32px; height: 32px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.safety { margin-top: 20px; font-size: 14px; color: #3F4549; }

/* Catalog */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.sortform { display: flex; gap: 8px; align-items: center; }
.sortform select { height: 44px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 10px; background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { background: var(--brand-tint); text-decoration: none; font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 999px; }
.chip:hover { background: var(--brand); color: #fff; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 28px; }

/* Product detail */
.pd { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; }
.pd__main { background: var(--img); border-radius: var(--radius); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pd__main img { width: 100%; height: 100%; object-fit: contain; }
.pd__thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.pd__thumb { aspect-ratio: 1 / 1; padding: 0; background: var(--img); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; overflow: hidden; }
.pd__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd__thumb.is-on { border: 2px solid var(--brand); }
.pd__info { display: flex; flex-direction: column; gap: 14px; }
.pd__title { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
.tiers { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tiers__head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #FAFBFB; font-size: 14px; }
.tiers__row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.tiers__row.is-on { background: var(--accent-tint); box-shadow: inset 4px 0 0 var(--accent); font-weight: 700; }
.buy { display: flex; flex-wrap: wrap; gap: 12px; }
.qty { display: flex; align-items: center; border: 1px solid #C5CED2; border-radius: 6px; height: 50px; }
.qty button { width: 46px; height: 48px; border: 0; background: transparent; font-size: 22px; color: var(--brand); cursor: pointer; }
.qty input { width: 64px; height: 48px; border: 0; text-align: center; font-weight: 800; font-size: 17px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy__cta { flex: 1 1 200px; }
.buy__total { font-size: 14px; color: #3F4549; }
.facts { list-style: none; margin: 0; padding: 16px; background: var(--brand-tint); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.pd__more { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; margin-top: 48px; }
.pd__left { display: flex; flex-direction: column; gap: 32px; }
.tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec th { text-align: left; font-weight: 600; color: var(--muted); padding: 12px 16px; width: 40%; background: #FAFBFB; }
.spec td { padding: 12px 16px; }
.spec tr + tr th, .spec tr + tr td { border-top: 1px solid var(--line); }
.richtext { margin-top: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.richtext img { height: auto; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.prose p + p { margin-top: 12px; }
.notfound { min-height: 40vh; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; justify-content: center; }

/* Footer */
.footer { background: var(--brand-dark); color: #DCE8E7; font-size: 14px; margin-top: 24px; }
.footer__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; padding-top: 44px; padding-bottom: 28px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col strong { color: #fff; }
.footer__brand { font-size: 20px; font-weight: 800; }
.footer a { color: #DCE8E7; }
.footer a:hover { color: #fff; }
.footer__legal { padding-bottom: 28px; color: #9DB5B2; font-size: 13px; }

@media (max-width: 900px) {
  .hero, .pd, .pd__more { grid-template-columns: 1fr; }
  .hero__main { min-height: 260px; padding: 24px; }
  .hero__main h1 { font-size: 30px; }
  .hero__side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 120px; padding: 16px; }
  .tile__title { font-size: 18px; }
  .pd { gap: 24px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hide-sm { display: none !important; }
  .logo__name { font-size: 22px; }
  .header__in { gap: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .header__actions { margin-left: auto; }
  .section { padding-top: 28px; padding-bottom: 28px; }
  .h1, .pd__title { font-size: 24px; }
  .h2 { font-size: 21px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__body { padding: 10px 12px 12px; }
  .card__name { font-size: 14px; }
  .price { font-size: 17px; }
  .catgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catlink { padding: 10px; font-size: 14px; gap: 8px; }
  .catlink > svg:last-child { display: none; }
  .buy { position: sticky; bottom: 0; background: #fff; padding: 10px 0; border-top: 1px solid var(--line); z-index: 5; }
}

/* ---------------------------------------------------------------- forms & account (v2) */
.narrow { max-width: 480px; }
.center { text-align: center; }
.right { text-align: right; }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.h3 { font-size: 19px; font-weight: 800; margin: 0 0 12px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin-top: 20px; }
.split__side { display: flex; flex-direction: column; gap: 16px; }
.card-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.section > .card-form, .narrow > .card-form { margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .fset > legend { font-weight: 700; font-size: 14px; }
.fset { border: 0; margin: 0; padding: 0; min-width: 0; }
.fset > legend { padding: 0; margin-bottom: 8px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.fgrid--addr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
.input { height: 46px; border: 1px solid #C5CED2; border-radius: 6px; padding: 0 12px; font-size: 15px; background: #fff; color: var(--ink); width: 100%; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
input[type=file].input { padding: 9px 10px; }
.input[aria-invalid="true"] { border-color: #B3261E; box-shadow: 0 0 0 1px #B3261E; }
.input--qty { width: 110px; }
.hint { font-size: 12px; color: var(--muted); }
.ferr { font-size: 13px; color: #B3261E; font-weight: 600; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: inline-flex; gap: 10px; align-items: center; border: 1px solid #C5CED2; border-radius: 6px; padding: 11px 14px; font-weight: 600; cursor: pointer; background: #fff; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check--top { align-items: flex-start; font-weight: 500; line-height: 1.5; border: 0; padding: 0; }
.check--top input { margin-top: 3px; }
.check--box { display: flex; margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.alert { margin: 0; padding: 12px 14px; border-radius: 6px; font-size: 14px; line-height: 1.5; }
.alert--err { background: #FDECEA; color: #5C1A14; border: 1px solid #F3B8B2; }
.alert--warn { background: #FFF8DB; color: #4D3B00; border: 1px solid #E9D27A; }
.flash { margin-top: 16px; padding: 12px 16px; border-radius: 6px; font-weight: 600; }
.flash--ok { background: #EEF8F2; color: #14532D; border: 1px solid #A9D5BD; }
.flash--err { background: #FDECEA; color: #5C1A14; border: 1px solid #F3B8B2; }
.linkbtn { background: none; border: 0; padding: 8px 0; color: var(--brand); font-weight: 700; cursor: pointer; text-decoration: underline; }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn--ok { background: var(--ok); color: #fff; }
.btn--ok:hover { background: #166239; color: #fff; }
.btn--danger { background: #fff; color: #B3261E; border-color: #F3B8B2; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.panel--tint { background: var(--brand-tint); border-color: var(--brand-tint); }
.panel--danger { background: #FDECEA; border-color: #F3B8B2; color: #5C1A14; }
.panel--pay, .panel--decide { border-top: 4px solid var(--accent); }
.list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #3F4549; }

.stepper { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stepper__item { background: var(--bg-soft); border-radius: 6px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.stepper__item a { color: inherit; }
.stepper__n { width: 26px; height: 26px; border-radius: 999px; border: 2px solid #C5CED2; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; font-size: 13px; }
.stepper__item.is-done { color: #3F4549; }
.stepper__item.is-done .stepper__n { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper__item.is-current { background: #fff; color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent), 0 0 0 1px var(--line); }
.stepper__item.is-current .stepper__n { background: var(--brand); border-color: var(--brand); color: #fff; }

.tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 14px; background: #FAFBFB; white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.table th.right, .table td.right { text-align: right; }
.badge { display: inline-block; background: var(--brand-tint); color: var(--brand); font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge--dark { background: var(--brand); color: #fff; }
.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: #EEF2F3; color: #3F4549; }
.pill--lg { font-size: 14px; padding: 7px 14px; }
.pill--invoiced, .pill--c-pending, .pill--c-more_info { background: var(--accent-tint); color: var(--warn); }
.pill--paid, .pill--dispatched { background: var(--brand-tint); color: var(--brand); }
.pill--completed, .pill--c-approved { background: #EEF8F2; color: var(--ok); }
.pill--cancelled, .pill--c-rejected { background: #FDECEA; color: #8C1D18; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 12px 12px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs a[aria-current] { color: var(--brand); box-shadow: inset 0 -3px 0 var(--accent); font-weight: 800; }
.searchrow { display: flex; gap: 8px; margin-bottom: 16px; max-width: 560px; }
.adder > summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 8px 0; }
.adder[open] > summary { margin-bottom: 12px; }
.adder form { display: flex; flex-direction: column; gap: 14px; }
.sitegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sitecard { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sitecard.is-default { border: 2px solid var(--brand); }
.sitecard__head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.dl { margin: 0; display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.filelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.filelist li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.uploader { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.status { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line); margin-top: 8px; }
.status--ok { background: #EEF8F2; border-color: #A9D5BD; }
.status--warn { background: var(--accent-tint); border-color: #F6C893; }
.status--info { background: var(--brand-tint); border-color: var(--line-2); }
.status--err { background: #FDECEA; border-color: #F3B8B2; }
.status p { margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.kpi strong { font-size: 24px; }
.kpi--accent { border-left-color: var(--accent); }
.orderline { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.orderline__img { width: 96px; height: 96px; background: var(--img); border-radius: 6px; overflow: hidden; }
.orderline__img img { width: 100%; height: 100%; object-fit: contain; }
.orderline__info { display: flex; flex-direction: column; gap: 6px; }
.orderline__total { font-size: 20px; font-weight: 800; }
.qtyform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sitepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.sitepick__opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #C5CED2; border-radius: 8px; padding: 12px; cursor: pointer; line-height: 1.45; }
.sitepick__opt input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.sitepick__opt:has(input:checked) { border: 2px solid var(--brand); background: var(--brand-tint); }
.sum { margin: 10px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 15px; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; text-align: right; }
.sum .sum__total { font-weight: 800; font-size: 18px; color: var(--ink); padding-top: 8px; border-top: 2px solid var(--ink); }
.sum--right { margin-left: auto; max-width: 360px; width: 100%; }
.progress { list-style: none; margin: 0 0 8px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; font-size: 14px; color: var(--muted); }
.progress li { display: flex; gap: 8px; align-items: center; }
.progress__dot { width: 22px; height: 22px; border-radius: 999px; border: 2px solid #C5CED2; display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.progress .is-done { color: var(--ink); }
.progress .is-done .progress__dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.progress .is-current { color: var(--ink); font-weight: 800; }
.progress .is-current .progress__dot { background: var(--accent); border-color: var(--accent); }
.pay { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.payrow { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--bg-soft); border-radius: 6px; padding: 8px 10px; }
.payrow dt { font-size: 12px; color: var(--muted); }
.payrow dd { margin: 2px 0 0; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.payrow--hi { background: var(--brand-tint); box-shadow: inset 0 0 0 2px var(--brand); }
.log { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ck { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 6px; border: 1px solid #D5DBDE; background: var(--bg-soft); }
.ck--ok { background: #EEF8F2; border-color: #A9D5BD; }
.ck--warn { background: #FFF8DB; border-color: #E9D27A; }
.ck--bad { background: #FDECEA; border-color: #F3B8B2; }
.narrow-form { max-width: 560px; }

/* ---------------------------------------------------------------- /tn-admin */
body.adm { background: var(--bg-soft); display: flex; flex-wrap: wrap; min-height: 100vh; }
.adm__nav { flex: 1 1 220px; max-width: 240px; background: var(--brand-dark); color: #DCE8E7; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; }
.adm__brand { color: #fff; font-weight: 800; font-size: 20px; padding: 4px 12px 18px; }
.adm__brand span { font-size: 12px; color: var(--accent); font-weight: 700; }
.adm__nav a { color: #DCE8E7; text-decoration: none; padding: 11px 12px; border-radius: 6px; }
.adm__nav a[aria-current] { background: var(--brand-mid); color: #fff; font-weight: 700; }
.adm__nav a b { background: var(--accent); color: var(--ink); font-size: 12px; padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.adm__me { margin-top: auto; padding: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 14px; }
.adm__me .linkbtn { color: #DCE8E7; }
.adm__main { flex: 999 1 640px; min-width: 0; padding: 24px 28px 56px; }
.adm__main > .h1 { margin-bottom: 16px; }
.adm__login { max-width: 420px; margin: 10vh auto 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------------- invoice */
body.invoice-page { background: var(--bg-soft); }
.invoice { max-width: 860px; margin: 24px auto; background: #fff; padding: 40px; border: 1px solid var(--line); font-size: 14px; }
.invoice__bar { margin-bottom: 16px; text-align: right; }
.invoice__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.invoice__head h1 { font-size: 28px; margin-bottom: 10px; }
.invoice__brand { font-size: 22px; font-weight: 800; color: var(--brand); margin-bottom: 6px; }
.invoice__meta { margin: 0; display: grid; grid-template-columns: auto auto; gap: 4px 16px; justify-content: end; }
.invoice__meta dt { color: var(--muted); text-align: left; }
.invoice__meta dd { margin: 0; font-weight: 700; }
.invoice__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 20px 0; line-height: 1.6; }
.invoice__table { width: 100%; border-collapse: collapse; }
.invoice__table th { text-align: left; border-bottom: 2px solid var(--line); padding: 8px 6px; font-size: 13px; color: var(--muted); }
.invoice__table td { border-bottom: 1px solid var(--line); padding: 10px 6px; vertical-align: top; }
.invoice__table .right, .invoice__table th.right { text-align: right; }
.invoice__totals { margin: 16px 0 0 auto; max-width: 320px; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.invoice__totals dd { margin: 0; text-align: right; }
.invoice__totals .strong { font-weight: 800; font-size: 16px; }
.invoice__pay { margin-top: 28px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #FAFBFB; }
.invoice__pay dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 10px 0; }
.invoice__pay dd { margin: 0; font-weight: 700; }
.invoice__pay p { margin-top: 6px; }
@media print {
  .noprint { display: none !important; }
  body.invoice-page { background: #fff; }
  .invoice { border: 0; margin: 0; padding: 0; max-width: none; }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .uploader { grid-template-columns: 1fr; }
  .adm__nav { max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .adm__brand { padding: 8px 12px; flex-basis: 100%; }
  .adm__me { margin-top: 0; }
  .adm__main { padding: 16px; }
}
@media (max-width: 600px) {
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid--addr { grid-template-columns: 1fr 1fr; }
  .orderline { grid-template-columns: 72px minmax(0, 1fr); }
  .orderline__img { width: 72px; height: 72px; }
  .orderline__total { grid-column: 1 / -1; text-align: right; }
  .invoice { padding: 18px; margin: 0; }
  .invoice__parties { grid-template-columns: 1fr; }
  .card-form { padding: 16px; }
}
