.upload-zone {
  min-height: 120px;
  border: 1px solid #ffccc7;
  border-radius: 4px;
  background: #fffafa;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.upload-zone .primary-button {
  display: none;
}

.review-alert {
  min-height: 48px;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 16px;
  border: 1px solid #ffe58f;
  background: #fffbe6;
  color: #ad6800;
}

.upload-zone strong {
  display: block;
  font-size: 17px;
  margin-bottom: 8px;
}

.upload-zone p {
  color: var(--muted);
  margin-bottom: 14px;
}

.upload-hint-grid {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.hint-item {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.hint-item strong {
  display: block;
  margin-bottom: 4px;
}

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

.warehouse-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.warehouse-list-panel {
  position: sticky;
  top: 50px;
  max-height: calc(100vh - 58px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.warehouse-list-panel .panel-body {
  min-height: 0;
  overflow: hidden;
}

.warehouse-list {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #c9ced6 transparent;
}

.warehouse-list::-webkit-scrollbar {
  width: 6px;
}

.warehouse-list::-webkit-scrollbar-thumb {
  background: #c9ced6;
  border-radius: 999px;
}

.warehouse-list::-webkit-scrollbar-track {
  background: transparent;
}

.warehouse-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 6px;
}

.warehouse-select-button {
  min-height: 54px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
}

.warehouse-item.active {
  border-color: #ffccc7;
  background: #fff1f0;
  box-shadow: none;
}

.warehouse-delete-button {
  align-self: center;
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.warehouse-delete-button span:last-child {
  display: none;
}

.warehouse-list strong,
.warehouse-list span {
  display: block;
}

.warehouse-list span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.empty-mark {
  width: 70px;
  height: 52px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  margin: 0 auto 12px;
  position: relative;
}

.empty-mark::after {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--line-strong);
  position: absolute;
  left: 22px;
  top: 25px;
}

.state-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.state-content {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
}

.state-content strong {
  color: var(--text);
  font-size: 18px;
}

.state-content.error strong {
  color: var(--danger);
}

.state-icon {
  width: 34px;
  height: 34px;
  color: var(--primary);
}

.inline-loading {
  min-height: 160px;
  display: grid;
  place-items: center;
}

.page-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  pointer-events: none;
}

body.auth-booting .app-shell {
  visibility: hidden;
}

.page-loading-overlay[hidden] {
  display: none;
}

.page-loading-spinner {
  width: 38px;
  height: 38px;
  color: var(--primary);
  filter: drop-shadow(0 4px 10px rgba(224, 46, 36, 0.18));
  animation: page-loading-spin 0.8s linear infinite;
}

.page-loading-ring {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(224, 46, 36, 0.18);
  border-top-color: var(--primary);
  border-radius: 999px;
  filter: drop-shadow(0 4px 10px rgba(224, 46, 36, 0.18));
  animation: page-loading-spin 0.8s linear infinite;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.wide-modal {
  width: min(980px, 100%);
}

.large-modal {
  width: min(1180px, 100%);
}

.modal-header,
.modal-footer {
  min-height: 62px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.modal-body {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0;
  padding: 0;
}

.photo-stage {
  min-width: 0;
  min-height: 560px;
  background: #111111;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 26px;
}

.photo-strip {
  grid-column: 1;
  grid-row: 1;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.photo-strip button {
  width: 92px;
  height: 64px;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
}

.photo-strip button.active {
  border-color: var(--primary);
}

.photo-strip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.compact-empty {
  min-height: 120px;
}

.modal-table {
  max-height: 420px;
  overflow: auto;
}

.error-box {
  border-color: #ffcdd2;
  background: #fff1f0;
  color: #a8071a;
}

.detail-panel {
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 18px;
}

.summary-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  color: var(--muted);
  line-height: 1.7;
}
