:root {
  color-scheme: light;
  --ink: #172a22;
  --muted: #50655b;
  --line: #d9e3dd;
  --shade: #f2f5f1;
  --green: #216049;
  font: 15px/1.55 "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0; background: var(--shade); color: var(--ink) }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto }
.topbar { background: #fff; border-bottom: 1px solid var(--line) }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px }
.identity { display: flex; align-items: center; gap: 11px }
.identity div { display: grid; line-height: 1.25 }
.identity div span { font-size: .82rem; color: var(--muted) }
.mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #163e31; color: #fff; font-weight: 750 }
main { padding-block: 35px 64px }
.title { margin-bottom: 22px }
h1, h2, h3, p { margin: 0 }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.045em; margin-bottom: 9px }
h2 { font-size: 1.3rem; line-height: 1.25 }
h3 { font-size: .9rem; margin-bottom: 8px }
p { color: var(--muted) }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 15px; overflow-x: auto }
.tabs button { border: 0; background: none; border-bottom: 3px solid transparent; border-radius: 0; white-space: nowrap; color: var(--muted); padding: 12px 15px }
.tabs button[aria-current] { color: var(--green); border-color: var(--green) }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; padding: 11px 15px; background: #e4eee7; border-radius: 8px; color: #234b38 }
.notice.error { background: #fbece2; color: #854313 }
.sale-layout, .catalog-layout { display: grid; gap: 16px; align-items: start }
.sale-layout { grid-template-columns: 2fr 3fr }
.catalog-layout { grid-template-columns: 1fr 1fr }
.stock-panel { margin-bottom: 16px }
.panel { padding: 23px; background: #fff; border: 1px solid var(--line); border-radius: 14px; min-width: 0 }
.panel-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px }
.panel > h2 { margin-bottom: 12px }
label { display: block; font-weight: 650; margin-block: 10px 5px }
input:not([type="checkbox"]), textarea {
  display: block; width: 100%; border: 1px solid #b9c9be; border-radius: 8px; padding: 9px 11px;
  color: inherit; background: #fff; font: inherit;
}
textarea { resize: vertical; min-height: 140px }
textarea:disabled { background: var(--shade) }
textarea::placeholder, input::placeholder { color: #596e62 }
textarea + button, input[type="file"] + button { margin-top: 12px }
#order-help + button { margin-top: 12px }
hr { border: 0; border-top: 1px solid var(--line); margin-block: 18px }
button { border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; color: inherit; font: inherit; font-weight: 650; cursor: pointer }
button:disabled { cursor: default; opacity: .53 }
button.primary { background: var(--green); color: #fff }
button.primary:not(:disabled):hover { background: #194e3a }
button.secondary { background: #fff; border-color: #b9c9be }
button.secondary:not(:disabled):hover { background: var(--shade) }
:focus-visible { outline: 2px solid #256f52; outline-offset: 2px }
.count, .brands span { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #e9f1eb; color: #295541; font-size: .82rem }
.brands, .actions { display: flex; gap: 8px; flex-wrap: wrap }
.feedback { margin-top: 7px; font-size: .9rem; color: var(--muted) }
.feedback:empty { display: none }
.feedback.error, .row-warning { color: #9a431f }
.review { margin-top: 16px }
.panel-footer { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin-top: 15px }
.panel-footer button { margin-left: auto }
.table-scroll { overflow: auto; margin-top: 12px }
table { width: 100%; border-collapse: collapse; text-align: left }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top }
th { background: #f3f7f4; color: #38584a; font-size: .85rem; white-space: nowrap }
.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums }
.order-total { display: grid; gap: 2px; text-align: right }
.order-total span { color: var(--muted); font-size: .85rem }
.order-total strong { color: var(--green); font-size: 1.15rem; font-variant-numeric: tabular-nums }
.review-table th:nth-child(1) { width: 13% }
.review-table th:nth-child(2) { width: 34% }
.review-table th:nth-child(8) { width: 16% }
.review-table td { overflow-wrap: anywhere }
.review-table td input[data-field="quantity"] { width: 66px; padding-inline: 7px }
.review-table tfoot td { padding-top: 12px; border-bottom: 0 }
.review-product-name { display: block; line-height: 1.4 }
.review-edit-product { padding: 1px 0; border: 0; background: transparent; color: var(--green); font-size: .82rem }
.remove-draft-line { display: block; margin-top: 4px; padding: 4px 8px; color: #9a431f; background: transparent; border-color: #e7c2af; white-space: nowrap }
.product-suggestions { margin-top: 5px; font-size: .82rem }
.review-product-choice { display: block; width: 100%; text-align: left; font-weight: 500; margin-top: 4px; background: var(--shade); overflow-wrap: anywhere }
summary { cursor: pointer; color: var(--green); font-weight: 650 }
ol { padding-left: 19px; margin-block: 6px 0 }
@media (max-width: 850px) {
  .review-table-scroll { overflow: visible }
  .review-table, .review-table tbody, .review-table tfoot { display: block }
  .review-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
  .review-table tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px;
  }
  .review-table tbody td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; white-space: normal }
  .review-table tbody td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .82rem }
  .review-table tbody td:nth-child(1), .review-table tbody td:nth-child(2),
  .review-table tbody td:last-child { grid-column: 1 / -1 }
  .review-table tfoot tr { display: block }
  .review-table tfoot td { display: block; padding: 4px 2px }
  .review-table tfoot .total-spacer { display: none }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 28px) }
  main { padding-block: 25px 45px }
  .sale-layout, .catalog-layout { grid-template-columns: 1fr }
  .panel { padding: 16px }
  .tabs button { padding-inline: 8px }
  .panel-footer { align-items: flex-start; flex-direction: column }
}
