/* ============================================================
   新收展管理平台 · 外壳 v5 皮肤（ns-shell-v1）
   深蓝信任底 + 科技青信号 + 圆角 16 + 等宽数字 + 统一动效
   作用于 React 外壳（sidebar / dashboard-main / kpi-card / table）
   ============================================================ */

/* ---------- 1. 设计令牌：主色由亮蓝收敛为深蓝，新增科技青 ---------- */
:root {
  --blue: #185FA5 !important;
  --blue-dark: #0C447C !important;
  --navy: #062E56 !important;
  --teal: #0FB5A5 !important;
  --teal-soft: #E6F7F5 !important;
  --surface: #F5F8FC !important;
  --line: #E3E9F1 !important;
  --ink: #0F1B2D !important;
  --muted: #6B7A90 !important;
}

/* ---------- 2. 主内容区：蓝调渐变底 ---------- */
.dashboard-main {
  background: linear-gradient(180deg, #E8F0F9 0%, #F5F8FC 340px, #F5F8FC 100%) !important;
  min-height: 100vh;
}

/* ---------- 3. 侧栏：深蓝渐变 + 青绿激活指示 ---------- */
.sidebar {
  width: 232px !important;
  padding: 20px 14px !important;
  background:
    radial-gradient(560px 240px at 10% -4%, rgba(47, 208, 191, .13), transparent 62%),
    linear-gradient(180deg, #062E56 0%, #0A2846 100%) !important;
  box-shadow: 1px 0 0 rgba(255, 255, 255, .05), 6px 0 26px rgba(6, 46, 86, .22) !important;
  backdrop-filter: none;
}
.dashboard-main {
  width: calc(100% - 232px) !important;
  margin-left: 232px !important;
}

/* 品牌区：青绿渐变徽标 */
.sidebar-brand {
  padding: 0 6px 20px !important;
  gap: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, .10) !important;
}
.sidebar-brand .brand-mark,
.sidebar-brand > i,
.sidebar-brand > span:first-child {
  background: linear-gradient(135deg, #2FD0BF, #9FF6EA) !important;
  color: #04263F !important;
  box-shadow: 0 3px 12px rgba(47, 208, 191, .40) !important;
}
.sidebar-brand strong {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
}
.sidebar-brand span {
  color: #7FA9D4 !important;
  letter-spacing: .20em !important;
}

/* 导航项：圆角 10 + 青绿左侧指示条 */
.sidebar nav a,
.sidebar nav button {
  height: 42px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  color: #B4CCE8 !important;
  font-size: 13px !important;
  gap: 11px !important;
  position: relative;
  transition: background .18s cubic-bezier(.2, .7, .3, 1), color .18s cubic-bezier(.2, .7, .3, 1) !important;
}
.sidebar nav a:hover,
.sidebar nav button:hover {
  background: rgba(255, 255, 255, .07) !important;
  color: #fff !important;
}
.sidebar nav a.active,
.sidebar nav button.active {
  background: rgba(255, 255, 255, .13) !important;
  background-image: linear-gradient(90deg, rgba(47, 208, 191, .18), rgba(47, 208, 191, .04)) !important;
  color: #fff !important;
  font-weight: 500 !important;
  box-shadow: inset 3px 0 0 #2FD0BF !important;
}
.sidebar-note span {
  color: #6FA3D6 !important;
}

/* ---------- 4. 页头：白卡 + 底部品牌渐变线 ---------- */
.dashboard-header {
  background: #fff !important;
  border-bottom: 0 !important;
  box-shadow: 0 1px 0 #E9EFF6, 0 6px 20px rgba(15, 32, 60, .05) !important;
  padding: 18px 24px !important;
  position: relative;
}
.dashboard-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, #0C447C 0%, #2E7BC4 46%, #2FD0BF 100%);
}
.dashboard-header h1,
.dashboard-header h2 {
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
  color: #0F1B2D !important;
}
.dashboard-header p {
  color: #0FB5A5 !important;
  letter-spacing: .22em !important;
  font-size: 9px !important;
}
.page-intro p,
.page-intro {
  color: #6B7A90 !important;
}

/* ---------- 5. KPI 卡：圆角 16 + 左侧信号条 + 悬浮上浮 ---------- */
.kpi-card {
  border-radius: 16px !important;
  border: 1px solid #E3E9F1 !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(11, 42, 77, .05) !important;
  transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s cubic-bezier(.2, .7, .3, 1) !important;
  padding: 16px 18px !important;
}
.kpi-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 24px rgba(11, 42, 77, .11) !important;
}
.kpi-card::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #185FA5, #2E7BC4);
}
.kpi-card:nth-of-type(2)::before { background: linear-gradient(180deg, #0E8A63, #1D9E75); }
.kpi-card:nth-of-type(3)::before { background: linear-gradient(180deg, #B93A3A, #E06A5C); }
.kpi-card:nth-of-type(4)::before { background: linear-gradient(180deg, #B45F06, #EFA93B); }
.kpi-card:nth-of-type(5)::before { background: linear-gradient(180deg, #6A4BC8, #9B7BE8); }
.kpi-card.primary::before { background: linear-gradient(180deg, #2FD0BF, #9FF6EA); }
.kpi-card > strong {
  font-size: 30px !important;
  font-weight: 600 !important;
  letter-spacing: -.02em !important;
  color: #0F1B2D !important;
  font-variant-numeric: tabular-nums;
}
.kpi-card.primary {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, .16), transparent 42%),
    linear-gradient(135deg, #0C447C 0%, #2E7BC4 100%) !important;
  box-shadow: 0 14px 32px rgba(12, 68, 124, .28) !important;
}
.kpi-card .kpi-title,
.kpi-title {
  font-size: 12px !important;
  color: #6B7A90 !important;
}
.kpi-card:not(.primary) .kpi-spark {
  background: #EEF4FB !important;
}

/* ---------- 6. 区块与面板标题 ---------- */
.panel-heading {
  padding: 16px 19px 0 !important;
}
.panel-heading div > span {
  color: #93A1B5 !important;
  letter-spacing: .16em !important;
  font-size: 9px !important;
}
.panel-heading > b {
  color: #185FA5 !important;
  font-size: 12.5px !important;
}
.section-heading h2 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #0F1B2D !important;
  letter-spacing: -.005em !important;
}
.section-heading p {
  color: #6B7A90 !important;
  font-size: 12px !important;
}

/* ---------- 7. 筛选与表单控件：圆角 + 青绿聚焦 ---------- */
.filter-bar input,
.filter-bar select,
.analysis-filter input,
.analysis-filter select,
.table-tools > input,
.metric-input {
  border-radius: 10px !important;
  border: 1px solid #E3E9F1 !important;
  background: #fff !important;
  color: #2E3E58 !important;
  transition: border-color .18s cubic-bezier(.2, .7, .3, 1), box-shadow .18s cubic-bezier(.2, .7, .3, 1) !important;
}
.filter-bar input:focus,
.filter-bar select:focus,
.analysis-filter input:focus,
.analysis-filter select:focus,
.table-tools > input:focus,
.metric-input:focus {
  border-color: #5EC8BE !important;
  box-shadow: 0 0 0 3px rgba(15, 181, 165, .16) !important;
  outline: none !important;
}

/* ---------- 8. 页签组：激活态深蓝实心（一眼可见） ---------- */
.status-tabs button.active,
.level-switch button.active {
  background: linear-gradient(135deg, #0C447C, #2E7BC4) !important;
  color: #fff !important;
  font-weight: 500 !important;
  border-radius: 9px !important;
  box-shadow: 0 4px 12px rgba(12, 68, 124, .24) !important;
}
.status-tabs,
.level-switch {
  background: #EEF3FA !important;
  border-radius: 11px !important;
  padding: 3px !important;
}
.status-tabs button,
.level-switch button {
  border-radius: 9px !important;
  color: #6B7A90 !important;
  transition: all .18s cubic-bezier(.2, .7, .3, 1) !important;
}

/* ---------- 9. 表格：浅蓝表头 + 行悬浮 + 等宽数字 ---------- */
.table-scroll {
  border-radius: 14px !important;
  border: 1px solid #E9EFF6 !important;
  background: #fff !important;
}
table {
  font-variant-numeric: tabular-nums;
}
table thead th {
  background: #F7FAFE !important;
  border-bottom: 1px solid #E3E9F1 !important;
  color: #6B7A90 !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  letter-spacing: .03em !important;
  padding: 11px 12px !important;
}
table tbody td {
  padding: 10px 12px !important;
  border-bottom: 1px solid #F1F5F9 !important;
}
table tbody tr {
  transition: background .15s cubic-bezier(.2, .7, .3, 1) !important;
}
table tbody tr:hover {
  background: #F2F8FE !important;
}

/* ---------- 10. 操作按钮：深蓝渐变主操作 ---------- */
.table-action,
.level-overview-grid button {
  background: linear-gradient(135deg, #0C447C, #2E7BC4) !important;
  border: 0 !important;
  color: #fff !important;
  border-radius: 9px !important;
  padding: 7px 13px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  box-shadow: 0 3px 10px rgba(12, 68, 124, .22) !important;
  transition: transform .18s cubic-bezier(.2, .7, .3, 1), box-shadow .18s cubic-bezier(.2, .7, .3, 1) !important;
}
.table-action:hover,
.level-overview-grid button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(12, 68, 124, .30) !important;
}

/* ---------- 11. 全站数字等宽 + 统一动效曲线 ---------- */
.dashboard-main * {
  font-variant-numeric: tabular-nums;
}
.dashboard-main a,
.dashboard-main button {
  transition: background .18s cubic-bezier(.2, .7, .3, 1), color .18s cubic-bezier(.2, .7, .3, 1),
             transform .18s cubic-bezier(.2, .7, .3, 1), box-shadow .18s cubic-bezier(.2, .7, .3, 1);
}
.dashboard-main :focus-visible {
  outline: 2px solid #0FB5A5 !important;
  outline-offset: 2px !important;
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1180px) {
  .sidebar { width: 68px !important; padding: 18px 10px !important; }
  .dashboard-main { width: calc(100% - 68px) !important; margin-left: 68px !important; }
  .sidebar-brand span, .sidebar nav a span, .sidebar nav button span { display: none !important; }
}
