:root { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; color: #16232e; background: #f4f1ea; }
.admin-page { min-height: 100vh; padding: 24px; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.admin-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid #e5e1d8; border-radius: 8px; padding: 24px; }
h1 { margin: 0 0 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
input, select { width: 100%; border: 1px solid #cfc9bd; border-radius: 6px; padding: 10px 12px; font: inherit; background: #fff; }
.btn { border: 1px solid transparent; border-radius: 6px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.btn-primary { background: #c0471f; color: #fff; border-color: #c0471f; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.alert { border-radius: 6px; padding: 12px; margin-bottom: 16px; background: #fdecea; color: #8a1f1f; border: 1px solid #f3c4bd; }
.inventory-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e5e1d8; border-radius: 8px; }
.inventory-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.inventory-table th, .inventory-table td { border: 1px solid #e5e1d8; padding: 8px; text-align: left; vertical-align: top; }
.inventory-table th { background: #f4f1ea; white-space: nowrap; }
.inventory-photo { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e1d8; }
.inventory-empty { text-align: center; color: #6b757e; padding: 20px; }
.product-details { color: #6b757e; font-size: .85rem; margin-top: 4px; }

.details-dialog { border: 1px solid #e5e1d8; border-radius: 8px; padding: 20px; max-width: 720px; width: calc(100% - 32px); background: #fff; }
.details-dialog::backdrop { background: rgba(22, 35, 46, 0.45); }
.details-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.details-dialog-header h2 { margin: 0; }
.inbound-details { margin-bottom: 16px; }
.detail-list { display: grid; grid-template-columns: 180px 1fr; gap: 8px; }
.detail-list dt { font-weight: 600; color: #6b757e; }
.detail-list dd { margin: 0; }
.status-form { border-top: 1px solid #e5e1d8; padding-top: 16px; }
.number-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.status-actions { display: flex; gap: 8px; }

.admin-image-form { border-top: 1px solid #e5e1d8; margin-top: 16px; padding-top: 16px; }
.admin-image-form h4 { margin: 0 0 12px; }
.image-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.inventory-photo.large { width: 96px; height: 96px; object-fit: cover; }

img { cursor: zoom-in; }
.image-fullscreen { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.94); }
.image-fullscreen[hidden] { display: none; }
.image-fullscreen img { max-width: 98vw; max-height: 92vh; object-fit: contain; cursor: zoom-out; }
.image-fullscreen-close { position: fixed; top: 16px; right: 16px; z-index: 10000; border: 0; border-radius: 6px; padding: 10px 14px; background: #fff; color: #111; font: inherit; font-weight: 600; cursor: pointer; }
body.image-fullscreen-open { overflow: hidden; }

.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e5e1d8;
  margin-bottom: 16px;
}

.admin-tab {
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  padding: 10px 14px;
  border-radius: 6px 6px 0 0;
  font: inherit;
  font-weight: 600;
  color: #6b757e;
  cursor: pointer;
}

.admin-tab[aria-selected="true"] {
  background: #fff;
  color: #16232e;
  border-color: #e5e1d8;
}

.orders-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.orders-toolbar #bulkStatusSelect {
  margin-left: auto;
}

.inventory-table select {
  max-width: 150px;
}
