:root { color-scheme: light; --ink: #202a27; --muted: #646d68; --line: #dbe2df; --green: #286247; --paper: #f7f9f8; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.55 system-ui, sans-serif; }
a { color: var(--green); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; min-height: 42px; border: 1px solid var(--green); border-radius: 4px; background: var(--green); color: white; font-weight: 600; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { filter: brightness(.94); }
button:disabled { cursor: not-allowed; opacity: .5; }
.secondary { color: var(--ink); background: white; border-color: var(--line); }
.danger { background: #a43543; border-color: #a43543; }
.danger-text { color: #a43543; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; font-size: 24px; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; text-decoration: none; flex-shrink: 0; }
.icon-button.danger-text { color: #a43543; }
input, textarea, select { width: 100%; min-width: 0; padding: 10px; border: 1px solid #aebbb3; border-radius: 4px; background: white; color: var(--ink); }
input[type=checkbox] { width: auto; accent-color: var(--green); margin-right: 8px; }
input[type=file] { max-width: 100%; }
input[readonly] { background: #edf0ee; }
textarea { resize: vertical; }
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 5px; }
:focus-visible { outline: 3px solid #d39f31; outline-offset: 3px; }
.header { background: #fff; border-bottom: 1px solid var(--line); padding: 16px max(20px, calc((100% - 1180px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 750; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { object-fit: contain; }
nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
nav a { text-decoration: none; font-size: 14px; }
.link-button { background: none; border: 0; color: var(--muted); padding: 0; font-size: 14px; }
.admin-nav { padding: 14px max(20px, calc((100% - 1180px)/2)); border-bottom: 1px solid var(--line); background: #edf2ef; }
.admin-nav a[aria-current=page] { font-weight: 700; text-decoration: underline; }
.crate-total { margin: 0; color: var(--muted); }
.crate-total strong { color: var(--ink); font-size: 24px; font-variant-numeric: tabular-nums; margin-inline: 8px; }
.crate-stocks { max-width: 760px; border-top: 1px solid var(--line); }
.crate-stock { display: grid; grid-template-columns: minmax(0,1fr) 140px auto; align-items: center; gap: 20px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.crate-stock label { margin: 0; font-size: 16px; }
.crate-stock input[type=number] { font-variant-numeric: tabular-nums; }
@media(max-width: 600px) { .crate-stock { grid-template-columns: minmax(0,1fr) auto; gap: 12px; } .crate-stock label { grid-column: 1 / -1; } }
.sales-tabs { border-bottom: 1px solid var(--line); margin-bottom: 20px; gap: 24px; }
.sales-tabs a { padding: 8px 0; border-bottom: 3px solid transparent; }
.sales-tabs a[aria-current=page] { border-color: var(--green); font-weight: 700; }
.search-form { display: grid; grid-template-columns: minmax(160px,2fr) repeat(3,minmax(120px,1fr)) auto auto; gap: 14px; align-items: end; }
.search-form > div { min-width: 0; }
.search-form > a { align-self: center; }
@media(max-width: 900px) { .search-form { grid-template-columns: 1fr 1fr; } }
@media(max-width: 600px) { .search-form { grid-template-columns: minmax(0,1fr); } }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; min-height: 65vh; padding: 36px 0 60px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
h1 { font-size: 30px; line-height: 1.25; font-weight: 700; margin: 0 0 12px; overflow-wrap: anywhere; }
h2 { font-size: 20px; line-height: 1.35; margin: 28px 0 16px; }
p { margin: 12px 0; }
.eyebrow { color: var(--green); text-transform: uppercase; font-size: 12px; font-weight: 700; margin-top: 0; }
.muted, small { color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.product { border: 1px solid var(--line); border-radius: 6px; background: white; overflow: hidden; display: flex; flex-direction: column; }
.product-image { display: block; width: 100%; height: 250px; object-fit: contain; background: #fff; padding: 20px; }
.product-content { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product h2 { margin: 0 0 8px; }
.product p { margin-top: 0; flex: 1; }
.product-price { font-size: 21px; font-weight: 700; margin: 15px 0; }
.product-price small { font-size: 13px; font-weight: 400; }
.inline, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions { margin: 20px 0; }
.quantity { width: 80px; flex: 0 0 80px; }
.table-wrap { overflow-x: auto; border-block: 1px solid var(--line); background: white; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 12px; text-align: left; background: #edf2ef; color: var(--muted); }
td, th { padding: 13px 15px; border-bottom: 1px solid var(--line); }
td { font-size: 14px; vertical-align: middle; }
td .inline { flex-wrap: nowrap; }
td .actions { margin: 0; }
td button { white-space: nowrap; }
td:last-child { border-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
.nowrap { white-space: nowrap; }
.stock-form { min-width: 350px; }
.stock-form input[name=reason] { min-width: 140px; }
.catalog-order-status { min-height: 24px; margin: -16px 0 12px; color: var(--muted); }
.catalog-order-status.danger-text { color: #a43543; }
.catalog-order-controls { display: flex; align-items: center; gap: 6px; width: 90px; }
.catalog-order-arrows { display: grid; gap: 4px; }
.catalog-order-controls .icon-button { width: 42px; height: 32px; min-height: 32px; }
.catalog-order-controls .drag-handle { height: 44px; cursor: grab; touch-action: none; }
.catalog-order-controls svg { display: block; }
.catalog-order-controls button:disabled { cursor: default; }
.catalog-order-ghost { opacity: .35; }
.catalog-order-chosen { background: #e4f1e8; }
.catalog-table td:nth-child(2) { min-width: 180px; }
.badge { display: inline-block; width: fit-content; background: #edf0ee; color: #505d56; padding: 4px 9px; font-size: 12px; border-radius: 4px; white-space: nowrap; }
.badge.success, .notice.success { background: #e4f1e8; color: #225039; }
.notice { padding: 16px 18px; background: #fff3d8; border-left: 3px solid #d39f31; margin-bottom: 24px; }
.notice.error { background: #fae8eb; border-color: #a43543; color: #7c2631; }
.narrow { max-width: 540px; margin: 36px auto; }
.narrow.left { margin-left: 0; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-stack > button { align-self: flex-start; margin-top: 8px; }
.form-stack label { margin-top: 10px; }
.form-stack ul { color: #a43543; }
.form-grid, .summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sale-customer-fields { display: grid; gap: 12px; width: 100%; max-width: 640px; }
.summary-grid { margin-bottom: 30px; }
.sale-line { display: grid; grid-template-columns: 2fr 2fr 1fr .7fr 1fr 42px; gap: 12px; align-items: end; padding: 18px 0; border-bottom: 1px solid var(--line); }
.sale-line > div { min-width: 0; }
.total { font-size: 24px; font-weight: 700; text-align: right; }
.align-right { text-align: right; }
.cancel-section { margin-top: 45px; border-top: 1px solid var(--line); padding-top: 16px; }
.cancel-section summary { cursor: pointer; color: #a43543; }
.document-issue { display: grid; gap: 8px; max-width: 100%; }
.footer { border-top: 1px solid var(--line); padding: 25px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.checkout-legal { border-top: 1px solid var(--line); padding-top: 16px; }
.checkout-legal p { font-size: 13px; color: var(--muted); }
.checkout-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin-block: 12px; }
.checkout-consent input[type=checkbox] { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media(max-width: 900px) { .products { grid-template-columns: repeat(2,minmax(0,1fr)); } .sale-line { grid-template-columns: 1fr 1fr; } }
@media(max-width: 600px) { .header { align-items: flex-start; flex-direction: column; gap: 12px; } nav { gap: 16px; } .products { grid-template-columns: 1fr; } .container { width: calc(100% - 32px); padding-top: 28px; } h1 { font-size: 26px; } .summary-grid, .form-grid { grid-template-columns: 1fr; gap: 8px; } .sale-line { grid-template-columns: minmax(0,1fr); } .product-image { height: 230px; } }
