:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  --page-bg: #fbfaf8;
  --surface: #ffffff;
  --surface-soft: #f7f1ec;
  --surface-muted: #f4efea;
  --text: #1f1a17;
  --text-soft: #6f6259;
  --text-muted: #8a7b71;
  --border: #e5d9d0;
  --border-strong: #cdb8a8;
  --accent: #a77b4f;
  --accent-strong: #7b5736;
  --accent-soft: #f3e5dc;
  --pink-soft: #f8e8e4;
  --success-soft: #e8f3e8;
  --success-text: #315f3a;
  --warning-soft: #fff1c9;
  --warning-text: #73521a;
  --danger-soft: #f7dfd8;
  --danger-text: #8f3d2b;
  --info-soft: #eee8ff;
  --info-text: #51406f;
  --focus: #d7b98a;
  --shadow-soft: 0 14px 34px rgba(50, 35, 28, 0.08);
  --shadow-dialog: 0 24px 80px rgba(31, 26, 23, 0.28);
  background: var(--page-bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
}

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

button,
a {
  touch-action: manipulation;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, auto) minmax(220px, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 72px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #d4dcde;
}

.brand-block,
.session-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #154c5d;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(21, 76, 93, 0.18);
}

.brand-block strong,
.brand-block span,
.session-block span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-block strong {
  font-size: 0.98rem;
}

.brand-block div span {
  margin-top: 3px;
  color: #66757b;
  font-size: 0.82rem;
}

.primary-nav {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.primary-nav a,
.secondary-link {
  color: #25464f;
  text-decoration: none;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 8px;
  color: #52646b;
  font-weight: 700;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  background: #edf4f2;
  color: #1f574b;
  outline: none;
}

.primary-nav a.active {
  background: #dcece8;
  color: #153f37;
}

.session-block {
  justify-content: flex-end;
}

.customer-title {
  min-width: 0;
  text-align: center;
}

.customer-title strong {
  display: block;
  overflow: hidden;
  color: #172126;
  font-size: 1.16rem;
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-button,
.secondary-button,
.login-form button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  padding: 0 14px;
  background: #1f5f6d;
  color: #ffffff;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #174f5b;
  outline: 2px solid #9bc8d0;
  outline-offset: 2px;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.secondary-button {
  padding: 0 14px;
  background: #e8eeef;
  color: #203139;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: #dae4e5;
  outline: 2px solid #79a9b5;
  outline-offset: 2px;
}

.workbench {
  flex: 1 0 auto;
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.app-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 24px;
  color: #62737a;
  font-size: 0.84rem;
  font-weight: 800;
}

.footer-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(21, 76, 93, 0.16);
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.page-heading h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
}

.page-heading p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: #58686f;
  line-height: 1.55;
}

.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
}

.sku-list-grid {
  grid-template-columns: minmax(0, 1fr);
}

.sku-list-grid .form-panel {
  position: static;
  width: 100%;
}

.stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.filters-panel,
.form-panel {
  background: #ffffff;
  border: 1px solid #d6dee1;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(24, 33, 37, 0.08);
}

.filters-panel {
  padding: 14px;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(118px, 0.8fr)) auto;
  gap: 12px;
  align-items: end;
}

.form-panel {
  position: sticky;
  top: 90px;
  padding: 18px;
}

.form-panel h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.new-sku-panel {
  padding: 0;
}

.new-sku-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  color: #203139;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

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

.new-sku-summary::before {
  content: "+";
  display: inline-grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #1f5f6d;
  color: #ffffff;
  font-weight: 900;
}

.new-sku-summary:hover,
.new-sku-summary:focus-visible {
  background: #f1f6f6;
  outline: 2px solid #9bc8d0;
  outline-offset: 2px;
}

.new-sku-summary .summary-open {
  display: none;
}

.new-sku-panel[open] .new-sku-summary {
  border-bottom: 1px solid #dfe7e8;
}

.new-sku-panel[open] .new-sku-summary::before {
  content: "-";
}

.new-sku-panel[open] .new-sku-summary .summary-open {
  display: inline;
}

.new-sku-panel[open] .new-sku-summary .summary-closed {
  display: none;
}

.new-sku-panel .record-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
}

.new-sku-original-image-field,
.new-sku-remark-field,
.new-sku-panel .alert,
.new-sku-panel .primary-button {
  grid-column: 1 / -1;
}

.record-form,
.filter-form label {
  display: grid;
  gap: 7px;
}

.record-form {
  gap: 13px;
}

.form-subsection-title {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #dfe7e8;
  color: #21363d;
  font-size: 0.9rem;
  font-weight: 900;
}

.form-help {
  margin: -4px 0 0;
  color: #66777d;
  font-size: 0.84rem;
  line-height: 1.45;
}

.record-form label,
.filter-form label,
.checkbox-row {
  color: #56676e;
  font-size: 0.88rem;
  font-weight: 800;
}

.record-form small {
  color: #66777d;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.file-picker-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 42px;
}

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

.file-picker-button,
.file-picker-name {
  min-height: 42px;
  border: 1px solid #bdc9ce;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
}

.file-picker-button {
  padding: 0 12px;
  background: #ecf3f4;
  color: #183138;
  font-weight: 900;
  cursor: pointer;
}

.file-picker-name {
  min-width: 0;
  padding: 0 11px;
  background: #fbfcfc;
  color: #56676e;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker-control:focus-within .file-picker-button {
  border-color: #236878;
  outline: 2px solid #9bc8d0;
  outline-offset: 1px;
}

.record-form input:not(.file-picker-input),
.record-form select,
.record-form textarea,
.filter-form input:not(.file-picker-input),
.filter-form select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #bdc9ce;
  border-radius: 8px;
  background: #fbfcfc;
  color: #182125;
}

.record-form textarea {
  min-height: 96px;
  resize: vertical;
}

.record-form input:not(.file-picker-input):focus,
.record-form select:focus,
.record-form textarea:focus,
.filter-form input:not(.file-picker-input):focus,
.filter-form select:focus {
  border-color: #236878;
  outline: 2px solid #9bc8d0;
  outline-offset: 1px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #c9d4d8;
  border-radius: 8px;
  background: #f4f7f7;
  color: #25464f;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.sku-code-cell {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.sku-list-thumb {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  padding: 3px;
  border: 1px solid #d6dee1;
  border-radius: 8px;
  background: #f4f7f7;
  cursor: zoom-in;
}

.sku-list-thumb:hover,
.sku-list-thumb:focus-visible {
  border-color: #236878;
  outline: 2px solid #9bc8d0;
  outline-offset: 1px;
}

.sku-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
  background: #e9eef0;
}

.sku-list-thumb img.image-load-error {
  background: #f7e8e3;
}

.sku-list-thumb-empty {
  color: #7a8a90;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.upload-render-action {
  width: fit-content;
  border-color: #1f5f6d;
  background: #1f5f6d;
  color: #ffffff;
  white-space: nowrap;
}

.table-action:hover,
.table-action:focus-visible {
  background: #e8f0f1;
  outline: 2px solid #9bc8d0;
  outline-offset: 2px;
}

.danger-action {
  border-color: #d9b8b0;
  background: #fff3f0;
  color: #923923;
}

.danger-action:hover,
.danger-action:focus-visible {
  background: #f9dfd8;
  outline-color: #e1a191;
}

.upload-render-action:hover,
.upload-render-action:focus-visible {
  background: #174f5b;
  color: #ffffff;
}

.sku-detail-page {
  display: grid;
  gap: 18px;
}

.detail-comparison-grid,
.detail-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.detail-comparison-grid {
  align-items: stretch;
}

.detail-lower-grid {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
}

.detail-comparison-grid > .detail-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.detail-panel {
  min-width: 0;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #d6dee1;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(24, 33, 37, 0.08);
}

.detail-panel-heading,
.metadata-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.detail-panel-heading h2,
.metadata-title h2,
.action-panel h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.detail-panel-heading span {
  color: #65757b;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.metadata-grid div {
  min-width: 0;
  padding: 12px;
  background: #f6f9f8;
  border: 1px solid #e0e7e6;
  border-radius: 8px;
}

.metadata-grid .metadata-wide {
  grid-column: span 2;
}

.metadata-grid dt {
  margin: 0 0 5px;
  color: #607077;
  font-size: 0.78rem;
  font-weight: 800;
}

.metadata-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #172126;
  font-weight: 750;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, 188px);
  gap: 12px;
  justify-content: start;
}

.detail-comparison-grid .image-gallery {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.image-tile {
  display: grid;
  gap: 8px;
  width: 188px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #d6dee1;
  border-radius: 8px;
  background: #f8faf9;
  color: #25353b;
  text-align: left;
}

.detail-comparison-grid .image-tile {
  width: 100%;
}

.image-preview-button {
  display: grid;
  grid-template-rows: 158px 34px;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
}

.image-preview-button-no-caption {
  grid-template-rows: 158px;
}

.detail-comparison-grid .image-preview-button {
  grid-template-rows: minmax(340px, 48vh) 34px;
}

.detail-comparison-grid .image-preview-button-no-caption {
  grid-template-rows: minmax(374px, calc(48vh + 34px));
}

.image-tile:hover,
.image-preview-button:focus-visible {
  border-color: #236878;
  outline: 2px solid #9bc8d0;
  outline-offset: 1px;
}

.image-tile img {
  width: 100%;
  height: 158px;
  object-fit: contain;
  border-radius: 6px;
  background: #e9eef0;
}

.detail-comparison-grid .image-tile img {
  height: clamp(340px, 48vh, 620px);
}

.detail-comparison-grid .image-preview-button-no-caption img {
  height: clamp(374px, calc(48vh + 34px), 654px);
}

.image-tile img.image-load-error {
  background: #f7e8e3;
}

.image-tile span {
  overflow: hidden;
  align-self: center;
  color: #485a61;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-edit-button {
  width: 100%;
}

.comparison-action-row {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 14px;
}

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

.comparison-picker fieldset {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid #d6dee1;
  border-radius: 8px;
}

.comparison-picker legend {
  padding: 0 6px;
  color: #485a61;
  font-size: 0.84rem;
  font-weight: 900;
}

.comparison-picker p {
  margin: 0;
  color: #66777d;
  font-size: 0.84rem;
}

.comparison-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #f7faf9;
  color: #25353b;
}

.comparison-choice span {
  display: grid;
  min-width: 0;
}

.comparison-choice small {
  overflow: hidden;
  color: #66777d;
  font-size: 0.76rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.version-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.version-tab {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #cbd7da;
  border-radius: 8px;
  background: #f3f7f7;
  color: #44565d;
  font-weight: 850;
  cursor: pointer;
}

.version-tab.active,
.version-tab:hover,
.version-tab:focus-visible {
  background: #dcece8;
  color: #153f37;
  outline: none;
}

.version-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dde5e7;
}

.version-summary div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #596b72;
  font-size: 0.88rem;
}

.version-summary p,
.action-panel p,
.detail-empty-state p {
  margin: 0;
  color: #5d6c73;
  line-height: 1.5;
}

.detail-empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed #c8d4d7;
  border-radius: 8px;
  background: #f7faf9;
  text-align: center;
}

.detail-empty-state h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.action-panel {
  display: grid;
  gap: 14px;
}

.customer-safe-note {
  padding: 12px;
  border-radius: 8px;
  background: #eef6f2;
  color: #28513f;
  font-weight: 800;
}

.action-help {
  padding: 12px;
  border-left: 4px solid #236878;
  border-radius: 8px;
  background: #f0f6f7;
  color: #31464f;
  font-weight: 750;
}

.timeline-panel {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
}

.timeline-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.timeline-marker {
  width: 10px;
  height: 10px;
  margin-top: 9px;
  border-radius: 50%;
  background: #236878;
  box-shadow: 0 0 0 4px #dcece8;
}

.timeline-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #dde5e7;
}

.timeline-copy {
  min-width: 0;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  color: #62737a;
  font-size: 0.8rem;
  font-weight: 800;
}

.comment-type,
.version-reference {
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8eeef;
  color: #34474f;
}

.timeline-card p {
  margin: 0;
  color: #1d2a2f;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.timeline-assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, max-content));
  justify-content: flex-end;
  gap: 8px;
  max-width: min(100%, 560px);
}

.timeline-asset-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #bfd0d5;
  border-radius: 8px;
  background: #f4f8f8;
  color: #236878;
  cursor: pointer;
}

.timeline-asset-thumb {
  display: block;
  width: 128px;
  height: 96px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #bfd0d5;
  border-radius: 8px;
  background: #f4f8f8;
  cursor: zoom-in;
}

.timeline-asset-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #e9eef0;
}

.timeline-asset-video {
  display: block;
  width: min(260px, 100%);
  max-height: 180px;
  border: 1px solid #bfd0d5;
  border-radius: 8px;
  background: #101719;
}

.media-load-error {
  background: #f7e8e3;
}

.timeline-asset-button:hover,
.timeline-asset-button:focus-visible,
.timeline-asset-thumb:hover,
.timeline-asset-thumb:focus-visible {
  background: #e6f1f2;
  outline: 2px solid #9bc8d0;
  outline-offset: 2px;
}

.chat-message-list {
  max-height: 560px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid #d6e0e2;
  border-radius: 8px;
  background: #f4f7f5;
}

.chat-empty-state {
  margin-bottom: 0;
}

.chat-message {
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
}

.chat-message .timeline-marker {
  display: none;
}

.chat-message.own {
  justify-items: end;
}

.chat-message.system {
  justify-items: center;
}

.chat-bubble {
  width: fit-content;
  max-width: min(78%, 660px);
  padding: 10px 12px;
  border: 1px solid #cfdcdf;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 33, 37, 0.06);
}

.chat-message.own .chat-bubble {
  background: #dff0e7;
  border-color: #b7d9c8;
}

.chat-message.system .chat-bubble {
  max-width: min(90%, 760px);
  background: #eef3f4;
  color: #465960;
}

.chat-bubble .timeline-meta {
  margin-bottom: 6px;
  font-size: 0.74rem;
}

.chat-bubble .timeline-assets {
  margin-top: 8px;
  justify-content: flex-start;
}

.chat-message.own .timeline-assets {
  justify-content: flex-end;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  gap: 10px;
  align-items: end;
}

.chat-input-label,
.chat-attachment-label {
  display: grid;
  gap: 6px;
  color: #56676e;
  font-size: 0.86rem;
  font-weight: 800;
}

.chat-attachment-label input:not(.file-picker-input) {
  width: 100%;
  min-height: 40px;
  padding: 8px;
  border: 1px solid #bdc9ce;
  border-radius: 8px;
  background: #fbfcfc;
  color: #182125;
}

.chat-attachment-label input:not(.file-picker-input):focus {
  border-color: #236878;
  outline: 2px solid #9bc8d0;
  outline-offset: 1px;
}

.chat-input-label textarea {
  width: 100%;
  min-height: 76px;
  max-height: 180px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #bdc9ce;
  border-radius: 8px;
  background: #fbfcfc;
  color: #182125;
}

.chat-input-label textarea:focus {
  border-color: #236878;
  outline: 2px solid #9bc8d0;
  outline-offset: 1px;
}

.chat-composer-message {
  grid-column: 1 / -1;
}

.detail-nav-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #d6dee1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 33, 37, 0.07);
}

.detail-nav-current {
  min-width: 0;
  overflow: hidden;
  color: #40545c;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-nav-message {
  grid-column: 1 / -1;
}

.timeline-asset-icon {
  position: relative;
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.timeline-asset-icon::before {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.timeline-asset-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 10px;
  height: 7px;
  background: currentColor;
  clip-path: polygon(0 100%, 38% 45%, 58% 68%, 78% 28%, 100% 100%);
}

.image-inspector,
.image-annotation-editor,
.image-compare-dialog,
.quick-render-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid #c9d4d8;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 25, 30, 0.28);
}

.image-inspector {
  width: calc(100vw - 18px);
  height: calc(100vh - 18px);
  max-height: calc(100vh - 18px);
}

.image-annotation-editor {
  width: min(1180px, calc(100vw - 24px));
}

.image-compare-dialog {
  width: min(1280px, calc(100vw - 24px));
}

.quick-render-dialog {
  width: min(560px, calc(100vw - 32px));
}

.image-inspector::backdrop,
.image-annotation-editor::backdrop,
.image-compare-dialog::backdrop,
.quick-render-dialog::backdrop {
  background: rgba(15, 25, 30, 0.62);
}

.image-inspector form,
.image-annotation-editor form,
.image-compare-dialog form,
.quick-render-dialog form,
.sku-action-dialog form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.image-inspector form {
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
}

.sku-action-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #c9d4d8;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 25, 30, 0.28);
}

.sku-action-dialog::backdrop {
  background: rgba(15, 25, 30, 0.54);
}

.inspector-heading,
.annotation-editor-heading,
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.inspector-heading h2,
.annotation-editor-heading h2,
.dialog-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.annotation-toolbar {
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(76px, 94px) minmax(130px, 170px) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.annotation-toolbar label,
.annotation-note-field {
  display: grid;
  gap: 6px;
  color: #56676e;
  font-size: 0.82rem;
  font-weight: 800;
}

.annotation-toolbar input[type="text"],
.annotation-note-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #bdc9ce;
  border-radius: 8px;
  background: #fbfcfc;
  color: #182125;
}

.annotation-toolbar input[type="color"] {
  width: 58px;
  height: 40px;
  padding: 4px;
  border: 1px solid #bdc9ce;
  border-radius: 8px;
  background: #fbfcfc;
}

.annotation-toolbar input[type="range"] {
  width: 100%;
}

.tool-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #c9d4d8;
  border-radius: 8px;
  background: #f4f7f7;
  color: #25464f;
  font-weight: 800;
  cursor: pointer;
}

.tool-button.active,
.tool-button:hover,
.tool-button:focus-visible {
  background: #dcece8;
  color: #153f37;
  outline: 2px solid #9bc8d0;
  outline-offset: 1px;
}

.inspector-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inspector-controls span {
  min-width: 56px;
  color: #42545b;
  font-weight: 850;
  text-align: center;
}

.inspector-viewer,
.comparison-viewer {
  display: grid;
  place-items: center;
  min-height: 420px;
  max-height: calc(100vh - 210px);
  overflow: hidden;
  border: 1px solid #d6dee1;
  border-radius: 8px;
  background: #edf2f2;
}

.inspector-viewer {
  min-height: 0;
  max-height: none;
  cursor: grab;
  touch-action: none;
}

.inspector-viewer:active {
  cursor: grabbing;
}

.comparison-viewer {
  overflow: auto;
}

.comparison-viewer img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  background: #f5f7f7;
  cursor: zoom-in;
}

.annotation-canvas-wrap {
  display: grid;
  place-items: center;
  max-height: calc(100vh - 310px);
  overflow: auto;
  border: 1px solid #d6dee1;
  border-radius: 8px;
  background: #edf2f2;
}

.annotation-canvas-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.render-upload-field[hidden],
.action-confirm-note[hidden] {
  display: none;
}

.render-upload-field input:not(.file-picker-input) {
  padding: 8px;
}

.action-confirm-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff2c9;
  color: #6a4d00;
  font-weight: 800;
}

.image-inspector img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #f2f5f6;
  transform-origin: center center;
  user-select: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: #1f765e;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.table-section,
.empty-state,
.error-state,
.route-state,
.boot-state,
.login-panel,
.login-status {
  background: #ffffff;
  border: 1px solid #d6dee1;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(24, 33, 37, 0.08);
}

.table-section {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.sku-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: #56676e;
  font-size: 0.84rem;
  font-weight: 800;
}

.sku-pagination-top {
  border: 1px solid #d6dee1;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #ffffff;
}

.sku-pagination-bottom {
  border: 1px solid #d6dee1;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
}

.sku-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sku-pagination .secondary-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.sku-pagination .secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.sku-page-count {
  min-width: 84px;
  text-align: center;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.sku-table {
  min-width: 1040px;
  table-layout: fixed;
}

.sku-col-code {
  width: 10%;
}

.sku-col-style {
  width: 13%;
}

.sku-col-progress {
  width: 12%;
}

.sku-col-issue,
.sku-col-flag {
  width: 6%;
}

.sku-col-revision {
  width: 7%;
}

.sku-col-customer {
  width: 11%;
}

.sku-col-date {
  width: 11%;
}

.sku-col-action {
  width: 14%;
}

.sku-col-design {
  width: 6%;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #e3e8ea;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8faf9;
  color: #65737a;
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  color: #243137;
}

.sku-table th,
.sku-table td {
  padding: 10px 8px;
}

.sku-table th {
  font-size: 0.7rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.sku-table td {
  overflow: hidden;
  font-size: 0.86rem;
}

.sku-table td:nth-child(1),
.sku-table td:nth-child(2),
.sku-table td:nth-child(8),
.sku-table td:nth-child(9) {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-safe-list .sku-table td:nth-child(7),
.customer-safe-list .sku-table td:nth-child(8) {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-table .sku-code-cell {
  min-width: 0;
}

.sku-table .status-badge,
.sku-table .summary-badge {
  max-width: 100%;
  min-height: 24px;
  padding: 0 7px;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.sku-table .table-action {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.74rem;
}

.sku-table .table-action-row {
  gap: 6px;
}

.sku-table .sku-list-thumb {
  width: 46px;
  height: 46px;
}

.credential-cell {
  font-weight: 800;
  overflow-wrap: anywhere;
}

tr:last-child td {
  border-bottom: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e9edef;
  color: #314047;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-paper-question-pending,
.status-customer-answering {
  background: #fff2c9;
  color: #6a4d00;
}

.status-three-d-in-progress,
.status-revision-required {
  background: #e1edff;
  color: #244d83;
}

.status-customer-review-pending {
  background: #efe6ff;
  color: #51347f;
}

.status-archived-approved,
.status-active {
  background: #dff3e8;
  color: #1f5d42;
}

.status-inactive {
  background: #f1e6e3;
  color: #8a3d2c;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.summary-badge.yes {
  background: #dff3e8;
  color: #1f5d42;
}

.summary-badge.no {
  background: #f1e6e3;
  color: #8a3d2c;
}

.table-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1280px) {
  .sku-list-grid .form-panel {
    max-width: 720px;
  }
}

.loading-state,
.empty-state,
.error-state,
.route-state,
.boot-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 32px;
  text-align: center;
}

.loading-state {
  gap: 14px;
  color: #5a6b72;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #dce5e7;
  border-top-color: #236878;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.empty-state h2,
.error-state h2,
.route-state h1,
.boot-state h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.empty-state p,
.error-state p,
.route-state p,
.boot-state p {
  max-width: 520px;
  margin: 0;
  color: #5d6c73;
  line-height: 1.55;
}

.error-state,
.forbidden-state,
.not-found-state {
  border-color: #e4cbc3;
}

.error-state .secondary-button,
.route-state .secondary-button {
  margin-top: 20px;
}

.state-code {
  margin-bottom: 8px;
  color: #a14c32;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 20px;
  padding: 0 14px;
  border-radius: 8px;
  background: #e8eeef;
  color: #203139;
  font-weight: 800;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(320px, 460px);
  gap: 20px;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
}

.login-panel,
.login-status {
  align-self: center;
  padding: 30px;
}

.login-panel h1 {
  margin: 0 0 22px;
  font-size: 2rem;
  line-height: 1.12;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #56676e;
  font-size: 0.88rem;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #bdc9ce;
  border-radius: 8px;
  background: #fbfcfc;
  color: #182125;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-field input {
  min-width: 0;
}

.password-toggle {
  min-width: 72px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #bdc9ce;
  border-radius: 8px;
  background: #e8eeef;
  color: #203139;
  font-weight: 800;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #dae4e5;
  outline: 2px solid #79a9b5;
  outline-offset: 2px;
}

.login-form input:focus {
  border-color: #236878;
  outline: 2px solid #9bc8d0;
  outline-offset: 1px;
}

.login-form button {
  margin-top: 4px;
  background: #1f5f6d;
  color: #ffffff;
}

.login-form button:hover,
.login-form button:focus-visible {
  background: #174f5b;
  outline: 2px solid #9bc8d0;
  outline-offset: 2px;
}

.login-form button:disabled {
  cursor: wait;
  opacity: 0.74;
}

.alert {
  margin: 0;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.alert.error {
  background: #f7e8e3;
  color: #8a3d2c;
}

.alert.success {
  background: #dff3e8;
  color: #1f5d42;
  font-weight: 800;
}

.login-status h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.login-hints {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #dfe7e8;
}

.login-hints p {
  margin: 0;
  color: #5d6c73;
  font-size: 0.9rem;
  line-height: 1.45;
}

.state-line {
  margin: 0;
  color: #5f6f76;
}

.state-line.ok {
  color: #1f6d4c;
  font-weight: 800;
}

.state-line.error {
  color: #9a3b25;
  font-weight: 800;
}

/* Olive & Piper inspired theme: clean white surfaces, dark text, warm gold accents. */
body {
  background: var(--page-bg);
  color: var(--text);
}

.topbar {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: var(--border);
}

.brand-mark {
  background: var(--text);
  box-shadow: 0 8px 20px rgba(31, 26, 23, 0.16);
}

.brand-block div span,
.page-heading p:not(.eyebrow),
.form-help,
.detail-panel-heading span,
.comparison-choice small,
.version-summary div,
.version-summary p,
.action-panel p,
.detail-empty-state p,
.chat-input-label,
.chat-attachment-label,
.detail-nav-current,
.login-form label,
.login-hints p,
.state-line {
  color: var(--text-muted);
}

.primary-nav a,
.secondary-link,
.table-action {
  color: var(--accent-strong);
}

.primary-nav a {
  color: var(--text-soft);
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible,
.table-action:hover,
.table-action:focus-visible,
.new-sku-summary:hover,
.new-sku-summary:focus-visible,
.version-tab.active,
.version-tab:hover,
.version-tab:focus-visible,
.tool-button.active,
.tool-button:hover,
.tool-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline-color: var(--focus);
}

.primary-nav a.active,
.primary-button,
.login-form button,
.upload-render-action {
  background: var(--text);
  color: #ffffff;
}

.primary-button:hover,
.primary-button:focus-visible,
.login-form button:hover,
.login-form button:focus-visible,
.upload-render-action:hover,
.upload-render-action:focus-visible {
  background: var(--accent-strong);
  color: #ffffff;
  outline-color: var(--focus);
}

.secondary-button,
.secondary-link,
.password-toggle,
.table-action,
.version-tab,
.tool-button {
  background: var(--surface-muted);
  color: var(--text);
}

.filters-panel,
.form-panel,
.detail-panel,
.detail-nav-row,
.sku-pagination,
.table-section,
.empty-state,
.error-state,
.route-state,
.boot-state,
.login-panel,
.login-status {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.new-sku-summary,
.detail-panel-summary,
.customer-title strong,
.metadata-grid dd,
td,
.page-heading h1,
.login-panel h1 {
  color: var(--text);
}

.new-sku-summary::before,
.detail-panel-summary::before {
  background: var(--text);
  color: #ffffff;
}

.new-sku-panel[open] .new-sku-summary,
.version-summary,
th,
td,
.login-hints {
  border-color: var(--border);
}

.record-form input:not(.file-picker-input),
.record-form select,
.record-form textarea,
.filter-form input:not(.file-picker-input),
.filter-form select,
.chat-input-label textarea,
.login-form input,
.password-toggle,
.annotation-toolbar input[type="text"],
.annotation-note-field textarea,
.annotation-toolbar input[type="color"],
.annotation-toolbar input[type="range"] {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.record-form input:not(.file-picker-input):focus,
.record-form select:focus,
.record-form textarea:focus,
.filter-form input:not(.file-picker-input):focus,
.filter-form select:focus,
.chat-input-label textarea:focus,
.login-form input:focus,
.password-toggle:hover,
.password-toggle:focus-visible {
  border-color: var(--accent);
  outline-color: var(--focus);
}

.form-subsection-title {
  border-top-color: var(--border);
  color: var(--text);
}

.danger-action,
.alert.error {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.danger-action:hover,
.danger-action:focus-visible {
  background: #efd0c8;
  outline-color: #d9a494;
}

.alert.success,
.summary-badge.yes,
.status-archived-approved,
.status-active,
.state-line.ok {
  background: var(--success-soft);
  color: var(--success-text);
}

.summary-badge.no,
.status-inactive {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.status-badge {
  background: var(--surface-muted);
  color: var(--text);
}

.status-paper-question-pending,
.status-customer-answering,
.action-confirm-note {
  background: var(--warning-soft);
  color: var(--warning-text);
}

.status-three-d-in-progress,
.status-revision-required,
.status-customer-review-pending {
  background: var(--info-soft);
  color: var(--info-text);
}

.metadata-grid div,
.image-tile,
.comparison-choice,
.detail-empty-state,
.timeline-list,
.chat-bubble,
.comparison-picker fieldset,
th {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}

.image-tile:hover,
.image-preview-button:focus-visible {
  border-color: var(--accent);
  outline-color: var(--focus);
}

.image-tile img,
.image-tile img.image-load-error,
.image-inspector img,
.comparison-viewer img {
  background: var(--surface-muted);
}

.chat-message.own .chat-bubble {
  background: #f4e4dc;
  border-color: #e0c3b4;
}

.chat-message.system .chat-bubble {
  background: var(--surface-muted);
  color: var(--text-soft);
}

.action-help {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.customer-safe-note {
  background: var(--success-soft);
  color: var(--success-text);
}

.timeline-list::before,
.timeline-dot {
  background: var(--accent);
}

.timeline-dot {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-item {
  border-bottom-color: var(--border);
}

.timeline-meta,
.timeline-asset-button small,
.timeline-asset-button,
.comparison-picker legend,
.comparison-picker p,
.image-tile span,
.metadata-grid dt,
th,
.inspector-controls span,
.annotation-toolbar label,
.annotation-note-field,
.loading-state,
.state-code {
  color: var(--text-muted);
}

.timeline-asset-button,
.timeline-asset-video,
.timeline-asset-thumb,
.tool-button {
  border-color: var(--border);
  background: var(--surface-muted);
}

.timeline-asset-video {
  background: #15110f;
}

.timeline-asset-button:hover,
.timeline-asset-button:focus-visible {
  background: var(--accent-soft);
  outline-color: var(--focus);
}

.image-inspector,
.image-annotation-editor,
.image-compare-dialog,
.quick-render-dialog,
.sku-action-dialog {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-dialog);
}

.image-inspector::backdrop,
.image-annotation-editor::backdrop,
.image-compare-dialog::backdrop,
.quick-render-dialog::backdrop,
.sku-action-dialog::backdrop {
  background: rgba(31, 26, 23, 0.56);
}

.inspector-viewer,
.comparison-viewer,
.annotation-canvas-wrap {
  border-color: var(--border);
  background: var(--surface-muted);
}

.spinner {
  border-color: var(--border);
  border-top-color: var(--accent);
}

.eyebrow {
  color: var(--accent);
}

.detail-comparison-grid > .detail-collapsible-panel {
  display: block;
  height: 100%;
}

.detail-collapsible-panel {
  padding: 0;
}

.detail-panel-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

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

.detail-panel-summary::before {
  content: "+";
  display: inline-grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.detail-collapsible-panel[open] > .detail-panel-summary {
  border-bottom: 1px solid var(--border);
}

.detail-collapsible-panel[open] > .detail-panel-summary::before {
  content: "-";
}

.detail-panel-summary:hover,
.detail-panel-summary:focus-visible {
  background: var(--accent-soft);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.detail-summary-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.detail-summary-title {
  min-width: 0;
  overflow: hidden;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-summary-meta {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.metadata-summary .eyebrow {
  margin: 0;
}

.detail-panel-body {
  padding: 18px;
}

.comparison-message-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 880px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 18px;
  }

  .primary-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .customer-title {
    order: -1;
    text-align: left;
  }

  .session-block {
    justify-content: space-between;
  }

  .workbench {
    width: min(100% - 20px, 1180px);
    padding: 22px 0 34px;
  }

  .page-heading {
    display: block;
  }

  .workbench-grid {
    grid-template-columns: 1fr;
  }

  .detail-comparison-grid,
  .detail-lower-grid {
    grid-template-columns: 1fr;
  }

  .chat-composer,
  .comparison-message-composer {
    grid-template-columns: 1fr;
  }

  .metadata-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-panel {
    position: static;
  }

  .filter-form {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .annotation-text-field,
  .annotation-note-field {
    grid-column: 1 / -1;
  }

  .annotation-canvas-wrap {
    max-height: calc(100vh - 380px);
  }

  .page-heading h1,
  .login-panel h1 {
    font-size: 1.65rem;
  }

  .login-shell {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .login-status {
    align-self: start;
  }
}

@media (max-width: 520px) {
  .session-block {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .detail-comparison-grid .image-preview-button,
  .detail-comparison-grid .image-preview-button-no-caption {
    grid-template-rows: minmax(260px, 58vh);
  }

  .detail-comparison-grid .image-tile img,
  .detail-comparison-grid .image-preview-button-no-caption img {
    height: clamp(260px, 58vh, 520px);
  }

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

  .timeline-asset-thumb,
  .timeline-asset-video {
    width: 100%;
  }

  th,
  td {
    padding: 13px 14px;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

  .metadata-title,
  .detail-panel-heading,
  .metadata-summary,
  .version-summary div,
  .inspector-heading {
    display: grid;
  }

  .detail-panel-summary {
    align-items: flex-start;
  }

  .detail-summary-meta {
    margin-left: 0;
  }

  .metadata-grid {
    grid-template-columns: 1fr;
  }

  .metadata-grid .metadata-wide {
    grid-column: auto;
  }
}
