:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --paper: #fff;
  --text: #1c3029;
  --muted: #62716a;
  --line: #dfe6df;
  --green: #174a39;
  --dark: #103a30;
  --lime: #c8e692;
  --danger: #a74632;
  --warn: #8c641e;
  --r: 14px;
  --soft: #eff5ed;
  font-family:
    "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: var(--green);
}
svg.ico {
  display: inline-block;
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
}
.boot {
  padding: 18vh 8vw;
  color: var(--green);
}
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  background: #103a30;
  color: #d4e3d9;
  padding: 32px 17px 22px;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 0 8px;
  color: inherit;
}
.brandmark {
  width: 41px;
  height: 42px;
  background: var(--lime);
  color: #153b2b;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
}
.brandmark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: round;
}
.brandcopy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brandcopy strong {
  color: white;
  font-size: 20px;
  letter-spacing: 0.08em;
}
.brandcopy small {
  color: #c2d0c6;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.nav {
  display: grid;
  gap: 6px;
  margin-top: 47px;
}
.nav button {
  min-height: 47px;
  padding: 0 15px;
  border-radius: 9px;
  color: #d3dfd6;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  font-size: 15px;
  font-weight: 550;
}
.nav button:hover {
  background: #1b473a;
}
.nav button.active {
  background: #ceeba3;
  color: #193f30;
  font-weight: 700;
}
.side-foot {
  margin-top: auto;
  border-top: 1px solid #386052;
  padding: 19px 5px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  background: #dbecc3;
  color: var(--green);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  flex: none;
}
.side-foot strong {
  font-size: 14px;
  color: #fff;
  display: block;
}
.side-foot small {
  font-size: 12px;
  color: #cad8cf;
}
.side-foot button {
  color: #ccdbd0;
  margin-left: auto;
  padding: 6px;
}
.workspace {
  min-width: 0;
}
.top {
  height: 67px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 3vw, 48px);
  gap: 15px;
}
.bread {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.bread strong {
  color: var(--text);
  font-weight: 650;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.local-status {
  font-size: 13px;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.local-status:before {
  content: "";
  width: 8px;
  height: 8px;
  background: #4d8263;
  border-radius: 50%;
}
.iconbtn {
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #fff;
}
.iconbtn:hover,
.secondary:hover,
.ghost:hover {
  background: #f1f5ee;
}
.global-search {
  font-size: 14px;
  color: var(--muted);
  height: 35px;
  min-width: 160px;
  background: #f5f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}
.global-search kbd {
  margin-left: auto;
  font: 12px system-ui;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 3px;
}
.main {
  max-width: 1630px;
  margin: auto;
  padding: 30px clamp(18px, 3vw, 48px) 48px;
}
.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 23px;
}
.pagehead h1 {
  font-size: clamp(27px, 3vw, 39px);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.pagehead p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.head-actions,
.actions,
.filters,
.row-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.primary,
.secondary,
.ghost,
.dangerbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 620;
  font-size: 14px;
}
.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover {
  background: #0c372a;
}
.secondary {
  background: #fff;
  border: 1px solid #cfd9d0;
}
.ghost {
  color: var(--green);
  padding-left: 9px;
  padding-right: 9px;
}
.dangerbtn {
  color: var(--danger);
  border: 1px solid #e4c6be;
  background: #fffafa;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 19px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: var(--r);
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  min-height: 151px;
  padding: 17px 19px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.stat:hover {
  border-color: #a9bdab;
}
.stat.main-stat {
  background: #194c3b;
  border-color: #194c3b;
  color: white;
}
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 630;
}
.main-stat .stat-head {
  color: #e0eddf;
}
.square {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #edf4ea;
  color: #427052;
  display: inline-grid;
  place-items: center;
}
.main-stat .square {
  background: #38634c;
  color: #e3f1c7;
}
.square.warn {
  background: #f8ebdc;
  color: var(--warn);
}
.statval {
  font-size: clamp(31px, 3vw, 43px);
  letter-spacing: -0.055em;
  font-weight: 680;
  margin: 9px 0 4px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat small {
  color: var(--muted);
  font-size: 12px;
  margin-top: auto;
}
.main-stat small {
  color: #cbe0c7;
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 17px;
  align-items: stretch;
  margin-bottom: 17px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 19px 21px;
  min-width: 0;
}
.panel + .panel.stack,
.stack + .stack {
  margin-top: 16px;
}
.panelhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.panelhead h2,
h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}
.panelhead small {
  font-size: 13px;
  color: var(--muted);
}
.linkbtn {
  font-size: 13px;
  color: var(--green);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: #a9bfa9;
  text-underline-offset: 3px;
}
.subhead {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  margin: 20px 0 8px;
}
.empty {
  background: #f5f8f3;
  border: 1px dashed #ccdcca;
  border-radius: 10px;
  padding: 25px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  min-height: 115px;
}
.empty .ico {
  width: 25px;
  height: 25px;
  color: #728f73;
}
.empty strong {
  font-size: 15px;
  color: #45614e;
}
.empty .linkbtn {
  margin-top: 2px;
}
.compact-list {
  display: grid;
  gap: 0;
}
.listrow {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 0;
  border-bottom: 1px solid #e8ede7;
  text-align: left;
  background: #fff;
}
.listrow:first-child {
  padding-top: 2px;
}
.listrow:last-child {
  border-bottom: 0;
}
.listrow .row-main {
  min-width: 0;
  flex: 1;
}
.row-main strong,
.prodname {
  font-size: 15px;
  display: block;
  font-weight: 620;
  overflow-wrap: anywhere;
}
.row-main small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 12px;
}
.num,
.qty {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bad {
  color: var(--danger);
}
.good {
  color: var(--green);
}
.datebox {
  display: grid;
  place-items: center;
  background: #f0f5ed;
  border-radius: 8px;
  padding: 5px 8px;
  min-width: 47px;
  font-size: 13px;
  font-weight: 650;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  color: #385f43;
  background: #e9f1e5;
  white-space: nowrap;
}
.badge.out,
.badge.neutral {
  color: #58675f;
  background: #eff2ee;
}
.badge.warn {
  background: #f7eddd;
  color: #8c6226;
}
.badge.bad {
  color: var(--danger);
  background: #f9e8e2;
}
.scrolltbl {
  width: 100%;
  overflow: auto;
}
.scrolltbl table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
}
.scrolltbl th {
  font-size: 12px;
  color: var(--muted);
  background: #f4f7f2;
  font-weight: 620;
}
.scrolltbl th,
.scrolltbl td {
  padding: 10px 12px;
  border-bottom: 1px solid #e7ece6;
}
.scrolltbl th:first-child {
  border-radius: 5px 0 0 5px;
}
.scrolltbl tbody tr:last-child td {
  border-bottom: 0;
}
.scrolltbl tbody tr[data-action] {
  cursor: pointer;
}
.scrolltbl tbody tr[data-action]:hover {
  background: #f5f8f3;
}
.scrolltbl .long {
  white-space: normal;
  min-width: 13em;
  max-width: 35em;
  overflow-wrap: anywhere;
}
.inventory-heading {
  align-items: center;
}
.toolbar.inventory-toolbar {
  align-items: flex-end;
}
.inventory-report-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  margin-inline-start: auto;
}
#portal-extra .inventory-report-actions .inventory-cutoff-field {
  width: 150px;
  min-width: 0;
  margin: 0;
  gap: 3px;
  font-size: 12px;
}
.inventory-cutoff-field input {
  min-width: 0;
}
.inventory-report-actions button[hidden],
.inventory-report-error[hidden] {
  display: none;
}
@media (min-width: 821px) {
  .inventory-toolbar .filters {
    flex: 1 1 500px;
    min-width: 0;
  }
  .inventory-toolbar .searchfield {
    flex: 1 1 137px;
    max-width: 390px;
  }
  .inventory-toolbar .searchfield input[type="search"] {
    width: 100%;
    min-width: 0;
  }
}
@media (max-width: 680px) {
  .inventory-report-actions {
    gap: 6px;
  }
  #portal-extra .inventory-report-actions .inventory-cutoff-field {
    width: 134px;
  }
  #portal-extra .inventory-cutoff-field input[type="date"] {
    padding-inline: 6px;
  }
  .inventory-report-actions button {
    padding-inline: 8px;
    font-size: 13px;
  }
}
.inventory-heading .inventory-columns,
.inventory-table .inventory-cell-label,
.inventory-table .inventory-inline-unit {
  display: none;
}
.inventory-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.inventory-table table {
  min-width: 620px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.inventory-table th[scope="col"] {
  white-space: nowrap;
}
.inventory-table .inventory-name {
  min-width: 9em;
  background: inherit;
  font-size: inherit;
}
.inventory-name .badge {
  margin-inline-start: 6px;
  vertical-align: middle;
}
.inventory-product {
  padding: 3px 0;
  color: var(--green);
  font: inherit;
  font-weight: 650;
  text-align: left;
}
.inventory-product:hover {
  text-decoration: underline;
}
.inventory-table td.qty,
.inventory-table th:nth-child(5) {
  white-space: nowrap;
  text-align: right;
}
.inventory-table tbody tr:hover,
.inventory-table tbody tr:focus-within {
  background: #f5f8f3;
}
.inventory-table tbody tr:last-child th {
  border-bottom: 0;
}
@media (max-width: 680px) {
  .inventory-table {
    position: relative;
  }
  .inventory-table table,
  .inventory-table tbody {
    display: block;
    min-width: 0;
  }
  .inventory-table thead {
    position: absolute;
    inset: 0 auto auto 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .inventory-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
    gap: 5px 12px;
    padding: 10px 11px;
    border-bottom: 1px solid var(--line);
  }
  .inventory-table tbody tr:last-child {
    border-bottom: 0;
  }
  .inventory-table tbody :is(th, td) {
    min-width: 0;
    padding: 0;
    border: 0;
    font-size: 13px;
    line-height: 1.4;
  }
  .inventory-table .inventory-name {
    grid-area: 1 / 1;
    align-self: center;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 6px;
    color: inherit;
  }
  .inventory-name .badge {
    margin-inline-start: 0;
  }
  .inventory-table .inventory-product {
    min-width: 0;
    max-width: 100%;
    font-size: 15px;
    white-space: normal;
    text-spacing-trim: space-all;
    text-decoration: underline;
    text-decoration-color: #a3b6a7;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
  }
  .inventory-table .inventory-code {
    grid-area: 2 / 1;
  }
  .inventory-table .inventory-category {
    grid-area: 2 / 2;
  }
  .inventory-table .inventory-spec {
    grid-area: 3 / 1 / auto / -1;
  }
  .inventory-table .inventory-cell-label {
    display: inline;
    margin-inline-end: 6px;
    white-space: nowrap;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
  }
  .inventory-table td.inventory-quantity {
    grid-area: 1 / 2;
    white-space: normal;
    font-size: 16px;
    font-weight: 650;
  }
  .inventory-table .inventory-quantity .inventory-cell-label {
    display: block;
    margin-inline-end: 0;
  }
  .inventory-table .inventory-inline-unit {
    display: inline;
    font-size: 13px;
  }
  .inventory-table .inventory-unit {
    display: none;
  }
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 17px;
}
.filterrow {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.field,
input:not([type="checkbox"]):not([type="file"]),
textarea,
select {
  color: var(--text);
  border: 1px solid #cdd9ce;
  border-radius: 7px;
  background: #fff;
  min-height: 39px;
  padding: 8px 10px;
  max-width: 100%;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #769274;
  outline-offset: 1px;
}
textarea {
  resize: vertical;
  min-height: 76px;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' stroke='%23566959' fill='none' stroke-width='1.8'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  padding-right: 27px;
}
.searchfield {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #cdd9ce;
  border-radius: 8px;
  color: var(--muted);
}
.searchfield input:not([type="checkbox"]) {
  border: 0;
  background: transparent;
  min-width: 120px;
  width: clamp(145px, 24vw, 370px);
  padding-left: 0;
  min-height: 39px;
  outline: 0;
}
.searchfield:focus-within {
  outline: 2px solid #769274;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.tabs button {
  font-weight: 550;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
}
.tabs button.on {
  color: var(--green);
  background: #e7f0df;
  font-weight: 700;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.product-card:hover {
  border-color: #91a98e;
  box-shadow: 0 3px 12px #1836240d;
}
.pimg {
  height: 135px;
  width: 100%;
  object-fit: contain;
  background: #f3f5ef;
  display: block;
}
.noimg {
  height: 135px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #eef3eb;
  color: #71836e;
}
.noimg .ico {
  width: 32px;
  height: 32px;
  stroke-width: 1.35;
}
.noimg small {
  font-size: 12px;
}
.cardbody {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cardbody .badge {
  align-self: flex-start;
  margin-bottom: 6px;
}
.cardbody strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.cardbody .spec {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0 14px;
  min-height: 1.4em;
}
.balance {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  margin-top: auto;
}
.balance small {
  color: var(--muted);
  font-size: 12px;
}
.balance b {
  font-size: 17px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.pagination {
  margin: 17px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.four {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.span2 {
  grid-column: span 2;
}
.wide {
  grid-column: 1/-1;
}
label.formfield,
.formfield {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #425a4b;
}
label.formfield input,
label.formfield select,
label.formfield textarea {
  width: 100%;
  font-size: 15px;
  font-weight: 400;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.note,
.error,
.info {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 7px;
  line-height: 1.55;
  font-size: 14px;
}
.note,
.info {
  color: #3b6049;
  background: #edf4e8;
}
.error {
  color: #963a2b;
  background: #f8e9e5;
}
.linebox {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f9fbf7;
  padding: 13px;
  margin: 10px 0;
}
.linebox h4 {
  margin: 0 0 10px;
  font-size: 15px;
}
.raw {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 230px;
  overflow: auto;
  border-left: 3px solid #bbd0af;
  background: #f6f8f4;
  margin: 8px 0;
  padding: 10px 13px;
  font: 14px/1.65 inherit;
}
.section-actions {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin: 15px 0;
}
.split-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.flex {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.list-empty {
  padding: 15px;
  color: var(--muted);
  font-size: 14px;
}
.tablebtn {
  padding: 2px 0;
  text-align: left;
  font-weight: 620;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #b8c8b6;
}
.taskcard,
.draftcard {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.taskcard + .taskcard,
.draftcard + .draftcard {
  margin-top: 10px;
}
.taskcard h3,
.draftcard h3 {
  font-size: 16px;
}
.taskcard p,
.draftcard p {
  margin: 8px 0;
  font-size: 14px;
}
.progress {
  height: 5px;
  border-radius: 4px;
  background: #e1e9df;
  overflow: hidden;
  margin: 6px 0;
}
.progress span {
  background: #7d9c64;
  height: 100%;
  display: block;
}
.sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
dialog {
  width: min(780px, 93vw);
  max-height: 89dvh;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0;
  color: var(--text);
  box-shadow: 0 18px 85px #12251c4a;
}
dialog::backdrop {
  background: #0e281f73;
}
#dialog-inner {
  padding: 22px;
}
.dlghead {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  justify-content: space-between;
  margin-bottom: 17px;
}
.dlghead h2 {
  margin: 0;
  font-size: 24px;
  overflow-wrap: anywhere;
}
.dlghead p {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 0;
}
.detailtop {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
}
.detailtop .pimg,
.detailtop .noimg {
  width: 150px;
  height: 116px;
  border-radius: 9px;
}
.detailtop .photo-actions {
  margin-top: 8px;
  font-size: 13px;
}
.detailfacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.detailfacts small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.detailfacts strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
}
.img-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 13px;
}
.img-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.msgimg {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 7px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.select-drafts {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pillfilter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}
.installbtn {
  padding: 0;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.authwrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 35px 20px;
  background: #edf2ea;
}
.auth {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  border: 1px solid #d6e0d4;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 60px #294c2f14;
}
.auth-art {
  background: var(--dark);
  color: #dcecd2;
  padding: 35px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 480px;
  position: relative;
}
.auth-art .brand {
  padding: 0;
}
.auth-art h2 {
  font-size: 43px;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
  color: #f4f8ec;
  line-height: 1.2;
}
.auth-art p {
  color: #d4e1d1;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  max-width: 22em;
}
.authform {
  padding: clamp(25px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.authform h1 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.04em;
}
.authform p {
  color: var(--muted);
  margin: 9px 0 22px;
  font-size: 14px;
  line-height: 1.6;
}
.authform .formfield {
  margin-top: 13px;
}
.authform .primary {
  width: 100%;
  margin-top: 20px;
}
.auth-logo {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #c8ddc5;
  font-size: 13px;
}
.shelf-art {
  width: 170px;
  height: 86px;
  margin: 20px 0 22px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  border-bottom: 4px solid #accd8d;
  border-top: 2px solid #517962;
  padding: 0 11px 6px;
}
.shelf-art:before,
.shelf-art:after {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -8px;
  width: 3px;
  background: #a5c585;
}
.shelf-art:before {
  left: 0;
}
.shelf-art:after {
  right: 0;
}
.carton {
  width: 43px;
  height: 34px;
  border: 2px solid #a8c693;
  border-radius: 2px;
  position: relative;
}
.carton:before {
  content: "";
  position: absolute;
  left: 17px;
  top: 0;
  width: 6px;
  height: 12px;
  border-left: 1px solid #a8c693;
  border-right: 1px solid #a8c693;
}
.carton.tall {
  height: 53px;
}
.carton.short {
  height: 26px;
}
.authform .error:empty {
  display: none;
}
#notice {
  position: fixed;
  z-index: 9;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  border-radius: 9px;
  background: #213f31;
  color: white;
  max-width: min(600px, 90vw);
  padding: 11px 16px;
  box-shadow: 0 5px 25px #18262233;
  font-size: 14px;
  white-space: pre-wrap;
}
#notice:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
.mobilehead {
  display: none;
}
.palette-item {
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}
.palette-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.palette-results {
  margin-top: 10px;
  max-height: 46vh;
  overflow: auto;
}
@media (min-width: 1500px) {
  .shell {
    grid-template-columns: 245px minmax(0, 1fr);
  }
  .stat {
    min-height: 163px;
  }
  .side {
    padding-left: 23px;
    padding-right: 23px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 183px minmax(0, 1fr);
  }
  .side {
    padding: 26px 12px 18px;
  }
  .cols {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
  .main {
    padding-top: 24px;
  }
  .stat {
    padding: 14px;
    min-height: 137px;
  }
  .panel {
    padding: 16px;
  }
  .four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .shell {
    display: block;
  }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    display: none;
    width: 230px;
    box-shadow: 10px 0 40px #1c302945;
  }
  .side.open {
    display: flex;
  }
  .side.open:after {
    content: "";
    position: fixed;
    top: 0;
    left: 230px;
    right: 0;
    bottom: 0;
    background: #10291b44;
    pointer-events: none;
  }
  .mobilehead {
    display: inline-grid;
  }
  .top {
    height: 58px;
    padding: 0 17px;
  }
  .bread {
    gap: 6px;
  }
  .global-search {
    min-width: unset;
  }
  .global-search kbd {
    display: none;
  }
  .top-actions {
    gap: 9px;
  }
  .main {
    padding: 20px 16px 36px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 13px;
    min-height: 125px;
  }
  .stat-head {
    font-size: 13px;
  }
  .cols {
    gap: 12px;
  }
  .panel {
    padding: 14px;
  }
  .main-stat small,
  .stat small {
    font-size: 11px;
  }
}
@media (max-width: 620px) {
  .auth {
    display: block;
    max-width: 430px;
  }
  .auth-art {
    min-height: 0;
    padding: 20px 23px;
  }
  .auth-art .auth-pitch,
  .auth-art .auth-logo {
    display: none;
  }
  .authform {
    padding: 26px 23px;
  }
  .local-status {
    display: none;
  }
  .global-search {
    padding: 0 8px;
  }
  .top .bread > span:first-of-type,
  .top .bread > span.divider {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    min-height: 111px;
  }
  .statval {
    font-size: 31px;
    margin: 4px 0;
  }
  .square {
    width: 24px;
    height: 24px;
  }
  .square .ico {
    width: 16px;
    height: 16px;
  }
  .cols {
    display: flex;
    flex-direction: column;
  }
  .pagehead {
    align-items: flex-start;
    margin-bottom: 17px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .pagehead h1 {
    font-size: 28px;
  }
  .head-actions {
    gap: 6px;
  }
  .head-actions button {
    font-size: 13px;
    min-height: 34px;
    padding: 7px 10px;
  }
  .inventory-heading {
    align-items: center;
    gap: 8px;
  }
  .inventory-heading .inventory-columns:not([hidden]) {
    display: inline-flex;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .inventory-cards .cardbody {
    width: 100%;
    overflow-wrap: anywhere;
  }
  .inventory-cards .badge {
    min-width: 0;
    white-space: normal;
  }
  .inventory-cards .balance {
    flex-wrap: wrap;
  }
  [data-card-columns="3"] > .inventory-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  [data-card-columns="3"] > .inventory-cards .product-card {
    position: relative;
  }
  [data-card-columns="3"] > .inventory-cards :is(.pimg, .noimg) {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
  }
  [data-card-columns="3"] > .inventory-cards .pimg {
    background: #fff;
  }
  [data-card-columns="3"] > .inventory-cards .cardbody {
    padding: 6px 7px 7px;
    gap: 3px;
    line-height: 1.3;
  }
  [data-card-columns="3"] > .inventory-cards .cardbody .flex {
    display: contents;
  }
  [data-card-columns="3"] > .inventory-cards .badge:not(.warn, .neutral) {
    display: none;
  }
  [data-card-columns="3"] > .inventory-cards .badge {
    position: absolute;
    top: 5px;
    margin: 0;
    padding: 2px 3px;
    white-space: nowrap;
    font-size: 10px;
  }
  [data-card-columns="3"] > .inventory-cards .badge.warn {
    left: 5px;
  }
  [data-card-columns="3"] > .inventory-cards .badge.neutral {
    right: 5px;
  }
  [data-card-columns="3"] > .inventory-cards .spec {
    margin: 0;
    min-height: 0;
  }
  [data-card-columns="3"] > .inventory-cards .spec:empty {
    display: none;
  }
  [data-card-columns="3"] > .inventory-cards .balance {
    justify-content: flex-start;
    border-top: 0;
    padding-top: 2px;
  }
  [data-card-columns="3"] > .inventory-cards .balance small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  [data-card-columns="3"] > .inventory-cards .balance b {
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--soft);
    color: var(--green);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
  }
  [data-card-columns="3"] > .inventory-cards .balance .bad {
    background: #f9e8e2;
    color: var(--danger);
  }
  .pimg,
  .noimg {
    height: 105px;
  }
  .cardbody {
    padding: 10px;
  }
  .cardbody strong {
    font-size: 14px;
  }
  .cardbody .spec {
    font-size: 12px;
  }
  .balance {
    align-items: flex-end;
  }
  .balance b {
    font-size: 15px;
  }
  .formgrid,
  .two,
  .four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .formgrid .span2 {
    grid-column: 1/-1;
  }
  .detailtop {
    grid-template-columns: 105px 1fr;
    gap: 12px;
  }
  .detailtop .pimg,
  .detailtop .noimg {
    width: 105px;
    height: 99px;
  }
  .detailfacts {
    gap: 7px;
  }
  .detailfacts strong {
    font-size: 15px;
  }
  .toolbar {
    align-items: flex-start;
  }
  .filters,
  .filterrow {
    width: 100%;
  }
  .searchfield {
    flex: 1;
    min-width: 130px;
  }
  .searchfield input:not([type="checkbox"]) {
    width: 100%;
    min-width: 0;
  }
  dialog {
    width: 96vw;
    max-height: 92dvh;
  }
  #dialog-inner {
    padding: 15px;
  }
  .dlghead h2 {
    font-size: 21px;
  }
  .section-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .tabs button {
    padding: 6px 8px;
  }
  .scrolltbl th,
  .scrolltbl td {
    padding: 9px 8px;
  }
  .authwrap {
    padding: 15px;
  }
  .panelhead {
    gap: 8px;
  }
  .stat-head {
    font-size: 13px;
  }
  .datebox {
    min-width: 42px;
  }
  .small {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
  }
}
.home-gallery {
  margin-bottom: 17px;
}
.samplegrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.samplecard {
  display: flex;
  align-items: center;
  padding: 0;
  text-align: left;
  gap: 10px;
  min-width: 0;
  border-radius: 8px;
}
.samplecard:hover {
  background: #f6f8f2;
}
.samplecard .pimg {
  width: clamp(52px, 5.2vw, 82px);
  height: clamp(58px, 5.7vw, 89px);
  border: 1px solid #e5eadf;
  border-radius: 7px;
  background: #f6f7f2;
  flex: none;
}
.samplecard strong {
  display: block;
  font-size: 14px;
  line-height: 1.43;
  overflow-wrap: anywhere;
}
.samplecard small,
.samplecard em {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}
.samplecard em {
  font-size: 11px;
  color: #805d28;
}
@media (max-width: 1100px) {
  .samplegrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .samplecard .pimg {
    width: 58px;
    height: 58px;
  }
}
@media (max-width: 620px) {
  .samplegrid {
    gap: 10px;
  }
  .samplecard {
    gap: 6px;
  }
  .samplecard .pimg {
    width: 48px;
    height: 54px;
  }
  .samplecard strong {
    font-size: 13px;
  }
  .samplecard small {
    font-size: 12px;
  }
  .samplecard em {
    font-size: 10px;
  }
}
.range-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
}
.draft-source-choice {
  margin: 0;
  padding: 0;
  min-width: 0;
  border: 0;
  font-size: 14px;
  color: #425a4b;
}
.draft-source-choice legend {
  margin-bottom: 7px;
  padding: 0;
  font-weight: 600;
}
.draft-source-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.draft-source-options label, .draft-source-custom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.draft-source-options label {
  justify-content: center;
  min-height: 41px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.draft-source-options label:has(:checked) {
  background: #edf4e8;
  border-color: #719174;
  color: var(--green);
  font-weight: 650;
}
.draft-source-choice input[type="radio"] {
  min-height: 0;
  margin: 0;
  padding: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}
.draft-source-choice summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}
.range-summary > div {
  padding: 9px;
  background: #f7f9f4;
}
.range-summary small {
  color: var(--muted);
  font-size: 12px;
  display: block;
}
.range-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}
.mobile-date {
  display: none;
}
@media (max-width: 620px) {
  .range-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recent-table .move-date,
  .recent-table .move-doc,
  .recent-table th:first-child,
  .recent-table th:last-child {
    display: none;
  }
  .recent-table .mobile-date {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
  }
  .recent-table table {
    table-layout: auto;
    white-space: normal;
  }
  .recent-table .long {
    min-width: 0;
    width: 48%;
  }
  .recent-table td.qty {
    font-size: 13px;
    max-width: 90px;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .recent-table .scrolltbl td,
  .recent-table .scrolltbl th {
    padding: 8px 4px;
  }
}
