/* 收银数据分析 — 定制样式 */

/* 数字等宽 */
.tabular-nums { font-variant-numeric: tabular-nums; }

/* 导航项过渡 */
.nav-item { transition: all 0.15s ease; }

/* 表格行悬停 */
tbody tr:hover { background: #f8fafc; }

/* 补货建议 - 需补高亮 */
.row-need { background: #fefce8; }
.row-need:hover { background: #fef9c3; }

/* 采集状态 */
.collect-ok { color: #16a34a; }
.collect-err { color: #dc2626; }

/* ══════════════════════════════════════════
   列过滤 Popover (sample 模式)
   ══════════════════════════════════════════ */
.col-filter-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: 1px solid #d1d5db; border-radius: 4px;
  background: #fff; cursor: pointer; vertical-align: middle; margin-left: 3px;
  color: #9ca3af; padding: 2px; transition: all 0.15s;
}
.col-filter-btn svg { width: 12px; height: 12px; pointer-events: none; }
.col-filter-btn:hover { border-color: #6366f1; color: #6366f1; }
.col-filter-btn.active {
  background: #6366f1; border-color: #6366f1; color: #fff;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.3);
}

.col-filter-pop {
  position: absolute; z-index: 1000;
  width: 260px; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 10px 0; font-size: 13px; color: #374151;
}

.cfp-search-wrap { padding: 0 10px 6px; }
.cfp-search {
  width: 100%; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 12px; outline: none; background: #f9fafb;
}
.cfp-search:focus { border-color: #6366f1; background: #fff; }

.cfp-all {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px 8px; font-size: 12px; font-weight: 600; color: #6366f1;
  border-bottom: 1px solid #f3f4f6; cursor: pointer;
}
.cfp-all input { accent-color: #6366f1; }

.cfp-list {
  max-height: 220px; overflow-y: auto; padding: 2px 4px;
}
.cfp-opt {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 6px; cursor: pointer;
  font-size: 12px;
}
.cfp-opt:hover { background: #f3f4f6; }
.cfp-opt input { accent-color: #6366f1; flex-shrink: 0; }
.cfp-opt span {
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cfp-opt em { font-style: normal; font-size: 10px; color: #9ca3af; flex-shrink: 0; }

.cfp-append {
  display: flex; align-items: center; gap: 5px;
  margin-top: 2px; padding: 6px 10px; font-size: 12px; color: #4338ca;
  background: #eef2ff; border-top: 1px solid #e0e7ff; cursor: pointer;
}
.cfp-append input { accent-color: #6366f1; flex-shrink: 0; }

.cfp-footer {
  display: flex; justify-content: space-between; gap: 6px;
  padding: 8px 10px 2px; border-top: 1px solid #f3f4f6;
}
.cfp-reset {
  background: none; border: none; color: #9ca3af; font-size: 12px; cursor: pointer; padding: 4px 8px;
}
.cfp-reset:hover { color: #6366f1; }
.cfp-apply {
  background: #6366f1; color: #fff; border: none; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 5px 16px;
}
.cfp-apply:hover { background: #4f46e5; }
.cfp-apply:disabled { opacity: .45; cursor: not-allowed; }
.cfp-apply:disabled:hover { background: #6366f1; }

/* design-v2: quiet operations console */
.design-v2 {
  background: #f4f7fb;
  color: #172033;
  -webkit-font-smoothing: antialiased;
}
.design-v2 #mainSidebar {
  width: 220px;
  background: #111827;
  color: #9ca3af;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
}
.design-v2 #mainSidebar > div:first-child {
  height: 68px;
  border-color: rgba(148,163,184,0.18);
}
.design-v2 #mainSidebar .nav-item {
  border-radius: 8px;
  margin-bottom: 3px;
  color: #b8c2d3;
  min-height: 40px;
  font-weight: 600;
  padding-left: 18px !important;
}
.design-v2 #mainSidebar .nav-item.bg-indigo-600 {
  background: rgba(37,99,235,0.18) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 #60a5fa;
}
.design-v2 #mainSidebar .nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #f8fafc;
}
.design-v2 #globalHeader {
  min-height: 72px;
  padding: 12px 28px;
  background: rgba(255,255,255,0.96);
  border-color: #e5eaf2;
  box-shadow: 0 1px 0 rgba(15,23,42,0.04);
}
.design-v2 main {
  background:
    linear-gradient(180deg, #f8fafc 0, #f4f7fb 260px),
    #f4f7fb;
}
.design-v2 #pageContainer {
  max-width: 1900px;
  padding: 26px 30px 34px;
}
.design-v2 #pageContainer.pivot-page {
  max-width: none;
  padding: 22px 24px 28px;
}
.design-v2 label {
  letter-spacing: 0.03em;
}
.design-v2 input,
.design-v2 select {
  border-color: #dbe3ef !important;
  border-radius: 8px !important;
  background-color: #fff !important;
  min-height: 36px;
}
.design-v2 button {
  border-radius: 8px !important;
}
.design-v2 .bg-white.rounded-xl,
.design-v2 .bg-white.rounded-lg {
  border-radius: 8px !important;
  border-color: #e5eaf2 !important;
  box-shadow: 0 8px 22px rgba(15,23,42,0.055) !important;
}
.design-v2 .shadow-sm {
  box-shadow: 0 8px 22px rgba(15,23,42,0.055) !important;
}
.design-v2 table {
  border-collapse: separate;
  border-spacing: 0;
}
.design-v2 thead {
  background: #f8fafc !important;
}
.design-v2 th {
  color: #64748b;
  font-weight: 700;
  border-bottom: 1px solid #e5eaf2;
}
.design-v2 td {
  border-bottom: 1px solid #edf2f7;
}
.design-v2 tbody tr:hover {
  background: #f8fafc;
}
.design-v2 .row-need {
  background: #fff7ed;
}
.design-v2 .row-need:hover {
  background: #ffedd5;
}
.design-v2 #dataRange {
  color: #7c8798;
  line-height: 1.45;
}
.design-v2 .design-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}
.design-v2 .design-page-title h2 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  color: #172033;
}
.design-v2 .design-subtitle {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}
.design-v2 .metric-card {
  position: relative;
  overflow: hidden;
}
.design-v2 .rep-summary-card {
  border-radius: 8px;
  border: 1px solid #e5eaf2;
  background: #fff;
  padding: 16px 18px;
  box-shadow: 0 8px 22px rgba(15,23,42,0.055);
}
.design-v2 .rep-summary-card .value {
  margin-top: 7px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: #172033;
}
.design-v2 .rep-summary-card .hint {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}
.design-v2 #skuTable th,
.design-v2 #skuTable td {
  vertical-align: middle;
  white-space: nowrap;
}
.design-v2 #skuTable {
  min-width: 1160px;
}
.design-v2 #skuTable .sku-th-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1;
  width: 100%;
}
.design-v2 #skuTable .sku-sort-arrow {
  color: #64748b;
  font-size: 10px;
  transform: translateY(-1px);
}
.design-v2 #skuTable .sku-filter-btn {
  width: 20px;
  height: 20px;
  margin-left: 0;
  border-radius: 999px;
  padding: 3px;
}
.design-v2 #skuTable .sku-filter-th {
  white-space: nowrap;
}
.design-v2 #skuTable .sku-code-cell {
  width: 190px;
  min-width: 190px;
}
.design-v2 #skuTable .sku-name-cell {
  width: 340px;
  min-width: 340px;
  max-width: 340px;
}
.design-v2 #skuTable .sku-num-th,
.design-v2 #skuTable .sku-num-cell {
  text-align: center;
}
.design-v2 #skuTable .sku-num-cell {
  min-width: 90px;
}
.design-v2 #repTable th,
.design-v2 #repTable td {
  vertical-align: middle;
  white-space: nowrap;
}
.design-v2 #repTable {
  min-width: 1320px;
}
.design-v2 #repTable .rep-th-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1;
  width: 100%;
}
.design-v2 #repTable .rep-sort-arrow {
  color: #64748b;
  font-size: 10px;
  transform: translateY(-1px);
}
.design-v2 #repTable .rep-filter-btn {
  width: 20px;
  height: 20px;
  margin-left: 0;
  border-radius: 999px;
  padding: 3px;
}
.design-v2 #repTable .rep-filter-th {
  white-space: nowrap;
}
.design-v2 #repTable .rep-grade-th {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  white-space: nowrap;
}
.design-v2 #repTable .rep-grade-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1;
}
.design-v2 #repTable .rep-grade-filter {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  padding: 3px !important;
  margin: 0 !important;
  border: 1px solid #cbd5e1;
  border-radius: 999px !important;
  background: #fff;
  color: #94a3b8;
}
.design-v2 #repTable .rep-grade-filter svg {
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.design-v2 #repTable .rep-grade-filter:hover,
.design-v2 #repTable .rep-grade-filter.active {
  border-color: #6366f1;
  color: #6366f1;
}
.design-v2 #repTable .rep-sku-cell {
  width: 178px;
  min-width: 178px;
}
.design-v2 #repTable .rep-name-cell {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
}
.design-v2 #repTable [data-col="rep_confidence"] {
  width: 104px;
  min-width: 104px;
  text-align: center;
}
.design-v2 #repTable .rep-grade-cell {
  width: 104px;
  min-width: 104px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}
.design-v2 #repTable .rep-grade-cell > span {
  margin-left: auto;
  margin-right: auto;
}
