:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #24392f;
  background: #f4f6f2;
  font-synthesis: none;
  font-size: 14px;
  --green: #205c46;
  --muted: #829088;
  --line: #e7ebe5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #86b69e;
  outline-offset: 3px;
}
input,
select {
  min-width: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.header {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1220px;
  margin: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: 0.3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: var(--green);
  color: white;
  font-family: Georgia, serif;
  font-size: 32px;
  line-height: 1;
  padding-bottom: 9px;
}
.brand-divider {
  color: #d2dbd4;
  font-weight: 400;
  margin: 0 17px;
}
.brand-sub {
  font-size: 16px;
  font-weight: 600;
}
.account {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7a70;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5c9875;
  margin-right: 4px;
}
.dot.offline {
  background: #bb934f;
}
.text-button {
  border: 0;
  background: none;
  color: #6e7c72;
  margin-left: 15px;
  font-size: 12px;
}
.workspace {
  max-width: 1220px;
  margin: auto;
  padding: 43px 34px 20px;
}
.eyebrow {
  color: #7e9d8a;
  font-size: 10px;
  letter-spacing: 2.2px;
  font-weight: 700;
  margin-bottom: 12px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 27px;
}
h1 {
  font-size: 34px;
  letter-spacing: -1px;
  font-weight: 650;
  line-height: 1.3;
}
.muted {
  color: #7d8980;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 12px;
}
.printer {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #e0e6dd;
  background: #fcfdfb;
  border-radius: 12px;
  padding: 15px 21px;
}
.printer strong {
  font-weight: 600;
  font-size: 12px;
}
.printer p {
  font-size: 10px;
  color: #7b8a80;
  margin-top: 8px;
}
.printer-symbol {
  font-size: 28px;
  color: #728d7d;
}
.printer-model {
  border-left: 1px solid #dce3d9;
  margin-left: 9px;
  padding-left: 9px;
}
.schedule-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: #eaf0e7;
  border: 1px solid #e2e9dc;
  border-radius: 11px;
  padding: 18px 24px;
  margin-bottom: 26px;
}
.schedule-strip > div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  border-right: 1px solid #d8e1d3;
}
.schedule-strip > div:first-child {
  padding-left: 0;
}
.schedule-strip > div:nth-child(3) {
  border: 0;
}
.schedule-strip span {
  font-size: 10px;
  color: #83917e;
}
.schedule-strip strong {
  display: block;
  color: #496249;
  font-size: 12px;
  font-weight: 550;
  margin-top: 5px;
  letter-spacing: 0.2px;
}
.schedule-strip .small-icon {
  font-size: 26px;
  color: #648260;
}
.timezone {
  margin-left: auto;
  white-space: nowrap;
}
.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 30px;
}
.summary article {
  border: 1px solid #e3e8df;
  border-radius: 12px;
  background: white;
  padding: 22px 25px;
}
.summary article > p {
  font-size: 12px;
  color: #647469;
  margin-bottom: 11px;
}
.summary article > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.summary strong {
  font-size: 34px;
  font-weight: 550;
  letter-spacing: -1px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.summary article > div > span {
  font-size: 11px;
  color: #9aa69c;
}
.stat-note {
  display: block;
  font-size: 10px;
  color: #a0aaa2;
  margin-top: 13px;
}
.summary article:last-child strong {
  color: #386c4f;
}
.summary article > div .badge {
  margin-left: auto;
  font-size: 10px;
}
.list-panel {
  background: white;
  border: 1px solid #e1e7dc;
  border-radius: 14px;
  overflow: hidden;
}
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 26px;
}
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  height: 63px;
  color: #89958c;
  font-weight: 500;
  padding: 0 1px;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 650;
}
.tab span {
  font-size: 10px;
  background: #eff2ed;
  color: #8a988a;
  padding: 2px 7px;
  border-radius: 5px;
}
.tab.active span {
  color: #5b7a60;
  background: #eaf1e7;
}
.refresh-button {
  border: 0;
  background: transparent;
  color: #7c8c80;
  font-size: 17px;
}
.refresh-button span {
  font-size: 11px;
  margin-left: 5px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 23px 24px;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: center;
}
.date-field,
.search-field {
  display: flex;
  align-items: center;
  border: 1px solid #e2e7df;
  border-radius: 7px;
  background: #fff;
  height: 37px;
  padding: 0 12px;
  gap: 12px;
}
.date-field > span {
  font-size: 10px;
  color: #98a397;
  white-space: nowrap;
}
.search-field {
  background: #f9faf7;
  border-color: #edf0e9;
  width: 230px;
}
.search-field input {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 11px;
  width: 100%;
  color: #4f6254;
}
.search-field > span {
  color: #9ba896;
  font-size: 24px;
}
.search-field input::placeholder {
  color: #a4aea3;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  height: 37px;
  padding: 0 17px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}
.button.primary {
  background: var(--green);
  color: #fff;
}
.button.primary:hover:not(:disabled) {
  background: #174a38;
}
.button.secondary {
  background: white;
  border-color: #dbe4d7;
  color: #506d51;
}
.button.secondary:hover:not(:disabled) {
  background: #f0f5ec;
}
.button.small {
  height: 30px;
  padding: 0 16px;
  font-size: 11px;
}
.table-head,
.item-row {
  display: grid;
  grid-template-columns:
    minmax(240px, 2.35fr) minmax(120px, 1fr) minmax(80px, 0.75fr)
    minmax(110px, 0.85fr) 63px;
  gap: 12px;
  align-items: center;
  padding: 0 24px;
}
.table-head {
  height: 37px;
  background: #f8faf6;
  border-top: 1px solid #edf0e9;
  border-bottom: 1px solid #edf0e9;
  color: #9aa69a;
  font-size: 10px;
}
.table-head > span:last-child {
  text-align: right;
}
.item-row {
  min-height: 110px;
  border-bottom: 1px solid #edf1e9;
}
.item-row:last-child {
  border-bottom: 0;
}
.product-cell {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.product-avatar {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  border-radius: 10px;
  background: #f1eee6;
  color: #a89775;
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
}
.item-row:nth-child(3n + 2) .product-avatar {
  background: #eef3e8;
  color: #829671;
}
.item-row:nth-child(3n) .product-avatar {
  background: #f3ece5;
  color: #b19578;
}
.product-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.product-meta {
  font-size: 10px;
  color: #8c9a8d;
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.storage-tag {
  color: #79977d;
  font-size: 9px;
  border: 1px solid #e1ebdc;
  border-radius: 3px;
  padding: 1px 5px;
}
.barcode {
  font:
    10px ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 0.4px;
  color: #a5afa3;
  margin-top: 6px;
}
.cell {
  font-size: 11px;
  color: #718273;
}
.quantity strong {
  font-size: 15px;
  font-weight: 600;
  color: #455d49;
  font-variant-numeric: tabular-nums;
}
.quantity > span {
  font-size: 10px;
  color: #a8b1a3;
}
.action-cell {
  text-align: right;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  color: #5c8a61;
  border-radius: 5px;
  padding: 5px 8px;
  background: #eff6ea;
  white-space: nowrap;
}
.badge.waiting {
  background: #fbf3e5;
  color: #ab8846;
}
.badge.danger {
  background: #fcf0ec;
  color: #b07b65;
}
.badge.neutral {
  background: #f0f2ee;
  color: #8a9687;
}
.list-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  font-size: 10px;
  color: #a2ada0;
  background: #fdfefb;
}
.page-footer {
  text-align: center;
  font-size: 10px;
  color: #a9b3a5;
  margin: 25px 0 0;
  letter-spacing: 0.3px;
}
.page-footer span {
  margin: 0 10px;
}
.empty {
  text-align: center;
  padding: 52px 20px;
  color: #96a18f;
}
.empty-symbol {
  font-size: 32px;
  color: #b8c5af;
}
.empty h3 {
  font-size: 14px;
  color: #6b7c62;
  margin: 17px 0 10px;
  font-weight: 500;
}
.empty p {
  font-size: 11px;
  line-height: 1.8;
}
.empty .button {
  margin: 18px auto 0;
}
.demo-banner {
  background: #fff8e8;
  color: #9d854d;
  border: 1px solid #eee3c7;
  padding: 11px 15px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 11px;
  line-height: 1.6;
}
.demo-banner span {
  font-weight: 700;
  margin-right: 12px;
}
.history-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 20px 25px;
}
.history-row h3 {
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 9px;
}
.history-row p {
  font-size: 10px;
  color: #8f9d89;
  line-height: 1.8;
}
.history-row .error {
  color: #ad7a65;
  margin-top: 6px;
}
.history-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-panel {
  max-width: 440px;
  margin: 70px auto;
  padding: 0 26px 40px;
}
.login-symbol {
  color: #62916c;
  font-size: 40px;
  margin-bottom: 25px;
}
.login-panel h1 {
  font-size: 33px;
  line-height: 1.5;
}
.login-panel form {
  margin-top: 28px;
}
label:not(.date-field):not(.search-field) {
  display: block;
  font-size: 12px;
  color: #667b61;
}
input:not([type="date"]):not([type="search"]),
select {
  border: 1px solid #dbe3d5;
  border-radius: 7px;
  background: white;
  width: 100%;
  height: 43px;
  padding: 0 12px;
  margin: 9px 0 18px;
  color: #445e3e;
  font-size: 13px;
}
.login-panel .button {
  width: 100%;
  height: 44px;
  justify-content: space-between;
  font-size: 13px;
}
.error {
  color: #af6d5d;
  font-size: 11px;
  line-height: 1.6;
  margin: 5px 0 10px;
  min-height: 0;
}
.error:empty {
  display: none;
}
dialog {
  border: 1px solid #e1e7dc;
  border-radius: 16px;
  width: min(430px, calc(100% - 32px));
  padding: 28px;
  box-shadow: 0 25px 100px #15321b33;
  color: #334d32;
}
dialog::backdrop {
  background: #172b2266;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #edf3e9;
  color: #6c8963;
  font-size: 25px;
}
.close-button {
  font-size: 26px;
  font-weight: 300;
  border: 0;
  background: none;
  color: #9ba994;
  padding: 0 4px;
}
.dialog-heading + .eyebrow {
  margin-bottom: 8px;
}
h2 {
  font-size: 22px;
  font-weight: 600;
}
.dialog-summary {
  background: #f4f7f0;
  border: 1px solid #e7eddf;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin: 19px 0 22px;
  border-radius: 8px;
  font-size: 12px;
}
.dialog-summary strong {
  font-size: 18px;
  white-space: nowrap;
}
.notice {
  font-size: 10px;
  line-height: 1.8;
  color: #9b987b;
  margin: 10px 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.dialog-actions .button {
  height: 40px;
  padding: 0 22px;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #254b35;
  color: white;
  box-shadow: 0 8px 30px #253f3426;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 12px;
  max-width: 90%;
  z-index: 5;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .workspace {
    padding: 30px 22px;
  }
  .header-inner {
    padding: 0 22px;
  }
  .printer {
    padding: 13px;
  }
  .schedule-strip {
    padding: 16px 18px;
  }
  .schedule-strip > div {
    padding: 0 20px;
  }
  .timezone {
    display: none;
  }
  .table-head,
  .item-row {
    grid-template-columns: minmax(180px, 1.8fr) 110px 65px 95px 55px;
    padding: 0 18px;
    gap: 8px;
  }
  .toolbar {
    padding: 18px;
  }
  .search-field {
    width: 190px;
  }
  .list-header {
    padding: 0 18px;
  }
  .list-footer {
    padding: 15px 18px;
  }
  .summary article {
    padding: 20px;
  }
}
@media (max-width: 640px) {
  .header {
    height: 64px;
  }
  .header-inner {
    padding: 0 20px;
  }
  .brand {
    font-size: 17px;
    gap: 10px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 28px;
  }
  .brand-sub {
    font-size: 14px;
  }
  .brand-divider {
    margin: 0 11px;
  }
  .account {
    font-size: 10px;
  }
  .account > .dot {
    display: none;
  }
  .text-button {
    margin-left: 2px;
    font-size: 10px;
  }
  .workspace {
    padding: 27px 16px 22px;
  }
  .page-heading {
    display: block;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .page-heading .muted {
    font-size: 11px;
    margin-top: 8px;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 9px;
  }
  .printer {
    display: flex;
    margin-top: 21px;
    justify-content: flex-start;
    padding: 12px 15px;
    border-radius: 9px;
  }
  .printer-symbol {
    font-size: 24px;
  }
  .printer strong {
    font-size: 11px;
  }
  .printer p {
    margin-top: 6px;
  }
  .schedule-strip {
    padding: 16px 14px;
    display: grid;
    grid-template-columns: 1fr 1.9fr;
    margin-bottom: 18px;
    gap: 13px 12px;
    border-radius: 9px;
  }
  .schedule-strip > div {
    padding: 0;
    border: 0;
  }
  .schedule-strip > div:first-child {
    gap: 8px;
  }
  .schedule-strip > div:nth-child(3) {
    display: none;
  }
  .schedule-strip .small-icon {
    font-size: 23px;
  }
  .schedule-strip span {
    font-size: 9px;
  }
  .schedule-strip strong {
    font-size: 10px;
    line-height: 1.5;
    margin-top: 3px;
  }
  .summary {
    gap: 8px;
    margin-bottom: 23px;
  }
  .summary article {
    padding: 16px 12px;
    border-radius: 9px;
  }
  .summary article > p {
    font-size: 10px;
    margin-bottom: 10px;
    white-space: nowrap;
  }
  .summary strong {
    font-size: 27px;
  }
  .summary article > div {
    gap: 4px;
    flex-wrap: wrap;
  }
  .summary article > div > span {
    font-size: 9px;
  }
  .summary article > div .badge {
    display: none;
  }
  .stat-note {
    font-size: 8px;
    line-height: 1.5;
    margin-top: 10px;
    min-height: 24px;
    letter-spacing: -0.1px;
  }
  .list-panel {
    border-radius: 11px;
  }
  .list-header {
    padding: 0 15px;
  }
  .tab {
    height: 55px;
    font-size: 12px;
  }
  .tabs {
    gap: 22px;
  }
  .refresh-button span {
    display: none;
  }
  .toolbar {
    display: block;
    padding: 17px 14px;
  }
  .filters {
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
  }
  .date-field {
    flex: 0 0 100%;
    justify-content: space-between;
    height: 37px;
  }
  .search-field {
    flex: 1;
    height: 37px;
    width: auto;
    margin-top: 2px;
    padding: 0 9px;
  }
  .toolbar > .button {
    float: right;
    margin-top: -37px;
    height: 37px;
    padding: 0 12px;
  }
  .search-field {
    margin-right: 110px;
  }
  .table-head {
    display: none;
  }
  .item-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px 10px;
    padding: 19px 15px;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    min-height: 144px;
  }
  .product-cell {
    grid-column: 1/3;
    gap: 11px;
  }
  .product-avatar {
    height: 43px;
    width: 43px;
    flex-basis: 43px;
    border-radius: 9px;
    font-size: 19px;
  }
  .product-name {
    font-size: 13px;
  }
  .product-meta {
    font-size: 10px;
    margin-top: 5px;
  }
  .barcode {
    font-size: 9px;
    margin-top: 5px;
  }
  .production-date {
    grid-column: 1/2;
    grid-row: 2;
    font-size: 10px;
    color: #9ca894;
  }
  .production-date:before {
    content: attr(data-label) " ";
    color: #b1b9aa;
    margin-right: 2px;
    font-size: 9px;
  }
  .quantity {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
    align-self: start;
    padding-top: 3px;
  }
  .quantity strong {
    font-size: 19px;
  }
  .quantity > span {
    font-size: 9px;
  }
  .state-cell {
    grid-column: 2;
    grid-row: 2;
  }
  .badge {
    font-size: 9px;
    padding: 4px 6px;
  }
  .action-cell {
    grid-column: 3;
    grid-row: 2;
  }
  .button.small {
    height: 29px;
    padding: 0 12px;
    font-size: 10px;
  }
  .list-footer {
    display: block;
    text-align: center;
    font-size: 9px;
    padding: 14px 10px;
    line-height: 1.8;
  }
  .list-footer > span:last-child {
    display: block;
    color: #b6bfaf;
  }
  .page-footer {
    font-size: 9px;
    margin-top: 23px;
  }
  .history-row {
    align-items: flex-start;
    padding: 18px 15px;
    gap: 10px;
  }
  .history-row h3 {
    font-size: 12px;
  }
  .history-row p {
    font-size: 9px;
  }
  .history-actions {
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
  }
  .history-actions .button {
    height: 28px;
    padding: 0 10px;
  }
  .demo-banner {
    font-size: 10px;
    padding: 10px 12px;
    margin-bottom: 23px;
  }
  .login-panel {
    margin-top: 45px;
  }
  .login-panel h1 {
    font-size: 30px;
  }
  dialog {
    padding: 24px;
  }
  .dialog-summary {
    padding: 14px;
  }
  .toast {
    bottom: 20px;
    width: max-content;
    max-width: 90%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none !important;
  }
}

.management-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 22px;
}
.admin-dialog {
  width: min(680px, calc(100% - 24px));
  max-height: 90vh;
  overflow-y: auto;
}
.admin-dialog .muted {
  font-size: 12px;
  line-height: 1.7;
}
.admin-section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}
.admin-section h3 {
  font-size: 15px;
  margin-bottom: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .management-actions .button {
    font-size: 11px;
    padding: 0 12px;
  }
}

.view-switch {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
}
.preview-notice {
  font-size: 12px;
  line-height: 1.8;
  color: #718273;
  margin: 0 0 18px;
}
.preview-warning {
  padding: 12px 16px;
  background: #fff5eb;
  border-radius: 8px;
}
.order-card {
  border-top: 1px solid var(--line);
  padding: 22px 24px;
}
.order-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 12px;
  margin-bottom: 12px;
}
.order-heading span {
  color: #8b9985;
  font-size: 11px;
}
.order-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  line-height: 1.7;
  font-size: 12px;
  color: #657a5e;
}
.order-line strong {
  white-space: nowrap;
}
.order-source {
  font-size: 10px;
  color: #8a9984;
  margin-top: 6px;
}
.more-orders {
  display: flex;
  justify-content: center;
  padding: 14px;
}
.preview-mode .search-field {
  width: 310px;
  margin-right: 0;
}
.preview-mode .table-head,
.preview-mode .item-row {
  grid-template-columns:
    minmax(240px, 2.35fr) minmax(120px, 1fr) minmax(80px, 0.75fr)
    minmax(110px, 0.85fr);
}
.preview-mode .table-head > span:last-child,
.preview-mode .action-cell {
  display: none;
}
@media (max-width: 640px) {
  .preview-notice {
    font-size: 11px;
  }
  .order-card {
    padding: 18px 15px;
  }
  .order-heading {
    flex-direction: column;
  }
  .order-line {
    font-size: 11px;
    gap: 12px;
  }
  .preview-mode .search-field {
    width: auto;
  }
  .preview-mode .item-row {
    grid-template-columns: 1fr auto auto;
  }
  .preview-mode .state-cell {
    grid-column: 2/4;
    text-align: right;
  }
}

/* A shared date selector for desktop and mobile, without the browser's native popup. */
.date-control {
  flex-shrink: 0;
}
.date-field {
  gap: 9px;
  min-width: 232px;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.date-field:hover,
.date-field[aria-expanded="true"] {
  border-color: #93b6a3;
  background: #f6faf5;
}
.date-field > span {
  font-size: 10px;
  color: #8d9b8f;
}
.date-field > strong {
  font-size: 12px;
  font-weight: 550;
  color: #355443;
  white-space: nowrap;
}
.date-icon {
  width: 17px;
  height: 17px;
  color: #6c8d76;
  flex-shrink: 0;
}
.date-chevron {
  width: 13px;
  height: 13px;
  color: #96a794;
  margin-left: auto;
}
dialog.calendar-dialog {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 344px;
  max-width: calc(100vw - 24px);
  padding: 20px;
  border: 1px solid #e1e9de;
  border-radius: 18px;
  background: #fffefa;
  color: #304c3c;
  box-shadow:
    0 16px 60px #183b2529,
    0 3px 12px #183b2510;
}
.calendar-dialog::backdrop {
  background: #203c2d1f;
  backdrop-filter: none;
}
.calendar-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #91a08f;
}
.calendar-close {
  border: 0;
  background: transparent;
  color: #91a08f;
  font-size: 24px;
  line-height: 24px;
  padding: 0 5px;
  border-radius: 5px;
}
.calendar-close:hover {
  background: #eef3e9;
  color: var(--green);
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.calendar-nav h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.5px;
}
.calendar-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0 0 3px;
  font-size: 27px;
  line-height: 1;
  border: 1px solid #e4eadd;
  border-radius: 9px;
  background: transparent;
  color: #759173;
}
.calendar-arrow:hover:not(:disabled) {
  color: var(--green);
  background: #edf4e9;
  border-color: #cbdcc5;
}
.calendar-arrow:disabled {
  opacity: 0.28;
}
.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.calendar-weekdays {
  margin-bottom: 6px;
  text-align: center;
  line-height: 24px;
  font-size: 11px;
  color: #a0ac98;
}
.calendar-weekdays span:nth-last-child(-n + 2) {
  color: #b4a68d;
}
.calendar-day {
  position: relative;
  height: 38px;
  padding: 0 0 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #405e48;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.calendar-day.outside-month {
  color: #b8c2b1;
}
.calendar-day:disabled {
  color: #cbd1c5;
  opacity: 1;
  cursor: default;
}
.calendar-day:hover:not(:disabled) {
  background: #edf3e6;
}
.calendar-day.is-today {
  border-color: #b8d1b1;
  color: var(--green);
}
.calendar-day.is-selected,
.calendar-day.is-selected:hover {
  color: white;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 3px 8px #205c4626;
}
.calendar-day:focus-visible {
  outline: 2px solid #8cb399;
  outline-offset: 1px;
}
.calendar-day.has-record::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  bottom: 4px;
  left: calc(50% - 1.5px);
}
.calendar-shortcuts {
  display: flex;
  gap: 8px;
  border-top: 1px solid #e9eddf;
  padding-top: 14px;
  margin-top: 16px;
}
.calendar-shortcuts button {
  flex: 1;
  border: 1px solid #e2e9d9;
  border-radius: 8px;
  height: 33px;
  color: #5e7e59;
  background: #f6f8ef;
  font-size: 11px;
}
.calendar-shortcuts button:hover {
  background: #eaf1df;
  border-color: #c8d9ba;
}
.calendar-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 10px;
  color: #a0ab96;
}
.calendar-record-dot {
  width: 4px;
  height: 4px;
  background: #7e9974;
  border-radius: 50%;
}
.calendar-timezone {
  margin-left: auto;
  color: #b4bdab;
}
@media (max-width: 640px) {
  .date-control {
    flex: 0 0 100%;
  }
  .date-field {
    width: 100%;
    height: 41px;
    justify-content: flex-start;
  }
  .date-field > strong {
    margin-left: auto;
  }
  .date-chevron {
    margin-left: 5px;
  }
  dialog.calendar-dialog {
    inset: auto 12px max(12px, env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    padding: 22px;
    border-radius: 22px;
  }
  .calendar-nav h2 {
    font-size: 20px;
  }
  .calendar-day {
    height: 44px;
    font-size: 14px;
    border-radius: 12px;
  }
  .calendar-weekdays {
    font-size: 12px;
  }
  .calendar-shortcuts button {
    height: 40px;
    font-size: 12px;
  }
  .calendar-close {
    padding: 4px 7px;
  }
}

/* Keep the product list close to the top on phones and desktops. */
.simple-layout {
  position: relative;
  padding-top: 22px;
}
.simple-layout .management-actions {
  position: absolute;
  top: 20px;
  right: 34px;
  margin: 0;
}
.simple-layout .management-actions .button {
  height: 32px;
  padding: 0 12px;
}
.simple-layout .page-heading {
  display: block;
  margin-bottom: 14px;
}
.simple-layout .page-heading h1 {
  font-size: 27px;
  padding-right: 180px;
}

.user-list {
  margin-top: 20px;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.user-row strong {
  overflow-wrap: anywhere;
}
.user-row p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.user-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
#user-form input {
  margin-bottom: 16px;
}
@media (max-width: 400px) {
  .user-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .simple-layout .page-heading h1 {
    padding-right: 160px;
    font-size: 24px;
  }
  .simple-layout .management-actions {
    gap: 6px;
  }
}
.simple-layout .page-heading .eyebrow,
.simple-layout .page-heading .muted,
.simple-layout .printer-symbol,
.simple-layout .printer strong,
.simple-layout .printer-model {
  display: none;
}
.simple-layout .printer {
  display: block;
  padding: 0;
  margin: 6px 0 0;
  background: none;
  border: 0;
}
.simple-layout .printer p {
  margin: 0;
}
.simple-layout .schedule-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.simple-layout .schedule-strip > div {
  display: flex;
  padding: 0;
  border: 0;
}
.simple-layout .schedule-strip > div:nth-child(2),
.simple-layout .schedule-strip .small-icon,
.simple-layout .schedule-strip .timezone {
  display: none;
}
.simple-layout .schedule-strip strong {
  display: inline;
  margin: 0 0 7px 7px;
}
.simple-layout .view-switch {
  margin-bottom: 12px;
}
.simple-layout .preview-notice {
  margin-bottom: 12px;
}
.simple-layout .summary {
  gap: 10px;
  margin-bottom: 14px;
}
.simple-layout .summary article {
  padding: 12px 16px;
}
.simple-layout .summary article > p {
  margin-bottom: 6px;
}
.simple-layout .summary strong {
  font-size: 27px;
}
.simple-layout .stat-note {
  display: none;
}
.simple-layout .tab {
  height: 46px;
}
.simple-layout .toolbar {
  padding: 12px 15px;
}
@media (max-width: 640px) {
  .simple-layout .management-actions {
    right: 16px;
  }
  .simple-layout .page-heading h1 {
    font-size: 26px;
  }
}
