@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;700;800&display=swap");

:root {
  /* Modernist design tokens (design_handoff_inventory_ui) */
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);
  --neutral-100: #f8f4f4; --neutral-200: #eae7e7; --neutral-300: #d7d3d3;
  --neutral-400: #bab6b6; --neutral-500: #9b9797; --neutral-600: #7d7979;
  --neutral-700: #605d5d; --neutral-800: #444141; --neutral-900: #2d2b2b;
  --accent-100: #fff2ef; --accent-200: #ffe0d9; --accent-300: #ffc4b8;
  --accent-400: #ff9783; --accent-500: #ff563c; --accent-600: #dd2b0f;
  --accent-700: #ae1800; --accent-800: #7c1405; --accent-900: #4d170e;
  --font-heading: "Archivo", system-ui, -apple-system, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, sans-serif;
  /* Legacy variable names, remapped so every existing rule inherits the new theme */
  --bg: var(--color-bg);
  --panel: var(--color-bg);
  --ink: var(--color-text);
  --muted: var(--neutral-700);
  --line: var(--color-divider);
  --blue: var(--color-accent);
  --blue-dark: var(--accent-700);
  --green: var(--accent-700);
  --amber: var(--accent-800);
  --red: var(--accent-700);
  --shadow: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  min-width: 320px;
}

.file-warning {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 18px;
  background: #fff3cd;
  color: #5f4100;
  border-bottom: 1px solid #e4c36a;
  font-weight: 650;
}

.file-warning a {
  display: inline-flex;
  margin: 3px 6px;
  padding: 3px 7px;
  border-radius: 0;
  background: #fff;
  color: var(--accent-700);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none;
}

.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(10, 16, 24, 0.7);
  padding: 18px;
}

.pin-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 0;
  padding: 22px;
  box-shadow: none;
}

.pin-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.pin-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 14px;
  background: #152535;
  color: #fff;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.topbar p {
  margin: 4px 0 0;
  color: #c7d3df;
  font-size: 13px;
}

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

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.link-button,
button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  padding: 9px 12px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.link-button {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.link-button.cloudflare-action {
  border-color: var(--color-divider);
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 800;
}

.cloudflare-link {
  display: inline-flex;
  align-items: center;
  max-width: 280px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #d9ecff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloudflare-status {
  order: 1;
  flex: 1 0 100%;
  max-width: none;
  color: #c7d3df;
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
}

button:hover,
.link-button:hover {
  filter: brightness(0.98);
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 24px 0;
  background: #152535;
  border-bottom: 1px solid #0e1a25;
}

.tab {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c7d3df;
  padding: 11px 16px;
}

.tab.active {
  background: var(--bg);
  color: var(--ink);
}

main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 20px 24px 32px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view,
.panel {
  min-width: 0;
  max-width: 100%;
}

.scan-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: stretch;
}

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

.scan-panel,
.product-panel {
  padding: 16px;
}

.panel-title {
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #344154;
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.mode {
  padding: 9px 8px;
  border-radius: 0;
  background: #eef3f8;
  border-color: #ced8e3;
  color: #243244;
}

.mode.active {
  background: var(--blue);
  border-color: var(--blue-dark);
  color: #fff;
}

.scanner-status {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #c7d0dc;
  border-radius: 0;
  background: #f8fafc;
}

.scanner-status strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.scanner-status span:last-child {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
}

.scanner-status.ready {
  border-color: #bddac9;
  background: #f2fbf6;
}

.scanner-status.reading {
  border-color: #d7c184;
  background: #fff8e8;
}

.scanner-status.reading .status-dot {
  background: var(--amber);
}

.scanner-status.busy {
  border-color: #b6cfe7;
  background: #eef6ff;
}

.scanner-status.busy .status-dot {
  background: var(--blue);
}

.scanner-status.ok {
  border-color: #98c9ad;
  background: #eaf8f0;
}

.scanner-status.error {
  border-color: #e0b7b3;
  background: #fff7f6;
}

.scanner-status.error .status-dot {
  background: var(--red);
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field span {
  display: block;
  margin-bottom: 5px;
  color: #435062;
  font-weight: 650;
  font-size: 13px;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: none;
}

#barcodeInput {
  height: 64px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}

.scanner-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: -2px 0 12px;
}

.compact-fields {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 10px;
}

.primary {
  width: 100%;
  border-color: var(--blue-dark);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.quick-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.danger-strong {
  border-color: #8b2f29;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.message.ok {
  color: var(--green);
}

.message.error {
  color: var(--red);
}

.message.warn {
  color: #8a4b00;
}

.last-item.empty {
  display: grid;
  min-height: 186px;
  place-items: center;
}

.item-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.item-part {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 0;
  background: #eef3f8;
  font-weight: 750;
  margin-bottom: 14px;
}

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

.item-stat {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  background: #fbfcfd;
}

.item-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.item-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

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

.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px;
  box-shadow: none;
}

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

.metric strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 10px;
  margin-bottom: 12px;
}

.stock-filters {
  grid-template-columns: minmax(220px, 1fr) 180px 180px 160px;
}

.stock-valuation {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.import-panel {
  margin-bottom: 14px;
  padding: 16px;
}

.daily-panel,
.reset-panel {
  margin-bottom: 14px;
  padding: 16px;
}

.daily-controls {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 150px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.daily-controls .field {
  margin-bottom: 0;
}

.daily-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 0.7fr)) repeat(2, minmax(220px, 1.4fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric.wide strong {
  font-size: 14px;
  line-height: 1.35;
}

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

.table-title {
  padding: 12px 12px 0;
}

.import-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr) 180px;
  gap: 10px;
  align-items: end;
}

.import-grid .field {
  margin-bottom: 0;
}

.movement-filters {
  grid-template-columns: 1fr;
}

.unmatched-filters {
  grid-template-columns: minmax(160px, 220px) 110px 140px minmax(260px, 1fr) minmax(210px, 1fr) minmax(230px, 1fr);
  align-items: end;
}

.unmatched-filters .field {
  margin-bottom: 0;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344154;
  font-weight: 650;
}

.check-row input {
  width: auto;
}

.product-filters {
  grid-template-columns: 1fr 220px 180px;
}

.product-supplier-only {
  margin: -2px 0 10px;
}

.shopee-workflow-panel,
.shopee-image-panel {
  margin-bottom: 14px;
  padding: 16px;
}

.shopee-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.shopee-controls > * {
  min-width: 0;
  max-width: 100%;
}

.shopee-controls #shopeeSearch {
  flex: 1 1 320px;
  min-width: 220px;
}

.shopee-controls #shopeeSource {
  flex: 0 1 170px;
}

.shopee-controls #shopeeLimit {
  flex: 0 1 150px;
}

.shopee-controls .check-row {
  flex: 0 1 220px;
  white-space: normal;
}

.shopee-controls button {
  flex: 0 1 auto;
}

.shopee-controls .primary {
  width: auto;
}

.shopee-ready-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.shopee-ready-controls > * {
  min-width: 0;
  max-width: 100%;
}

.shopee-ready-controls #readyDraftSearch {
  flex: 1 1 320px;
  min-width: 220px;
}

.shopee-ready-controls #readyDraftLimit {
  flex: 0 1 150px;
}

.shopee-ready-controls .ready-select-all {
  flex: 0 1 180px;
  white-space: normal;
}

.shopee-ready-controls button {
  flex: 0 1 auto;
}

.shopee-ready-controls .primary {
  width: auto;
}

.shopee-image-grid {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(220px, 1fr) 150px 150px;
  gap: 10px;
  align-items: end;
}

.shopee-cover-option {
  grid-column: 1 / -1;
  align-items: center;
  margin-top: 2px;
  color: var(--muted);
}

.shopee-image-grid .field {
  min-width: 0;
  margin-bottom: 0;
}

.shopee-image-grid > *,
.shopee-image-grid input[type="file"] {
  min-width: 0;
  max-width: 100%;
}

.compact-title {
  font-size: 15px;
  margin-bottom: 4px;
}

.watermark-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f8fbff;
}

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

.watermark-header .muted {
  margin: 0;
}

.watermark-preview {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

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

.watermark-grid .field {
  margin-bottom: 0;
}

.watermark-toggle {
  min-height: 43px;
}

.camera-capture-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border: 1px solid #174f87;
  border-radius: 0;
  background: #eaf3ff;
  color: #174f87;
  font-weight: 800;
  cursor: pointer;
  padding: 10px 12px;
  text-align: center;
}

.camera-capture-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.image-list-count {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.image-list .message {
  grid-column: 1 / -1;
  margin-top: 0;
}

.product-image-card {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  padding: 6px;
  min-width: 0;
}

.product-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 0;
  background: #fff;
}

.product-image-card button {
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
}

.pill.matched {
  background: #def4e5;
  color: #17613a;
}

.product-thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #eef3f8;
  margin-bottom: 6px;
}

.shopee-table-wrap table {
  min-width: 1720px;
}

.shopee-table-wrap td {
  vertical-align: top;
}

.ready-draft-table-wrap table {
  min-width: 1480px;
}

.ready-select-all {
  white-space: nowrap;
}

.ready-select-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #344154;
  font-weight: 800;
  white-space: nowrap;
}

.ready-select-cell input {
  width: auto;
}

.ready-draft-name {
  max-width: 460px;
}

.ready-draft-name strong,
.ready-draft-meta strong {
  display: block;
  margin-bottom: 4px;
}

.ready-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 230px;
}

.ready-draft-actions button {
  padding: 8px 10px;
}

.draft-main-cell {
  min-width: 520px;
}

.draft-field-label {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.draft-title-input {
  width: 100%;
  min-width: 430px;
}

.draft-title-input {
  font-weight: 750;
}

.draft-category-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 92px;
  gap: 6px;
  margin-top: 6px;
}

.draft-category-row button {
  padding: 7px 8px;
}

.draft-category-hint {
  display: block;
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.draft-description-input {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid #c7d0dc;
  border-radius: 0;
  padding: 9px 10px;
  font: inherit;
}

.draft-export-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #e3e8ef;
  border-radius: 0;
  background: #f8fafc;
}

.draft-export-preview span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.draft-export-preview strong {
  display: block;
  color: #344154;
  font-size: 11px;
  text-transform: uppercase;
}

.export-status {
  display: grid;
  gap: 5px;
  min-width: 160px;
}

.draft-status-select {
  min-width: 140px;
  padding: 7px 8px;
}

.draft-dirty td {
  background: #fffbeb;
}

.draft-numeric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-width: 150px;
}

.pricing-suggestion {
  display: grid;
  gap: 4px;
  min-width: 190px;
  margin-top: 8px;
  padding-left: 9px;
  border-left: 3px solid #2f855a;
  color: #415066;
  font-size: 11px;
  line-height: 1.35;
}

.pricing-suggestion strong {
  color: #166534;
  font-size: 13px;
}

.pricing-suggestion button {
  width: fit-content;
  margin-top: 2px;
  padding: 5px 8px;
  color: #166534;
  border-color: #86c89f;
  background: #f0fdf4;
}

.pricing-suggestion-empty {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.draft-dimension-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(55px, 1fr));
  gap: 6px;
  min-width: 180px;
  margin-top: 6px;
}

.draft-small-label {
  display: block;
  margin: 5px 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.draft-meta-list {
  display: grid;
  gap: 4px;
  min-width: 160px;
  color: #415066;
  font-size: 12px;
  line-height: 1.35;
}

.draft-meta-list strong {
  color: var(--ink);
}

.draft-actions {
  display: grid;
  gap: 6px;
  min-width: 145px;
}

.draft-actions button {
  padding: 7px 9px;
}

.variation-group-pill {
  display: block;
  margin-top: 6px;
  color: #175b3b;
  font-size: 12px;
  font-weight: 750;
}

.listing-variation-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
}

.listing-variation-dialog::backdrop {
  background: rgba(15, 34, 50, 0.52);
}

.listing-variation-form {
  padding: 20px;
}

.listing-variation-header,
.listing-variation-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.listing-variation-header {
  justify-content: space-between;
  margin-bottom: 16px;
}

.listing-variation-header h2 {
  margin: 0 0 3px;
  font-size: 20px;
}

.variation-builder-panel {
  padding: 14px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  margin-bottom: 12px;
}

.variation-builder-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 800;
}

.variation-builder-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ee4d2d;
  box-shadow: 0 0 0 6px rgba(238, 77, 45, 0.12);
  flex: 0 0 auto;
}

.variation-name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 340px));
  gap: 12px;
  align-items: end;
}

.variation-name-field {
  max-width: 340px;
}

.variation-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.variation-table-wrap {
  max-height: 380px;
  overflow: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
}

.variation-table {
  min-width: 1420px;
}

.variation-table td,
.variation-table th {
  vertical-align: middle;
}

.variation-table th {
  white-space: nowrap;
}

.variation-table input[type="text"] {
  min-width: 130px;
}

.variation-table input[inputmode="numeric"] {
  min-width: 110px;
}

.variation-choice-cell {
  text-align: center;
  width: 74px;
}

.variation-photo-cell {
  min-width: 92px;
}

.variation-photo-slot {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
}

.variation-photo-slot:hover,
.variation-photo-slot:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(36, 102, 163, 0.16);
}

.variation-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.variation-photo-slot.is-empty {
  border-style: dashed;
  color: #ee4d2d;
}

.variation-photo-icon {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.variation-stock-input {
  width: 100px;
}

.variation-code-input {
  min-width: 150px !important;
  color: var(--muted);
  background: #f7f9fc;
}

.variation-manual-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1.2fr) minmax(140px, 0.7fr) minmax(190px, auto) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.variation-pair-check {
  min-height: 50px;
  align-items: center;
}

.listing-variation-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.listing-variation-actions .action-spacer {
  flex: 1;
}

.listing-variation-actions .primary {
  width: auto;
}

.danger-outline {
  border-color: #e0b7b3;
  color: var(--red);
  background: #fff7f6;
}

.delivery-summary {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.delivery-summary strong {
  max-width: 220px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.single-line {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-export-panel {
  margin-bottom: 14px;
}

.product-export-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(240px, 1fr);
  gap: 14px;
  align-items: start;
}

.product-export-grid .field {
  margin-bottom: 0;
}

.supplier-checkbox-list {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  padding: 8px;
}

.supplier-checkbox-list .check-row {
  display: flex;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
}

.product-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 24px;
}

.product-export-actions .muted {
  flex-basis: 100%;
  margin: 2px 0 0;
}

.supplier-manager {
  margin-bottom: 14px;
}

.supplier-manager-list {
  display: grid;
  gap: 8px;
}

.supplier-manager-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e3e8ef;
  border-radius: 0;
  padding: 10px;
  background: #fbfdff;
}

.supplier-manager-item strong,
.supplier-manager-item span {
  display: block;
}

.supplier-manager-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.list-count {
  min-height: 20px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.pager span {
  min-width: 220px;
  text-align: center;
  font-weight: 650;
}

.pager button {
  padding: 7px 11px;
  font-weight: 750;
}

.pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.price-input {
  min-width: 112px;
  max-width: 128px;
  padding: 7px 8px;
  text-align: right;
}

.price-input:disabled {
  background: #f4f6f8;
  color: #667386;
}

.price-source {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.save-product {
  padding: 7px 10px;
  border-color: #b7d9c5;
  color: var(--green);
  background: #f2fbf6;
  font-weight: 750;
}

.save-product.saved {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.supplier-cell {
  min-width: 160px;
}

.rule-cell {
  min-width: 190px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.supplier-list {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.product-seo-name {
  display: block;
  margin-top: 4px;
  color: #2f6f55;
  font-size: 12px;
  line-height: 1.35;
}

.product-seo-name strong {
  display: inline-block;
  margin-right: 6px;
  color: #168a5a;
  font-weight: 700;
}

.fitment-note {
  display: block;
  margin-top: 6px;
  color: #9a5b00;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.fitment-audit-header {
  margin-bottom: 12px;
}

.fitment-audit-filters {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(180px, 240px) minmax(170px, 220px) 150px;
  gap: 10px;
  margin: 16px 0;
}

.fitment-audit-table-wrap table {
  min-width: 1380px;
}

.fitment-audit-table-wrap td {
  vertical-align: top;
}

.fitment-audit-table-wrap th:nth-child(1) {
  width: 15%;
}

.fitment-audit-table-wrap th:nth-child(2) {
  width: 15%;
}

.fitment-audit-table-wrap th:nth-child(3) {
  width: 29%;
}

.fitment-audit-table-wrap th:nth-child(4) {
  width: 17%;
}

.fitment-audit-table-wrap th:nth-child(5) {
  width: 12%;
}

.audit-code {
  display: inline-block;
  margin-right: 8px;
  font-size: 18px;
}

.audit-evidence,
.audit-question {
  margin: 8px 0 0;
  line-height: 1.45;
}

.audit-question {
  color: #174d78;
  font-weight: 700;
}

.audit-sources {
  display: grid;
  gap: 7px;
}

.audit-source {
  overflow-wrap: anywhere;
  color: #155e75;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .fitment-audit-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .fitment-audit-filters {
    grid-template-columns: 1fr;
  }

  .fitment-audit-table-wrap table {
    min-width: 0;
  }
}

.resolve-input {
  min-width: 170px;
  max-width: 220px;
  padding: 7px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.resolve-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 260px;
}

.resolved-part {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 750;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

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

th,
td {
  border-bottom: 1px solid #e3e8ef;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef3f8;
  color: #344154;
  font-size: 12px;
  text-transform: uppercase;
}

td {
  background: #fff;
}

.num {
  text-align: right;
}

.actions {
  width: 280px;
}

.stock-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 210px;
}

.mini {
  padding: 6px 9px;
  border-radius: 0;
  font-weight: 750;
}

.mini.add {
  border-color: #b7d9c5;
  color: var(--green);
  background: #f2fbf6;
}

.mini.remove {
  border-color: #e0b7b3;
  color: var(--red);
  background: #fff7f6;
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.pill.inferred {
  background: var(--neutral-200);
  color: var(--neutral-800);
}

.pill.unknown {
  background: var(--neutral-200);
  color: var(--neutral-800);
}

.pill.voided {
  background: #f8dddd;
  color: var(--red);
}

.pill.unpaid {
  background: #fff0d6;
  color: #8a4b00;
}

.pill.partial {
  background: #fff8d9;
  color: #725b00;
}

.pill.marketplace {
  background: #e8f7ef;
  color: var(--green);
}

.pill.unlisted {
  background: #f1f4f8;
  color: var(--muted);
}

.danger {
  border-color: #e0b7b3;
  color: var(--red);
  background: #fff7f6;
  padding: 6px 9px;
}

.pos-layout,
.sales-layout,
.warehouse-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.pos-register,
.receipt-panel,
.order-list-panel,
.warehouse-panel,
.warehouse-summary-panel,
.warehouse-cart-panel {
  padding: 16px;
}

.order-list-panel {
  grid-column: 1 / -1;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.panel-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.warehouse-layout {
  margin-bottom: 16px;
}

.employee-stock-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.warehouse-mode {
  min-height: 48px;
  border-color: #c8d4df;
  background: #eef3f8;
  color: #243244;
  font-weight: 850;
}

.employee-stock-actions .warehouse-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  font-size: 18px;
}

.mode-symbol {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.stock-in-mode.active {
  border-color: #17613c;
  background: var(--green);
  color: #fff;
}

.stock-out-mode.active {
  border-color: #7f2823;
  background: var(--red);
  color: #fff;
}

.advanced-mode-actions .warehouse-mode.active {
  border-color: var(--blue-dark);
  background: var(--blue);
  color: #fff;
}

.employee-stock-context {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.employee-stock-context .field,
.warehouse-detail-fields .field {
  margin-bottom: 0;
}

.warehouse-scan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 140px;
  gap: 10px;
  align-items: end;
}

.warehouse-scan-row .field {
  margin-bottom: 0;
}

#warehouseBarcodeInput {
  height: 60px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.scan-insights {
  margin-top: 12px;
  border: 1px solid #c7d0dc;
  border-radius: 0;
  background: #ffffff;
  padding: 12px;
}

.part-candidate-picker {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #9dbfe0;
  border-radius: 0;
  background: #f7fbff;
}

.part-candidate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.part-candidate-head strong,
.part-candidate-head span {
  display: block;
}

.part-candidate-head span {
  margin-top: 2px;
  color: #52647a;
  font-size: 0.9rem;
}

.part-candidate-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.part-candidate-option {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #c8d7e7;
  background: #fff;
  text-align: left;
}

.part-candidate-option:hover:not(:disabled) {
  border-color: #2569a4;
  background: #edf6ff;
}

.part-candidate-code,
.part-candidate-name,
.part-candidate-stock {
  display: block;
  overflow-wrap: anywhere;
}

.part-candidate-code {
  color: #162c42;
  font-weight: 800;
}

.part-candidate-name {
  margin-top: 3px;
  color: #26394d;
}

.part-candidate-stock {
  margin-top: 6px;
  color: #52647a;
  font-size: 0.82rem;
}

.scan-insights-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.scan-insights-head strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scan-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.scan-insights .item-stat small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.generated-listing label,
.marketplace-title-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.generated-listing div {
  font-weight: 800;
  line-height: 1.35;
}

.generated-description {
  margin-top: 8px;
}

.generated-description summary {
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 800;
}

.generated-description pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0 0;
  border-radius: 0;
  background: #f8fafc;
  padding: 10px;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.marketplace-title-list {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.warehouse-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.warehouse-actions .primary {
  min-height: 54px;
  font-weight: 850;
}

.warehouse-advanced {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.warehouse-advanced summary {
  width: max-content;
  max-width: 100%;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 750;
}

.advanced-mode-actions,
.warehouse-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

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

.warehouse-summary-grid .wide {
  grid-column: 1 / -1;
}

.pos-top-grid,
.pos-checkout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pos-checkout-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

.pos-scan-row {
  display: grid;
  grid-template-columns: 150px 170px minmax(210px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.pos-scan-row button {
  min-height: 42px;
}

@media (min-width: 981px) and (max-width: 1400px) {
  .pos-scan-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-scan-row > .field:nth-child(3) {
    grid-column: 1 / -1;
  }
}

.pos-manual-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
}

.pos-manual-dialog::backdrop {
  background: rgba(15, 34, 50, 0.52);
}

.pos-manual-form {
  padding: 20px;
}

.pos-manual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.pos-manual-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

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

.pos-manual-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.pos-cart-wrap {
  margin-top: 12px;
}

.stock-variant {
  display: block;
  white-space: nowrap;
  line-height: 1.45;
}

.variant-cell {
  min-width: 250px;
}

.cart-input {
  width: 86px;
  padding: 7px 8px;
  text-align: right;
}

.cart-input.price {
  width: 116px;
}

.cart-input.reason {
  width: 180px;
  text-align: left;
}

.cart-input.warehouse-select {
  width: 116px;
  text-align: left;
}

.status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.status.inferred {
  color: #12622d;
  background: #eaf7ef;
}

.status.unpaid {
  color: #8a4b00;
  background: #fff3d6;
}

.price-meta,
.price-warning {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.25;
}

.price-meta {
  color: var(--muted);
}

.price-warning,
.returned-line {
  color: var(--red);
  font-weight: 800;
}

.price-warning-row td {
  background: #fff8e8;
}

.stock-short {
  color: var(--red);
  font-weight: 800;
}

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

.pos-total-bar div {
  border: 1px solid #d7dde5;
  border-radius: 0;
  padding: 10px;
  background: #f8fafc;
}

.pos-total-bar span,
.receipt-meta span,
.receipt-totals span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.pos-total-bar strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.pos-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.receipt-preview {
  min-height: 260px;
}

.receipt {
  color: #17212c;
}

.receipt-ticket-preview {
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 14px;
  border: 1px solid #d7dde5;
  border-radius: 0;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.center {
  text-align: center;
}

.store {
  display: inline-block;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-weight: 900;
  font-size: 24px;
  line-height: .95;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: scaleX(1.08) skewX(-4deg);
  transform-origin: center;
}

.subtitle,
.ticket-item-part,
.footer {
  color: var(--muted);
  font-size: 11px;
}

.divider {
  border-top: 1px dashed #8a95a4;
  margin: 10px 0;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.ticket-row strong {
  text-align: right;
}

.ticket-row.small {
  color: var(--muted);
  font-size: 11px;
}

.ticket-item {
  padding: 6px 0;
}

.return-item-button {
  margin-top: 7px;
}

.receipt-action-button {
  width: 100%;
  margin-top: 10px;
}

.ticket-item-name {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ticket-item-part {
  overflow-wrap: anywhere;
}

.ticket-row.total {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 900;
}

.ticket-void {
  width: max-content;
  margin: 8px auto 0;
  border: 2px solid var(--red);
  padding: 3px 10px;
  color: var(--red);
  font-weight: 900;
  font-size: 16px;
}

.ticket-credit {
  width: max-content;
  margin: 8px auto 0;
  border: 2px solid var(--amber);
  padding: 3px 10px;
  color: #8a4b00;
  font-weight: 900;
  font-size: 15px;
}

.credit-agreement {
  color: #17212c;
  font-size: 11px;
  line-height: 1.35;
}

.credit-title {
  text-align: center;
  font-weight: 900;
  margin-bottom: 6px;
}

.signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}

.signature-line {
  border-top: 1px solid #17212c;
  height: 24px;
  margin-bottom: 5px;
}

.footer {
  text-align: center;
}

.receipt-head {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d7dde5;
}

.receipt-head strong {
  font-size: 18px;
}

.receipt-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.receipt-meta div,
.receipt-totals div {
  border: 1px solid #e3e8ef;
  border-radius: 0;
  padding: 8px;
  background: #fbfdff;
}

.receipt-items {
  min-width: 0;
}

.receipt-items td span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.receipt-totals {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.receipt-totals .grand {
  border-color: #bddac9;
  background: #f2fbf6;
}

.receipt-totals .grand strong {
  font-size: 18px;
}

.receipt-note {
  margin-top: 10px;
  padding: 9px;
  border-radius: 0;
  background: #fff8e8;
  color: #5f4100;
}

.sales-filters {
  grid-template-columns: 180px 1fr auto;
}

#stockPickView.active {
  display: grid;
  gap: 16px;
}

.stock-pick-control,
.stock-pick-history-panel {
  padding: 18px;
}

.stock-pick-search-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 150px;
  gap: 12px;
  align-items: end;
}

.stock-pick-search-grid .primary {
  min-height: 42px;
}

.stock-pick-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.stock-pick-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
}

.stock-pick-empty {
  grid-column: 1 / -1;
  min-height: 84px;
  display: flex;
  align-items: center;
  padding: 18px;
}

.stock-pick-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  background: #fff;
  box-shadow: none;
}

.stock-pick-card.out-of-stock {
  background: #f8fafc;
}

.stock-pick-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stock-pick-option {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #e5f5ec;
  color: #17603b;
  font-size: 13px;
  font-weight: 850;
}

.stock-pick-card.out-of-stock .stock-pick-option {
  background: #e8edf3;
  color: #607086;
}

.stock-pick-total {
  text-align: right;
  white-space: nowrap;
}

.stock-pick-total strong,
.stock-pick-total span {
  display: block;
}

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

.stock-pick-product strong,
.stock-pick-product span {
  display: block;
  overflow-wrap: anywhere;
}

.stock-pick-product span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.stock-pick-warehouse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stock-pick-warehouse {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 66px;
  place-content: center;
  border: 1px solid #cbd6e2;
  border-radius: 0;
  padding: 8px;
  background: #fbfdff;
  text-align: center;
  cursor: pointer;
}

.stock-pick-warehouse input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.stock-pick-warehouse strong {
  font-size: 13px;
}

.stock-pick-warehouse span {
  margin-top: 2px;
  color: #17603b;
  font-size: 18px;
  font-weight: 900;
}

.stock-pick-warehouse:has(input:checked) {
  border-color: #2367a2;
  background: #eaf3fb;
  box-shadow: none;
}

.stock-pick-warehouse.empty {
  color: #78879a;
  background: #f1f4f7;
  cursor: not-allowed;
}

.stock-pick-warehouse.empty span {
  color: #78879a;
}

.stock-pick-order-button {
  width: 100%;
}

.stock-pick-order-button:disabled {
  color: #718096;
  background: #e8edf3;
  border-color: #d6dee8;
  cursor: not-allowed;
  opacity: 1;
}

.stock-pick-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  background: #e5f5ec;
  color: #17603b;
  font-size: 12px;
  font-weight: 850;
}

.stock-pick-status.cancelled {
  background: #fbe9e6;
  color: #9c382d;
}

@media (max-width: 980px) {
  .topbar {
    gap: 12px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .scan-grid,
  .metrics,
  .pos-layout,
  .sales-layout,
  .warehouse-layout {
    grid-template-columns: 1fr;
  }

  .stock-pick-search-grid {
    grid-template-columns: minmax(220px, 1fr) 100px 140px;
  }

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

  .stock-pick-context-grid .field:last-child {
    grid-column: 1 / -1;
  }

  .compact-fields {
    grid-template-columns: 1fr;
  }

  .quick-buttons {
    grid-template-columns: 1fr;
  }

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

  .product-filters,
  .shopee-controls,
  .shopee-ready-controls,
  .shopee-image-grid,
  .variation-name-grid,
  .variation-manual-row,
  .watermark-grid,
  .product-export-grid,
  .unmatched-filters {
    grid-template-columns: 1fr;
  }

  .shopee-controls,
  .shopee-ready-controls {
    display: grid;
  }

  .shopee-controls .primary,
  .shopee-ready-controls .primary {
    width: 100%;
  }

  .watermark-header {
    align-items: flex-start;
  }

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

  .supplier-manager-item {
    grid-template-columns: 1fr;
  }

  .pos-top-grid,
  .pos-checkout-grid,
  .pos-total-bar,
  .sales-filters,
  .employee-stock-context {
    grid-template-columns: 1fr;
  }

  .warehouse-scan-row,
  .pos-scan-row,
  .pos-manual-grid,
  .warehouse-actions {
    grid-template-columns: 1fr;
  }

  .employee-stock-actions,
  .advanced-mode-actions,
  .warehouse-detail-fields {
    grid-template-columns: 1fr;
  }

  .daily-controls,
  .daily-summary {
    grid-template-columns: 1fr;
  }

  .draft-main-cell,
  .draft-title-input,
  .draft-category-row,
  .ready-draft-name,
  .ready-draft-actions,
  .draft-actions,
  .resolve-actions,
  .stock-actions {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .variation-manual-row {
    grid-template-columns: 1fr;
  }

  .stock-pick-search-grid,
  .stock-pick-context-grid,
  .stock-pick-results {
    grid-template-columns: 1fr;
  }

  .stock-pick-context-grid .field:last-child {
    grid-column: auto;
  }

  .stock-pick-control,
  .stock-pick-history-panel,
  .stock-pick-card {
    padding: 12px;
  }

  .listing-variation-actions {
    flex-wrap: wrap;
  }

  .listing-variation-actions .action-spacer {
    display: none;
  }

  .listing-variation-actions button {
    flex: 1 1 140px;
  }

  button,
  input,
  select,
  textarea,
  .camera-capture-button {
    min-height: 44px;
    font-size: 16px;
  }

  .check-row input,
  input[type="checkbox"] {
    min-height: auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 12px 10px;
  }

  .topbar h1 {
    font-size: 19px;
  }

  .top-actions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    gap: 7px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .top-actions::-webkit-scrollbar {
    display: none;
  }

  .top-actions > * {
    flex: 0 0 auto;
    width: auto;
    justify-content: center;
    text-align: center;
  }

  .cloudflare-link,
  .cloudflare-status {
    min-width: min(280px, calc(100vw - 24px));
    max-width: none;
  }

  .cloudflare-status {
    flex-basis: auto;
    text-align: left;
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 25;
    gap: 2px;
    overflow-x: auto;
    padding-left: 12px;
    padding-right: 12px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 11px 13px;
    font-size: 14px;
  }

  main {
    padding: 14px 12px 24px;
  }

  .pager {
    justify-content: center;
    flex-wrap: wrap;
  }

  .pager span {
    min-width: 100%;
    order: -1;
  }

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

  #barcodeInput,
  #warehouseBarcodeInput,
  #posBarcodeInput {
    height: 56px;
    font-size: 20px;
  }

  .panel,
  .pin-card {
    border-radius: 0;
  }

  .scan-panel,
  .product-panel,
  .import-panel,
  .daily-panel,
  .reset-panel,
  .shopee-workflow-panel,
  .shopee-image-panel,
  .pos-register,
  .receipt-panel,
  .order-list-panel,
  .warehouse-panel,
  .warehouse-summary-panel,
  .warehouse-cart-panel {
    padding: 12px;
  }

  .employee-stock-actions .warehouse-mode {
    min-height: 58px;
    font-size: 16px;
  }

  .mode-symbol {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  .scan-insights-head,
  .panel-heading-row {
    flex-direction: column;
    align-items: stretch;
  }

  .scan-insights-grid,
  .item-grid,
  .warehouse-summary-grid,
  .receipt-meta,
  .draft-export-preview,
  .draft-numeric-grid,
  .draft-dimension-grid {
    grid-template-columns: 1fr;
  }

  .pos-actions,
  .reset-actions,
  .order-actions,
  .ready-draft-actions,
  .resolve-actions,
  .stock-actions {
    justify-content: stretch;
  }

  .pos-actions button,
  .reset-actions button,
  .order-actions button,
  .ready-draft-actions button,
  .resolve-actions button,
  .stock-actions button,
  .draft-actions button {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .table-wrap table,
  .shopee-table-wrap table,
  .ready-draft-table-wrap table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
  }

  .table-wrap td {
    border-bottom: 0;
    padding: 8px 10px;
    background: transparent;
    text-align: left;
  }

  .table-wrap td + td {
    border-top: 1px solid #eef3f8;
  }

  .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .table-wrap td[data-label=""]::before,
  .table-wrap td[colspan]::before {
    content: none;
  }

  .num {
    text-align: left;
  }

  .actions,
  .variant-cell,
  .supplier-cell,
  .rule-cell,
  .draft-main-cell,
  .draft-title-input,
  .draft-category-row,
  .draft-meta-list,
  .draft-actions,
  .ready-draft-name,
  .ready-draft-actions,
  .resolve-actions,
  .stock-actions {
    min-width: 0;
    width: 100%;
  }

  .draft-title-input,
  .draft-description-input,
  .shopee-image-grid input[type="file"],
  .resolve-input,
  .price-input,
  .cart-input,
  .cart-input.price,
  .cart-input.reason,
  .cart-input.warehouse-select {
    width: 100%;
    max-width: none;
  }

  .draft-category-row {
    grid-template-columns: 1fr;
  }

  .single-line,
  .delivery-summary strong,
  .stock-variant {
    max-width: none;
    white-space: normal;
  }

  .product-thumb {
    width: 96px;
    height: 96px;
  }

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

  .receipt-ticket-preview {
    width: min(100%, 80mm);
    padding: 12px;
  }
}

@media (max-width: 420px) {
  main {
    padding-left: 8px;
    padding-right: 8px;
  }

  .image-list {
    gap: 8px;
  }

  .store {
    font-size: 21px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .tabs,
  .pos-register,
  .sales-layout > .table-wrap,
  .filters,
  .panel:not(.receipt-panel) {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .view,
  .view.active,
  #posView {
    display: block !important;
  }

  .pos-layout,
  .sales-layout,
  .warehouse-layout {
    display: block;
  }

  .receipt-panel {
    border: 0;
    box-shadow: none;
  }
}

/* ============================================================================
   MODERNIST REDESIGN LAYER (design_handoff_inventory_ui)
   Appended last so equal-specificity rules here win the cascade.
   Flat architectural language: Archivo, red accent on off-white,
   1-2px rules, zero radius, no floating cards.
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--color-bg);
  color: var(--color-text);
}

/* ---- App shell: sidebar + main column ---- */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--color-bg);
}

.sidebar {
  width: 252px;
  flex: none;
  background: var(--color-surface);
  border-right: 2px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.side-brand {
  padding: 24px 20px 14px;
}

.side-brand strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.side-brand span {
  display: block;
  font-size: 12px;
  opacity: 0.65;
  margin-top: 4px;
}

.side-rule {
  border: 0;
  border-top: 2px solid var(--color-divider);
  margin: 0 20px 14px;
}

.sidebar nav.tabs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 0 24px;
  background: transparent;
  border: 0;
  margin: 0;
  overflow: visible;
}

.side-group-label {
  padding: 0 20px 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-700);
  font-weight: 700;
}

.sidebar .tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.85;
  border-radius: 0;
}

.sidebar .tab:hover {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
  opacity: 1;
}

.sidebar .tab.active {
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 700;
  opacity: 1;
}

.side-foot {
  padding: 14px 20px;
  border-top: 2px solid var(--color-divider);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---- Topbar ---- */
.topbar {
  background: var(--color-bg);
  color: var(--color-text);
  padding: 18px 28px;
  border-bottom: 2px solid var(--color-divider);
  align-items: flex-start;
  flex-wrap: wrap;
}

.topbar h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  color: var(--color-text);
}

.topbar p {
  color: var(--color-text);
  opacity: 0.65;
  font-size: 13px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 620px;
}

main {
  flex: 1;
  padding: 24px 28px 48px;
  min-width: 0;
  max-width: none;
}

/* ---- Buttons: flat, flush-left labels ---- */
button,
.link-button {
  border: 1px solid var(--color-divider);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  justify-content: flex-start;
  cursor: pointer;
  box-shadow: none;
}

button:hover,
.link-button:hover {
  background: var(--neutral-200);
  border-color: var(--color-divider);
  color: var(--color-text);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.primary,
.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

button.primary:hover,
.primary:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
  color: var(--color-bg);
}

button.danger,
.danger,
button.danger-strong,
.danger-strong {
  background: var(--color-bg);
  border: 1px solid var(--accent-700);
  color: var(--accent-700);
}

button.danger:hover,
.danger:hover,
button.danger-strong:hover,
.danger-strong:hover {
  background: var(--accent-100);
  color: var(--accent-700);
}

.danger-outline {
  background: transparent;
  border: 1px solid var(--accent-700);
  color: var(--accent-700);
}

.mini {
  padding: 2px 6px;
  font-size: 12px;
  border: 0;
  background: transparent;
  color: var(--color-accent);
  font-weight: 600;
}

.mini:hover {
  background: var(--accent-100);
  color: var(--accent-700);
}

.icon-button {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  padding: 2px 8px;
  color: var(--color-text);
}

.icon-button:hover {
  background: var(--neutral-200);
}

.link-button.cloudflare-action {
  background: var(--color-bg);
  color: var(--color-text);
}

/* ---- Fields & inputs ---- */
.field span,
.field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-700);
  text-transform: none;
}

input,
select,
textarea {
  border: 1px solid var(--color-divider);
  border-radius: 0;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 8px 10px;
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: -1px;
  border-color: var(--color-accent);
  box-shadow: none;
}

input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--color-accent);
}

/* ---- Panels: flat, 1px rule, no float ---- */
.view,
.panel {
  border-radius: 0;
}

.panel {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  box-shadow: none;
}

.panel-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  color: var(--color-text);
}

/* ---- Segmented mode controls ---- */
.mode-row,
.employee-stock-actions,
.advanced-mode-actions {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--color-divider);
  padding: 0;
  background: var(--color-bg);
}

.mode,
.warehouse-mode {
  border: 0;
  border-right: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-text);
  padding: 9px 14px;
  font-weight: 600;
  border-radius: 0;
}

.mode:last-child,
.warehouse-mode:last-child {
  border-right: 0;
}

.mode.active,
.warehouse-mode.active {
  background: var(--color-text);
  color: var(--color-bg);
}

.warehouse-mode.stock-in-mode.active,
.warehouse-mode.stock-out-mode.active {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ---- Tables: dense, architectural ---- */
.table-wrap table,
table {
  border-collapse: collapse;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neutral-700);
  font-weight: 700;
  border-bottom: 2px solid var(--color-divider);
  background: var(--color-bg);
}

td {
  border-bottom: 1px solid var(--color-divider);
}

tbody tr:hover td {
  background: color-mix(in srgb, var(--color-text) 4%, transparent);
}

/* ---- Pills → flat tags ---- */
.pill {
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--neutral-200);
  color: var(--neutral-800);
  border: 0;
}

.pill.matched,
.pill.marketplace,
.pill.ok,
.pill.genuine {
  background: var(--accent-200);
  color: var(--accent-800);
}

.pill.unmatched,
.pill.warn,
.pill.low {
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--accent-700);
}

.pill.unknown,
.pill.unlisted,
.pill.muted {
  background: var(--neutral-200);
  color: var(--neutral-800);
}

.role-badge {
  border-radius: 0;
  background: var(--accent-200);
  color: var(--accent-800);
  font-weight: 700;
  padding: 4px 10px;
  border: 0;
}

/* ---- Metrics ---- */
.metrics {
  gap: 10px;
}

.metric {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: 0;
  box-shadow: none;
  padding: 12px;
}

.metric span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neutral-700);
}

.metric strong {
  font-family: var(--font-heading);
  font-weight: 800;
}

/* ---- Messages ---- */
.message.ok { color: var(--accent-700); }
.message.error { color: var(--accent-600); }
.message.warn { color: var(--accent-800); }

/* ---- Scanner status ---- */
.scanner-status {
  border: 1px solid var(--color-divider);
  background: var(--color-bg);
  border-radius: 0;
  box-shadow: none;
}

.scanner-status .status-dot {
  background: var(--color-accent);
}

/* ---- Pager ---- */
.pager button {
  border: 1px solid var(--color-divider);
  background: var(--color-bg);
  border-radius: 0;
}

.pager button.active,
.pager .active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

/* ---- Dialogs & PIN overlay: flat modals ---- */
dialog,
.pos-manual-dialog,
.listing-variation-dialog {
  border: 1px solid var(--color-divider);
  border-radius: 0;
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: none;
}

dialog::backdrop {
  background: color-mix(in srgb, var(--color-text) 55%, transparent);
}

.pin-overlay {
  background: color-mix(in srgb, var(--color-text) 55%, transparent);
}

.pin-card {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: 0;
  box-shadow: none;
}

.pin-card h2 {
  font-family: var(--font-heading);
  font-weight: 800;
}

/* ---- Misc surfaces ---- */
.file-warning {
  background: var(--accent-100);
  color: var(--accent-800);
  border-bottom: 2px solid var(--accent-700);
}

.supplier-manager-item,
.part-candidate-option,
.stock-pick-card {
  border: 1px solid var(--color-divider);
  border-radius: 0;
  background: var(--color-bg);
  box-shadow: none;
}

::selection {
  background: var(--accent-200);
}

a {
  color: var(--color-accent);
}

a:hover {
  color: var(--accent-700);
}

/* ---- Sidebar responsiveness: collapse to top strip on small screens ---- */
@media (max-width: 860px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 2px solid var(--color-divider);
  }
  .sidebar nav.tabs {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 8px 10px;
  }
  .sidebar nav.tabs > div {
    display: contents;
  }
  .side-group-label {
    display: none;
  }
  .sidebar .tab {
    width: auto;
    padding: 8px 12px;
  }
  .side-foot {
    display: none;
  }
}

/* ---- Reference images (foto identifikasi) ---- */
.ref-thumb-strip {
  display: flex;
  gap: 3px;
  margin-top: 5px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
}

.ref-thumb {
  width: 38px;
  height: 38px;
  flex: none;
  object-fit: cover;
  border: 1px solid var(--color-divider);
  cursor: zoom-in;
  background: var(--neutral-100);
}

.ref-thumb:hover {
  outline: 2px solid var(--color-accent);
  outline-offset: -1px;
}

.ref-more {
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

/* Give the product-name column room so a 4-thumb strip fits on one line. */
#stockBody td:nth-child(2) {
  min-width: 180px;
}

.scan-reference-strip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-divider);
}

.scan-reference-strip .ref-thumb {
  width: 64px;
  height: 64px;
}

.ref-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--color-text) 65%, transparent);
  display: grid;
  place-items: center;
  padding: 20px;
}

.ref-lightbox-inner {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  max-width: min(860px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.ref-lightbox-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--color-divider);
}

.ref-lightbox-head span {
  font-size: 12px;
  opacity: 0.7;
  flex: 1;
}

.ref-lightbox-inner > img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  padding: 12px;
  background: #fff;
}

.ref-lightbox-actions {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--color-divider);
}

/* ---- Shopee phone camera batch upload ---- */
.shopee-camera-panel {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: color-mix(in srgb, var(--color-text) 70%, transparent);
}

.shopee-camera-panel.hidden {
  display: none;
}

.shopee-camera-sheet {
  width: min(100vw, 760px);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg);
  color: var(--color-text);
  overflow: auto;
}

.shopee-camera-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
}

.shopee-camera-header strong,
.shopee-camera-header span {
  display: block;
}

.shopee-camera-header span {
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

.shopee-camera-sheet video {
  width: 100%;
  min-height: 45dvh;
  max-height: 58dvh;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--color-divider);
}

.shopee-camera-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.shopee-camera-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: var(--space-2);
}

.shopee-camera-thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
  overflow: hidden;
}

.shopee-camera-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shopee-camera-thumb span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 800;
  font-size: var(--text-xs);
}

.shopee-camera-open {
  overflow: hidden;
}
