@import "/web/theme.css";

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

button,
textarea,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 390px) 1fr;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.admin-shell {
  min-height: 100vh;
  padding: 18px;
}

.admin-panel {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.supplier-admin-panel {
  max-width: 1440px;
}

.control-plane {
  display: grid;
  gap: 20px;
}

.control-plane-header,
.control-plane-section-head,
.control-plane-work-item,
.control-plane-work-title,
.control-plane-work-action {
  display: flex;
  align-items: center;
}

.control-plane-header,
.control-plane-section-head,
.control-plane-work-item {
  justify-content: space-between;
  gap: 16px;
}

.control-plane-header h1,
.control-plane-section h2,
.control-plane-work-item h3,
.control-plane-work-item p {
  margin: 0;
}

.control-plane-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
}

.control-plane-metric {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border-radius: var(--radius-panel);
  background: var(--surface-2);
}

.control-plane-metric strong {
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.control-plane-metric span,
.control-plane-section-head p,
.control-plane-work-main > p,
.control-plane-work-main > span,
.control-plane-work-action > span,
.control-plane-domains span {
  color: var(--muted);
  font-size: 13px;
}

.control-plane-section {
  display: grid;
  gap: 12px;
}

.control-plane-section-head p {
  margin: 4px 0 0;
}

.control-plane-queue {
  display: grid;
  border-top: 1px solid var(--line);
}

.control-plane-work-item {
  min-width: 0;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.control-plane-work-item.priority-urgent {
  box-shadow: inset 3px 0 0 var(--warn);
  padding-left: 14px;
}

.control-plane-work-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.control-plane-work-title,
.control-plane-work-action {
  gap: 10px;
}

.control-plane-work-title h3 {
  font-size: 16px;
}

.control-plane-gaps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 3px 0 0;
  padding-left: 18px;
  color: var(--bad);
  font-size: 12px;
}

.control-plane-domains {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.control-plane-domains a {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.control-plane-domains a:nth-child(2n) {
  border-right: 0;
}

.control-plane-domains a:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.control-plane-domains a:hover {
  background: var(--surface-hover);
}

.operator-product-list {
  display: grid;
  gap: var(--space-3);
}

.operator-product-card {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-2);
}

.operator-product-head,
.operator-product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.operator-product-head h3 {
  margin: var(--space-1) 0 0;
  font-size: var(--text-title);
}

.operator-product-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.operator-product-stats div {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  text-align: center;
}

.operator-product-stats div + div {
  border-left: 1px solid var(--line);
}

.operator-product-stats strong {
  font-size: var(--text-title);
}

.operator-product-stats span,
.operator-product-details dt {
  color: var(--muted);
  font-size: var(--text-caption);
}

.operator-product-colors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.operator-product-colors span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--text-caption);
}

.operator-product-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-5);
  margin: 0;
}

.operator-product-details div {
  min-width: 0;
}

.operator-product-detail-wide {
  grid-column: 1 / -1;
}

.operator-product-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: var(--text-small);
}

.operator-product-list.empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.operator-product-list.empty-state a {
  color: var(--accent);
  font-weight: 700;
}

.sidebar,
.workspace {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
}

.input-panel,
.history-panel,
.timeline-panel,
.reference-panel,
.candidate-panel,
.feed-panel,
.concept-panel,
.media-panel,
.product-preview-panel,
.placement-panel,
.rationale-panel,
.light-edit-panel,
.order-panel,
.validation-panel {
  padding: 18px;
}

.hidden {
  display: none;
}

.panel-heading {
  margin-bottom: 18px;
}

.feed-header,
.feed-header-actions,
.feed-card-kicker {
  display: flex;
  align-items: center;
}

.feed-header,
.feed-card-kicker {
  justify-content: space-between;
  gap: 12px;
}

.title-row {
  display: grid;
  gap: 12px;
}

.feed-header-actions {
  gap: 8px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  overflow-wrap: normal;
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  word-break: keep-all;
}

h2 {
  font-size: var(--text-headline);
  font-weight: 600;
  line-height: 1.25;
}

h3 {
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.35;
}

.run-form,
.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.run-form {
  gap: 16px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

textarea,
input[type="file"],
input[type="number"],
input[type="text"],
input[type="tel"],
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-input);
  color: var(--ink);
}

textarea:focus,
input[type="number"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

textarea {
  min-height: 164px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

input[type="file"],
input[type="number"],
input[type="text"],
input[type="tel"],
select {
  padding: 10px;
}

.primary-button,
.icon-button,
.nav-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height-large);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.icon-button {
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  flex: 0 0 auto;
  border: 1px solid var(--line-subtle);
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 var(--space-3);
  font-size: var(--text-footnote);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.nav-button:hover {
  background: var(--surface-hover);
}

.nav-button:focus-visible,
.primary-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.nav-buttons {
  display: flex;
  max-width: 100%;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.nav-buttons .nav-button {
  min-width: fit-content;
}

.admin-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.provider-status {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.provider-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 720;
}

.provider-chip {
  background: var(--accent-soft);
  color: var(--accent);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.run-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
}

.run-item {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
}

.run-item.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.run-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 760;
}

.run-title > span:first-child {
  font-size: 18px;
  line-height: 1.2;
}

.run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.run-request {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(88px, 1fr));
  gap: 8px;
}

.reference-asset-viewer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 180px));
  gap: 10px;
}

.reference-asset-card {
  display: grid;
  gap: 6px;
  margin: 0;
}

.reference-asset-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  object-fit: contain;
}

.reference-asset-card figcaption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.candidate-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.treatment-control-bar {
  margin-bottom: 10px;
}

.treatment-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.treatment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  padding: 0 10px;
}

.treatment-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.treatment-chip input {
  margin: 0;
  accent-color: var(--accent);
}

.cutout-strategy-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.cutout-strategy-panel.empty-state {
  display: block;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.cutout-strategy-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.cutout-strategy-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.cutout-strategy-image {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background-color: var(--checkerboard-bg);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.16) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.16) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.cutout-strategy-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cutout-strategy-card strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cutout-strategy-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.candidate-card {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.image-candidate {
  grid-template-rows: auto minmax(118px, 1fr) auto auto;
  min-height: 218px;
}

.candidate-card.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.candidate-index,
.candidate-card small {
  color: var(--muted);
  font-size: 12px;
}

.candidate-card strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-lineage {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-lineage-arrow {
  color: var(--accent);
  font-weight: 900;
}

.candidate-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, var(--checkerboard-line-light) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checkerboard-line-light) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checkerboard-line-light) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checkerboard-line-light) 75%);
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.candidate-thumb img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.candidate-thumb-empty {
  color: var(--muted);
  font-size: 12px;
}

.feed-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feed-page {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.feed-header {
  margin-bottom: 18px;
}

.feed-rail {
  min-height: calc(100vh - 126px);
}

.feed-list-page {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
}

.feed-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}

.feed-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--surface);
}

.feed-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.feed-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.feed-type {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.feed-card-kicker span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.feed-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.feed-tags,
.feed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feed-tags span {
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-2);
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 720;
}

.feed-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
}

.feed-actions button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.light-edit-form {
  display: grid;
  gap: 10px;
}

.order-form {
  display: grid;
  gap: 10px;
}

.artwork-treatment-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
}

.artwork-treatment-field legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  padding: 0 4px;
}

.product-option-controls {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.product-option-controls.empty-state {
  display: block;
  color: var(--muted);
}

.product-option-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.product-option-heading small {
  color: var(--muted);
}

.product-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.treatment-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.treatment-preview.empty-state {
  display: block;
}

.treatment-preview-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
  cursor: pointer;
}

.treatment-preview-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.treatment-preview-card input {
  margin: 0;
}

.treatment-card-copy {
  display: grid;
  gap: 2px;
}

.treatment-card-copy strong {
  font-size: 13px;
}

.treatment-card-copy small {
  min-height: 48px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.treatment-preview-image,
.treatment-preview-split {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.treatment-preview-split {
  grid-template-columns: 1fr 1fr;
}

.treatment-preview-image img,
.treatment-preview-split img {
  width: 100%;
  height: 112px;
  object-fit: contain;
}

.full-bleed-preview {
  background: var(--surface);
}

.cutout-preview,
.treatment-preview-split {
  background-color: var(--checkerboard-bg);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.18) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.18) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.18) 75%);
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
}

.debug-shell {
  display: grid;
  gap: 18px;
}

.debug-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.debug-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.debug-results.empty-state {
  display: block;
}

.quality-viewer {
  display: grid;
  gap: 14px;
}

.quality-viewer.empty-state {
  display: block;
  color: var(--muted);
}

.quality-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.qa-mode-group {
  align-self: end;
}

.quality-zoom {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) 52px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.quality-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quality-metrics dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
}

.quality-metrics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.quality-metrics dd {
  margin: 0;
  font-size: 12px;
  font-weight: 820;
}

.quality-canvas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quality-canvas-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.quality-canvas-frame {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: grab;
  background-color: var(--viewer-bg);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.16) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.16) 75%);
  background-position: 0 0, 10px 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.quality-canvas-frame.hidden {
  display: none;
}

.quality-canvas-frame canvas {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
}

.quality-frame-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.debug-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.debug-card-button {
  appearance: none;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.debug-card-button.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(18, 127, 118, 0.14);
}

.debug-card-copy h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.debug-card-copy p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.debug-image-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--viewer-bg);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.18) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.18) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.18) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.debug-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.debug-metrics {
  display: grid;
  gap: 6px;
  margin: 0;
}

.debug-metrics div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
  font-size: 11px;
}

.debug-metrics dt {
  overflow: hidden;
  color: var(--muted);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debug-metrics dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 920px) {
  .quality-toolbar,
  .quality-metrics,
  .quality-canvas-grid {
    grid-template-columns: 1fr;
  }

  .quality-canvas-frame,
  .quality-canvas-frame canvas {
    min-height: 420px;
  }
}

.placement-form {
  display: grid;
  gap: 10px;
}

.order-grid,
.placement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.preset-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  padding: 0 10px;
}

.preset-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.compact-field {
  gap: 6px;
}

.compact-field textarea {
  min-height: 86px;
}

.light-edit-form textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 12px;
  line-height: 1.45;
}

.light-edit-form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.order-result {
  margin-top: 12px;
}

.order-success {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--good);
  border-radius: 8px;
  background: var(--good-soft);
  color: var(--ink);
  font-size: 13px;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.admin-order-list {
  display: grid;
  gap: 12px;
}

.real-order-pilot-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.real-order-pilot-panel h2,
.real-order-pilot-panel p {
  margin: 0;
}

.real-order-pilot-panel p {
  color: var(--muted);
  font-size: 14px;
}

.real-order-pilot-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.real-order-pilot-note {
  grid-column: span 3;
}

.real-order-pilot-list {
  display: grid;
  gap: 10px;
}

.real-order-pilot-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.real-order-pilot-card > .admin-collapsible-summary,
.real-order-pilot-card > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.real-order-pilot-card > .admin-collapsible-summary span,
.real-order-pilot-card > div:first-child span {
  color: var(--muted);
  font-size: 13px;
}

.admin-order-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.real-order-card {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 4%, var(--surface-2));
}

.admin-collapsible-card > .admin-collapsible-summary {
  list-style: none;
  cursor: pointer;
}

.admin-collapsible-card > .admin-collapsible-summary::-webkit-details-marker {
  display: none;
}

.admin-collapsible-card > .admin-collapsible-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
  transition: transform 0.12s ease;
}

.admin-collapsible-card[open] > .admin-collapsible-summary::before {
  transform: rotate(90deg);
}

.admin-collapsible-card > .admin-collapsible-summary .admin-order-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex: 1;
}

.admin-collapsible-card > .admin-collapsible-summary {
  display: flex;
  align-items: flex-start;
}

.admin-collapsible-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.real-order-review-panel,
.supplier-order-panel,
.fulfillment-progress-panel,
.arrival-review-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-refresh-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.supplier-batch-toolbar {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.supplier-batch-toolbar > .admin-collapsible-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
}

.supplier-batch-toolbar > .admin-collapsible-summary strong {
  font-size: 15px;
}

.supplier-batch-toolbar > .admin-collapsible-summary #supplier-batch-selection-state,
.supplier-batch-toolbar > .admin-collapsible-summary span {
  color: var(--muted);
  font-size: 13px;
}

.supplier-package-options {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.supplier-package-options legend {
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
}

.supplier-batch-toolbar-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
}

.supplier-batch-toolbar-copy strong {
  font-size: 15px;
}

.supplier-batch-toolbar-copy span,
.supplier-batch-hint,
.supplier-batch-state,
.supplier-batch-register-actions span {
  color: var(--muted);
  font-size: 13px;
}

.supplier-batch-hint {
  flex-basis: 100%;
  margin: 0;
  line-height: 1.45;
}

.supplier-batch-select-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border: 1px solid var(--line-subtle);
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 600;
}

.low-source-dpi-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--warn);
  border-radius: 6px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13px;
  line-height: 1.45;
}

.supplier-batch-toolbar-actions,
.supplier-batch-register-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.supplier-batch-register-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.supplier-batch-register-actions {
  grid-column: 1 / -1;
}

.completed-order-evidence {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.completed-order-evidence > summary {
  cursor: pointer;
  font-weight: 600;
}

.completed-order-evidence-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.completed-order-evidence-head h3 {
  margin: 0;
}

.completed-order-evidence-head span {
  color: var(--muted);
  font-size: 12px;
}

.completed-order-evidence-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.completed-order-evidence-entry {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.completed-order-evidence-entry span,
.completed-order-evidence-entry small {
  overflow-wrap: anywhere;
}

.completed-order-evidence-entry small {
  color: var(--muted);
}

.real-order-bucket-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.real-order-bucket-filter button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.real-order-bucket-filter button.is-active {
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-soft);
}

.real-order-bucket-filter [data-count] {
  display: inline-block;
  min-width: 1.25em;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.admin-order-next-step {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--ink);
}

.admin-order-next-step.done {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.admin-order-next-step b {
  margin-right: 8px;
}

.admin-order-detail-drawer {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-order-detail-drawer > summary {
  cursor: pointer;
  font-weight: 600;
}

.real-order-review-panel > summary,
.supplier-order-panel > summary,
.fulfillment-progress-panel > summary,
.arrival-review-panel > summary {
  cursor: pointer;
  font-weight: 700;
}

.real-order-review-form,
.supplier-order-form,
.fulfillment-progress-form,
.arrival-review-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.real-order-review-form > p,
.real-order-review-evidence,
.real-order-review-note,
.real-order-review-actions,
.supplier-order-form > p,
.supplier-order-actions,
.supplier-order-screenshot-field,
.fulfillment-progress-form > h4,
.fulfillment-progress-form > p,
.fulfillment-progress-note,
.fulfillment-progress-actions,
.arrival-review-photo-field,
.arrival-review-note,
.arrival-review-actions {
  grid-column: 1 / -1;
}

.real-order-review-form > p,
.real-order-review-state,
.supplier-order-form > p,
.supplier-order-state,
.fulfillment-progress-form > p,
.fulfillment-progress-state,
.arrival-review-content > p,
.arrival-review-state,
.arrival-review-photo-field small {
  color: var(--muted);
  font-size: 13px;
}

.real-order-review-actions,
.supplier-order-actions,
.fulfillment-progress-actions,
.arrival-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.fulfillment-progress-content {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.arrival-review-content {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.arrival-review-content > p {
  margin: 0;
}

.arrival-review-warning {
  padding: 10px 12px;
  border: 1px solid var(--warn);
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--warn) !important;
  font-weight: 700;
}

.fulfillment-progress-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.fulfillment-progress-form h4,
.fulfillment-progress-form p {
  margin: 0;
}

.fulfillment-shipment-evidence,
.fulfillment-progress-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.fulfillment-progress-summary span,
.fulfillment-shipment-evidence span {
  color: var(--muted);
}

.supplier-order-screenshot-field small {
  color: var(--muted);
  font-size: 12px;
}

.supplier-order-evidence {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: 12px;
  align-items: center;
  margin: 12px 0 0;
}

.supplier-order-evidence img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.supplier-order-evidence figcaption {
  display: grid;
  gap: 4px;
}

.supplier-order-evidence figcaption span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.real-order-review-evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.real-order-review-evidence.with-arrival {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.real-order-review-evidence-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.real-order-review-evidence-card figcaption {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.real-order-review-evidence-card small,
.real-order-review-meta-link,
.real-order-review-evidence-missing {
  color: var(--muted);
  font-size: 12px;
}

.real-order-review-evidence-card a {
  display: grid;
  min-height: 260px;
  place-items: center;
  background: var(--surface-2);
}

.real-order-review-evidence-card.production a {
  background-color: var(--surface-2);
  background-image:
    linear-gradient(45deg, var(--checkerboard-line-light) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checkerboard-line-light) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checkerboard-line-light) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checkerboard-line-light) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.real-order-review-evidence-card img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: contain;
}

.real-order-review-evidence-missing {
  display: grid;
  min-height: 260px;
  padding: 16px;
  place-items: center;
  text-align: center;
}

.real-order-review-meta-link {
  grid-column: 1 / -1;
  justify-self: start;
}

.operator-draft-card {
  border-style: dashed;
}

.nav-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.admin-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-order-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.admin-order-body {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 14px;
  align-items: start;
}

.admin-order-preview {
  display: grid;
  gap: 6px;
  margin: 0;
}

.admin-order-preview img,
.admin-order-preview.missing {
  width: 124px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-order-preview img {
  display: block;
  object-fit: contain;
}

.admin-order-preview figcaption,
.admin-order-preview.missing {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.admin-order-preview.missing {
  display: grid;
  place-items: center;
  padding: 10px;
}

.admin-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-order-grid div {
  display: grid;
  gap: 4px;
}

.admin-order-grid .wide {
  grid-column: 1 / -1;
}

.admin-order-grid b {
  color: var(--muted);
  font-size: 12px;
}

.admin-order-grid span {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.customer-care-ops .control-plane-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.customer-care-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.customer-care-summary div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.customer-care-summary b {
  font-size: 20px;
}

.customer-care-summary span,
.customer-care-metadata,
.customer-care-request code,
.customer-care-privacy-note {
  color: var(--muted);
  font-size: 12px;
}

.customer-care-list {
  margin-top: 14px;
  border-block: 1px solid var(--line);
}

.customer-care-request {
  display: grid;
  gap: 9px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}

.customer-care-request:last-child {
  border-bottom: 0;
}

.customer-care-request-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-care-request-head > div {
  display: flex;
  gap: 6px;
}

.customer-care-request-head time {
  color: var(--muted);
  font-size: 12px;
}

.customer-care-message {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.customer-care-metadata,
.customer-care-privacy-note {
  margin: 0;
  overflow-wrap: anywhere;
}

.customer-care-privacy-note {
  margin-top: 14px;
}

@media (max-width: 720px) {
  .customer-care-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-care-request-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.model-preview-gate {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.model-preview-gate-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.model-preview-gate h3 {
  margin: 0;
  font-size: 15px;
}

.model-preview-gate-head span {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.model-preview-gate p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.model-preview-gate .model-preview-meta {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.model-preview-gate ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
}

.model-preview-gate li + li {
  margin-top: 4px;
}

.model-preview-gate details {
  margin-top: 10px;
}

.model-preview-gate summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.model-preview-gate code {
  font-size: 12px;
}

.model-preview-gate.blocked {
  border-color: var(--bad);
  background: var(--bad-soft);
}

.model-preview-gate.blocked .model-preview-gate-head span {
  color: var(--bad);
  background: var(--bad-soft);
}

.model-preview-gate.warn {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.model-preview-gate.warn .model-preview-gate-head span {
  color: var(--warn);
  background: var(--warn-soft);
}

.model-preview-gate.good {
  border-color: var(--good);
  background: var(--good-soft);
}

.model-preview-gate.good .model-preview-gate-head span {
  color: var(--good);
  background: var(--good-soft);
}

.model-preview-gate.neutral {
  background: var(--surface-2);
}

.model-preview-qa {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.model-preview-qa-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.model-preview-qa h3 {
  margin: 0;
  font-size: 15px;
}

.model-preview-qa-head span,
.model-preview-qa p {
  color: var(--muted);
  font-size: 13px;
}

.model-preview-qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.model-preview-qa figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}

.model-preview-qa img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--surface-2);
}

.model-preview-qa figcaption {
  display: grid;
  gap: 4px;
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
}

.model-preview-qa figcaption strong {
  color: var(--ink);
  font-size: 13px;
}

.supplier-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.supplier-list-section,
.supplier-form-section,
.supplier-form-block {
  display: grid;
  gap: 12px;
}

.supplier-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 4px;
}

.supplier-card {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.supplier-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.supplier-card-title {
  font-weight: 780;
}

.supplier-card-meta,
.supplier-card-reason {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.supplier-card-reason {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-form {
  display: grid;
  gap: 14px;
}

.supplier-form-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.supplier-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.supplier-form textarea {
  min-height: 86px;
}

.supplier-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.supplier-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.supplier-checkbox-grid input {
  width: auto;
}

.supplier-template-note {
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
}

.supplier-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.factory-summary {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.factory-summary.missing {
  color: var(--muted);
}

.factory-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.factory-summary h3 {
  margin: 0;
  font-size: 15px;
}

.factory-summary-head span {
  color: var(--muted);
  font-size: 12px;
}

.factory-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.factory-summary-grid div {
  display: grid;
  gap: 4px;
}

.factory-summary-grid b,
.factory-option-list b {
  color: var(--muted);
  font-size: 12px;
}

.factory-summary-grid span {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.factory-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.factory-option-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
}

.factory-package {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.factory-package summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 760;
}

.factory-package pre {
  overflow: auto;
  max-height: 520px;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-ink);
  font-size: 12px;
  line-height: 1.5;
}

.secondary-button {
  min-height: var(--control-height-large);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  font-weight: 500;
}

.secondary-button:hover:not(:disabled) {
  background: var(--surface-hover);
}

.secondary-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.stage {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.stage strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.stage span {
  color: var(--muted);
  font-size: 12px;
}

.stage.done {
  border-color: var(--good);
  background: var(--good-soft);
}

.stage.failed {
  border-color: var(--bad);
  background: var(--bad-soft);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  gap: 18px;
  align-items: start;
}

.validation-panel {
  grid-column: 1 / -1;
}

.product-preview-panel,
.media-panel {
  grid-column: 1 / -1;
}

.rationale-panel {
  grid-column: 1 / -1;
}

.empty-state {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.concept-content {
  display: grid;
  gap: 14px;
}

.rationale-content {
  display: grid;
  gap: 14px;
}

.rationale-lead {
  display: grid;
  gap: 8px;
  max-width: 920px;
}

.rationale-lead p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.rationale-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rationale-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.rationale-item b {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.rationale-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.concept-description,
.concept-narrative {
  color: var(--muted);
  line-height: 1.48;
}

.tag-list,
.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-2);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 720;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rule {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.rule b {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.rule span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.media-viewer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-preview-viewer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.media-card {
  min-width: 0;
}

.media-card h3 {
  margin-bottom: 8px;
}

.image-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, var(--checkerboard-line-light) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checkerboard-line-light) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checkerboard-line-light) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checkerboard-line-light) 75%);
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.image-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.image-frame.prepared-frame {
  background: var(--viewer-bg);
  background-image: none;
}

.image-frame.raw-frame {
  background-color: var(--surface);
}

.edge-loupe {
  position: absolute;
  z-index: 4;
  display: none;
  width: 156px;
  height: 156px;
  border: 2px solid var(--surface);
  border-radius: 8px;
  background-color: var(--viewer-bg);
  background-repeat: no-repeat;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  pointer-events: none;
  transform: translate(calc(-1 * var(--loupe-offset, 78px)), calc(-1 * var(--loupe-offset, 78px)));
}

.edge-loupe::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  border-left: 1px solid rgba(255, 255, 255, 0.72);
  content: "";
  transform: translate(-50%, -50%);
}

.edge-loupe.visible {
  display: block;
}

.product-preview-card {
  min-width: 0;
}

.product-preview-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.product-preview-button.active .product-stage {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.product-preview-card h3 {
  margin-top: 9px;
}

.product-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1 / 1.1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.product-blank {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-artwork {
  position: absolute;
  display: block;
  height: auto;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

.production-exact-preview {
  object-fit: contain;
}

.preview-sync-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: var(--on-accent);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
}

.preview-sync-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.production-print-action {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.production-print-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.production-print-comparison.empty-state {
  display: block;
  color: var(--muted);
}

.production-print-card {
  display: grid;
  gap: 8px;
  margin: 0;
}

.production-print-card figcaption {
  display: grid;
  gap: 2px;
}

.production-print-card strong {
  font-size: 14px;
}

.production-print-card small {
  color: var(--muted);
  font-size: 12px;
}

.production-print-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface-2);
  background-image:
    linear-gradient(45deg, rgba(120, 113, 108, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(120, 113, 108, 0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(120, 113, 108, 0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(120, 113, 108, 0.12) 75%);
  background-position: 0 0, 10px 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.production-print-frame-dark {
  background-color: var(--viewer-bg);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.16) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.16) 75%);
}

.production-print-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.production-render-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.production-render-summary > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.production-render-summary small,
.production-render-summary dt {
  color: var(--muted);
}

.production-render-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.production-render-summary dl div {
  display: grid;
  gap: 2px;
}

.production-render-summary dt,
.production-render-summary dd {
  margin: 0;
  font-size: 12px;
}

.production-render-summary dd {
  font-weight: 720;
}

.render-summary-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface-2);
  color: var(--accent);
}

.render-summary-pill.good {
  background: var(--good-soft);
  color: var(--good);
}

.render-summary-pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.render-summary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.render-summary-links a {
  border-bottom: 1px solid currentColor;
  color: var(--accent);
  font-size: 12px;
  font-weight: 720;
}

.status-pill.good {
  background: var(--good-soft);
  color: var(--good);
}

.status-pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-pill.bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.status-pill.neutral {
  background: var(--surface-2);
  color: var(--muted);
}

.validation-content {
  display: grid;
  gap: 12px;
}

.validation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.metric b {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

.metric span {
  font-size: 18px;
  font-weight: 800;
}

.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
}

.check strong {
  min-width: 18px;
}

@media (max-width: 1120px) {
  .shell,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .feed-list-page {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .run-list {
    max-height: 340px;
  }

  .timeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .control-plane-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .control-plane-metric:nth-child(3) {
    border-right: 0;
  }

  .control-plane-metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .shell,
  .feed-page {
    padding: 10px;
  }

  .timeline,
  .control-plane-metrics,
  .control-plane-domains,
  .operator-product-details,
  .media-viewer,
  .product-preview-viewer,
  .feed-list,
  .rule-grid,
  .real-order-pilot-form,
  .real-order-review-form,
  .supplier-order-form,
  .fulfillment-progress-form,
  .arrival-review-form,
  .real-order-review-evidence,
  .admin-order-body,
  .admin-order-grid,
  .supplier-layout,
  .supplier-form-grid,
  .validation-summary {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    padding: 10px;
  }

  .app-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: var(--space-2);
  }

  .app-brand,
  .app-appearance {
    grid-column: 1 / -1;
  }

  .app-nav-group {
    display: contents;
  }

  .app-nav-link {
    min-width: 0;
    background: var(--surface-2);
  }

  .app-appearance {
    width: 100%;
    margin: 0;
  }

  .control-plane-header,
  .control-plane-section-head,
  .control-plane-work-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-refresh-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .control-plane-work-action {
    width: 100%;
    justify-content: space-between;
  }

  .operator-product-head,
  .operator-product-actions,
  .operator-product-list.empty-state {
    align-items: flex-start;
    flex-direction: column;
  }

  .operator-product-actions .nav-button {
    width: 100%;
  }

  .control-plane-metric,
  .control-plane-metric:nth-child(3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .control-plane-metric:last-child {
    border-bottom: 0;
  }

  .control-plane-domains a,
  .control-plane-domains a:nth-child(2n),
  .control-plane-domains a:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .control-plane-domains a:last-child {
    border-bottom: 0;
  }

  .real-order-review-evidence.with-arrival {
    grid-template-columns: 1fr;
  }

  .real-order-pilot-note {
    grid-column: auto;
  }

  .real-order-review-form > p,
  .real-order-review-evidence,
  .real-order-review-note,
  .real-order-review-actions,
  .supplier-order-form > p,
  .supplier-order-actions,
  .supplier-order-screenshot-field,
  .fulfillment-progress-form > h4,
  .fulfillment-progress-form > p,
  .fulfillment-progress-note,
  .fulfillment-progress-actions {
    grid-column: auto;
  }

  .arrival-review-photo-field,
  .arrival-review-note,
  .arrival-review-actions {
    grid-column: auto;
  }

  .supplier-order-evidence {
    grid-template-columns: 1fr;
  }

  .admin-order-preview img,
  .admin-order-preview.missing {
    width: min(180px, 100%);
  }

  .feed-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* 最小商品管理：只暴露已验证组合的勾选和受控生命周期。 */

.product-admin {
  display: grid;
  gap: var(--space-5);
  max-width: 1180px;
}

.product-admin h1,
.product-admin h2,
.product-admin p {
  margin: 0;
}

.product-admin-lead,
.product-boundary-note,
.product-workflow-state,
.product-version-field span,
.product-evidence-fields span,
.product-admin-facts span {
  color: var(--muted);
  font-size: 13px;
}

.product-admin-lead {
  margin-top: var(--space-2) !important;
}

.product-admin-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.product-admin-facts > div {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-4);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.product-admin-facts > div:nth-child(3n) {
  border-right: 0;
}

.product-admin-facts > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.product-admin-facts strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.product-assortment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.product-assortment-form[hidden] {
  display: none;
}

.product-assortment-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-2);
}

.product-assortment-section-head,
.product-workflow-actions,
.product-admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.product-assortment-section-head h2 {
  margin-top: var(--space-1);
  font-size: var(--text-title);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.product-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: var(--space-2);
}

.product-color-grid {
  grid-template-columns: repeat(5, minmax(82px, 1fr));
}

.product-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.product-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.product-option input {
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.product-option span {
  min-width: 0;
  font-size: 13px;
}

.product-preview-card,
.product-workflow-card {
  grid-column: 1 / -1;
}

.product-version-field,
.product-evidence-fields label {
  display: grid;
  gap: var(--space-2);
}

.product-version-field input,
.product-evidence-fields input,
.product-evidence-fields textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-1);
  color: var(--ink);
}

.product-preview-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.product-preview-metrics > div {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border-right: 1px solid var(--line);
  text-align: center;
}

.product-preview-metrics > div:last-child {
  border-right: 0;
}

.product-preview-metrics strong {
  font-size: 20px;
}

.product-preview-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.product-evidence-details {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-evidence-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.product-evidence-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.product-workflow-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.product-workflow-state {
  padding: var(--space-3);
  border-radius: 8px;
  background: var(--surface-1);
}

.product-admin-footer {
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 780px) {
  .product-assortment-form {
    grid-template-columns: 1fr;
  }

  .product-assortment-card,
  .product-preview-card,
  .product-workflow-card {
    grid-column: auto;
  }

  .product-color-grid {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }
}

@media (max-width: 680px) {
  .product-admin-facts,
  .product-preview-metrics,
  .product-evidence-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-admin-facts > div,
  .product-admin-facts > div:nth-child(3n),
  .product-admin-facts > div:nth-last-child(-n + 3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .product-admin-facts > div:nth-child(2n) {
    border-right: 0;
  }

  .product-admin-facts > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .product-preview-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .product-preview-metrics > div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .product-assortment-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-version-field {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .product-admin-facts {
    grid-template-columns: 1fr;
  }

  .product-admin-facts > div,
  .product-admin-facts > div:nth-child(2n),
  .product-admin-facts > div:nth-child(3n),
  .product-admin-facts > div:nth-last-child(-n + 2),
  .product-admin-facts > div:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-admin-facts > div:last-child {
    border-bottom: 0;
  }
}

/* 正式供应与成本页面：候选供应商运营记录不参与商业真相。 */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.supplier-ops {
  display: grid;
  gap: var(--space-5);
  max-width: 1180px;
}

.supplier-ops h1,
.supplier-ops h2,
.supplier-ops p,
.supplier-ops dl {
  margin: 0;
}

.supplier-ops-lead,
.supplier-ops-card-head p,
.supplier-onboarding-card p,
.supplier-cost-confirm p,
.supplier-cost-command-state,
.supplier-cost-form label > span,
.supplier-ops-facts span,
.supplier-cost-summary span {
  color: var(--muted);
  font-size: 13px;
}

.supplier-ops-lead {
  margin-top: var(--space-2) !important;
}

.supplier-ops-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.supplier-ops-facts > div {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-4);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.supplier-ops-facts > div:nth-child(3n) {
  border-right: 0;
}

.supplier-ops-facts > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.supplier-ops-facts strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.supplier-ops-card {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-2);
}

.supplier-ops-card-head,
.supplier-onboarding-card,
.supplier-ops-footer,
.supplier-cost-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.supplier-ops-card-head h2,
.supplier-onboarding-card h2 {
  margin: var(--space-1) 0 var(--space-1);
  font-size: var(--text-title);
}

.supplier-cost-search {
  flex: 0 1 260px;
}

.supplier-cost-search input,
.supplier-cost-form input,
.supplier-cost-form select {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-1);
  color: var(--ink);
}

.supplier-cost-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.supplier-cost-summary > div {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border-right: 1px solid var(--line);
  text-align: center;
}

.supplier-cost-summary > div:last-child {
  border-right: 0;
}

.supplier-cost-summary strong {
  font-size: 18px;
}

.supplier-cost-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.supplier-cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.supplier-cost-table th,
.supplier-cost-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.supplier-cost-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--surface-1);
  color: var(--muted);
  font-weight: 500;
}

.supplier-cost-table tr:last-child td {
  border-bottom: 0;
}

.supplier-cost-table td:first-child {
  display: grid;
  gap: 2px;
}

.supplier-cost-table td:first-child span {
  color: var(--muted);
  font-size: 11px;
}

.supplier-cost-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.supplier-cost-form[hidden] {
  display: none;
}

.supplier-cost-form label {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  min-width: 0;
}

.supplier-cost-evidence {
  grid-column: span 2;
}

.supplier-cost-form-actions {
  display: flex;
  align-items: end;
}

.supplier-cost-form-actions .nav-button {
  width: 100%;
}

.supplier-cost-confirm {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}

.supplier-cost-confirm[hidden] {
  display: none;
}

.supplier-cost-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
}

.supplier-cost-preview > div {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.supplier-cost-preview dt {
  color: var(--muted);
  font-size: 12px;
}

.supplier-cost-preview dd {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.supplier-cost-confirm-actions {
  justify-content: flex-start;
}

.supplier-cost-command-state {
  padding: var(--space-3);
  border-radius: 8px;
  background: var(--surface-1);
}

.supplier-onboarding-card > div {
  max-width: 720px;
}

.supplier-ops-footer {
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 780px) {
  .supplier-cost-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-cost-evidence {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .supplier-ops-facts,
  .supplier-cost-summary,
  .supplier-cost-form,
  .supplier-cost-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-ops-facts > div,
  .supplier-ops-facts > div:nth-child(3n),
  .supplier-ops-facts > div:nth-last-child(-n + 3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .supplier-ops-facts > div:nth-child(2n) {
    border-right: 0;
  }

  .supplier-ops-facts > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .supplier-cost-summary > div:nth-child(2n) {
    border-right: 0;
  }

  .supplier-cost-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .supplier-ops-card-head,
  .supplier-onboarding-card {
    align-items: stretch;
    flex-direction: column;
  }

  .supplier-cost-search {
    flex-basis: auto;
    width: 100%;
  }

  .supplier-onboarding-card .nav-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .supplier-ops-facts,
  .supplier-cost-form,
  .supplier-cost-preview {
    grid-template-columns: 1fr;
  }

  .supplier-ops-facts > div,
  .supplier-ops-facts > div:nth-child(2n),
  .supplier-ops-facts > div:nth-child(3n),
  .supplier-ops-facts > div:nth-last-child(-n + 2),
  .supplier-ops-facts > div:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .supplier-ops-facts > div:last-child {
    border-bottom: 0;
  }

  .supplier-cost-confirm-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .supplier-cost-confirm-actions .nav-button {
    width: 100%;
  }
}

/* 最小发布控制台：复用服务端发布与 assignment 状态机，不复制商业真相。 */

.release-ops {
  display: grid;
  gap: var(--space-5);
  max-width: 1080px;
}

.release-ops h1,
.release-ops h2,
.release-ops p,
.release-ops dl { margin: 0; }

.release-ops-lead,
.release-step-head p,
.release-form label > span,
.release-evidence-field > span,
.release-boundary-note,
.release-command-state,
.release-ops-facts span,
.release-confirm p {
  color: var(--muted);
  font-size: 13px;
}

.release-ops-lead { margin-top: var(--space-2) !important; }

.release-business-state {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.release-business-state > div {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-4);
  border-right: 1px solid var(--line);
}

.release-business-state > div:last-child { border-right: 0; }
.release-business-state span { color: var(--muted); font-size: 12px; }
.release-business-state strong { font-size: 15px; }

.release-ops-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.release-ops-facts > div {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-4);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.release-ops-facts > div:nth-child(3n) { border-right: 0; }
.release-ops-facts > div:nth-last-child(-n + 3) { border-bottom: 0; }
.release-ops-facts strong { overflow-wrap: anywhere; font-size: 14px; }

.release-ops-card {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-2);
}

.release-step-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: start;
}

.release-step-head h2 { margin-bottom: var(--space-1); font-size: var(--text-title); }

.release-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: end;
}

.release-form label,
.release-evidence-field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.release-form input,
.release-form select,
.release-evidence-field textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-1);
  color: var(--ink);
}

.release-candidate-form { grid-template-columns: minmax(0, 1fr) auto; }
.release-admission-form { grid-template-columns: minmax(0, 1fr) auto; }
.release-rollback-form { grid-template-columns: minmax(0, 1fr) auto; }

.release-assignment-action,
.release-advanced-body,
.release-advanced-body > section {
  display: grid;
  gap: var(--space-4);
}

.release-form[hidden],
.release-assignment-action[hidden],
.nav-button[hidden] { display: none; }

.release-advanced {
  border-block: 1px solid var(--line);
  padding-block: var(--space-3);
}

.release-advanced summary {
  cursor: pointer;
  font-weight: 700;
}

.release-advanced-body { padding-top: var(--space-4); }
.release-advanced-body > section + section {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.release-action-preview,
.release-confirm {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}

.release-action-preview[hidden],
.release-confirm[hidden] { display: none; }

.release-action-preview dl,
.release-summary,
.release-confirm dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
}

.release-action-preview dl > div,
.release-summary > div,
.release-confirm dl > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.release-action-preview dt,
.release-summary dt,
.release-confirm dt { color: var(--muted); font-size: 12px; }

.release-action-preview dd,
.release-summary dd,
.release-confirm dd { overflow-wrap: anywhere; font-size: 13px; }

.release-actions,
.release-ops-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.release-command-state {
  padding: var(--space-3);
  border-radius: 8px;
  background: var(--surface-1);
}

.release-ops-footer { justify-content: flex-end; }

@media (max-width: 780px) {
  .release-form,
  .release-candidate-form { grid-template-columns: 1fr 1fr; }
  .release-form .nav-button { width: 100%; }
}

@media (max-width: 680px) {
  .release-business-state { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .release-business-state > div:nth-child(2n) { border-right: 0; }
  .release-business-state > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .release-ops-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .release-ops-facts > div,
  .release-ops-facts > div:nth-child(3n),
  .release-ops-facts > div:nth-last-child(-n + 3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .release-ops-facts > div:nth-child(2n) { border-right: 0; }
  .release-ops-facts > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .release-step-head { grid-template-columns: 1fr; }
  .release-step-head > .status-pill { justify-self: start; }
}

@media (max-width: 480px) {
  .release-business-state,
  .release-ops-facts,
  .release-form,
  .release-candidate-form,
  .release-rollback-form,
  .release-action-preview dl,
  .release-summary,
  .release-confirm dl { grid-template-columns: 1fr; }
  .release-business-state > div,
  .release-business-state > div:nth-child(2n),
  .release-business-state > div:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .release-business-state > div:last-child { border-bottom: 0; }
  .release-ops-facts > div,
  .release-ops-facts > div:nth-child(2n),
  .release-ops-facts > div:nth-child(3n),
  .release-ops-facts > div:nth-last-child(-n + 2),
  .release-ops-facts > div:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .release-ops-facts > div:last-child { border-bottom: 0; }
  .release-actions { flex-direction: column; }
  .release-actions .nav-button { width: 100%; }
}

/* 运营控制台导航壳，由 app-shell.js 注入 */

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  display: flex;
  position: sticky;
  top: 0;
  flex-direction: column;
  gap: var(--space-6);
  height: 100vh;
  padding: var(--space-5) var(--space-3);
  overflow-y: auto;
  border-right: 1px solid var(--line-subtle);
  background: var(--surface);
}

.app-brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 10px;
}

.app-brand strong {
  font-size: var(--text-headline);
  letter-spacing: -0.01em;
}

.app-brand span {
  color: var(--muted);
  font-size: var(--text-caption);
}

.app-nav-group {
  display: grid;
  gap: 2px;
}

.app-nav-heading {
  margin: 0 0 var(--space-1);
  padding: 0 10px;
  color: var(--faint);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-nav-link {
  padding: 7px 10px;
  border-radius: var(--radius-card);
  color: var(--ink);
  font-size: 14px;
}

.app-nav-link:hover {
  background: var(--surface-hover);
}

.app-nav-link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.app-appearance {
  display: flex;
  gap: 2px;
  margin-top: auto;
  padding: 3px;
  border-radius: var(--radius-card);
  background: var(--surface-2);
}

.app-appearance button {
  flex: 1;
  padding: 5px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--text-caption);
}

.app-appearance button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.app-session {
  display: grid;
  gap: var(--space-1);
}

.app-session-logout {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  text-align: left;
}

.app-session-logout:hover:not(:disabled) {
  border-color: var(--line);
  background: var(--surface-hover);
  color: var(--ink);
}

.app-session-logout:disabled {
  cursor: wait;
  opacity: 0.65;
}

.app-session-status {
  color: var(--danger);
  font-size: var(--text-caption);
}

.app-main {
  min-width: 0;
  background: var(--bg);
}

.app-main > .admin-shell,
.app-main > .shell {
  min-height: auto;
  padding: var(--page-padding);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    height: auto;
    padding: var(--space-3) var(--page-padding);
    border-right: 0;
    border-bottom: 1px solid var(--line-subtle);
  }

  .app-nav-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
  }

  .app-nav-heading {
    display: none;
  }

  .app-appearance {
    margin: 0 0 0 auto;
  }

  .app-session {
    min-width: 110px;
  }
}

/* Catalog Supply 只读工作台 */

.catalog-supply-workspace {
  display: grid;
  gap: var(--space-5);
  max-width: 1480px;
}

.catalog-supply-header,
.catalog-supply-title-line,
.catalog-supply-header-actions,
.catalog-supply-section-head,
.catalog-source-row {
  display: flex;
  align-items: center;
}

.catalog-supply-header,
.catalog-supply-section-head {
  justify-content: space-between;
  gap: var(--space-4);
}

.catalog-supply-title-line,
.catalog-supply-header-actions,
.catalog-source-row {
  gap: var(--space-3);
}

.catalog-supply-header h1,
.catalog-supply-section h2,
.catalog-supply-section p {
  margin: 0;
}

.catalog-supply-title-line h1 {
  font-size: var(--text-title);
}

.catalog-supply-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.catalog-source-row {
  min-width: 0;
  padding: 10px var(--space-3);
  background: var(--surface-2);
  font-size: var(--text-caption);
}

.catalog-source-row + .catalog-source-row {
  border-left: 1px solid var(--line);
}

.catalog-source-label {
  margin-right: auto;
  color: var(--ink);
  font-weight: 600;
}

.catalog-supply-section {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.catalog-supply-section-head p {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: var(--text-caption);
}

.catalog-supply-filters {
  display: flex;
  gap: var(--space-2);
}

.catalog-supply-filters input,
.catalog-supply-filters select {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
}

.catalog-supply-filters input {
  width: min(280px, 38vw);
}

.catalog-supply-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.catalog-supply-command {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.catalog-supply-command [hidden],
.catalog-supplier-form [hidden] {
  display: none !important;
}

.catalog-supply-command .muted {
  max-width: 260px;
  font-size: var(--text-caption);
}

.catalog-supplier-dialog {
  width: min(880px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-raised);
}

.catalog-supplier-dialog::backdrop {
  background: rgb(17 24 39 / 42%);
  backdrop-filter: blur(2px);
}

.catalog-supplier-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--line);
}

.catalog-supplier-dialog-head h2 {
  margin: var(--space-1) 0 0;
  font-size: var(--text-title);
}

.dialog-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.catalog-supplier-form {
  max-height: calc(100vh - 140px);
  padding: 0 var(--space-6) var(--space-6);
  overflow-y: auto;
}

.catalog-supplier-boundary {
  margin: var(--space-4) 0;
  color: var(--muted);
  font-size: var(--text-small);
}

.catalog-supplier-form fieldset {
  margin: 0;
  padding: var(--space-4) 0 var(--space-5);
  border: 0;
  border-top: 1px solid var(--line);
}

.catalog-supplier-form legend {
  padding: var(--space-4) 0 0;
  font-weight: 700;
}

.catalog-supplier-fields {
  display: grid;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
}

.catalog-supplier-fields.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-supplier-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: var(--text-caption);
  font-weight: 600;
}

.catalog-supplier-fields .field-wide {
  grid-column: 1 / -1;
}

.catalog-supplier-fields input,
.catalog-supplier-fields select,
.catalog-supplier-fields textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.catalog-supplier-fields textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.catalog-supplier-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding-top: var(--space-4);
}

.catalog-supplier-actions .form-error {
  margin-right: auto;
  color: var(--bad);
}

.catalog-supplier-summary {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.catalog-supplier-summary > div {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1fr);
  gap: var(--space-4);
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.catalog-supplier-summary dt {
  color: var(--muted);
}

.catalog-supplier-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.catalog-supplier-submit-state {
  min-height: 24px;
  margin-top: var(--space-4);
  color: var(--muted);
}

#supplier-registration-success,
#quality-hold-success,
#certification-eligibility-success {
  padding: var(--space-6) 0;
}

#supplier-registration-success h3,
#quality-hold-success h3,
#certification-eligibility-success h3 {
  margin: var(--space-3) 0 var(--space-2);
}

.catalog-workflow-dialog {
  width: min(760px, calc(100vw - 40px));
}

.catalog-publication-dialog {
  width: min(920px, calc(100vw - 40px));
}

.catalog-publication-flow {
  display: grid;
  gap: var(--space-3);
}

.catalog-publication-step {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-2);
}

.catalog-publication-step-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.catalog-publication-step-head > span {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}

.catalog-publication-step h3,
.catalog-publication-step p,
.catalog-publication-confirm h3 {
  margin: 0;
}

.catalog-publication-step p {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-caption);
}

.catalog-publication-confirm {
  padding: var(--space-4);
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--accent-soft);
}

.catalog-supplier-summary.compact {
  margin-top: var(--space-3);
  font-size: var(--text-caption);
}

.catalog-import-table-wrap {
  width: 100%;
  margin: var(--space-4) 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.catalog-import-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--text-caption);
}

.catalog-import-table th,
.catalog-import-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}

.catalog-import-table th {
  background: var(--surface-2);
  color: var(--muted);
}

.catalog-supply-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.catalog-supply-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 13px;
}

.catalog-supply-table th,
.catalog-supply-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.catalog-supply-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-caption);
  font-weight: 600;
}

.catalog-supply-table tbody tr:last-child td {
  border-bottom: 0;
}

.catalog-supply-table td > strong,
.catalog-supply-table td > span,
.catalog-supply-table td > code,
.catalog-event-row strong,
.catalog-event-row span,
.catalog-event-row time,
.catalog-release-row strong,
.catalog-release-row span {
  display: block;
}

.catalog-supply-table td > span,
.catalog-event-row span,
.catalog-event-row time,
.catalog-release-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-caption);
}

.catalog-supply-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.catalog-supply-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.catalog-event-row,
.catalog-release-row {
  display: grid;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.catalog-event-row > div,
.catalog-release-row > div,
.catalog-event-row span,
.catalog-release-row span,
.catalog-supply-table td,
.catalog-supply-table code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.catalog-event-row {
  grid-template-columns: auto minmax(0, 1fr) minmax(140px, auto);
}

.catalog-event-row > div:last-child {
  text-align: right;
}

.catalog-release-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-supply-unavailable {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line));
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
}

.catalog-supply-unavailable span {
  color: var(--muted);
  font-size: var(--text-caption);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 780px) {
  .catalog-supply-header,
  .catalog-supply-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-supply-header-actions,
  .catalog-supply-filters,
  .catalog-supply-toolbar,
  .catalog-supply-command {
    width: 100%;
  }

  .catalog-supply-toolbar {
    align-items: stretch;
  }

  .catalog-supply-command {
    justify-content: space-between;
  }

  .catalog-supply-header-actions {
    justify-content: space-between;
  }

  .catalog-supply-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .catalog-supply-filters input {
    width: 100%;
  }

  .catalog-supply-sources,
  .catalog-supply-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-source-row + .catalog-source-row {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .catalog-source-row {
    flex-wrap: wrap;
  }

  .catalog-source-row > span:last-child {
    flex-basis: 100%;
    overflow-wrap: anywhere;
  }

  .catalog-event-row,
  .catalog-release-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-event-row > div:last-child {
    text-align: left;
  }

  .catalog-supplier-fields.two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-supplier-fields .field-wide {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .app-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .app-brand,
  .app-nav-group,
  .app-appearance,
  .app-session {
    width: 100%;
  }

  .app-nav-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-nav-link {
    min-width: 0;
  }

  .app-appearance {
    margin-left: 0;
  }

  .catalog-supplier-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .catalog-supplier-dialog-head,
  .catalog-supplier-form {
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }

  .catalog-supplier-summary > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }

  .catalog-supplier-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .catalog-publication-step {
    padding: var(--space-3);
  }
}
