:root {
  color: #172a25;
  background: #f2f5f4;
  font-family: "Segoe UI", "Arial", sans-serif;
  line-height: 1.5;
  --forest: #12392e;
  --primary: #176444;
  --muted: #50645c;
  --line: #dce5e0;
  --surface: #fff;
  --shadow: 0 8px 26px rgb(23 53 42 / 5%);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #408e72; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.16; }
h1 { font-size: clamp(2.1rem, 3.9vw, 3.5rem); letter-spacing: -.05em; }
h2 { font-size: 1.28rem; letter-spacing: -.025em; }
h3 { font-size: 1.03rem; }
p + p { margin-top: .75rem; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 4; left: 12px; top: 12px; background: white; padding: 8px 16px; }
.muted, .row-meta, .field-note { color: var(--muted); }
.nowrap, .number { white-space: nowrap; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.container { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.public-header { background: white; border-bottom: 1px solid var(--line); }
.public-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.3rem; line-height: 1.06; font-weight: 750; color: inherit; }
.brand small { display: block; font-size: .75rem; font-weight: 500; margin-top: 5px; color: var(--muted); }
.brand-mark { width: 43px; height: 43px; border-radius: 11px; display: grid; place-items: center; padding: 6px; background: #e4f2e9; flex: 0 0 auto; }
.brand-mark img { display: block; width: 100%; height: auto; }
.public-main { flex: 1; padding-block: 34px 52px; }
.public-footer { border-top: 1px solid var(--line); padding-block: 20px; color: var(--muted); font-size: .875rem; }
.public-footer .container { display: flex; justify-content: space-between; gap: 10px; }
.public-footer span:first-child { font-weight: 750; color: var(--forest); }
.public-footer nav { display: flex; flex-wrap: wrap; gap: 6px 21px; }
.public-footer a { color: var(--muted); text-underline-offset: 3px; }

.hero { background: var(--forest); color: white; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); border-radius: 19px; overflow: hidden; min-height: min(46vw, 460px); }
.hero-copy { padding: clamp(32px, 5vw, 72px); align-self: center; }
.hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.65rem); line-height: 1.01; max-width: 9.5em; }
.hero p { color: #dbede4; font-size: clamp(1.02rem, 1.5vw, 1.2rem); margin-block: 18px 26px; max-width: 31rem; }
.hero img, .login-layout img, .delivery-header img { display: block; width: 100%; height: 100%; object-fit: cover; min-width: 0; }
.how { margin-top: 37px; }
.how h2 { font-size: 1.7rem; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.steps article { padding: 19px 21px; border-top: 2px solid #97c5ad; background: white; border-radius: 4px 4px 12px 12px; }
.steps p { color: var(--muted); margin-top: 9px; }
.how, .preparation, .faq { scroll-margin-block-start: 20px; }
.preparation {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden;
  margin-top: clamp(32px, 5vw, 64px); border: 1px solid #d5e5db; border-radius: 17px; background: #eaf3ed;
}
.preparation > img { display: block; object-fit: cover; width: 100%; height: 100%; min-height: 260px; }
.preparation-copy { padding: clamp(24px, 4vw, 49px); align-self: center; }
.preparation h2, .faq h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.checklist li { padding-left: 31px; position: relative; color: #334d43; }
.checklist strong { color: var(--forest); }
.checklist li::before {
  content: ""; position: absolute; left: 3px; top: .56em; width: 12px; height: 7px;
  transform: rotate(-45deg); border: solid var(--primary); border-width: 0 0 2px 2px;
}
.faq {
  display: grid; grid-template-columns: minmax(0, .66fr) minmax(0, 1.34fr); align-items: start;
  gap: 18px 30px; margin-top: clamp(30px, 5vw, 64px);
}
.faq-entries { display: grid; gap: 8px; }
.faq details { background: white; border: 1px solid var(--line); border-radius: 10px; }
.faq summary { cursor: pointer; list-style: none; position: relative; font-weight: 690; padding: 13px 44px 13px 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; top: 50%; right: 14px; width: 24px; height: 24px;
  transform: translateY(-50%); display: grid; place-items: center; border-radius: 6px;
  color: var(--forest); background: #e8f3ec;
}
.faq details[open] summary::after { content: "−"; }
.faq details > p { padding: 0 16px 14px; color: var(--muted); }
.login-layout { display: grid; grid-template-columns: minmax(320px, .7fr) minmax(0, 1.05fr); max-width: 940px; margin: 20px auto 0; border-radius: 17px; overflow: hidden; box-shadow: var(--shadow); }
.login-layout .login-panel { padding: clamp(24px, 4vw, 52px); border-radius: 0; border: 0; }
.login-panel h1 { font-size: clamp(1.8rem, 2.8vw, 2.65rem); }
.login-panel > p { margin-block: 10px 24px; }
.delivery-header { display: grid; grid-template-columns: 1fr .44fr; align-items: stretch; background: var(--forest); color: #fff; overflow: hidden; border-radius: 17px; margin-bottom: 20px; max-height: 310px; }
.delivery-header > div { align-self: center; padding: clamp(20px, 4vw, 48px); }
.delivery-header h1 { margin-top: 9px; }
.delivery-header p { color: #d9eae2; margin-top: 8px; }
.delivery-header img { max-height: 245px; }
.delivery-help { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 17px; }
.delivery-help a { font-size: .9375rem; font-weight: 650; text-underline-offset: 3px; }

.workspace { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--forest); color: #fff; display: flex; flex-direction: column; padding: 25px 16px 21px; gap: 34px; min-height: 100vh; position: sticky; top: 0; align-self: start; }
.sidebar .brand { margin-left: 5px; }
.sidebar .brand-mark { background: #f1fff5; }
.sidebar .brand small { color: #b6d1c5; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a, .nav-button { display: block; text-decoration: none; color: #e7f4ed; padding: 11px 12px; border-radius: 9px; font-size: .94rem; font-weight: 620; }
.sidebar nav a:hover, .nav-button:hover { background: #205141; }
.sidebar nav a[aria-current] { background: #d9f1e4; color: #12392e; }
.account { border-top: 1px solid #3c6256; padding: 14px 5px 0; margin-top: auto; }
.account > span { display: block; padding: 0 7px; color: #c9ded4; font-size: .875rem; margin-bottom: 5px; }
.nav-button { background: transparent; padding: 6px 7px; border: 0; }
.workspace-main { max-width: 1590px; width: 100%; padding: 34px clamp(22px, 3.15vw, 54px) 48px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.page-heading p { color: var(--muted); margin-top: 6px; }
.back-link { display: inline-block; font-size: .875rem; font-weight: 700; margin-bottom: 10px; text-underline-offset: 4px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 19px; }
.metrics-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; border: 1px solid var(--line); background: white; color: #30493f; text-decoration: none; border-radius: 12px; padding: 15px; box-shadow: var(--shadow); }
.metric > strong { color: #172a25; font-size: 1.78rem; line-height: 1; font-variant-numeric: tabular-nums; }
a.metric:hover, .metric.active { border-color: #428365; background: #f1faf5; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(265px, 1fr); align-items: start; gap: 16px; }
.customer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.column { display: grid; min-width: 0; gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 2vw, 24px); min-width: 0; box-shadow: var(--shadow); }
.panel > h2 { margin-bottom: 13px; }
.panel > p.muted { margin-bottom: 12px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.order-total { color: var(--forest); font-size: 1rem; }
.total { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); padding-top: 13px; margin-top: 10px; }
.total strong { color: var(--forest); font-size: 1.18rem; }
.empty { color: var(--muted); border: 1px dashed #cbd9d1; background: #f8faf9; padding: 16px; border-radius: 8px; font-size: .9375rem; }
.facts { margin: 3px 0 0; }
.facts div { display: grid; grid-template-columns: 40% minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .875rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: .875rem; font-weight: 670; line-height: 1.2; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { background: #eeeae2; color: #674d22; }
.status-planned { background: #e6effc; color: #245387; }
.status-done { background: #e0f3e7; color: #20623b; }
.status-cancelled { background: #fae8e7; color: #963c33; }

.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); }
th { color: #455d52; background: #f3f7f5; text-align: left; font-size: .875rem; font-weight: 650; }
th:first-child { border-top-left-radius: 6px; }
th:last-child { border-top-right-radius: 6px; }
td { vertical-align: middle; font-size: .9375rem; }
tr:last-child td { border-bottom: 0; }
.row-link { font-weight: 730; text-underline-offset: 4px; }
.row-meta { display: block; font-size: .8125rem; margin-top: 2px; }
.item-editor { text-align: left; }
.item-editor summary { cursor: pointer; color: var(--primary); font-weight: 650; margin-bottom: 3px; }
.item-editor form { margin-top: 6px; white-space: normal; min-width: 160px; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-size: .9375rem; font-weight: 650; text-align: center; line-height: 1.2; }
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover { background: #124e36; }
.button-outline { border-color: #bbd0c3; color: #174e37; background: white; }
.button-outline:hover, .button-quiet:hover { background: #edf5f0; }
.button-light { background: #f1fff5; color: #174e37; }
.button-light:hover { background: #d6eddf; }
.button-quiet { color: var(--forest); background: #f1f5f3; }
.button-danger { color: #9c3d34; background: #fff; border-color: #e9c5c0; }
.button-danger:hover { background: #fff1ef; }
.button-small { min-height: 34px; font-size: .875rem; padding: 6px 9px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.separated { padding-top: 12px; border-top: 1px solid var(--line); }
.stack { display: grid; gap: 12px; margin: 0; }
.stack > .button { justify-self: start; }
.stack label, .inline-form label { display: grid; gap: 5px; font-size: .875rem; font-weight: 650; }
input:not([type=hidden], [type=checkbox], [type=radio]), select {
  min-width: 0; width: 100%; min-height: 42px; border: 1px solid #b8c9bf; border-radius: 7px; padding: 8px 9px;
  color: #172a25; background-color: #fff; font-size: 1rem; font-weight: 400;
}
input[readonly] { opacity: .8; }
input::placeholder { color: #677b71; }
select {
  appearance: none; padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, #496458 50%), linear-gradient(135deg, #496458 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
fieldset { margin: 0; padding: 0; border: 0; }
fieldset legend { padding: 0 0 4px; font-size: .875rem; font-weight: 650; }
.radio-row { display: flex; gap: 12px; }
.stack .radio-row label, .stack .checkbox { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.radio-row input, .checkbox input { width: 1.05rem; height: 1.05rem; accent-color: var(--primary); min-width: 0; }
.inline-form { display: flex; align-items: end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 9px; flex-wrap: wrap; }
.inline-form label { flex: 1 1 140px; min-width: 0; }
.inline-form label.quantity { flex: 0 1 105px; }
.inline-form .button { min-height: 42px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-note, .copy-feedback { font-size: .875rem; }
.copy-feedback { margin-top: 8px; overflow-wrap: anywhere; }
.filter-panel { margin-bottom: 15px; }
.period-form { border: 0; margin: 0; padding: 0; }
.period-form label { flex-grow: 0; }

.notice { margin-bottom: 14px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; font-size: .9375rem; }
.notice-success { color: #194f35; border-color: #a4d5ba; background: #e5f6ec; }
.notice-error { color: #8a3128; border-color: #e2b8b2; background: #fff0ee; }
.error-page { max-width: 670px; margin-inline: auto; }
.error-page p { margin-block: 8px 16px; }

@media (max-width: 1060px) {
  .workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .workspace .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 740px) {
  .container { width: calc(100% - 28px); }
  .public-main { padding-top: 16px; }
  .public-nav { padding-block: 11px; }
  .public-nav .button { font-size: .82rem; padding-inline: 8px; }
  .brand { font-size: 1.12rem; }
  .brand-mark { width: 37px; height: 37px; border-radius: 9px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 26px 22px; }
  .hero img { max-height: 250px; }
  .steps, .preparation, .faq, .login-layout, .customer-grid { grid-template-columns: minmax(0, 1fr); }
  .preparation > img { min-height: 0; max-height: 220px; }
  .login-layout img { max-height: 220px; }
  .delivery-header { grid-template-columns: 1fr; max-height: none; }
  .delivery-header img { max-height: 160px; object-position: center 52%; }
  .workspace { display: block; }
  .sidebar { min-height: 0; position: static; padding: 13px 15px; display: grid; grid-template-columns: 1fr auto; gap: 11px; }
  .sidebar nav { grid-row: 2; grid-column: 1 / -1; display: flex; flex-wrap: wrap; }
  .sidebar nav a { padding: 7px 10px; }
  .account { margin: 0; border: 0; padding: 0; text-align: right; }
  .account > span { font-size: .8rem; margin: 0; padding: 0; }
  .nav-button { display: inline-block; padding: 3px 0; }
  .workspace-main { padding: 19px 13px 35px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .metrics-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { padding: 10px; font-size: .875rem; }
  .metric > strong { font-size: 1.52rem; }
  .panel { padding: 13px; }
  .public-footer .container { flex-wrap: wrap; }
}
