html, body, #app { height: 100%; margin: 0; padding: 0; }

body {
  background: linear-gradient(160deg, #eef2f9 0%, #f5f7fb 55%, #eaf0f7 100%);
  color: #2c3e50;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 13px;
}

.page { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.qd-note {
  flex: none;
  font-size: 12px; color: #8a94a6;
  padding: 0 14px 6px;
}
.qd-note::before { content: '⚠ '; }

.no-login-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: #f5f7fa;
}

/* ============ 顶部 ============ */
.topbar {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(90deg, #183f7e 0%, #2a5aa8 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(20, 50, 100, .25);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand .logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.topbar .brand h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.topbar .brand .sub { font-size: 12px; opacity: .8; font-weight: 400; }
.topbar .user { font-size: 12px; opacity: .9; background: rgba(255,255,255,.14); padding: 4px 12px; border-radius: 14px; }

/* ============ 汇总卡片 ============ */
.summary-row {
  flex: none;
  display: grid; gap: 12px;
  grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  margin: 12px 14px 4px;
}
.sum-card {
  background: #fff; border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(30, 60, 114, .08);
  border: 1px solid #eef1f7;
  display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden;
}
.sum-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #2a5aa8, #3f8cff);
}
.sum-card.accent::before { background: linear-gradient(180deg, #c0392b, #e67e5a); }
.sum-card.other::before { background: linear-gradient(180deg, #b26a00, #e6a23c); }
.sum-card.other .v { color: #b26a00; }
.sum-card .k { font-size: 12px; color: #8a94a6; }
.sum-card .v { font-size: 22px; font-weight: 700; color: #183f7e; line-height: 1.1; }
.sum-card.accent .v { color: #c0392b; }
.sum-card .d { font-size: 12px; color: #a0a8b8; }

/* ============ 筛选区 ============ */
.filter {
  flex: none; margin: 8px 14px 4px; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(30, 60, 114, .06);
}
.filter .el-form-item { margin-bottom: 0; margin-right: 18px; }
.filter-nowrap { display: flex; flex-wrap: nowrap; align-items: center; overflow-x: auto; }
.filter .el-select, .filter .el-input { border-radius: 8px; }

/* ============ 卡片容器 ============ */
.list-card {
  margin: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 0 0 12px 12px; box-shadow: 0 2px 10px rgba(30, 60, 114, .06);
}
.table-wrap { flex: 1; overflow: hidden; min-height: 0; }
.account-pager {
  flex: none;
  display: flex; justify-content: flex-end; align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef1f7;
  background: #fbfcff;
}
.account-pager .el-pagination { --el-pagination-button-bg-color: #fff; }

/* ============ 表格 ============ */
.el-table {
  --el-table-header-bg-color: #f2f6fc;
  --el-table-header-text-color: #183f7e;
  --el-table-border-color: #eef1f7;
  --el-table-row-hover-bg-color: #f6faff;
  border-radius: 10px;
}
.el-table th.el-table__cell { font-weight: 700; letter-spacing: .3px; }

.num { font-family: "DIN Alternate", "Segoe UI", Arial, sans-serif; font-weight: 600; }
.self-num { color: #c0392b; }

/* 占比值标记：<20% 红色三角警示，≥20% 不追加标记 */
.ratio-pill {
  display: inline-block; font-weight: 700; font-size: 13px;
  font-family: "DIN Alternate", monospace; color: #183f7e;
}
.ratio-pill.bad { position: relative; padding-left: 14px; color: #c0392b; }
.ratio-pill.bad::before {
  content: "▲"; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: #c0392b; line-height: 1;
}

/* ============ 按钮 ============ */
.export-main { margin-left: 8px; background: linear-gradient(90deg, #1e3c72, #2a5aa8); color: #fff; border: none; }
.export-main:hover { background: linear-gradient(90deg, #2a4d93, #3f6fd0); color: #fff; }
.warn { color: #e6a23c; border-color: #ffe1b3; }

/* ============ 左右分栏 ============ */
.main-split {
  flex: 1; display: flex; gap: 12px; margin: 8px 14px 14px; min-height: 0;
  overflow-x: auto;
}
.split-left { flex: none; width: 570px; min-width: 570px; display: flex; flex-direction: column; min-height: 0; }
.split-right { flex: 1; min-width: 480px; display: flex; flex-direction: column; min-height: 0; }
.panel-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px 8px; font-weight: 700; color: #183f7e; font-size: 14px;
}
.panel-head .cnt { font-size: 12px; color: #8a94a6; font-weight: 500; }
.split-card { flex: 1; min-height: 0; border-radius: 12px; box-shadow: 0 2px 10px rgba(30,60,114,.06); display: flex; flex-direction: column; overflow: hidden; }
.split-card .el-card__body { padding: 0 !important; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.split-card .el-card__body .el-table { flex: 1; }
.list-card .el-card__body { padding: 0 !important; display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ============ 切片 ============ */
.slice-bar {
  flex: none; padding: 0 14px;
  background: #fff; border: 1px solid #eef1f7; border-radius: 12px 12px 0 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.menu-tabs { display: flex; align-items: flex-end; gap: 2px; }
.slice-tab {
  padding: 10px 18px; cursor: pointer; font-weight: 600; color: #5a6474;
  display: flex; align-items: center; gap: 6px; user-select: none;
  border-bottom: 2px solid transparent; transition: all .2s;
}
.slice-tab:hover { color: #183f7e; }
.slice-tab.active { color: #183f7e; border-bottom-color: #2a5aa8; }
.slice-tab.active.red { color: #c0392b; border-bottom-color: #c0392b; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.red { background: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.18); }
.slice-summary { font-size: 12px; color: #7a8494; }

.row-key { background: #fdf4f4 !important; }

/* ============ 未归属页 ============ */
.muted { color: #909399; font-size: 12px; }