:root {
  --apple-canvas: #f5f5f7;
  --apple-card: #ffffff;
  --apple-glass: rgba(255, 255, 255, 0.78);
  --apple-hairline: rgba(0, 0, 0, 0.06);
  --apple-hairline-strong: rgba(0, 0, 0, 0.1);
  --apple-ink: #111827;
  --apple-sub: #374151;
  --apple-muted: #4b5563;
  --apple-tertiary: #6b7280;
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-blue-soft: rgba(0, 113, 227, 0.1);
  --apple-red: #ff3b30;
  --apple-orange: #ff9500;
  --apple-green: #28a745;
  --apple-purple: #af52de;
  --radius-card: 16px;
  --radius-sub: 12px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.035), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "HarmonyOS Sans SC", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--apple-canvas);
  color: var(--apple-ink);
  font-size: 12.5px;
  line-height: 1.48;
  text-rendering: optimizeLegibility;
}

button, input, select {
  font: inherit;
}

.num, .kpi-num, .tk-val, .rd-big, .st-cell strong, .ra-num {
  font-family: "HarmonyOS Sans SC", "Inter", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* 左侧 macOS / iPadOS 毛玻璃侧边栏 */
.sidebar {
  width: 168px;
  flex-shrink: 0;
  background: rgba(251, 251, 253, 0.86);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-right: 1px solid var(--apple-hairline);
  padding: 20px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 13px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--apple-sub);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.18s ease, transform 0.12s ease;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.045);
  color: var(--apple-ink);
}

.nav-item.active {
  background: var(--apple-blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 113, 227, 0.28);
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.88;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

/* 主区域 */
.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 顶部 Apple 风格毛玻璃导航条 */
.topbar {
  background: var(--apple-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--apple-hairline);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--apple-ink);
  letter-spacing: -0.025em;
}

.update-time {
  font-size: 12px;
  color: var(--apple-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Apple 胶囊按钮体系 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 31px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.16s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn svg {
  width: 13.5px;
  height: 13.5px;
}

.btn-sm {
  height: 29px;
  padding: 0 13px;
  font-size: 12px;
}

.btn-xs {
  height: 26px;
  padding: 0 11px;
  font-size: 11.5px;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--apple-hairline-strong);
  color: var(--apple-ink);
}

.btn-outline:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.18);
}

.btn-light {
  background: rgba(118, 118, 128, 0.1);
  border-color: transparent;
  color: var(--apple-ink);
}

.btn-light:hover {
  background: rgba(118, 118, 128, 0.16);
}

.btn-outline-blue {
  background: var(--apple-blue-soft);
  border-color: transparent;
  color: var(--apple-blue);
  font-weight: 600;
}

.btn-outline-blue:hover {
  background: rgba(0, 113, 227, 0.16);
}

.btn-primary {
  background: var(--apple-blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.btn-primary:hover {
  background: var(--apple-blue-hover);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.32);
}

/* 筛选条（iOS 轻量毛玻璃吸顶冻结） */
.filter-bar {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--apple-hairline);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: var(--topbar-h, 55px);
  z-index: 19;
}

.filter-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-item label {
  font-size: 12px;
  color: var(--apple-muted);
  white-space: nowrap;
}

.filter-item select {
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--apple-hairline-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--apple-ink);
  font-size: 12px;
  min-width: 82px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-item select:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.filter-search {
  position: relative;
  flex: 1;
  min-width: 130px;
  max-width: 185px;
}

.filter-search svg, .inline-search svg {
  width: 13.5px;
  height: 13.5px;
  color: var(--apple-tertiary);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.filter-search input, .inline-search input {
  width: 100%;
  height: 29px;
  padding: 0 12px 0 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.1);
  color: var(--apple-ink);
  font-size: 12px;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-search input:focus, .inline-search input:focus {
  background: #ffffff;
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

/* 主内容区 */
.workspace {
  padding: 14px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--apple-card);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
  min-width: 0;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.panel {
  padding: 14px 16px 15px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--apple-ink);
  letter-spacing: -0.02em;
}

/* Row 1: 8 张 Apple 风格 Bento KPI 卡 */
.kpi-grid-8 {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--apple-hairline);
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: transform 0.18s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.18s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.kpi-top {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.kpi-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.kpi-svg.blue { color: var(--apple-blue); }
.kpi-svg.red { color: var(--apple-red); }

.kpi-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--apple-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-num {
  font-size: 21px;
  font-weight: 700;
  color: var(--apple-ink);
  line-height: 1.2;
  margin-top: 3px;
}

.kpi-sub {
  font-size: 11px;
  color: var(--apple-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.kpi-action {
  margin-top: 4px;
  border: none;
  background: none;
  color: var(--apple-blue);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.kpi-action:hover {
  text-decoration: underline;
}

/* Row 2: 库存健康总览 + 销量与预测趋势 */
.row-2-grid {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 12px;
}

.inv-grid {
  display: grid;
  grid-template-columns: 146px 1fr 168px;
  gap: 12px;
  align-items: center;
}

.donut-wrap {
  width: 146px;
  height: 146px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-table {
  font-size: 12px;
}

.inv-table-head {
  display: grid;
  grid-template-columns: 116px 1fr 44px;
  padding: 0 4px 6px;
  border-bottom: 1px solid var(--apple-hairline);
  color: var(--apple-muted);
  font-weight: 600;
  font-size: 11.5px;
}

.inv-row {
  display: grid;
  grid-template-columns: 116px 1fr 44px;
  align-items: center;
  padding: 3.5px 4px;
}

.inv-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--apple-sub);
  white-space: nowrap;
}

.inv-sq {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.inv-right-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-summary-box {
  background: var(--apple-canvas);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.inv-sum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--apple-muted);
}

.inv-sum-row strong {
  font-size: 13.5px;
  color: var(--apple-ink);
}

.q-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: var(--apple-muted);
  font-style: normal;
  font-size: 9.5px;
  cursor: help;
}

.inv-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* 销量与预测趋势 */
.trend-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 11.5px;
  color: var(--apple-muted);
  margin-top: -4px;
  margin-bottom: 4px;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leg-line-solid {
  width: 16px;
  height: 2px;
  background: var(--apple-blue);
  border-radius: 2px;
  display: inline-block;
}

.leg-line-dash {
  width: 16px;
  height: 0;
  border-top: 2px dashed var(--apple-blue);
  display: inline-block;
}

.leg-band {
  width: 14px;
  height: 9px;
  border-radius: 3px;
  background: rgba(175, 82, 222, 0.2);
  display: inline-block;
}

.trend-svg-box {
  height: 114px;
  width: 100%;
}

.trend-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.tk-box {
  background: var(--apple-canvas);
  border-radius: 12px;
  padding: 8px 11px;
}

.tk-label {
  font-size: 11px;
  color: var(--apple-muted);
}

.tk-val {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--apple-ink);
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.tk-delta {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--apple-green);
}

/* Row 3: 断货风险分布 + 风险提醒（4类） */
.row-3-grid {
  display: grid;
  grid-template-columns: 0.85fr 2.15fr;
  gap: 12px;
}

.risk-head-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.risk-head-sub {
  font-size: 12px;
  color: var(--apple-muted);
}

.risk-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.ra-card {
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.16s ease;
}

.ra-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.ra-red { background: linear-gradient(145deg, #fff2f2 0%, #ffe8e8 100%); }
.ra-orange { background: linear-gradient(145deg, #fff6eb 0%, #ffeed9 100%); }
.ra-blue { background: linear-gradient(145deg, #eff6ff 0%, #e4f0ff 100%); }
.ra-purple { background: linear-gradient(145deg, #f6f0ff 0%, #eee4ff 100%); }

.ra-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ra-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ra-red .ra-icon { color: #ff3b30; }
.ra-orange .ra-icon { color: #ff9500; }
.ra-blue .ra-icon { color: #0071e3; }
.ra-purple .ra-icon { color: #af52de; }

.ra-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--apple-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ra-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ra-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.08;
}

.ra-num small {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--apple-sub);
}

.ra-red .ra-num { color: #ff3b30; }
.ra-orange .ra-num { color: #e87a00; }
.ra-blue .ra-num { color: #0071e3; }
.ra-purple .ra-num { color: #9b3fd1; }

.ra-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--apple-muted);
}

.ra-red .ra-arrow { color: #ff3b30; }

.risk-dist-body {
  display: grid;
  grid-template-columns: 1fr 106px;
  gap: 10px;
  align-items: center;
}

.risk-bar-svg {
  height: 112px;
  width: 100%;
}

.risk-dist-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 1px solid var(--apple-hairline);
  padding-left: 12px;
}

.rd-label {
  font-size: 11px;
  color: var(--apple-muted);
}

.rd-big {
  font-size: 17px;
  font-weight: 700;
  color: var(--apple-ink);
  line-height: 1.25;
}

.text-red { color: var(--apple-red) !important; }

/* Row 4: 待补货产品清单（优先处理 · 父体维度） + 重点待处理事项 */
.row-4-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.todo-table th, .todo-table td {
  padding: 8px 4px;
  font-size: 11.5px;
}

.priority-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.priority-head-left, .priority-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* iOS Segmented Control */
.utabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(118, 118, 128, 0.12);
  padding: 3px;
  border-radius: 999px;
}

.utab {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--apple-sub);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.16s ease;
}

.utab.active {
  background: #ffffff;
  color: var(--apple-ink);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.ucnt {
  font-size: 10.5px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--apple-sub);
}

.ucnt-red { background: rgba(255, 59, 48, 0.14); color: #ff3b30; }
.ucnt-orange { background: rgba(255, 149, 0, 0.16); color: #d97706; }
.ucnt-blue { background: rgba(0, 113, 227, 0.13); color: #0071e3; }
.ucnt-purple { background: rgba(175, 82, 222, 0.14); color: #9b3fd1; }
.ucnt-gray { background: rgba(0, 0, 0, 0.07); color: var(--apple-muted); }

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

.priority-table th.num, .priority-table td.num {
  text-align: right;
}

/* Tables（Apple 极简细分割线） */
.mini-table, .product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mini-table th, .product-table th {
  background: transparent;
  color: var(--apple-muted);
  font-weight: 600;
  font-size: 11.5px;
  text-align: left;
  padding: 8px 7px;
  border-bottom: 1px solid var(--apple-hairline-strong);
  white-space: nowrap;
}

.product-table th.num, .product-table td.num {
  text-align: right;
}

.mini-table td, .product-table td {
  padding: 8.5px 7px;
  border-bottom: 1px solid var(--apple-hairline);
  white-space: nowrap;
  color: var(--apple-ink);
}

.mini-table tbody tr:last-child td,
.product-table tbody tr:last-child td {
  border-bottom: none;
}

.mini-table tbody tr:hover, .product-table tbody tr:hover {
  background: rgba(0, 113, 227, 0.03);
}

/* iOS Badges */
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.pill-red { background: rgba(255, 59, 48, 0.12); color: #e02d22; }
.pill-dark-red { background: #ff3b30; color: #ffffff; }
.pill-orange { background: rgba(255, 149, 0, 0.15); color: #c96a00; }
.pill-yellow { background: rgba(255, 204, 0, 0.22); color: #9a6700; }
.pill-green { background: rgba(52, 199, 89, 0.15); color: #1f8a3d; }
.pill-blue { background: rgba(0, 113, 227, 0.12); color: #0071e3; }
.pill-purple { background: rgba(175, 82, 222, 0.13); color: #9b3fd1; }
.pill-gray { background: rgba(118, 118, 128, 0.12); color: var(--apple-muted); }

.td-danger-cell {
  color: #e02d22;
  font-weight: 600;
}

.eval-danger { color: #e02d22; font-weight: 600; }
.eval-warn { color: #c96a00; font-weight: 600; }
.eval-ok { color: #1f8a3d; font-weight: 600; }

/* 父体行内展开子变体样式 */
.tree-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  background: rgba(0, 113, 227, 0.07);
  color: #0071e3;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.tree-toggle:hover { background: rgba(0, 113, 227, 0.14); }
.child-variant-row td {
  background: #f8fafc !important;
  font-size: 11.5px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}
.child-indent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-left: 10px;
  color: #4b5563;
}
.child-indent::before {
  content: "└";
  color: #9ca3af;
}

.btn-tiny-blue {
  background: var(--apple-blue);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.btn-tiny-blue:hover {
  background: var(--apple-blue-hover);
}

.link-sm {
  background: none;
  border: none;
  color: var(--apple-blue);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  margin-left: 5px;
}

.link-sm:hover { text-decoration: underline; }

/* Row 5 Toolbar & Footer */
.table-head-row {
  margin-bottom: 10px;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-search {
  position: relative;
  width: 185px;
}

.icon-btn {
  width: 29px;
  height: 29px;
  border: 1px solid var(--apple-hairline-strong);
  background: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--apple-sub);
}

.icon-btn svg { width: 13.5px; height: 13.5px; }

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

.col-chk { width: 26px; text-align: center; }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--apple-hairline);
  font-size: 12px;
  color: var(--apple-muted);
}

.tf-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-size-sel {
  height: 24px;
  border: 1px solid var(--apple-hairline-strong);
  border-radius: 7px;
  padding: 0 6px;
  font-size: 11.5px;
  background: #ffffff;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 4px;
}

.pg-btn {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: none;
  background: rgba(118, 118, 128, 0.1);
  border-radius: 7px;
  font-size: 11.5px;
  cursor: pointer;
  color: var(--apple-ink);
}

.pg-btn.active {
  background: var(--apple-blue);
  color: #ffffff;
  font-weight: 600;
}

.jump-inp {
  width: 38px;
  height: 24px;
  border: 1px solid var(--apple-hairline-strong);
  border-radius: 7px;
  text-align: center;
  font-size: 11.5px;
}

.toast-box {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: rgba(29, 29, 31, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* 右侧 Apple 风格补货决策抽屉 */
.hidden { display: none !important; }

.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 80;
}

.plan-drawer {
  position: fixed;
  top: 14px;
  right: 16px;
  bottom: 14px;
  width: min(1320px, calc(100vw - 32px));
  background: rgba(247, 248, 250, 0.98);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.16);
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-top {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--apple-hairline);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
}

.drawer-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-blue);
  letter-spacing: 0.02em;
}

.drawer-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--apple-ink);
  margin-top: 2px;
}

.drawer-sub {
  font-size: 12px;
  color: var(--apple-muted);
  margin-top: 3px;
}

.drawer-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.12);
  color: var(--apple-ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.drawer-close:hover { background: rgba(118, 118, 128, 0.22); }

.drawer-sku-bar {
  padding: 8px 20px;
  border-bottom: 1px solid var(--apple-hairline);
  background: var(--apple-canvas);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.sku-chip {
  border: 1px solid var(--apple-hairline-strong);
  background: #ffffff;
  color: var(--apple-sub);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.sku-chip.active {
  background: var(--apple-blue);
  border-color: var(--apple-blue);
  color: #ffffff;
  font-weight: 600;
}

.drawer-body {
  flex: 1;
  min-height: 0;
  padding: 16px 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.d-hero {
  background: linear-gradient(135deg, #0071e3 0%, #1d8cf8 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.22);
}

.d-hero.urgent {
  background: linear-gradient(135deg, #e02d22 0%, #ff5e3a 100%);
  box-shadow: 0 6px 18px rgba(224, 45, 34, 0.22);
}

.d-hero-label { font-size: 11.5px; opacity: 0.88; }
.d-hero-qty { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.d-hero-reason { font-size: 11.5px; opacity: 0.92; margin-top: 6px; line-height: 1.45; }
.d-hero-dates {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  padding-left: 14px;
  font-size: 12px;
}

.d-hero-dates div { display: flex; justify-content: space-between; gap: 8px; }
.d-hero-dates strong { font-weight: 700; }

.d-sec {
  background: #ffffff;
  border: 1px solid var(--apple-hairline);
  border-radius: 14px;
  padding: 13px 15px;
}

.d-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--apple-ink);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.d-kv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.d-kv {
  background: var(--apple-canvas);
  border-radius: 10px;
  padding: 8px 10px;
}

.d-kv span { display: block; font-size: 11px; color: var(--apple-muted); }
.d-kv strong { display: block; font-size: 14px; font-weight: 700; color: var(--apple-ink); margin-top: 2px; }

.d-alert-item {
  padding: 8px 11px;
  border-radius: 10px;
  background: #fff5f5;
  border: 1px solid rgba(255, 59, 48, 0.16);
  color: #b91c1c;
  font-size: 12px;
  margin-bottom: 6px;
}

.d-alert-item.info {
  background: #eff6ff;
  border-color: rgba(0, 113, 227, 0.16);
  color: #1d4ed8;
}

.d-m12-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px;
  align-items: end;
  height: 92px;
  padding-top: 12px;
}

.d-m12-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  justify-content: flex-end;
}

.d-m12-bar {
  width: 100%;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #0071e3 0%, #60a5fa 100%);
  min-height: 4px;
}

.d-m12-val { font-size: 9.5px; color: var(--apple-sub); }
.d-m12-mon { font-size: 9.5px; color: var(--apple-muted); }

/* 宽版 AI 备货决策（1:1 复刻原项目 5卡 + 180天曲线 + 全链路库存结构） */
.ai-kpi-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ai-kcard {
  background: #ffffff;
  border: 1px solid var(--apple-hairline);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-kcard.tint-blue { background: #f3f8ff; border-color: #dbeafe; }
.ai-kcard.tint-yellow { background: #fffbeb; border-color: #fde68a; }
.ai-kcard.tint-green { background: #ecfdf5; border-color: #bbf7d0; }

.ai-ktitle { font-size: 11.5px; font-weight: 600; color: var(--apple-sub); }
.ai-kbig { font-size: 20px; font-weight: 700; color: var(--apple-ink); font-variant-numeric: tabular-nums; margin: 2px 0; }
.ai-kline { font-size: 11.5px; color: var(--apple-muted); line-height: 1.5; }
.ai-kline strong { color: var(--apple-ink); }
.ai-kbadge-red {
  display: inline-block;
  align-self: flex-start;
  background: rgba(255, 59, 48, 0.12);
  color: #dc2626;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.ai-guard-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-guard-pill {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 500;
}

.ai-main-2col {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 12px;
}

.ai-horizon-tabs {
  display: inline-flex;
  background: rgba(118, 118, 128, 0.12);
  padding: 2px;
  border-radius: 999px;
  gap: 2px;
}

.ai-htab {
  border: none;
  background: transparent;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-sub);
  cursor: pointer;
}

.ai-htab.active {
  background: #0f172a;
  color: #ffffff;
}

.ai-curve-wrap {
  width: 100%;
  height: 245px;
  margin-top: 6px;
}

.ai-curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--apple-muted);
  margin-top: 4px;
}

.ai-curve-note {
  margin-top: 8px;
  background: #f3f8ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: #1e3a8a;
  line-height: 1.5;
}

.ai-inv-top2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-inv-box {
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
}

.ai-inv-box.valid { background: #eff6ff; border: 1px solid #bfdbfe; }
.ai-inv-box.verify { background: #fffbeb; border: 1px solid #fde68a; }
.ai-inv-box span { display: block; font-size: 11px; color: var(--apple-sub); }
.ai-inv-box strong { display: block; font-size: 18px; font-weight: 700; margin-top: 2px; }
.ai-inv-box.valid strong { color: #0071e3; }
.ai-inv-box.verify strong { color: #b45309; }

.ai-stack-bar {
  display: flex;
  height: 18px;
  border-radius: 6px;
  overflow: hidden;
  background: #e5e7eb;
  margin-bottom: 10px;
}

.ai-stack-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
}

.ai-inv-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
}

.ai-inv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 2px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.ai-inv-item:last-child { border-bottom: none; }
.ai-inv-l { display: flex; align-items: center; gap: 6px; color: var(--apple-sub); }
.ai-inv-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

.ai-arr-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-arr-card {
  background: #f3f8ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 120px;
}

.ai-arr-card strong { display: block; font-size: 14px; color: #0071e3; }
.ai-arr-card span { display: block; font-size: 11px; color: var(--apple-muted); }


/* Row 2 Left: 各小组备货健康排名（竖向苹果风柱状图） */
.group-rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.gb-chart-area {
  position: relative;
  padding: 6px 8px 4px 30px;
}
.gb-gridlines {
  position: absolute;
  inset: 14px 8px 48px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.gb-gridlines span {
  position: relative;
  display: block;
  font-size: 9.5px;
  color: #9ca3af;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.gb-gridlines span::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 0;
  top: 50%;
  border-top: 1px dashed #edf1f7;
}
.gb-cols {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: end;
}
.gb-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 6px 8px;
  border-radius: 14px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}
.gb-col:hover {
  background: rgba(0, 113, 227, 0.04);
  transform: translateY(-1px);
}
.gb-col.is-low:hover {
  background: rgba(239, 68, 68, 0.045);
}
.gb-col.is-active {
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.45);
}
.gb-bar-stage {
  width: 100%;
  height: 148px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1px;
}
.gb-bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  transition: height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.gb-top-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.gb-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
}
.gb-badge.is-top {
  background: #dcfce7;
  color: #15803d;
}
.gb-badge.is-low {
  background: #fee2e2;
  color: #dc2626;
}
.gb-rank-tag {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
}
.gb-score {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.gb-score small {
  font-size: 10px;
  font-weight: 500;
  color: #6b7280;
  margin-left: 1px;
}
.gb-bar {
  width: 40px;
  flex: 1;
  min-height: 22px;
  border-radius: 10px 10px 4px 4px;
  transition: filter 0.16s ease, transform 0.16s ease;
}
.gb-col:hover .gb-bar {
  filter: brightness(1.05);
}
.gb-bar.is-top {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.24);
}
.gb-bar.is-mid {
  background: linear-gradient(180deg, #60a5fa 0%, #0071e3 100%);
  box-shadow: 0 6px 14px rgba(0, 113, 227, 0.2);
}
.gb-bar.is-low {
  background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
  box-shadow: 0 6px 14px rgba(225, 29, 72, 0.24);
}
.gb-foot {
  margin-top: 8px;
  text-align: center;
}
.gb-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.gb-sub {
  margin-top: 2px;
  font-size: 10.5px;
  color: #6b7280;
  white-space: nowrap;
}
.gb-sub b {
  color: #374151;
  font-weight: 600;
}
.gb-delta.up { color: #059669; font-weight: 600; }
.gb-delta.down { color: #dc2626; font-weight: 600; }

.gb-assist-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, #fff5f5 0%, #ffffff 100%);
  border: 1px solid rgba(239, 68, 68, 0.16);
}
.gb-assist-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #374151;
  min-width: 0;
  flex-wrap: wrap;
}
.gb-assist-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
  flex-shrink: 0;
}
.gb-assist-meta {
  font-size: 11px;
  color: #6b7280;
}
.gb-assist-btn {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 72, 0.25);
  background: #ffffff;
  color: #e11d48;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.gb-assist-btn:hover {
  background: #e11d48;
  color: #ffffff;
}


/* 子体销量占比列 */
.share-parent-tag {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
}
.share-pending {
  font-size: 11px;
  color: #9ca3af;
}
.share-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.share-pct {
  font-size: 11.5px;
  font-weight: 600;
  color: #111827;
  min-width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.share-bar {
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  flex-shrink: 0;
}
.share-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa 0%, #0071e3 100%);
}


/* 销量与预测趋势：独立搜索与周期切换 */
.trend-head-wrap {
  flex-wrap: wrap;
  gap: 8px;
}
.trend-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trend-scope-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #0071e3;
  font-size: 11px;
  font-weight: 600;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trend-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.trend-search {
  width: 142px;
  height: 26px;
}
.trend-search input {
  font-size: 11px;
}


/* 销量与预测趋势：宽裕布局 + 可搜索子体下拉框 */
.trend-panel {
  display: flex;
  flex-direction: column;
}
.trend-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.trend-subbar .trend-legend {
  margin-bottom: 0;
}
.trend-combo {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 240px;
  max-width: 390px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.trend-combo:focus-within {
  background: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}
.trend-combo .tc-ico {
  width: 13px;
  height: 13px;
  color: #6b7280;
  flex-shrink: 0;
  margin-right: 6px;
}
.trend-combo input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: #111827;
  font-family: inherit;
}
.trend-combo .tc-clear {
  border: none;
  background: #e5e7eb;
  color: #4b5563;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.trend-combo .tc-clear:hover {
  background: #d1d5db;
  color: #111827;
}
.trend-combo .tc-chev {
  font-size: 11px;
  color: #6b7280;
  pointer-events: none;
}
.trend-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 270px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  z-index: 40;
  padding: 5px;
}
.td-item {
  padding: 7px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.td-item:hover {
  background: #f3f6fb;
}
.td-item.is-sel {
  background: #eff6ff;
}
.td-main {
  font-size: 12px;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.td-asin {
  font-weight: 700;
  color: #0071e3;
}
.td-name {
  color: #1f2937;
}
.td-sub {
  margin-top: 2px;
  font-size: 10.5px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.td-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}
.trend-panel .trend-svg-box {
  height: 156px;
  flex: 1;
  min-height: 148px;
}
.trend-panel .trend-kpis {
  margin-top: 12px;
}
.trend-panel .tk-box {
  padding: 11px 13px;
}


/* 船期排发总览条与表格船期列 */
.sailing-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.055);
  flex-wrap: wrap;
}
.sailing-strip-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
}
.sailing-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
}
.sailing-rule {
  font-size: 10.5px;
  color: #6b7280;
}
.sailing-cards {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}
.sail-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.sail-card:hover {
  border-color: rgba(0, 113, 227, 0.35);
  background: #f5f9ff;
}
.sail-card.is-active {
  border-color: #0071e3;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.14);
}
.sail-c-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #111827;
}
.sail-c-top small {
  font-size: 10px;
  color: #6b7280;
}
.sail-c-val {
  font-size: 11px;
  color: #4b5563;
}
.sail-c-val b {
  color: #0071e3;
  font-weight: 700;
}
.sail-th {
  background: #f8fafc;
}
.sail-th.is-sail-active,
.sail-td.is-sail-active {
  background: rgba(0, 113, 227, 0.06) !important;
}
.sail-qty {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #0071e3;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sail-qty.is-child {
  background: #e0f2fe;
  color: #0369a1;
}
.sail-zero {
  color: #d1d5db;
  font-size: 11px;
}


/* 表格头部「展开全部 / 收起至前10条」按钮 */
.head-expand-slot {
  display: inline-flex;
  align-items: center;
}
.btn-expand-all {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 113, 227, 0.24);
  background: #f5f9ff;
  color: #0071e3;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-expand-all:hover {
  background: #0071e3;
  color: #ffffff;
  border-color: #0071e3;
}


/* Row 2 左卡：充分利用整卡高度 + 柱状图平滑升起动画 */
.rank-panel {
  display: flex;
  flex-direction: column;
}
.rank-panel .group-rank-list {
  flex: 1;
  justify-content: space-between;
}
.rank-panel .gb-chart-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 10px;
}
.rank-panel .gb-bar-stage {
  height: 186px;
}
.rank-panel .gb-bar {
  width: 44px;
  transform-origin: bottom center;
  animation: gbBarRise 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes gbBarRise {
  from { transform: scaleY(0.15); opacity: 0.4; }
  to { transform: scaleY(1); opacity: 1; }
}
.gb-sub2 {
  margin-top: 2px;
  font-size: 10px;
  color: #9ca3af;
}
.gb-sub2 b {
  color: #4b5563;
  font-weight: 600;
}
.rank-panel .gb-assist-bar {
  margin-top: auto;
  padding: 10px 13px;
}

/* Row 2 右卡：趋势折线入场绘制动画 + 鼠标悬停准星与毛玻璃浮窗 */
.trend-interactive-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}
.tr-line-draw {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: trDrawLine 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.tr-line-fcst {
  opacity: 0;
  animation: trFadeIn 0.45s ease 0.25s forwards;
}
.tr-area-anim {
  opacity: 0;
  animation: trFadeIn 0.6s ease 0.15s forwards;
}
@keyframes trDrawLine {
  to { stroke-dashoffset: 0; }
}
@keyframes trFadeIn {
  to { opacity: 1; }
}
.trend-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: none;
  min-width: 128px;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 20;
  transition: left 0.08s ease-out, top 0.08s ease-out;
}
.trend-tooltip .tt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: #6b7280;
}
.trend-tooltip .tt-head em {
  font-style: normal;
  font-weight: 600;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eff6ff;
  color: #0071e3;
}
.trend-tooltip .tt-head em.is-fcst {
  background: #f3e8ff;
  color: #7c3aed;
}
.trend-tooltip .tt-val {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
}
.trend-tooltip .tt-val small {
  font-size: 10px;
  font-weight: 500;
  color: #6b7280;
}
.trend-tooltip .tt-sub {
  margin-top: 2px;
  font-size: 10px;
  color: #6b7280;
}
.trend-tooltip .tt-sub b.up { color: #059669; }
.trend-tooltip .tt-sub b.down { color: #dc2626; }


.user-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
}
