.warehouse-switch {
  position: relative;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.warehouse-switch:hover,
.warehouse-switch:focus-within {
  border-color: #cfdaf0;
  box-shadow: 0 0 0 3px #2e6cf60d;
}

.warehouse-switch select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: #334057;
  font: 600 13px 'Noto Sans SC';
  cursor: pointer;
}

.warehouse-switch .chevron {
  flex: 0 0 auto;
  pointer-events: none;
  transition: transform .2s ease;
}

.warehouse-switch:focus-within .chevron {
  transform: translateY(2px);
}

.warehouse-switch.is-loading {
  opacity: .62;
  pointer-events: none;
}

.administration-grid {
  grid-template-columns: minmax(0, 1fr) minmax(460px, 1.15fr);
}

.warehouse-manager-panel {
  min-width: 0;
}

.warehouse-manager-head {
  gap: 18px;
}

.warehouse-head-actions,
.warehouse-card-actions,
.location-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.warehouse-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.warehouse-summary > div {
  padding: 10px 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #f8faff;
}

.warehouse-summary small,
.warehouse-summary b {
  display: block;
}

.warehouse-summary small {
  color: #8d97a8;
  font-size: 11px;
}

.warehouse-summary b {
  margin-top: 2px;
  color: #2c3850;
  font: 600 18px 'DM Mono';
}

.warehouse-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  margin-bottom: 12px;
  padding: 0 11px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #fff;
  color: #8d97a8;
}

.warehouse-search:focus-within {
  border-color: #8eacf7;
  box-shadow: 0 0 0 3px #2e6cf612;
}

.warehouse-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #3f4c61;
  font: 12px 'Noto Sans SC';
}

.warehouse-list {
  display: grid;
  gap: 12px;
  max-height: 610px;
  overflow-y: auto;
  padding-right: 3px;
}

.warehouse-card {
  overflow: hidden;
  border: 1px solid #e4e9f1;
  border-radius: 10px;
  background: #fff;
}

.warehouse-card:hover {
  border-color: #cfdaf0;
  box-shadow: 0 6px 18px #1e3f7410;
}

.warehouse-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.warehouse-identity,
.location-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.warehouse-identity > div,
.location-identity > div {
  min-width: 0;
}

.warehouse-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf3ff;
  color: #2e6cf6;
  font-size: 17px;
}

.warehouse-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.warehouse-title b {
  overflow: hidden;
  color: #29364c;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-title span {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f0f3f8;
  color: #7f8999;
  font-size: 10px;
}

.warehouse-identity small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #939cab;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-card-actions .secondary {
  height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.warehouse-card-meta {
  display: flex;
  gap: 18px;
  padding: 8px 14px;
  border-top: 1px solid #f0f2f6;
  border-bottom: 1px solid #f0f2f6;
  background: #fafbfc;
  color: #7d8797;
  font-size: 11px;
}

.location-list {
  padding: 0 14px;
}

.location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid #f0f2f5;
}

.location-row:last-child {
  border-bottom: 0;
}

.location-code {
  min-width: 53px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #eef2f7;
  color: #49566b;
  text-align: center;
  font: 600 11px 'DM Mono';
}

.location-identity b,
.location-identity small {
  display: block;
}

.location-identity b {
  color: #455166;
  font-size: 12px;
}

.location-identity small {
  margin-top: 2px;
  color: #98a1af;
  font-size: 10px;
}

.danger {
  color: #df625c;
}

.location-empty,
.warehouse-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  color: #919baa;
  font-size: 11px;
}

.warehouse-empty-state {
  min-height: 150px;
  flex-direction: column;
  border: 1px dashed #dce3ee;
  border-radius: 10px;
  background: #fafbfc;
}

.warehouse-empty-state b {
  color: #596579;
  font-size: 13px;
}

.warehouse-empty-state small {
  margin-bottom: 6px;
}

.field-note {
  color: #9aa3b1;
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .administration-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .warehouse-manager-head,
  .warehouse-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-head-actions,
  .warehouse-card-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .warehouse-head-actions .primary,
  .warehouse-head-actions .secondary,
  .warehouse-card-actions .secondary,
  .warehouse-card-actions .text-btn {
    width: 100%;
  }

  .warehouse-card-actions .danger {
    grid-column: 1 / -1;
  }

  .warehouse-list {
    max-height: none;
    overflow: visible;
  }

  .location-actions {
    gap: 3px;
  }
}
