:root {
  color-scheme: dark;
  --background: #07100f;
  --foreground: #eefbf8;
  --card: rgba(9, 21, 24, 0.76);
  --card-foreground: #eefbf8;
  --muted: rgba(255, 255, 255, 0.08);
  --muted-foreground: #9db5b4;
  --primary: #21f3d3;
  --primary-foreground: #ffffff;
  --secondary: rgba(255, 255, 255, 0.09);
  --secondary-foreground: #e9fffb;
  --accent: rgba(157, 92, 255, 0.16);
  --accent-foreground: #e8d9ff;
  --destructive: #ff6a5f;
  --destructive-foreground: #ffffff;
  --success: #21f3d3;
  --success-soft: rgba(33, 243, 211, 0.15);
  --warning: #f6c66f;
  --warning-soft: rgba(246, 198, 111, 0.16);
  --destructive-soft: rgba(255, 106, 95, 0.16);
  --border: rgba(154, 255, 237, 0.18);
  --input: rgba(154, 255, 237, 0.2);
  --ring: rgba(33, 243, 211, 0.24);
  --radius: 8px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Mixed delivery preview: line-level routing workbench */
.mixed-delivery-preview-mode .workspace {
  max-width: 1480px;
}

.mixed-preview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 28px 30px;
  border: 1px solid rgba(33, 243, 211, .26);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 8%, rgba(33, 243, 211, .16), transparent 34%),
    linear-gradient(135deg, rgba(12, 38, 39, .96), rgba(7, 20, 24, .9));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.mixed-preview-hero h2 {
  max-width: 720px;
  margin: 7px 0 10px;
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.mixed-preview-hero p,
.mixed-preview-card-header p {
  margin: 0;
  color: #a5c2be;
  font-size: 13px;
  line-height: 1.6;
}

.mixed-preview-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mixed-preview-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.mixed-preview-stat {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 18px 19px;
  border: 1px solid rgba(151, 255, 236, .16);
  border-radius: 12px;
  background: rgba(10, 27, 30, .82);
}

.mixed-preview-stat::after {
  position: absolute;
  right: -26px;
  bottom: -35px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: rgba(33, 243, 211, .08);
  content: "";
}

.mixed-preview-stat.is-new { border-color: rgba(246, 198, 111, .3); }
.mixed-preview-stat.is-new::after { background: rgba(246, 198, 111, .1); }
.mixed-preview-stat.is-review { border-color: rgba(255, 106, 95, .3); }
.mixed-preview-stat.is-review::after { background: rgba(255, 106, 95, .1); }
.mixed-preview-stat.is-money { border-color: rgba(157, 92, 255, .34); }
.mixed-preview-stat.is-money::after { background: rgba(157, 92, 255, .12); }

.mixed-preview-stat span,
.mixed-preview-stat small {
  display: block;
  color: #9db5b4;
  font-size: 12px;
}

.mixed-preview-stat strong {
  display: block;
  margin: 14px 0 4px;
  color: #eafffb;
  font-size: 32px;
  letter-spacing: -.04em;
}

.mixed-preview-stat.is-old strong { color: #5bf4db; }
.mixed-preview-stat.is-new strong { color: #ffd98a; }
.mixed-preview-stat.is-review strong { color: #ff938a; }
.mixed-preview-stat.is-money strong { color: #d6b6ff; }

.mixed-preview-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid rgba(151, 255, 236, .12);
  border-radius: 12px;
  background: rgba(8, 21, 24, .7);
}

.mixed-preview-flow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  min-width: 0;
  color: #789693;
}

.mixed-preview-flow-step b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #315856;
  border-radius: 9px;
  color: #9bb7b2;
  font-size: 11px;
}

.mixed-preview-flow-step span { color: #b8cfcb; font-size: 12px; }
.mixed-preview-flow-step small { color: #6f8c88; font-size: 11px; }
.mixed-preview-flow-step.is-done b { border-color: #2bcab3; color: #5bf4db; }
.mixed-preview-flow-step.is-active b { border-color: #f6c66f; color: #ffd98a; box-shadow: 0 0 0 4px rgba(246, 198, 111, .08); }
.mixed-preview-flow-step.is-active span { color: #fff0c9; }

.mixed-preview-flow-line {
  flex: 1 1 30px;
  height: 1px;
  min-width: 20px;
  background: linear-gradient(90deg, rgba(33, 243, 211, .5), rgba(96, 125, 122, .24));
}

.mixed-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .8fr);
  gap: 18px;
  align-items: start;
}

.mixed-preview-table-card,
.mixed-preview-summary-card,
.mixed-preview-release-card {
  overflow: hidden;
  border-color: rgba(151, 255, 236, .15);
}

.mixed-preview-card-header {
  align-items: flex-start;
}

.mixed-preview-visible-count {
  flex: none;
  padding: 7px 10px;
  border: 1px solid rgba(33, 243, 211, .18);
  border-radius: 999px;
  color: #84e8d7;
  font-size: 11px;
}

.mixed-preview-tabs {
  display: flex;
  gap: 5px;
  padding: 0 18px 14px;
  border-bottom: 1px solid rgba(151, 255, 236, .12);
  overflow-x: auto;
}

.mixed-preview-tabs button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #89a5a1;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.mixed-preview-tabs button:hover,
.mixed-preview-tabs button:focus-visible {
  border-color: rgba(33, 243, 211, .35);
  color: #dffff8;
  outline: none;
}

.mixed-preview-tabs button.is-active {
  border-color: rgba(33, 243, 211, .34);
  background: rgba(33, 243, 211, .1);
  color: #8ef7e6;
}

.mixed-preview-tabs b { margin-left: 4px; color: inherit; }

.mixed-preview-table-wrap { max-height: 560px; overflow: auto; }
.mixed-preview-table { min-width: 820px; }
.mixed-preview-table tr[hidden] { display: none; }
.mixed-preview-table td { vertical-align: middle; }
.mixed-preview-table td small { display: block; margin-top: 4px; color: #789693; font-size: 11px; }
.mixed-preview-table code { color: #b7f8eb; font-size: 12px; }
.mixed-preview-empty-code { color: #ffcf80; font-size: 11px; }

.mixed-preview-disposition {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(33, 243, 211, .09);
  color: #74edda;
  font-size: 11px;
  white-space: nowrap;
}

.mixed-preview-disposition i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(33, 243, 211, .12);
}

.mixed-preview-disposition.is-hold { background: rgba(246, 198, 111, .11); color: #ffd27c; }
.mixed-preview-disposition.is-hold i { box-shadow: 0 0 0 3px rgba(246, 198, 111, .12); }
.mixed-preview-disposition.is-review { background: rgba(255, 106, 95, .1); color: #ff9a91; }
.mixed-preview-disposition.is-review i { box-shadow: 0 0 0 3px rgba(255, 106, 95, .12); }

.mixed-preview-mark-button {
  display: block;
  margin-top: 8px;
  min-height: 34px;
  padding: 0 9px;
  font-size: 11px;
}

.mixed-preview-hold-note { color: #ffd27c; font-size: 11px; }
.mixed-preview-old-note { color: #74edda; font-size: 11px; }

.mixed-preview-side-stack { display: grid; gap: 18px; }
.mixed-preview-summary-card .card-header,
.mixed-preview-release-card .card-header { align-items: flex-start; }

.mixed-preview-summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid rgba(151, 255, 236, .1);
}

.mixed-preview-summary-total span { color: #9db5b4; font-size: 12px; }
.mixed-preview-summary-total strong { color: #eafffb; font-size: 30px; letter-spacing: -.04em; }
.mixed-preview-summary-total small { color: #8fa8a4; font-size: 12px; }

.mixed-preview-summary-list { display: grid; gap: 0; padding: 4px 18px 12px; }
.mixed-preview-summary-list div { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid rgba(151, 255, 236, .08); }
.mixed-preview-summary-list div:last-child { border-bottom: 0; }
.mixed-preview-summary-list span { color: #86a09c; font-size: 12px; }
.mixed-preview-summary-list strong { color: #dffaf4; font-size: 13px; }
.text-warning { color: #ffd27c !important; }

.mixed-preview-info-callout {
  display: flex;
  gap: 9px;
  margin: 0 18px 16px;
  padding: 11px 12px;
  border: 1px solid rgba(246, 198, 111, .2);
  border-radius: 8px;
  background: rgba(246, 198, 111, .07);
}

.mixed-preview-info-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #f6c66f;
  border-radius: 50%;
  color: #f6c66f;
  font-size: 11px;
}

.mixed-preview-info-callout p { margin: 0; color: #d9c799; font-size: 11px; line-height: 1.55; }
.mixed-preview-submit,
.mixed-preview-release { width: calc(100% - 36px); margin: 0 18px; min-height: 44px; }
.mixed-preview-submit:disabled,
.mixed-preview-release:disabled { cursor: default; opacity: .72; }
.mixed-preview-disclaimer { display: block; margin: 10px 18px 18px; color: #607b77; font-size: 10px; text-align: center; }

.mixed-preview-style-line { display: flex; align-items: center; gap: 12px; padding: 4px 18px 16px; }
.mixed-preview-style-thumb { display: grid; place-items: center; width: 58px; height: 64px; border: 1px solid rgba(246, 198, 111, .32); border-radius: 9px; background: linear-gradient(145deg, #7a6a57, #2c3a39 74%); color: rgba(255, 241, 199, .86); font-size: 11px; letter-spacing: .14em; }
.mixed-preview-style-line strong { display: block; color: #ebfaf5; font-size: 13px; }
.mixed-preview-style-line small { display: block; margin-top: 6px; color: #8da6a1; font-size: 11px; }
.mixed-preview-release-meta { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 0 18px 16px; padding: 12px 0; border-top: 1px solid rgba(151, 255, 236, .1); border-bottom: 1px solid rgba(151, 255, 236, .1); }
.mixed-preview-release-meta span { color: #789693; font-size: 11px; }
.mixed-preview-release-meta strong { color: #dffaf4; font-size: 11px; text-align: right; }
.mixed-preview-feedback { min-height: 33px; margin: 10px 18px 17px; color: #a0bbb6; font-size: 11px; line-height: 1.55; }

@media (max-width: 1050px) {
  .mixed-preview-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mixed-preview-layout { grid-template-columns: 1fr; }
  .mixed-preview-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .mixed-preview-hero { flex-direction: column; padding: 22px 20px; }
  .mixed-preview-hero-actions { justify-content: flex-start; }
  .mixed-preview-stat-grid { gap: 10px; }
  .mixed-preview-stat { min-height: 112px; padding: 14px; }
  .mixed-preview-stat strong { margin-top: 10px; font-size: 26px; }
  .mixed-preview-flow { align-items: stretch; flex-direction: column; }
  .mixed-preview-flow-line { width: 1px; height: 12px; min-height: 12px; margin-left: 15px; background: linear-gradient(180deg, rgba(33, 243, 211, .5), rgba(96, 125, 122, .24)); }
  .mixed-preview-side-stack { grid-template-columns: 1fr; }
  .mixed-preview-table-wrap { margin: 0 -1px; }
}

/* 满心妮妮颜色数量矩阵 */
.manxin-color-matrix {
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(44, 211, 194, .32);
  border-radius: 12px;
  background: rgba(4, 27, 29, .72);
}

.manxin-color-matrix.is-mixed {
  border-color: rgba(245, 158, 11, .58);
  background: rgba(46, 32, 8, .58);
}

.manxin-color-matrix-head,
.manxin-color-matrix-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.manxin-color-matrix-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(126, 223, 214, .18);
}

.manxin-color-matrix-head span,
.manxin-color-matrix-meta span {
  color: #9bd7d1;
  font-size: 12px;
}

.manxin-color-matrix-head strong {
  display: block;
  margin-top: 3px;
  color: #eafffc;
}

.manxin-color-matrix-head em {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(44, 211, 194, .14);
  color: #74f1e3;
  font-style: normal;
  font-size: 12px;
}

.manxin-color-matrix.is-mixed .manxin-color-matrix-head em {
  background: rgba(245, 158, 11, .18);
  color: #ffd58a;
}

.manxin-color-matrix-group {
  padding: 14px 16px 16px;
}

.manxin-color-matrix-meta {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.manxin-color-matrix-meta strong {
  margin-right: 6px;
  color: #fff;
}

.manxin-color-matrix-scroll {
  overflow-x: auto;
}

.manxin-color-matrix table {
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.manxin-color-matrix th,
.manxin-color-matrix td {
  min-width: 92px;
  padding: 10px 12px;
  border: 1px solid rgba(126, 223, 214, .18);
  text-align: center;
}

.manxin-color-matrix th {
  color: #bdf4ee;
  font-size: 12px;
  font-weight: 600;
}

.manxin-color-matrix td {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.supplier-brand-card {
  margin-top: 18px;
}

.supplier-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.supplier-brand-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(33, 243, 211, 0.045);
}

.supplier-brand-item > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.supplier-brand-item span,
.supplier-brand-item small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.supplier-brand-item b {
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-size: 13px;
}

.supplier-brand-item.is-disabled {
  opacity: 0.58;
}

.supplier-brand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.supplier-brand-actions .small-button {
  min-height: 44px;
  cursor: pointer;
}

.supplier-brand-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--border);
}

.supplier-brand-form .btn,
.supplier-brand-form input,
.supplier-brand-form select {
  min-height: 44px;
}

.dialog-panel.supplier-brand-alias-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1040px, 100%);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  box-shadow: var(--shadow);
}

.supplier-brand-alias-dialog .dialog-header,
.supplier-brand-alias-dialog .dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.supplier-brand-alias-dialog .dialog-header {
  border-bottom: 1px solid var(--border);
}

.supplier-brand-alias-dialog .dialog-header h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.supplier-brand-alias-dialog .dialog-header p,
.supplier-brand-alias-dialog .field small {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.supplier-brand-alias-dialog .dialog-body {
  display: grid;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

.supplier-brand-color-alias-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.supplier-brand-color-alias-section h3 {
  margin: 0;
  font-size: 15px;
}

.supplier-brand-color-alias-section .form-hint {
  margin: 0;
  line-height: 1.6;
}

.supplier-brand-alias-dialog [data-color-alias-rows] {
  display: grid;
  gap: 12px;
}

.supplier-brand-color-alias-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.supplier-brand-color-alias-row .field {
  min-width: 0;
}

.supplier-brand-color-alias-row .supplier-brand-color-alias-reason {
  grid-column: 1 / 4;
}

.supplier-brand-color-alias-row > button {
  grid-column: 4;
  grid-row: 1 / 3;
  align-self: center;
}

.supplier-brand-alias-dialog input,
.supplier-brand-alias-dialog textarea,
.supplier-brand-alias-dialog button {
  min-height: 44px;
}

.supplier-brand-alias-dialog textarea {
  resize: vertical;
}

.supplier-brand-color-alias-controls,
.supplier-brand-alias-dialog .dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.supplier-brand-alias-dialog .dialog-actions {
  border-top: 1px solid var(--border);
}

.supplier-brand-color-alias-preview:empty {
  display: none;
}

.supplier-brand-color-alias-preview,
.supplier-brand-color-alias-history {
  max-width: 100%;
  min-width: 0;
}

.supplier-brand-color-alias-preview table,
.supplier-brand-color-alias-history table {
  min-width: 780px;
}

.supplier-brand-color-alias-preview td,
.supplier-brand-color-alias-history td {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.supplier-brand-color-alias-preview td small,
.supplier-brand-color-alias-history td small {
  display: block;
  margin-top: 4px;
  color: var(--muted-foreground);
}

.supplier-brand-alias-feedback {
  min-height: 20px;
  margin: 0;
  color: var(--muted-foreground);
  overflow-wrap: anywhere;
}

.prd-edit-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 11px;
}

@media (max-width: 720px) {
  .supplier-brand-grid,
  .supplier-brand-form {
    grid-template-columns: 1fr;
  }

  .supplier-brand-item {
    grid-template-columns: 1fr;
  }

  .supplier-brand-alias-dialog .dialog-header,
  .supplier-brand-alias-dialog .dialog-body,
  .supplier-brand-alias-dialog .dialog-actions {
    padding: 14px;
  }

  .supplier-brand-color-alias-row {
    grid-template-columns: 1fr;
  }

  .supplier-brand-color-alias-row .supplier-brand-color-alias-reason,
  .supplier-brand-color-alias-row > button {
    grid-column: auto;
    grid-row: auto;
  }

  .supplier-brand-color-alias-row > button {
    justify-self: end;
  }

  .supplier-brand-alias-dialog .dialog-actions .btn {
    flex: 1;
  }
}

/* Manufacturer delivery-note archive */
.manufacturer-file-archive,
.manufacturer-file-list-card {
  border-color: rgba(62, 155, 143, 0.28);
}

.manufacturer-file-archive-head {
  align-items: center;
}

.manufacturer-file-folders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.manufacturer-file-folder {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 94px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #285f5a;
  border-radius: 5px 12px 12px 12px;
  background: linear-gradient(145deg, #0a2928, #071c1b);
  color: #dffcf8;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.manufacturer-file-folder::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46%;
  height: 5px;
  border-radius: 0 7px 0 0;
  background: #2f766f;
}

.manufacturer-file-folder:hover,
.manufacturer-file-folder.active {
  border-color: #28e1c7;
  background: linear-gradient(145deg, #0d3431, #092320);
  box-shadow: inset 0 0 0 1px rgba(40, 225, 199, 0.16), 0 10px 28px rgba(0, 0, 0, 0.16);
}

.manufacturer-file-folder:focus-visible,
.manufacturer-file-actions a:focus-visible,
.manufacturer-file-actions button:focus-visible,
.manufacturer-relation-count:focus-visible {
  outline: 2px solid #5ff3df;
  outline-offset: 3px;
}

.manufacturer-file-folder > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: rgba(40, 225, 199, 0.1);
  color: #56e8d3;
}

.manufacturer-file-folder svg {
  width: 22px;
  height: 22px;
}

.manufacturer-file-folder div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.manufacturer-file-folder strong {
  overflow: hidden;
  color: #f1fffd;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manufacturer-file-folder small {
  color: #88aaa6;
  font-size: 11px;
  line-height: 1.5;
}

.manufacturer-file-folder.is-trash {
  border-color: rgba(245, 183, 63, 0.34);
}

.manufacturer-file-folder.is-trash::before {
  background: #c89428;
}

.manufacturer-file-folder.is-trash > span {
  background: rgba(245, 183, 63, 0.1);
  color: #f5c45f;
}

.manufacturer-file-table {
  min-width: 1540px;
}

.manufacturer-file-table th,
.manufacturer-file-table td {
  vertical-align: top;
}

.manufacturer-file-table td:first-child {
  min-width: 190px;
}

.manufacturer-file-table td:last-child {
  min-width: 240px;
}

.manufacturer-file-select-column {
  width: 46px;
  min-width: 46px;
  text-align: center;
  vertical-align: middle !important;
}

.manufacturer-file-select-checkbox {
  width: 18px;
  height: 18px;
  margin: 4px;
  accent-color: #28e1c7;
  cursor: pointer;
}

.manufacturer-file-select-checkbox:focus-visible {
  outline: 2px solid #5ff3df;
  outline-offset: 3px;
}

.manufacturer-file-select-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.manufacturer-file-batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(40, 225, 199, 0.22);
  border-radius: 8px;
  background: rgba(40, 225, 199, 0.05);
  color: #a9cbc5;
  font-size: 12px;
}

.manufacturer-file-batch-toolbar strong {
  color: #68ead7;
}

.manufacturer-file-batch-toolbar .small-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.manufacturer-file-table td strong,
.manufacturer-file-table td small {
  display: block;
}

.manufacturer-file-table td small {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.45;
}

.manufacturer-file-table tr.is-date-pending td {
  background: rgba(245, 183, 63, 0.025);
}

.manufacturer-date-pending {
  width: max-content;
  padding: 3px 7px;
  border: 1px solid rgba(245, 183, 63, 0.34);
  border-radius: 999px;
  color: #f5c45f;
}

.manufacturer-file-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(128, 160, 155, 0.24);
  border-radius: 999px;
  background: rgba(128, 160, 155, 0.08);
  color: #9fb8b4;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.manufacturer-file-status.is-success {
  border-color: rgba(40, 225, 199, 0.3);
  background: rgba(40, 225, 199, 0.08);
  color: #62e9d6;
}

.manufacturer-file-status.is-warning {
  border-color: rgba(245, 183, 63, 0.34);
  background: rgba(245, 183, 63, 0.08);
  color: #f5c45f;
}

.manufacturer-file-status.is-danger {
  border-color: rgba(255, 102, 120, 0.34);
  background: rgba(255, 102, 120, 0.08);
  color: #ff91a0;
}

.manufacturer-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.manufacturer-file-actions .small-button {
  min-height: 36px;
  cursor: pointer;
}

.manufacturer-file-actions .small-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.manufacturer-relation-count {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid rgba(70, 181, 168, 0.28);
  border-radius: 7px;
  background: rgba(40, 225, 199, 0.06);
  color: #65dbc9;
  cursor: pointer;
}

.manufacturer-file-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
}

.manufacturer-file-dialog-body {
  display: grid;
  gap: 18px;
  padding: 20px;
  overflow: auto;
}

.manufacturer-file-warning,
.manufacturer-file-relations,
.manufacturer-file-delete-relations {
  padding: 13px 15px;
  border: 1px solid rgba(245, 183, 63, 0.32);
  border-radius: 9px;
  background: rgba(245, 183, 63, 0.06);
  color: #e6c77f;
  line-height: 1.6;
}

.manufacturer-file-relations h3,
.manufacturer-file-originals h3 {
  margin-bottom: 10px;
  color: #eafffc;
  font-size: 13px;
}

.manufacturer-file-relations p,
.manufacturer-file-delete-relations p {
  margin: 6px 0 0;
  color: #afc8c4;
  font-size: 12px;
}

.manufacturer-file-originals > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manufacturer-file-originals a {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #285f5a;
  border-radius: 7px;
  color: #62e9d6;
}

.manufacturer-file-date-dialog,
.manufacturer-file-delete-dialog {
  width: min(560px, calc(100vw - 30px));
}

.manufacturer-file-delete-dialog .dialog-body,
.manufacturer-file-date-dialog .dialog-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.manufacturer-file-date-dialog .field small {
  color: #819d99;
  line-height: 1.5;
}

.btn-danger {
  border-color: #e65e70;
  background: #c94759;
  color: #fff;
}

.btn-danger:hover {
  background: #db5567;
}

@media (max-width: 1280px) {
  .manufacturer-file-folders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .manufacturer-file-folders {
    grid-template-columns: 1fr;
  }

  .manufacturer-file-folder,
  .manufacturer-file-actions .small-button,
  .manufacturer-relation-count,
  .manufacturer-file-batch-toolbar .small-button {
    min-height: 44px;
  }

  .manufacturer-file-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .manufacturer-file-folder {
    transition: none;
  }
}

/* Delivery page review: scoped to avoid changing legacy review surfaces. */
.delivery-page-detail {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin-bottom: 18px;
}

.delivery-page-head,
.delivery-page-group > header,
.delivery-page-version-copy > div:first-child,
.delivery-page-history-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.delivery-page-head {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.delivery-page-head h2 {
  margin: 4px 0;
  color: var(--foreground);
  font-size: clamp(23px, 2.5vw, 32px);
}

.delivery-page-head p,
.delivery-page-group header span,
.delivery-page-version-copy dt,
.delivery-page-history-card span,
.delivery-page-history-card dt {
  color: var(--muted-foreground);
}

.delivery-page-detail .btn,
.delivery-page-detail .small-button,
.delivery-page-detail button,
.delivery-page-detail a {
  min-height: 44px;
}

.delivery-page-detail button:focus-visible,
.delivery-page-detail a:focus-visible,
.delivery-page-detail textarea:focus-visible,
.delivery-page-dialog button:focus-visible,
.delivery-page-dialog textarea:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.delivery-page-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.delivery-page-metrics > div {
  display: grid;
  min-width: 0;
  min-height: 86px;
  align-content: center;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.delivery-page-metrics span {
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
}

.delivery-page-metrics strong {
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-size: 19px;
}

.delivery-page-rail-card,
.delivery-page-history {
  overflow: hidden;
}

.delivery-page-rail,
.delivery-page-history-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.delivery-page-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 88%, var(--background));
}

.delivery-page-group.has-versions {
  border-color: #b7791f;
  background: #fffbeb;
}

.delivery-page-group > header {
  margin-bottom: 12px;
}

.delivery-page-group > header > div {
  display: grid;
  gap: 2px;
}

.delivery-page-conflict-label,
.delivery-page-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.delivery-page-conflict-label,
.delivery-page-state.is-conflict_candidate {
  border: 1px solid #b7791f;
  background: #fff7d6;
  color: #704000;
}

.delivery-page-state.is-active {
  border: 1px solid #16815d;
  background: #e7f8f1;
  color: #075f43;
}

.delivery-page-state.is-voided {
  border: 1px solid #64748b;
  background: #f1f5f9;
  color: #334155;
}

.delivery-page-version-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.delivery-page-version-grid:has(.delivery-page-version:only-child) {
  grid-template-columns: 1fr;
}

.delivery-page-version {
  display: grid;
  grid-template-columns: minmax(104px, 0.3fr) minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.delivery-page-version.is-active {
  border-color: #16815d;
  box-shadow: inset 3px 0 #16815d;
}

.delivery-page-version-media {
  display: grid;
  min-height: 144px;
  place-items: center;
  padding: 12px;
  border-right: 1px solid var(--border);
  background: #eef3f8;
}

.delivery-page-version-media a,
.delivery-page-version-media .delivery-page-media-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  color: #1e4f7a;
  text-align: center;
  text-decoration: none;
}

.delivery-page-version-media a span {
  font-size: 24px;
  font-weight: 900;
}

.delivery-page-version-copy {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
}

.delivery-page-version-copy strong,
.delivery-page-version-copy dd {
  overflow-wrap: anywhere;
}

.delivery-page-version-copy dl,
.delivery-page-history-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.delivery-page-version-copy dl div,
.delivery-page-history-card dl div {
  display: grid;
  gap: 3px;
}

.delivery-page-version-copy dt,
.delivery-page-version-copy dd,
.delivery-page-history-card dt,
.delivery-page-history-card dd {
  margin: 0;
  font-size: 13px;
}

.delivery-page-version-copy dd,
.delivery-page-history-card dd {
  color: var(--foreground);
  font-weight: 750;
}

.delivery-page-select {
  justify-self: start;
}

.delivery-page-history-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #b7791f;
  border-left-width: 4px;
  border-radius: var(--radius);
  background: #fffbeb;
}

.delivery-page-history-card.is-resolved {
  border-color: #16815d;
  background: #f0fdf7;
}

.delivery-page-history-card p {
  margin: 0;
  color: var(--foreground);
}

.delivery-page-history-form {
  display: grid;
  gap: 9px;
  padding: 0 14px 16px;
}

.delivery-page-history-form label,
.delivery-page-dialog label {
  color: var(--foreground);
  font-weight: 800;
}

.delivery-page-history-form textarea,
.delivery-page-dialog textarea {
  width: 100%;
  min-height: 92px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  resize: vertical;
}

.delivery-page-history-form > div:last-child,
.delivery-page-dialog footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.delivery-page-form-feedback {
  min-height: 22px;
  color: #9b2c2c;
  font-weight: 700;
}

.delivery-page-dialog-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
}

.delivery-page-dialog {
  display: grid;
  width: min(540px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.delivery-page-dialog header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.delivery-page-dialog header h2,
.delivery-page-dialog header p {
  margin: 3px 0;
}

.delivery-page-dialog header > button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  font-size: 24px;
}

@media (max-width: 900px) {
  .delivery-page-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-page-version {
    grid-template-columns: 1fr;
  }

  .delivery-page-version-media {
    min-height: 100px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 600px) {
  .delivery-page-detail {
    font-size: 16px;
  }

  .delivery-page-head,
  .delivery-page-group > header,
  .delivery-page-version-copy > div:first-child,
  .delivery-page-history-card > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .delivery-page-head {
    padding: 16px;
  }

  .delivery-page-continue {
    width: 100%;
  }

  .delivery-page-metrics,
  .delivery-page-version-grid,
  .delivery-page-version-copy dl,
  .delivery-page-history-card dl {
    grid-template-columns: 1fr;
  }

  .delivery-page-version-copy dt,
  .delivery-page-version-copy dd,
  .delivery-page-history-card dt,
  .delivery-page-history-card dd,
  .delivery-page-metrics span {
    font-size: 14px;
  }

  .delivery-page-select,
  .delivery-page-history-form .btn,
  .delivery-page-dialog footer .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .delivery-page-detail *,
  .delivery-page-dialog * {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(33, 243, 211, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 243, 211, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 88% 8%, rgba(33, 243, 211, 0.22), transparent 24rem),
    radial-gradient(circle at 18% 88%, rgba(157, 92, 255, 0.18), transparent 24rem),
    radial-gradient(circle at 70% 75%, rgba(246, 198, 111, 0.08), transparent 18rem),
    var(--background);
  background-size: 36px 36px, 36px 36px, auto, auto, auto, auto;
  color: var(--foreground);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(2, 10, 12, 0.56);
  color: var(--foreground);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-right: 1px solid var(--border);
  background: rgba(4, 13, 16, 0.78);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius);
  text-decoration: none;
}

.brand:hover {
  background: rgba(33, 243, 211, 0.1);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #21f3d3, #9d5cff);
  color: #06100f;
  box-shadow: 0 0 24px rgba(33, 243, 211, 0.34);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.brand-copy small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav a,
.nav-group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: #cce7e4;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav a span,
.nav-group summary span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-foreground);
  font-size: 12px;
}

.nav a:hover,
.nav a.active,
.nav-group summary:hover,
.nav-group.active > summary {
  background: linear-gradient(135deg, rgba(33, 243, 211, 0.18), rgba(157, 92, 255, 0.2));
  color: #f8fffd;
  box-shadow: inset 0 0 0 1px rgba(33, 243, 211, 0.26), 0 0 22px rgba(33, 243, 211, 0.12);
}

.nav a:hover span,
.nav a.active span,
.nav-group summary:hover span,
.nav-group.active > summary span {
  background: rgba(255, 255, 255, 0.16);
  color: var(--primary-foreground);
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group summary {
  position: relative;
  padding-right: 34px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: ">";
  position: absolute;
  right: 12px;
  color: var(--muted-foreground);
  font-size: 16px;
  transform: rotate(0deg);
  transition: transform 0.18s ease, color 0.18s ease;
}

.nav-group[open] summary::after {
  color: var(--primary);
  transform: rotate(90deg);
}

.nav-submenu {
  display: grid;
  gap: 4px;
  margin-left: 20px;
  padding-left: 10px;
  border-left: 1px solid rgba(33, 243, 211, 0.22);
}

.nav-submenu a {
  min-height: 36px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.sidebar-card {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(8, 22, 25, 0.64);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.connector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #d7f4ef;
  font-size: 13px;
}

.connector strong {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(33, 243, 211, 0.13);
  color: var(--secondary-foreground);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.main-shell {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-heading {
  display: grid;
  gap: 4px;
}

.eyebrow,
.section-label {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-heading h1 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: 0;
}

.topbar-actions,
.toolbar,
.actions,
.form-actions,
.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.page-root {
  display: grid;
  gap: 18px;
}

.route-loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(33, 243, 211, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(33, 243, 211, 0.08), transparent 46%),
    rgba(1, 8, 10, 0.52);
  color: var(--muted-foreground);
}

#pageRoot.route-loading-overlay-host {
  position: relative;
  min-height: 260px;
}

.route-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  min-height: 260px;
  background: rgba(2, 18, 18, 0.78);
  backdrop-filter: blur(2px);
}

.route-loading strong {
  color: var(--foreground);
  font-size: 16px;
}

.route-loading small {
  color: var(--muted-foreground);
}

.route-loading-spinner {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(33, 243, 211, 0.2);
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: route-spin 0.9s linear infinite;
}

@keyframes route-spin {
  to { transform: rotate(360deg); }
}

.ai-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  overflow: hidden;
}

.ai-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(33, 243, 211, 0.16), transparent 34%),
    linear-gradient(280deg, rgba(157, 92, 255, 0.18), transparent 36%);
  pointer-events: none;
}

.ai-hero > * {
  position: relative;
}

.ai-hero h2 {
  margin-top: 4px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.ai-hero p {
  margin-top: 8px;
  max-width: 680px;
  color: var(--muted-foreground);
  line-height: 1.55;
}

.ai-signal {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 10px;
  align-items: end;
  min-height: 82px;
}

.ai-signal span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(180deg, #21f3d3, #9d5cff);
  box-shadow: 0 0 24px rgba(33, 243, 211, 0.4);
}

.ai-signal span:nth-child(1) {
  height: 44px;
}

.ai-signal span:nth-child(2) {
  height: 72px;
}

.ai-signal span:nth-child(3) {
  height: 56px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stats-grid.compact {
  margin: 14px 0 0;
}

.manufacturer-stats {
  margin-bottom: 0;
}

.stat-card,
.card,
.dialog-panel,
.empty-state {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(18px);
  color: var(--card-foreground);
  box-shadow: var(--shadow);
}

.stat-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
}

.stat-card span {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.stat-card small {
  color: var(--muted-foreground);
  font-size: 13px;
}

.card {
  overflow: hidden;
}

.card-header,
.card-content,
.card-footer {
  padding: 18px;
}

.card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  display: grid;
  gap: 4px;
}

.card-title h2,
.card-title h3 {
  font-size: 18px;
  line-height: 1.35;
}

.card-title p,
.card-description,
.meta-line,
.copy-line {
  color: var(--muted-foreground);
  line-height: 1.55;
  font-size: 13px;
}

.card-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(440px, 1.14fr);
  gap: 18px;
  align-items: start;
}

.integration-page {
  display: grid;
  max-width: 980px;
  gap: 18px;
}

.manufacturer-info-card {
  max-width: 860px;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.btn,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.btn:disabled,
.small-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.btn-primary,
.publish-button {
  border-color: rgba(33, 243, 211, 0.32);
  background: linear-gradient(135deg, #21f3d3, #5c8cff);
  color: #04100f;
  box-shadow: 0 0 22px rgba(33, 243, 211, 0.22);
}

.btn-primary:hover,
.publish-button:hover {
  background: linear-gradient(135deg, #66ffe8, #9d5cff);
}

.manufacturer-recognize-button {
  height: 80px;
}

.btn-outline,
.small-button {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.055);
  color: var(--foreground);
}

.btn-outline:hover,
.small-button:hover {
  background: rgba(33, 243, 211, 0.1);
}

.btn-secondary,
.approve-button {
  border-color: rgba(157, 92, 255, 0.3);
  background: rgba(157, 92, 255, 0.18);
  color: #eadcff;
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background: var(--secondary);
}

.btn-destructive,
.reject-button {
  background: var(--destructive-soft);
  color: var(--destructive);
}

.btn-destructive:hover,
.reject-button:hover {
  background: #ffe4df;
}

.small-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 18px;
}

.field-group {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field-label {
  color: #dffaf6;
  font-size: 13px;
  font-weight: 800;
}

.field-description {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.45;
}

.switch-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.switch-row span {
  display: grid;
  gap: 3px;
}

.switch-row strong {
  color: #e9fffb;
  font-size: 14px;
}

.switch-row small {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.45;
}

.form-actions {
  justify-content: stretch;
}

.form-actions .btn {
  flex: 1;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px)) auto;
  gap: 12px;
  align-items: end;
}

.group-lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.group-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.segmented-control,
.channel-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment,
.channel-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: #dffaf6;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.segment span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 12px;
}

.segment:hover,
.segment.active,
.channel-option:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(135deg, #21f3d3, #e8fbf7);
  color: #06100f;
}

.simple-list,
.product-list,
.review-list,
.job-list,
.delivery-list {
  display: grid;
  gap: 12px;
}

.manufacturer-row,
.product-row,
.review-row,
.job-row,
.delivery-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.permission-pills,
.permission-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.permission-pills span,
.permission-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #dffaf6;
  font-size: 13px;
  font-weight: 800;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-check {
  justify-content: flex-start;
  border-radius: var(--radius);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: #dffaf6;
  font-size: 13px;
  font-weight: 800;
}

.login-stage {
  display: grid;
  place-items: center;
  width: min(980px, 100%);
  min-height: calc(100vh - 64px);
  perspective: 1200px;
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(340px, 1fr);
  width: 100%;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  animation: loginShellIn 0.7s ease-out both;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(33, 243, 211, 0.16);
  background:
    linear-gradient(90deg, transparent, rgba(33, 243, 211, 0.2), transparent) 0 0 / 44% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(85, 156, 255, 0.16), transparent) 100% 0 / 1px 42% no-repeat;
  animation: loginFrameSweep 5.2s linear infinite;
}

.login-visual {
  position: relative;
  display: grid;
  align-content: end;
  gap: 14px;
  min-height: 100%;
  padding: 34px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(33, 243, 211, 0.2), transparent 48%),
    linear-gradient(315deg, rgba(157, 92, 255, 0.22), transparent 52%),
    rgba(3, 13, 16, 0.72);
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(33, 243, 211, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(33, 243, 211, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 243, 211, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 86%, transparent);
  animation: loginGridDrift 9s linear infinite;
}

.login-visual > * {
  position: relative;
  z-index: 1;
}

.login-brand-mark {
  width: 54px;
  height: 54px;
  font-size: 15px;
}

.login-orbit {
  position: absolute;
  inset: 70px 34px auto auto;
  width: 172px;
  aspect-ratio: 1;
  border: 1px solid rgba(33, 243, 211, 0.22);
  border-radius: 999px;
  box-shadow: inset 0 0 36px rgba(33, 243, 211, 0.1), 0 0 40px rgba(157, 92, 255, 0.18);
  animation: loginOrbitRotate 14s linear infinite;
}

.login-orbit span {
  position: absolute;
  border-radius: 999px;
  background: rgba(33, 243, 211, 0.72);
  box-shadow: 0 0 22px rgba(33, 243, 211, 0.48);
  animation: loginSignalPulse 2.4s ease-in-out infinite;
}

.login-orbit span:nth-child(1) {
  width: 12px;
  height: 12px;
  top: 24px;
  left: 34px;
}

.login-orbit span:nth-child(2) {
  width: 8px;
  height: 8px;
  right: 28px;
  top: 66px;
  animation-delay: 0.45s;
}

.login-orbit span:nth-child(3) {
  width: 10px;
  height: 10px;
  left: 78px;
  bottom: 22px;
  animation-delay: 0.9s;
}

.login-visual h2 {
  max-width: 360px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.login-visual p {
  max-width: 360px;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.login-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(26px, 5vw, 46px);
  background: rgba(6, 18, 21, 0.7);
  overflow: hidden;
  animation: loginCardIn 0.78s ease-out both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 16%, rgba(33, 243, 211, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 34%);
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-form-head {
  display: grid;
  gap: 7px;
}

.login-form-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.login-scan-line {
  display: block;
  width: min(220px, 72%);
  height: 2px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.login-scan-line::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(33, 243, 211, 0.95), rgba(85, 156, 255, 0.72), transparent);
  animation: loginScan 1.8s ease-in-out infinite;
}

.login-submit {
  position: relative;
  width: 100%;
  min-height: 46px;
  overflow: hidden;
}

.login-submit::after {
  content: "";
  position: absolute;
  inset: -2px auto -2px -44%;
  width: 36%;
  pointer-events: none;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: loginButtonSweep 2.6s ease-in-out infinite;
}

.login-card input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-card input:focus {
  border-color: rgba(33, 243, 211, 0.72);
  box-shadow: 0 0 0 3px rgba(33, 243, 211, 0.12), 0 0 28px rgba(33, 243, 211, 0.16);
  background: rgba(5, 22, 24, 0.9);
}

@keyframes loginShellIn {
  from {
    opacity: 0;
    transform: translateY(18px) rotateX(3deg) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
  }
}

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes loginFrameSweep {
  0% {
    background-position: -48% 0, 100% -48%;
  }
  50% {
    background-position: 148% 0, 100% 148%;
  }
  100% {
    background-position: -48% 0, 100% -48%;
  }
}

@keyframes loginGridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 24px 24px, 24px 24px;
  }
}

@keyframes loginOrbitRotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loginSignalPulse {
  0%, 100% {
    transform: scale(0.82);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

@keyframes loginScan {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(260%);
  }
}

@keyframes loginButtonSweep {
  0%, 42% {
    transform: translateX(0) skewX(-18deg);
    opacity: 0;
  }
  52% {
    opacity: 1;
  }
  100% {
    transform: translateX(420%) skewX(-18deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell,
  .login-card,
  .login-shell::before,
  .login-visual::before,
  .login-orbit,
  .login-orbit span,
  .login-scan-line::before,
  .login-submit::after {
    animation: none;
  }
}

.manufacturer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.manufacturer-main,
.product-main {
  min-width: 0;
}

.row-title,
.product-title,
.review-head,
.job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.row-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.manufacturer-name-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.manufacturer-name-line strong {
  overflow-wrap: anywhere;
}

.row-title strong,
.product-title strong,
.review-head strong,
.job-head strong {
  font-size: 16px;
}

.link-box {
  display: block;
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.46);
  color: #b8fff3;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.manufacturer-actions,
.product-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.product-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.thumb {
  width: 108px;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
  object-fit: cover;
}

.product-actions {
  min-width: 128px;
}

.badge,
.status-chip,
.credit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--secondary-foreground);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.credit-badge {
  min-width: 28px;
  border: 1px solid rgba(246, 198, 111, 0.5);
  background: rgba(246, 198, 111, 0.16);
  color: #f6c66f;
  box-shadow: 0 0 18px rgba(246, 198, 111, 0.12);
}

.status-pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-ready {
  background: var(--success-soft);
  color: var(--success);
}

.status-blocked {
  background: var(--destructive-soft);
  color: var(--destructive);
}

.status-muted {
  background: var(--secondary);
  color: var(--muted-foreground);
}

.listing-grid,
.risk-list,
.ocr-field-grid {
  display: grid;
  gap: 8px;
}

.listing-grid {
  margin-top: 10px;
}

.listing {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-foreground);
  font-size: 13px;
}

.listing strong {
  color: var(--foreground);
}

.listing-status {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
  min-width: 150px;
}

.integration-card {
  overflow: hidden;
}

.integration-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.integration-orb {
  width: 48px;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(33, 243, 211, 0.4);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), transparent 16%),
    radial-gradient(circle, rgba(33, 243, 211, 0.7), rgba(92, 140, 255, 0.18) 58%, rgba(255, 255, 255, 0.03));
  box-shadow: 0 0 28px rgba(33, 243, 211, 0.24);
}

.system-config-mark {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(33, 243, 211, 0.42);
  border-radius: var(--radius);
  background: rgba(33, 243, 211, 0.09);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.api-service-list {
  border-top: 1px solid var(--border);
}

.api-service-row {
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.api-service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.api-service-head > div {
  display: grid;
  gap: 4px;
}

.api-service-head strong {
  font-size: 15px;
}

.api-service-head span,
.api-service-details span {
  color: var(--muted-foreground);
  font-size: 12px;
}

.api-service-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.api-service-details > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding-left: 10px;
  border-left: 2px solid rgba(92, 140, 255, 0.38);
}

.api-service-details strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}

.api-config-form .card-content {
  display: grid;
  gap: 18px;
}

.api-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.api-config-field {
  min-width: 0;
}

.api-config-field > small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.api-secret-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: stretch;
}

.api-secret-control .btn {
  width: 72px;
  min-height: 42px;
  padding-inline: 10px;
}

.api-config-note {
  padding: 12px 14px;
  border: 1px solid rgba(33, 243, 211, 0.2);
  border-radius: var(--radius);
  background: rgba(33, 243, 211, 0.05);
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .api-config-grid {
    grid-template-columns: 1fr;
  }
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.integration-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.integration-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.integration-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.risk {
  padding: 9px 10px;
  border-radius: var(--radius);
  background: var(--destructive-soft);
  color: var(--destructive);
  font-size: 13px;
  line-height: 1.45;
}

.review-row,
.job-row,
.delivery-row {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.ocr-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ocr-mini-grid span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: #dffaf6;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.uploaded-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 8px;
}

.uploaded-file-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.42);
  color: #dffaf6;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.uploaded-file-card:hover {
  border-color: rgba(33, 243, 211, 0.5);
  background: rgba(33, 243, 211, 0.08);
}

.uploaded-file-card img,
.file-icon {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.uploaded-file-card img {
  object-fit: cover;
}

.file-icon {
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  letter-spacing: 0;
}

.uploaded-file-card span:last-child {
  overflow-wrap: anywhere;
}

.file-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.file-gallery-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.46);
  color: #dffaf6;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.file-gallery-card:hover {
  border-color: rgba(33, 243, 211, 0.56);
  background: rgba(33, 243, 211, 0.08);
  transform: translateY(-2px);
}

.uploaded-file-card:disabled,
.file-gallery-card:disabled {
  cursor: default;
  opacity: 0.72;
}

.file-gallery-card img,
.file-gallery-card .file-icon {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
}

.file-gallery-card strong,
.file-gallery-card span,
.file-gallery-card small {
  overflow-wrap: anywhere;
}

.file-gallery-card span,
.file-gallery-card small,
.report-summary-line {
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.45;
}

.report-summary-line {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.report-document-list {
  display: grid;
  gap: 16px;
}

.report-document {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(33, 243, 211, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.026));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 48px rgba(0, 0, 0, 0.22);
}

.report-document::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(154, 255, 237, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 255, 237, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 72%);
}

.report-document > * {
  position: relative;
  z-index: 1;
}

.report-document-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.report-document-head > div {
  min-width: 0;
}

.report-document-head h3 {
  margin: 4px 0;
  font-size: 18px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.report-document-head p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.report-document-actions {
  display: flex;
  justify-content: flex-end;
}

.report-document-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 420px;
}

.report-document.is-report-trashed {
  border-color: rgba(255, 126, 126, 0.28);
  background: rgba(76, 25, 29, 0.2);
}

.report-trash-meta,
.report-recheck-warning,
.report-delete-retention,
.report-delete-block {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 183, 77, 0.28);
  border-radius: 8px;
  background: rgba(255, 183, 77, 0.08);
}

.report-trash-meta span,
.report-trash-meta small,
.report-delete-retention span,
.report-delete-block span,
.report-delete-block small {
  color: var(--muted-foreground);
  line-height: 1.55;
}

.report-recheck-warning,
.report-delete-block.is-warning {
  color: #ffd08a;
}

.manufacturer-report-delete-dialog {
  width: min(760px, 100%);
}

.report-delete-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.report-delete-impact-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.report-delete-impact-grid dt {
  color: var(--muted-foreground);
  font-size: 12px;
}

.report-delete-impact-grid dd {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.report-delete-retention {
  margin-bottom: 12px;
  border-color: rgba(33, 243, 211, 0.2);
  background: rgba(33, 243, 211, 0.06);
}

.report-delete-block.is-danger {
  border-color: rgba(255, 94, 94, 0.32);
  background: rgba(255, 94, 94, 0.08);
}

.report-delete-block.is-safe {
  border-color: rgba(33, 243, 211, 0.2);
  background: rgba(33, 243, 211, 0.06);
}

.report-delete-relation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.report-delete-relation > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-inventory-confirm {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 94, 94, 0.32);
  border-radius: 8px;
  background: rgba(255, 94, 94, 0.08);
}

@media (max-width: 700px) {
  .report-document-head,
  .report-delete-relation {
    align-items: stretch;
    flex-direction: column;
  }

  .report-document-head-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .report-delete-impact-grid {
    grid-template-columns: 1fr;
  }
}

.report-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.report-field {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(154, 255, 237, 0.14);
  border-radius: 7px;
  background: rgba(1, 8, 10, 0.32);
}

.report-field strong {
  display: block;
  margin-bottom: 5px;
  color: #8deee0;
  font-size: 12px;
  font-weight: 600;
}

.report-field span {
  display: block;
  color: #eefbf8;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dynamic-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(154, 255, 237, 0.14);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.32);
}

.dynamic-report-table {
  min-width: 680px;
}

.dynamic-report-table th {
  background: rgba(33, 243, 211, 0.08);
}

.dynamic-report-table th,
.dynamic-report-table td {
  white-space: nowrap;
}

.dynamic-report-table td {
  max-width: 240px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.035);
  border-style: dashed;
  color: var(--muted-foreground);
  text-align: center;
  box-shadow: none;
}

.dialog-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 23, 23, 0.48);
}

.dialog-panel {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

body.modal-open {
  overflow: hidden;
}

.image-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 8, 10, 0.78);
  backdrop-filter: blur(12px);
}

.image-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(5, 15, 18, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48), 0 0 40px rgba(33, 243, 211, 0.14);
}

.image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.image-preview-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.image-preview-head strong,
.image-preview-head span {
  overflow-wrap: anywhere;
}

.image-preview-head span {
  color: var(--muted-foreground);
  font-size: 13px;
}

.image-preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  min-height: 0;
  padding: 14px;
  overflow: auto;
}

.image-preview-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(44, 226, 208, 0.45);
  border-radius: 999px;
  background: rgba(4, 25, 28, 0.88);
  color: #d9f8f3;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.image-preview-nav:hover:not(:disabled),
.image-preview-nav:focus-visible:not(:disabled) {
  border-color: var(--upload-cyan);
  background: rgba(13, 72, 73, 0.95);
}

.image-preview-nav:disabled {
  cursor: default;
  opacity: 0.28;
}

.image-preview-prev { left: 18px; }
.image-preview-next { right: 18px; }

.image-preview-counter {
  min-height: 18px;
  padding: 0 14px 12px;
  color: var(--muted-foreground);
  font-size: 13px;
  text-align: center;
}

.image-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  border-radius: 6px;
  object-fit: contain;
}

.hidden {
  display: none !important;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  font-size: 14px;
}

.report-table {
  min-width: 1480px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: #cce7e4;
  background: rgba(255, 255, 255, 0.055);
  font-size: 13px;
}

.report-table td {
  max-width: 220px;
  overflow-wrap: anywhere;
}

.table-manufacturer-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.table-manufacturer-name span:last-child {
  overflow-wrap: anywhere;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.small-button.disabled {
  opacity: 0.5;
  pointer-events: none;
}

td a {
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.standalone-upload {
  display: grid;
  gap: 16px;
  width: min(960px, 100%);
}

.simple-upload-brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
}

.simple-upload-brand .eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.simple-upload-brand h1 {
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.18;
}

.simple-upload-card {
  width: 100%;
  border-color: rgba(33, 243, 211, 0.28);
}

.simple-upload-card .card-content {
  padding: 20px;
}

.simple-upload-card .card-footer {
  padding: 16px 20px;
}

.simple-upload-card .btn {
  width: 100%;
}

.public-upload-header {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.public-upload-header h1 {
  margin-top: 3px;
  font-size: clamp(24px, 4vw, 34px);
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(300px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.file-input {
  border: 1px dashed var(--input);
  background: rgba(2, 10, 12, 0.56);
  color: var(--foreground);
}

.file-input::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 6px;
  padding: 8px 11px;
  background: rgba(33, 243, 211, 0.16);
  color: var(--foreground);
  font-weight: 800;
}

.ocr-result {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(2, 10, 12, 0.42);
  color: var(--foreground);
}

.ocr-result.empty-state {
  min-height: 98px;
  margin: 0;
}

.ocr-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ocr-field {
  display: grid;
  gap: 4px;
  padding: 9px;
  border-radius: var(--radius);
  background: var(--card);
}

.ocr-field strong {
  color: var(--muted-foreground);
  font-size: 12px;
}

.ocr-field span {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ocr-table-section {
  display: grid;
  gap: 8px;
}

.ocr-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ocr-line-table {
  min-width: 900px;
}

.ocr-line-table th,
.ocr-line-table td {
  padding: 10px;
  white-space: nowrap;
}

.ocr-line-table td:nth-child(3),
.ocr-line-table td:nth-child(10) {
  white-space: normal;
  min-width: 110px;
}

.ocr-raw {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.ocr-raw summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.ocr-raw pre {
  max-height: 260px;
  margin: 10px 0 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.64);
  color: #d9f8f2;
  white-space: pre-wrap;
  word-break: break-word;
}

.image-processing-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.image-generation-grid {
  grid-template-columns: minmax(390px, 0.88fr) minmax(430px, 1.12fr);
}

.image-generation-hero {
  background:
    linear-gradient(105deg, rgba(92, 140, 255, 0.13), transparent 42%),
    linear-gradient(285deg, rgba(246, 198, 111, 0.08), transparent 36%),
    var(--card);
}

.generation-dimension-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 16px;
  align-items: stretch;
}

.generation-dimension-fields {
  grid-template-columns: 1fr;
}

.generation-canvas-preview {
  display: grid;
  place-items: center;
  width: 100%;
  max-height: 180px;
  aspect-ratio: var(--canvas-ratio, 1 / 1);
  place-self: center;
  overflow: hidden;
  border: 1px solid rgba(92, 140, 255, 0.45);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(33, 243, 211, 0.11), rgba(92, 140, 255, 0.1)),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(255, 255, 255, 0.035) 19px 20px),
    repeating-linear-gradient(90deg, transparent 0 19px, rgba(255, 255, 255, 0.035) 19px 20px),
    rgba(1, 8, 10, 0.72);
  box-shadow: inset 0 0 28px rgba(92, 140, 255, 0.08);
}

.generation-canvas-preview span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(1, 8, 10, 0.72);
  color: #dffaf6;
  font-size: 11px;
  font-weight: 900;
}

.generation-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.generation-loading {
  border-color: rgba(92, 140, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(92, 140, 255, 0.13), transparent 45%),
    rgba(1, 8, 10, 0.42);
}

.generation-prompt-preview {
  max-height: 132px;
  overflow: auto;
  padding: 11px 12px;
  border-left: 3px solid #5c8cff;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.generation-history-prompt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-image-hero {
  background:
    linear-gradient(112deg, rgba(33, 243, 211, 0.12), transparent 38%),
    linear-gradient(292deg, rgba(157, 92, 255, 0.13), transparent 42%),
    var(--card);
}

.detail-image-form {
  margin: 0;
}

.detail-image-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.detail-source-card {
  position: sticky;
  top: 18px;
}

.detail-source-preview .empty-state {
  min-height: 320px;
  box-shadow: none;
}

.detail-source-preview .image-source-grid {
  grid-template-columns: 1fr;
}

.detail-source-preview .image-source-card img {
  aspect-ratio: 3 / 4;
  max-height: 430px;
  object-fit: contain;
}

.detail-output-spec {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.detail-output-spec div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.detail-output-spec strong {
  color: #e8fffb;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.detail-output-spec span {
  color: var(--muted-foreground);
  font-size: 10px;
}

.detail-prompt-panel {
  min-width: 0;
}

.detail-prompt-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.detail-prompt-toolbar h2 {
  margin: 5px 0 0;
  font-size: 20px;
}

.detail-prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-prompt-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(154, 255, 237, 0.17);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(33, 243, 211, 0.07), transparent 38%),
    rgba(1, 8, 10, 0.5);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.detail-prompt-card:focus-within {
  border-color: rgba(33, 243, 211, 0.5);
  background: rgba(6, 24, 26, 0.76);
  transform: translateY(-1px);
}

.detail-prompt-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-prompt-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(33, 243, 211, 0.34);
  border-radius: 7px;
  background: rgba(33, 243, 211, 0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 950;
}

.detail-prompt-card label {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

.detail-prompt-card textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.58;
}

.detail-generate-one {
  width: 100%;
  min-height: 38px;
}

.detail-image-result-card {
  margin-top: 18px;
}

.detail-image-loading {
  border-color: rgba(157, 92, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(33, 243, 211, 0.1), transparent 42%),
    linear-gradient(315deg, rgba(157, 92, 255, 0.1), transparent 44%),
    rgba(1, 8, 10, 0.48);
}

.detail-stage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.detail-stage-list span {
  min-width: 0;
  padding: 8px 10px;
  border-left: 2px solid rgba(33, 243, 211, 0.62);
  background: rgba(255, 255, 255, 0.035);
  color: #dffaf6;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.image-studio-hero {
  min-height: 126px;
}

.compact-switch {
  margin-bottom: 10px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-label-row label {
  margin: 0;
}

.field-label-row .small-button {
  white-space: nowrap;
}

.image-size-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.image-size-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.36);
  color: #dffaf6;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.image-size-option:has(input:checked) {
  border-color: rgba(33, 243, 211, 0.48);
  background: linear-gradient(135deg, rgba(33, 243, 211, 0.16), rgba(157, 92, 255, 0.14));
  box-shadow: inset 0 0 0 1px rgba(33, 243, 211, 0.1);
}

.selected-file-list .empty-state {
  min-height: 86px;
  box-shadow: none;
}

.image-source-panel {
  display: grid;
  gap: 10px;
}

.image-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
}

.compact-source-grid {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.image-source-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(154, 255, 237, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(33, 243, 211, 0.08), transparent 48%),
    rgba(1, 8, 10, 0.4);
  color: #dffaf6;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.image-source-card:hover {
  border-color: rgba(33, 243, 211, 0.56);
  background: rgba(33, 243, 211, 0.08);
  transform: translateY(-2px);
}

.image-source-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  object-fit: cover;
}

.image-source-card span {
  min-width: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.selected-files {
  display: grid;
  gap: 8px;
}

.selected-files span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: #dffaf6;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.image-result-head,
.image-job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-result-head {
  margin-bottom: 14px;
}

.image-processing-loading {
  display: grid;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(33, 243, 211, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(33, 243, 211, 0.1), transparent 45%),
    rgba(1, 8, 10, 0.42);
  box-shadow: inset 0 0 0 1px rgba(33, 243, 211, 0.06);
}

.active-image-jobs,
.recent-image-jobs {
  display: grid;
  gap: 12px;
}

.recent-image-jobs {
  margin-top: 16px;
}

.loading-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.loading-pulse {
  display: inline-flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(154, 255, 237, 0.14);
  border-radius: 999px;
  background: rgba(1, 8, 10, 0.4);
}

.loading-pulse span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary);
  animation: pulse-dot 1.05s ease-in-out infinite;
}

.loading-pulse span:nth-child(2) {
  animation-delay: 0.16s;
}

.loading-pulse span:nth-child(3) {
  animation-delay: 0.32s;
}

.ai-progress-bar {
  position: relative;
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(33, 243, 211, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.ai-progress-bar span {
  position: absolute;
  inset: 0 auto 0 -38%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(33, 243, 211, 0.1), rgba(33, 243, 211, 0.95), rgba(157, 92, 255, 0.8));
  box-shadow: 0 0 18px rgba(33, 243, 211, 0.32);
  animation: ai-progress-scan 1.4s ease-in-out infinite;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.progress-steps span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(154, 255, 237, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #dffaf6;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.processing-source-block {
  display: grid;
  gap: 10px;
}

.image-job-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.image-job-list,
.image-history-grid,
.image-result-grid,
.image-detail-grid {
  display: grid;
  gap: 12px;
}

.image-history-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.image-job-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.image-history-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(33, 243, 211, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.image-history-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-height: 150px;
  padding: 6px;
  border: 1px solid rgba(154, 255, 237, 0.14);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.42);
}

.image-history-preview img,
.image-history-preview span {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
}

.image-history-preview img {
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.image-history-preview span {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  font-size: 13px;
}

.image-history-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.image-history-body .meta-line {
  overflow-wrap: anywhere;
}

.image-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.image-detail-meta div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(154, 255, 237, 0.14);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.32);
}

.image-detail-meta strong,
.image-detail-meta span {
  display: block;
  overflow-wrap: anywhere;
}

.image-detail-meta strong {
  margin-bottom: 5px;
  color: #8deee0;
  font-size: 12px;
}

.image-detail-meta span {
  color: #eefbf8;
  font-size: 13px;
}

.image-result-grid {
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
}

.image-detail-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.image-result-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(1, 8, 10, 0.42);
  color: #dffaf6;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.image-result-card:hover {
  border-color: rgba(33, 243, 211, 0.56);
  background: rgba(33, 243, 211, 0.08);
  transform: translateY(-2px);
}

.image-result-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  object-fit: cover;
}

.image-result-card strong,
.image-result-card span {
  overflow-wrap: anywhere;
}

.image-result-card span {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.4;
}

@keyframes ai-progress-scan {
  0% {
    transform: translateX(0);
  }

  55%,
  100% {
    transform: translateX(360%);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.82);
  }

  45% {
    opacity: 1;
    transform: scale(1);
  }
}

.image-failure-list {
  margin-top: 14px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  min-width: 240px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: #171717;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.upload-standalone {
  background: var(--background);
}

body.upload-standalone .app-shell {
  display: block;
  min-height: 100vh;
}

body.upload-standalone .sidebar,
body.upload-standalone .topbar,
body.upload-standalone .stats-grid {
  display: none;
}

body.upload-standalone .main-shell {
  display: grid;
  place-items: start center;
  min-height: 100vh;
  padding: 32px 16px;
}

body.login-mode .main-shell {
  place-items: center;
  padding: 24px;
}

body.login-mode .page-root {
  width: 100%;
  place-items: center;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-card {
    margin-top: 0;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  }

  .nav-group {
    grid-column: 1 / -1;
  }

  .nav-submenu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 0;
  }

  .workspace-grid,
  .upload-grid,
  .image-processing-grid,
  .detail-image-workspace {
    grid-template-columns: 1fr;
  }

  .detail-source-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .login-stage {
    min-height: auto;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-visual {
    min-height: 260px;
  }

  .login-orbit {
    inset: 44px 28px auto auto;
    width: 136px;
  }
}

@media (max-width: 760px) {
  .main-shell,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions,
  .toolbar,
  .actions,
  .manufacturer-actions,
  .product-actions,
  .review-actions {
    justify-content: stretch;
  }

  .topbar-actions .btn,
  .toolbar .btn,
  .manufacturer-actions .small-button,
  .product-actions .small-button,
  .review-actions .small-button {
    flex: 1;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid,
  .data-grid,
  .ocr-field-grid,
  .ocr-summary-grid,
  .image-detail-meta {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar,
  .manufacturer-row,
  .product-row,
  .access-row,
  .ocr-mini-grid,
  .image-size-grid,
  .group-lab,
  .ai-hero {
    grid-template-columns: 1fr;
  }

  .detail-prompt-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-prompt-toolbar .toolbar .btn {
    flex: 1;
  }

  .image-result-head,
  .image-job-row,
  .image-job-actions,
  .field-label-row,
  .loading-head,
  .listing {
    align-items: stretch;
    flex-direction: column;
  }

  .listing-status {
    justify-items: start;
    text-align: left;
    min-width: 0;
  }

  .integration-grid {
    grid-template-columns: 1fr;
  }

  .api-service-details {
    grid-template-columns: 1fr;
  }

  .progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .thumb {
    width: 100%;
    max-width: 160px;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  body.login-mode .main-shell {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .stats-grid,
  .data-grid,
  .ocr-field-grid,
  .ocr-summary-grid,
  .image-detail-meta,
  .image-history-grid,
  .detail-prompt-grid,
  .detail-stage-list,
  .detail-output-spec,
  .nav {
    grid-template-columns: 1fr;
  }

  .dialog-backdrop {
    padding: 12px;
  }
}

.dashboard-command-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 126px;
  margin-bottom: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(33, 243, 211, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(33, 243, 211, 0.1), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 48px, rgba(255, 255, 255, 0.025) 48px 49px),
    rgba(4, 15, 20, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), var(--shadow);
}

.dashboard-command-band::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #5c8cff, #f6c66f, transparent 88%);
}

.dashboard-command-band h2 {
  margin: 4px 0 6px;
  font-size: 25px;
}

.dashboard-command-band p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.dashboard-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #b8fff3;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-live-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.dashboard-live-indicator span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(33, 243, 211, 0.1), 0 0 18px rgba(33, 243, 211, 0.7);
  animation: dashboard-pulse 1.8s ease-in-out infinite;
}

.dashboard-stats {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.dashboard-stats .stat-card {
  min-height: 112px;
  border-top: 2px solid var(--primary);
}

.dashboard-stats .stat-card:nth-child(2) { border-top-color: var(--warning); }
.dashboard-stats .stat-card:nth-child(3) { border-top-color: #5c8cff; }
.dashboard-stats .stat-card:nth-child(4) { border-top-color: var(--destructive); }
.dashboard-stats .stat-card:nth-child(5) { border-top-color: #cf8cff; }
.dashboard-stats .stat-card:nth-child(6) { border-top-color: #f6c66f; }

.dashboard-stats .stat-card em {
  color: var(--muted-foreground);
  font-size: 11px;
  font-style: normal;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: minmax(440px, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.task-matrix,
.attention-list {
  display: grid;
  gap: 2px;
}

.task-matrix-row {
  display: grid;
  grid-template-columns: 116px minmax(100px, 1fr) 48px;
  gap: 14px;
  align-items: center;
  min-height: 42px;
  color: var(--foreground);
  font-size: 13px;
  text-decoration: none;
}

.task-matrix-row:hover span {
  color: var(--primary);
}

.task-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.task-progress i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #5c8cff);
  box-shadow: 0 0 14px rgba(33, 243, 211, 0.35);
}

.task-matrix-row strong {
  text-align: right;
  font-size: 18px;
}

.attention-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 13px;
  text-decoration: none;
}

.attention-list a:last-child {
  border-bottom: 0;
}

.attention-list a:hover span {
  color: var(--primary);
}

.attention-list strong {
  color: var(--foreground);
  font-size: 22px;
}

.dashboard-task-head {
  align-items: center;
}

.dashboard-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-filter select,
.dashboard-filter input {
  width: auto;
  min-width: 128px;
}

.dashboard-filter input {
  min-width: 220px;
}

.dashboard-task-table {
  min-width: 900px;
}

.dashboard-task-table th:first-child,
.dashboard-task-table td:first-child {
  width: 132px;
}

.dashboard-task-table th:nth-child(3),
.dashboard-task-table td:nth-child(3) {
  width: 126px;
}

.dashboard-task-table th:nth-child(4),
.dashboard-task-table td:nth-child(4) {
  width: 176px;
}

.dashboard-task-title {
  display: grid;
  gap: 4px;
}

.dashboard-task-title small {
  color: var(--muted-foreground);
  line-height: 1.45;
}

.task-type-mark {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
  color: #cce7e4;
  font-size: 12px;
  font-weight: 800;
}

.task-type-product { border-left-color: #5c8cff; }
.task-type-review { border-left-color: var(--warning); }
.task-type-publish { border-left-color: #cf8cff; }
.task-type-image { border-left-color: #f6c66f; }
.task-type-xiaohongshu { border-left-color: #ff4d6a; }
.task-type-integration { border-left-color: var(--success); }
.task-type-mixed_color { border-left-color: #ff6a9d; }

.dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.dashboard-pagination > div {
  display: flex;
  gap: 8px;
}

@keyframes dashboard-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 1280px) {
  .dashboard-stats {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 820px) {
  .dashboard-command-band,
  .dashboard-task-head,
  .dashboard-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-filter {
    justify-content: stretch;
  }

  .dashboard-filter select,
  .dashboard-filter input,
  .dashboard-filter .btn {
    flex: 1 1 180px;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }

  .task-matrix-row {
    grid-template-columns: 96px minmax(80px, 1fr) 36px;
    gap: 9px;
  }

  .generation-dimension-layout,
  .generation-control-grid {
    grid-template-columns: 1fr;
  }

  .generation-canvas-preview {
    width: min(100%, 180px);
  }
}

/* Female mixed-color inventory workflow */
.mixed-color-hero {
  min-height: 152px;
}

.mixed-color-hero .toolbar {
  min-width: 190px;
}

.mixed-color-stats {
  margin-bottom: 0;
}

.mixed-color-stats .stat-card:nth-child(1) { border-top: 2px solid #5c8cff; }
.mixed-color-stats .stat-card:nth-child(2) { border-top: 2px solid var(--primary); }
.mixed-color-stats .stat-card:nth-child(3) { border-top: 2px solid #cf8cff; }
.mixed-color-stats .stat-card:nth-child(4) { border-top: 2px solid var(--warning); }

.mixed-color-job-overview .card-content {
  padding-top: 14px;
}

.mixed-color-progress {
  display: grid;
  gap: 11px;
}

.mixed-color-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mixed-color-progress-head > div {
  display: grid;
  gap: 3px;
}

.mixed-color-progress-head small,
.mixed-color-progress p,
.muted-text {
  color: var(--muted-foreground);
  font-size: 12px;
}

.mixed-color-progress-head > span {
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.mixed-color-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.mixed-color-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #5c8cff, #cf8cff);
  box-shadow: 0 0 18px rgba(33, 243, 211, 0.38);
  transition: width 0.35s ease;
}

.mixed-color-progress.is-failed .mixed-color-progress-track i {
  background: var(--destructive);
}

.mixed-color-risk-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(246, 198, 111, 0.42);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius);
  background: rgba(246, 198, 111, 0.09);
}

.mixed-color-risk-band > div {
  display: grid;
  gap: 5px;
}

.mixed-color-risk-band strong {
  color: #fff2d4;
}

.mixed-color-risk-band p,
.mixed-color-config-warning {
  color: #cdbf9f;
  font-size: 13px;
  line-height: 1.55;
}

.mixed-color-config-warning {
  padding: 12px 14px;
  border: 1px solid rgba(255, 106, 95, 0.32);
  border-radius: var(--radius);
  background: var(--destructive-soft);
  color: #ffb2aa;
}

.mixed-color-plan-head {
  align-items: center;
}

.mixed-color-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mixed-color-filter select,
.mixed-color-filter input {
  width: auto;
  min-width: 140px;
}

.mixed-color-filter input {
  min-width: 210px;
}

.mixed-color-table {
  min-width: 1280px;
}

.mixed-color-table th,
.mixed-color-table td {
  vertical-align: top;
}

.mixed-color-table th:first-child { width: 220px; }
.mixed-color-table th:nth-child(2),
.mixed-color-table th:nth-child(3),
.mixed-color-table th:nth-child(6) { width: 112px; }
.mixed-color-table th:nth-child(4) { width: 230px; }
.mixed-color-table th:nth-child(5) { width: 260px; }
.mixed-color-table th:last-child { width: 210px; }

.mixed-color-product-cell,
.mixed-color-rule-cell,
.mixed-color-status-cell,
.mixed-color-table td:nth-child(2),
.mixed-color-table td:nth-child(3) {
  display: grid;
  gap: 5px;
}

.mixed-color-product-cell small,
.mixed-color-rule-cell small,
.mixed-color-status-cell small,
.mixed-color-table td:nth-child(2) small,
.mixed-color-table td:nth-child(3) small {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.45;
}

.mixed-color-allocations {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mixed-color-allocations span {
  display: inline-flex;
  gap: 5px;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(92, 140, 255, 0.24);
  border-radius: 6px;
  background: rgba(92, 140, 255, 0.1);
  color: #bfd1ff;
  font-size: 11px;
  white-space: nowrap;
}

.mixed-color-allocations b {
  color: #eef4ff;
}

.mixed-color-add {
  color: var(--primary);
  white-space: nowrap;
}

.mixed-color-history-list {
  display: grid;
  gap: 4px;
}

.mixed-color-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
  color: inherit;
  text-decoration: none;
}

.mixed-color-history-row:last-child {
  border-bottom-color: transparent;
}

.mixed-color-history-row:hover,
.mixed-color-history-row.active {
  border-color: rgba(33, 243, 211, 0.24);
  border-radius: var(--radius);
  background: rgba(33, 243, 211, 0.07);
}

.mixed-color-history-row > span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mixed-color-history-row > span:first-child {
  display: grid;
  gap: 3px;
}

.mixed-color-history-row small {
  color: var(--muted-foreground);
  font-size: 12px;
}

#mixedColorConfirmModal {
  z-index: 70;
  background: rgba(1, 8, 10, 0.82);
  backdrop-filter: blur(12px);
}

.mixed-color-confirm-panel {
  width: min(620px, 100%);
  overflow: hidden;
  background: rgba(5, 15, 18, 0.98);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.dialog-head h2 {
  margin-top: 4px;
  font-size: 20px;
}

#mixedColorExecuteForm {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.mixed-color-confirm-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mixed-color-confirm-summary span {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.mixed-color-confirm-summary small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.mixed-color-confirm-summary strong {
  overflow-wrap: anywhere;
}

.mixed-color-risk-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(246, 198, 111, 0.32);
  border-radius: var(--radius);
  background: rgba(246, 198, 111, 0.08);
  color: #eadbb9;
  font-size: 13px;
  line-height: 1.5;
}

.mixed-color-risk-check input {
  margin-top: 2px;
}

@media (max-width: 760px) {
  .mixed-color-risk-band,
  .mixed-color-progress-head,
  .mixed-color-history-row,
  .mixed-color-history-row > span:last-child {
    align-items: stretch;
    flex-direction: column;
  }

  .mixed-color-risk-band .btn,
  .mixed-color-filter .btn,
  .mixed-color-filter select,
  .mixed-color-filter input {
    width: 100%;
  }

  .mixed-color-filter {
    justify-content: stretch;
  }

  .mixed-color-confirm-summary {
    grid-template-columns: 1fr;
  }
}

.xhs-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.xhs-subnav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid rgba(33, 243, 211, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 20, 34, 0.78);
  scrollbar-width: thin;
}

.xhs-subnav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
}

.xhs-subnav a:hover,
.xhs-subnav a.active {
  background: rgba(255, 49, 83, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 77, 106, 0.26);
}

.xhs-command-band,
.xhs-job-hero {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(33, 243, 211, 0.2);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 47px, rgba(33, 243, 211, 0.035) 48px),
    linear-gradient(120deg, rgba(8, 24, 40, 0.98), rgba(24, 20, 42, 0.96));
}

.xhs-command-band::after,
.xhs-job-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, #21f3d3, #ff3153, transparent 88%);
}

.xhs-command-band h2,
.xhs-job-hero h2 {
  margin: 5px 0 7px;
  color: #f4fbff;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.xhs-command-band p,
.xhs-job-hero p {
  margin: 0;
  color: #9bb0bf;
  font-size: 13px;
}

.xhs-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.xhs-metric {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.xhs-metric span,
.xhs-metric small {
  overflow-wrap: anywhere;
  color: var(--muted-foreground);
  font-size: 11px;
}

.xhs-metric strong {
  color: #f5fbff;
  font-size: 26px;
  line-height: 1;
}

.xhs-job-table {
  min-width: 720px;
}

.xhs-asset-ready {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(33, 243, 211, 0.1);
  color: #72f7df;
  font-size: 12px;
  font-weight: 700;
}

.xhs-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.xhs-filter-bar input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--foreground);
}

.xhs-filter-chips,
.xhs-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.xhs-filter-chips {
  margin-bottom: 14px;
}

.xhs-filter-chips a,
.xhs-tag-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-foreground);
  font-size: 12px;
}

.xhs-filter-chips a:hover,
.xhs-filter-chips a.active {
  background: rgba(255, 49, 83, 0.14);
  color: #ff8da1;
  box-shadow: inset 0 0 0 1px rgba(255, 77, 106, 0.25);
}

.xhs-hot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.xhs-hot-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.xhs-hot-head,
.xhs-hot-footer,
.xhs-copy-head,
.xhs-job-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.xhs-hot-head span {
  color: #72f7df;
  font-size: 11px;
  font-weight: 700;
}

.xhs-hot-head strong {
  color: #ff708a;
  font-size: 22px;
}

.xhs-hot-card h3 {
  margin: 0;
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0;
}

.xhs-hot-card p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.65;
}

.xhs-hot-footer {
  align-items: end;
  margin-top: auto;
}

.xhs-hot-footer small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.xhs-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.xhs-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.xhs-product-visual {
  position: sticky;
  top: 16px;
}

.xhs-image-stage {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 10px, transparent 10px 20px),
    #091521;
}

.xhs-image-stage img,
.xhs-job-assets img,
.xhs-job-assets video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.xhs-image-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 22px;
  color: var(--muted-foreground);
  text-align: center;
}

.xhs-image-empty strong {
  color: var(--foreground);
}

.xhs-image-empty span {
  font-size: 12px;
}

.xhs-upload-button {
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
}

.xhs-upload-button.is-loading {
  cursor: wait;
  opacity: 0.72;
}

.xhs-oss-hint {
  display: block;
  margin-top: 8px;
  color: #ff9eb0;
  font-size: 11px;
  line-height: 1.5;
}

.xhs-oss-hint.is-ready {
  color: #72f7df;
}

.xhs-job-state {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
}

.xhs-job-state small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.xhs-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.xhs-detail-main,
.xhs-detail-side {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.xhs-detail-side {
  position: sticky;
  top: 16px;
}

.xhs-copy-block {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.xhs-copy-block:first-child {
  padding-top: 0;
}

.xhs-copy-block:last-child {
  border-bottom: 0;
}

.xhs-copy-head strong {
  color: #72f7df;
  font-size: 12px;
}

.xhs-copy-block p {
  margin: 8px 0 0;
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.xhs-storyboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.xhs-storyboard article {
  min-width: 0;
  min-height: 116px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.xhs-storyboard article span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 49, 83, 0.15);
  color: #ff8da1;
  font-size: 12px;
  font-weight: 800;
}

.xhs-storyboard article p {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.55;
}

.xhs-job-assets {
  display: grid;
  gap: 10px;
}

.xhs-video-progress,
.xhs-video-message {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(33, 243, 211, 0.22);
  border-radius: var(--radius);
  background: rgba(33, 243, 211, 0.06);
}

.xhs-video-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.xhs-video-progress strong,
.xhs-video-message strong {
  color: var(--foreground);
  font-size: 12px;
}

.xhs-video-progress span,
.xhs-video-message span {
  overflow-wrap: anywhere;
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.5;
}

.xhs-video-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.xhs-video-progress-track i {
  width: 28%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #21f3d3, #62a7ff, #ff3153);
  box-shadow: 0 0 14px rgba(33, 243, 211, 0.32);
  animation: ai-progress-scan 1.4s ease-in-out infinite;
}

.xhs-video-message.is-error {
  border-color: rgba(255, 49, 83, 0.3);
  background: rgba(255, 49, 83, 0.08);
}

.xhs-video-message.is-error strong {
  color: #ff9eb0;
}

.xhs-video-message a {
  color: #72f7df;
  font-size: 12px;
  font-weight: 700;
}

.xhs-asset-preview,
.xhs-job-assets video {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #07111f;
}

.xhs-action-stack {
  display: grid;
  gap: 8px;
}

.xhs-action-stack .btn,
.xhs-action-stack form .btn {
  width: 100%;
}

.xhs-adapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.xhs-adapter-card {
  min-width: 0;
}

.xhs-adapter-card .card-title p {
  max-width: 54ch;
}

.xhs-adapter-card .toggle-row {
  width: fit-content;
}

@media (max-width: 1180px) {
  .xhs-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .xhs-editor-grid,
  .xhs-detail-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 920px) {
  .xhs-metric-grid,
  .xhs-adapter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .xhs-editor-grid,
  .xhs-detail-grid {
    grid-template-columns: 1fr;
  }

  .xhs-product-visual,
  .xhs-detail-side {
    position: static;
  }

  .xhs-product-visual .card-content {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(180px, 1fr);
    gap: 12px;
    align-items: end;
  }
}

@media (max-width: 620px) {
  .xhs-command-band,
  .xhs-job-hero,
  .xhs-hot-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .xhs-command-band .toolbar,
  .xhs-command-band .btn,
  .xhs-editor-actions,
  .xhs-editor-actions .btn {
    width: 100%;
  }

  .xhs-metric-grid,
  .xhs-hot-grid,
  .xhs-adapter-grid,
  .xhs-storyboard,
  .xhs-product-visual .card-content,
  .xhs-filter-bar {
    grid-template-columns: 1fr;
  }

  .xhs-job-state {
    align-items: flex-start;
  }

  .xhs-editor-actions {
    display: grid;
  }
}

/* V2.0 application shell and core operational pages */
:root {
  --v2-nav-width: 282px;
  --v2-topbar-height: 88px;
  --v2-bg: #030b0c;
  --v2-panel: #071516;
  --v2-panel-2: #091c1d;
  --v2-line: #1d5551;
  --v2-text: #effffa;
  --v2-muted: #789d99;
  --v2-cyan: #28e1c7;
  --v2-blue: #5588ff;
}

body:not(.upload-standalone) {
  height: 100vh;
  overflow: hidden;
}

body:not(.upload-standalone)::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(77, 216, 202, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 216, 202, 0.026) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
}

body:not(.upload-standalone) .app-shell {
  display: block;
  min-height: 100vh;
}

body:not(.upload-standalone) .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--v2-nav-width);
  height: 100vh;
  gap: 0;
  padding: 22px 16px;
  overflow-y: auto;
  border-right: 1px solid #1d514e;
  background: #061112;
}

body:not(.upload-standalone) .brand {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  margin: 2px 10px 24px;
  padding: 0;
}

body:not(.upload-standalone) .brand:hover {
  background: transparent;
}

body:not(.upload-standalone) .brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--v2-cyan), #6b73ff);
  color: #061112;
  box-shadow: none;
  font-size: 16px;
}

body:not(.upload-standalone) .brand-copy strong {
  color: #f4fffd;
  font-size: 16px;
}

body:not(.upload-standalone) .brand-copy small {
  color: #7fa39f;
  font-size: 12px;
}

.nav-kicker,
.nav-caption {
  color: #577b78;
  font-size: 12px;
}

.nav-kicker {
  margin: 0 12px 16px;
}

.prototype-nav {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  overflow: visible;
}

.prototype-nav .nav-caption {
  margin: 14px 12px 7px;
}

.prototype-nav .nav-caption:first-child {
  margin-top: 0;
}

.prototype-nav .nav-section {
  display: grid;
  gap: 6px;
}

.prototype-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #081819;
  color: #9ebbb7;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: none;
}

.prototype-nav .nav-item > span {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  overflow: hidden;
  background: transparent;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prototype-nav .nav-item > em {
  margin-left: auto;
  color: #6f9591;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.prototype-nav .nav-item:hover {
  border-color: #285e59;
  background: #0a1d1e;
  color: #e6faf7;
  box-shadow: none;
}

.prototype-nav .nav-item.active {
  padding-left: 11px;
  border-color: #22a894;
  border-left: 4px solid var(--v2-cyan);
  background: linear-gradient(135deg, rgba(40, 229, 207, 0.18), rgba(85, 136, 255, 0.22));
  color: #eafffb;
  font-weight: 800;
  box-shadow: none;
}

.prototype-nav .nav-item.active > span,
.prototype-nav .nav-item.active > em {
  width: auto;
  height: auto;
  background: transparent;
  color: inherit;
}

body:not(.upload-standalone) .sidebar-footer {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  padding: 13px;
  border: 1px solid #224b48;
  border-radius: 8px;
  background: #081b1c;
  color: #9db9b5;
  font-size: 11px;
  line-height: 1.65;
}

body:not(.upload-standalone) .sidebar-footer strong {
  color: var(--v2-cyan);
  font-size: 12px;
}

body:not(.upload-standalone) .main-shell {
  width: calc(100% - var(--v2-nav-width));
  height: 100vh;
  min-height: 0;
  margin-left: var(--v2-nav-width);
  padding: 0;
  display: flex;
  flex-direction: column;
}

body:not(.upload-standalone) .topbar {
  flex: 0 0 var(--v2-topbar-height);
  min-height: var(--v2-topbar-height);
  margin: 0;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  border-bottom: 1px solid #1b5955;
  background: rgba(6, 19, 20, 0.94);
}

.page-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.page-meta .eyebrow {
  color: #36dfc8;
  font-size: 12px;
  font-weight: 800;
}

.page-meta h1 {
  overflow: hidden;
  color: var(--v2-text);
  font-size: 25px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-progress {
  flex: none;
  color: var(--v2-muted);
  font-size: 13px;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.top-actions .btn,
.crumb-actions .btn {
  min-height: 42px;
  border: 1px solid #285b56;
  border-radius: 8px;
  background: #0d2a29;
  color: #b8d6d2;
  box-shadow: none;
}

.top-actions .btn:hover,
.crumb-actions .btn:hover {
  border-color: #2ed2bc;
  background: #103231;
  color: #e8fffb;
}

.top-actions .btn.primary {
  border: 0;
  background: linear-gradient(90deg, var(--v2-cyan), var(--v2-blue));
  color: #041615;
  font-weight: 900;
}

.top-actions .btn.is-validated {
  box-shadow: 0 0 0 3px rgba(40, 225, 199, 0.14);
}

.top-actions .user-chip {
  min-height: 34px;
  border-color: #244b48;
  background: #081b1c;
  color: #87aaa6;
  font-size: 11px;
}

.top-actions #logoutBtn {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 12px;
}

body:not(.upload-standalone) .workspace {
  flex: 1;
  min-height: 0;
  padding: 18px 22px 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.crumb {
  min-height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: rgba(7, 21, 22, 0.92);
  color: #89aaa6;
  font-size: 13px;
}

.crumb b {
  color: #dff8f4;
}

.crumb-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.crumb-actions .btn {
  min-height: 34px;
  padding: 0 13px;
  font-size: 12px;
}

.viewer-shell {
  position: relative;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--v2-line);
  border-radius: 16px;
  background:
    linear-gradient(rgba(40, 225, 199, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 225, 199, 0.018) 1px, transparent 1px),
    #041011;
  background-size: 44px 44px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
  scrollbar-color: #416866 #071516;
  scrollbar-width: thin;
}

body:not(.upload-standalone) .page-root {
  width: min(100%, 1740px);
  min-height: 100%;
  margin: 0 auto;
  padding: 28px 36px 44px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.viewer-shell .card,
.viewer-shell .stat-card,
.viewer-shell .empty-state {
  border-color: var(--v2-line);
  border-radius: 8px;
  background: rgba(7, 21, 22, 0.96);
  box-shadow: none;
}

.viewer-shell .card-header {
  border-color: var(--v2-line);
}

.viewer-shell .card-title p {
  color: var(--v2-muted);
}

.viewer-shell table th {
  background: #0a2928;
  color: #aee8df;
}

.viewer-shell table td,
.viewer-shell table th {
  border-color: rgba(29, 85, 81, 0.72);
}

.text-muted {
  color: var(--v2-muted);
  font-size: 12px;
}

/* Dashboard */
.v2-dashboard-command {
  min-height: 138px;
  margin: 0;
  padding: 26px 30px;
  border-color: var(--v2-line);
  background: #071516;
  box-shadow: none;
}

.v2-dashboard-command::after {
  display: none;
}

.v2-dashboard-command h2 {
  margin-top: 5px;
  font-size: 28px;
}

.v2-dashboard-command p {
  margin-top: 8px;
  color: var(--v2-muted);
}

.v2-alert-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.v2-alert-card {
  display: grid;
  align-content: start;
  min-height: 238px;
  padding: 20px 22px;
  border-width: 2px;
  background: #0b191a;
}

.v2-alert-card::before {
  display: none;
}

.v2-alert-amber {
  border-color: #bc7a0b;
  background: linear-gradient(145deg, rgba(99, 59, 4, 0.52), rgba(40, 28, 8, 0.72));
}

.v2-alert-rose {
  border-color: #bb4c59;
  background: linear-gradient(145deg, rgba(92, 25, 34, 0.48), rgba(45, 20, 24, 0.72));
}

.v2-alert-violet {
  border-color: #7561da;
  background: linear-gradient(145deg, rgba(64, 48, 132, 0.48), rgba(30, 27, 65, 0.76));
}

.v2-alert-cyan {
  border-color: #2ca9bc;
  background: linear-gradient(145deg, rgba(22, 84, 92, 0.46), rgba(12, 43, 47, 0.78));
}

.v2-alert-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.v2-alert-title > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v2-alert-title strong {
  color: #f5fffd;
  font-size: 15px;
}

.v2-alert-title small {
  color: #9db9b5;
  font-size: 11px;
  line-height: 1.4;
}

.v2-alert-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f5b83c;
  color: #3d2a05;
  font-size: 23px;
  font-weight: 900;
}

.v2-alert-rose .v2-alert-icon {
  background: #eb5f70;
  color: #401016;
}

.v2-alert-violet .v2-alert-icon {
  background: #806bed;
  color: #201745;
}

.v2-alert-cyan .v2-alert-icon {
  background: #49c5d6;
  color: #082f35;
}

.v2-alert-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 20px;
}

.v2-alert-count strong {
  color: #fff;
  font-size: 38px;
  line-height: 1;
}

.v2-alert-count span {
  color: #bdcfcc;
  font-size: 12px;
}

.v2-alert-card p {
  margin-top: 18px;
  color: #a9bfbb;
}

.v2-alert-card a {
  align-self: end;
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid currentColor;
  border-radius: 7px;
  color: #f2c767;
  text-align: center;
}

.v2-alert-rose a { color: #ff8e9a; }
.v2-alert-violet a { color: #b8a8ff; }
.v2-alert-cyan a { color: #78e4ef; }

.v2-dashboard-overview {
  grid-template-columns: minmax(520px, 1.75fr) minmax(300px, 0.85fr);
  margin: 0;
}

.v2-task-matrix .card-content,
.v2-attention-queue .card-content {
  padding: 16px 28px 24px;
}

.v2-task-matrix .task-matrix-row {
  grid-template-columns: 128px minmax(120px, 1fr) 54px;
  min-height: 52px;
}

.v2-task-matrix .task-matrix-row:nth-child(2) i { background: #f1b642; }
.v2-task-matrix .task-matrix-row:nth-child(3) i { background: #756fe5; }
.v2-task-matrix .task-matrix-row:nth-child(4) i { background: #cf78d9; }
.v2-task-matrix .task-matrix-row:nth-child(5) i { background: #66a8eb; }
.v2-task-matrix .task-matrix-row:nth-child(6) i { background: #ec776a; }
.v2-task-matrix .task-matrix-row:nth-child(7) i { background: #ff5f83; }
.v2-task-matrix .task-matrix-row:nth-child(8) i { background: #36c8a8; }

.v2-attention-queue .attention-list a {
  min-height: 58px;
}

/* Manufacturer management */
.v2-manufacturer-hero {
  min-height: 186px;
  padding: 32px 40px;
  border-color: #28645e;
  background: linear-gradient(110deg, rgba(17, 83, 75, 0.66), rgba(20, 52, 76, 0.72) 58%, rgba(62, 38, 108, 0.7));
}

.v2-manufacturer-hero::before {
  display: none;
}

.v2-manufacturer-hero h2 {
  margin-top: 10px;
  font-size: 34px;
}

.v2-manufacturer-hero p {
  margin-top: 12px;
  font-size: 15px;
}

.v2-manufacturer-hero .ai-signal {
  grid-template-columns: repeat(3, 40px);
  gap: 12px;
  min-height: 92px;
  margin-right: 18px;
}

.v2-manufacturer-stats {
  gap: 18px;
}

.v2-manufacturer-stats .stat-card {
  min-height: 126px;
  padding: 26px;
}

.v2-manufacturer-stats .stat-card span {
  font-size: 34px;
}

.v2-manufacturer-stats .stat-card small {
  margin-top: 10px;
  font-size: 14px;
}

.manufacturer-stat-group {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.manufacturer-stat-group .stat-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.manufacturer-stat-link,
.manufacturer-stat-secondary {
  min-height: 44px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.v2-manufacturer-stats .stat-card .manufacturer-stat-action {
  align-self: end;
  margin-top: 8px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.manufacturer-stat-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.manufacturer-stat-secondary strong {
  color: var(--card-foreground);
  font-size: 14px;
}

.manufacturer-stat-link:hover,
.manufacturer-stat-secondary:hover {
  border-color: var(--accent);
  background-color: color-mix(in srgb, var(--accent) 8%, transparent);
}

.manufacturer-stat-link:focus-visible,
.manufacturer-stat-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.v2-stat-cyan { border-top: 2px solid var(--v2-cyan) !important; }
.v2-stat-blue { border-top: 2px solid #5f91ff !important; }
.v2-stat-violet { border-top: 2px solid #8a6cff !important; }
.v2-stat-amber { border-top: 2px solid #eab74e !important; }

.v2-manufacturer-directory > .card-header {
  padding: 24px 28px;
  align-items: center;
}

.v2-manufacturer-directory .group-lab {
  padding: 18px 28px;
  background: #061617;
}

.v2-manufacturer-directory > .card-content:last-child {
  padding: 0 28px 28px;
}

.v2-manufacturer-row {
  gap: 16px;
  padding: 16px 18px;
  border-color: #245c57;
  background: #08191a;
}

.v2-manufacturer-row .row-title {
  margin-bottom: 12px;
}

.v2-manufacturer-row .manufacturer-name-line strong {
  font-size: 15px;
}

.v2-manufacturer-row .link-box {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-color: #285f5a;
  background: #030d0e;
  color: #d8efeb;
}

.manufacturer-bound-brands {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #9bc9c2;
  font-size: 12px;
}

.manufacturer-bound-brands-label {
  color: #d8efeb;
  font-weight: 600;
}

.manufacturer-bound-brand-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manufacturer-bound-brand {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid #248c82;
  border-radius: 999px;
  background: #0b302f;
  color: #d6fff8;
}

.manufacturer-bound-brand.is-muted {
  border-color: #536b68;
  background: #152221;
  color: #9daea9;
}

.manufacturer-bound-brand-count,
.manufacturer-bound-brands-empty {
  color: #7fa49e;
}

.v2-manufacturer-row .manufacturer-actions {
  align-self: end;
}

/* Manufacturer data */
.v2-manufacturer-data-filter > .card-header {
  padding: 24px 28px 18px;
}

.v2-manufacturer-data-filter > .card-content {
  padding: 20px 28px 24px;
}

.v2-data-filter {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(150px, 0.9fr) minmax(180px, 1.15fr) minmax(180px, 1.2fr) minmax(130px, 0.9fr) 94px;
  gap: 12px;
  align-items: end;
}

.v2-data-filter .field > span {
  color: #bfe2dd;
  font-size: 11px;
}

.v2-data-filter .btn {
  width: 100%;
  min-height: 44px;
}

.v2-quick-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.v2-quick-groups > span {
  margin-right: 4px;
  color: var(--v2-muted);
  font-size: 12px;
}

.v2-quick-groups .segment {
  min-height: 32px;
  padding: 0 13px;
  border-color: #285f5a;
  background: #092221;
  color: #a9c3c0;
  font-size: 11px;
}

.v2-quick-groups .segment b {
  color: inherit;
}

.v2-quick-groups .segment.active {
  border-color: transparent;
  background: linear-gradient(90deg, var(--v2-cyan), var(--v2-blue));
  color: #041615;
}

.v2-quick-groups .v2-manage-groups {
  background: transparent;
  color: #8ce8dc;
}

.v2-filter-summary {
  margin-top: 14px;
  padding: 9px 13px;
  border-radius: 7px;
  background: #092221;
  color: #88aaa6;
  font-size: 11px;
}

.v2-data-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.v2-data-metrics article {
  position: relative;
  min-height: 112px;
  padding: 20px 22px;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: #071516;
}

.v2-data-metrics article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--v2-cyan);
  content: "";
}

.v2-data-metrics article:nth-child(2)::before { background: #5588ff; }
.v2-data-metrics article:nth-child(3)::before { background: #9b6cff; }
.v2-data-metrics article:nth-child(4)::before { background: #e8b14b; }

.v2-data-metrics small {
  display: block;
  color: var(--v2-muted);
  font-size: 12px;
}

.v2-data-metrics strong {
  display: inline-block;
  margin-top: 10px;
  color: #f4fffd;
  font-size: 28px;
}

.v2-data-metrics span {
  margin-left: 6px;
  color: var(--v2-muted);
  font-size: 12px;
}

.v2-data-metrics .is-money strong {
  color: var(--v2-cyan);
}

.v2-manufacturer-data-results > .card-header {
  padding: 22px 26px;
}

.v2-manufacturer-data-table {
  min-width: 1120px;
}

.v2-manufacturer-data-table th,
.v2-manufacturer-data-table td {
  padding: 14px 13px;
  vertical-align: middle;
}

.v2-manufacturer-data-table tbody tr:hover {
  background: rgba(40, 225, 199, 0.04);
}

.manufacturer-delivery-count-link {
  display: inline-flex;
  min-width: 2.25rem;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: var(--v2-cyan);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  transition: color 180ms ease, background-color 180ms ease, text-decoration-color 180ms ease;
}

.manufacturer-delivery-count-link:hover {
  background: rgba(45, 212, 191, 0.12);
  color: #99f6e4;
  text-decoration-color: currentColor;
}

.manufacturer-delivery-count-link:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 2px;
}

.v2-group-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: #0c4843;
  color: #69e7d4;
  font-size: 11px;
  white-space: nowrap;
}

.v2-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--v2-muted);
  font-size: 12px;
}

.v2-table-footer > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Standalone upload and login routes keep their simplified layout. */
body.upload-standalone .main-shell {
  width: 100%;
  height: auto;
  min-height: 100vh;
  margin: 0;
  padding: 32px 16px;
  display: grid;
  place-items: start center;
}

body.upload-standalone .workspace {
  display: block;
  width: 100%;
  padding: 0;
}

body.upload-standalone .crumb {
  display: none;
}

body.upload-standalone .viewer-shell {
  width: 100%;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.upload-standalone .page-root {
  width: 100%;
  padding: 0;
}

body.login-mode .main-shell {
  place-items: center;
  padding: 24px;
}

@media (max-width: 1480px) {
  .v2-alert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-data-filter {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .v2-data-filter .btn {
    grid-column: auto;
  }
}

@media (max-width: 1180px) {
  :root {
    --v2-nav-width: 230px;
  }

  .top-actions .user-chip {
    display: none;
  }

  body:not(.upload-standalone) .page-root {
    padding: 24px 22px 38px;
  }

  .v2-dashboard-overview {
    grid-template-columns: 1fr;
  }

  .v2-manufacturer-row {
    grid-template-columns: 1fr;
  }

  .v2-manufacturer-row .manufacturer-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  body:not(.upload-standalone) {
    height: auto;
    overflow: auto;
  }

  body:not(.upload-standalone) .app-shell {
    min-height: 100vh;
  }

  body:not(.upload-standalone) .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 12px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  body:not(.upload-standalone) .brand {
    grid-template-columns: 38px minmax(0, 1fr);
    margin: 0 0 10px;
  }

  body:not(.upload-standalone) .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 12px;
  }

  .nav-kicker,
  .prototype-nav .nav-caption,
  body:not(.upload-standalone) .sidebar-footer {
    display: none;
  }

  .prototype-nav {
    display: flex;
    flex-direction: row;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .prototype-nav .nav-section {
    display: contents;
  }

  .prototype-nav .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 126px;
    padding-inline: 12px;
  }

  body:not(.upload-standalone) .main-shell {
    width: 100%;
    height: auto;
    min-height: calc(100vh - 104px);
    margin-left: 0;
  }

  body:not(.upload-standalone) .topbar {
    min-height: 82px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .page-meta {
    flex: 1 1 240px;
  }

  .page-meta h1 {
    font-size: 20px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .btn {
    min-width: 40px;
    padding-inline: 10px;
  }

  body:not(.upload-standalone) .workspace {
    display: block;
    padding: 12px;
  }

  .crumb {
    margin-bottom: 12px;
  }

  .viewer-shell {
    overflow: visible;
  }

  body:not(.upload-standalone) .page-root {
    padding: 18px 14px 30px;
  }

  .v2-dashboard-command,
  .v2-manufacturer-hero,
  .dashboard-task-head,
  .v2-table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .v2-manufacturer-hero {
    grid-template-columns: 1fr;
  }

  .v2-manufacturer-hero .ai-signal {
    display: none;
  }

  .v2-manufacturer-stats,
  .v2-data-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-data-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-table-footer > div {
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .crumb-actions,
  .page-progress,
  .top-actions .label {
    display: none;
  }

  .page-meta h1 {
    white-space: normal;
  }

  .v2-alert-grid,
  .v2-manufacturer-stats,
  .v2-data-metrics,
  .v2-data-filter {
    grid-template-columns: 1fr;
  }

  .v2-dashboard-command,
  .v2-manufacturer-hero {
    padding: 22px 18px;
  }

  .v2-dashboard-command h2,
  .v2-manufacturer-hero h2 {
    font-size: 24px;
  }

  .v2-manufacturer-directory > .card-header,
  .v2-manufacturer-data-filter > .card-header,
  .v2-manufacturer-data-results > .card-header {
    padding: 18px;
  }

  .v2-manufacturer-directory .group-lab,
  .v2-manufacturer-directory > .card-content:last-child,
  .v2-manufacturer-data-filter > .card-content {
    padding: 16px;
  }

  .v2-manufacturer-row .manufacturer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-manufacturer-row .manufacturer-actions .small-button {
    width: 100%;
  }
}

/* V2.0 visual system and mixed inventory workbench */
:root {
  --background: #030b0c;
  --foreground: #effffa;
  --card: #071516;
  --muted-foreground: #86aaa6;
  --primary: #28e1c7;
  --primary-foreground: #041615;
  --border: #1d5551;
  --input: #285f5a;
  --ring: rgba(40, 225, 199, 0.2);
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

body {
  background:
    linear-gradient(rgba(77, 216, 202, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 216, 202, 0.022) 1px, transparent 1px),
    #030b0c;
  background-size: 48px 48px;
}

.app-shell {
  grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
  overflow-y: auto;
  padding: 18px;
  border-color: #1b4d49;
  background: #061112;
  backdrop-filter: none;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(135deg, #32d9ce, #6a72ff);
  box-shadow: none;
  font-size: 18px;
}

.brand {
  grid-template-columns: 52px minmax(0, 1fr);
}

.nav a,
.nav-group summary {
  min-height: 42px;
  background: #081819;
  font-weight: 500;
}

.nav a.active,
.nav-group.active > summary {
  border: 1px solid #22a894;
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, rgba(40, 225, 199, 0.13), rgba(85, 136, 255, 0.2));
  box-shadow: none;
  font-weight: 800;
}

.main-shell {
  min-height: 100vh;
  padding: 0;
}

.topbar {
  min-height: 104px;
  margin: 0;
  padding: 24px 40px;
  border-bottom: 1px solid #1b5955;
  background: rgba(3, 13, 14, 0.96);
}

.page-root {
  gap: 18px;
  padding: 26px 30px 42px;
}

body.login-mode .page-root {
  padding: 0;
}

.page-heading h1 {
  font-size: 32px;
}

.stat-card,
.card,
.dialog-panel,
.empty-state {
  border-color: #1d5551;
  background: #071516;
  backdrop-filter: none;
  box-shadow: none;
}

.dashboard-command-band {
  min-height: 126px;
  margin-bottom: 4px;
  border-color: #1d5551;
  background: #071516;
  box-shadow: none;
}

.dashboard-command-band::after {
  display: none;
}

.mixed-workbench-hero,
.mixed-rule-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 154px;
  padding: 26px 28px;
  border: 1px solid #1d5551;
  border-radius: 8px;
  background: linear-gradient(115deg, rgba(40, 225, 199, 0.08), transparent 42%), #071516;
}

.mixed-workbench-hero > div:first-child,
.mixed-rule-hero > div:first-child {
  max-width: 760px;
}

.mixed-workbench-hero h2,
.mixed-rule-hero h2 {
  margin-top: 5px;
  font-size: 28px;
  line-height: 1.25;
}

.mixed-workbench-hero p,
.mixed-rule-hero p {
  margin-top: 9px;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.65;
}

.mixed-workbench-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  max-width: 520px;
}

.mixed-workbench-history {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.mixed-workbench-history a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #1d5551;
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 12px;
  text-decoration: none;
}

.mixed-workbench-history a.active {
  border-color: var(--primary);
  color: var(--foreground);
  background: rgba(40, 225, 199, 0.08);
}

.mixed-workbench-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mixed-workbench-metrics article {
  min-height: 104px;
  padding: 18px 20px;
  border: 1px solid #1d5551;
  border-radius: 8px;
  background: #071516;
}

.mixed-workbench-metrics small {
  display: block;
  color: var(--muted-foreground);
  font-size: 12px;
}

.mixed-workbench-metrics strong {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
  font-size: 27px;
}

.mixed-workbench-metrics em {
  margin-left: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-style: normal;
}

.mixed-inventory-stock-card .card-header {
  border-bottom: 1px solid #1d5551;
}

.mixed-inventory-source {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 18px 20px 0;
  padding: 13px 15px;
  border: 1px solid #285f5a;
  border-radius: 8px;
  background: #092221;
}

.mixed-inventory-source > span,
.mixed-master-source > div > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #0f6d60;
  color: #effffa;
  font-weight: 900;
}

.mixed-inventory-source div,
.mixed-master-source > div {
  display: grid;
  gap: 3px;
}

.mixed-inventory-source small,
.mixed-master-source small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.mixed-inventory-source code {
  color: #8ef6e5;
  font-size: 12px;
}

.mixed-inventory-fields {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.2fr 0.7fr;
  gap: 12px;
  padding: 18px 20px;
}

.mixed-inventory-fields label,
.mixed-inventory-fields > div {
  display: grid;
  gap: 7px;
}

.mixed-inventory-fields label > span,
.mixed-inventory-fields > div small {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.mixed-inventory-fields > div {
  align-content: center;
  padding: 9px 12px;
  border: 1px solid #285f5a;
  border-radius: 8px;
  background: #081b1c;
}

.mixed-inventory-fields > div strong {
  font-size: 20px;
}

.mixed-inventory-table {
  margin: 0 20px;
  overflow: hidden;
  border: 1px solid #1d5551;
  border-radius: 8px;
}

.mixed-inventory-stock-head,
.mixed-inventory-stock-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(100px, 0.7fr) minmax(130px, 0.9fr) minmax(110px, 0.7fr);
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 8px 16px;
}

.mixed-inventory-stock-head {
  min-height: 42px;
  background: #0a2928;
  color: #aee8df;
  font-size: 12px;
  font-weight: 800;
}

.mixed-inventory-stock-row {
  border-top: 1px solid rgba(29, 85, 81, 0.72);
}

.mixed-inventory-stock-row.is-mixed {
  background: rgba(40, 225, 199, 0.075);
}

.mixed-inventory-stock-row.is-excluded {
  color: #718f8c;
}

.mixed-inventory-color {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mixed-inventory-color small {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(40, 225, 199, 0.1);
  color: #79d8ca;
  font-size: 10px;
}

.mixed-inventory-current,
.mixed-inventory-final {
  font-size: 17px;
  font-weight: 800;
}

.mixed-inventory-final.is-changed {
  color: var(--primary);
}

.mixed-inventory-final.is-invalid {
  color: var(--destructive);
}

.mixed-inventory-change {
  max-width: 150px;
  text-align: center;
  font-weight: 800;
}

.mixed-inventory-change.is-positive {
  color: var(--primary);
}

.mixed-inventory-change.is-negative {
  color: #ffb75c;
}

.mixed-inventory-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 20px 0;
}

.mixed-inventory-checks > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #285f5a;
  border-radius: 8px;
  color: #a9c4c0;
  font-size: 11px;
  line-height: 1.4;
}

.mixed-inventory-checks > div span {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-weight: 900;
}

.mixed-inventory-checks .is-pass span {
  background: rgba(40, 225, 199, 0.15);
  color: var(--primary);
}

.mixed-inventory-checks .is-fail {
  border-color: rgba(255, 106, 95, 0.42);
  color: #ffc0bb;
}

.mixed-inventory-checks .is-fail span {
  background: rgba(255, 106, 95, 0.14);
  color: var(--destructive);
}

.mixed-inventory-reason {
  margin: 14px 20px 0;
  padding: 11px 13px;
  border: 1px solid rgba(246, 198, 111, 0.36);
  border-radius: 8px;
  background: rgba(246, 198, 111, 0.08);
  color: #f4d28f;
  font-size: 13px;
}

.mixed-inventory-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 18px 20px 20px;
}

.mixed-workbench-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.mixed-sales-total {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.mixed-sales-total small,
.mixed-sales-total span {
  color: var(--muted-foreground);
  font-size: 11px;
}

.mixed-sales-total strong {
  color: var(--primary);
  font-size: 22px;
}

.mixed-sales-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(38px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 174px;
  padding: 22px 20px 16px;
}

.mixed-sales-chart > div {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.mixed-sales-chart span,
.mixed-sales-chart small {
  color: var(--muted-foreground);
  font-size: 10px;
}

.mixed-sales-chart i {
  display: block;
  width: min(34px, 75%);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #28e1c7, #5588ff);
}

.mixed-sales-empty-note {
  margin: 0 20px 18px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #092221;
  color: var(--muted-foreground);
  font-size: 11px;
}

.mixed-reminder-list {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
}

.mixed-reminder-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid #1d5551;
  border-radius: 8px;
  background: #081819;
}

.mixed-reminder-row.is-current {
  border-color: #d59533;
  background: rgba(213, 149, 51, 0.08);
}

.mixed-reminder-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(246, 198, 111, 0.14);
  color: var(--warning);
  font-weight: 900;
}

.mixed-reminder-row > div:nth-child(2) {
  display: grid;
  gap: 4px;
}

.mixed-reminder-row small,
.mixed-reminder-row em {
  color: var(--muted-foreground);
  font-size: 11px;
  font-style: normal;
}

.mixed-reminder-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mixed-reminder-actions select {
  width: 104px;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 11px;
}

.mixed-master-source,
.mixed-master-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 20px;
}

.mixed-master-source > div {
  display: grid;
  grid-template-columns: 38px auto;
  column-gap: 10px;
}

.mixed-master-source > div > span {
  grid-row: 1 / 3;
}

.mixed-master-table {
  min-width: 1040px;
}

.mixed-master-table th:first-child,
.mixed-master-table td:first-child {
  width: 48px;
  text-align: center;
}

.mixed-master-table code {
  color: #94c3bd;
  font-size: 11px;
}

.mixed-positive {
  color: var(--primary);
  font-weight: 900;
}

.mixed-master-deductions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mixed-master-deductions span,
.mixed-rule-tags span,
.rule-reference {
  padding: 4px 7px;
  border-radius: 6px;
  background: #0a2928;
  color: #9bcac4;
  font-size: 10px;
}

.mixed-master-footer > div:last-child {
  display: flex;
  gap: 8px;
}

.mixed-confirm-warning {
  margin-bottom: 15px;
  padding: 11px 12px;
  border: 1px solid rgba(246, 198, 111, 0.36);
  border-radius: 8px;
  background: rgba(246, 198, 111, 0.08);
  color: #f5d899;
  font-size: 12px;
  line-height: 1.5;
}

.back-link {
  display: inline-block;
  margin-bottom: 15px;
  color: #9adbd2;
  font-size: 12px;
  text-decoration: none;
}

.mixed-rule-metrics {
  display: grid;
  grid-template-columns: repeat(2, 130px);
  gap: 10px;
}

.mixed-rule-metrics span {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid #285f5a;
  border-radius: 8px;
  background: rgba(40, 225, 199, 0.055);
}

.mixed-rule-metrics strong {
  font-size: 24px;
}

.mixed-rule-metrics small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.mixed-rule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid #1d5551;
}

.mixed-rule-toolbar form {
  display: flex;
  gap: 8px;
  width: min(680px, 100%);
}

.mixed-rule-toolbar form input {
  flex: 1;
}

.mixed-rule-toolbar form select {
  width: 145px;
}

.mixed-rule-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-bottom: 1px solid #1d5551;
  background: #081819;
  color: var(--muted-foreground);
  font-size: 12px;
}

.mixed-rule-notice span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.mixed-workflow-rule-list {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
}

.mixed-workflow-rule {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid #1d5551;
  border-radius: 8px;
  background: #081819;
}

.mixed-workflow-rule.is-disabled {
  opacity: 0.62;
}

.mixed-rule-priority {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(40, 225, 199, 0.12);
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.mixed-rule-copy {
  display: grid;
  gap: 7px;
}

.mixed-rule-title,
.mixed-rule-actions,
.mixed-rule-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.mixed-rule-title h3 {
  margin-right: 3px;
  font-size: 16px;
}

.mixed-rule-copy p {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.55;
}

.small-button.primary {
  border-color: var(--primary);
  color: var(--primary);
}

.small-button.danger {
  border-color: rgba(255, 106, 95, 0.35);
  color: #ff8f86;
}

.mixed-rule-legacy-note {
  margin: 0 18px 18px;
  padding: 10px 12px;
  border: 1px solid #285f5a;
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.mixed-rule-editor {
  width: min(900px, 100%);
  max-height: 92vh;
  overflow: auto;
}

.mixed-rule-editor-body {
  display: grid;
  gap: 18px;
  padding: 18px 20px;
}

.mixed-rule-parameter-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #1d5551;
  border-radius: 8px;
  background: #081819;
}

.mixed-rule-parameter-block > div:first-child {
  display: grid;
  gap: 4px;
}

.mixed-rule-parameter-block small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.mixed-rule-parameter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

@media (max-width: 1280px) {
  .mixed-inventory-fields,
  .mixed-inventory-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mixed-rule-parameter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 20px 24px;
  }

  .page-root {
    padding: 22px 20px 36px;
  }

  .mixed-workbench-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mixed-workbench-hero,
  .mixed-rule-hero,
  .mixed-rule-toolbar,
  .mixed-master-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .mixed-workbench-hero-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .mixed-workbench-support-grid {
    grid-template-columns: 1fr;
  }

  .mixed-workflow-rule {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .mixed-rule-actions {
    grid-column: 2;
  }

  .mixed-rule-toolbar form {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .sidebar {
    gap: 10px;
    padding: 12px;
    overflow: hidden;
  }

  .sidebar .brand {
    margin: 0;
    padding: 4px;
  }

  .sidebar-card {
    display: none;
  }

  .nav {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
  }

  .nav > a,
  .nav > .nav-group {
    flex: 0 0 auto;
  }

  .nav > a,
  .nav-group summary {
    min-width: 132px;
  }

  .nav-group {
    display: block;
    grid-column: auto;
  }

  .nav-submenu {
    display: flex;
    gap: 6px;
    margin: 6px 0 0;
    padding: 0;
    border-left: 0;
  }

  .nav-submenu a {
    min-width: 124px;
  }

  .topbar {
    padding: 18px 16px;
  }

  .page-root {
    padding: 16px 12px 30px;
  }

  .mixed-workbench-hero,
  .mixed-rule-hero {
    padding: 20px 16px;
  }

  .mixed-workbench-hero h2,
  .mixed-rule-hero h2 {
    font-size: 22px;
  }

  .mixed-workbench-metrics,
  .mixed-inventory-fields,
  .mixed-inventory-checks,
  .mixed-rule-parameter-grid {
    grid-template-columns: 1fr;
  }

  .mixed-inventory-source {
    grid-template-columns: 38px minmax(0, 1fr);
    margin-inline: 12px;
  }

  .mixed-inventory-source code {
    grid-column: 1 / -1;
  }

  .mixed-inventory-fields,
  .mixed-inventory-checks {
    padding-inline: 12px;
  }

  .mixed-inventory-table {
    margin-inline: 12px;
    overflow-x: auto;
  }

  .mixed-inventory-stock-head,
  .mixed-inventory-stock-row {
    min-width: 620px;
  }

  .mixed-inventory-actions,
  .mixed-master-footer > div:last-child,
  .mixed-rule-toolbar form,
  .mixed-reminder-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mixed-inventory-actions .btn,
  .mixed-master-footer .btn,
  .mixed-rule-toolbar .btn,
  .mixed-rule-toolbar form select,
  .mixed-reminder-actions select,
  .mixed-reminder-actions .small-button {
    width: 100%;
    max-width: none;
  }

  .mixed-reminder-row,
  .mixed-workflow-rule {
    grid-template-columns: 1fr;
  }

  .mixed-reminder-mark,
  .mixed-rule-actions {
    grid-column: 1;
  }

  .mixed-rule-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Delivery-note supplement workflow */
.manufacturer-supplement-upload {
  display: block;
  padding: 16px;
  border: 1px solid rgba(245, 183, 63, .42);
  border-radius: 10px;
  background: rgba(245, 183, 63, .055);
}

.manufacturer-supplement-upload.is-optional {
  border-color: rgba(44, 226, 208, .34);
  background: rgba(44, 226, 208, .045);
}

.manufacturer-supplement-head,
.delivery-supplement-version-head,
.delivery-supplement-actions,
.delivery-supplement-confirm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.manufacturer-supplement-head {
  list-style: none;
  cursor: pointer;
  border-radius: 7px;
}
.manufacturer-supplement-head::-webkit-details-marker { display: none; }
.manufacturer-supplement-head:focus-visible { outline: 2px solid var(--upload-cyan); outline-offset: 5px; }
.manufacturer-supplement-head > div { display: grid; gap: 4px; }
.manufacturer-supplement-head span { color: var(--upload-amber); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.manufacturer-supplement-head h3 { margin: 0; color: #effffc; font-size: 15px; }
.manufacturer-supplement-head p { margin: 0; color: var(--upload-muted); font-size: 11px; line-height: 1.55; }
.manufacturer-supplement-head em { padding: 7px 10px; border-radius: 999px; color: var(--upload-amber); background: rgba(245, 183, 63, .12); font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.manufacturer-supplement-upload.is-optional .manufacturer-supplement-head em { color: var(--upload-cyan); background: rgba(44, 226, 208, .1); }
.manufacturer-supplement-summary-status { display: flex !important; align-items: center; gap: 9px !important; }
.manufacturer-supplement-summary-status i { color: var(--upload-muted); font-size: 18px; font-style: normal; transition: transform .18s ease; }
.manufacturer-supplement-upload[open] .manufacturer-supplement-summary-status i { transform: rotate(180deg); }
.manufacturer-supplement-body { display: grid; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(245, 183, 63, .2); }
.manufacturer-supplement-upload.is-optional .manufacturer-supplement-body { border-top-color: rgba(44, 226, 208, .18); }

.manufacturer-supplement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manufacturer-supplement-grid .field,
.manufacturer-supplement-confirmations label,
.delivery-supplement-binding-list label,
.delivery-supplement-confirm-footer label { display: grid; gap: 6px; }
.manufacturer-supplement-grid .field > span,
.manufacturer-supplement-confirmations span,
.delivery-supplement-binding-list label > span,
.delivery-supplement-confirm-footer span { color: #9bb4b0; font-size: 11px; }
.manufacturer-supplement-grid .field-wide { grid-column: 1 / -1; }
.manufacturer-supplement-grid input,
.manufacturer-supplement-grid select,
.manufacturer-supplement-grid textarea,
.manufacturer-supplement-confirmations input,
.delivery-supplement-binding-list input,
.delivery-supplement-binding-list select,
.delivery-supplement-confirm-footer input { width: 100%; }

.manufacturer-supplement-confirmations {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(245, 183, 63, .2);
}
.manufacturer-supplement-confirmations > label:not(:last-child) { grid-template-columns: auto 1fr; align-items: center; color: #bad0cc; font-size: 11px; }
.manufacturer-supplement-confirmations input[type="checkbox"] { width: auto; }

.delivery-supplement-version { position: relative; }
.delivery-supplement-version.is-superseded { opacity: .78; border-color: rgba(132, 158, 154, .24); }
.delivery-supplement-version.is-deleted { opacity: .68; border-style: dashed; }
.delivery-supplement-version-head > div { display: grid; gap: 4px; }
.delivery-supplement-version-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.delivery-supplement-version-meta span { padding: 5px 8px; border: 1px solid rgba(40, 225, 199, .18); border-radius: 999px; background: rgba(40, 225, 199, .04); }
.delivery-supplement-issues { display: grid; gap: 6px; margin: 0; padding: 10px 10px 10px 28px; border-radius: 7px; color: #ffc0ba; background: rgba(255, 103, 91, .08); font-size: 12px; }
.delivery-supplement-actions { justify-content: flex-end; }

.delivery-supplement-binding-list { display: grid; gap: 12px; }
.delivery-supplement-binding-list fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(245, 183, 63, .3);
  border-radius: 8px;
  background: rgba(245, 183, 63, .045);
}
.delivery-supplement-binding-list legend { padding: 0 7px; color: #f4d38c; font-size: 12px; font-weight: 800; }
.delivery-supplement-binding-list .field-wide,
.delivery-supplement-binding-list small { grid-column: 1 / -1; }
.delivery-supplement-binding-list small { color: #8aa9a5; }
.delivery-supplement-confirm-footer label { flex: 1; }
.delivery-supplement-confirm-footer .btn { flex: 0 0 auto; }
.delivery-supplement-source-rows { display: grid; gap: 6px; padding: 10px; border: 1px solid rgba(44, 226, 208, .2); border-radius: 7px; background: rgba(44, 226, 208, .04); }
.delivery-supplement-source-rows span { color: #9bb4b0; font-size: 11px; }
.delivery-supplement-source-rows strong { color: #d8f8f3; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }

.delivery-color-report-card { overflow: hidden; }
.delivery-color-report-card.is-formal { border-color: rgba(44, 226, 208, .34); }
.delivery-color-report-card.is-partial { border-color: rgba(245, 183, 63, .4); }
.delivery-color-report-card.is-pending { border-color: rgba(132, 158, 154, .25); }
.delivery-color-report-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; }
.delivery-color-report-meta span { display: grid; gap: 4px; min-width: 0; }
.delivery-color-report-meta small { color: #8fa9a5; font-size: 10px; }
.delivery-color-report-meta strong { color: #e7f5f3; font-size: 13px; overflow-wrap: anywhere; }
.delivery-color-compare-table td small,
.delivery-color-detail-table td small { display: block; max-width: 260px; color: #8fa9a5; line-height: 1.5; overflow-wrap: anywhere; }
.delivery-color-report-history { margin: 0 18px 18px; border-top: 1px solid rgba(132, 158, 154, .18); }
.delivery-color-report-history > summary { padding: 14px 0 0; color: #a9c4c0; cursor: pointer; font-size: 12px; font-weight: 700; }
.delivery-color-report-history > div { display: grid; gap: 8px; padding-top: 12px; }
.delivery-color-report-history article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 11px 12px; border: 1px solid rgba(132, 158, 154, .18); border-radius: 7px; background: rgba(8, 20, 23, .3); }
.delivery-color-report-history article > div { display: grid; gap: 3px; }
.delivery-color-report-history article strong { color: #dff3f0; font-size: 12px; }
.delivery-color-report-history article span,
.delivery-color-report-history article p { color: #8fa9a5; font-size: 11px; }
.delivery-color-report-history article p { grid-column: 1 / -1; margin: 0; line-height: 1.5; }

@media (max-width: 680px) {
  .manufacturer-supplement-head,
  .delivery-supplement-version-head,
  .delivery-supplement-confirm-footer { align-items: stretch; flex-direction: column; }
  .manufacturer-supplement-grid,
  .delivery-supplement-binding-list fieldset { grid-template-columns: 1fr; }
  .delivery-color-report-meta { grid-template-columns: 1fr 1fr; }
  .manufacturer-supplement-grid .field-wide,
  .delivery-supplement-binding-list .field-wide,
  .delivery-supplement-binding-list small { grid-column: auto; }
  .delivery-supplement-confirm-footer .btn { width: 100%; }
}

@media (max-width: 520px) {
  .delivery-color-report-meta { grid-template-columns: 1fr; }
  .delivery-color-report-history article { grid-template-columns: 1fr; }
  .delivery-color-report-history article p { grid-column: auto; }
}

@media print {
  .sidebar,
  .topbar,
  .mixed-workbench-hero,
  .mixed-workbench-history,
  .mixed-workbench-metrics,
  .mixed-inventory-stock-card,
  .mixed-workbench-support-grid,
  .mixed-master-source .btn,
  .mixed-master-footer .btn,
  .toast {
    display: none !important;
  }

  .app-shell,
  .main-shell,
  .page-root {
    display: block;
    padding: 0;
    background: #fff;
  }

  .mixed-inventory-master {
    border: 0;
    color: #111;
    background: #fff;
  }

  .mixed-master-table {
    min-width: 0;
    color: #111;
  }
}

/* Product classification */
body.product-category-mode .viewer-shell,
body.product-category-mode .page-root {
  background: #f3f6fa;
}

body.product-category-mode .page-root {
  overflow: visible;
  padding: 0;
}

.product-category-page {
  --pc-blue: #1f66d5;
  --pc-blue-soft: #eaf2ff;
  --pc-line: #d7e0eb;
  --pc-ink: #15395f;
  --pc-muted: #70849e;
  min-height: 720px;
  padding: 14px;
  color: var(--pc-ink);
  background: #f3f6fa;
}

.product-category-page-head,
.product-category-summary,
.product-category-tree,
.product-category-detail-card,
.product-category-products-card {
  border: 1px solid var(--pc-line);
  background: #fff;
  box-shadow: 0 2px 8px rgba(26, 57, 91, 0.06);
}

.product-category-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
}

.product-category-page-head h2,
.product-category-detail-title h2,
.product-category-unassigned-head h2 {
  margin: 3px 0 0;
  color: #102f50;
  font-size: 20px;
}

.product-category-page-head p,
.product-category-detail-title p,
.product-category-unassigned-head p {
  margin: 5px 0 0;
  color: var(--pc-muted);
  font-size: 11px;
}

.product-category-page-head > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-category-connection {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #137954;
  background: #e5f6ef;
  font-size: 10px;
  white-space: nowrap;
}

.product-category-connection.is-off {
  color: #758498;
  background: #edf0f4;
}

.product-category-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(180px, auto);
  margin-top: 10px;
}

.product-category-summary article {
  padding: 11px 14px;
  border-right: 1px solid var(--pc-line);
}

.product-category-summary article span,
.product-category-summary p {
  color: var(--pc-muted);
  font-size: 10px;
}

.product-category-summary article strong {
  display: block;
  margin-top: 5px;
  color: #183e66;
  font-size: 22px;
}

.product-category-summary article.is-warning strong {
  color: #b76d00;
}

.product-category-summary p {
  align-self: center;
  margin: 0;
  padding: 0 14px;
  text-align: right;
}

.product-category-notice {
  margin-top: 10px;
  padding: 11px 14px;
  border-left: 4px solid var(--pc-blue);
  color: #375c84;
  background: #eef4fb;
  font-size: 11px;
}

.product-category-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 11px;
  margin-top: 10px;
}

.product-category-tree {
  min-width: 0;
}

.product-category-tree > header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--pc-line);
}

.product-category-tree > header strong,
.product-category-tree > header small {
  display: block;
}

.product-category-tree > header small {
  margin-top: 3px;
  color: var(--pc-muted);
  font-size: 10px;
}

.product-category-tree-scroll {
  max-height: 680px;
  overflow: auto;
  padding: 8px;
}

.product-category-node {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #23496f;
  background: transparent;
  text-align: left;
}

.product-category-node:hover,
.product-category-node:focus-within {
  background: #f4f8fd;
}

.product-category-node.is-active {
  border-color: #81acea;
  background: var(--pc-blue-soft);
}

.product-category-node-main {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.product-category-node-arrow {
  width: 28px;
  height: 32px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #547aa3;
  background: transparent;
  font-size: 16px;
}

.product-category-node-arrow:not(.is-static):hover {
  color: var(--pc-blue);
  background: #dfeaff;
}

.product-category-node-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #a96a00;
  background: #fff0bf;
  font-size: 10px;
  font-weight: 800;
}

.product-category-node-copy {
  min-width: 0;
  flex: 1;
}

.product-category-node-copy strong,
.product-category-node-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-category-node-copy strong {
  font-size: 12px;
}

.product-category-node-copy small {
  margin-top: 4px;
  color: var(--pc-muted);
  font-size: 9px;
}

.product-category-count {
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #2564b8;
  background: #edf4ff;
  font-size: 9px;
}

.product-category-count.is-warning {
  color: #9b6100;
  background: #fff4d5;
}

.product-category-tree-children {
  margin-left: 18px;
  border-left: 1px dashed #d1dce8;
}

.product-category-child {
  padding-left: 8px;
}

.product-category-detail {
  min-width: 0;
}

.product-category-detail-card,
.product-category-unassigned-head {
  padding: 12px 14px;
}

.product-category-detail-title,
.product-category-unassigned-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-category-settings-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(160px, 0.8fr) auto auto;
  gap: 11px;
  align-items: end;
  margin-top: 11px;
}

.product-category-settings-grid label > span {
  display: block;
  margin-bottom: 5px;
  color: #60758d;
  font-size: 10px;
}

.product-category-settings-grid input,
.product-category-toolbar input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #bac9da;
  border-radius: 5px;
  color: #173d65;
  background: #fff;
}

.product-category-switch {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.product-category-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--pc-blue);
}

.product-category-switch > span {
  margin: 0 !important;
  color: #315579 !important;
  font-size: 11px !important;
}

.product-category-products-card {
  margin-top: 10px;
}

.product-category-products-card > header {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--pc-line);
}

.product-category-products-card > header > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.product-category-products-card > header strong,
.product-category-products-card > header small {
  display: block;
}

.product-category-products-card > header small {
  margin-top: 4px;
  color: var(--pc-muted);
  font-size: 9px;
}

.product-category-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
}

.product-category-toolbar input {
  max-width: 560px;
}

.product-category-table-wrap {
  overflow: auto;
  padding: 0 10px;
}

.product-category-table-wrap table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.product-category-table-wrap th {
  height: 42px;
  padding: 0 9px;
  border-bottom: 1px solid var(--pc-line);
  color: #536d89;
  background: #f4f7fb;
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
}

body.product-category-mode .viewer-shell .product-category-table-wrap th {
  color: #536d89;
  background: #f4f7fb;
  border-color: var(--pc-line);
}

body.product-category-mode .viewer-shell .product-category-table-wrap td {
  border-color: #e2e9f1;
}

.product-category-table-wrap td {
  height: 57px;
  padding: 8px 9px;
  border-bottom: 1px solid #e2e9f1;
  color: #234a71;
  font-size: 10px;
  vertical-align: middle;
}

.product-category-code {
  color: #154477;
}

.product-category-product-name {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 0;
  border: 0;
  color: #153f6e;
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.product-category-table-wrap td small {
  display: block;
  margin-top: 3px;
  color: #8092a7;
}

.product-category-table-wrap td.is-stockout {
  color: #b66b00;
  font-weight: 800;
}

.product-category-sku-row td {
  height: auto;
  background: #f7f9fc;
}

.product-category-sku-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 8px 50px;
}

.product-category-sku-grid article {
  position: relative;
  min-height: 52px;
  padding: 8px 44px 8px 9px;
  border: 1px solid #d8e2ed;
  border-radius: 5px;
  background: #fff;
}

.product-category-sku-grid article span,
.product-category-sku-grid article small {
  display: block;
}

.product-category-sku-grid article strong {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
}

.product-category-empty {
  padding: 38px 15px;
  text-align: center;
}

.product-category-empty strong,
.product-category-empty span {
  display: block;
}

.product-category-empty span {
  margin-top: 5px;
  color: var(--pc-muted);
}

.product-category-products-card > footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 13px;
  color: var(--pc-muted);
  font-size: 9px;
}

@media (max-width: 1280px) {
  .product-category-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .product-category-summary { grid-template-columns: repeat(4, 1fr); }
  .product-category-summary p { grid-column: 1 / -1; padding: 8px 14px; border-top: 1px solid var(--pc-line); text-align: left; }
  .product-category-settings-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .product-category-page-head { align-items: flex-start; flex-direction: column; }
  .product-category-page-head > div:last-child { justify-content: flex-start; }
  .product-category-layout { grid-template-columns: 1fr; }
  .product-category-tree-scroll { max-height: 300px; }
}

@media (max-width: 600px) {
  .product-category-page { padding: 9px; }
  .product-category-summary { grid-template-columns: repeat(2, 1fr); }
  .product-category-settings-grid { grid-template-columns: 1fr; }
  .product-category-toolbar,
  .product-category-products-card > header,
  .product-category-products-card > footer { align-items: stretch; flex-direction: column; }
  .product-category-sku-grid { grid-template-columns: 1fr; padding: 8px; }
}

/* Snapshot-only product classification refinements. */
.product-category-readonly-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 0;
}

.product-category-readonly-fields div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--pc-line);
  border-radius: 6px;
  background: #f8fbff;
}

.product-category-readonly-fields dt {
  color: #536b86;
  font-size: 12px;
  font-weight: 700;
}

.product-category-readonly-fields dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #15395f;
  font-size: 13px;
  line-height: 1.45;
}

.product-category-page button,
.product-category-page input {
  min-height: 44px;
}

.product-category-page button:focus-visible,
.product-category-page input:focus-visible {
  outline: 2px solid #1f66d5;
  outline-offset: 2px;
}

.product-category-node-main,
.product-category-product-name {
  cursor: pointer;
}

.product-category-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .product-category-page {
    min-width: 0;
    padding: 12px;
  }

  .product-category-page p,
  .product-category-page input,
  .product-category-page button,
  .product-category-page .product-category-toolbar {
    font-size: 16px;
  }

  .product-category-tree strong,
  .product-category-tree small,
  .product-category-summary span,
  .product-category-summary p,
  .product-category-summary strong,
  .product-category-table-wrap th,
  .product-category-table-wrap td,
  .product-category-readonly-fields dt,
  .product-category-readonly-fields dd,
  .product-category-sku-grid article,
  .product-category-sku-grid article span,
  .product-category-sku-grid article small,
  .product-category-sku-grid article strong,
  .product-category-connection,
  .product-category-products-card > header,
  .product-category-products-card > header strong,
  .product-category-products-card > header small,
  .product-category-empty strong,
  .product-category-empty span {
    font-size: 16px;
  }

  .product-category-layout,
  .product-category-readonly-fields,
  .product-category-settings-grid {
    grid-template-columns: 1fr;
  }

  .product-category-page-head > div:last-child,
  .product-category-page-head > div:last-child .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-category-page *,
  .product-category-page *::before,
  .product-category-page *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
  }
}

/* Multi-page delivery-note integrity gate */
.delivery-document-safety {
  overflow: hidden;
  border: 1px solid #f0c9c5;
}

.delivery-document-safety.is-ready {
  border-color: #b9dfd2;
}

.delivery-document-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #e8edf3;
  border-block: 1px solid #e8edf3;
}

.delivery-document-metrics > div {
  min-width: 0;
  padding: 18px 20px;
  background: #fff;
}

.delivery-document-metrics span,
.delivery-document-metrics small {
  display: block;
  color: #64748b;
}

.delivery-document-metrics strong {
  display: block;
  margin: 7px 0 5px;
  color: #172033;
  font-size: 18px;
}

.delivery-document-metrics small {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.6;
  text-overflow: ellipsis;
}

.delivery-document-blockers,
.delivery-document-pass {
  margin: 18px 20px;
  padding: 14px 16px;
  border-radius: 10px;
}

.delivery-document-blockers {
  color: #8a2d26;
  background: #fff4f2;
  border: 1px solid #f4c8c3;
}

.delivery-document-blockers ul {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.delivery-document-pass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #196449;
  background: #effaf6;
  border: 1px solid #c8e9dd;
}

.delivery-critical-conflicts {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
}

.delivery-critical-conflict {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #f0d0cc;
  border-radius: 12px;
  background: #fffaf9;
}

.delivery-critical-conflict.is-resolved {
  border-color: #b9dfd2;
  background: #f7fcfa;
}

.delivery-critical-crop {
  height: 96px;
  overflow: hidden;
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  background: #f4f6f8;
}

.delivery-critical-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.delivery-critical-crop span {
  display: grid;
  height: 100%;
  place-items: center;
  color: #64748b;
  font-size: 12px;
}

.delivery-critical-copy > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.delivery-critical-copy p {
  margin: 7px 0 4px;
  color: #334155;
  line-height: 1.55;
}

.delivery-critical-copy small {
  color: #64748b;
}

.delivery-critical-conflict fieldset {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.delivery-critical-retry {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: #8a2d26;
  border: 1px solid #f0d0cc;
  border-radius: 8px;
  background: #fff;
}

.delivery-critical-retry span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.delivery-critical-conflict legend {
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
}

.delivery-critical-conflict label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.delivery-critical-conflict label:focus-within {
  outline: 2px solid #315c9c;
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .delivery-document-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-critical-conflict {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .delivery-critical-conflict fieldset {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .delivery-document-metrics,
  .delivery-critical-conflict {
    grid-template-columns: 1fr;
  }

  .delivery-critical-conflict fieldset {
    grid-column: auto;
  }

  .delivery-document-pass {
    align-items: flex-start;
    flex-direction: column;
  }
}

.inventory-sync-page {
  display: grid;
  gap: 18px;
}

.inventory-sync-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at 86% 20%, rgba(33, 243, 211, 0.14), transparent 32%),
    var(--card);
}

.inventory-sync-hero h2 {
  margin-top: 5px;
  font-size: clamp(22px, 2.5vw, 32px);
}

.inventory-sync-hero p,
.inventory-issues-panel .card-title p {
  margin-top: 8px;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.inventory-sync-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.inventory-sync-freshness,
.inventory-sync-metrics {
  display: grid;
  gap: 14px;
}

.inventory-sync-freshness {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-sync-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.inventory-sync-freshness > .card,
.inventory-sync-metrics > .card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 18px;
}

.inventory-sync-freshness span,
.inventory-sync-metrics span {
  color: var(--muted-foreground);
  font-size: 12px;
}

.inventory-sync-freshness strong {
  font-size: 17px;
}

.inventory-sync-metrics strong {
  color: var(--primary);
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1;
}

.inventory-sync-freshness small,
.inventory-sync-metrics small {
  overflow-wrap: anywhere;
  color: var(--muted-foreground);
  line-height: 1.45;
}

.inventory-ok {
  color: var(--success) !important;
}

.inventory-warn,
.inventory-negative {
  color: var(--warning) !important;
}

.inventory-progress-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(240px, 1fr) 54px;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.inventory-progress-card > div:first-child {
  display: grid;
  gap: 4px;
}

.inventory-progress-card span,
.inventory-progress-card small {
  color: var(--muted-foreground);
}

.inventory-progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.inventory-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #9d5cff);
  box-shadow: 0 0 18px rgba(33, 243, 211, 0.45);
  transition: width 0.25s ease;
}

.inventory-sync-alert {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 106, 95, 0.38);
  border-radius: var(--radius);
  background: var(--destructive-soft);
}

.inventory-sync-alert strong {
  color: var(--destructive);
}

.inventory-sync-alert small {
  color: var(--muted-foreground);
}

.inventory-issues-panel,
.inventory-run-history {
  overflow: hidden;
}

.inventory-issue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.inventory-issue-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.inventory-issue-card:hover,
.inventory-issue-card.is-active {
  border-color: var(--primary);
  background: rgba(33, 243, 211, 0.08);
  transform: translateY(-1px);
}

.inventory-issue-card span,
.inventory-issue-card small {
  overflow-wrap: anywhere;
  color: var(--muted-foreground);
}

.inventory-issue-card strong {
  font-size: 25px;
}

.inventory-issue-detail {
  border-top: 1px solid var(--border);
  padding: 18px;
}

.inventory-issue-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.inventory-sync-empty {
  padding: 26px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  text-align: center;
}

.inventory-sync-page code {
  color: #c8fff7;
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .inventory-sync-metrics,
  .inventory-issue-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .inventory-sync-hero,
  .inventory-sync-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-sync-freshness,
  .inventory-sync-metrics,
  .inventory-issue-grid {
    grid-template-columns: 1fr;
  }

  .inventory-progress-card {
    grid-template-columns: 1fr;
  }
}

/* Mixed inventory document, location provenance, and task history */
.mixed-workbench-hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  min-width: 176px;
  max-width: 220px;
}

.mixed-workbench-hero-actions .mixed-workbench-rule-entry {
  width: 100%;
  min-width: 0;
}

.mixed-workbench-rule-icon svg {
  display: block;
}

.mixed-master-location.is-unavailable,
.mixed-master-location.is-partial {
  color: #9a5a18;
  background: #fff3e2;
}

.mixed-master-location.is-unavailable::before,
.mixed-master-location.is-partial::before {
  content: "!";
}

.mixed-inventory-location-notice {
  margin: 0 20px 16px;
  padding: 10px 12px;
  color: #79501f;
  border: 1px solid #f1d6ae;
  border-radius: 10px;
  background: #fff9ef;
  font-size: 11px;
  line-height: 1.65;
}

.mixed-document-preview {
  margin: 16px 20px;
  border: 1px solid var(--mixed-line);
  border-radius: 12px;
  background: #fbfdfc;
}

.mixed-document-preview > summary {
  padding: 12px 14px;
  color: var(--mixed-green);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.mixed-inventory-document {
  padding: 18px 20px 22px;
  color: var(--mixed-ink);
  background: #fff;
}

.mixed-document-preview .mixed-inventory-document {
  border-top: 1px solid var(--mixed-line);
}

.mixed-inventory-document-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.mixed-inventory-document-head h1 {
  margin: 4px 0 5px;
  color: var(--mixed-ink);
  font-size: 22px;
}

.mixed-inventory-document-head p {
  margin: 0;
  color: var(--mixed-muted);
  font-size: 10px;
}

.mixed-inventory-document-head dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 8px;
  margin: 0;
}

.mixed-inventory-document-head dl > div {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f6f4;
}

.mixed-inventory-document-head dt {
  color: var(--mixed-muted);
  font-size: 9px;
}

.mixed-inventory-document-head dd {
  margin: 3px 0 0;
  color: var(--mixed-ink);
  font-size: 11px;
  font-weight: 800;
}

.mixed-document-table {
  width: 100%;
  min-width: 1320px;
}

.mixed-document-table th:first-child,
.mixed-document-table td:first-child {
  width: 48px;
}

.mixed-document-table tr.is-style-start td {
  border-top: 2px solid #9bbfb7;
}

.mixed-document-location {
  display: inline-block;
  max-width: 190px;
  overflow-wrap: anywhere;
}

.mixed-document-location.is-missing {
  color: #9a5a18;
  font-weight: 800;
}

.mixed-negative {
  color: #bd5c32;
  font-weight: 800;
}

.mixed-print-only {
  display: none;
}

.mixed-history-page {
  gap: 18px;
}

.mixed-history-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.72fr);
  gap: 32px;
  align-items: end;
  padding: 34px 36px;
  color: #fff;
  border-radius: 25px;
  background: linear-gradient(118deg, #095f50, #08735e 58%, #108068);
  box-shadow: 0 22px 54px rgba(9, 100, 81, 0.18);
}

.mixed-history-hero .back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.mixed-history-hero h2 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 34px;
  line-height: 1.25;
}

.mixed-history-hero p {
  max-width: 650px;
  margin: 12px 0 0;
  color: rgba(241, 255, 251, 0.76);
  font-size: 12px;
  line-height: 1.75;
}

.mixed-history-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.mixed-history-stats article {
  padding: 16px 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.mixed-history-stats strong,
.mixed-history-stats span {
  display: block;
}

.mixed-history-stats strong {
  font-size: 23px;
}

.mixed-history-stats span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.mixed-completeness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.mixed-completeness-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.mixed-completeness-badge.is-complete {
  color: #08705b;
  background: #e6f6f1;
}

.mixed-completeness-badge.is-in_progress {
  color: #986018;
  background: #fff1d9;
}

.mixed-completeness-badge.is-incomplete {
  color: #b6483a;
  background: #fde9e6;
}

.mixed-history-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 20px;
}

.mixed-history-check-grid article {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--mixed-line);
  border-radius: 11px;
  background: #fbfdfc;
}

.mixed-history-check-grid article > span {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  background: #08705b;
}

.mixed-history-check-grid article.is-pending > span {
  background: #c17a20;
}

.mixed-history-check-grid article.is-missing > span {
  background: #c95142;
}

.mixed-history-check-grid strong,
.mixed-history-check-grid small {
  display: block;
}

.mixed-history-check-grid strong {
  color: var(--mixed-ink);
  font-size: 11px;
}

.mixed-history-check-grid small {
  margin-top: 4px;
  color: var(--mixed-muted);
  font-size: 9px;
  line-height: 1.55;
}

.mixed-history-missing,
.mixed-history-warning {
  margin: 0 20px 16px;
  padding: 12px 14px;
  border: 1px solid #f0c8c2;
  border-radius: 10px;
  background: #fff7f5;
  font-size: 10px;
  line-height: 1.65;
}

.mixed-history-warning {
  border-color: #eed9b7;
  background: #fffaf1;
}

.mixed-history-missing ul,
.mixed-history-warning ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.mixed-history-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 20px;
  color: var(--mixed-muted);
  font-size: 10px;
}

.mixed-history-table {
  width: 100%;
  min-width: 1180px;
}

.mixed-history-table th,
.mixed-history-table td {
  padding: 11px 13px;
  vertical-align: top;
}

.mixed-history-table th {
  color: #748186;
  background: #f7f9f8;
  font-size: 10px;
}

.mixed-history-table td {
  color: var(--mixed-ink);
  border-color: var(--mixed-line);
  background: #fff;
  font-size: 10px;
}

.mixed-history-table tr.is-selected td {
  background: #f0f8f5;
}

.mixed-history-table td > strong,
.mixed-history-table td > small,
.mixed-history-table td > .status-chip,
.mixed-history-table td > .mixed-completeness-badge {
  display: block;
}

.mixed-history-table td > small {
  margin-top: 5px;
  color: var(--mixed-muted);
}

.mixed-history-missing-brief {
  display: grid;
  gap: 4px;
  max-width: 340px;
}

.mixed-history-missing-brief span {
  color: #9f493e;
  line-height: 1.45;
}

.mixed-history-missing-brief span.is-clear {
  color: #08705b;
}

.mixed-history-missing-brief small {
  color: var(--mixed-muted);
}

.mixed-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1100px) {
  .mixed-history-hero {
    grid-template-columns: 1fr;
  }

  .mixed-history-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mixed-workbench-hero-actions {
    width: 100%;
    max-width: none;
  }

  .mixed-history-hero {
    padding: 25px 22px;
  }

  .mixed-history-hero h2 {
    font-size: 27px;
  }

  .mixed-history-stats,
  .mixed-history-check-grid,
  .mixed-inventory-document-head dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mixed-inventory-document-head,
  .mixed-history-detail-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

.mixed-master-print-head {
  display: none;
}

.mixed-inventory-coverage {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(170px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 18px;
  color: var(--mixed-ink);
  border: 1px solid var(--mixed-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--mixed-shadow);
}

.mixed-inventory-coverage > div {
  display: grid;
  gap: 3px;
}

.mixed-inventory-coverage > div strong {
  color: var(--mixed-green);
  font-size: 20px;
}

.mixed-inventory-coverage > div span,
.mixed-inventory-coverage details p {
  color: var(--mixed-muted);
  font-size: 11px;
  line-height: 1.55;
}

.mixed-inventory-coverage > i {
  color: #8eaaa5;
  font-size: 18px;
  font-style: normal;
}

.mixed-inventory-coverage details {
  grid-column: 1 / -1;
  padding-top: 9px;
  border-top: 1px dashed var(--mixed-line);
}

.mixed-inventory-coverage summary {
  color: var(--mixed-green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.mixed-inventory-coverage details p {
  margin: 7px 0 0;
}

.mixed-execution-stale-list {
  display: grid;
  gap: 8px;
  margin: 16px 20px;
  padding: 14px;
  color: #7b4d13;
  border: 1px solid #efd2a8;
  border-radius: 12px;
  background: #fff8ed;
}

.mixed-execution-stale-list p {
  margin: 4px 0 0;
  color: #806b51;
  font-size: 11px;
}

.mixed-execution-stale-list article {
  display: grid;
  grid-template-columns: minmax(130px, 210px) 1fr;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed #e9cda6;
  font-size: 11px;
}

.mixed-execution-stale-list article span {
  line-height: 1.55;
}

@media (max-width: 720px) {
  .mixed-inventory-coverage {
    grid-template-columns: 1fr;
  }

  .mixed-inventory-coverage > i {
    display: none;
  }

  .mixed-execution-stale-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 9mm;
  }

  body.mixed-workbench-mode {
    color: #111;
    background: #fff;
  }

  body.mixed-workbench-mode .crumb {
    display: none !important;
  }

  body.mixed-workbench-mode .mixed-inventory-page > * {
    display: none !important;
  }

  body.mixed-workbench-mode .mixed-inventory-page > .mixed-inventory-master,
  body.mixed-workbench-mode .mixed-execution-page > .mixed-execution-results {
    display: block !important;
  }

  body.mixed-workbench-mode .mixed-inventory-master > .mixed-workbench-panel-head,
  body.mixed-workbench-mode .mixed-master-source,
  body.mixed-workbench-mode .mixed-inventory-location-notice.is-screen,
  body.mixed-workbench-mode .mixed-document-preview,
  body.mixed-workbench-mode .mixed-master-footer,
  body.mixed-workbench-mode .dialog-backdrop,
  body.mixed-workbench-mode .mixed-execution-results > .mixed-workbench-panel-head,
  body.mixed-workbench-mode .mixed-execution-document-screen,
  body.mixed-workbench-mode .mixed-history-page {
    display: none !important;
  }

  body.mixed-workbench-mode .mixed-print-only {
    display: block !important;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-print-only {
    display: none !important;
  }

  body.mixed-workbench-mode .mixed-master-print-head,
  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-summary-wrap {
    display: block !important;
  }

  body.mixed-workbench-mode .mixed-master-print-head {
    margin-bottom: 5mm;
    text-align: center;
  }

  body.mixed-workbench-mode .mixed-master-print-head h1 {
    margin: 0;
    color: #111;
    font-size: 16pt;
  }

  body.mixed-workbench-mode .mixed-master-print-head p {
    margin: 2mm 0 0;
    color: #444;
    font-size: 8pt;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-summary-wrap {
    overflow: visible;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: auto;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-table thead {
    display: table-header-group;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-table tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-table th,
  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-table td {
    height: auto;
    padding: 2.6mm 2mm;
    color: #111;
    border: 1px solid #888;
    background: #fff;
    font-size: 8.5pt;
    vertical-align: middle;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-table th:first-child,
  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-table td:first-child {
    display: none;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-deductions {
    display: block;
    line-height: 1.65;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-deductions span {
    display: inline;
    padding: 0;
    color: #111;
    background: transparent;
    white-space: nowrap;
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-deductions span:not(:last-child)::after {
    content: "；";
  }

  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-location,
  body.mixed-workbench-mode .mixed-inventory-master .mixed-master-status,
  body.mixed-workbench-mode .mixed-inventory-master .status-badge {
    padding: 0;
    color: #111;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.mixed-workbench-mode .mixed-execution-results,
  body.mixed-workbench-mode .mixed-inventory-master,
  body.mixed-workbench-mode .mixed-inventory-document {
    overflow: visible;
    margin: 0;
    padding: 0;
    color: #111;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  body.mixed-workbench-mode .mixed-inventory-document-head {
    margin-bottom: 4mm;
  }

  body.mixed-workbench-mode .mixed-inventory-document-head h1 {
    color: #111;
    font-size: 16pt;
  }

  body.mixed-workbench-mode .mixed-inventory-document-head p,
  body.mixed-workbench-mode .mixed-inventory-document-head dt,
  body.mixed-workbench-mode .mixed-inventory-document-head dd {
    color: #333;
  }

  body.mixed-workbench-mode .mixed-inventory-document-head dl > div {
    padding: 2mm;
    border: 1px solid #ccc;
    background: #fff;
  }

  body.mixed-workbench-mode .mixed-inventory-location-notice {
    margin: 0 0 3mm;
    padding: 2mm;
    color: #333;
    border-color: #bbb;
    background: #fff;
    font-size: 7.5pt;
  }

  body.mixed-workbench-mode .mixed-document-table-wrap {
    overflow: visible;
  }

  body.mixed-workbench-mode .mixed-document-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: auto;
    color: #111;
  }

  body.mixed-workbench-mode .mixed-document-table thead {
    display: table-header-group;
  }

  body.mixed-workbench-mode .mixed-document-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.mixed-workbench-mode .mixed-document-table th,
  body.mixed-workbench-mode .mixed-document-table td {
    height: auto;
    padding: 1.4mm 1.2mm;
    color: #111;
    border: 1px solid #aaa;
    background: #fff;
    font-size: 7pt;
    line-height: 1.35;
    white-space: normal;
  }

  body.mixed-workbench-mode .mixed-document-table th {
    font-weight: 800;
  }

  body.mixed-workbench-mode .mixed-document-table tr.is-style-start td {
    border-top: 2px solid #555;
  }

  body.mixed-workbench-mode .mixed-document-location {
    max-width: none;
    color: #111;
    font-weight: 400;
  }
}

/* Manufacturer finance, serial exceptions, arrival reconciliation, and new-style archive */
.finance-page-head,
.serial-review-head,
.arrival-page-head,
.new-style-page-head {
  align-items: center;
}

.finance-metrics,
.serial-review-metrics,
.arrival-inventory-split {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.arrival-disposition-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0; }
.arrival-disposition-summary article { padding:16px; border:1px solid var(--border-subtle,#2a3d45); border-radius:12px; background:var(--surface-2,#122126); }
.arrival-disposition-summary strong { display:block; margin-top:8px; font-size:22px; color:var(--text-primary,#eef7f7); }
.arrival-disposition-summary .is-held strong { color:#f3c969; }
.arrival-disposition-summary .is-unresolved strong { color:#ef8a8a; }
.arrival-disposition-summary .is-payable strong { color:#67d8c3; }
.held-arrival-row { display:flex; align-items:center; gap:16px; padding:12px 0; border-bottom:1px solid var(--border-subtle,#2a3d45); }
.held-arrival-row span { margin-left:auto; color:var(--text-muted,#9eb5b8); }
@media (max-width: 768px) { .arrival-disposition-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } .held-arrival-row { flex-wrap:wrap; } }

.finance-metrics article,
.serial-review-metrics a,
.arrival-inventory-split article {
  display: grid;
  align-content: center;
  min-height: 112px;
  padding: 20px;
  border: 1px solid #245c57;
  border-radius: 9px;
  background: #071718;
  color: #eefbf9;
}

.finance-metrics article {
  border-top: 2px solid #28e1c7;
}

.finance-metrics article:nth-child(2) { border-top-color: #5b8cff; }
.finance-metrics article:nth-child(3) { border-top-color: #8c75ff; }
.finance-metrics article.is-outstanding { border-top-color: #f0b84f; }

.finance-metrics small,
.serial-review-metrics small,
.arrival-inventory-split small {
  color: #9cb7b3;
  font-size: 11px;
}

.finance-metrics strong,
.serial-review-metrics strong,
.arrival-inventory-split strong {
  margin-top: 8px;
  color: #f7fffe;
  font-size: 27px;
}

.finance-metrics span,
.serial-review-metrics span,
.arrival-inventory-split span {
  margin-top: 6px;
  color: #799b97;
  font-size: 11px;
}

.finance-filter-bar,
.serial-review-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(145px, 0.8fr)) minmax(210px, 1.3fr) auto auto auto;
  width: 100%;
}

.finance-ledger-table { min-width: 1280px; }
.finance-event-table { min-width: 1050px; }
.payment-history-table { min-width: 1240px; }
.arrival-list-table { min-width: 1320px; }

.manufacturer-arrival-conversion {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  color: #9fc2bd;
  font-size: 12px;
}
.manufacturer-arrival-conversion > span {
  padding: 6px 9px;
  border: 1px solid #285f5a;
  border-radius: 6px;
  background: rgba(40, 225, 199, 0.06);
}
.manufacturer-arrival-conversion-dialog { width: min(620px, calc(100vw - 32px)); }
.arrival-workbook-card { margin-bottom: 14px; }
.arrival-workbook-fields { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 14px; }
.arrival-workbook-feedback { grid-column: 1 / -1; min-height: 20px; margin: 0; color: #ff9189; }
.arrival-workbook-results { margin-bottom: 14px; }
.arrival-total-review { width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.arrival-total-review-body { display: grid; gap: 16px; }
.arrival-total-review fieldset { margin: 0; padding: 14px; border: 1px solid #285f5a; border-radius: 8px; }
.arrival-total-review legend { padding: 0 7px; color: #b9d4d0; font-weight: 700; }
.arrival-candidate-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; }
.arrival-candidate-list label { display: flex; min-height: 50px; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #285f5a; border-radius: 7px; cursor: pointer; }
.arrival-candidate-list label:focus-within { outline: 2px solid #5ce9d4; outline-offset: 2px; }
.arrival-candidate-option { display: flex; min-width: 0; align-items: stretch; gap: 6px; }
.arrival-candidate-option > label:first-child { flex: 1; }
.arrival-candidate-option > label:last-child { width: 88px; flex-direction: column; align-items: stretch; justify-content: center; font-size: 12px; }
.arrival-candidate-option input[name="deliveryOrder"] { width: 100%; min-width: 0; }
.arrival-candidate-list span { display: grid; gap: 3px; }
.arrival-candidate-list small { color: #88aaa5; }
.arrival-candidate-list em { color: #5ce9d4; font-size: 12px; font-style: normal; }
.arrival-allocation-total { display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 13px; }
.arrival-allocation-total strong { color: #5ce9d4; font-size: 16px; }
.arrival-total-review-feedback { min-height: 20px; margin: 0; color: #ff9189; }
.arrival-linked-delivery { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #214b47; }
.arrival-linked-delivery:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .arrival-workbook-fields { grid-template-columns: 1fr; }
  .arrival-workbook-fields .field-wide,
  .arrival-workbook-feedback { grid-column: auto; }
  .manufacturer-arrival-conversion { align-items: stretch; flex-direction: column; }
  .manufacturer-arrival-conversion .small-button { min-height: 44px; }
  .arrival-candidate-list { grid-template-columns: 1fr; }
  .arrival-candidate-list label { min-height: 44px; }
}

.finance-row-actions {
  display: grid;
  gap: 5px;
  white-space: nowrap;
}

.manufacturer-data-view-tabs { display: flex; gap: 8px; margin: 0 0 16px; border-bottom: 1px solid #1b4a46; }
.manufacturer-data-view-tabs a { display: inline-flex; min-height: 40px; align-items: center; padding: 0 16px; border-bottom: 2px solid transparent; color: #8eb7b1; font-weight: 700; text-decoration: none; }
.manufacturer-data-view-tabs a:hover, .manufacturer-data-view-tabs a:focus-visible { color: #d8fffa; }
.manufacturer-data-view-tabs a.active { border-bottom-color: #28e1c7; color: #28e1c7; }
.report-original-images { margin: 18px 0 20px; padding: 16px; border: 1px solid #245b56; border-radius: 10px; background: rgba(13, 49, 46, .42); }
.report-original-images-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.report-original-images-head > div { display: grid; gap: 4px; }
.report-original-images-head strong { color: #e9fffb; font-size: 16px; }
.report-original-images-head span { color: #8eb7b1; font-size: 12px; }
.report-original-image-rail { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.report-original-image-thumb { flex: 0 0 148px; display: grid; gap: 7px; padding: 8px; border: 1px solid #286862; border-radius: 8px; background: #071d1c; color: #c9e5df; text-align: left; cursor: pointer; }
.report-original-image-thumb:hover, .report-original-image-thumb:focus-visible { border-color: #28e1c7; outline: 2px solid rgba(40, 225, 199, .28); outline-offset: 2px; }
.report-original-image-thumb img { width: 132px; height: 92px; object-fit: contain; border-radius: 5px; background: #031312; }
.report-original-image-thumb span { overflow: hidden; color: #a8cbc5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.report-original-images-empty { display: grid; gap: 4px; padding: 18px; border: 1px dashed #39736d; border-radius: 8px; color: #9abbb5; }
.report-original-images-empty strong { color: #d5eeea; }
.report-merchant-code-cell { min-width: 150px; }
.report-merchant-code-cell code { display: block; color: #8ff5df; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.report-new-style-select { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.report-new-style-select input[type="checkbox"] { margin: 0; }
.report-new-style-select .small-button { min-height: 28px; padding: 0 8px; }
.report-new-style-code { min-width: 110px; max-width: 150px; }
.report-new-style-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.report-new-style-source-list { display: grid; gap: 6px; max-width: 760px; }
.report-new-style-source-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line, #1d5d5a); border-radius: 8px; cursor: pointer; }
.report-new-style-source-item input[type="checkbox"] { margin: 0; }
.report-new-style-source-item span { flex: 1; }
.report-new-style-source-item small { color: var(--muted, #9ab7b4); }
.report-recheck-details { border: 1px solid var(--line, #1d5d5a); border-radius: 8px; padding: 8px 12px; }
.report-recheck-details summary { cursor: pointer; font-weight: 600; }
.report-recheck-details[open] { padding-bottom: 2px; }
.report-match-state { display: block; margin-top: 4px; color: #78b7aa; font-size: 11px; }
.report-match-state.is-pending { color: #d9a963; }
@media (max-width: 720px) { .report-original-images-head { align-items: flex-start; flex-direction: column; } .report-original-image-thumb { flex-basis: 132px; } .report-original-image-thumb img { width: 116px; height: 82px; } }

.finance-anomaly-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 113, 102, 0.45);
  border-radius: 6px;
  color: #ff9c94;
  background: rgba(255, 94, 84, 0.08);
}

.finance-detail-metrics article { min-height: 96px; }

.finance-anomaly-card {
  scroll-margin-top: 20px;
}

.finance-anomaly-card.has-anomaly {
  border-color: rgba(255, 103, 91, 0.48);
}

.finance-anomaly-list {
  display: grid;
  gap: 10px;
}

.finance-anomaly-list article {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(330px, 1.5fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 103, 91, 0.34);
  border-radius: 8px;
  background: rgba(255, 103, 91, 0.055);
}

.finance-anomaly-list article > div:first-child {
  display: grid;
  gap: 5px;
}

.finance-anomaly-list article > div:first-child span,
.finance-ok-copy {
  color: #8eaaa6;
  font-size: 11px;
}

.finance-anomaly-list dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.finance-anomaly-list dl div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #081b1c;
}

.finance-anomaly-list dt {
  color: #789793;
  font-size: 10px;
}

.finance-anomaly-list dd {
  margin: 0;
  font-weight: 800;
}

.finance-payment-row {
  background: rgba(40, 225, 199, 0.045);
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.payment-balance-panel {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: rgba(40, 225, 199, 0.055);
}

.payment-balance-panel span,
.payment-balance-panel small {
  color: #8eaaa6;
  font-size: 11px;
}

.payment-balance-panel strong {
  color: #f2c767;
  font-size: 25px;
}

.payment-rule-card ol {
  display: grid;
  gap: 13px;
  margin: 0;
  padding-left: 20px;
  color: #a8bfbc;
  line-height: 1.55;
}

.payment-rule-card li::marker {
  color: #28e1c7;
  font-weight: 800;
}

.payment-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.payment-submit-row > div {
  display: grid;
  gap: 4px;
}

.payment-submit-row span {
  color: #829f9b;
  font-size: 11px;
}

.manufacturer-finance-workbench {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.manufacturer-finance-sidebar { overflow: hidden; }
.manufacturer-finance-search { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 14px; }
.manufacturer-finance-search input,
.manufacturer-finance-search button,
.manufacturer-finance-mobile-select select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #285f5a;
  border-radius: 7px;
  background: #061516;
  color: #e9f8f6;
}
.manufacturer-finance-search input { padding: 0 11px; }
.manufacturer-finance-search button { padding: 0 12px; cursor: pointer; }
.manufacturer-finance-filter { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 0 14px 10px; }
.manufacturer-finance-filter button {
  min-height: 38px;
  border: 1px solid #285f5a;
  border-radius: 999px;
  color: #91aaa7;
  background: transparent;
  cursor: pointer;
}
.manufacturer-finance-filter button.active { border-color: #28e1c7; color: #031313; background: #65ebd8; }
.manufacturer-finance-filter b { margin-left: 4px; }
.manufacturer-finance-vendors { display: grid; max-height: 660px; overflow: auto; border-top: 1px solid #194b47; }
.manufacturer-finance-vendor {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid #173f3c;
  text-align: left;
  color: #eafffc;
  background: transparent;
  cursor: pointer;
}
.manufacturer-finance-vendor.active { box-shadow: inset 3px 0 #28e1c7; background: rgba(40, 225, 199, 0.09); }
.manufacturer-finance-vendor span { display: grid; gap: 4px; min-width: 0; }
.manufacturer-finance-vendor small { color: #799b97; }
.manufacturer-finance-vendor-funds { text-align: right; align-content: start; }
.manufacturer-finance-vendor-funds > b { color: #f1c76e; white-space: nowrap; }
.manufacturer-finance-vendor-funds > small { font-size: 10px; line-height: 1.5; }
.manufacturer-finance-mobile-select { display: none; }
.manufacturer-finance-main { display: grid; gap: 14px; min-width: 0; }
.manufacturer-finance-heading { display: flex; align-items: center; justify-content: space-between; }
.manufacturer-finance-heading h3 { font-size: 22px; }
.manufacturer-finance-heading span { color: #88aaa5; font-size: 12px; }
.manufacturer-finance-tabs { display: flex; gap: 5px; overflow-x: auto; border-bottom: 1px solid #285f5a; }
.manufacturer-finance-tabs a { flex: 0 0 auto; padding: 12px 17px; color: #8da9a5; border-bottom: 2px solid transparent; }
.manufacturer-finance-tabs a.active { color: #5ce9d4; border-bottom-color: #28e1c7; }
.manufacturer-finance-records { min-width: 0; overflow: hidden; }
.finance-settlement-empty { padding: 36px 18px; }
.manufacturer-direct-payment { overflow: hidden; }
.manufacturer-payment-dropzone {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #3c7c75;
  border-radius: 8px;
  color: #87a8a3;
  background: rgba(40, 225, 199, 0.035);
  cursor: pointer;
}
.manufacturer-payment-dropzone > input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.manufacturer-payment-attachments { display: flex; flex-wrap: wrap; gap: 9px; min-height: 62px; align-items: center; }
.manufacturer-payment-drop-hint { font-size: 11px; }
.manufacturer-payment-thumb { position: relative; width: 72px; height: 72px; margin: 0; }
.manufacturer-payment-thumb > button:first-child { width: 100%; height: 100%; padding: 0; overflow: hidden; border: 1px solid #39726c; border-radius: 7px; background: #061313; cursor: zoom-in; }
.manufacturer-payment-thumb img { width: 100%; height: 100%; object-fit: cover; }
.manufacturer-payment-remove { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border: 0; border-radius: 50%; color: white; background: #d95b53; cursor: pointer; }
.manufacturer-payment-feedback { min-height: 20px; margin: 0; padding: 0 18px 12px; color: #ff9189; font-size: 12px; }
.manufacturer-payment-lightbox { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0.86); }
.manufacturer-payment-lightbox.hidden { display: none; }
.manufacturer-payment-lightbox img { max-width: min(100%, 1100px); max-height: calc(100vh - 48px); object-fit: contain; }
.manufacturer-payment-lightbox > button { position: fixed; top: 18px; right: 20px; width: 42px; height: 42px; border: 1px solid #4d7773; border-radius: 50%; color: white; background: #102624; font-size: 24px; cursor: pointer; }
.finance-media-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.finance-media-links a { color: #5ee4d2; font-size: 11px; }

.serial-review-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.serial-review-metrics a {
  min-height: 104px;
  border-top: 2px solid #28e1c7;
}

.serial-review-metrics a:nth-child(2) { border-top-color: #f0b84f; }
.serial-review-metrics a:nth-child(3) { border-top-color: #ff7469; }
.serial-review-metrics a:nth-child(4) { border-top-color: #8c75ff; }

.serial-review-metrics a.active {
  border-color: #28e1c7;
  background: linear-gradient(135deg, rgba(40, 225, 199, 0.12), rgba(79, 125, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(40, 225, 199, 0.2);
}

.serial-review-metrics strong {
  font-size: 30px;
}

.serial-issue-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.serial-issue-card {
  display: grid;
  grid-template-columns: 118px minmax(240px, 1fr) minmax(310px, 1.15fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #285f5a;
  border-radius: 9px;
  background: #071718;
}

.serial-issue-card.is-gap { border-left: 3px solid #f0b84f; }
.serial-issue-card.is-conflict { border-left: 3px solid #ff7469; }

.serial-issue-mark,
.serial-issue-copy,
.serial-issue-copy > div {
  display: grid;
  gap: 5px;
}

.serial-issue-copy > div {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.serial-issue-mark span,
.serial-issue-copy small {
  color: #829f9b;
  font-size: 10px;
}

.serial-issue-mark strong {
  color: #f4d38c;
  font-size: 18px;
}

.serial-issue-copy p {
  color: #a9bfbc;
  font-size: 12px;
}

.serial-neighbor-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.serial-gap-approval-button {
  min-height: 44px;
  border-color: #2fcdb7;
  color: #baf8ef;
  cursor: pointer;
}

.serial-gap-approval-button:hover {
  border-color: #62ebd7;
  background: rgba(40, 225, 199, 0.1);
}

.serial-gap-approval-button:focus-visible,
.serial-gap-approval-dialog button:focus-visible,
.serial-gap-approval-dialog textarea:focus-visible {
  outline: 2px solid #6cf2de;
  outline-offset: 2px;
}

.serial-gap-approval-dialog {
  width: min(620px, calc(100vw - 32px));
}

.serial-gap-approval-evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.serial-gap-approval-evidence > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #285f5a;
  border-radius: 8px;
  background: #071718;
}

.serial-gap-approval-evidence span,
.serial-gap-approval-evidence small {
  color: #829f9b;
  font-size: 11px;
}

.serial-gap-approval-evidence strong {
  overflow-wrap: anywhere;
  color: #e7fffb;
  font-size: 14px;
}

.serial-gap-approval-dialog textarea {
  min-height: 104px;
  resize: vertical;
}

.serial-gap-approval-feedback {
  min-height: 20px;
  color: #ff9b91;
  font-size: 12px;
}

.serial-gap-approval-dialog .dialog-actions .btn {
  min-height: 44px;
}

@media (max-width: 720px) {
  .serial-gap-approval-evidence {
    grid-template-columns: 1fr;
  }

  .serial-gap-approval-dialog .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.serial-conflict-versions {
  display: grid;
  gap: 7px;
}

.serial-conflict-versions a,
.serial-conflict-versions > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #285f5a;
  border-radius: 7px;
  background: #091e1f;
}

.serial-conflict-versions span {
  color: #91aaa7;
  font-size: 11px;
}

.serial-conflict-versions em {
  color: #63dfce;
  font-size: 11px;
  font-style: normal;
}

.arrival-difference-note,
.arrival-auto-review,
.arrival-manual-review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border: 1px solid #285f5a;
  border-radius: 8px;
  background: rgba(40, 225, 199, 0.06);
}

.arrival-difference-note span,
.arrival-auto-review span,
.arrival-manual-review span {
  color: #9bb4b0;
  font-size: 12px;
}

.arrival-auto-review > div {
  display: grid;
  gap: 5px;
}

.arrival-manual-review {
  border-color: rgba(255, 103, 91, 0.42);
  background: rgba(255, 103, 91, 0.07);
}

.arrival-inventory-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.arrival-inventory-split article {
  border-left: 3px solid #28e1c7;
}

.arrival-inventory-split article.is-held {
  border-left-color: #f0b84f;
}

.arrival-stock-split {
  display: grid;
  gap: 4px;
  font-size: 11px;
  white-space: nowrap;
}

.arrival-stock-split b {
  color: #f0c875;
}

.arrival-review-card.is-auto .prd-edit-table input:disabled {
  opacity: 0.72;
}

.arrival-stock-success {
  display: grid;
  gap: 5px;
}

.new-style-create-panel .field small {
  color: #7f9d99;
  font-size: 10px;
}

.new-style-month-folders,
.new-style-folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.new-style-month-folder,
.new-style-folder {
  position: relative;
  border: 1px solid #285f5a;
  border-radius: 4px 9px 9px 9px;
  background: linear-gradient(145deg, #0a2928, #071718);
}

.folder-tab {
  position: absolute;
  top: -8px;
  left: -1px;
  width: 38%;
  height: 9px;
  border: 1px solid #285f5a;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #0a2928;
}

.new-style-month-folder {
  display: grid;
  min-height: 86px;
  align-items: center;
  padding: 17px 16px 12px;
}

.new-style-month-folder.active {
  border-color: #28e1c7;
  box-shadow: inset 0 0 0 1px rgba(40, 225, 199, 0.18);
}

.new-style-month-folder div {
  display: grid;
  gap: 7px;
}

.new-style-month-folder strong {
  color: #f0fffd;
  font-size: 17px;
}

.new-style-month-folder small {
  color: #86a39f;
  font-size: 11px;
}

.new-style-folder {
  display: grid;
  grid-template-rows: 160px minmax(0, 1fr);
  min-width: 0;
  overflow: visible;
}

.new-style-folder.is-missing-image {
  border-color: rgba(255, 103, 91, 0.46);
}

.new-style-folder-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 4px 9px 0 0;
  background: #041111;
}

.new-style-folder-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.new-style-folder-preview > span {
  display: grid;
  gap: 7px;
  justify-items: center;
  color: #ff938a;
}

.new-style-folder-preview b {
  font-size: 12px;
  letter-spacing: 0.12em;
}

.new-style-folder-preview em {
  font-size: 11px;
  font-style: normal;
}

.new-style-folder-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.new-style-folder-body > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.new-style-folder-body h3 {
  font-size: 15px;
}

.new-style-folder-body p,
.new-style-folder-body small {
  color: #829f9b;
  font-size: 11px;
}

.new-style-missing-label {
  color: #ff938a !important;
  font-weight: 800;
}

.new-style-detail-missing {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(255, 103, 91, 0.52);
  border-radius: 8px;
  background: rgba(255, 103, 91, 0.06);
}

.new-style-detail-missing strong { color: #ff938a; }
.new-style-detail-missing span { color: #9eb5b2; font-size: 12px; }

@media (max-width: 1380px) {
  .finance-metrics,
  .new-style-month-folders,
  .new-style-folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .serial-issue-card {
    grid-template-columns: 110px minmax(220px, 0.8fr) minmax(300px, 1.2fr);
  }
}

@media (max-width: 1040px) {
  .manufacturer-finance-workbench { grid-template-columns: 1fr; }
  .manufacturer-finance-vendors { max-height: 230px; }
  .payment-layout,
  .serial-issue-card,
  .finance-anomaly-list article {
    grid-template-columns: 1fr;
  }

  .finance-filter-bar,
  .serial-review-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .serial-neighbor-links {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .manufacturer-finance-workbench { grid-template-columns: 1fr; }
  .manufacturer-finance-vendors { display: none; }
  .manufacturer-finance-mobile-select { display: grid; gap: 6px; padding: 0 14px 14px; color: #8ba8a4; font-size: 11px; }
  .manufacturer-finance-mobile-select select { padding: 0 10px; }
  .manufacturer-finance-tabs a { padding-inline: 12px; }
  .manufacturer-payment-lightbox { padding: 12px; }
  .finance-metrics,
  .serial-review-metrics,
  .arrival-inventory-split,
  .new-style-month-folders,
  .new-style-folder-grid,
  .finance-filter-bar,
  .serial-review-filter {
    grid-template-columns: 1fr;
  }

  .payment-balance-panel,
  .payment-submit-row,
  .arrival-difference-note,
  .arrival-auto-review,
  .arrival-manual-review {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .payment-submit-row .btn {
    width: 100%;
  }

  .finance-anomaly-list dl,
  .serial-conflict-versions a,
  .serial-conflict-versions > div {
    grid-template-columns: 1fr;
  }
}

.delivery-detail-issue-list,
.delivery-supplement-history,
.delivery-issue-explanations {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.delivery-detail-issue-card {
  display: grid;
  grid-template-columns: 130px minmax(260px, 1fr) minmax(300px, .8fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255, 106, 95, .34);
  border-left: 3px solid #ff7469;
  border-radius: 9px;
  background: #071718;
}

.delivery-detail-issue-code,
.delivery-detail-issue-copy,
.delivery-detail-issue-copy > div {
  display: grid;
  gap: 5px;
}

.delivery-detail-issue-code small,
.delivery-detail-issue-code span,
.delivery-detail-issue-copy small {
  color: #829f9b;
  font-size: 10px;
}

.delivery-detail-issue-code strong { color: #f4d38c; font-size: 18px; }
.delivery-detail-issue-copy > div { grid-template-columns: auto 1fr; align-items: center; }
.delivery-detail-issue-copy p { color: #a9bfbc; font-size: 12px; }

.delivery-detail-issue-numbers,
.delivery-issue-explanations dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.delivery-detail-issue-numbers div,
.delivery-issue-explanations dl div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #091e1f;
}

.delivery-detail-issue-numbers dt,
.delivery-issue-explanations dt { color: #789793; font-size: 10px; }
.delivery-detail-issue-numbers dd,
.delivery-issue-explanations dd { margin: 0; font-weight: 800; }

.delivery-detail-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid #285f5a;
  border-radius: 8px;
  background: rgba(40, 225, 199, .06);
}

.delivery-detail-state.is-blocked { border-color: rgba(255, 103, 91, .42); background: rgba(255, 103, 91, .07); }
.delivery-detail-state > div { display: grid; gap: 5px; }
.delivery-detail-state span { color: #9bb4b0; font-size: 12px; }

.delivery-original-text { margin-top: 14px; }
.delivery-original-text summary { cursor: pointer; color: #8fded4; font-size: 12px; }
.delivery-original-text pre,
.delivery-supplement-history pre {
  max-height: 260px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid #285f5a;
  border-radius: 7px;
  background: #061314;
  color: #b7ceca;
  white-space: pre-wrap;
}

.delivery-subtable-head { border-top: 1px solid var(--border); }
.delivery-reconciliation-card { scroll-margin-top: 18px; }
.delivery-issue-explanations article,
.delivery-supplement-history article {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 103, 91, .3);
  border-radius: 8px;
  background: rgba(255, 103, 91, .045);
}

.delivery-issue-explanations article > div,
.delivery-supplement-history article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.delivery-issue-explanations p,
.delivery-supplement-history span { color: #9bb4b0; font-size: 12px; }

@media (max-width: 1180px) {
  .delivery-detail-issue-card { grid-template-columns: 120px minmax(220px, 1fr); }
  .delivery-detail-issue-card > .delivery-detail-issue-numbers,
  .delivery-detail-issue-card > .small-button { grid-column: 2; }
}

@media (max-width: 680px) {
  .delivery-detail-issue-card { grid-template-columns: 1fr; }
  .delivery-detail-issue-card > .delivery-detail-issue-numbers,
  .delivery-detail-issue-card > .small-button { grid-column: auto; }
  .delivery-detail-state,
  .delivery-issue-explanations article > div,
  .delivery-supplement-history article > div { align-items: stretch; flex-direction: column; }
  .delivery-detail-issue-numbers,
  .delivery-issue-explanations dl { grid-template-columns: 1fr; }
}

/* Manufacturer standalone upload workbench */
body.upload-standalone {
  min-width: 0;
  overflow: auto;
  background: #050d0c;
}

body.upload-standalone .main-shell {
  display: block;
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

body.upload-standalone .workspace,
body.upload-standalone .viewer-shell,
body.upload-standalone .page-root {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.manufacturer-upload-workbench {
  --upload-bg: #050f0e;
  --upload-panel: #081817;
  --upload-panel-soft: #0a1e1c;
  --upload-line: #17534c;
  --upload-line-soft: rgba(51, 181, 164, 0.22);
  --upload-text: #f1fffc;
  --upload-muted: #82aaa4;
  --upload-cyan: #2ce2d0;
  --upload-blue: #518cff;
  --upload-amber: #f5b73f;
  --upload-rose: #ff6678;
  min-height: 100vh;
  color: var(--upload-text);
  background-color: var(--upload-bg);
  background-image:
    linear-gradient(rgba(44, 226, 208, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 226, 208, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

.manufacturer-upload-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 104px;
  padding: 20px 48px;
  border-bottom: 1px solid rgba(44, 226, 208, 0.2);
  background: rgba(4, 14, 13, 0.96);
}

.manufacturer-upload-brand {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.manufacturer-upload-brand .brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(135deg, #29d9ca, #5a7cff);
  color: #04100f;
  font-size: 17px;
  box-shadow: 0 0 32px rgba(44, 226, 208, 0.12);
}

.manufacturer-upload-brand strong {
  display: block;
  color: var(--upload-cyan);
  font-size: 14px;
  font-weight: 900;
}

.manufacturer-upload-brand h1 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.manufacturer-upload-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.manufacturer-sync-state,
.manufacturer-upload-identity {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--upload-line);
  border-radius: 8px;
  background: #0a211f;
  color: #bfe9e3;
  font-size: 13px;
  white-space: nowrap;
}

.manufacturer-sync-state i,
.manufacturer-live-chip i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--upload-cyan);
  box-shadow: 0 0 12px rgba(44, 226, 208, 0.7);
}

.manufacturer-upload-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(520px, 1.55fr) minmax(290px, 0.9fr);
  align-items: start;
  gap: 24px;
  width: min(1920px, 100%);
  margin: 0 auto;
  padding: 34px 48px 48px;
}

.manufacturer-upload-panel {
  min-width: 0;
  border: 1px solid var(--upload-line);
  border-radius: 8px;
  background: rgba(7, 23, 21, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.manufacturer-upload-history,
.manufacturer-upload-validation {
  min-height: 710px;
}

.manufacturer-upload-compose {
  display: grid;
  gap: 22px;
  min-height: 710px;
  padding: 24px 28px 28px;
}

.manufacturer-upload-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.manufacturer-upload-history > .manufacturer-upload-panel-head,
.manufacturer-upload-validation > .manufacturer-upload-panel-head {
  padding: 24px 22px 17px;
}

.manufacturer-upload-panel-head h2 {
  margin: 0;
  color: #f4fffd;
  font-size: 21px;
  line-height: 1.25;
}

.manufacturer-upload-panel-head p {
  margin: 7px 0 0;
  color: var(--upload-muted);
  font-size: 12px;
  line-height: 1.5;
}

.manufacturer-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(44, 226, 208, 0.11);
  color: #88f5e8;
  font-size: 11px;
  white-space: nowrap;
}

.manufacturer-live-chip i {
  width: 8px;
  height: 8px;
}

.manufacturer-upload-history-list {
  display: grid;
  gap: 9px;
  max-height: 624px;
  padding: 0 18px 20px;
  overflow: auto;
}

.manufacturer-upload-history-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 13px 12px 17px;
  overflow: hidden;
  border: 1px solid var(--upload-line-soft);
  border-radius: 8px;
  background: #09211f;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.manufacturer-upload-history-item:hover,
.manufacturer-upload-history-item:focus-visible,
.manufacturer-upload-history-item.is-selected {
  border-color: var(--upload-cyan);
  background: #0b2b28;
  box-shadow: 0 0 0 1px rgba(44, 226, 208, 0.18), 0 8px 24px rgba(0, 0, 0, 0.18);
  outline: none;
}

.manufacturer-upload-history-item button[data-action="open-delivery-sequence"] {
  display: inline-flex;
  min-width: 64px;
  min-height: 44px;
  margin-left: auto;
}

.manufacturer-upload-history-item > div:first-child,
.manufacturer-upload-history-item > .manufacturer-upload-history-media,
.manufacturer-upload-history-actions {
  grid-column: 1 / -1;
}

.manufacturer-upload-history-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.manufacturer-upload-history-delete {
  margin-left: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 102, 120, 0.42);
  border-radius: 6px;
  background: transparent;
  color: #ff91a0;
  font-size: 11px;
  cursor: pointer;
}

.manufacturer-upload-history-delete:hover {
  background: rgba(255, 102, 120, 0.14);
}

.manufacturer-upload-history-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--upload-cyan);
}

.manufacturer-upload-history-item.is-warning {
  border-color: rgba(245, 183, 63, 0.42);
  background: #211a0e;
}

.manufacturer-upload-history-item.is-warning::before {
  background: var(--upload-amber);
}

.manufacturer-upload-history-item.is-duplicate {
  border-color: rgba(255, 102, 120, 0.35);
  background: #241316;
}

.manufacturer-upload-history-item.is-duplicate::before {
  background: var(--upload-rose);
}

.manufacturer-upload-history-item div {
  min-width: 0;
}

.manufacturer-upload-history-media {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.manufacturer-upload-history-media a {
  display: block;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(44, 226, 208, .3);
  border-radius: 6px;
  background: #061412;
}

.manufacturer-upload-history-media a:focus-visible {
  outline: 2px solid var(--upload-cyan);
  outline-offset: 2px;
}

.manufacturer-upload-history-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manufacturer-upload-history-item strong,
.manufacturer-upload-history-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manufacturer-upload-history-item strong {
  font-size: 13px;
}

.manufacturer-upload-history-item span {
  margin-top: 6px;
  color: var(--upload-muted);
  font-size: 11px;
}

.manufacturer-upload-history-item em {
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(44, 226, 208, 0.12);
  color: var(--upload-cyan);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.manufacturer-upload-history-lock {
  display: block;
  margin-top: 5px;
  color: var(--upload-muted);
  font-size: 10px;
  white-space: nowrap;
}

.manufacturer-upload-history-item.is-warning em {
  background: rgba(245, 183, 63, 0.14);
  color: var(--upload-amber);
}

.manufacturer-upload-history-item.is-duplicate em {
  background: rgba(255, 102, 120, 0.13);
  color: #ff91a0;
}

.manufacturer-upload-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  color: var(--upload-muted);
  text-align: center;
}

.manufacturer-upload-empty strong,
.manufacturer-upload-empty span {
  display: block;
}

.manufacturer-upload-empty strong {
  color: #d9f5f1;
}

.manufacturer-upload-empty span {
  margin-top: 8px;
  font-size: 12px;
}

.manufacturer-upload-type-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 54px;
  padding: 3px;
  border: 1px solid var(--upload-line);
  border-radius: 8px;
  background: #061311;
}

.manufacturer-upload-type-tabs button,
.manufacturer-entry-switch button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #87aaa5;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.manufacturer-upload-type-tabs button.is-active {
  background: linear-gradient(100deg, #2bd8cb, #5689ff);
  color: #031110;
  box-shadow: 0 7px 24px rgba(56, 186, 220, 0.16);
}

.manufacturer-entry-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 36px;
  margin-bottom: 12px;
}

.manufacturer-entry-toolbar > strong {
  color: #eafffb;
  font-size: 14px;
}

.manufacturer-entry-toolbar > span {
  color: var(--upload-muted);
  font-size: 11px;
}

.manufacturer-entry-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manufacturer-entry-switch span {
  margin-right: 2px;
  color: var(--upload-muted);
  font-size: 11px;
}

.manufacturer-entry-switch button {
  min-width: 94px;
  min-height: 31px;
  padding: 0 13px;
  border: 1px solid var(--upload-line);
  color: #a9c9c4;
  font-size: 11px;
}

.manufacturer-entry-switch button.is-active {
  border-color: rgba(44, 226, 208, 0.8);
  background: rgba(44, 226, 208, 0.15);
  color: #cafff8;
}

.manufacturer-entry-pane {
  display: grid;
  gap: 11px;
}

.manufacturer-upload-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 22px;
  border: 1px dashed rgba(44, 226, 208, 0.55);
  border-radius: 8px;
  background: #061412;
  color: #eafffb;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.manufacturer-upload-dropzone:hover,
.manufacturer-upload-dropzone:focus-within {
  border-color: var(--upload-cyan);
  background: #09221f;
}

.manufacturer-upload-start-sequence {
  width: 100%;
  min-width: 0;
  font: inherit;
}

.manufacturer-upload-start-sequence:focus-visible,
.manufacturer-upload-history-item button[data-action="open-delivery-sequence"]:focus-visible {
  outline: 2px solid var(--upload-cyan);
  outline-offset: 3px;
}

.manufacturer-upload-unavailable,
.manufacturer-upload-unavailable:hover {
  border-color: var(--upload-line-soft);
  background: #061412;
  cursor: default;
}

.manufacturer-upload-dropzone.is-dragover {
  border-color: #2ce2d0;
  background: rgba(44, 226, 208, 0.16);
  box-shadow: 0 0 0 3px rgba(44, 226, 208, 0.1);
}

.manufacturer-upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.manufacturer-dropzone-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border: 1px solid rgba(44, 226, 208, 0.55);
  border-radius: 8px;
  background: rgba(44, 226, 208, 0.1);
  color: var(--upload-cyan);
  font-size: 27px;
  line-height: 1;
}

.manufacturer-upload-dropzone strong,
.manufacturer-upload-dropzone small {
  display: block;
}

.manufacturer-upload-dropzone strong {
  font-size: 14px;
}

.manufacturer-upload-dropzone small {
  margin-top: 7px;
  color: var(--upload-muted);
  font-size: 11px;
}

.manufacturer-selected-files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 7px;
  min-height: 38px;
  color: #c7e5e0;
  font-size: 11px;
}

.manufacturer-selected-files.is-empty {
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(44, 226, 208, 0.1);
  border-radius: 6px;
  color: var(--upload-muted);
}

.manufacturer-selected-files span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(44, 226, 208, 0.16);
  border-radius: 6px;
  background: rgba(44, 226, 208, 0.05);
}

.manufacturer-selected-files b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manufacturer-selected-files small {
  color: var(--upload-muted);
}

.manufacturer-upload-remove {
  border: 0;
  background: transparent;
  color: #8be9de;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  padding: 0;
}

.manufacturer-upload-remove:hover,
.manufacturer-upload-remove:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.manufacturer-delivery-gallery {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.manufacturer-delivery-gallery .manufacturer-result-heading {
  margin-bottom: 0;
}

.manufacturer-delivery-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 10px;
}

.manufacturer-delivery-gallery-item {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid rgba(44, 226, 208, 0.24);
  border-radius: 8px;
  background: #061412;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.manufacturer-delivery-gallery-item:hover {
  border-color: var(--upload-cyan);
  background: #0b2b28;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.manufacturer-delivery-gallery-item:focus-visible {
  outline: 2px solid var(--upload-cyan);
  outline-offset: 3px;
}

.manufacturer-delivery-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #061412;
}

.manufacturer-delivery-gallery-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 10px;
  color: var(--upload-muted);
  font-size: 11px;
  text-align: center;
}

.manufacturer-delivery-gallery-item.is-error .manufacturer-delivery-gallery-fallback {
  display: grid;
}

.manufacturer-delivery-gallery-empty {
  display: grid;
  gap: 5px;
  padding: 22px 14px;
  border: 1px dashed rgba(44, 226, 208, 0.22);
  border-radius: 8px;
  background: rgba(44, 226, 208, 0.035);
  color: var(--upload-muted);
  text-align: center;
}

.manufacturer-delivery-gallery-empty strong {
  color: #d9f8f3;
  font-size: 13px;
}

.manufacturer-delivery-gallery-empty span {
  font-size: 11px;
}

.manufacturer-recognize-button {
  width: 100%;
  height: 80px;
}

#manufacturerTextEntry textarea {
  width: 100%;
  min-height: 174px;
  resize: vertical;
  border: 1px solid var(--upload-line);
  border-radius: 8px;
  background: #061412;
  color: #eafffb;
  font: inherit;
  font-size: 13px;
  line-height: 1.75;
}

#manufacturerTextEntry textarea:focus {
  border-color: var(--upload-cyan);
  outline: 2px solid rgba(44, 226, 208, 0.12);
}

.manufacturer-text-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manufacturer-text-actions span {
  color: var(--upload-muted);
  font-size: 11px;
}

.manufacturer-new-style-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manufacturer-new-style-meta label {
  display: grid;
  gap: 7px;
}

.manufacturer-new-style-meta span {
  color: var(--upload-muted);
  font-size: 11px;
}

.manufacturer-new-style-meta input {
  width: 100%;
  border-color: var(--upload-line);
  background: #061412;
}

.manufacturer-upload-result-section {
  display: grid;
  gap: 10px;
}

.manufacturer-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manufacturer-result-heading h3,
.manufacturer-upload-stats h3,
.manufacturer-storage-rules h3 {
  margin: 0;
  color: #f0fffc;
  font-size: 14px;
}

.manufacturer-result-heading span {
  color: #79aaa3;
  font-size: 11px;
}

.manufacturer-ocr-result {
  min-width: 0;
  padding: 14px;
  border-color: var(--upload-line);
  background: #061412;
}

.manufacturer-ocr-result.empty-state {
  min-height: 132px;
}

.manufacturer-ocr-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manufacturer-ocr-summary-head strong,
.manufacturer-ocr-summary-head span {
  display: block;
}

.manufacturer-ocr-summary-head strong {
  color: #eafffb;
  font-size: 13px;
}

.manufacturer-ocr-summary-head span {
  margin-top: 4px;
  color: var(--upload-muted);
  font-size: 10px;
}

.manufacturer-ocr-summary-head em {
  min-width: 62px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--upload-amber);
  background: rgba(245, 183, 63, 0.12);
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.manufacturer-ocr-summary-head em.is-ready {
  color: var(--upload-cyan);
  background: rgba(44, 226, 208, 0.1);
}

.manufacturer-ocr-reconciliation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(44, 226, 208, 0.24);
  border-radius: 7px;
  background: rgba(44, 226, 208, 0.05);
}

.manufacturer-ocr-reconciliation.is-warning {
  border-color: rgba(245, 183, 63, 0.46);
  background: rgba(245, 183, 63, 0.07);
}

.manufacturer-ocr-reconciliation > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border-radius: 6px;
  background: rgba(4, 15, 18, 0.48);
}

.manufacturer-ocr-reconciliation span,
.manufacturer-ocr-reconciliation strong,
.manufacturer-ocr-reconciliation em {
  overflow-wrap: anywhere;
}

.manufacturer-ocr-reconciliation span {
  color: var(--upload-muted);
  font-size: 10px;
}

.manufacturer-ocr-reconciliation strong {
  color: #eafffb;
  font-size: 11px;
}

.manufacturer-ocr-reconciliation em {
  color: var(--upload-cyan);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.manufacturer-ocr-reconciliation.is-warning em {
  color: var(--upload-amber);
}

.manufacturer-ocr-reconciliation p {
  grid-column: 1 / -1;
  margin: 0;
  color: #b9d8d3;
  font-size: 10px;
  line-height: 1.55;
}

.manufacturer-ocr-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.manufacturer-ocr-summary-grid div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(44, 226, 208, 0.12);
  border-radius: 6px;
  background: rgba(44, 226, 208, 0.04);
}

.manufacturer-ocr-summary-grid span,
.manufacturer-ocr-summary-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.manufacturer-ocr-summary-grid span {
  color: var(--upload-muted);
  font-size: 10px;
}

.manufacturer-ocr-summary-grid strong {
  margin-top: 4px;
  color: #e9fffb;
  font-size: 11px;
}

.manufacturer-ocr-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(44, 226, 208, 0.18);
  border-radius: 6px;
}

.manufacturer-ocr-table {
  width: 100%;
  min-width: 650px;
  table-layout: fixed;
  border-collapse: collapse;
}

.manufacturer-ocr-table th,
.manufacturer-ocr-table td {
  padding: 10px 9px;
  border-bottom: 1px solid rgba(44, 226, 208, 0.12);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.manufacturer-ocr-table th {
  background: #0a2b28;
  color: #acd5cf;
  font-size: 10px;
}

.manufacturer-ocr-table td {
  color: #ddf8f4;
  font-size: 11px;
}

.manufacturer-ocr-table tr:last-child td {
  border-bottom: 0;
}

.manufacturer-ocr-table td strong,
.manufacturer-ocr-table td small {
  display: block;
}

.manufacturer-ocr-table td small {
  margin-top: 4px;
  color: var(--upload-muted);
  font-size: 9px;
}

.manufacturer-line-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(44, 226, 208, 0.1);
  color: var(--upload-cyan);
  font-size: 10px;
}

.manufacturer-line-status.is-warning {
  background: rgba(245, 183, 63, 0.12);
  color: var(--upload-amber);
}

.manufacturer-ocr-total {
  color: #8bbcb5;
  font-size: 11px;
}

.manufacturer-ocr-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 18px;
  text-align: center;
}

.manufacturer-ocr-empty strong,
.manufacturer-ocr-empty span {
  display: block;
}

.manufacturer-ocr-empty span {
  margin-top: 7px;
  color: var(--upload-muted);
  font-size: 11px;
}

.manufacturer-ocr-details,
.manufacturer-ocr-raw {
  border-top-color: rgba(44, 226, 208, 0.16);
}

.manufacturer-ocr-details summary,
.manufacturer-ocr-raw summary {
  color: var(--upload-cyan);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.manufacturer-ocr-details > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.manufacturer-ocr-details p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
}

.manufacturer-ocr-details p span {
  color: var(--upload-muted);
}

.manufacturer-ocr-loading {
  min-height: 150px;
}

.manufacturer-ai-loading {
  display: grid;
  place-items: center;
  min-height: 120px;
  text-align: center;
}

.manufacturer-ai-loading > span {
  position: relative;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border: 2px solid rgba(44, 226, 208, 0.18);
  border-top-color: var(--upload-cyan);
  border-radius: 50%;
  animation: manufacturer-upload-spin 0.9s linear infinite;
}

.manufacturer-ai-loading strong,
.manufacturer-ai-loading small {
  display: block;
}

.manufacturer-ai-loading small {
  margin-top: 5px;
  color: var(--upload-muted);
}

.manufacturer-ocr-page-alert {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 185, 80, 0.38);
  border-radius: 7px;
  background: rgba(255, 157, 34, 0.09);
  color: #f8d29a;
}

.manufacturer-ocr-page-alert span,
.manufacturer-ocr-page-alert small {
  font-size: 11px;
}

.manufacturer-ocr-page-alert small {
  color: var(--upload-muted);
}

.zuaqiaoli-delivery-mode-panel {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid rgba(44, 226, 208, .28);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(44, 226, 208, .07), rgba(91, 135, 255, .04));
}

.zuaqiaoli-delivery-mode-heading,
.zuaqiaoli-delivery-mode-heading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.zuaqiaoli-delivery-mode-heading strong { font-size: 14px; }
.zuaqiaoli-delivery-mode-heading span { color: var(--upload-muted); font-size: 11px; }
.zuaqiaoli-delivery-mode-heading em {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--upload-amber);
  background: rgba(245, 183, 63, .1);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.zuaqiaoli-delivery-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.zuaqiaoli-delivery-mode-option {
  position: relative;
  min-height: 82px;
  padding: 13px 14px 13px 42px;
  border: 1px solid rgba(44, 226, 208, .25);
  border-radius: 10px;
  color: var(--upload-text);
  background: rgba(3, 20, 17, .58);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.zuaqiaoli-delivery-mode-option:hover:not(:disabled),
.zuaqiaoli-delivery-mode-option:focus-visible {
  border-color: var(--upload-cyan);
  outline: none;
}

.zuaqiaoli-delivery-mode-option.is-active {
  border-color: var(--upload-cyan);
  background: rgba(44, 226, 208, .1);
  box-shadow: 0 0 0 2px rgba(44, 226, 208, .06);
}

.zuaqiaoli-delivery-mode-option:disabled { cursor: not-allowed; opacity: .48; }
.zuaqiaoli-delivery-mode-option strong,
.zuaqiaoli-delivery-mode-option small { display: block; }
.zuaqiaoli-delivery-mode-option strong { font-size: 14px; }
.zuaqiaoli-delivery-mode-option small { margin-top: 5px; color: var(--upload-muted); font-size: 10px; }
.zuaqiaoli-mode-check {
  position: absolute;
  top: 15px;
  left: 14px;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(44, 226, 208, .45);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #03201b;
  font-size: 11px;
}
.is-active > .zuaqiaoli-mode-check { background: var(--upload-cyan); }
.zuaqiaoli-delivery-mode-note { margin: 10px 0 0; color: var(--upload-muted); font-size: 11px; }

@media (max-width: 720px) {
  .zuaqiaoli-delivery-mode-options { grid-template-columns: 1fr; }
  .zuaqiaoli-delivery-mode-heading,
  .zuaqiaoli-delivery-mode-heading > div { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .zuaqiaoli-delivery-mode-option { transition: none; }
}

@keyframes manufacturer-upload-spin {
  to { transform: rotate(360deg); }
}

.manufacturer-ocr-task,
.manufacturer-ocr-failure {
  display: grid;
  gap: 16px;
  align-content: center;
  min-height: 190px;
}

.manufacturer-ocr-task-head,
.manufacturer-ocr-failure-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.manufacturer-ocr-task-head strong,
.manufacturer-ocr-task-head small,
.manufacturer-ocr-failure-head strong,
.manufacturer-ocr-failure-head small {
  display: block;
}

.manufacturer-ocr-task-head small,
.manufacturer-ocr-failure-head small {
  margin-top: 4px;
  color: var(--upload-muted);
}

.manufacturer-ocr-task-spinner,
.manufacturer-ocr-failure-head > span {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.manufacturer-ocr-task-spinner {
  border: 2px solid rgba(44, 226, 208, 0.18);
  border-top-color: var(--upload-cyan);
  animation: manufacturer-upload-spin 0.9s linear infinite;
}

.manufacturer-ocr-task-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manufacturer-ocr-task-steps li {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #597c77;
  text-align: center;
  font-size: 9px;
}

.manufacturer-ocr-task-steps i {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #214a45;
  border-radius: 50%;
  font-style: normal;
}

.manufacturer-ocr-task-steps li.is-done,
.manufacturer-ocr-task-steps li.is-current {
  color: #bafaf2;
}

.manufacturer-ocr-task-steps li.is-done i,
.manufacturer-ocr-task-steps li.is-current i {
  border-color: var(--upload-cyan);
  background: rgba(44, 226, 208, 0.14);
  color: var(--upload-cyan);
}

.manufacturer-ocr-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  color: var(--upload-muted);
  font-size: 10px;
}

.manufacturer-ocr-task-meta code {
  color: #a8e9e1;
  word-break: break-all;
}

.manufacturer-ocr-failure {
  border-color: rgba(255, 118, 118, 0.35);
  background: rgba(61, 14, 20, 0.24);
}

.manufacturer-ocr-failure-head > span {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 118, 118, 0.55);
  background: rgba(255, 118, 118, 0.13);
  color: #ff9b9b;
  font-weight: 900;
}

.manufacturer-ocr-failure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .manufacturer-ocr-task-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 12px;
  }
}

.manufacturer-confirm-upload {
  width: 100%;
  min-height: 52px;
  margin-top: auto;
  border: 0;
  background: linear-gradient(100deg, #2bd8cb, #5689ff);
  color: #031110;
  font-size: 15px;
  font-weight: 900;
}

.manufacturer-confirm-upload:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.manufacturer-upload-validation {
  padding-bottom: 20px;
}

#manufacturerUploadInsights {
  display: grid;
  gap: 14px;
  padding: 0 20px;
}

.manufacturer-validation-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(44, 226, 208, 0.22);
  border-radius: 8px;
  background: #09211f;
}

.manufacturer-validation-card.is-warning {
  border-color: rgba(245, 183, 63, 0.5);
  background: #21190d;
}

.manufacturer-validation-card.is-idle {
  border-color: rgba(130, 170, 164, 0.2);
  background: #0a1716;
}

.manufacturer-validation-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--upload-cyan);
  color: #04110f;
  font-size: 16px;
  font-weight: 900;
}

.manufacturer-validation-card.is-warning .manufacturer-validation-icon {
  background: var(--upload-amber);
}

.manufacturer-validation-card.is-idle .manufacturer-validation-icon {
  background: #183b37;
  color: #91bbb5;
  font-size: 11px;
}

.manufacturer-validation-card strong {
  display: block;
  color: #eafffb;
  font-size: 13px;
}

.manufacturer-validation-card p {
  margin: 6px 0 0;
  color: var(--upload-muted);
  font-size: 11px;
  line-height: 1.55;
}

.manufacturer-upload-stats {
  display: grid;
  gap: 0;
  padding: 17px;
  border: 1px solid rgba(44, 226, 208, 0.18);
  border-radius: 8px;
  background: #081a18;
}

.manufacturer-upload-stats h3 {
  margin-bottom: 10px;
}

.manufacturer-upload-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 35px;
  border-top: 1px solid rgba(44, 226, 208, 0.1);
}

.manufacturer-upload-stats span {
  color: var(--upload-muted);
  font-size: 11px;
}

.manufacturer-upload-stats strong {
  color: #eafffb;
  font-size: 12px;
}

.manufacturer-upload-stats strong.is-success {
  color: var(--upload-cyan);
}

.manufacturer-storage-rules {
  display: grid;
  gap: 10px;
  margin: 16px 20px 0;
  padding: 17px;
  border: 1px solid rgba(130, 170, 164, 0.18);
  border-radius: 8px;
  background: #071312;
}

.manufacturer-storage-rules div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.manufacturer-storage-rules span {
  color: var(--upload-cyan);
  font-size: 11px;
  font-weight: 900;
}

.manufacturer-storage-rules p {
  margin: 0;
  color: var(--upload-muted);
  font-size: 10px;
  line-height: 1.55;
}

.manufacturer-upload-success-backdrop {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 7, 7, 0.76);
  backdrop-filter: blur(8px);
}

.manufacturer-upload-success-panel {
  position: relative;
  display: grid;
  place-items: center;
  width: min(540px, 100%);
  padding: 40px 46px 36px;
  border: 2px solid var(--upload-cyan, #2ce2d0);
  border-radius: 8px;
  background: #09211f;
  color: #effffc;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 46px rgba(44, 226, 208, 0.13);
}

.manufacturer-upload-success-panel > button:first-child {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #b7d7d2;
  cursor: pointer;
  font-size: 20px;
}

.manufacturer-success-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2bd8cb, #5689ff);
  color: #031110;
  font-size: 36px;
  font-weight: 900;
}

.manufacturer-upload-success-panel h2 {
  margin: 18px 0 0;
  font-size: 28px;
}

.manufacturer-upload-success-panel p {
  margin: 10px 0 0;
  color: #8fb9b3;
  font-size: 13px;
}

.manufacturer-upload-success-panel > strong {
  min-width: 270px;
  margin: 18px 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(44, 226, 208, 0.1);
  color: var(--upload-cyan, #2ce2d0);
  font-size: 12px;
}

.manufacturer-upload-success-panel .btn {
  width: min(270px, 100%);
}

.manufacturer-success-mark.is-warning {
  border-color: rgba(245, 183, 63, 0.55);
  background: rgba(245, 183, 63, 0.12);
  color: var(--upload-amber);
}

@media (max-width: 1380px) {
  .manufacturer-upload-topbar {
    padding-inline: 30px;
  }

  .manufacturer-upload-grid {
    grid-template-columns: minmax(250px, 0.72fr) minmax(500px, 1.28fr);
    padding: 28px 30px 40px;
  }

  .manufacturer-upload-validation {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .manufacturer-upload-validation #manufacturerUploadInsights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .manufacturer-delivery-gallery-grid {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
  }

  .manufacturer-storage-rules {
    grid-template-columns: auto repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 900px) {
  .manufacturer-upload-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 20px;
  }

  .manufacturer-upload-top-actions {
    width: 100%;
  }

  .manufacturer-sync-state,
  .manufacturer-upload-identity {
    flex: 1;
    justify-content: center;
  }

  .manufacturer-upload-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .manufacturer-upload-compose {
    order: 1;
  }

  .manufacturer-upload-history {
    order: 2;
    min-height: 0;
  }

  .manufacturer-upload-validation {
    order: 3;
  }

  .manufacturer-upload-history-list {
    max-height: none;
  }

  .manufacturer-upload-validation #manufacturerUploadInsights,
  .manufacturer-storage-rules {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .manufacturer-upload-topbar,
  .manufacturer-upload-grid {
    padding-inline: 14px;
  }

  .manufacturer-upload-brand {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
  }

  .manufacturer-upload-brand .brand-mark {
    width: 48px;
    height: 48px;
  }

  .manufacturer-upload-brand h1 {
    font-size: 22px;
  }

  .manufacturer-upload-top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .manufacturer-sync-state,
  .manufacturer-upload-identity {
    width: 100%;
  }

  .manufacturer-upload-compose {
    gap: 18px;
    padding: 19px 15px 20px;
  }

  .manufacturer-delivery-gallery-grid {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }

  .manufacturer-upload-panel-head,
  .manufacturer-entry-toolbar,
  .manufacturer-text-actions,
  .manufacturer-result-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .manufacturer-entry-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manufacturer-entry-switch span {
    grid-column: 1 / -1;
  }

  .manufacturer-entry-switch button {
    min-width: 0;
  }

  .manufacturer-new-style-meta,
  .manufacturer-ocr-summary-grid,
  .manufacturer-ocr-details > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manufacturer-ocr-reconciliation {
    grid-template-columns: 1fr;
  }

  .manufacturer-upload-history-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .manufacturer-upload-history-item em {
    width: max-content;
  }

  .manufacturer-delivery-gallery-grid {
    grid-template-columns: 1fr;
  }

  .manufacturer-upload-success-panel {
    padding: 36px 20px 26px;
  }

  .manufacturer-upload-success-panel h2 {
    font-size: 22px;
  }

  .manufacturer-upload-success-panel > strong {
    min-width: 0;
    width: 100%;
  }
}

/* PRD V1.3 operational surfaces */
.nav {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.prd-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px 2px;
}

.prd-page-head > div:first-child {
  min-width: 0;
}

.prd-page-head h2 {
  margin-top: 5px;
  font-size: 24px;
  line-height: 1.25;
}

.prd-page-head p {
  max-width: 72ch;
  margin-top: 7px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.6;
}

.prd-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.prd-alert-card {
  position: relative;
  min-width: 0;
  min-height: 148px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(10, 26, 28, 0.9), rgba(7, 16, 18, 0.72));
  box-shadow: var(--shadow);
}

.prd-alert-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
  content: "";
}

.prd-alert-2::before,
.prd-alert-4::before {
  background: var(--warning);
}

.prd-alert-3::before {
  background: #9d5cff;
}

.prd-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.prd-alert-head small {
  color: #d7efec;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.prd-alert-head span {
  color: var(--foreground);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.prd-alert-card p {
  margin-top: 28px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.prd-alert-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.prd-warning-strip,
.prd-success-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid rgba(246, 198, 111, 0.35);
  border-radius: var(--radius);
  background: rgba(246, 198, 111, 0.1);
}

.prd-warning-strip strong {
  color: var(--warning);
  white-space: nowrap;
}

.prd-warning-strip span,
.prd-success-panel span {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.55;
}

.prd-success-panel {
  border-color: rgba(33, 243, 211, 0.32);
  background: rgba(33, 243, 211, 0.1);
}

.prd-success-panel strong {
  color: var(--primary);
}

.prd-data-table,
.prd-edit-table {
  min-width: 980px;
}

.prd-edit-table input {
  min-width: 92px;
  padding: 8px 9px;
  font-size: 12px;
}

.prd-edit-table td:first-child {
  width: 42px;
  color: var(--muted-foreground);
}

.table-subline {
  display: block;
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.prd-image-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.prd-image-thumb {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  cursor: zoom-in;
}

.prd-image-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.prd-image-thumb span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(3, 12, 14, 0.82);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.prd-summary-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.prd-summary-form label,
.prd-check-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.prd-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.prd-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field > span {
  color: #dffaf6;
  font-size: 12px;
  font-weight: 800;
}

#deliveryReviewFilterForm,
#arrivalFilterForm,
.filter-bar.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.field-wide {
  grid-column: 1 / -1;
}

.compact-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  color: var(--muted-foreground);
  font-size: 12px;
}

.compact-check input {
  width: 16px;
}

.overdue-list {
  display: grid;
  gap: 8px;
}

.overdue-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.overdue-list span {
  color: var(--muted-foreground);
}

.text-danger {
  color: #ff8b82 !important;
  font-weight: 700;
}

.text-success {
  color: #72f7df !important;
}

.prd-danger-zone {
  border-color: rgba(255, 106, 95, 0.34);
}

.btn-danger {
  border: 1px solid rgba(255, 106, 95, 0.55);
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.prd-create-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.prd-create-panel > summary::-webkit-details-marker {
  display: none;
}

.prd-create-panel > summary strong {
  color: var(--primary);
  font-size: 12px;
}

.prd-style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.prd-style-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.prd-style-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(1, 8, 10, 0.8);
  text-decoration: none;
}

.prd-style-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prd-style-image span {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted-foreground);
  font-size: 11px;
}

.prd-style-body {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.prd-style-body > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.prd-style-body h3 {
  font-size: 14px;
  line-height: 1.35;
}

.prd-style-body p,
.prd-style-body small {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.5;
}

.prd-style-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.prd-style-actions a {
  text-decoration: none;
}

.prd-media-role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.prd-media-role-grid article {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prd-media-role-grid button {
  overflow: hidden;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  cursor: zoom-in;
}

.prd-media-role-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.prd-media-role-grid strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prd-media-role-grid label,
.prd-check-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.prd-media-role-grid input,
.prd-check-grid input {
  width: 16px;
}

.prd-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.prd-listing-list,
.prd-report-list {
  display: grid;
  gap: 9px;
}

.prd-listing-row,
.prd-report-list > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.prd-report-list > a {
  color: inherit;
  text-decoration: none;
}

.prd-report-list > a > div,
.prd-listing-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.prd-listing-main small,
.prd-report-list span {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted-foreground);
  font-size: 11px;
}

.prd-listing-actions,
.prd-listing-actions form,
.prd-receipt-forms {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.prd-listing-actions input {
  width: min(240px, 100%);
}

.prd-receipt-forms {
  width: 100%;
}

.prd-rule-modal {
  width: min(820px, calc(100vw - 28px));
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 8, 10, 0.78);
  backdrop-filter: blur(12px);
}

.modal-card {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(5, 15, 18, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.modal-header {
  border-bottom: 1px solid var(--border);
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

.modal-card > .field-grid {
  padding: 16px;
}

.table-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.table-actions button {
  padding: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
}

.audit-detail summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
}

.audit-detail pre {
  width: min(620px, 70vw);
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #02090a;
  color: #cae8e4;
  font-size: 10px;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 1280px) {
  .prd-alert-grid,
  .prd-style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prd-media-role-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .prd-page-head,
  .prd-warning-strip,
  .prd-success-panel,
  .prd-listing-row,
  .prd-report-list > a {
    align-items: stretch;
    flex-direction: column;
  }

  .prd-two-column,
  .prd-summary-form,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .prd-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prd-listing-actions,
  .prd-listing-actions form {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .prd-alert-grid,
  .prd-style-grid,
  .prd-media-role-grid,
  .prd-check-grid {
    grid-template-columns: 1fr;
  }

  .prd-page-head h2 {
    font-size: 20px;
  }

  .prd-page-head > .btn,
  .prd-action-row .btn,
  .prd-listing-actions .btn {
    width: 100%;
  }

  .prd-action-row,
  .prd-listing-actions,
  .prd-listing-actions form,
  .prd-receipt-forms {
    display: grid;
    grid-template-columns: 1fr;
  }

  .prd-listing-actions input,
  .audit-detail pre {
    width: 100%;
  }
}

/* Final V2 precedence: these components also carry legacy classes later in this file. */
.sidebar-session {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
}

body:not(.upload-standalone) .sidebar-footer .user-chip {
  min-width: 0;
  min-height: 30px;
  flex: 1;
  overflow: hidden;
  border-color: #28524e;
  background: #0a2524;
  color: #afd0cc;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.upload-standalone) .sidebar-footer #logoutBtn {
  min-height: 30px;
  padding: 0 9px;
  border-color: #28524e;
  background: #0a2524;
  color: #afd0cc;
  font-size: 10px;
}

.dashboard-command-band.v2-dashboard-command {
  min-height: 138px;
  margin: 0;
  padding: 26px 30px;
  border-color: var(--v2-line);
  background: #071516;
  box-shadow: none;
}

.prd-alert-card.v2-alert-card {
  display: grid;
  align-content: start;
  min-height: 238px;
  padding: 20px 22px;
  border-width: 2px;
  box-shadow: none;
}

.prd-alert-card.v2-alert-amber {
  border-color: #bc7a0b;
  background: linear-gradient(145deg, rgba(99, 59, 4, 0.52), rgba(40, 28, 8, 0.76));
}

.prd-alert-card.v2-alert-rose {
  border-color: #bb4c59;
  background: linear-gradient(145deg, rgba(92, 25, 34, 0.48), rgba(45, 20, 24, 0.76));
}

.prd-alert-card.v2-alert-violet {
  border-color: #7561da;
  background: linear-gradient(145deg, rgba(64, 48, 132, 0.48), rgba(30, 27, 65, 0.78));
}

.prd-alert-card.v2-alert-cyan {
  border-color: #2ca9bc;
  background: linear-gradient(145deg, rgba(22, 84, 92, 0.46), rgba(12, 43, 47, 0.8));
}

.prd-alert-card.v2-alert-card p {
  margin-top: 18px;
  color: #a9bfbb;
}

.prd-alert-card.v2-alert-card a {
  display: inline-block;
  align-self: end;
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid currentColor;
  border-radius: 7px;
  text-align: center;
}

.card.v2-manufacturer-hero {
  border-color: #28645e;
  background: linear-gradient(110deg, rgba(17, 83, 75, 0.72), rgba(20, 52, 76, 0.78) 58%, rgba(62, 38, 108, 0.76));
}

@media (max-width: 900px) {
  body:not(.upload-standalone) .sidebar {
    position: sticky;
  }

  body:not(.upload-standalone) .brand {
    padding-right: 52px;
  }

  body:not(.upload-standalone) .sidebar-footer {
    position: absolute;
    top: 14px;
    right: 12px;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body:not(.upload-standalone) .sidebar-footer > strong,
  body:not(.upload-standalone) .sidebar-footer > span,
  body:not(.upload-standalone) .sidebar-footer .user-chip {
    display: none;
  }

  body:not(.upload-standalone) .sidebar-footer #logoutBtn {
    min-width: 44px;
  }
}

/* Mixed inventory workbench V2 alignment */
body.mixed-workbench-mode .viewer-shell {
  border-color: #d7e3e0;
  background: #f2f6f5;
  box-shadow: 0 16px 38px rgba(31, 55, 51, 0.08);
  scrollbar-color: #a9c8c0 #f2f6f5;
}

body.mixed-workbench-mode .page-root {
  width: 100%;
  max-width: 1740px;
  min-height: 100%;
  padding: 28px 28px 48px;
  display: block;
  color: #172126;
}

.mixed-inventory-page {
  --mixed-ink: #172126;
  --mixed-muted: #6b787d;
  --mixed-line: #dde6e5;
  --mixed-line-strong: #cbd9d7;
  --mixed-paper: #fff;
  --mixed-wash: #f2f6f5;
  --mixed-green: #096b57;
  --mixed-green-2: #12836b;
  --mixed-green-soft: #e8f5f0;
  --mixed-orange: #df7b22;
  --mixed-orange-soft: #fff2e4;
  display: grid;
  gap: 18px;
  min-width: 0;
  color: var(--mixed-ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

.mixed-workbench-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(320px, 0.7fr);
  gap: 24px;
  align-items: center;
  min-height: 266px;
  padding: 31px 36px;
  color: #fff;
  border: 0;
  border-radius: 25px;
  background: linear-gradient(118deg, #095f50, #08735e 58%, #108068);
  box-shadow: 0 22px 54px rgba(9, 100, 81, 0.18);
}

.mixed-workbench-hero::after {
  position: absolute;
  right: -82px;
  top: -142px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  content: "";
}

.mixed-workbench-hero-copy,
.mixed-workbench-rule-entry,
.mixed-workbench-metrics {
  position: relative;
  z-index: 1;
}

.mixed-workbench-hero-copy {
  min-width: 0;
}

.mixed-workbench-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: #caf1e6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mixed-workbench-eyebrow::before {
  width: 20px;
  height: 1px;
  background: currentColor;
  content: "";
}

.mixed-workbench-hero h2 {
  margin: 0;
  color: #fff;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.mixed-workbench-hero p {
  max-width: 700px;
  margin: 13px 0 0;
  color: rgba(241, 255, 251, 0.76);
  font-size: 12px;
  line-height: 1.75;
}

.mixed-workbench-rule-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 154px;
  padding: 14px 16px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, background 0.18s ease;
}

.mixed-workbench-rule-entry:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.mixed-workbench-rule-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--mixed-green);
  border-radius: 10px;
  background: #fff;
  font-size: 18px;
  font-weight: 900;
}

.mixed-workbench-rule-entry strong,
.mixed-workbench-rule-entry small {
  display: block;
}

.mixed-workbench-rule-entry strong {
  font-size: 12px;
}

.mixed-workbench-rule-entry small {
  margin-top: 3px;
  color: rgba(241, 255, 251, 0.72);
  font-size: 11px;
}

.mixed-workbench-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.mixed-workbench-metrics article {
  min-width: 0;
  min-height: 78px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.mixed-workbench-metrics strong,
.mixed-workbench-metrics span {
  display: block;
  overflow-wrap: anywhere;
}

.mixed-workbench-metrics strong {
  color: #fff;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.mixed-workbench-metrics span {
  margin-top: 5px;
  color: rgba(240, 255, 250, 0.7);
  font-size: 10px;
}

.mixed-workbench-layout {
  display: grid;
  grid-template-columns: minmax(500px, 0.94fr) minmax(420px, 1.06fr);
  gap: 18px;
  align-items: start;
}

.mixed-workbench-right-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

body.mixed-workbench-mode .mixed-inventory-page .mixed-workbench-panel,
body.mixed-workbench-mode .mixed-inventory-page .mixed-workbench-state-panel {
  overflow: hidden;
  border: 1px solid rgba(210, 222, 220, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--mixed-ink);
  box-shadow: 0 18px 50px rgba(31, 55, 51, 0.09);
  backdrop-filter: none;
}

.mixed-workbench-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 17px;
  border-bottom: 1px solid var(--mixed-line);
}

.mixed-workbench-panel-head h2 {
  margin: 0;
  color: var(--mixed-ink);
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

.mixed-workbench-panel-head p {
  margin: 6px 0 0;
  color: var(--mixed-muted);
  font-size: 11px;
  line-height: 1.6;
}

.mixed-workbench-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mixed-green);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.mixed-workbench-step::before,
.mixed-reminder-count i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20a474;
  box-shadow: 0 0 0 4px rgba(32, 164, 116, 0.11);
  content: "";
}

.mixed-inventory-source {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin: 18px 22px 0;
  padding: 12px 13px;
  border: 1px solid #cce0db;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff8f5, #fbfdfc);
}

.mixed-inventory-source > span,
.mixed-master-source > div > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  border-radius: 11px;
  background: var(--mixed-green);
  font-weight: 900;
}

.mixed-inventory-source div,
.mixed-master-source > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mixed-inventory-source strong,
.mixed-master-source strong {
  color: var(--mixed-ink);
  font-size: 12px;
}

.mixed-inventory-source small,
.mixed-master-source small {
  overflow-wrap: anywhere;
  color: var(--mixed-muted);
  font-size: 10px;
}

.mixed-inventory-source code {
  color: var(--mixed-green);
  font-size: 10px;
}

.mixed-inventory-fields {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 10px;
  padding: 18px 22px 0;
}

.mixed-inventory-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mixed-inventory-fields label > span {
  color: #536166;
  font-size: 10px;
  font-weight: 900;
}

.mixed-inventory-fields select,
.mixed-inventory-fields input {
  width: 100%;
  min-width: 0;
  height: 39px;
  padding: 0 10px;
  color: var(--mixed-ink);
  border: 1px solid var(--mixed-line-strong);
  border-radius: 10px;
  outline: 0;
  background: #fbfdfc;
  font-size: 12px;
}

.mixed-inventory-fields input[readonly] {
  color: #4c5a5f;
  background: #f3f7f5;
}

.mixed-inventory-fields select:focus,
.mixed-inventory-fields input:focus,
.mixed-inventory-change:focus {
  border-color: #68af9d;
  box-shadow: 0 0 0 3px rgba(18, 131, 107, 0.09);
}

.mixed-inventory-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 22px 0;
  padding: 14px 15px;
  border: 1px solid #cfe1dc;
  border-radius: 11px;
  background: #f4faf8;
}

.mixed-inventory-total span {
  color: var(--mixed-muted);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 700;
}

.mixed-inventory-total strong {
  color: var(--mixed-green);
  font-size: 18px;
  white-space: nowrap;
}

.mixed-inventory-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 19px 22px 9px;
}

.mixed-inventory-section-title h3 {
  margin: 0;
  color: var(--mixed-ink);
  font-size: 13px;
}

.mixed-inventory-section-title span {
  color: var(--mixed-muted);
  font-size: 10px;
}

.mixed-inventory-table {
  margin: 0 22px;
  overflow: hidden;
  border: 1px solid var(--mixed-line);
  border-radius: 12px;
}

.mixed-inventory-stock-head,
.mixed-inventory-stock-row {
  display: grid;
  grid-template-columns: minmax(105px, 1.2fr) minmax(90px, 1fr) minmax(100px, 1fr) minmax(90px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 12px;
}

.mixed-inventory-stock-head {
  min-height: 38px;
  color: #748186;
  background: #f7f9f8;
  font-size: 10px;
  font-weight: 900;
}

.mixed-inventory-stock-head span:not(:first-child),
.mixed-inventory-current,
.mixed-inventory-final {
  text-align: right;
}

.mixed-inventory-stock-row {
  border-top: 1px solid var(--mixed-line);
  color: var(--mixed-ink);
  font-size: 11px;
}

.mixed-inventory-stock-row.is-mixed {
  background: linear-gradient(90deg, #edf8f4, #f9fcfb);
}

.mixed-inventory-stock-row.is-excluded {
  color: #9aa5a7;
}

.mixed-inventory-color {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mixed-inventory-color strong {
  overflow-wrap: anywhere;
}

.mixed-inventory-color small {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--mixed-green);
  background: #dff0eb;
  font-size: 9px;
}

.mixed-inventory-stock-row.is-excluded .mixed-inventory-color small {
  color: #9c5d21;
  background: var(--mixed-orange-soft);
}

.mixed-inventory-current,
.mixed-inventory-final {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.mixed-inventory-final.is-changed,
.mixed-positive {
  color: var(--mixed-green);
}

.mixed-inventory-final.is-invalid {
  color: #b84a3e;
}

.mixed-inventory-change {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  color: var(--mixed-ink);
  text-align: right;
  border: 1px solid var(--mixed-line-strong);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

.mixed-inventory-change:disabled {
  color: #9aa5a7;
  background: #f3f5f4;
}

.mixed-inventory-change.is-positive {
  color: var(--mixed-green);
  font-weight: 900;
}

.mixed-inventory-change.is-negative {
  color: var(--mixed-orange);
  font-weight: 900;
}

.mixed-inventory-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 14px 22px 0;
}

.mixed-inventory-checks > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 8px;
  color: #526065;
  border: 1px solid var(--mixed-line);
  border-radius: 9px;
  background: #f8faf9;
  font-size: 10px;
  line-height: 1.4;
}

.mixed-inventory-checks > div span {
  display: grid;
  place-items: center;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #269873;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.mixed-inventory-checks .is-fail {
  border-color: #ecc7c2;
  color: #a14f47;
  background: #fdf4f2;
}

.mixed-inventory-checks .is-fail span {
  background: #b84a3e;
}

.mixed-inventory-reason {
  margin: 14px 22px 0;
  padding: 11px 13px;
  border: 1px solid #efd6b9;
  border-radius: 8px;
  background: #fffaf4;
  color: #9c5d21;
  font-size: 11px;
  line-height: 1.5;
}

.mixed-inventory-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 22px 22px;
}

.mixed-inventory-page .btn-primary {
  border-color: var(--mixed-green);
  background: var(--mixed-green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(9, 107, 87, 0.16);
}

.mixed-inventory-page .btn-primary:hover {
  background: #075c4c;
}

.mixed-inventory-page .btn-outline,
.mixed-inventory-page .small-button {
  border-color: var(--mixed-line-strong);
  background: #f2f6f5;
  color: #4c5b5f;
}

.mixed-inventory-page .btn-outline:hover,
.mixed-inventory-page .small-button:hover {
  border-color: #84baad;
  background: var(--mixed-green-soft);
  color: var(--mixed-green);
}

.mixed-workbench-panel-head > .mixed-reminder-count,
.mixed-reminder-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--mixed-green);
  border: 1px solid var(--mixed-line);
  border-radius: 999px;
  background: #fbfdfc;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.mixed-sales-total {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.mixed-sales-total small,
.mixed-sales-total span {
  color: var(--mixed-muted);
  font-size: 10px;
}

.mixed-sales-total strong {
  color: var(--mixed-green);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.mixed-sales-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 176px;
  margin: 16px 20px 0;
  padding: 15px 13px 0;
  border: 1px solid var(--mixed-line);
  border-radius: 13px;
  background: linear-gradient(180deg, #fbfdfc, #f5f9f7);
}

.mixed-sales-chart > div {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.mixed-sales-chart span,
.mixed-sales-chart small {
  color: #647277;
  font-size: 9px;
  white-space: nowrap;
}

.mixed-sales-chart i {
  display: block;
  width: min(30px, 70%);
  min-height: 6px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #22a17f, #0b705a);
  box-shadow: 0 5px 12px rgba(11, 112, 90, 0.12);
}

.mixed-sales-chart-empty {
  grid-column: 1 / -1;
  display: grid !important;
  place-items: center;
  color: var(--mixed-muted);
  font-size: 11px;
}

.mixed-sales-empty-note {
  margin: 12px 20px 18px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f3f7f5;
  color: var(--mixed-muted);
  font-size: 10px;
  line-height: 1.5;
}

.mixed-reminder-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 14px 20px;
}

.mixed-reminder-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--mixed-line);
  border-radius: 12px;
  background: #fbfcfc;
}

.mixed-reminder-row.is-current {
  border-color: #c8e0da;
  background: linear-gradient(100deg, #edf8f4, #fbfdfc);
}

.mixed-reminder-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--mixed-green);
  border-radius: 11px;
  background: var(--mixed-green-soft);
  font-size: 15px;
  font-weight: 900;
}

.mixed-reminder-row > div:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mixed-reminder-row strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.mixed-reminder-row small,
.mixed-reminder-row em {
  color: var(--mixed-muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
}

.mixed-reminder-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mixed-reminder-actions select {
  width: 92px;
  min-height: 32px;
  padding: 0 7px;
  color: #566469;
  border: 1px solid var(--mixed-line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
}

.mixed-reminder-actions .small-button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 10px;
}

.mixed-inventory-reminders .card-footer,
.mixed-inventory-master .card-footer {
  border-top: 1px solid var(--mixed-line);
  background: #fff;
}

.mixed-inventory-reminders .dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 18px;
  color: var(--mixed-muted);
  font-size: 10px;
}

.mixed-inventory-reminders .dashboard-pagination > div {
  display: flex;
  gap: 6px;
}

.mixed-inventory-master {
  grid-column: 1 / -1;
}

.mixed-master-source,
.mixed-master-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 20px;
}

.mixed-master-source > div {
  display: grid;
  grid-template-columns: 40px auto;
  column-gap: 10px;
}

.mixed-master-source > div > span {
  grid-row: 1 / 3;
}

.mixed-master-table {
  min-width: 860px;
  color: var(--mixed-ink);
}

.mixed-master-table th {
  height: 38px;
  padding: 0 14px;
  color: #748186;
  background: #f7f9f8;
  font-size: 10px;
}

body.mixed-workbench-mode .viewer-shell table.mixed-master-table th {
  color: #748186;
  border-color: var(--mixed-line);
  background: #f7f9f8;
}

.mixed-master-table td {
  height: 56px;
  padding: 9px 14px;
  border-color: var(--mixed-line);
  font-size: 11px;
}

body.mixed-workbench-mode .viewer-shell table.mixed-master-table td {
  color: var(--mixed-ink);
  border-color: var(--mixed-line);
  background: #fff;
}

.mixed-master-table th:first-child,
.mixed-master-table td:first-child {
  width: 48px;
  text-align: center;
}

.mixed-master-table input[type="checkbox"] {
  accent-color: var(--mixed-green);
}

.mixed-master-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  color: #416f97;
  border-radius: 7px;
  background: #edf4fa;
  font-weight: 900;
}

.mixed-master-location::before {
  content: "⌖";
}

.mixed-master-deductions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mixed-master-deductions span {
  padding: 4px 6px;
  color: #a35c18;
  border-radius: 6px;
  background: var(--mixed-orange-soft);
  font-size: 10px;
  font-weight: 900;
}

.mixed-master-status {
  display: grid;
  gap: 3px;
}

.mixed-master-status small {
  color: var(--mixed-muted);
  font-size: 9px;
}

.mixed-inventory-page .status-chip,
.mixed-inventory-page .badge {
  color: var(--mixed-green);
  border: 0;
  background: var(--mixed-green-soft);
  font-size: 10px;
}

.mixed-master-footer {
  margin: 0;
  padding: 14px 20px 20px;
  color: var(--mixed-muted);
  font-size: 10px;
}

.mixed-master-footer strong {
  color: var(--mixed-green);
  font-size: 14px;
}

.mixed-master-footer > div:last-child {
  display: flex;
  gap: 8px;
}

.mixed-workbench-state-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 230px;
  padding: 32px;
  text-align: left;
}

.mixed-workbench-empty-panel {
  justify-content: flex-start;
}

.mixed-workbench-state-panel > div:not(.mixed-color-progress):first-child {
  min-width: 0;
}

.mixed-workbench-state-panel strong {
  color: var(--mixed-ink);
  font-size: 17px;
}

.mixed-workbench-state-panel p {
  margin: 7px 0 0;
  color: var(--mixed-muted);
  font-size: 12px;
  line-height: 1.6;
}

.mixed-workbench-state-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  color: #fff;
  border-radius: 13px;
  background: var(--mixed-green);
  font-size: 18px;
  font-weight: 900;
}

.mixed-workbench-state-panel .mixed-color-progress {
  flex: 1;
  max-width: 520px;
}

.mixed-workbench-state-panel .mixed-color-progress-head > span {
  color: var(--mixed-green);
}

.mixed-workbench-state-panel .mixed-color-progress-track {
  background: #e6efec;
}

.mixed-workbench-state-panel .mixed-color-progress-track i {
  background: linear-gradient(90deg, #20a474, #096b57);
  box-shadow: none;
}

.mixed-workbench-state-panel.is-failed {
  border-color: #ecc7c2 !important;
  background: #fdf4f2 !important;
}

.mixed-workbench-state-panel.is-failed strong {
  color: #a14f47;
}

.mixed-confirm-warning {
  margin: 0 0 15px;
  padding: 11px 12px;
  border: 1px solid #efd6b9;
  border-radius: 8px;
  background: #fffaf4;
  color: #9c5d21;
  font-size: 11px;
  line-height: 1.5;
}

.mixed-inventory-page .dialog-panel {
  border-color: var(--mixed-line-strong);
  background: #fff;
  color: var(--mixed-ink);
  box-shadow: 0 30px 90px rgba(31, 55, 51, 0.22);
}

.mixed-inventory-page .dialog-head {
  border-color: var(--mixed-line);
}

.mixed-inventory-page .field > span,
.mixed-inventory-page .field label {
  color: #536166;
}

.mixed-inventory-page .mixed-color-risk-check {
  color: var(--mixed-ink);
}

.mixed-execution-page {
  gap: 18px;
}

.mixed-execution-hero {
  min-height: 220px;
}

.mixed-execution-panel {
  display: block;
}

.mixed-execution-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.mixed-execution-head p {
  margin-top: 5px;
}

.mixed-execution-summary {
  display: flex;
  gap: 24px;
  margin-top: 18px;
  color: var(--mixed-muted);
  font-size: 11px;
}

.mixed-execution-summary strong {
  margin-left: 4px;
  color: var(--mixed-green);
  font-size: 16px;
}

.mixed-execution-results .mixed-workbench-panel-head {
  border-bottom: 1px solid var(--mixed-line);
}

@media (max-width: 1500px) {
  .mixed-workbench-hero {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  }

  .mixed-workbench-hero-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1280px) {
  .mixed-workbench-layout {
    grid-template-columns: minmax(460px, 0.92fr) minmax(380px, 1.08fr);
  }
}

@media (max-width: 1100px) {
  .mixed-workbench-hero,
  .mixed-workbench-layout {
    grid-template-columns: 1fr;
  }

  .mixed-workbench-hero {
    align-items: start;
  }

  .mixed-workbench-rule-entry {
    width: max-content;
  }

  .mixed-workbench-metrics {
    width: min(100%, 520px);
  }
}

@media (max-width: 720px) {
  body.mixed-workbench-mode .page-root {
    padding: 16px 12px 30px;
  }

  .mixed-workbench-hero {
    padding: 25px 22px;
  }

  .mixed-workbench-hero h2 {
    font-size: 28px;
  }

  .mixed-workbench-metrics,
  .mixed-inventory-fields,
  .mixed-inventory-checks {
    grid-template-columns: 1fr;
  }

  .mixed-inventory-fields {
    padding-inline: 14px;
  }

  .mixed-inventory-source {
    grid-template-columns: 40px minmax(0, 1fr);
    margin-inline: 14px;
  }

  .mixed-inventory-source code {
    grid-column: 1 / -1;
  }

  .mixed-inventory-total,
  .mixed-inventory-section-title {
    margin-inline: 14px;
  }

  .mixed-inventory-table {
    margin-inline: 14px;
    overflow-x: auto;
  }

  .mixed-inventory-stock-head,
  .mixed-inventory-stock-row {
    min-width: 620px;
  }

  .mixed-inventory-checks {
    padding-inline: 14px;
  }

  .mixed-inventory-actions,
  .mixed-master-footer,
  .mixed-execution-head {
    align-items: stretch;
    flex-direction: column;
  }

  .mixed-inventory-actions .btn,
  .mixed-master-footer .btn,
  .mixed-workbench-state-panel .btn {
    width: 100%;
  }

  .mixed-reminder-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .mixed-reminder-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

  .mixed-reminder-actions select,
  .mixed-reminder-actions .small-button {
    flex: 1 1 120px;
  }

  .mixed-workbench-state-panel {
    align-items: stretch;
    flex-direction: column;
    text-align: left;
  }

  .mixed-workbench-state-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .mixed-master-source,
  .mixed-master-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .mixed-master-footer > div:last-child {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media print {
  body.mixed-workbench-mode .viewer-shell,
  body.mixed-workbench-mode .page-root {
    overflow: visible;
    background: #fff;
    box-shadow: none;
  }

  body.mixed-workbench-mode .mixed-workbench-hero,
  body.mixed-workbench-mode .mixed-workbench-layout,
  body.mixed-workbench-mode .mixed-execution-hero,
  body.mixed-workbench-mode .mixed-execution-panel {
    display: none !important;
  }

  body.mixed-workbench-mode .mixed-inventory-master {
    display: block !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
/* AI workbench integration */
.ai-workbench-page { display: grid; gap: 18px; }
.ai-workbench-hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 20px 22px; border: 1px solid rgba(111,140,255,.24); border-radius: 16px; background: linear-gradient(135deg, rgba(32,48,92,.78), rgba(15,24,46,.9)); }
.ai-workbench-hero h2 { margin: 7px 0 6px; font-size: 24px; letter-spacing: -.03em; }
.ai-workbench-hero p { margin: 0; color: var(--muted-text, #8c9abb); font-size: 12px; }
.ai-workbench-hero-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ai-live-indicator { color: #75dfaa; font-size: 11px; }
.ai-live-indicator i, .ai-context-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #62d69b; box-shadow: 0 0 0 4px rgba(98,214,155,.12); }
.ai-workbench-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ai-workbench-metric { display: block; padding: 15px 16px; border: 1px solid var(--card-border, rgba(165,180,220,.14)); border-radius: 13px; background: rgba(17,27,49,.76); text-decoration: none; transition: border-color .2s, transform .2s; }
.ai-workbench-metric:hover { border-color: rgba(111,140,255,.55); transform: translateY(-1px); }
.ai-workbench-metric span, .ai-workbench-metric small { display: block; color: #8c9abb; font-size: 11px; }
.ai-workbench-metric strong { display: block; margin: 7px 0 4px; color: #f4f7ff; font-size: 25px; letter-spacing: -.04em; }
.ai-workbench-layout { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(300px, .68fr); gap: 16px; }
.ai-chat-card { min-height: 620px; display: flex; flex-direction: column; }
.ai-chat-card .card-header, .ai-workbench-page .card-header { align-items: flex-start; }
.ai-chat-card .card-title p { max-width: 560px; }
.ai-context-bar { display: flex; align-items: center; gap: 8px; padding: 10px 17px; border-bottom: 1px solid var(--card-border, rgba(165,180,220,.14)); background: rgba(45,62,112,.2); color: #aab7d4; font-size: 11px; }
.ai-context-bar b { color: #e8edff; font-weight: 600; }
.ai-context-bar .btn { margin-left: auto; padding: 4px 9px; font-size: 10px; }
.ai-conversation { flex: 1; overflow: auto; padding: 17px; display: flex; flex-direction: column; gap: 14px; max-height: 470px; }
.ai-message { display: flex; align-items: flex-start; gap: 9px; max-width: 94%; }
.ai-message-user { align-self: flex-end; flex-direction: row-reverse; }
.ai-message-avatar { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 8px; background: #2a3b6d; color: #d4ddff; font-size: 10px; font-weight: 700; }
.ai-message-user .ai-message-avatar { background: #2b555a; color: #c1fff6; }
.ai-bubble { padding: 10px 12px; border: 1px solid var(--card-border, rgba(165,180,220,.14)); border-radius: 12px; border-top-left-radius: 3px; background: var(--card-bg, rgba(21,31,54,.96)); color: #c6d0e7; font-size: 12px; line-height: 1.7; }
.ai-message-user .ai-bubble { border-top-left-radius: 12px; border-top-right-radius: 3px; background: #293d73; color: #f4f7ff; }
.ai-bubble p { margin: 0; }
.ai-bubble p b { color: #aab9ff; }
.ai-suggestion-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ai-suggestion-row button { border: 1px solid rgba(111,140,255,.28); border-radius: 6px; padding: 5px 8px; color: #aebcff; background: rgba(111,140,255,.08); font-size: 10px; }
.ai-plan { margin-top: 10px; padding: 11px; border: 1px solid rgba(111,140,255,.28); border-radius: 10px; background: rgba(18,29,60,.8); }
.ai-plan-head, .ai-plan-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ai-plan-head { margin-bottom: 9px; color: #e1e7ff; font-size: 11px; }
.ai-plan-head span { color: #91a2e5; font-size: 9px; }
.ai-plan-step { display: flex; align-items: center; gap: 8px; margin: 7px 0; color: #c4cee5; font-size: 10px; }
.ai-plan-step i { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: #2e417b; color: #d7e0ff; font-style: normal; font-size: 9px; }
.ai-plan-step.done i { color: #67d69d; background: rgba(103,214,157,.15); }
.ai-plan-step.current i { color: #f5bd66; background: rgba(245,189,102,.15); }
.ai-plan-footer { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(165,180,220,.11); }
.ai-plan-footer small { color: #8392b6; font-size: 9px; }
.ai-plan-footer .btn { padding: 5px 9px; font-size: 10px; }
.ai-composer { padding: 12px 14px 14px; border-top: 1px solid var(--card-border, rgba(165,180,220,.14)); }
.ai-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-composer textarea { width: 100%; min-height: 44px; resize: vertical; border: 1px solid rgba(145,162,212,.22); border-radius: 9px; padding: 9px; color: var(--text-color, #f4f7ff); background: rgba(10,16,30,.7); font: inherit; font-size: 12px; }
.ai-composer textarea:focus { outline: 2px solid rgba(111,140,255,.5); outline-offset: 1px; }
.ai-composer small { color: #7181a4; font-size: 10px; }
.ai-composer .btn { padding: 5px 12px; font-size: 11px; }
.ai-workbench-side { display: flex; flex-direction: column; gap: 16px; }
.ai-workbench-task-list { padding: 5px 10px 10px; }
.ai-workbench-task-row { display: flex; align-items: flex-start; gap: 9px; padding: 11px 7px; border-bottom: 1px solid rgba(165,180,220,.08); text-decoration: none; }
.ai-workbench-task-row:last-child { border-bottom: 0; }
.ai-task-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 5px; border-radius: 50%; background: #f5bd66; box-shadow: 0 0 0 4px rgba(245,189,102,.1); }
.ai-task-dot.danger { background: #fb7d8b; box-shadow: 0 0 0 4px rgba(251,125,139,.1); }
.ai-task-dot.success { background: #65d69b; box-shadow: 0 0 0 4px rgba(101,214,155,.1); }
.ai-task-copy { min-width: 0; flex: 1; }
.ai-task-copy strong, .ai-task-copy small { display: block; }
.ai-task-copy strong { overflow: hidden; color: #c7d1e8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ai-task-copy small { margin-top: 4px; color: #8190b2; font-size: 9px; }
.ai-task-tag { padding: 3px 5px; border-radius: 4px; color: #f5bd66; background: rgba(245,189,102,.1); font-size: 8px; font-style: normal; white-space: nowrap; }
.ai-task-tag.danger { color: #fb7d8b; background: rgba(251,125,139,.1); }.ai-task-tag.success { color: #65d69b; background: rgba(101,214,155,.1); }
.ai-workbench-empty { padding: 16px 8px; color: #8493b7; font-size: 11px; }
.ai-approval-count { color: #f5bd66; font-size: 10px; }
.ai-approval-list { padding: 8px 15px 12px; }
.ai-approval-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid rgba(165,180,220,.08); }
.ai-approval-row:last-child { border-bottom: 0; }.ai-approval-row > div { min-width: 0; flex: 1; }.ai-approval-row strong, .ai-approval-row small { display: block; }.ai-approval-row strong { color: #c7d1e8; font-size: 10px; }.ai-approval-row small { margin-top: 4px; color: #8190b2; font-size: 9px; }.ai-approval-row .btn { padding: 4px 8px; font-size: 9px; }
.ai-flow-card { padding-bottom: 13px; }.ai-flow-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 12px 13px 0; position: relative; }.ai-flow-line::before { content: ""; position: absolute; top: 22px; left: 10%; right: 10%; height: 1px; background: rgba(111,140,255,.28); }.ai-flow-line span { position: relative; z-index: 1; text-align: center; color: #8493b7; font-size: 9px; }.ai-flow-line i { display: grid; place-items: center; width: 21px; height: 21px; margin: 0 auto 5px; border: 1px solid rgba(142,164,255,.35); border-radius: 50%; color: #a4b3ff; background: #25345f; font-size: 9px; font-style: normal; }.ai-flow-line .done i { color: #65d69b; background: rgba(101,214,155,.13); }.ai-flow-line .current i { color: #f5bd66; background: rgba(245,189,102,.15); box-shadow: 0 0 0 4px rgba(245,189,102,.07); }
.ai-workbench-modal.hidden { display: none; }.ai-workbench-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(3,6,15,.68); }.ai-workbench-modal-panel { width: min(470px, calc(100% - 28px)); position: relative; padding: 21px; border: 1px solid rgba(165,180,220,.19); border-radius: 14px; background: #121b31; box-shadow: 0 25px 80px rgba(0,0,0,.38); }.ai-workbench-modal-panel h2 { margin: 7px 0 6px; font-size: 18px; }.ai-workbench-modal-panel p { color: #8c9abb; font-size: 11px; line-height: 1.6; }.ai-modal-close { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; border: 1px solid rgba(165,180,220,.16); border-radius: 7px; color: #c4cee5; background: transparent; }.ai-modal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 15px; }.ai-modal-grid div { padding: 9px; border: 1px solid rgba(165,180,220,.11); border-radius: 8px; background: rgba(15,24,43,.7); }.ai-modal-grid small, .ai-modal-grid strong { display: block; }.ai-modal-grid small { color: #8291b4; font-size: 9px; }.ai-modal-grid strong { margin-top: 4px; color: #d3dcf3; font-size: 11px; }.ai-modal-grid strong.warning { color: #f5bd66; }.ai-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }.ai-modal-actions .btn { padding: 6px 11px; font-size: 10px; }
@media (max-width: 1000px) { .ai-workbench-metrics { grid-template-columns: repeat(2, 1fr); }.ai-workbench-layout { grid-template-columns: 1fr; }.ai-workbench-side { display: grid; grid-template-columns: 1fr 1fr; }.ai-flow-card { grid-column: 1 / -1; } }
@media (max-width: 620px) { .ai-workbench-hero { display: block; }.ai-workbench-hero-actions { margin-top: 14px; justify-content: space-between; }.ai-workbench-metrics { gap: 8px; }.ai-workbench-metric { padding: 12px; }.ai-workbench-metric strong { font-size: 21px; }.ai-workbench-side { display: flex; }.ai-workbench-layout { gap: 12px; }.ai-chat-card { min-height: 560px; } }

/* AI workbench V0.3-V0.5: server-authorized catalog, preview and durable task states. */
.ai-workbench-page,
.ai-workbench-page * { box-sizing: border-box; }
.ai-workbench-page > *,
.ai-workbench-layout > *,
.ai-capability-grid > *,
.ai-preview-body > * { min-width: 0; }
.ai-workbench-page code { overflow-wrap: anywhere; word-break: break-word; }
.ai-capability-shell { overflow: hidden; }
.ai-capability-shell > [data-ai-capability-panel] { padding: 0 16px 16px; }
.ai-capability-catalog { display: grid; gap: 18px; }
.ai-capability-group { display: grid; gap: 10px; }
.ai-capability-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-capability-group-head h3 { margin: 0; color: #e7ecfb; font-size: 14px; }
.ai-capability-group-head span { color: #8c9abb; font-size: 12px; }
.ai-capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-capability-card { display: flex; flex-direction: column; gap: 11px; padding: 14px; border: 1px solid rgba(165,180,220,.14); border-radius: 11px; background: rgba(15,24,43,.72); }
.ai-capability-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-capability-card h4 { margin: 0 0 4px; color: #e5ebfa; font-size: 13px; }
.ai-capability-card code { color: #8e9cbd; font-size: 10px; }
.ai-capability-card p { margin: 0; color: #aab5cf; font-size: 12px; line-height: 1.6; }
.ai-risk { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #9eddbd; background: rgba(101,214,155,.1); font-size: 10px; }
.ai-risk-medium { color: #f5c77e; background: rgba(245,189,102,.11); }
.ai-risk-high { color: #ff9aa6; background: rgba(251,125,139,.12); }
.ai-capability-blocked { padding: 8px 10px; border-left: 3px solid #f5bd66; color: #d9b97d; background: rgba(245,189,102,.08); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.ai-capability-form { display: grid; gap: 10px; margin-top: auto; }
.ai-capability-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ai-capability-field { display: grid; gap: 6px; color: #b7c2db; font-size: 11px; }
.ai-capability-field > span span[aria-hidden="true"] { margin-left: 3px; color: #ff9aa6; }
.ai-capability-field input,
.ai-capability-field select,
.ai-capability-field textarea { width: 100%; min-height: 44px; border: 1px solid rgba(145,162,212,.25); border-radius: 8px; padding: 9px 10px; color: #edf2ff; background: rgba(7,13,26,.68); font: inherit; font-size: 12px; }
.ai-capability-field textarea { resize: vertical; }
.ai-workbench-page button,
.ai-workbench-page .btn,
.ai-suggestion-row button { min-width: 44px; min-height: 44px; cursor: pointer; }
.ai-workbench-page button[aria-busy="true"] { min-width: 96px; cursor: wait; }
.ai-workbench-page button:disabled { cursor: not-allowed; opacity: .66; }
.ai-workbench-page button:focus-visible,
.ai-workbench-page a:focus-visible,
.ai-workbench-page input:focus-visible,
.ai-workbench-page select:focus-visible,
.ai-workbench-page textarea:focus-visible { outline: 2px solid #9cafff; outline-offset: 2px; }
.ai-preview-card { overflow: hidden; }
.ai-preview-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px 16px; }
.ai-preview-body section { padding: 12px; border: 1px solid rgba(165,180,220,.12); border-radius: 9px; background: rgba(13,22,40,.65); }
.ai-preview-body h3 { margin: 0 0 8px; color: #dfe6f8; font-size: 12px; }
.ai-preview-body p { margin: 0; color: #aeb9d1; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.ai-evidence-list,
.ai-preview-steps,
.ai-blocker-list,
.ai-source-list,
.ai-task-log { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.ai-evidence-list li,
.ai-preview-steps li,
.ai-blocker-list li,
.ai-source-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; color: #aeb9d1; font-size: 11px; line-height: 1.55; }
.ai-evidence-list li span,
.ai-preview-steps li span,
.ai-blocker-list li span,
.ai-source-list li span { text-align: right; overflow-wrap: anywhere; }
.ai-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-top: 1px solid rgba(165,180,220,.12); background: rgba(11,18,33,.54); }
.ai-preview-footer > div { display: grid; gap: 5px; color: #91a0c0; font-size: 10px; }
.ai-task-history { display: grid; gap: 12px; }
.ai-durable-task { overflow: hidden; }
.ai-task-state { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 0 16px 12px; }
.ai-task-state > div { padding: 10px; border: 1px solid rgba(165,180,220,.11); border-radius: 8px; background: rgba(13,22,40,.65); }
.ai-task-state span,
.ai-task-state strong { display: block; }
.ai-task-state span { color: #8291b4; font-size: 10px; }
.ai-task-state strong { margin-top: 5px; color: #dbe3f7; font-size: 12px; overflow-wrap: anywhere; }
.ai-task-markers { display: flex; flex-wrap: wrap; gap: 7px; min-height: 30px; padding: 0 16px 10px; }
.ai-task-marker { padding: 5px 8px; border-radius: 5px; color: #aeb9d1; background: rgba(142,164,255,.1); font-size: 10px; }
.ai-task-marker.recovered { color: #82ddb0; background: rgba(101,214,155,.1); }
.ai-task-marker.uncertain,
.ai-task-marker.blocked { color: #ff9aa6; background: rgba(251,125,139,.1); }
.ai-task-log { padding: 0 16px 14px; }
.ai-task-log li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(165,180,220,.08); color: #adb8d0; font-size: 10px; }
.ai-task-log time { color: #8190b2; }
.ai-task-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid rgba(165,180,220,.12); }
.ai-task-footer > span { min-width: 0; color: #8291b4; font-size: 10px; }
.ai-task-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ai-action-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 11px 13px; border: 1px solid rgba(251,125,139,.32); border-radius: 9px; color: #ffc4ca; background: rgba(251,125,139,.09); font-size: 11px; }
.ai-action-error code { color: #ff9aa6; }
.status-waiting_confirmation { color: #f5bd66; }
.status-running { color: #9cafff; }
.status-succeeded { color: #65d69b; }
.status-failed,
.status-blocked,
.status-uncertain { color: #fb7d8b; }

@media (max-width: 720px) {
  .ai-workbench-page { width: 100%; max-width: 100%; overflow-x: clip; }
  .ai-capability-grid,
  .ai-preview-body { grid-template-columns: 1fr; }
  .ai-capability-fields { grid-template-columns: 1fr; }
  .ai-preview-footer,
  .ai-task-footer { align-items: stretch; flex-direction: column; }
  .ai-preview-footer .btn,
  .ai-task-footer .btn { width: 100%; }
  .ai-task-state { grid-template-columns: 1fr; }
  .ai-task-log li { grid-template-columns: 1fr; }
  .ai-task-log time { justify-self: start; }
  .ai-composer textarea,
  .ai-capability-field input,
  .ai-capability-field select,
  .ai-capability-field textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-workbench-page *,
  .ai-workbench-page *::before,
  .ai-workbench-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Manufacturer data total recycle bin: single-record operations only. */
.manufacturer-total-trash-page {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.manufacturer-total-trash-hero .card-header {
  align-items: flex-start;
}

.manufacturer-total-trash-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 20px 20px;
}

.manufacturer-total-trash-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(40, 225, 199, 0.2);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(40, 225, 199, 0.09), rgba(11, 27, 35, 0.78));
}

.manufacturer-total-trash-grid span,
.manufacturer-total-trash-grid strong,
.manufacturer-total-trash-grid small {
  display: block;
}

.manufacturer-total-trash-grid span {
  color: #a8c9c4;
  font-size: 12px;
  font-weight: 700;
}

.manufacturer-total-trash-grid strong {
  margin: 7px 0 4px;
  color: #eafffc;
  font-size: clamp(24px, 3vw, 34px);
}

.manufacturer-total-trash-grid small {
  color: #89aaa5;
  line-height: 1.55;
}

.manufacturer-total-trash-controls {
  padding: 18px 20px 20px;
}

.manufacturer-total-trash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.manufacturer-total-trash-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(117, 156, 150, 0.34);
  border-radius: 9px;
  color: #b9cfcc;
  background: rgba(11, 27, 35, 0.72);
  text-decoration: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.manufacturer-total-trash-tabs a:hover {
  transform: translateY(-1px);
}

.manufacturer-total-trash-tabs a.active {
  border-color: rgba(40, 225, 199, 0.7);
  color: #effffc;
  background: rgba(40, 225, 199, 0.15);
}

.manufacturer-total-trash-tabs b {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #071d1a;
  background: #61e9d6;
  text-align: center;
}

.manufacturer-total-trash-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(210px, 1.4fr) minmax(145px, 0.8fr) minmax(145px, 0.8fr) minmax(160px, 0.9fr) auto auto;
  align-items: end;
  gap: 10px;
}

.manufacturer-total-trash-filter input,
.manufacturer-total-trash-filter select,
.manufacturer-total-trash-page .btn,
.manufacturer-total-trash-entry {
  min-height: 44px;
}

.manufacturer-total-trash-list {
  min-width: 0;
  overflow: visible;
}

.manufacturer-total-trash-list-head,
.manufacturer-total-trash-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1.15fr) minmax(0, 0.8fr) minmax(0, 0.85fr) minmax(0, 0.75fr) minmax(0, 1.1fr) minmax(0, 1.15fr) minmax(132px, 0.9fr);
  gap: 10px;
  align-items: start;
}

.manufacturer-total-trash-list-head {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(128, 160, 155, 0.2);
  color: #7fa09b;
  background: rgba(7, 19, 25, 0.58);
  font-size: 11px;
  font-weight: 750;
}

.manufacturer-total-trash-row {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(128, 160, 155, 0.14);
  background: rgba(12, 28, 36, 0.5);
  transition: opacity 180ms ease, transform 180ms ease;
}

.manufacturer-total-trash-row:last-child {
  border-bottom: 0;
}

.manufacturer-total-trash-row:hover {
  transform: translateY(-1px);
}

.manufacturer-total-trash-cell,
.manufacturer-total-trash-actions {
  min-width: 0;
  overflow-wrap: anywhere;
}

.manufacturer-total-trash-cell strong,
.manufacturer-total-trash-cell span,
.manufacturer-total-trash-cell small {
  display: block;
}

.manufacturer-total-trash-cell strong {
  color: #e7f6f3;
  line-height: 1.5;
}

.manufacturer-total-trash-cell span {
  color: #b4cbc7;
  font-size: 12px;
  line-height: 1.55;
}

.manufacturer-total-trash-cell small {
  margin-top: 5px;
  color: #82a19c;
  font-size: 11px;
  line-height: 1.5;
}

.manufacturer-total-trash-type {
  display: inline-flex !important;
  width: max-content;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(128, 160, 155, 0.34);
  border-radius: 999px;
  color: #c2d2d0 !important;
  background: rgba(128, 160, 155, 0.11);
  font-weight: 800;
  white-space: nowrap;
}

.manufacturer-total-trash-type.is-manufacturer {
  border-color: rgba(40, 225, 199, 0.45);
  color: #68ead7 !important;
  background: rgba(40, 225, 199, 0.1);
}

.manufacturer-total-trash-type.is-file {
  border-color: rgba(95, 158, 255, 0.48);
  color: #94bdff !important;
  background: rgba(95, 158, 255, 0.1);
}

.manufacturer-total-trash-type.is-report {
  border-color: rgba(245, 183, 63, 0.48);
  color: #f7c968 !important;
  background: rgba(245, 183, 63, 0.1);
}

.manufacturer-total-trash-actions {
  display: grid;
  gap: 7px;
}

.manufacturer-total-trash-actions .btn {
  width: 100%;
  cursor: pointer;
}

.manufacturer-total-trash-blocked {
  display: block;
  color: #e8bf72;
  font-size: 11px;
  line-height: 1.45;
}

.manufacturer-total-trash-actions .btn:disabled {
  border-color: rgba(151, 178, 173, 0.35);
  color: #a6bab6;
  background: rgba(50, 69, 67, 0.68);
  cursor: not-allowed;
  opacity: 0.72;
}

.manufacturer-total-trash-page a:focus-visible,
.manufacturer-total-trash-page button:focus-visible,
.manufacturer-total-trash-page input:focus-visible,
.manufacturer-total-trash-page select:focus-visible,
.manufacturer-total-trash-entry:focus-visible {
  outline: 3px solid #5ff3df;
  outline-offset: 3px;
}

.manufacturer-total-trash-pagination,
.manufacturer-total-trash-pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manufacturer-total-trash-pagination {
  justify-content: space-between;
  color: #91aca8;
}

.manufacturer-total-trash-pagination .disabled {
  pointer-events: none;
  opacity: 0.58;
}

@media (max-width: 1180px) {
  .manufacturer-total-trash-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .manufacturer-total-trash-list-head {
    display: none;
  }

  .manufacturer-total-trash-rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
  }

  .manufacturer-total-trash-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
    border: 1px solid rgba(128, 160, 155, 0.2);
    border-radius: 12px;
  }

  .manufacturer-total-trash-cell::before,
  .manufacturer-total-trash-actions::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #789994;
    font-size: 10px;
    font-weight: 800;
  }
}

@media (max-width: 640px) {
  .manufacturer-total-trash-page {
    gap: 12px;
  }

  .manufacturer-total-trash-hero .card-header,
  .manufacturer-total-trash-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .manufacturer-total-trash-grid,
  .manufacturer-total-trash-filter,
  .manufacturer-total-trash-rows {
    grid-template-columns: minmax(0, 1fr);
  }

  .manufacturer-total-trash-grid {
    padding: 0 14px 14px;
  }

  .manufacturer-total-trash-controls {
    padding: 14px;
  }

  .manufacturer-total-trash-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manufacturer-total-trash-tabs a {
    justify-content: space-between;
  }

  .manufacturer-total-trash-pagination > div,
  .manufacturer-total-trash-pagination .btn,
  .manufacturer-total-trash-hero .btn {
    width: 100%;
  }

  .manufacturer-total-trash-pagination .btn {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manufacturer-total-trash-tabs a,
  .manufacturer-total-trash-row {
    transition: none;
  }
}
.manufacturer-transit-view .status-overdue,
.manufacturer-transit-results .status-overdue { background: #5b1f24; color: #ffd8dc; border-color: #d15a66; }
.manufacturer-transit-results tr.is-overdue { background: rgba(168, 52, 67, .12); }

/* Manufacturer report serial navigation */
.manufacturer-report-layout { display: grid; grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); gap: 18px; align-items: start; }
.manufacturer-report-serial-sidebar { position: sticky; top: 18px; display: grid; gap: 12px; padding: 14px; border: 1px solid #1e5e58; border-radius: 12px; background: rgba(5, 28, 27, .86); }
.manufacturer-report-serial-sidebar-head { display: grid; gap: 4px; }
.manufacturer-report-serial-sidebar-head strong { color: #e8fffb; font-size: 15px; }
.manufacturer-report-serial-sidebar-head span { color: #82aaa4; font-size: 12px; line-height: 1.45; }
.manufacturer-report-serial-list { display: grid; grid-auto-rows: max-content; gap: 8px; max-height: min(60vh, 560px); overflow: auto; padding-right: 2px; }
.manufacturer-report-serial-card { display: grid; gap: 4px; min-height: 66px; padding: 11px 12px; border: 1px solid #1b4d49; border-radius: 9px; background: #071f1e; color: #b8d8d2; text-decoration: none; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.manufacturer-report-serial-card:hover { border-color: #2bbca9; background: #0b2d2a; transform: translateY(-1px); }
.manufacturer-report-serial-card:focus-visible { outline: 2px solid #48ead0; outline-offset: 2px; }
.manufacturer-report-serial-card.is-selected { border-color: #27dec5; background: linear-gradient(135deg, rgba(18, 91, 83, .92), rgba(7, 39, 37, .96)); box-shadow: inset 3px 0 0 #29e5cc, 0 0 0 1px rgba(41, 229, 204, .12); color: #effffc; }
.manufacturer-report-serial-card strong { color: inherit; font-size: 17px; letter-spacing: .02em; }
.manufacturer-report-serial-card span, .manufacturer-report-serial-card small { color: #8fbab2; font-size: 11px; line-height: 1.35; }
.manufacturer-report-serial-card.is-selected span, .manufacturer-report-serial-card.is-selected small { color: #c4eee7; }
.manufacturer-report-serial-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.manufacturer-report-serial-heading .manufacturer-report-review-badge { color: #ffe1a6; background: #553b16; border: 1px solid #a37935; border-radius: 5px; padding: 2px 6px; font-size: 11px; line-height: 1.4; white-space: nowrap; }
.manufacturer-report-serial-card .manufacturer-report-accounted-badge { justify-self: start; margin-top: 3px; padding: 2px 6px; border: 1px solid #247d6a; border-radius: 5px; background: #0a392e; color: #7df0c6; font-size: 11px; line-height: 1.4; }
.manufacturer-report-serial-empty { padding: 14px 8px; color: #789b96; font-size: 12px; text-align: center; }
.manufacturer-report-main { min-width: 0; }
.manufacturer-report-selection-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #1d5e58; border-radius: 10px; background: rgba(9, 47, 44, .48); }
.manufacturer-report-selection-summary > div { display: grid; gap: 3px; }
.manufacturer-report-selection-summary strong { color: #f0fffc; font-size: 20px; }
.manufacturer-report-selection-summary > span { color: #9bd1c8; font-size: 12px; text-align: right; }
@media (max-width: 720px) {
  .manufacturer-report-layout { grid-template-columns: 1fr; gap: 12px; }
  .manufacturer-report-serial-sidebar { position: static; padding: 10px; }
  .manufacturer-report-serial-list { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 3px; }
  .manufacturer-report-serial-card { flex: 0 0 158px; min-height: 62px; }
  .manufacturer-report-selection-summary { align-items: flex-start; flex-direction: column; gap: 6px; }
  .manufacturer-report-selection-summary > span { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .manufacturer-report-serial-card { transition: none; }
}
.report-amount-verification {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(255, 190, 80, 0.45);
  border-radius: 12px;
  background: rgba(255, 190, 80, 0.08);
}

.report-amount-verification.is-passed {
  border-color: rgba(54, 220, 160, 0.55);
  background: rgba(54, 220, 160, 0.08);
}

.report-amount-verification.is-rejected {
  border-color: rgba(255, 100, 120, 0.55);
  background: rgba(255, 100, 120, 0.08);
}

.report-amount-verification-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.report-amount-verification-grid div {
  display: grid;
  gap: 0.2rem;
}

.report-amount-verification-grid span {
  color: var(--muted-foreground, #8ca7a3);
  font-size: 0.8rem;
}

.report-amount-verification-status {
  display: inline-block;
}

.report-amount-verification ul {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
}

@media (max-width: 760px) {
  .report-amount-verification-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Style cost ledger */
.nav-alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid rgba(246, 198, 111, 0.62);
  border-radius: 999px;
  background: rgba(246, 198, 111, 0.16);
  color: #ffe3a8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.style-cost-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.style-cost-search {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(10, 26, 28, 0.92), rgba(7, 16, 18, 0.82));
  box-shadow: var(--shadow);
}

.style-cost-search > label {
  color: #e4faf7;
  font-size: 13px;
  font-weight: 800;
}

.style-cost-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 9px;
}

.style-cost-search-row input,
.style-cost-page .btn,
.style-cost-filters a,
.style-cost-dialog-panel button,
.style-cost-dialog-panel textarea {
  min-height: 44px;
}

.style-cost-dialog-panel button { min-width: 44px; }

.style-cost-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.style-cost-stats article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.style-cost-stats article:nth-child(2) { border-top-color: var(--warning); }
.style-cost-stats article:nth-child(3) { border-top-color: var(--destructive); }
.style-cost-stats span { color: #b8d0cd; font-size: 12px; }
.style-cost-stats strong { color: var(--foreground); font-size: 26px; line-height: 1; }

.style-cost-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.style-cost-filters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #c6dcda;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.style-cost-filters a:hover,
.style-cost-filters a.active {
  border-color: rgba(33, 243, 211, 0.55);
  background: rgba(33, 243, 211, 0.12);
  color: #eafffc;
}

.style-cost-results { min-width: 0; overflow: hidden; }
.style-cost-results .card-header { align-items: center; }
.style-cost-results .card-header small { color: #b8d0cd; }
.style-cost-table-wrap { width: 100%; max-width: 100%; }
.style-cost-table { min-width: 1080px; }
.style-cost-table td { vertical-align: middle; }
.style-cost-table td:nth-child(3),
.style-cost-table td:nth-child(4) { min-width: 150px; }
.style-cost-table td:last-child { min-width: 190px; }

.style-cost-current-price {
  color: #f2fffd;
  font-size: 17px;
  font-weight: 850;
  white-space: nowrap;
}

.style-cost-pending-price {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  max-width: 190px;
  padding: 8px 10px;
  border: 1px solid rgba(246, 198, 111, 0.62);
  border-radius: 7px;
  background: rgba(246, 198, 111, 0.11);
  color: #fff0ca;
}

.style-cost-pending-price span {
  color: #ffe1a1;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.style-cost-pending-price strong { color: #fff7e6; font-size: 16px; }
.style-cost-pending-price small { flex-basis: 100%; color: #e7c98c; font-size: 10px; }
.style-cost-no-pending { color: #abc2bf; font-size: 12px; }

.style-cost-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.style-cost-row-actions .btn { padding-inline: 12px; cursor: pointer; }
.style-cost-reject-button {
  border: 1px solid rgba(255, 106, 95, 0.55);
  background: rgba(255, 106, 95, 0.12);
  color: #ffd8d4;
}

.style-cost-reject-button:hover { background: rgba(255, 106, 95, 0.2); }

.style-cost-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  color: #b8d0cd;
  font-size: 12px;
}

.style-cost-pagination > div { display: flex; gap: 8px; }
.style-cost-pagination .disabled { opacity: 0.45; pointer-events: none; }

.style-cost-dialog-panel {
  width: min(680px, 100%);
  overflow: hidden auto;
  border: 1px solid rgba(33, 243, 211, 0.28);
  border-radius: var(--radius);
  background: #0a1718;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), 0 0 36px rgba(33, 243, 211, 0.1);
}

.style-cost-dialog-panel .dialog-header,
.style-cost-dialog-panel .dialog-actions,
.style-cost-dialog-body,
.style-cost-history-content { padding: 16px 18px; }

.style-cost-dialog-panel .dialog-header { border-bottom: 1px solid var(--border); }
.style-cost-dialog-panel .dialog-header h2 { margin-top: 4px; color: var(--foreground); }
.style-cost-dialog-panel .dialog-actions { border-top: 1px solid var(--border); }
.style-cost-dialog-body { display: grid; gap: 16px; }
.style-cost-dialog-feedback { min-height: 20px; margin: 0; color: #ffb2aa; font-size: 12px; }

.style-cost-change-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.style-cost-change-summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  background: #0c1d1e;
}

.style-cost-change-summary dt { color: #a9c1be; font-size: 11px; }
.style-cost-change-summary dd { margin: 0; color: #eefbf8; overflow-wrap: anywhere; }
.style-cost-change-summary dd.style-cost-pending-price { max-width: none; }

.style-cost-history-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.style-cost-history-head > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.style-cost-history-head span { color: #aac2bf; font-size: 10px; }
.style-cost-history-head strong { overflow-wrap: anywhere; }
.style-cost-history-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.style-cost-history-list li {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 13px 13px 13px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.style-cost-history-list li::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: #819997;
  content: "";
}

.style-cost-history-list .style-cost-history-tone-success::before { background: var(--primary); }
.style-cost-history-list .style-cost-history-tone-warning::before { background: var(--warning); }
.style-cost-history-list .style-cost-history-tone-danger::before { background: var(--destructive); }
.style-cost-history-list li > div { display: flex; justify-content: space-between; gap: 12px; }
.style-cost-history-list time,
.style-cost-history-list small { color: #abc2bf; font-size: 11px; overflow-wrap: anywhere; }
.style-cost-history-list p { margin: 0; color: #e9f7f5; }

.style-cost-page button,
.style-cost-page a,
.style-cost-page input,
.style-cost-page textarea {
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.style-cost-page button:focus-visible,
.style-cost-page a:focus-visible,
.style-cost-page input:focus-visible,
.style-cost-page textarea:focus-visible {
  outline: 2px solid #77ffe9;
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  .style-cost-search-row { grid-template-columns: minmax(0, 1fr) auto auto; }
}

@media (max-width: 768px) {
  .style-cost-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-cost-search-row { grid-template-columns: 1fr 1fr; }
  .style-cost-search-row input { grid-column: 1 / -1; }
  .style-cost-search-row .btn { width: 100%; }
  .style-cost-history-head { grid-template-columns: 1fr; }
  .style-cost-change-summary { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .style-cost-stats { grid-template-columns: 1fr; }
  .style-cost-search-row { grid-template-columns: 1fr; }
  .style-cost-search-row input { grid-column: auto; }
  .style-cost-pagination { align-items: stretch; flex-direction: column; }
  .style-cost-pagination > div { display: grid; grid-template-columns: 1fr 1fr; }
  .style-cost-pagination .btn { width: 100%; }
  .style-cost-dialog-panel .dialog-header,
  .style-cost-dialog-panel .dialog-actions,
  .style-cost-dialog-body,
  .style-cost-history-content { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .style-cost-page *,
  .style-cost-page *::before,
  .style-cost-page *::after,
  .nav-alert-count {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.manufacturer-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line, rgba(70, 200, 200, .2));
  border-bottom: 1px solid var(--line, rgba(70, 200, 200, .2));
}
.manufacturer-bulk-selection-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.manufacturer-select-all { margin: 0; }
.manufacturer-selection { display: inline-flex; align-items: center; margin-right: .65rem; }
.manufacturer-selection input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent, #38e0d0); }
.manufacturer-selection-count { color: var(--muted, #8ca); font-size: .85rem; }
.v3-manufacturer-actions {
  align-self: start;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: min(430px, 100%);
  flex-direction: column;
}
.v3-manufacturer-actions .manufacturer-bound-brands {
  width: 100%;
  margin-top: 0;
  justify-content: flex-start;
}
.v3-manufacturer-actions .v3-primary-action,
.v3-manufacturer-actions .v3-secondary-actions {
  align-self: flex-end;
}
@media (max-width: 720px) {
  .manufacturer-bulk-toolbar { align-items: stretch; flex-direction: column; }
  .manufacturer-bulk-toolbar > .btn { width: 100%; }
  .v3-manufacturer-actions {
    align-items: stretch;
    min-width: 0;
    flex-direction: column;
  }
  .v3-manufacturer-actions .v3-primary-action,
  .v3-manufacturer-actions .v3-secondary-actions {
    align-self: stretch;
  }
  .v3-manufacturer-actions .manufacturer-bound-brand-list {
    max-width: 100%;
  }
}

/* New-style batch actions remain visible inside the workspace scroll area. */
.new-style-batch-toolbar { position: sticky; top: 0; z-index: 8; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px; background: #092421; }
.new-style-batch-toolbar [data-new-style-batch-summary] { flex: 1; min-width: 200px; }
.new-style-batch-title { width: 100%; color: #5cebd7; }
.new-style-batch-check { display: inline-flex; gap: 8px; align-items: center; padding: 8px; cursor: pointer; }
.new-style-batch-check input { width: 18px; height: 18px; accent-color: #22d9c4; }
.new-style-batch-lines summary, .new-style-batch-progress summary { cursor: pointer; padding: 14px 18px; }
.new-style-batch-progress { margin: 14px 0; }

/* Read and reconcile an existing ERP receipt without posting inventory. */
.erp-receipt-link-dialog { display: flex; flex-direction: column; width: min(1120px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; }
.erp-receipt-link-dialog > .card-header, .erp-receipt-link-dialog > .card-footer { flex: none; }
.erp-receipt-link-dialog > .card-footer { justify-content: flex-end; gap: 12px; border-top: 1px solid #285f5a; background: #092421; }
.erp-receipt-link-body { flex: 1; min-height: 0; overflow: auto; padding: 20px; }
.erp-receipt-link-query { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin: 16px 0; }
.erp-receipt-link-query .btn { min-height: 44px; }
.erp-receipt-preview-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.erp-receipt-preview-meta > div { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #092421; border: 1px solid #285f5a; border-radius: 8px; overflow-wrap: anywhere; }
.erp-receipt-preview-meta small { color: #98c6c2; }
.erp-receipt-preview-meta strong { color: #e2fffb; }
.erp-receipt-quantity-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.erp-receipt-table { max-height: 340px; overflow: auto; margin: 12px 0 20px; }
.erp-receipt-table th { position: sticky; top: 0; z-index: 1; background: #0a2928; }
.erp-receipt-table td small { display: block; color: #98c6c2; padding-top: 4px; }
.erp-receipt-link-notice { color: #b8e5de; padding: 12px; border-left: 3px solid #28e1c7; background: #092421; }
.employee-admin { margin-bottom: 20px; }
.employee-admin .card-header { flex-wrap: wrap; gap: 16px; }
.employee-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.employee-summary > div { display: flex; flex-direction: column; gap: 8px; }
.employee-summary strong { font-size: 24px; }
.employee-summary small { color: #b8e5de; }
.employee-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.employee-form label, .employee-inline-form label { display: flex; flex-direction: column; gap: 8px; }
.employee-form input:not([type="checkbox"]), .employee-inline-form input { width: 100%; min-height: 44px; }
.employee-form fieldset { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; border: 1px solid #285f5a; border-radius: 8px; padding: 12px; }
.employee-form fieldset label, .employee-form .employee-check { flex-direction: row; align-items: center; min-height: 44px; cursor: pointer; }
.employee-form input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: #22d9c4; }
.employee-inline-form, .employee-actions { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.employee-inline-form label { flex: 1; min-width: 220px; }
.employee-actions { align-items: center; }
.employee-actions button { min-height: 44px; }
.employee-feedback { grid-column: 1 / -1; margin: 0; color: #b8e5de; overflow-wrap: anywhere; }
.employee-table-scroll { max-width: 100%; overflow-x: auto; }
.employee-admin table { width: 100%; min-width: 660px; }
.employee-admin td { overflow-wrap: anywhere; }
.employee-secret input, [data-connector-message] input { display: block; width: 100%; margin: 12px 0; min-height: 44px; }
.employee-admin :focus-visible { outline: 2px solid #5ff3df; outline-offset: 3px; }
.employee-admin [hidden] { display: none !important; }
@media (max-width: 720px) { .employee-form, .employee-summary { grid-template-columns: 1fr; } }
.erp-receipt-price-ack { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 12px; cursor: pointer; }
.erp-receipt-price-ack input { flex: none; width: 18px; height: 18px; accent-color: #22d9c4; }
.erp-receipt-evidence-card details { border-bottom: 1px solid #285f5a; }
.erp-receipt-evidence-card summary { cursor: pointer; padding: 14px 0; overflow-wrap: anywhere; }
.erp-receipt-link-dialog :focus-visible { outline: 2px solid #5ff3df; outline-offset: 3px; }
.erp-prepayment-preview, .erp-prepayment-evidence { margin: 20px 0; padding: 16px; border: 1px solid #28756d; border-radius: 8px; background: #07201e; }
.erp-prepayment-preview h3, .erp-prepayment-evidence h3 { margin: 0 0 10px; color: #69efe0; }
.erp-prepayment-preview p, .erp-prepayment-evidence li { color: #b8e5de; line-height: 1.6; }
.erp-prepayment-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.erp-prepayment-check { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px; border: 1px solid #28cbb9; border-radius: 8px; cursor: pointer; }
.erp-prepayment-check input { flex: none; width: 20px; height: 20px; accent-color: #22d9c4; }
.erp-prepayment-check span { display: flex; flex-direction: column; gap: 5px; }
.erp-prepayment-check small { color: #b8e5de; }
.erp-prepayment-unavailable:empty { display: none; }
@media (max-width: 720px) {
  .erp-receipt-link-body { padding: 12px; }
  .erp-receipt-link-query, .erp-receipt-preview-meta, .erp-receipt-quantity-summary, .erp-prepayment-summary { grid-template-columns: 1fr; }
  .erp-receipt-link-dialog > .card-footer { flex-wrap: wrap; }
  .erp-receipt-link-dialog > .card-footer .btn { flex: 1; min-height: 44px; }
}
