:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --panel: #fffefa;
  --panel-2: #f8faf7;
  --ink: #17211d;
  --muted: #65716c;
  --line: #d9ded8;
  --line-strong: #bdc8bf;
  --green: #176f52;
  --green-soft: #e4f3ec;
  --blue: #2d5f8f;
  --blue-soft: #e5eef8;
  --amber: #956417;
  --amber-soft: #fff1d8;
  --red: #a33434;
  --red-soft: #fde7e4;
  --shadow: 0 14px 36px rgb(30 39 35 / 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover,
.file-button:hover {
  filter: brightness(1.05);
}

button:focus-visible,
.file-button:focus-visible,
.multi-upload-action:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(45 95 143 / 0.28);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(45 95 143 / 0.16);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 254 250 / 0.94);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 24px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 21px;
}

h3 {
  margin-bottom: 0;
  font-size: 16px;
}

h4 {
  margin-bottom: 5px;
  font-size: 19px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 3px;
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel-2);
}

.language-switch button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.language-switch button.is-active {
  background: var(--ink);
  color: #fff;
}

.sync-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #b8d8c8;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.sync-indicator.is-warning {
  border-color: #ead39b;
  background: var(--amber-soft);
  color: var(--amber);
}

.top-actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.workspace {
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.summary-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-tile strong {
  font-size: 26px;
}

.summary-tile.auth-tile {
  grid-column: 1 / -1;
}

.summary-tile.green {
  border-color: #b8d8c8;
  background: var(--green-soft);
}

.summary-tile.blue {
  border-color: #c0d3e6;
  background: var(--blue-soft);
}

.summary-tile.amber {
  border-color: #ead39b;
  background: var(--amber-soft);
}

.summary-tile.red {
  border-color: #ebbbb6;
  background: var(--red-soft);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.orders-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.orders-panel {
  position: sticky;
  top: 98px;
  max-height: calc(100vh - 116px);
  overflow: hidden;
}

.panel-header,
.detail-header,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-header {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.subtle-button {
  background: #fff;
  color: var(--ink);
}

.danger-button {
  border-color: #d8aaa5;
  background: var(--red);
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.filters input {
  grid-column: 1 / -1;
}

.orders-table-wrap {
  max-height: calc(100vh - 246px);
  overflow: auto;
}

.orders-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.order-card {
  display: grid;
  width: 100%;
  align-items: stretch;
  justify-content: stretch;
  gap: 8px;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.order-card:hover {
  border-color: var(--line-strong);
  filter: none;
}

.order-card.is-selected {
  border-color: #acc9bb;
  background: #eef5f1;
}

.order-card-top,
.order-card-meta,
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.order-card-top strong {
  flex: 0 0 auto;
  font-size: 15px;
}

.order-card-product {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card-meta,
.order-card-footer {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-card-meta span,
.order-card-footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-dot {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #ebbbb6;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
}

.order-card .status-pill {
  flex: 0 1 auto;
  min-height: 28px;
  padding: 5px 9px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.orders-table th:nth-child(1),
.orders-table td:nth-child(1) {
  width: 31%;
}

.orders-table th:nth-child(2),
.orders-table td:nth-child(2) {
  width: 26%;
}

.orders-table th:nth-child(3),
.orders-table td:nth-child(3) {
  width: 27%;
}

.orders-table th:nth-child(4),
.orders-table td:nth-child(4) {
  width: 16%;
}

.orders-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
}

.orders-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  vertical-align: middle;
}

.orders-table tr.is-selected {
  background: #eef5f1;
}

.orders-table td strong,
.orders-table td span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orders-table td span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.order-link {
  display: grid;
  justify-items: start;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.order-link strong {
  font-size: 14px;
}

.order-link span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill,
.flag-count,
.reminder {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill.green,
.reminder.ok {
  border-color: #b8d8c8;
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.blue {
  border-color: #c0d3e6;
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.amber,
.reminder.medium {
  border-color: #ead39b;
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.red,
.reminder.high {
  border-color: #ebbbb6;
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.neutral {
  background: #f2f3f0;
}

.flag-count {
  width: 26px;
  margin-top: 6px;
  justify-content: center;
  border-color: #ebbbb6;
  background: var(--red-soft);
  color: var(--red);
}

.empty-row,
.empty-state {
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.auth-state p {
  max-width: 520px;
  margin: 10px auto 0;
  line-height: 1.45;
}

.detail-panel {
  min-height: calc(100vh - 116px);
  padding: 18px;
}

.detail-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-title-block {
  min-width: 0;
}

.detail-product-summary {
  max-width: 920px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.compact-fact {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.compact-fact span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.compact-fact strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-fact.is-positive {
  border-color: #b8d8c8;
  background: var(--green-soft);
}

.compact-fact.is-warning {
  border-color: #ead39b;
  background: var(--amber-soft);
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) repeat(2, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.workflow-status-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
  min-height: 61px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.workflow-status-control > span,
.workflow-status-control > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.workflow-status-control > small {
  grid-column: 1 / -1;
}

.workflow-status-control > .workflow-status-updated {
  color: var(--ink);
  font-weight: 700;
}

.workflow-status-select {
  min-width: 210px;
  min-height: 38px;
  padding: 7px 34px 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.workflow-status-select:focus-visible {
  outline: 3px solid rgb(23 111 82 / 0.25);
  outline-offset: 2px;
}

.moritz-note-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.moritz-note-row > span,
.moritz-note-row > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.moritz-note-row > input {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.moritz-note-row > input:focus-visible {
  outline: 3px solid rgb(23 111 82 / 0.25);
  outline-offset: 2px;
}

.workflow-status-select.green {
  border-color: #b8d8c8;
  background: var(--green-soft);
}

.workflow-status-select.blue {
  border-color: #c0d3e6;
  background: var(--blue-soft);
}

.workflow-status-select.amber {
  border-color: #ead39b;
  background: var(--amber-soft);
}

.workflow-status-select.red {
  border-color: #ebbbb6;
  background: var(--red-soft);
}

.ellen-work-status {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel-2);
}

.ellen-work-status.green {
  border-left-color: var(--green);
}

.ellen-work-status.blue {
  border-left-color: var(--blue);
}

.ellen-work-status.amber {
  border-left-color: var(--amber);
}

.ellen-work-status.red {
  border-left-color: var(--red);
}

.ellen-work-status.is-unavailable {
  opacity: 0.72;
}

.ellen-work-status-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ellen-work-status-heading > div {
  display: grid;
  gap: 4px;
}

.ellen-work-status-heading span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.ellen-work-status-heading small,
.ellen-work-status > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.ellen-work-status-heading strong {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.ellen-work-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ellen-work-fact {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

.ellen-work-fact.wide {
  grid-column: span 2;
}

.ellen-work-fact.warning {
  border-color: #ead39b;
  background: var(--amber-soft);
}

.ellen-work-fact span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ellen-work-fact strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.ellen-work-scopes {
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.ellen-work-scopes summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.ellen-work-scopes > div {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.ellen-work-scopes article {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-size: 10px;
}

.ellen-work-scopes article small {
  color: var(--muted);
  font-weight: 750;
}

.workflow-status-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.workflow-status-actions button {
  min-height: 34px;
  font-size: 11px;
}

.reminder-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 43px;
  padding: 14px 0 0;
}

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

.data-section {
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.production-brief-section,
.supplier-uploads-section,
.timeline-section {
  grid-column: 1 / -1;
}

.section-heading {
  min-height: 30px;
}

.section-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

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

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.wide-field {
  display: grid;
}

.fixed-field {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 61px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.fixed-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fixed-field strong {
  font-size: 15px;
}

.fixed-multiline-field strong {
  line-height: 1.45;
  white-space: pre-line;
}

.link-field a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.phone-fallback-field {
  align-content: start;
}

.phone-fallback-field small {
  color: var(--amber);
  font-size: 10px;
  line-height: 1.35;
}

.helper-text {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.upload-state-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.upload-state-card.is-error {
  border-color: #e5b9b4;
  background: var(--red-soft);
  color: var(--red);
}

.direct-upload-list {
  display: grid;
  gap: 14px;
}

.direct-upload-artwork {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.upload-artwork-heading {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.upload-artwork-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.upload-artwork-heading strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-upload-zone {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 2px dashed var(--line-strong);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  transition: border-color 120ms ease, background 120ms ease;
}

.order-upload-zone.is-dragging {
  border-color: var(--green);
  background: var(--green-soft);
}

.order-upload-zone.is-busy {
  border-style: solid;
}

.upload-kind-field {
  display: grid;
  gap: 6px;
  text-align: left;
}

.upload-kind-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.upload-kind-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.order-upload-zone.is-full {
  background: var(--panel-2);
}

.multi-upload-action {
  display: grid;
  gap: 4px;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
}

.multi-upload-action strong {
  font-size: 15px;
}

.multi-upload-action span:last-child,
.order-upload-zone > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.multi-upload-action.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.upload-plus {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  place-items: center;
}

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

.upload-input:focus-visible + .multi-upload-action {
  outline: 3px solid rgb(45 95 143 / 0.28);
  outline-offset: 4px;
  border-radius: 6px;
}

.batch-upload-progress {
  width: 100%;
  height: 7px;
  accent-color: var(--green);
}

.batch-upload-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.batch-upload-status.is-error {
  color: var(--red);
}

.upload-gallery-empty {
  display: grid;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  place-items: center;
}

.production-upload-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.production-upload-card {
  display: grid;
  align-content: start;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.production-upload-card.is-history {
  background: var(--panel-2);
}

.production-upload-card > a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--panel-2);
}

.production-upload-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.production-upload-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
}

.production-upload-card figcaption > span {
  display: grid;
  min-width: 0;
}

.production-upload-card figcaption strong,
.production-upload-card figcaption small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-upload-card figcaption strong {
  font-size: 11px;
}

.production-upload-card figcaption small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.delete-upload-button {
  min-height: 32px;
  padding: 0 8px;
  border-color: #e5b9b4;
  background: #fff;
  color: var(--red);
  font-size: 10px;
  font-weight: 850;
}

.production-upload-history {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.production-upload-history summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.production-upload-history[open] summary {
  margin-bottom: 10px;
}

.asset-note-form {
  display: grid;
  gap: 7px;
  padding: 0 8px 8px;
}

.asset-note-form label {
  display: grid;
  gap: 4px;
}

.asset-note-form label > span,
.asset-note-form > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.asset-note-form textarea {
  min-height: 58px;
  resize: vertical;
}

.asset-note-form > small.is-error {
  color: var(--red);
}

.quiet-button {
  justify-self: start;
  min-height: 32px;
  padding: 0 11px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

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

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

.artwork-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.artwork-card-header h4 {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.2;
}

.source-facts-grid .fixed-field {
  min-height: 58px;
}

.workflow-state-card {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.workflow-state-card.is-warning {
  border-color: #ead39b;
  background: var(--amber-soft);
  color: var(--amber);
}

.artwork-workflow-block {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.workflow-block-heading {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.physical-artwork-row {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.physical-artwork-heading,
.shipment-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.physical-artwork-heading strong,
.shipment-card-heading strong {
  font-size: 12px;
}

.physical-artwork-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

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

.workflow-fact {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.workflow-fact span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.workflow-fact strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-fact.is-complete {
  border-color: #b8d8c8;
  background: var(--green-soft);
}

.workflow-fact.is-warning {
  border-color: #ead39b;
  background: var(--amber-soft);
}

.workflow-fact.is-alert {
  border-color: #ebbbb6;
  background: var(--red-soft);
}

.picture-review-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #b8d8c8;
  border-radius: 7px;
  background: var(--green-soft);
}

.picture-review-card.is-warning {
  border-color: #ead39b;
  background: var(--amber-soft);
}

.picture-review-heading,
.picture-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.picture-review-heading span,
.picture-review-actions small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.picture-review-heading strong {
  font-size: 12px;
}

.picture-review-card > p {
  margin: 0;
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
}

.picture-comparison-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.picture-comparison-facts span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

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

.picture-comparison-panel {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.picture-comparison-panel.is-warning {
  border-color: #ebbbb6;
  background: var(--red-soft);
}

.picture-comparison-panel.is-pending {
  border-style: dashed;
  background: var(--panel-2);
}

.picture-comparison-panel > strong {
  font-size: 11px;
}

.picture-comparison-panel a {
  display: grid;
  gap: 5px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
}

.picture-comparison-panel img {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  object-fit: contain;
}

.picture-comparison-panel p,
.picture-comparison-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.picture-comparison-note.is-error {
  color: var(--red);
}

.picture-review-assets-secondary {
  padding-top: 2px;
}

.picture-review-assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.picture-review-assets a {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
}

.picture-review-assets img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
}

.picture-review-actions small {
  max-width: 540px;
  line-height: 1.35;
}

.picture-review-actions small.is-error {
  color: var(--red);
}

.picture-review-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.workflow-supplier-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  font-size: 11px;
  font-weight: 800;
}

.workflow-supplier-link span,
.workflow-supplier-link strong {
  color: var(--muted);
}

.workflow-supplier-link a {
  color: var(--blue);
  text-align: right;
}

.workflow-due-line {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.shipment-list {
  display: grid;
  gap: 10px;
}

.shipment-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}

.shipment-empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tracking-form {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.pending-tracking-form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #ead39b;
  border-radius: 7px;
  background: var(--amber-soft);
}

.pending-tracking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pending-tracking-heading strong {
  font-size: 12px;
}

.pending-tracking-form .helper-text {
  margin: 0;
}

.tracking-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.tracking-form input,
.tracking-form select {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.tracking-evidence-reference small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.shipment-action-success {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.tracking-confirmation {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink) !important;
  line-height: 1.4;
}

.tracking-confirmation input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
}

.shipment-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shipment-link-button {
  text-decoration: none;
}

.shipment-action-error {
  margin: 0;
  color: var(--red);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
}

.shipment-card .status-pill.is-complete {
  border-color: #b8d8c8;
  background: var(--green-soft);
  color: var(--green);
}

.shipment-card .status-pill.is-warning {
  border-color: #ead39b;
  background: var(--amber-soft);
  color: var(--amber);
}

.shipment-card .status-pill.is-alert {
  border-color: #ebbbb6;
  background: var(--red-soft);
  color: var(--red);
}

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

.toggle-line {
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.toggle-line input {
  width: 17px;
  height: 17px;
  padding: 0;
  accent-color: var(--green);
}

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

.derived-check {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.derived-check.is-complete {
  border-color: #b8d8c8;
  background: #f1faf5;
}

.derived-check.is-pending {
  border-color: #ead39b;
  background: #fffaf0;
}

.derived-check span {
  font-size: 13px;
  font-weight: 850;
}

.derived-check strong {
  font-size: 12px;
}

.derived-check small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

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

.image-rail figure {
  min-width: 0;
  margin: 0;
}

.image-rail img,
.customer-preview img,
.image-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.image-rail figcaption {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-image-rail {
  display: grid;
  min-height: 80px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
}

.customer-preview {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 14px;
  align-items: center;
  min-height: 170px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.customer-preview p,
.customer-preview span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 850;
}

.timeline {
  display: grid;
  gap: 8px;
  max-height: 220px;
  margin: 12px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.timeline time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.timeline span {
  font-size: 13px;
}

.timeline-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 850;
  list-style: none;
}

.timeline-details summary::-webkit-details-marker {
  display: none;
}

.timeline-details summary::after {
  content: "+";
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
}

.timeline-details[open] summary::after {
  content: "−";
}

.timeline-details summary strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.empty-timeline {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.template-dialog {
  width: min(760px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.template-dialog::backdrop {
  background: rgb(23 33 29 / 0.38);
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-header {
  margin-bottom: 12px;
}

.dialog-actions {
  margin-top: 12px;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  background: #fff;
  color: var(--ink);
}

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

  .orders-panel {
    position: static;
    max-height: none;
  }

  .orders-table-wrap {
    max-height: min(42vh, 420px);
  }
}

@media (max-width: 900px) {
  .topbar,
  .detail-grid,
  .status-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .moritz-note-row {
    grid-template-columns: 1fr;
  }

  .moritz-note-row > span,
  .moritz-note-row > small {
    white-space: normal;
  }

  .summary-strip,
  .detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-actions,
  .detail-actions {
    flex-wrap: wrap;
  }

  .form-grid.two,
  .form-grid.three,
  .production-upload-gallery,
  .check-grid,
  .derived-check-grid,
  .approval-row,
  .image-rail,
  .customer-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  button,
  .file-button {
    min-height: 44px;
  }

  .topbar,
  .workspace,
  .detail-panel {
    padding-right: 10px;
    padding-left: 10px;
  }

  .top-actions {
    align-items: stretch;
  }

  .language-switch,
  .sync-indicator {
    width: 100%;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-tile {
    min-height: 58px;
    padding: 11px;
  }

  .summary-tile strong {
    font-size: 22px;
  }

  .detail-meta-grid,
  .workflow-fact-grid {
    grid-template-columns: 1fr;
  }

  .physical-artwork-heading,
  .picture-review-heading,
  .picture-review-actions,
  .shipment-card-heading,
  .order-card-meta,
  .order-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .picture-review-assets {
    grid-template-columns: 1fr;
  }

  .picture-comparison-grid {
    grid-template-columns: 1fr;
  }

  .picture-review-actions button {
    width: 100%;
  }

  .ellen-work-status-heading {
    flex-direction: column;
  }

  .ellen-work-status-grid {
    grid-template-columns: 1fr;
  }

  .ellen-work-fact.wide {
    grid-column: auto;
  }

  .ellen-work-scopes article {
    grid-template-columns: 1fr;
  }

  .orders-table-wrap {
    max-height: 46vh;
  }

  .production-upload-card figcaption {
    align-items: stretch;
    flex-direction: column;
  }

  .delete-upload-button {
    min-height: 38px;
  }
}

.release-footer {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 4px 18px 14px;
  text-align: right;
}

.release-footer .is-unverified {
  color: var(--danger);
}
