:root {
  --zrds-raw-neutral-0: #ffffff;
  --zrds-raw-neutral-25: #f6f7f6;
  --zrds-raw-neutral-50: #f1f3f2;
  --zrds-raw-neutral-100: #e9ecea;
  --zrds-raw-neutral-200: #d7dcd9;
  --zrds-raw-neutral-500: #66716d;
  --zrds-raw-neutral-700: #34423d;
  --zrds-raw-neutral-900: #16201d;
  --zrds-raw-forest-50: #edf7f2;
  --zrds-raw-forest-100: #d9eee5;
  --zrds-raw-forest-600: #176b54;
  --zrds-raw-forest-700: #0f5948;
  --zrds-raw-forest-900: #153b32;
  --zrds-raw-burgundy-50: #fbf2f2;
  --zrds-raw-burgundy-100: #f2dddd;
  --zrds-raw-burgundy-600: #6b2f2f;
  --zrds-raw-burgundy-700: #572626;
  --zrds-raw-amber-50: #fff8e8;
  --zrds-raw-amber-100: #fce8b2;
  --zrds-raw-amber-600: #b86e08;
  --zrds-raw-red-50: #fff1f0;
  --zrds-raw-red-100: #fee2e0;
  --zrds-raw-red-600: #b42318;
  --zrds-raw-blue-50: #eef6ff;
  --zrds-raw-blue-100: #dbeafe;
  --zrds-raw-blue-600: #1769aa;

  --zrds-background-canvas: var(--zrds-raw-neutral-25);
  --zrds-background-surface: var(--zrds-raw-neutral-0);
  --zrds-background-subtle: var(--zrds-raw-neutral-50);
  --zrds-background-brand: var(--zrds-raw-forest-900);
  --zrds-background-accent: var(--zrds-raw-burgundy-600);
  --zrds-background-info: var(--zrds-raw-blue-50);
  --zrds-background-warning: var(--zrds-raw-amber-50);
  --zrds-background-danger: var(--zrds-raw-red-50);
  --zrds-text-primary: var(--zrds-raw-neutral-900);
  --zrds-text-secondary: var(--zrds-raw-neutral-700);
  --zrds-text-muted: var(--zrds-raw-neutral-500);
  --zrds-text-inverse: var(--zrds-raw-neutral-0);
  --zrds-text-brand: var(--zrds-raw-forest-700);
  --zrds-text-accent: var(--zrds-raw-burgundy-600);
  --zrds-border-default: var(--zrds-raw-neutral-200);
  --zrds-border-strong: var(--zrds-raw-neutral-500);
  --zrds-border-focus: var(--zrds-raw-forest-600);
  --zrds-border-danger: var(--zrds-raw-red-600);
  --zrds-action-primary: var(--zrds-raw-forest-700);
  --zrds-action-primary-hover: var(--zrds-raw-forest-900);
  --zrds-action-secondary: var(--zrds-raw-burgundy-600);
  --zrds-status-success: var(--zrds-raw-forest-600);
  --zrds-status-warning: var(--zrds-raw-amber-600);
  --zrds-status-danger: var(--zrds-raw-red-600);
  --zrds-status-info: var(--zrds-raw-blue-600);

  --zrds-space-0: 0;
  --zrds-space-xs: 4px;
  --zrds-space-sm: 8px;
  --zrds-space-md: 12px;
  --zrds-space-lg: 16px;
  --zrds-space-xl: 24px;
  --zrds-space-2xl: 32px;
  --zrds-radius-sm: 4px;
  --zrds-radius-md: 6px;
  --zrds-radius-lg: 8px;
  --zrds-radius-pill: 999px;
  --zrds-control-sm: 34px;
  --zrds-control-md: 40px;
  --zrds-control-lg: 44px;
  --zrds-table-row: 52px;
  --zrds-page-max: 1680px;
  --zrds-shadow-1: 0 1px 1px rgba(22, 32, 29, 0.05);
  --zrds-shadow-2: 0 4px 12px rgba(22, 32, 29, 0.1);
  --zrds-font: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", Arial, sans-serif;
}

.zrds {
  min-height: 100vh;
  margin: 0;
  background: var(--zrds-background-canvas);
  color: var(--zrds-text-primary);
  font-family: var(--zrds-font);
  letter-spacing: 0;
}

.zrds *,
.zrds *::before,
.zrds *::after {
  box-sizing: border-box;
}

.zrds .wrap {
  width: min(100%, var(--zrds-page-max));
  max-width: var(--zrds-page-max);
  margin: 0 auto;
  padding: var(--zrds-space-xl);
}

.zrds .hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--zrds-space-xl);
  margin: 0 0 var(--zrds-space-md);
  padding: 18px 20px;
  border: 1px solid var(--zrds-border-default);
  border-left: 4px solid var(--zrds-action-secondary);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
}

.zrds .hero-copy {
  min-width: 0;
  max-width: 780px;
}

.zrds .zrds-eyebrow {
  display: block;
  margin-bottom: var(--zrds-space-xs);
  color: var(--zrds-text-brand);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.zrds .hero h1 {
  margin: 0;
  color: var(--zrds-text-primary);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.zrds .hero p {
  max-width: 760px;
  margin: var(--zrds-space-sm) 0 0;
  color: var(--zrds-text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.zrds .actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: var(--zrds-space-sm);
  flex-wrap: wrap;
}

.zrds button,
.zrds a.btn,
.zrds .zrds-command-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--zrds-control-md);
  border: 1px solid transparent;
  border-radius: var(--zrds-radius-md);
  padding: 0 var(--zrds-space-md);
  background: var(--zrds-action-primary);
  color: var(--zrds-text-inverse);
  box-shadow: none;
  font-family: var(--zrds-font);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.zrds button:hover,
.zrds a.btn:hover {
  background: var(--zrds-action-primary-hover);
}

.zrds button.secondary,
.zrds a.secondary,
.zrds .zrds-command-menu > summary {
  border-color: #a7beb7;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-brand);
}

.zrds button.secondary:hover,
.zrds a.secondary:hover,
.zrds .zrds-command-menu > summary:hover {
  border-color: var(--zrds-border-focus);
  background: var(--zrds-raw-forest-50);
}

.zrds button:focus-visible,
.zrds a.btn:focus-visible,
.zrds summary:focus-visible,
.zrds input:focus-visible,
.zrds select:focus-visible,
.zrds textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 84, 0.22);
  outline-offset: 2px;
}

.zrds button:disabled,
.zrds input:disabled,
.zrds select:disabled,
.zrds textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.zrds .zrds-command-menu {
  position: relative;
  margin: 0;
}

.zrds .zrds-command-menu > summary {
  list-style: none;
}

.zrds .zrds-command-menu > summary::-webkit-details-marker {
  display: none;
}

.zrds .zrds-command-menu > summary::after {
  content: "\2304";
  margin-left: var(--zrds-space-sm);
  font-size: 12px;
}

.zrds .zrds-command-menu[open] > summary::after {
  content: "\2303";
}

.zrds .zrds-command-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  display: grid;
  width: 220px;
  padding: var(--zrds-space-sm);
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-lg);
  background: var(--zrds-background-surface);
  box-shadow: var(--zrds-shadow-2);
}

.zrds .zrds-command-menu-panel a {
  display: flex;
  align-items: center;
  min-height: var(--zrds-control-md);
  border-radius: var(--zrds-radius-md);
  padding: 0 var(--zrds-space-md);
  color: var(--zrds-text-primary);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.zrds .zrds-command-menu-panel a:hover {
  background: var(--zrds-background-subtle);
  color: var(--zrds-text-brand);
}

.zrds .status {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: var(--zrds-control-md);
  margin: 0 0 var(--zrds-space-md);
  border: 1px solid var(--zrds-border-default);
  border-left: 4px solid var(--zrds-status-info);
  border-radius: var(--zrds-radius-md);
  padding: 10px 14px 10px 38px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-secondary);
  box-shadow: none;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.zrds .status::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zrds-status-info);
  box-shadow: 0 0 0 4px var(--zrds-raw-blue-100);
}

.zrds .status.bad {
  border-left-color: var(--zrds-status-danger);
  background: var(--zrds-background-danger);
  color: var(--zrds-status-danger);
}

.zrds .status.bad::before {
  background: var(--zrds-status-danger);
  box-shadow: 0 0 0 4px var(--zrds-raw-red-100);
}

.zrds .stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 var(--zrds-space-md);
}

.zrds .stat {
  min-width: 0;
  border: 1px solid var(--zrds-border-default);
  border-left: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: 12px 14px;
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds .stat:nth-child(n) { border-left-color: var(--zrds-border-default); }

.zrds .stat b {
  display: block;
  overflow: hidden;
  color: var(--zrds-text-primary);
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zrds .stat span {
  display: block;
  margin-top: 5px;
  color: var(--zrds-text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.zrds .topFold {
  overflow: visible;
  margin: 0 0 var(--zrds-space-sm);
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-lg);
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds .topFold > summary {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: var(--zrds-control-md);
  padding: 0 14px;
  color: var(--zrds-text-primary);
  font-size: 14px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.zrds .topFold > summary::-webkit-details-marker {
  display: none;
}

.zrds .topFold > summary::after {
  content: "+";
  color: var(--zrds-text-accent);
  font-size: 18px;
  line-height: 1;
}

.zrds .topFold[open] > summary::after {
  content: "\2212";
}

.zrds .tools {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(150px, 0.65fr) minmax(220px, 1fr) auto auto auto;
  gap: var(--zrds-space-sm);
  align-items: end;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--zrds-border-default);
  border-radius: 0;
  padding: var(--zrds-space-md);
  background: var(--zrds-background-surface);
}

.zrds .zrds-field {
  display: grid;
  min-width: 0;
  gap: var(--zrds-space-xs);
  color: var(--zrds-text-secondary);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.zrds input,
.zrds select,
.zrds textarea {
  width: 100%;
  min-height: var(--zrds-control-md);
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: 0 11px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  font-family: var(--zrds-font);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0;
}

.zrds textarea {
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.45;
  resize: vertical;
}

.zrds input:hover,
.zrds select:hover,
.zrds textarea:hover {
  border-color: #a9b1ac;
}

.zrds label.check {
  display: flex;
  align-items: center;
  min-height: var(--zrds-control-md);
  gap: var(--zrds-space-sm);
  color: var(--zrds-text-secondary);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.zrds label.check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--zrds-action-primary);
}

.zrds .groupBox {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--zrds-border-default);
  border-left: 0;
  border-radius: 0;
  padding: var(--zrds-space-md) 14px;
  background: var(--zrds-background-surface);
}

.zrds .groupHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--zrds-space-md);
  color: var(--zrds-text-primary);
}

.zrds .groupHead b {
  font-size: 15px;
  font-weight: 900;
}

.zrds .groupHint {
  margin-top: var(--zrds-space-sm);
  color: var(--zrds-text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.zrds .unmatched {
  display: none;
  margin: 0 0 var(--zrds-space-sm);
  border: 1px solid var(--zrds-raw-amber-100);
  border-left: 4px solid var(--zrds-status-warning);
  border-radius: var(--zrds-radius-md);
  padding: var(--zrds-space-md) 14px;
  background: var(--zrds-background-warning);
  color: #704207;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.zrds .unmatched.open { display: block; }

.zrds .unmatched span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  gap: var(--zrds-space-xs);
  margin: 4px 5px 0 0;
  border: 1px solid var(--zrds-raw-amber-100);
  border-radius: var(--zrds-radius-sm);
  padding: 0 5px 0 9px;
  background: var(--zrds-background-surface);
  color: #704207;
  font-size: 12px;
}

.zrds .unmatched button {
  min-height: 22px;
  border-color: transparent;
  border-radius: var(--zrds-radius-pill);
  padding: 0 6px;
  background: var(--zrds-background-danger);
  color: var(--zrds-status-danger);
  box-shadow: none;
  font-size: 12px;
}

.zrds .zrds-data-section {
  margin-top: var(--zrds-space-md);
}

.zrds .zrds-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--zrds-space-lg);
  margin-bottom: var(--zrds-space-sm);
}

.zrds .zrds-section-head h2 {
  margin: 2px 0 0;
  color: var(--zrds-text-primary);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.zrds .zrds-section-head .zrds-eyebrow {
  margin: 0;
  color: var(--zrds-text-accent);
}

.zrds .zrds-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--zrds-space-sm);
  flex-wrap: wrap;
}

.zrds .zrds-legend span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-sm);
  padding: 0 9px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-secondary);
  font-size: 11px;
  font-weight: 850;
}

.zrds .zrds-legend span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--zrds-status-info);
}

.zrds .zrds-legend .lukang::before { background: var(--zrds-action-secondary); }
.zrds .zrds-legend .factoryLegend::before { background: var(--zrds-status-success); }

.zrds .tableWrap {
  overflow: auto;
  max-height: calc(100vh - 148px);
  border: 1px solid #c8d1cc;
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: none;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto; /* 垂直放行：面板不滾時滾輪要能捲動整頁(2026-08-20) */
  scrollbar-gutter: stable;
}

.zrds .tableWrap table {
  width: 100%;
  min-width: 1780px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.zrds .tableWrap th,
.zrds .tableWrap td {
  height: var(--zrds-table-row);
  border-right: 1px solid #e8ece9;
  border-bottom: 1px solid #e2e7e4;
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
}

.zrds .tableWrap th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 44px;
  background: var(--zrds-background-brand);
  color: var(--zrds-text-inverse);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.zrds .tableWrap th[data-group="wuri"] { background: #174f6f; }
.zrds .tableWrap th[data-group="lukang"] { background: var(--zrds-background-accent); }
.zrds .tableWrap th[data-group="factory"] { background: #28583f; }
.zrds .tableWrap th[data-group="meta"] { background: #4a4f4b; }

.zrds .tableWrap tbody tr:nth-child(even) td,
.zrds .tableWrap tbody tr:nth-child(even) td:first-child,
.zrds .tableWrap tbody tr:nth-child(even) td:nth-child(2) {
  background: #faf9f5;
}

.zrds .tableWrap tbody tr:hover td,
.zrds .tableWrap tbody tr:hover td:first-child,
.zrds .tableWrap tbody tr:hover td:nth-child(2) {
  background: var(--zrds-raw-forest-50);
}

.zrds .tableWrap th:first-child,
.zrds .tableWrap td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  box-shadow: 7px 0 12px rgba(23, 33, 31, 0.06);
}

.zrds .tableWrap th:nth-child(2),
.zrds .tableWrap td:nth-child(2) {
  position: sticky;
  left: 60px;
  z-index: 5;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  box-shadow: 7px 0 12px rgba(23, 33, 31, 0.06);
}

.zrds .tableWrap th:first-child,
.zrds .tableWrap th:nth-child(2) {
  z-index: 7;
  background: var(--zrds-background-brand);
}

.zrds .tableWrap td:first-child,
.zrds .tableWrap td:nth-child(2) {
  background: var(--zrds-background-surface);
}

.zrds .tableWrap .name {
  color: var(--zrds-text-primary);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.zrds .tableWrap .muted {
  display: block;
  margin-top: 3px;
  color: var(--zrds-text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.zrds .tableWrap .num {
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.zrds .monitorBtn {
  min-width: 36px;
  min-height: 36px;
  border-color: var(--zrds-border-default);
  padding: 0;
  background: var(--zrds-background-subtle);
  color: var(--zrds-text-muted);
  box-shadow: none;
  font-size: 18px;
}

.zrds .monitorBtn.on {
  border-color: var(--zrds-raw-amber-100);
  background: var(--zrds-background-warning);
  color: var(--zrds-status-warning);
}

.zrds .materialStack {
  display: grid;
  gap: 6px;
}

.zrds .materialFold {
  overflow: hidden;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
}

.zrds .materialFold summary {
  min-height: 34px;
  padding: 7px 9px;
  color: #65450f;
  font-size: 12px;
  font-weight: 850;
}

.zrds .materialFold summary span {
  color: var(--zrds-text-muted);
  font-size: 11px;
}

.zrds .ingredientFold {
  border-color: #b7d4c4;
  background: #fbfefc;
}

.zrds .ingredientFold summary {
  color: var(--zrds-text-brand);
}

.zrds .packagingInput,
.zrds .ingredientInput,
.zrds .packagingQty,
.zrds .ingredientGrams {
  min-height: var(--zrds-control-sm);
  font-size: 12px;
}

.zrds .packagingAdd,
.zrds .ingredientAdd {
  min-height: 32px;
  border-style: dashed;
  box-shadow: none;
  font-size: 12px;
}

.zrds .footer {
  margin-top: var(--zrds-space-sm);
  color: var(--zrds-text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.zrds .zrds-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147481000;
  background: rgba(23, 33, 31, 0.48);
}

.zrds .zrds-modal-backdrop[hidden] { display: none; }

.zrds .groupPanel.open {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2147481001;
  display: flex;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 0;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-lg);
  background: var(--zrds-background-surface);
  box-shadow: 0 24px 70px rgba(23, 33, 31, 0.3);
  transform: translate(-50%, -50%);
  flex-direction: column;
}

.zrds .zrds-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: var(--zrds-space-lg);
  border-bottom: 1px solid var(--zrds-border-default);
  padding: 14px 16px;
}

.zrds .zrds-modal-head h2 {
  margin: 2px 0 0;
  color: var(--zrds-text-primary);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.zrds .zrds-modal-head .zrds-eyebrow {
  margin: 0;
  color: var(--zrds-text-accent);
}

.zrds .zrds-modal-body {
  min-height: 0;
  overflow: auto;
  padding: var(--zrds-space-lg);
}

.zrds .groupControls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(120px, 0.65fr) minmax(210px, 1fr) minmax(180px, 0.8fr) auto;
  gap: var(--zrds-space-sm);
  align-items: end;
  margin: 0 0 var(--zrds-space-md);
}

.zrds .groupEditor {
  display: grid;
  gap: 6px;
}

.zrds .groupRow {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) minmax(190px, 0.75fr) auto;
  gap: var(--zrds-space-sm);
  align-items: center;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: 7px;
  background: var(--zrds-background-surface);
}

.zrds .groupRow.header {
  border-color: transparent;
  background: var(--zrds-background-brand);
  color: var(--zrds-text-inverse);
  font-size: 12px;
  font-weight: 900;
}

.zrds .groupActions {
  display: flex;
  justify-content: flex-end;
  gap: var(--zrds-space-sm);
  margin-top: var(--zrds-space-md);
}

.zrds .advancedText {
  margin-top: var(--zrds-space-md);
  border: 1px dashed var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: var(--zrds-space-sm) var(--zrds-space-md);
  background: var(--zrds-background-subtle);
}

.zrds .advancedText summary {
  color: var(--zrds-text-secondary);
  font-size: 13px;
  font-weight: 850;
}

.zrds-modal-open { overflow: hidden; }

.zrds-modal-open > .zraiGlobalNav,
.zrds-modal-open > .zraiPageVersion,
.zrds-modal-open > .zrai-guide-entry {
  display: none !important;
}

@media (max-width: 1180px) {
  .zrds .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .zrds .actions {
    justify-content: flex-start;
  }

  .zrds .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .zrds .tools {
    grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.7fr) minmax(220px, 1fr) auto;
  }

  .zrds .tools label.check,
  .zrds .tools #saveMonitorBtn {
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  .zrds .wrap {
    padding: var(--zrds-space-sm) 6px 20px;
  }

  .zrds .hero {
    gap: var(--zrds-space-md);
    margin-bottom: var(--zrds-space-sm);
    border-left-width: 4px;
    padding: 12px;
    box-shadow: var(--zrds-shadow-1);
  }

  .zrds .hero h1 {
    font-size: 22px;
  }

  .zrds .hero p {
    display: none;
  }

  .zrds .actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .zrds .actions > * {
    flex: 0 0 auto;
  }

  .zrds button,
  .zrds a.btn,
  .zrds .zrds-command-menu > summary {
    min-height: var(--zrds-control-lg);
  }

  .zrds .zrds-command-menu-panel {
    right: auto;
    left: 0;
  }

  .zrds .status {
    margin-bottom: var(--zrds-space-sm);
    padding: 9px 10px 9px 34px;
    font-size: 12px;
  }

  .zrds .status::before {
    top: 13px;
    left: 14px;
  }

  .zrds .stats {
    display: flex;
    gap: 6px;
    margin-bottom: var(--zrds-space-sm);
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .zrds .stat {
    flex: 0 0 132px;
    padding: 9px 10px;
    scroll-snap-align: start;
  }

  .zrds .stat b { font-size: 20px; }
  .zrds .stat span { font-size: 11px; }

  .zrds .topFold {
    margin-bottom: 6px;
  }

  .zrds .topFold > summary {
    min-height: var(--zrds-control-lg);
  }

  .zrds .tools,
  .zrds .groupControls {
    grid-template-columns: 1fr;
    gap: var(--zrds-space-sm);
    padding: var(--zrds-space-sm);
  }

  .zrds .tools label.check,
  .zrds .tools #saveMonitorBtn {
    grid-row: auto;
  }

  .zrds .groupBox {
    padding: var(--zrds-space-sm) 10px;
  }

  .zrds .zrds-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--zrds-space-sm);
    padding: 0 4px;
  }

  .zrds .zrds-legend {
    justify-content: flex-start;
  }

  .zrds .tableWrap {
    max-height: none;
    margin-right: -6px;
    margin-left: -6px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: var(--zrds-shadow-1);
  }

  .zrds .tableWrap table {
    min-width: 1560px;
  }

  .zrds .tableWrap th,
  .zrds .tableWrap td {
    height: 48px;
    padding: 7px;
  }

  .zrds .tableWrap th:first-child,
  .zrds .tableWrap td:first-child {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
  }

  .zrds .tableWrap th:nth-child(2),
  .zrds .tableWrap td:nth-child(2) {
    left: 48px;
    width: 190px;
    min-width: 190px;
    max-width: 190px;
  }

  .zrds .tableWrap .name {
    font-size: 13px;
  }

  .zrds .groupPanel.open {
    inset: 0;
    width: 100vw;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
    transform: none;
  }

  .zrds .zrds-modal-head {
    min-height: 58px;
    padding: 10px 12px;
  }

  .zrds .zrds-modal-head h2 {
    font-size: 18px;
  }

  .zrds .zrds-modal-body {
    padding: var(--zrds-space-sm);
  }

  .zrds .groupRow {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .zrds .groupRow.header {
    display: none;
  }
}

@media print {
  .zrds .zrds-command-menu,
  .zrds .zrds-modal-backdrop,
  .zrds .groupPanel.open {
    display: none !important;
  }
}

/* Complex legacy reports can adopt tokens and page-specific components without
   inheriting every generic form/table rule at once. */
.zrds-page {
  min-height: 100vh;
  margin: 0;
  background: var(--zrds-background-canvas);
  color: var(--zrds-text-primary);
  font-family: var(--zrds-font);
  letter-spacing: 0;
}

.zrds-page *,
.zrds-page *::before,
.zrds-page *::after {
  box-sizing: border-box;
}

/* Inventory report family */
.zrds-inventory-report {
  background: var(--zrds-background-canvas);
}

.zrds-inventory-report .wrap {
  width: min(100%, 1760px);
  max-width: 1760px;
  margin: 0 auto;
  padding: 12px 16px;
}

.zrds-inventory-report .zrds-inventory-hero {
  border-bottom: 3px solid var(--zrds-action-secondary);
  padding: 0;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
}

.zrds-inventory-report .zrds-inventory-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
}

.zrds-inventory-report .zrds-inventory-hero-copy {
  min-width: 0;
  max-width: 820px;
}

.zrds-inventory-report .zrds-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--zrds-text-brand);
  font-size: 11px;
  font-weight: 850;
}

.zrds-inventory-report .zrds-inventory-hero h1 {
  margin: 0;
  color: var(--zrds-text-primary);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.18;
  letter-spacing: 0;
}

.zrds-inventory-report .zrds-inventory-hero p {
  margin: 5px 0 0;
  color: var(--zrds-text-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.zrds-inventory-report .zrds-inventory-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.zrds-inventory-report .zrds-inventory-nav > a,
.zrds-inventory-report .zrds-command-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--zrds-border-default);
  border-radius: 6px;
  padding: 0 11px;
  background: #fff;
  color: var(--zrds-text-brand);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.zrds-inventory-report .zrds-inventory-nav > a[aria-current="page"] {
  border-color: var(--zrds-action-primary);
  background: var(--zrds-raw-forest-50);
  color: var(--zrds-text-brand);
}

.zrds-inventory-report .zrds-command-menu {
  position: relative;
}

.zrds-inventory-report .zrds-command-menu > summary {
  list-style: none;
}

.zrds-inventory-report .zrds-command-menu > summary::-webkit-details-marker {
  display: none;
}

.zrds-inventory-report .zrds-command-menu > summary::after {
  content: "\2304";
  margin-left: 7px;
}

.zrds-inventory-report .zrds-command-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  display: grid;
  width: 230px;
  border: 1px solid var(--zrds-border-default);
  border-radius: 8px;
  padding: 7px;
  background: #fff;
  box-shadow: var(--zrds-shadow-1);
}

.zrds-inventory-report .zrds-command-menu-panel a {
  display: flex;
  align-items: center;
  min-height: 38px;
  border-radius: 5px;
  padding: 0 10px;
  color: var(--zrds-text-primary);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.zrds-inventory-report .zrds-command-menu-panel a:hover {
  background: var(--zrds-raw-forest-50);
}

.zrds-inventory-report .inventory-control-panel,
.zrds-inventory-report .inventory-actions,
.zrds-inventory-report .filter-panel,
.zrds-inventory-report .suggestion-panel,
.zrds-inventory-report .section,
.zrds-inventory-report .kitchen-board-section {
  border-color: var(--zrds-border-default);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.zrds-inventory-report .inventory-control-panel > summary {
  min-height: 44px;
  padding: 8px 11px;
}

.zrds-inventory-report .inventory-control-title {
  color: var(--zrds-text-primary);
  font-size: 14px;
}

.zrds-inventory-report .inventory-control-caption {
  color: var(--zrds-text-muted);
  font-size: 12px;
}

.zrds-inventory-report .inventory-control-toggle {
  border-radius: 5px;
  background: var(--zrds-background-brand);
}

.zrds-inventory-report .inventory-control-body {
  padding: 0 10px 10px;
  border-top-color: var(--zrds-border-default);
}

.zrds-inventory-report .meta-card,
.zrds-inventory-report .card,
.zrds-inventory-report .inventory-control-chip {
  border-color: var(--zrds-border-default);
  border-radius: 6px;
  background: var(--zrds-background-subtle);
  box-shadow: none;
}

.zrds-inventory-report .inventory-actions {
  gap: 7px;
  padding: 9px;
}

.zrds-inventory-report .inventory-update-btn,
.zrds-inventory-report .suggestion-form button,
.zrds-inventory-report .filter-reset,
.zrds-inventory-report .deduction-actions button,
.zrds-inventory-report .quick-nav button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 11px;
  background: var(--zrds-action-primary);
  color: #fff;
  box-shadow: none;
  font-family: var(--zrds-font);
  font-size: 13px;
  font-weight: 900;
}

.zrds-inventory-report .inventory-update-btn.secondary-link,
.zrds-inventory-report .deduction-actions .secondary {
  border-color: #a7beb7;
  background: #fff;
  color: var(--zrds-text-brand);
}

.zrds-inventory-report .branch-tabs {
  top: 0;
  gap: 6px;
  padding: 7px 0;
  background: var(--zrds-background-canvas);
}

.zrds-inventory-report .branch-btn {
  min-height: 38px;
  border: 1px solid var(--zrds-border-default);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--zrds-text-secondary);
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}

.zrds-inventory-report .branch-btn.active {
  border-color: var(--zrds-action-primary);
  background: var(--zrds-action-primary);
  color: #fff;
}

.zrds-inventory-report .filter-panel {
  gap: 8px;
  padding: 10px;
}

.zrds-inventory-report .filter-field label {
  margin-bottom: 4px;
  color: var(--zrds-text-secondary);
  font-size: 11px;
  letter-spacing: 0;
}

.zrds-inventory-report .filter-field input,
.zrds-inventory-report .filter-field select,
.zrds-inventory-report .shopee-pending-field input,
.zrds-inventory-report .suggestion-form input,
.zrds-inventory-report .suggestion-form textarea {
  min-height: 40px;
  border: 1px solid var(--zrds-border-default);
  border-radius: 6px;
  background: #fff;
  color: var(--zrds-text-primary);
  font-family: var(--zrds-font);
}

.zrds-inventory-report .section > h2,
.zrds-inventory-report .kitchen-hero h2 {
  color: var(--zrds-text-primary);
  letter-spacing: 0;
}

/* Store transfer pages */
.zrds.zrds-transfer .wrap {
  max-width: 1540px;
  padding: 14px 16px 22px;
}

.zrds.zrds-transfer.branch-wuri {
  --zrds-background-brand: #153b32;
  --zrds-action-primary: #0f6b5b;
  --zrds-action-primary-hover: #0a5145;
}

.zrds.zrds-transfer.branch-lukang {
  --zrds-background-brand: #5c2d25;
  --zrds-action-primary: #8d3f2f;
  --zrds-action-primary-hover: #6f3025;
}

.zrds-transfer .heroActions.actions {
  justify-content: flex-end;
}

.zrds-transfer .summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.zrds-transfer .card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border: 1px solid var(--zrds-border-default);
  border-left: 4px solid var(--zrds-status-info);
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  box-shadow: none;
}

.zrds-transfer .card:nth-child(2) { border-left-color: var(--zrds-status-warning); }
.zrds-transfer .card:nth-child(3) { border-left-color: var(--zrds-status-success); }
.zrds-transfer .card:nth-child(4) { border-left-color: var(--zrds-action-secondary); }
.zrds-transfer .card::before { display: none; }
.zrds-transfer .card b { color: var(--zrds-text-primary); font-size: 23px; }
.zrds-transfer .card span { color: var(--zrds-text-muted); font-size: 12px; }

.zrds-transfer .toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 178px 150px minmax(200px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--zrds-border-default);
  border-radius: 0;
  padding: 10px;
  background: #fff;
  box-shadow: none;
}

.zrds-transfer .toolbar .heroActions {
  justify-content: flex-start;
}

.zrds-transfer .planningBar,
.zrds-transfer .totalNoteBar,
.zrds-transfer .festivalPanel,
.zrds-transfer .changeLogBox {
  border-radius: 7px;
  box-shadow: none;
}

.zrds.zrds-transfer .tableWrap table {
  min-width: 940px;
}

.zrds.zrds-transfer .tableWrap th:first-child,
.zrds.zrds-transfer .tableWrap td:first-child {
  left: 0;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.zrds.zrds-transfer .tableWrap th:nth-child(2),
.zrds.zrds-transfer .tableWrap td:nth-child(2) {
  position: static;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  box-shadow: none;
}

.zrds.zrds-transfer .tableWrap th:nth-child(2) {
  background: var(--zrds-background-brand);
}

/* Packaging and ingredient boards */
.zrds-packaging .hero,
.zrds-ingredients .hero {
  margin-bottom: 8px;
}

.zrds-packaging .stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.zrds-packaging button.stat {
  display: block;
  min-height: 72px;
  text-align: left;
}

.zrds-packaging button.stat:hover,
.zrds-packaging button.stat.active {
  border-color: var(--zrds-action-primary);
  background: var(--zrds-raw-forest-50);
}

.zrds-packaging .tools {
  grid-template-columns: minmax(210px, 1fr) 150px 140px 145px 145px 150px auto auto;
}

.zrds-packaging .panel,
.zrds-ingredients .panel {
  border-color: var(--zrds-border-default);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.zrds-packaging .addPackagingDialog {
  border-radius: 8px;
}

.zrds-packaging .addPackagingModal {
  border-radius: 8px;
  background: #fff;
}

.zrds.zrds-packaging .tableWrap table {
  min-width: 1450px;
}

.zrds.zrds-packaging .tableWrap th:first-child,
.zrds.zrds-packaging .tableWrap td:first-child {
  left: 0;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.zrds.zrds-packaging .tableWrap th:nth-child(2),
.zrds.zrds-packaging .tableWrap td:nth-child(2),
.zrds.zrds-ingredients .tableWrap th:nth-child(2),
.zrds.zrds-ingredients .tableWrap td:nth-child(2) {
  position: static;
  box-shadow: none;
}

.zrds.zrds-packaging .tableWrap th:nth-child(2),
.zrds.zrds-ingredients .tableWrap th:nth-child(2) {
  background: var(--zrds-background-brand);
}

.zrds-ingredients .tools {
  grid-template-columns: minmax(210px, 1fr) 150px 140px 120px 120px auto auto;
}

.zrds-ingredients .zrds-management-fold > .panel {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--zrds-border-default);
  border-radius: 0;
  box-shadow: none;
}

.zrds-ingredients .recipeGrid {
  align-items: end;
}

.zrds.zrds-ingredients .tableWrap table {
  min-width: 1510px;
}

.zrds.zrds-ingredients .tableWrap th:first-child,
.zrds.zrds-ingredients .tableWrap td:first-child {
  left: 0;
  width: 230px;
  min-width: 230px;
  max-width: 230px;
}

@media (max-width: 1180px) {
  .zrds-inventory-report .zrds-inventory-hero-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .zrds-inventory-report .zrds-inventory-nav {
    justify-content: flex-start;
  }

  .zrds-transfer .toolbar,
  .zrds-packaging .tools,
  .zrds-ingredients .tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .zrds-inventory-report .wrap {
    padding: 8px 7px 16px;
  }

  .zrds-inventory-report .zrds-inventory-hero-inner {
    min-height: 0;
    gap: 9px;
  }

  .zrds-inventory-report .zrds-inventory-hero h1 {
    font-size: 22px;
  }

  .zrds-inventory-report .zrds-inventory-hero p {
    display: none;
  }

  .zrds-inventory-report .zrds-inventory-nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .zrds-inventory-report .zrds-inventory-nav > * {
    flex: 0 0 auto;
  }

  .zrds-inventory-report .zrds-inventory-nav > a,
  .zrds-inventory-report .zrds-command-menu > summary {
    min-height: 42px;
  }

  .zrds-inventory-report .zrds-command-menu-panel {
    right: auto;
    left: 0;
  }

  .zrds-inventory-report .inventory-control-caption {
    display: none;
  }

  .zrds-inventory-report .inventory-control-chips {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .zrds-inventory-report .filter-panel {
    grid-template-columns: 1fr;
  }

  .zrds-transfer .summary {
    display: flex;
    overflow-x: auto;
  }

  .zrds-transfer .card {
    flex: 0 0 140px;
    min-height: 54px;
  }

  .zrds-transfer .toolbar,
  .zrds-packaging .tools,
  .zrds-ingredients .tools {
    grid-template-columns: 1fr;
  }

  .zrds.zrds-transfer .tableWrap table,
  .zrds.zrds-packaging .tableWrap table,
  .zrds.zrds-ingredients .tableWrap table {
    min-width: 0 !important;
  }

  .zrds.zrds-transfer .tableWrap th:first-child,
  .zrds.zrds-transfer .tableWrap td:first-child,
  .zrds.zrds-transfer .tableWrap th:nth-child(2),
  .zrds.zrds-transfer .tableWrap td:nth-child(2),
  .zrds.zrds-packaging .tableWrap th:first-child,
  .zrds.zrds-packaging .tableWrap td:first-child,
  .zrds.zrds-packaging .tableWrap th:nth-child(2),
  .zrds.zrds-packaging .tableWrap td:nth-child(2),
  .zrds.zrds-ingredients .tableWrap th:first-child,
  .zrds.zrds-ingredients .tableWrap td:first-child,
  .zrds.zrds-ingredients .tableWrap th:nth-child(2),
  .zrds.zrds-ingredients .tableWrap td:nth-child(2) {
    position: static;
    min-width: 0;
    max-width: none;
    box-shadow: none;
  }

  .zrds.zrds-transfer .tableWrap th:first-child,
  .zrds.zrds-transfer .tableWrap td:first-child {
    width: 68%;
  }

  .zrds.zrds-transfer .tableWrap th:nth-child(2),
  .zrds.zrds-transfer .tableWrap td:nth-child(2) {
    width: 32%;
  }

  .zrds.zrds-packaging .tableWrap th:first-child,
  .zrds.zrds-packaging .tableWrap td:first-child {
    width: 44%;
  }

  .zrds.zrds-packaging .tableWrap th:nth-child(2),
  .zrds.zrds-packaging .tableWrap td:nth-child(2) {
    width: 34%;
  }

  .zrds.zrds-ingredients .tableWrap th:first-child,
  .zrds.zrds-ingredients .tableWrap td:first-child {
    width: 45%;
  }

  .zrds.zrds-ingredients .tableWrap th:nth-child(2),
  .zrds.zrds-ingredients .tableWrap td:nth-child(2) {
    width: 32%;
  }
}

@media print {
  .zrds-inventory-report .zrds-inventory-nav,
  .zrds-inventory-report .zrds-command-menu {
    display: none !important;
  }
}

/* Orders and purchase boards: compact operations UI, without showcase styling. */
.zrds-orders,
.zrds-purchases {
  overflow-x: hidden;
  background: var(--zrds-background-canvas);
}

.zrds-orders main,
.zrds-purchases .wrap {
  width: min(100%, 1580px);
  max-width: 1580px;
  margin: 0 auto;
  padding: 14px 16px 24px;
}

.zrds-orders .layout,
.zrds-orders .layout > *,
.zrds-orders .compactForm,
.zrds-orders .tableWrap,
.zrds-purchases .wrap > *,
.zrds-purchases .tableWrap {
  min-width: 0;
  max-width: 100%;
}

.zrds-orders .top,
.zrds-purchases .hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  border: 1px solid var(--zrds-border-default);
  border-left: 4px solid var(--zrds-action-secondary);
  border-radius: var(--zrds-radius-md);
  padding: 13px 15px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
}

.zrds-orders h1,
.zrds-purchases h1 {
  margin: 0;
  color: var(--zrds-text-primary);
  font-size: 23px;
  font-weight: 950;
  line-height: 1.2;
}

.zrds-orders .hint,
.zrds-purchases .hero p {
  margin: 4px 0 0;
  color: var(--zrds-text-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.zrds-orders .nav,
.zrds-purchases .heroActions,
.zrds-purchases .actions {
  gap: 6px;
}

.zrds-orders .btn,
.zrds-orders .nav a,
.zrds-orders .smallBtn,
.zrds-orders .moreFields summary,
.zrds-orders .iconBtn,
.zrds-purchases button,
.zrds-purchases a.btn {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--zrds-radius-md);
  padding: 0 11px;
  background: var(--zrds-action-primary);
  color: var(--zrds-text-inverse);
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}

.zrds-orders .btn.secondary,
.zrds-orders .nav a.secondary,
.zrds-orders .smallBtn,
.zrds-orders .moreFields summary,
.zrds-orders .iconBtn,
.zrds-purchases button.secondary,
.zrds-purchases a.secondary {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-brand);
}

.zrds-orders .btn.good,
.zrds-purchases button.good { background: var(--zrds-action-primary); }
.zrds-orders .btn.warn,
.zrds-purchases button.warn { background: var(--zrds-status-warning); }
.zrds-orders .btn.bad,
.zrds-orders .iconBtn.bad,
.zrds-purchases button.bad { background: var(--zrds-status-danger); color: #fff; }

.zrds-orders .panel,
.zrds-orders .pageUpdates,
.zrds-purchases .panel {
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-orders .pageUpdates {
  margin: 0 0 10px;
}

.zrds-orders .compactForm {
  border-left: 3px solid var(--zrds-action-primary);
  box-shadow: none;
}

.zrds-orders input,
.zrds-orders select,
.zrds-orders textarea,
.zrds-purchases input,
.zrds-purchases select,
.zrds-purchases textarea {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-sm);
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-orders input:focus,
.zrds-orders select:focus,
.zrds-orders textarea:focus,
.zrds-purchases input:focus,
.zrds-purchases select:focus,
.zrds-purchases textarea:focus {
  border-color: var(--zrds-border-focus);
  box-shadow: 0 0 0 3px rgba(23, 107, 84, 0.12);
}

.zrds-orders .stats,
.zrds-purchases .stats {
  gap: 6px;
  margin-bottom: 10px;
}

.zrds-orders .stat,
.zrds-purchases .stat {
  min-height: 66px;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: 10px 11px 10px 14px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
}

.zrds-orders .stat::before,
.zrds-purchases .stat::before {
  width: 3px;
}

.zrds-orders .stat.unconfirmed,
.zrds-orders .stat.production,
.zrds-orders .stat.delivery,
.zrds-orders .stat.pickup,
.zrds-orders .stat.closed,
.zrds-purchases .stat.active {
  background: var(--zrds-background-surface);
}

.zrds-orders .stat.active,
.zrds-purchases .stat.active {
  outline: 2px solid var(--zrds-action-primary);
  outline-offset: -2px;
  box-shadow: none;
  filter: none;
}

.zrds-orders .stat b,
.zrds-purchases .stat b {
  font-size: 24px;
}

.zrds-orders .filters,
.zrds-orders .bulkBar {
  margin-bottom: 10px;
}

.zrds-orders .filters label,
.zrds-orders .bulkBar {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
}

.zrds-orders .bulkBar {
  padding: 8px;
}

.zrds-orders .itemLine,
.zrds-orders .itemLine:nth-child(4n+1),
.zrds-orders .itemLine:nth-child(4n+2),
.zrds-orders .itemLine:nth-child(4n+3),
.zrds-orders .itemLine:nth-child(4n) {
  border-color: var(--zrds-raw-neutral-100);
  border-radius: var(--zrds-radius-sm);
  background: var(--zrds-background-surface);
}

.zrds-orders .typeBadge,
.zrds-orders .channelBadge,
.zrds-orders .newBadge,
.zrds-orders .rowLockHint,
.zrds-purchases .pill,
.zrds-purchases .materialChip {
  border-radius: var(--zrds-radius-sm);
  box-shadow: none;
}

.zrds-orders .duePill,
.zrds-orders .note,
.zrds-orders .lockedNote,
.zrds-orders .inlineEdit,
.zrds-orders .inlineSelect,
.zrds-orders .inlineItemInput {
  border-radius: var(--zrds-radius-sm);
}

.zrds-orders .tableWrap,
.zrds-purchases .tableWrap {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-orders th,
.zrds-purchases th {
  background: var(--zrds-background-brand);
  color: var(--zrds-text-inverse);
  box-shadow: none !important;
}

.zrds-orders td,
.zrds-purchases td {
  border-color: var(--zrds-raw-neutral-100);
  background: var(--zrds-background-surface);
}

.zrds-orders tbody tr:nth-child(even) td,
.zrds-purchases tbody tr:nth-child(even) td {
  background: var(--zrds-background-subtle);
}

.zrds-orders tbody tr:hover td,
.zrds-purchases tbody tr:hover td {
  background: var(--zrds-raw-forest-50);
}

.zrds-orders .guideCard,
.zrds-orders .guideHead {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-surface);
}

.zrds-orders .guideStep,
.zrds-orders .miniScreen,
.zrds-orders .guideNote {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-subtle);
}

.zrds-orders .guideTile {
  border-color: var(--zrds-border-default);
}

.zrds-purchases .panel {
  margin-bottom: 10px;
}

.zrds-purchases .statusLine {
  color: var(--zrds-text-brand);
}

.zrds-purchases .vendorExportHead h2 {
  font-size: 18px !important;
}

.zrds-purchases .vendorCard {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  box-shadow: none;
}

.zrds-purchases .vendorCard h3 {
  background: var(--zrds-background-brand);
  font-size: 14px;
}

.zrds-purchases .vendorRows,
.zrds-purchases .vendorActions,
.zrds-purchases .vendorCopyText {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
}

.zrds-purchases .vendorMoveBtns button {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-subtle);
  color: var(--zrds-text-primary);
}

@media (min-width: 1101px) and (max-width: 1420px) {
  .zrds-orders .formGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .zrds-orders .field.noteField,
  .zrds-orders .itemsField {
    grid-column: span 2;
  }

  .zrds-orders .moreFields[open] {
    grid-column: 1 / -1;
  }
}

@media (min-width: 901px) and (max-width: 1450px) {
  .zrds-purchases .formGrid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .zrds-orders main,
  .zrds-purchases .wrap {
    padding: 8px 7px 16px;
  }

  .zrds-orders .top,
  .zrds-purchases .hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 11px;
  }

  .zrds-orders h1,
  .zrds-purchases h1 {
    font-size: 21px;
  }

  .zrds-orders .nav,
  .zrds-purchases .heroActions {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .zrds-orders .nav > *,
  .zrds-purchases .heroActions > * {
    flex: 0 0 auto;
  }

  .zrds-orders .btn,
  .zrds-orders .nav a,
  .zrds-purchases button,
  .zrds-purchases a.btn {
    min-height: 42px;
  }

  .zrds-orders .stats,
  .zrds-purchases .stats {
    display: flex;
    overflow-x: auto;
  }

  .zrds-orders .stat,
  .zrds-purchases .stat {
    flex: 0 0 138px;
  }

  .zrds-purchases .vendorExportGrid {
    grid-template-columns: 1fr;
  }
}

/* Marketplace shipping boards */
.zrds-marketplace {
  overflow-x: hidden;
  background: var(--zrds-background-canvas);
}

.zrds-marketplace .wrap {
  width: min(100%, 1580px);
  max-width: 1580px;
  margin: 0 auto;
  padding: 14px 16px 24px;
}

.zrds-marketplace .marketplaceHeader,
.zrds-ruten .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  border: 1px solid var(--zrds-border-default);
  border-left: 4px solid var(--zrds-action-secondary);
  border-radius: var(--zrds-radius-md);
  padding: 13px 15px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
}

.zrds-marketplace .marketplaceEyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--zrds-text-brand);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.zrds-marketplace h1,
.zrds-ruten .top h1 {
  margin: 0;
  color: var(--zrds-text-primary);
  font-size: 23px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: 0;
}

.zrds-ruten h1::before {
  content: none;
}

.zrds-marketplace .marketplaceHeader p,
.zrds-ruten .top p {
  margin: 4px 0 0;
  color: var(--zrds-text-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.zrds-ruten .home {
  min-height: 38px;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: 0 11px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-brand);
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}

.zrds-marketplace .panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: 12px;
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-marketplace .controls,
.zrds-marketplace .ship-controls,
.zrds-marketplace .grid,
.zrds-marketplace .controls > *,
.zrds-marketplace .ship-controls > *,
.zrds-marketplace .grid > * {
  min-width: 0;
}

.zrds-marketplace label {
  margin-bottom: 4px;
  color: var(--zrds-text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.zrds-marketplace input,
.zrds-marketplace select {
  min-height: 40px;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-sm);
  padding: 7px 9px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
  font-family: var(--zrds-font);
  font-size: 14px;
  font-weight: 750;
}

.zrds-marketplace input:focus,
.zrds-marketplace select:focus {
  outline: none;
  border-color: var(--zrds-border-focus);
  box-shadow: 0 0 0 3px rgba(23, 107, 84, 0.12);
}

.zrds-marketplace .status-checks {
  min-height: 40px;
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-sm);
  padding: 5px;
  background: var(--zrds-background-subtle);
}

.zrds-marketplace .status-option,
.zrds-marketplace .inline-toggle {
  border-radius: var(--zrds-radius-sm);
  box-shadow: none;
}

.zrds-marketplace .checks {
  gap: 12px;
  color: var(--zrds-text-secondary);
  font-size: 13px;
}

.zrds-marketplace .checks label,
.zrds-marketplace .inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.zrds-marketplace .checks input,
.zrds-marketplace .status-option input,
.zrds-marketplace .inline-toggle input,
.zrds-marketplace th input,
.zrds-marketplace td input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--zrds-action-primary);
}

.zrds-marketplace .actions {
  gap: 6px;
  margin-top: 10px;
}

.zrds-marketplace button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--zrds-radius-md);
  padding: 0 11px;
  box-shadow: none;
  font-family: var(--zrds-font);
  font-size: 13px;
  font-weight: 900;
  transform: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.zrds-marketplace button:hover,
.zrds-marketplace button:active {
  transform: none;
  box-shadow: none;
  filter: none;
}

.zrds-marketplace .primary,
.zrds-marketplace .green {
  background: var(--zrds-action-primary);
  color: var(--zrds-text-inverse);
}

.zrds-marketplace .dark {
  background: var(--zrds-background-brand);
  color: var(--zrds-text-inverse);
}

.zrds-marketplace .ghost,
.zrds-marketplace .mapbtn {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-brand);
}

.zrds-marketplace .smallbtn,
.zrds-marketplace .mapbtn {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.zrds-marketplace .stats {
  gap: 6px;
  margin-bottom: 10px;
}

.zrds-marketplace .stat {
  position: relative;
  min-width: 0;
  min-height: 64px;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: 10px 11px;
  background: var(--zrds-background-surface);
  box-shadow: none;
  transform: none;
}

.zrds-marketplace .stat::before {
  display: none;
}

.zrds-marketplace .stat:hover {
  transform: none;
  box-shadow: none;
}

.zrds-marketplace .stat b {
  color: var(--zrds-text-primary);
  font-size: 23px;
  line-height: 1.05;
}

.zrds-marketplace .stat span,
.zrds-marketplace .stat small {
  color: var(--zrds-text-muted);
  font-size: 12px;
}

.zrds-marketplace .msg,
.zrds-marketplace .note {
  color: var(--zrds-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.zrds-marketplace .table-panel {
  min-width: 0;
  max-width: 100%;
  padding: 0 !important;
  overflow: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto; /* 垂直放行：面板不滾時滾輪要能捲動整頁(2026-08-20) */
  scrollbar-gutter: stable;
}

.zrds-marketplace table {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: var(--zrds-background-surface);
}

.zrds-coupang .table-panel table { min-width: 1040px; }
.zrds-ruten .table-panel table { min-width: 1080px; }
.zrds-easystore .table-panel table { min-width: 900px; }

.zrds-marketplace th,
.zrds-marketplace td {
  border-color: var(--zrds-raw-neutral-100);
  padding: 8px 9px;
}

.zrds-marketplace th {
  background: var(--zrds-background-brand);
  color: var(--zrds-text-inverse);
  box-shadow: none;
  font-size: 12px;
}

.zrds-marketplace td {
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  font-size: 13px;
}

.zrds-marketplace tbody tr:nth-child(even) td {
  background: var(--zrds-background-subtle);
}

.zrds-marketplace tbody tr:hover td {
  background: var(--zrds-raw-forest-50);
}

.zrds-marketplace .tag,
.zrds-marketplace .order-item .qty {
  border-radius: var(--zrds-radius-sm);
  box-shadow: none;
}

.zrds-marketplace .item-line,
.zrds-marketplace .order-item {
  border-color: var(--zrds-raw-neutral-100);
  border-radius: var(--zrds-radius-sm);
  background: var(--zrds-background-surface);
}

.zrds-marketplace .order-item .qty {
  background: var(--zrds-background-brand);
}

.zrds-marketplace .edit-card {
  max-height: min(88vh, 760px);
  overflow: auto;
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: var(--zrds-shadow-2);
}

.zrds-marketplace .edit-card h2 {
  color: var(--zrds-text-primary);
  font-size: 19px;
}

.zrds-marketplace .edit-card p,
.zrds-marketplace .source-code-note {
  color: var(--zrds-text-muted);
}

.zrds-marketplace .readonly {
  background: var(--zrds-background-subtle) !important;
  color: var(--zrds-text-secondary);
}

.zrds-ruten pre {
  border-radius: var(--zrds-radius-md);
  background: #202824;
  color: #f4f7f5;
}

@media (max-width: 900px) {
  .zrds-marketplace .wrap {
    padding: 8px 7px 16px;
  }

  .zrds-marketplace .marketplaceHeader,
  .zrds-ruten .top {
    align-items: flex-start;
    flex-direction: column;
    padding: 11px;
  }

  .zrds-marketplace h1,
  .zrds-ruten .top h1 {
    font-size: 21px;
  }

  .zrds-ruten .home {
    min-height: 42px;
  }

  .zrds-coupang .controls,
  .zrds-easystore .controls,
  .zrds-ruten .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .zrds-coupang .controls > :nth-child(2),
  .zrds-easystore .controls > :nth-child(2) {
    grid-column: 1 / -1;
  }

  .zrds-coupang .ship-controls {
    grid-template-columns: 1fr;
  }

  .zrds-marketplace .actions button {
    flex: 1 1 150px;
    min-height: 42px;
  }

  .zrds-marketplace .stats {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .zrds-marketplace .stat {
    flex: 0 0 136px;
    min-height: 58px;
  }

  .zrds-marketplace .edit-grid {
    grid-template-columns: 1fr;
  }

  .zrds-marketplace .edit-grid .wide {
    grid-column: auto;
  }
}

/* Staff schedule and Wuri handoff board */
.zrds-staff-schedule,
.zrds-team-handoff {
  background: var(--zrds-background-canvas);
  color: var(--zrds-text-primary);
  font-family: var(--zrds-font);
}

.zrds-staff-schedule .app-shell,
.zrds-team-handoff .wrap {
  width: min(100%, 1520px);
  max-width: 1520px;
  margin: 0 auto;
  padding: 14px 16px 24px;
}

.zrds-staff-schedule .topbar,
.zrds-team-handoff .hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  border: 1px solid var(--zrds-border-default);
  border-left: 4px solid var(--zrds-action-secondary);
  border-radius: var(--zrds-radius-md);
  padding: 12px 14px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
}

.zrds-staff-schedule .title-block .eyebrow {
  margin-bottom: 3px;
  color: var(--zrds-text-brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: none;
}

.zrds-staff-schedule .topbar .title-block h1,
.zrds-team-handoff h1 {
  margin: 0;
  color: var(--zrds-text-primary);
  font-size: 23px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: 0;
}

.zrds-team-handoff .hero p {
  margin: 4px 0 0;
  color: var(--zrds-text-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.zrds-staff-schedule .auth-shell {
  background: var(--zrds-background-canvas);
}

.zrds-staff-schedule .auth-panel,
.zrds-staff-schedule > .panel {
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: var(--zrds-shadow-1);
}

.zrds-staff-schedule .brand-mark,
.zrds-staff-schedule .mark {
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-brand);
  font-size: 22px;
}

.zrds-staff-schedule .auth-panel h1,
.zrds-staff-schedule > .panel h1 {
  color: var(--zrds-text-primary);
  font-size: 27px;
  letter-spacing: 0;
}

.zrds-staff-schedule .button,
.zrds-staff-schedule .password-row button,
.zrds-team-handoff button,
.zrds-team-handoff a.btn {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--zrds-radius-md);
  padding: 0 11px;
  box-shadow: none;
  font-family: var(--zrds-font);
  font-size: 13px;
  font-weight: 900;
  transform: none;
}

.zrds-staff-schedule .button:hover,
.zrds-staff-schedule .button:active,
.zrds-team-handoff button:hover,
.zrds-team-handoff button:active,
.zrds-team-handoff a.btn:hover,
.zrds-team-handoff a.btn:active {
  transform: none;
  box-shadow: none;
  filter: none;
}

.zrds-staff-schedule .button.primary,
.zrds-staff-schedule .password-row button,
.zrds-team-handoff button:not(.secondary):not(.good):not(.bad):not(.warn):not(.stat):not(.tab) {
  background: var(--zrds-action-primary);
  color: var(--zrds-text-inverse);
}

.zrds-staff-schedule .button.ghost,
.zrds-team-handoff button.secondary,
.zrds-team-handoff a.secondary,
.zrds-team-handoff .tab {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-brand);
}

.zrds-team-handoff button.good {
  background: var(--zrds-action-primary);
  color: var(--zrds-text-inverse);
}

.zrds-team-handoff button.bad {
  background: var(--zrds-status-danger);
  color: var(--zrds-text-inverse);
}

.zrds-team-handoff button.warn {
  background: var(--zrds-status-warning);
  color: var(--zrds-text-inverse);
}

.zrds-staff-schedule .top-actions .button,
.zrds-staff-schedule .control-strip .button,
.zrds-staff-schedule .top-actions .select-wrap select {
  min-height: 38px;
  border-radius: var(--zrds-radius-md);
}

.zrds-staff-schedule .save-status,
.zrds-staff-schedule .meal-action,
.zrds-staff-schedule .meal-department-option,
.zrds-staff-schedule .view-button,
.zrds-team-handoff .pill {
  border-radius: var(--zrds-radius-sm);
  box-shadow: none;
}

.zrds-staff-schedule .empty-state,
.zrds-staff-schedule .schedule-card,
.zrds-staff-schedule .control-strip,
.zrds-staff-schedule .meal-panel,
.zrds-staff-schedule .pending-review-panel,
.zrds-staff-schedule .directory-panel,
.zrds-team-handoff .panel {
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-staff-schedule .summary-card,
.zrds-staff-schedule .meal-stat,
.zrds-team-handoff .stat {
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-team-handoff .stat {
  color: var(--zrds-text-primary);
  text-align: left;
}

.zrds-team-handoff .stat::before {
  display: none;
}

.zrds-team-handoff .tab.active {
  border-color: var(--zrds-action-primary);
  background: var(--zrds-action-primary);
  color: var(--zrds-text-inverse);
}

.zrds-team-handoff .handoffGroupTabs {
  display: none !important;
}

.zrds-staff-schedule input,
.zrds-staff-schedule select,
.zrds-team-handoff input,
.zrds-team-handoff select,
.zrds-team-handoff textarea {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-sm);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
}

.zrds-staff-schedule input:focus,
.zrds-staff-schedule select:focus,
.zrds-team-handoff input:focus,
.zrds-team-handoff select:focus,
.zrds-team-handoff textarea:focus {
  outline: none;
  border-color: var(--zrds-border-focus);
  box-shadow: 0 0 0 3px rgba(23, 107, 84, 0.12);
}

.zrds-team-handoff .cards {
  gap: 8px;
}

.zrds-team-handoff .card {
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-team-handoff .card.isReceived {
  border-color: var(--zrds-raw-forest-100);
  background: var(--zrds-raw-forest-50);
}

.zrds-team-handoff .message,
.zrds-team-handoff .inlineEdit {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-subtle);
  box-shadow: none;
}

.zrds-team-handoff .receiptBox {
  border-color: var(--zrds-border-default);
}

.zrds-team-handoff .empty {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-subtle);
  color: var(--zrds-text-secondary);
}

@media (max-width: 860px) {
  .zrds-staff-schedule .app-shell,
  .zrds-team-handoff .wrap {
    padding: 8px 7px 16px;
  }

  .zrds-staff-schedule .topbar,
  .zrds-team-handoff .hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 11px;
  }

  .zrds-staff-schedule .topbar .title-block h1,
  .zrds-team-handoff h1 {
    font-size: 21px;
  }

  .zrds-staff-schedule .top-actions,
  .zrds-team-handoff .heroActions {
    width: 100%;
  }

  .zrds-staff-schedule .top-actions .button,
  .zrds-staff-schedule .top-actions .select-wrap select,
  .zrds-team-handoff button,
  .zrds-team-handoff a.btn {
    min-height: 42px;
  }

  .zrds-team-handoff .formGrid,
  .zrds-team-handoff .toolbar {
    grid-template-columns: 1fr;
  }

  .zrds-team-handoff .formGrid .actions {
    padding-right: 72px;
  }
}

/* Product mapping workspace */
.zrds-pick-catalog {
  background: var(--zrds-background-canvas);
}

.zrds-pick-catalog .wrap {
  width: min(100%, 1640px);
  max-width: 1640px;
  margin: 0 auto;
  padding: 14px 16px 28px;
}

.zrds-pick-catalog .catalogHeader,
.zrds-shopee-report .shopeeHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 10px;
  border: 1px solid var(--zrds-border-default);
  border-left: 4px solid var(--zrds-action-secondary);
  border-radius: var(--zrds-radius-md);
  padding: 15px 17px;
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-pick-catalog .catalogEyebrow,
.zrds-pick-catalog .section-kicker,
.zrds-shopee-report .shopeeEyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--zrds-text-brand);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.zrds-pick-catalog .catalogHeader h1,
.zrds-shopee-report .shopeeHeader h1 {
  margin: 0;
  color: var(--zrds-text-primary);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: left;
}

.zrds-pick-catalog .catalogHeader p,
.zrds-shopee-report .shopeeHeader p {
  margin: 5px 0 0;
  color: var(--zrds-text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.zrds-pick-catalog .panel {
  margin: 0 0 8px;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  padding: 12px;
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-pick-catalog .accessPanel {
  border-left: 4px solid var(--zrds-action-primary);
}

.zrds-pick-catalog .section-head {
  margin-bottom: 9px;
}

.zrds-pick-catalog .section-head h2 {
  margin: 0;
  color: var(--zrds-text-primary);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}

.zrds-pick-catalog label,
.zrds-pick-catalog summary {
  color: var(--zrds-text-secondary);
}

.zrds-pick-catalog input,
.zrds-pick-catalog select,
.zrds-pick-catalog textarea {
  min-height: 40px;
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-sm);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-primary);
  box-shadow: none;
}

.zrds-pick-catalog input:focus,
.zrds-pick-catalog select:focus,
.zrds-pick-catalog textarea:focus,
.zrds-pick-catalog .api-row input:focus,
.zrds-pick-catalog .api-row select:focus,
.zrds-pick-catalog .product-row input:focus {
  outline: none;
  border-color: var(--zrds-border-focus);
  background: var(--zrds-background-surface);
  box-shadow: inset 0 0 0 1px var(--zrds-border-focus), 0 0 0 3px rgba(23, 107, 84, 0.12);
}

.zrds-pick-catalog button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--zrds-radius-md);
  padding: 0 12px;
  background: var(--zrds-action-primary);
  color: var(--zrds-text-inverse);
  box-shadow: none;
  font-family: var(--zrds-font);
  font-size: 13px;
  font-weight: 900;
  transform: none;
}

.zrds-pick-catalog button:hover,
.zrds-pick-catalog button:active {
  filter: none;
  transform: none;
  box-shadow: none;
}

.zrds-pick-catalog button.primary {
  background: var(--zrds-action-primary);
}

.zrds-pick-catalog button.ghost {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-brand);
}

.zrds-pick-catalog button.danger {
  border-color: var(--zrds-raw-red-100);
  background: var(--zrds-background-danger);
  color: var(--zrds-status-danger);
}

.zrds-pick-catalog .smallbtn {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.zrds-pick-catalog .msg {
  margin: 8px 0 0;
  color: var(--zrds-text-secondary);
}

.zrds-pick-catalog .note,
.zrds-pick-catalog .meta,
.zrds-pick-catalog .api-sub,
.zrds-pick-catalog .history-time,
.zrds-pick-catalog .history-ip {
  color: var(--zrds-text-muted);
}

.zrds-pick-catalog .api-list,
.zrds-pick-catalog .product-list {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  overflow: auto;
}

.zrds-pick-catalog .api-head,
.zrds-pick-catalog .product-head {
  background: var(--zrds-background-brand);
  color: var(--zrds-text-inverse);
}

.zrds-pick-catalog .api-group-row {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-subtle);
}

.zrds-pick-catalog .api-group-title,
.zrds-pick-catalog .api-title,
.zrds-pick-catalog .history-summary {
  color: var(--zrds-text-primary);
}

.zrds-pick-catalog .api-row,
.zrds-pick-catalog .product-row,
.zrds-pick-catalog .history-row {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-surface);
}

.zrds-pick-catalog .api-row:nth-child(even),
.zrds-pick-catalog .product-row:nth-child(even) {
  background: var(--zrds-background-subtle);
}

.zrds-pick-catalog .api-row > *,
.zrds-pick-catalog .product-row > *,
.zrds-pick-catalog .api-source,
.zrds-pick-catalog .row-status {
  border-color: var(--zrds-border-default);
}

.zrds-pick-catalog .api-spec,
.zrds-pick-catalog .api-chip,
.zrds-pick-catalog .badge,
.zrds-pick-catalog .status-pill {
  border-radius: var(--zrds-radius-sm);
}

.zrds-pick-catalog .api-spec,
.zrds-pick-catalog .api-chip,
.zrds-pick-catalog .api-chip.soft,
.zrds-pick-catalog .badge {
  background: var(--zrds-background-subtle);
  color: var(--zrds-text-secondary);
}

.zrds-pick-catalog .api-erp-now {
  border-color: var(--zrds-raw-forest-100);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-raw-forest-50);
  color: var(--zrds-text-brand);
}

.zrds-pick-catalog .api-erp-now.empty {
  border-color: var(--zrds-raw-amber-100);
  background: var(--zrds-background-warning);
  color: var(--zrds-status-warning);
}

.zrds-pick-catalog .compact-panel > summary {
  min-height: 40px;
  padding: 2px 0;
  font-size: 14px;
  font-weight: 900;
}

.zrds-pick-catalog .help-modal {
  background: rgba(22, 32, 29, 0.5);
}

.zrds-pick-catalog .help-card {
  border-color: var(--zrds-border-default);
  border-radius: var(--zrds-radius-lg);
  background: var(--zrds-background-surface);
  box-shadow: var(--zrds-shadow-2);
}

/* Shopee operational summary */
.zrds-shopee-report {
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--zrds-background-canvas);
  color: var(--zrds-text-primary);
}

.zrds-shopee-report .wrap {
  width: min(100%, 1320px);
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 16px 28px;
}

.zrds-shopee-report .shopeeHeader {
  margin-bottom: 8px;
}

.zrds-shopee-report .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.zrds-shopee-report a.btn,
.zrds-shopee-report .actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--zrds-radius-md);
  padding: 0 12px;
  background: var(--zrds-action-primary);
  color: var(--zrds-text-inverse);
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.zrds-shopee-report a.btn.secondary,
.zrds-shopee-report .actions a.secondary {
  border-color: var(--zrds-border-default);
  background: var(--zrds-background-surface);
  color: var(--zrds-text-brand);
}

.zrds-shopee-report .subtitle {
  margin: 0 0 8px;
  color: var(--zrds-text-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.zrds-shopee-report .cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}

.zrds-shopee-report .card,
.zrds-shopee-report .section {
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-md);
  background: var(--zrds-background-surface);
  box-shadow: none;
}

.zrds-shopee-report .card {
  padding: 12px 14px;
}

.zrds-shopee-report .card .label {
  color: var(--zrds-text-muted);
  font-size: 12px;
  font-weight: 800;
}

.zrds-shopee-report .card .value {
  color: var(--zrds-text-primary);
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.zrds-shopee-report .section {
  margin-bottom: 8px;
  padding: 12px 14px;
}

.zrds-shopee-report .section h2 {
  margin: 0 0 9px;
  color: var(--zrds-text-primary);
  font-size: 15px;
  font-weight: 900;
}

.zrds-shopee-report .alert {
  margin-bottom: 6px;
  border: 1px solid var(--zrds-border-default);
  border-left: 4px solid var(--zrds-status-info);
  border-radius: var(--zrds-radius-sm);
  padding: 9px 11px;
  background: var(--zrds-background-surface);
  color: var(--zrds-text-secondary);
}

.zrds-shopee-report .alert strong {
  display: block;
  margin-bottom: 2px;
  color: inherit;
}

.zrds-shopee-report .alert.red {
  border-left-color: var(--zrds-status-danger);
  background: var(--zrds-background-danger);
  color: var(--zrds-status-danger);
}

.zrds-shopee-report .alert.yellow {
  border-left-color: var(--zrds-status-warning);
  background: var(--zrds-background-warning);
  color: #7a4a0a;
}

.zrds-shopee-report .alert.green {
  border-left-color: var(--zrds-status-success);
  background: var(--zrds-raw-forest-50);
  color: var(--zrds-text-brand);
}

.zrds-shopee-report .chart {
  gap: 7px;
  height: 104px;
  border-top: 1px solid var(--zrds-border-default);
  padding: 13px 4px 2px;
}

.zrds-shopee-report .bar {
  background: var(--zrds-action-primary);
  border-radius: var(--zrds-radius-sm) var(--zrds-radius-sm) 0 0;
  transition: none;
}

.zrds-shopee-report .tableWrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--zrds-border-default);
  border-radius: var(--zrds-radius-sm);
}

.zrds-shopee-report table,
.zrds-shopee-report .top-table {
  min-width: 620px;
  margin: 0;
}

.zrds-shopee-report th,
.zrds-shopee-report .top-table th {
  border-bottom: 1px solid var(--zrds-border-default);
  background: var(--zrds-background-brand);
  color: var(--zrds-text-inverse);
  font-weight: 900;
}

.zrds-shopee-report td,
.zrds-shopee-report .top-table td {
  border-bottom-color: var(--zrds-border-default);
}

.zrds-shopee-report .top-table td.rank-cell {
  color: var(--zrds-text-muted);
  font-size: 12px;
  font-weight: 900;
}

.zrds-shopee-report .top-table td.today-qty {
  color: var(--zrds-text-brand);
}

.zrds-shopee-report .up {
  color: var(--zrds-status-success);
}

.zrds-shopee-report .down,
.zrds-shopee-report td.low {
  color: var(--zrds-status-danger);
}

.zrds-shopee-report .diagnosticSection {
  background: var(--zrds-background-subtle);
}

.zrds-shopee-report .diagnosticSection summary {
  min-height: 36px;
  color: var(--zrds-text-muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.zrds-shopee-report .footer {
  color: var(--zrds-text-muted);
}

.zrds-shopee-report .loadingPanel {
  max-width: 760px;
  margin: 16px auto 10px;
}

.zrds-shopee-report .badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--zrds-raw-amber-100);
  border-radius: var(--zrds-radius-sm);
  padding: 0 9px;
  background: var(--zrds-background-warning);
  color: #7a4a0a;
  font-size: 12px;
  font-weight: 900;
}

.zrds-shopee-loading .actions {
  justify-content: center;
}

@media (max-width: 900px) {
  .zrds-pick-catalog .wrap,
  .zrds-shopee-report .wrap {
    padding: 8px 7px 18px;
  }

  .zrds-pick-catalog .catalogHeader,
  .zrds-shopee-report .shopeeHeader {
    align-items: flex-start;
    flex-direction: column;
    padding: 11px;
  }

  .zrds-pick-catalog .catalogHeader h1,
  .zrds-shopee-report .shopeeHeader h1 {
    font-size: 21px;
  }

  .zrds-pick-catalog .accessPanel .row {
    grid-template-columns: 1fr 1fr;
  }

  .zrds-pick-catalog .accessPanel .row > div:first-child {
    grid-column: 1 / -1;
  }

  .zrds-pick-catalog button,
  .zrds-shopee-report a.btn,
  .zrds-shopee-report .actions a {
    min-height: 42px;
  }

  .zrds-shopee-report .shopeeHeader .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .zrds-shopee-report .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zrds-shopee-report .subtitle {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .zrds-pick-catalog .accessPanel .row {
    grid-template-columns: 1fr;
  }

  .zrds-pick-catalog .accessPanel .row > div:first-child {
    grid-column: auto;
  }

  .zrds-pick-catalog .product-tools > input,
  .zrds-pick-catalog .product-tools > select,
  .zrds-pick-catalog .product-tools > button {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
  }

  .zrds-shopee-report .shopeeHeader .actions a {
    flex: 1 1 calc(50% - 4px);
  }
}
