:root {
  color-scheme: light;
  --paper: #eaf0eb;
  --surface: #fff;
  --ink: #102b28;
  --muted: #51625e;
  --rail: #16272e;
  --rail-active: #284642;
  --green: #195e3d;
  --green-hover: #104c2e;
  --green-light: #e5eee7;
  --line: #cbd7d0;
  --control: #aebab5;
  --error: #992f24;
  --radius: 8px;
  --ui: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--ui) }
a { color: var(--green); text-underline-offset: .16em }
a:hover { color: var(--green-hover) }
:focus-visible { outline: 3px solid #267a5f; outline-offset: 3px }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden }
.icon { width: 23px; height: 23px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle }
.skip { position: fixed; top: 8px; left: 8px; z-index: 4; transform: translateY(-200%); background: white; padding: 8px }
.skip:focus { transform: none }
.shell { display: grid; grid-template-columns: 267px minmax(0, 1fr); min-height: 100vh }
.rail { background: var(--rail); color: #f3f7f1; min-width: 0; padding-bottom: 24px }
.wordmark { display: flex; align-items: center; gap: 16px; margin: 19px 23px 28px; color: #f3f7f1; text-decoration: none; font-size: 25px; font-weight: 720; line-height: 1.12; letter-spacing: -.03em }
.wordmark:hover { color: #fff }
.wordmark .icon { width: 48px; height: 48px; stroke-width: 1.2 }
.rail-nav { display: grid; gap: 1px }
.rail-nav a { display: flex; align-items: center; gap: 14px; border-left: 5px solid transparent; color: #f2f5f4; min-height: 45px; padding: 8px 13px 8px 19px; text-decoration: none; font-weight: 550; letter-spacing: -.01em }
.rail-nav a:hover { background: #20373a }
.rail-nav a[aria-current] { border-left-color: #50bd79; background: var(--rail-active); font-weight: 700 }
.nav-toggle { display: none }
.workspace { min-width: 0; padding: 0 clamp(18px, 2.25vw, 36px) 42px }
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; column-gap: 20px; row-gap: 8px; min-height: 51px; padding: 10px 0; font-size: 14px }
.topbar nav, .session { display: flex; align-items: center; gap: 12px }
.topbar a { font-weight: 600 }
.environment { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap }
.environment i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #279a58 }
.account { position: relative }
.account summary { cursor: pointer; padding-inline: 6px }
.account form { background: white; padding: 8px; position: absolute; top: 100%; right: 0; border: 1px solid var(--line); border-radius: var(--radius); z-index: 3 }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.024em }
h1 { font-size: clamp(29px, 3.2vw, 44px); margin: 21px 0 24px; font-weight: 750 }
h2 { font-size: clamp(21px, 2.2vw, 28px); margin: 0 0 15px }
h3 { font-size: 17px; margin: 0 0 10px }
p { margin: 0 0 13px }
.panel, .card { margin: 0 0 17px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0 }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px }
.page-head .button { min-height: 44px }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap }
.panel-head h2 { margin: 0 }
.table-panel { padding: 0; overflow: hidden }
.table-panel .toolbar { padding: 8px 14px; border-bottom: 1px solid var(--line); margin: 0 }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 14px; border-bottom: 1px solid var(--control); margin: 0 0 17px }
.tabs a { display: block; text-decoration: none; padding: 7px 20px; color: var(--muted); font-weight: 650; border-radius: 7px 7px 0 0; border: 1px solid transparent; border-bottom-width: 4px }
.tabs a[aria-current] { background: var(--surface); color: var(--green); border-color: var(--control); border-bottom-color: var(--green) }
.toolbar, .actions, .action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 }
.toolbar-right { justify-content: flex-end }
.table-wrap { width: 100%; overflow-x: auto }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; font-variant-numeric: tabular-nums }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top }
th { text-wrap: balance; background: var(--green-light); font-weight: 700 }
tr:last-child td { border-bottom: 0 }
tbody tr:hover { background: #f6faf7 }
td.num, th.num { text-align: right; white-space: nowrap }
td a { font-weight: 650 }
.empty { padding: 22px 16px; color: var(--muted); text-align: center }
.muted, .helptext, small { color: var(--muted) }
small, .helptext { font-size: 13px }
.tag, .status { font-size: 13px; font-weight: 650; padding: 3px 8px; border-radius: 12px; background: #dfefdf; display: inline-block; color: #1b573c }
.button, button, input[type=submit], .btn { background: var(--green); color: #fff; font: 650 15px/1.25 var(--ui); display: inline-flex; gap: 7px; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid var(--green); border-radius: 7px; min-height: 40px; cursor: pointer; text-decoration: none }
.button:hover, button:hover, input[type=submit]:hover, .btn:hover { background: var(--green-hover); color: white }
.button.secondary, button.secondary, .btn.secondary { color: var(--green); background: white; border-color: var(--control) }
.button.secondary:hover, button.secondary:hover, .btn.secondary:hover { background: var(--green-light); color: var(--green) }
.button .icon, button .icon { width: 18px; height: 18px }
button[disabled], .button[aria-disabled=true] { opacity: .55; cursor: default }
label { font-weight: 600 }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { width: 100%; min-width: 0; max-width: 100%; color: var(--ink); background: #fcfdfc; border: 1px solid var(--control); border-radius: 6px; min-height: 39px; padding: 7px 10px; font: inherit }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--green); vertical-align: middle }
input[type=file] { padding: 6px 8px }
textarea { min-height: 78px; resize: vertical }
select[multiple] { min-height: 130px }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 17px; align-items: end }
.form-grid label:not(.check), .form-stack p { display: grid; gap: 4px }
.form-grid .wide { grid-column: 1/-1 }
.filters { grid-template-columns: 1.24fr 1.12fr 1fr 1fr auto; padding: 12px 16px }
.more-filters { grid-column: 1/-1 }
.more-filters summary { color: var(--green); font-size: 14px }
.more-filters .form-grid { margin-top: 10px }
.filters label, .form-grid label { font-size: 14px }
.form-stack { display: grid; gap: 8px; max-width: 650px }
.form-stack > * { margin: 0 }
.form-stack button { justify-self: start }
fieldset { border: 1px solid var(--line); border-radius: 7px; margin: 0 0 13px; padding: 15px; min-width: 0 }
legend { padding: 0 6px; font-weight: 700 }
summary { cursor: pointer }
.notice, .errorlist { padding: 10px 14px; border-left: 4px solid #3f8b5c; border-radius: 3px; margin: 0 0 12px; background: #e5f3e8; color: #134729 }
.notice.error, .errorlist { border-color: var(--error); background: #fceae8; color: var(--error) }
.errorlist li { margin-left: 12px }
.error { color: var(--error) }
.detail-list { display: grid; grid-template-columns: max-content auto; gap: 4px 18px; margin: 0 }
.detail-list dt { font-weight: 650 }
.detail-list dd { margin: 0 }
.auth-main { display: grid; place-items: center; min-height: 100vh; padding: 18px }
.auth-box { padding: 28px; width: min(100%, 440px) }
.auth-box .auth-icon { width: 42px; height: 42px; color: var(--green) }
.auth-box h1 { margin: 10px 0 15px }
.auth-box form { margin-top: 16px }
.recipe-online { font-size: 14px; margin-top: 10px; padding: 10px; border-radius: 5px; background: var(--green-light) }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 217px minmax(0, 1fr) }
  .rail-nav a { padding-left: 13px; font-size: 14px }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .filters button { justify-self: start }
}
@media (max-width: 720px) {
  .shell { display: block }
  .rail { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 0 13px }
  .wordmark { font-size: 17px; margin: 12px 0; gap: 9px }
  .wordmark br { display: none }
  .wordmark .icon { width: 27px; height: 27px }
  .nav-toggle { display: inline-flex; padding: 5px 9px; min-height: 34px; background: #253b42; border-color: #647e82 }
  .rail-nav { display: none; width: 100%; padding-bottom: 10px }
  .rail-nav.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .rail-nav a { font-size: 13px; padding-inline: 5px; gap: 5px }
  .rail-nav .icon { width: 16px; height: 16px }
  .workspace { padding-inline: 12px }
  .topbar { font-size: 13px }
  .tabs { column-gap: 5px }
  .tabs a { padding-inline: 11px }
  .page-head h1 { margin: 12px 0 7px }
  .page-head { margin-bottom: 14px }
  .form-grid:not(.filters) { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .panel { padding: 13px }
  .table-panel { padding: 0 }
  th, td { padding: 8px 9px }
  .table-wrap table { min-width: 580px }
  .stock-summary .table-wrap table { min-width: 780px }
  .stock-summary td:nth-child(3) { white-space: nowrap }
}
@media (max-width: 420px) {
  .form-grid:not(.filters) { grid-template-columns: 1fr }
  .button, button, .btn { min-height: 42px }
}
