:root {
  color-scheme: light;
  font-family:
    Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7f9;
  color: #15202b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d9e0e7;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 20px 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.eyebrow {
  color: #5d6b78;
  font-size: 12px;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 750;
}

main {
  margin: 0 auto;
  max-width: 1440px;
  padding: 22px 28px 48px;
}

.actions,
.filters,
.tabs,
.review-form,
.review-actions {
  display: flex;
  gap: 10px;
}

.actions button,
.tabs button {
  background: #234b6d;
  border: 1px solid #234b6d;
  border-radius: 6px;
  color: #ffffff;
  min-height: 38px;
  padding: 8px 13px;
}

.actions button:last-child {
  background: #116149;
  border-color: #116149;
}

.tabs button {
  background: #ffffff;
  border-color: #cbd5df;
  color: #1c2b38;
}

.tabs button.active {
  background: #234b6d;
  border-color: #234b6d;
  color: #ffffff;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.metric {
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 14px;
}

.metric span {
  color: #637282;
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.metric strong {
  font-size: 26px;
}

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

.filters input,
.filters select,
.review-form input,
.review-form select {
  background: #ffffff;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
}

.filters input {
  min-width: 320px;
}

.filters select {
  max-width: 260px;
}

.status-line {
  color: #536170;
  font-size: 14px;
  min-height: 22px;
  margin-bottom: 12px;
}

.products {
  display: grid;
  gap: 14px;
}

.product-card {
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: 250px minmax(0, 1fr);
  padding: 14px;
}

.photo-pane {
  min-width: 0;
}

.main-photo {
  aspect-ratio: 1;
  background: #eef2f6 center / contain no-repeat;
  border: 1px solid #d9e0e7;
  border-radius: 6px;
  display: block;
  width: 100%;
}

.thumbs {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 8px;
}

.thumbs button {
  aspect-ratio: 1;
  background: #eef2f6 center / cover no-repeat;
  border: 1px solid #d9e0e7;
  border-radius: 5px;
  padding: 0;
}

.product-body {
  min-width: 0;
}

.product-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.product-head h2 {
  font-size: 19px;
  line-height: 1.3;
  margin: 6px 0;
}

.status-pill {
  background: #e8eef4;
  border-radius: 999px;
  color: #24455f;
  display: inline-block;
  font-size: 13px;
  padding: 4px 9px;
}

.status-pill.argo {
  background: #e4f4ed;
  color: #116149;
}

.status-pill.review,
.status-pill.unknown,
.status-pill.bundle_or_mixed {
  background: #fff3d5;
  color: #806000;
}

.status-pill.non_argo {
  background: #f0f2f5;
  color: #596675;
}

.muted {
  color: #637282;
  font-size: 13px;
}

.wb-link {
  border: 1px solid #cbd5df;
  border-radius: 6px;
  color: #234b6d;
  padding: 8px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.description {
  color: #324252;
  font-size: 14px;
  line-height: 1.45;
  margin: 12px 0;
  max-height: 96px;
  overflow: auto;
}

.match,
.candidates {
  background: #f7f9fb;
  border: 1px solid #e1e7ed;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 10px;
  padding: 10px;
}

.match strong,
.candidates strong {
  color: #13212f;
}

.candidate {
  border-top: 1px solid #e1e7ed;
  padding-top: 8px;
  margin-top: 8px;
}

.review-form {
  align-items: flex-end;
  border-top: 1px solid #e1e7ed;
  flex-wrap: wrap;
  padding-top: 12px;
}

.review-form label {
  color: #526271;
  display: grid;
  flex: 1 1 150px;
  font-size: 13px;
  gap: 5px;
}

.review-form label.wide {
  flex-basis: 280px;
}

.review-actions {
  align-items: flex-end;
  flex: 1 1 320px;
  flex-wrap: wrap;
}

.decision-button {
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 13px;
}

.decision-button.confirm-argo {
  background: #eadfc9;
  border: 1px solid #c9af7a;
  color: #3b2b12;
}

.decision-button.confirm-argo.confirmed {
  background: #116149;
  border-color: #116149;
  color: #ffffff;
}

.decision-button.reject-argo {
  background: #eef1f4;
  border: 1px solid #cbd5df;
  color: #344454;
}

.decision-button.reject-argo.confirmed {
  background: #111820;
  border-color: #111820;
  color: #ffffff;
}

#lightbox {
  background: rgba(10, 18, 26, 0.94);
  border: 0;
  height: 100dvh;
  margin: 0;
  max-height: none;
  max-width: none;
  padding: 0;
  width: 100vw;
}

#lightbox::backdrop {
  background: rgba(10, 18, 26, 0.8);
}

#lightbox[open] {
  align-items: center;
  display: grid;
  grid-template-columns: 84px 1fr 84px;
  grid-template-rows: 70px 1fr 56px;
}

#lightboxImage {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  max-height: calc(100dvh - 150px);
  max-width: calc(100vw - 190px);
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #ffffff;
  padding: 9px 12px;
}

.lightbox-close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  margin: 16px;
}

.lightbox-nav.prev {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
}

.lightbox-nav.next {
  grid-column: 3;
  grid-row: 2;
  justify-self: center;
}

#lightboxCaption {
  color: #ffffff;
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: center;
  padding: 0 20px 18px;
  text-align: center;
}

@media (max-width: 900px) {
  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .filters {
    flex-direction: column;
  }

  .filters input,
  .filters select {
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .photo-pane {
    max-width: 360px;
  }
}

@media (max-width: 560px) {
  .topbar,
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .tabs {
    flex-wrap: wrap;
  }

  #lightbox[open] {
    grid-template-columns: 54px 1fr 54px;
  }

  #lightboxImage {
    max-width: calc(100vw - 118px);
  }
}
