/* UA-ERP V3.0 WAREHOUSE OPERATIONS */

.wh-v30-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: 18px 0;
  padding: 22px 24px;
  border: 1px solid rgba(87, 126, 102, 0.34);
  background:
    linear-gradient(
      118deg,
      rgba(242, 248, 244, 0.98) 0%,
      rgba(255, 255, 255, 0.98) 52%,
      rgba(231, 240, 234, 0.94) 100%);
  box-shadow:
    inset 4px 0 0 #547a61,
    0 16px 36px rgba(28, 47, 35, 0.08);
}

.wh-v30-entry > div {
  display: grid;
  gap: 6px;
}

.wh-v30-entry strong {
  color: #1c3023;
  font-size: 16px;
  line-height: 1.35;
}

.wh-v30-entry small {
  color: #68766d;
  line-height: 1.5;
}

.modal.wh-v30-modal {
  width: min(1380px, calc(100vw - 34px));
  max-width: 1380px;
  height: min(930px, calc(100vh - 34px));
  max-height: calc(100vh - 34px);
}

.modal.wh-v30-modal .modal-body {
  padding: 0;
  overflow: auto;
}

.modal.wh-v30-modal .modal-footer {
  border-top: 1px solid #d8dfda;
}

.wh-v30-center {
  min-width: 0;
  padding: 22px;
  background:
    linear-gradient(
      180deg,
      #f7faf8 0%,
      #edf3ef 100%);
}

.wh-v30-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 24px;
  border: 1px solid rgba(76, 113, 89, 0.32);
  background:
    radial-gradient(
      circle at 90% 15%,
      rgba(111, 155, 126, 0.20),
      transparent 34%),
    linear-gradient(
      120deg,
      #ffffff 0%,
      #f0f6f2 56%,
      #e5eee8 100%);
  box-shadow:
    inset 4px 0 0 #4c7659,
    0 18px 44px rgba(32, 55, 40, 0.08);
}

.wh-v30-hero h3 {
  margin: 5px 0 8px;
  color: #17291e;
  font-size: 21px;
  line-height: 1.3;
}

.wh-v30-hero p {
  max-width: 900px;
  margin: 0;
  color: #657269;
  line-height: 1.58;
}

.wh-v30-filters {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    minmax(180px, 1fr)
    minmax(260px, 1.6fr)
    auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d2dcd5;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(245, 249, 246, 0.98));
}

.wh-v30-filters label {
  display: grid;
  gap: 7px;
}

.wh-v30-filters label > span {
  color: #6b776f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wh-v30-filters input,
.wh-v30-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8d4cc;
  background: #fff;
}

.wh-v30-metrics,
.wh-v30-acceptance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.wh-v30-metric {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #d5ddd7;
  background:
    linear-gradient(
      145deg,
      #ffffff 0%,
      #f4f8f5 100%);
  box-shadow:
    inset 0 -3px 0 rgba(82, 119, 94, 0.18),
    0 10px 24px rgba(38, 60, 45, 0.05);
}

.wh-v30-metric span,
.wh-v30-metric small {
  display: block;
  color: #758078;
}

.wh-v30-metric span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wh-v30-metric strong {
  display: block;
  margin: 7px 0 5px;
  color: #1d3325;
  font-size: 24px;
  line-height: 1.2;
}

.wh-v30-metric small {
  font-size: 12px;
}

.wh-v30-tabs {
  display: flex;
  gap: 0;
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid #cbd6ce;
  background: #e8efea;
}

.wh-v30-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-right: 1px solid #cbd6ce;
  background: transparent;
  color: #58675d;
  font-weight: 700;
  cursor: pointer;
}

.wh-v30-tabs button:last-child {
  border-right: 0;
}

.wh-v30-tabs button:hover,
.wh-v30-tabs button.is-active {
  background:
    linear-gradient(
      180deg,
      #5e856b 0%,
      #456650 100%);
  color: #fff;
}

.wh-v30-panel {
  margin-top: 0;
  padding: 20px;
  border: 1px solid #cbd6ce;
  border-top: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.99),
      rgba(247, 250, 248, 0.99));
}

.wh-v30-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dbe2dd;
}

.wh-v30-panel > header h3 {
  margin: 4px 0 0;
  color: #203226;
  font-size: 17px;
}

.wh-v30-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #d3dcd5;
  background: #fff;
}

.wh-v30-table-wrap table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.wh-v30-table-wrap th {
  padding: 12px;
  border-right: 1px solid #d4ddd6;
  border-bottom: 1px solid #c8d3cb;
  background: #eaf0ec;
  color: #536158;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.wh-v30-table-wrap td {
  padding: 12px;
  border-right: 1px solid #e1e6e2;
  border-bottom: 1px solid #e1e6e2;
  color: #2f3d33;
  vertical-align: top;
}

.wh-v30-table-wrap th:last-child,
.wh-v30-table-wrap td:last-child {
  border-right: 0;
}

.wh-v30-table-wrap td strong,
.wh-v30-table-wrap td small {
  display: block;
}

.wh-v30-table-wrap td small {
  margin-top: 4px;
  color: #748078;
  line-height: 1.4;
}

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

.wh-v30-card {
  min-width: 0;
  border: 1px solid #d3dcd5;
  background:
    linear-gradient(
      150deg,
      #ffffff 0%,
      #f4f8f5 100%);
  box-shadow: 0 9px 22px rgba(37, 59, 44, 0.05);
}

.wh-v30-card > header,
.wh-v30-card > footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.wh-v30-card > header {
  border-bottom: 1px solid #dce3de;
}

.wh-v30-card > footer {
  border-top: 1px solid #dce3de;
}

.wh-v30-card > header > div {
  min-width: 0;
}

.wh-v30-card strong,
.wh-v30-card small {
  display: block;
}

.wh-v30-card strong {
  color: #21352a;
}

.wh-v30-card small,
.wh-v30-card footer > span,
.wh-v30-card > p {
  color: #707c74;
}

.wh-v30-card small {
  margin-top: 5px;
}

.wh-v30-card > p {
  min-height: 42px;
  margin: 0;
  padding: 14px 16px;
  line-height: 1.5;
}

.wh-v30-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #dfe5e1;
}

.wh-v30-detail-grid p {
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  background: #fff;
}

.wh-v30-detail-grid span,
.wh-v30-detail-grid b {
  display: block;
}

.wh-v30-detail-grid span {
  color: #78837b;
  font-size: 11px;
  text-transform: uppercase;
}

.wh-v30-detail-grid b {
  margin-top: 5px;
  color: #293a2f;
  overflow-wrap: anywhere;
}

.wh-v30-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #c8d2cb;
  background: #eef2ef;
  color: #526157;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.wh-v30-status.is-good {
  border-color: #9fbaa8;
  background: #e4efe7;
  color: #315c3f;
}

.wh-v30-status.is-warning {
  border-color: #d6c59c;
  background: #f4efdf;
  color: #755f26;
}

.wh-v30-status.is-bad {
  border-color: #d3a8a8;
  background: #f4e5e5;
  color: #7d3232;
}

.wh-v30-status.is-neutral {
  border-color: #cbd3ce;
  background: #edf1ee;
  color: #59645d;
}

.wh-v30-location-list,
.wh-v30-issue-list {
  display: grid;
  gap: 8px;
}

.wh-v30-location {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 13px 14px 13px calc(14px + var(--wh-depth, 0px));
  border: 1px solid #d7dfd9;
  background: #fff;
  box-shadow: inset 3px 0 0 rgba(75, 111, 87, 0.28);
}

.wh-v30-location > div:first-child strong,
.wh-v30-location > div:first-child small {
  display: block;
}

.wh-v30-location > div:first-child small {
  margin-top: 4px;
  color: #7a857d;
}

.wh-v30-location > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: #647168;
  font-size: 12px;
}

.wh-v30-issue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid #d7dfd9;
  background: #fff;
}

.wh-v30-issue strong,
.wh-v30-issue small {
  display: block;
}

.wh-v30-issue small {
  margin-top: 5px;
  color: #707d74;
  line-height: 1.45;
}

.wh-v30-center .number-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .wh-v30-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 720px) {
  .wh-v30-entry,
  .wh-v30-hero,
  .wh-v30-location {
    grid-template-columns: 1fr;
  }

  .wh-v30-filters,
  .wh-v30-metrics,
  .wh-v30-acceptance {
    grid-template-columns: 1fr;
  }

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

  .modal.wh-v30-modal {
    width: calc(100vw - 14px);
    height: calc(100vh - 14px);
    max-height: calc(100vh - 14px);
  }

  .wh-v30-center {
    padding: 12px;
  }
}
