/* ============================================================
   page-vendor-list.css — vendor_stockout 缺貨清單
   group: monitor · uses ewoooc-tokens-v2-alias
   ============================================================ */

.stockout-list-stack {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.stockout-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  background: var(--momo-bg-surface);
  border: 1px solid var(--momo-border-light);
  border-radius: 8px;
}

.stockout-eyebrow,
.stockout-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
}

.stockout-eyebrow {
  width: fit-content;
  margin-bottom: 10px;
  padding: 4px 10px;
  color: var(--momo-accent-strong);
  background: var(--momo-accent-soft);
  border-radius: var(--momo-radius-pill);
}

.stockout-title {
  margin: 0;
  color: var(--momo-text-primary);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

.stockout-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--momo-text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.stockout-actions,
.stockout-status-tabs,
.stockout-pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stockout-action,
.stockout-tab,
.stockout-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 8px 13px;
  color: var(--momo-text-primary);
  background: var(--momo-bg-paper);
  border: 1px solid var(--momo-border-light);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: var(--momo-transition-base);
}

.stockout-action:hover,
.stockout-tab:hover,
.stockout-page-link:hover {
  color: var(--momo-text-primary);
  border-color: var(--momo-border-strong);
  transform: translateY(-1px);
}

.stockout-action.is-primary,
.stockout-tab.is-active {
  color: var(--momo-text-inverse);
  background: var(--momo-ink);
  border-color: var(--momo-ink);
}

.stockout-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.stockout-kpi,
.stockout-filter-card,
.stockout-table-card {
  background: var(--momo-bg-surface);
  border: 1px solid var(--momo-border-light);
  border-radius: 8px;
}

.stockout-kpi {
  min-width: 0;
  padding: 16px;
  box-shadow: inset 3px 0 0 var(--momo-border-strong);
}

.stockout-kpi-label {
  color: var(--momo-text-secondary);
  font-size: 11px;
  font-weight: 800;
}

.stockout-kpi-value {
  margin-top: 8px;
  color: var(--momo-text-primary);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.stockout-kpi-value.is-danger { color: var(--momo-danger); }
.stockout-kpi-value.is-success { color: var(--momo-success); }

.stockout-kpi-sub {
  margin-top: 8px;
  color: var(--momo-text-tertiary);
  font-size: 11px;
}

.stockout-filter-card { padding: 16px; }

.stockout-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(180px, 0.9fr) minmax(160px, 0.8fr) minmax(130px, 0.62fr) auto;
  gap: 10px;
  align-items: center;
}

.stockout-input,
.stockout-select {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  color: var(--momo-text-primary);
  background: var(--momo-bg-paper);
  border: 1px solid var(--momo-border-light);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}

.stockout-input:focus,
.stockout-select:focus {
  border-color: var(--momo-accent);
  box-shadow: 0 0 0 3px var(--momo-accent-soft);
}

.stockout-table-card { overflow: hidden; }

.stockout-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--momo-border-light);
}

.stockout-table-title {
  color: var(--momo-text-primary);
  font-size: 13px;
  font-weight: 800;
}

.stockout-table-meta {
  color: var(--momo-text-tertiary);
  font-size: 11px;
}

.stockout-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.stockout-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.stockout-table th {
  padding: 11px 14px;
  color: var(--momo-text-secondary);
  background: var(--momo-bg-paper);
  border-bottom: 1px solid var(--momo-border-light);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  text-align: left;
}

.stockout-table td {
  padding: 13px 14px;
  color: var(--momo-text-primary);
  border-bottom: 1px solid var(--momo-border-light);
  font-size: 13px;
  vertical-align: top;
}

.stockout-table tbody tr:hover { background: var(--momo-bg-paper); }

.stockout-product-name,
.stockout-vendor-name {
  max-width: 300px;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stockout-product-code,
.stockout-vendor-code {
  margin-top: 3px;
  color: var(--momo-text-tertiary);
  font-size: 11px;
}

.stockout-chip {
  min-width: 74px;
  justify-content: center;
  padding: 4px 8px;
  color: var(--momo-text-secondary);
  background: var(--momo-bg-paper);
  border: 1px solid var(--momo-border-light);
  border-radius: var(--momo-radius-pill);
}

.stockout-chip.is-pending {
  color: var(--momo-danger);
  background: rgba(214, 83, 68, 0.1);
  border-color: rgba(214, 83, 68, 0.2);
}

.stockout-chip.is-sent {
  color: var(--momo-success);
  background: rgba(67, 132, 89, 0.1);
  border-color: rgba(67, 132, 89, 0.2);
}

.stockout-chip.is-failed {
  color: var(--momo-danger);
  background: rgba(214, 83, 68, 0.1);
  border-color: rgba(214, 83, 68, 0.2);
}

.stockout-chip.is-duplicate {
  color: var(--momo-warning-text);
  background: var(--momo-tag-honey-bg);
  border-color: var(--momo-tag-honey-border);
}

.stockout-chip.is-unknown {
  color: var(--momo-text-tertiary);
  background: var(--momo-bg-paper);
  border-color: var(--momo-border-light);
}

.stockout-empty {
  padding: 34px;
  color: var(--momo-text-secondary);
  background: var(--momo-bg-paper);
  border-top: 1px solid var(--momo-border-light);
  font-size: 13px;
  text-align: center;
}

.stockout-pagination {
  justify-content: flex-end;
  padding: 14px 18px;
  background: var(--momo-bg-paper);
}

@media (max-width: 1180px) {
  .stockout-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stockout-filter-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .stockout-list-stack {
    gap: 14px;
  }

  .stockout-header,
  .stockout-table-head {
    flex-direction: column;
    align-items: stretch;
  }

  .stockout-header {
    gap: 14px;
    padding: 16px;
  }

  .stockout-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stockout-action,
  .stockout-tab,
  .stockout-page-link {
    min-height: 36px;
    padding: 8px 10px;
  }

  .stockout-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stockout-kpi {
    min-width: 0;
    padding: 12px;
  }

  .stockout-kpi:last-child {
    grid-column: 1 / -1;
  }

  .stockout-kpi-value {
    margin-top: 6px;
    font-size: 22px;
  }

  .stockout-kpi-sub {
    margin-top: 6px;
    font-size: 10px;
  }

  .stockout-filter-card {
    padding: 12px;
  }

  .stockout-filter-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stockout-status-tabs {
    flex-wrap: nowrap;
    max-width: 100%;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .stockout-tab {
    flex: 0 0 auto;
  }

  .stockout-table-head,
  .stockout-pagination {
    padding: 12px;
  }

  .stockout-table-wrap {
    overflow: visible;
  }

  .stockout-table {
    min-width: 0;
  }

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

  .stockout-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .stockout-table th {
    display: none;
  }

  .stockout-table tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: var(--momo-bg-paper);
  }

  .stockout-table tr {
    background: var(--momo-bg-surface);
    border: 1px solid var(--momo-border-light);
    border-radius: 8px;
    overflow: hidden;
  }

  .stockout-table td {
    display: grid;
    grid-template-columns: minmax(86px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-bottom: 1px solid var(--momo-border-light);
    font-size: 12px;
  }

  .stockout-table td:last-child {
    border-bottom: 0;
  }

  .stockout-table td::before {
    content: attr(data-label);
    color: var(--momo-text-tertiary);
    font-family: var(--momo-font-mono);
    font-size: 10px;
    font-weight: 800;
  }

  .stockout-product-name,
  .stockout-vendor-name {
    max-width: 100%;
    white-space: normal;
  }

  .stockout-pagination {
    justify-content: stretch;
  }

  .stockout-page-link {
    flex: 1 1 auto;
  }

  .stockout-title { font-size: 26px; }
}

@media (max-width: 420px) {
  .stockout-title {
    font-size: 24px;
  }

  .stockout-subtitle {
    font-size: 12px;
  }

  .stockout-kpi {
    padding: 10px;
  }

  .stockout-kpi-value {
    font-size: 20px;
  }
}
