:root {
  --red: #da291c;
  --black: #000;
  --ink: #33332f;
  --white: #fff;
  --gray: #bbbcbc;
  --line: #dddede;
  --surface: #f5f5f4;
  --muted: #60615f;
  --ready: #8fe2b0;
  --transit: #efdbb2;
  --pending: #bdd6e6;
  --gutter: clamp(18px, 4vw, 64px);
}
* { box-sizing: border-box }
body { margin: 0; color: var(--ink); background: var(--white); font: 400 16px/1.35 NovaPoshta, Arial, sans-serif }
button, input, select { font: inherit; color: inherit }
button, a, select { cursor: pointer }
button { background: transparent; border: 0; padding: 0 }
a { color: inherit; text-decoration: none }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px }
h1, h2, p { margin: 0 }
.frame { width: min(1376px, 100%); padding-inline: var(--gutter); margin-inline: auto }
header { border-bottom: 1px solid var(--line) }
.top, nav, .brand, .profile, nav a, .primary, .outline, .heading, .sectionhead, .product, .dialoghead { display: flex; align-items: center }
.top { min-height: 74px; gap: clamp(30px, 6vw, 100px) }
.brand { font-weight: 700; font-size: 30px; letter-spacing: -1.1px; gap: 8px; color: var(--black) }
.brand svg { width: 30px; height: 33px; color: var(--red) }
nav { align-self: stretch; gap: 30px }
nav a { position: relative; gap: 8px; font-weight: 500 }
nav a.active { color: var(--red) }
nav a.active:after { content: ''; position: absolute; inset: auto 0 -1px; height: 3px; background: var(--red) }
a:hover, .rowbtn:hover, .link:hover { color: var(--red) }
.profile { margin-left: auto; gap: 8px }
.profile select { border: 0; font-size: 14px; background: var(--white); font-weight: 500 }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter; vertical-align: middle }
.crumb { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); margin: 28px 0 16px }
.crumb b { font-weight: 400; color: var(--ink) }
.heading, .sectionhead, .dialoghead { justify-content: space-between; gap: 16px }
.heading { margin-bottom: 25px }
h1 { color: var(--black); font-size: clamp(38px, 4.7vw, 66px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04 }
.heading p { margin-top: 7px; color: var(--muted) }
.primary, .outline { display: inline-flex; justify-content: center; gap: 12px; padding: 12px 20px; min-height: 44px; font-weight: 500; border-radius: 3px }
.primary { background: var(--red); color: var(--white) }
.primary:hover { background: #b82016 }
.outline { box-shadow: inset 0 0 0 1px var(--gray); color: var(--ink) }
.outline:hover { background: var(--surface) }
.overview-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 16px; margin-bottom: 36px }
.hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; min-height: 272px; background: var(--red); color: var(--white); padding: clamp(22px, 2.6vw, 40px) }
.hero-copy { width: 60%; z-index: 1 }
.hero-label { font-size: 14px; font-weight: 500; margin-bottom: 14px }
.hero h2 { font-size: clamp(32px, 3.65vw, 54px); letter-spacing: -.038em; line-height: .99; font-weight: 700 }
.hero h2 + p { font-size: 15px; margin-top: 12px; max-width: 32ch }
.hero img { position: absolute; right: -1%; top: 50%; transform: translateY(-50%); width: 44%; max-height: 115% }
.hero .outline { margin-top: 17px; box-shadow: none; background: var(--white); color: var(--ink); padding: 9px 14px; min-height: 39px; font-size: 14px }
.hero .outline:hover { background: var(--surface) }
.stats { background: var(--surface); padding-inline: clamp(15px, 2vw, 28px); display: grid; grid-template-rows: repeat(3, 1fr) }
.stat { width: 100%; display: grid; grid-template-columns: 33px 1fr auto; align-items: center; gap: 12px; text-align: left; padding-block: 12px }
.stat + .stat { border-top: 1px solid var(--line) }
.stat:hover { color: var(--red) }
.tile { color: var(--red) }
.tile svg { width: 27px; height: 27px }
.stat strong { font-weight: 500; color: var(--black); font-size: clamp(34px, 3.2vw, 48px); line-height: 1; font-variant-numeric: tabular-nums }
.stat .label { font-weight: 500 }
.sectionhead { margin-bottom: 12px }
.sectionhead h2, .dialoghead h2 { color: var(--black); font-size: clamp(26px, 2.35vw, 35px); line-height: 1.12; letter-spacing: -.035em; font-weight: 500 }
.link { font-weight: 500; color: var(--red); padding: 8px 0 }
.tabs { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--gray) }
.tabs button { padding: 10px 0; border-bottom: 3px solid transparent; color: var(--muted); font-size: 14px }
.tabs .active { color: var(--red); border-color: var(--red); font-weight: 500 }
.scroll { overflow-x: auto }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line) }
th { color: var(--muted); background: var(--surface); font-size: 13px; font-weight: 400 }
td:not(:first-child) { white-space: nowrap }
tbody tr:hover { background: #fafafa }
.product { gap: 13px; min-width: 200px }
.prodicon { width: 37px; height: 37px; background: var(--surface); display: grid; place-items: center; flex: none }
.product small { display: block; color: var(--muted); margin-top: 2px; font-size: 12px }
.rowbtn { text-align: left; font-weight: 500 }
td button[aria-label] { min-width: 38px; min-height: 38px }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 3px 9px; color: var(--ink); border-radius: 2px }
.green { background: var(--ready) }
.amber { background: var(--transit) }
.blue { background: var(--pending) }
.empty { padding: 24px 16px; background: var(--surface); color: var(--muted) }
footer.frame { display: flex; gap: 24px; justify-content: space-between; align-items: center; margin-top: 34px; padding-block: 20px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere }
footer b { color: var(--black); font-size: 18px }
dialog { width: min(500px, calc(100vw - 32px)); max-height: 90dvh; border: 0; border-top: 5px solid var(--red); padding: 26px; color: var(--ink); background: var(--white); box-shadow: 0 12px 80px #0003 }
dialog::backdrop { background: #17171680 }
.dialoghead { margin-bottom: 22px }
.iconbtn { font: 400 27px/1 Arial; width: 40px; height: 40px; flex: none; background: var(--surface) }
form, form label { display: grid; gap: 6px }
form { gap: 15px }
form label { font-size: 14px; font-weight: 500 }
input, form select { border: 1px solid var(--gray); padding: 12px; width: 100%; border-radius: 2px; background: var(--white); font-size: 16px }
form .pick { display: flex; align-items: center; gap: 10px; background: var(--surface); padding: 10px 12px }
.pick input { width: 18px; height: 18px; accent-color: var(--red) }
.error { color: #a62316; font-size: 14px }
.error:empty { display: none }
dl { display: grid; grid-template-columns: 40% 60%; row-gap: 14px; margin: 18px 0 }
dt { color: var(--muted) }
dd { margin: 0; overflow-wrap: anywhere }
#toast { position: fixed; z-index: 5; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 12px 18px; display: none }
button:disabled { opacity: .55 }
@media (max-width: 820px) {
  .top, nav { gap: 18px }
  .overview-grid { grid-template-columns: minmax(0, 1.8fr) minmax(190px, 1fr) }
  .hero-copy { width: 65% }
  .stat { grid-template-columns: 23px 1fr auto; gap: 7px }
  .stat .label { font-size: 14px }
}
@media (max-width: 680px) {
  .top { flex-wrap: wrap; gap: 0; padding-top: 15px }
  .brand { font-size: 26px }
  nav { order: 3; width: 100%; justify-content: space-between; gap: 6px; margin-top: 8px }
  nav a { font-size: 14px; padding: 12px 0; gap: 5px }
  nav .ico { width: 16px }
  .profile { gap: 3px }
  .crumb { margin: 19px 0 12px }
  .heading { flex-wrap: wrap; margin-bottom: 18px }
  .overview-grid { grid-template-columns: 1fr; gap: 8px; margin-bottom: 25px }
  .hero { min-height: 230px; padding: 22px 17px }
  .hero-copy { width: 67% }
  .hero img { right: -4%; width: 42% }
  .stats { display: flex; padding: 12px 0 }
  .stat { flex: 1; display: flex; flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; padding: 0 10px }
  .stat + .stat { border-top: 0; border-left: 1px solid var(--line) }
  .stat .tile { display: none }
  .stat .label { font-size: 13px }
  .stat strong { font-size: 31px }
  .tabs { gap: 13px }
  .tabs button { font-size: 13px }
  th, td { padding: 10px }
  .sectionhead h2 { font-size: 26px }
  .sectionhead .link { font-size: 14px }
  footer.frame { align-items: baseline }
}
[hidden] {display:none!important}
.editor-layout {display:grid;grid-template-columns:minmax(0,2fr) minmax(245px,1fr);gap:clamp(16px,3vw,42px);align-items:start}
.order-line {border:1px solid var(--line);margin-bottom:12px}
.order-line[open] {border-top:3px solid var(--red)}
.order-line summary {display:flex;align-items:center;gap:12px;cursor:pointer;background:var(--surface);padding:15px 18px;list-style:none}
.order-line summary::-webkit-details-marker {display:none}
.order-line summary strong {overflow-wrap:anywhere}
.order-line summary:after {content:'⌄';font-family:Arial,sans-serif}
.order-line[open] summary:after {transform:rotate(180deg)}
.line-count {margin-left:auto;white-space:nowrap;color:var(--muted)}
.line-fields {display:grid;gap:15px;padding:18px}
.line-fields small {color:var(--muted);font-weight:400}
.line-fields label:has(small) {display:block}
.line-fields label:has(small) input {margin-top:6px}
.line-actions,.stepper {display:flex;align-items:center}
.line-actions {justify-content:space-between;gap:12px}
.stepper {border:1px solid var(--gray);width:max-content}
.stepper input {width:48px;border:0;text-align:center;appearance:textfield}
.stepper input::-webkit-inner-spin-button {appearance:none}
.stepper button {width:42px;height:42px;font-size:20px}
.stepper button:hover {background:var(--surface)}
dd {white-space:pre-line}
.order-note textarea {width:100%;min-height:132px;resize:vertical;border:1px solid var(--gray);padding:12px;font:400 16px NovaPoshta,Arial,sans-serif}
.order-summary {display:grid;gap:14px;background:var(--surface);padding:24px;position:sticky;top:16px}
.order-summary h2 {font-weight:500;font-size:26px}
.order-summary p {display:flex;justify-content:space-between}
.order-summary button {margin-top:8px}
.group-row button {font-weight:500}
@media(max-width:680px){.editor-layout {grid-template-columns:1fr}.order-summary {position:static}}
.item-photo {position:relative;display:grid;place-items:center;width:54px;height:54px;flex:none;border:1px solid var(--line);background:var(--white);color:var(--muted);font-size:12px}
.item-photo img,.prodicon img {width:100%;height:100%;object-fit:contain;background:var(--white)}
.item-photo img {position:absolute;inset:0}
.wh-tools,.wh-line,.wh-buttons,.wh-parcel li {display:flex;align-items:center;justify-content:space-between;gap:14px}
.wh-tools {align-items:end;margin-bottom:16px}
.wh-tools .tabs {flex:1}
.wh-search {max-width:540px;margin-bottom:14px}
.wh-status:not(:empty) {padding:12px;background:var(--transit)}
.wh-line,.wh-parcel,.wh-cell {padding:18px;border:1px solid var(--line);margin:0 0 10px}
.wh-line>div:first-child {flex:1;min-width:0;overflow-wrap:anywhere}
.wh-line h3 {margin:4px 0;font-size:18px}
.wh-line small,.wh-line p,.wh-parcel p {color:var(--muted);font-size:14px}
.wh-buttons {flex-wrap:wrap;justify-content:end}
.wh-cell h2 {margin-bottom:14px;font-size:23px}
.wh-line .outline,.wh-parcel .outline {min-height:36px;padding:7px 12px}
.wh-parcel ul {list-style:none;padding:0}
.wh-parcel li {padding:10px 0;border-top:1px solid var(--line)}
@media(max-width:750px){.wh-line,.wh-tools {flex-wrap:wrap}.wh-buttons {width:100%;justify-content:start}.wh-tools .tabs {flex-basis:100%}.wh-tools .outline {margin-left:auto}}
@media(max-width:420px){nav {flex-wrap:wrap;justify-content:start;gap:0 12px}}
