/* ==========================================================================
   dash.css · 驾驶舱风组件层
   核心：把统计数据组织成「彩点 + 圆角进度条 + 数值 + 占比」的列表形式
   依赖 tokens.css，不改变任何业务逻辑
   ========================================================================== */

/* ---------- 页头：大标题 + 副标题 + 右侧操作（参考驾驶舱页头） ---------- */
.dhead {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: 2px 2px 14px;
}
.dhead .dt { font-size: 22px; font-weight: 800; color: var(--c-navy); letter-spacing: -.01em; line-height: 1.2; }
.dhead .ds { font-size: 12px; color: var(--c-text-sub); margin-top: 4px; }
.dhead .da { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 铃铛（带未读红点） */
.dbell {
  width: 34px; height: 34px; border-radius: 50%; background: var(--glass-bg-2); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  box-shadow: var(--shadow-card); position: relative; cursor: pointer;
  color: var(--c-text-sub); border: none;
}
.dbell .dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--c-danger);
}

/* 蓝色 pill 主按钮 */
.dpill {
  background: linear-gradient(96deg, #3E7BFA, #5B93FF); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 9px 14px; border-radius: 18px;
  box-shadow: var(--shadow-brand); border: none; white-space: nowrap; cursor: pointer;
}
.dpill:active { transform: translateY(1px); }

/* ---------- 卡片 ---------- */
.dcard {
  background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-radius: var(--r-card);
  padding: 15px 15px 13px; margin-bottom: 11px; box-shadow: var(--shadow-card);
}
.dcard.flush { padding-bottom: 4px; }
.dhd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; gap: 8px; }
.dhd h3 { font-size: 14.5px; font-weight: 800; color: var(--c-navy); }
.dhd h3 .n { font-size: 12px; color: var(--c-text-faint); font-weight: 500; margin-left: 5px; }
.dhd .m { font-size: 11px; color: var(--c-text-faint); white-space: nowrap; }
.dsep { border-top: 1px solid var(--c-border); margin: 11px -15px 0; }

/* ---------- 数字阶梯 ---------- */
.dv32 { font-size: 31px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.dv26 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.dv16 { font-size: 15.5px; font-weight: 800; }
.dv14 { font-size: 13.5px; font-weight: 800; }
.dlbl { font-size: 11.5px; color: var(--c-text-sub); }
.dlbl2 { font-size: 10.5px; color: var(--c-text-faint); }
.c-blue { color: var(--c-teal) !important; }
.c-red { color: var(--c-danger) !important; }
.c-green { color: var(--c-success) !important; }
.c-navy { color: var(--c-navy) !important; }

/* ---------- 合并指标卡：并排双指标，窄屏自动上下分层 ---------- */
.dstat2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
}
.dstat2 .s { min-width: 0; padding: 2px 0; }
.dstat2 .s + .s { border-left: 1px solid var(--c-border); padding-left: 16px; }
.dstat2 .s .cap { font-size: 11.5px; color: var(--c-text-sub); }
.dstat2 .s .big {
  font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25;
  margin-top: 5px; font-family: var(--font-num); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dstat2 .s .sub { font-size: 10.5px; color: var(--c-text-faint); margin-top: 3px; }
/* 窄屏：改为上下分层，分隔线转横向 */
@media (max-width: 420px) {
  .dstat2 { grid-template-columns: 1fr; gap: 12px; }
  .dstat2 .s + .s {
    border-left: none; padding-left: 0;
    border-top: 1px solid var(--c-border); padding-top: 12px;
  }
}

/* ---------- 行内小编辑按钮（旅行名旁的 ✎） ---------- */
.tedit {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-2);
  color: var(--c-text-sub); font-size: 11px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.tedit:active { background: var(--c-mist); }

/* ---------- 等分列（带分隔线） ---------- */
.dcols { display: flex; text-align: left; }
.dcols .c { flex: 1; min-width: 0; }
.dcols .c + .c { border-left: 1px solid var(--c-border); padding-left: 12px; }
.dcols .c > .dv14, .dcols .c > .dv16 { margin-top: 3px; }

/* ---------- 蓝色小按钮（行内操作） ---------- */
.dbtn {
  display: inline-block; background: var(--c-teal); color: #fff;
  font-size: 12px; font-weight: 700; padding: 7px 13px; border-radius: 15px; border: none; cursor: pointer;
}
.dbtn.soft { background: var(--c-teal-soft); color: var(--c-teal-ink); }

/* ---------- 警示条（浅底红字，参考「高意向」高亮行） ---------- */
.dwarn {
  background: var(--c-danger-soft); border-radius: var(--r-card-sm);
  padding: 10px 12px; margin-bottom: 11px; display: flex; align-items: center; gap: 9px;
}
.dwarn .wi { font-size: 14px; flex-shrink: 0; }
.dwarn .wb { flex: 1; min-width: 0; }
.dwarn .wt { font-size: 12.5px; font-weight: 700; color: #E5484D; }
.dwarn .ws { font-size: 10.5px; color: #C98A8D; margin-top: 1px; }
.dwarn .wg { font-size: 12px; color: #E5484D; font-weight: 700; white-space: nowrap; }

/* 提示条（中性蓝） */
.dinfo {
  background: var(--c-teal-soft); border-radius: var(--r-card-sm);
  padding: 10px 12px; margin-bottom: 11px; display: flex; align-items: center; gap: 9px;
}
.dinfo .wb { flex: 1; min-width: 0; }
.dinfo .wt { font-size: 12.5px; font-weight: 700; color: var(--c-teal-ink); }
.dinfo .ws { font-size: 10.5px; color: #6B86C4; margin-top: 1px; }

/* ==========================================================================
   ★ 核心：数据占比列表（彩点 + 圆角进度条 + 数值 + 占比）
   参考驾驶舱「销售漏斗」层级，用于分类占比、成员分摊、转账构成等
   ========================================================================== */
.dbar { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.dbar + .dbar { border-top: 1px solid var(--c-border); }
.dbar .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dbar .nm {
  width: 40px; font-size: 12px; color: var(--c-text); font-weight: 600; flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dbar .tk { flex: 1; height: 7px; background: var(--c-track); border-radius: 4px; overflow: hidden; }
.dbar .tk i { display: block; height: 100%; border-radius: 4px; background: #4285F4; }
.dbar .tk i.zero { background: #D9DCE6; }
.dbar .vv {
  width: 54px; text-align: right; font-size: 12px; font-weight: 750;
  font-family: var(--font-num); font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.dbar .pp {
  width: 36px; text-align: right; font-size: 10.5px; color: var(--c-text-faint);
  font-family: var(--font-num); font-variant-numeric: tabular-nums; flex-shrink: 0;
}
/* 占比列表底部的口径说明 */
.dnote { font-size: 10.5px; color: var(--c-text-faint); margin-top: 9px; line-height: 1.6; }

/* ---------- 通用列表行（账单 / 成员 / 设置项共用） ---------- */
.drow { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.drow + .drow { border-top: 1px solid var(--c-border); }
.drow .ic {
  width: 36px; height: 36px; border-radius: 50%; background: var(--glass-bg-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.drow .ic.sq { border-radius: 10px; width: 32px; height: 32px; font-size: 14px; }
.drow .bd { flex: 1; min-width: 0; }
.drow .bd b { font-size: 13px; font-weight: 650; color: var(--c-navy); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow .bd span { font-size: 10.5px; color: var(--c-text-faint); }
.drow .am {
  font-size: 14.5px; font-weight: 750; flex-shrink: 0;
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
}
.drow .am.in { color: var(--c-success); }
.drow .chev { color: #C6CAD4; font-size: 13px; font-weight: 700; flex-shrink: 0; }

/* 圆头像（成员） */
.dav {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
}
.dav.lg { width: 42px; height: 42px; font-size: 16px; }

/* ---------- 标签 ---------- */
.dtg { display: inline-block; font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 9px; }
.dtg.blue { background: var(--c-teal-soft); color: var(--c-teal-ink); }
.dtg.red { background: var(--c-danger-soft); color: #D33A3F; }
.dtg.gray { background: var(--glass-bg-2); color: var(--c-text-sub); }
.dtg.orange { background: var(--c-amber-soft); color: #C07C08; }
.dtg.green { background: var(--c-success-soft); color: #1A8A4C; }

/* ---------- 模式切换（选中蓝底白字） ---------- */
.dtabs { display: flex; gap: 7px; margin-bottom: 11px; }
.dtabs .m {
  flex: 1; background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-radius: var(--r-card-sm);
  padding: 8px 6px; text-align: center; box-shadow: var(--shadow-card); cursor: pointer; border: none;
}
.dtabs .m .a { font-size: 12px; font-weight: 750; color: #6B7080; }
.dtabs .m .b { font-size: 9.5px; color: var(--c-text-faint); margin-top: 1px; }
.dtabs .m.on { background: var(--c-teal); box-shadow: var(--shadow-brand); }
.dtabs .m.on .a { color: #fff; }
.dtabs .m.on .b { color: rgba(255, 255, 255, .75); }

/* ---------- 转账方案行 ---------- */
.dtr { display: flex; align-items: center; gap: 8px; padding: 9px 0; }
.dtr + .dtr { border-top: 1px solid var(--c-border); }
.dtr .nm { font-size: 12.5px; font-weight: 650; color: var(--c-navy); }
.dtr .ar { color: var(--c-teal); font-weight: 800; font-size: 13px; }
.dtr .am {
  margin-left: auto; font-size: 14px; font-weight: 800;
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
}

/* ---------- 日期分组条 ---------- */
.ddate {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 2px 4px 0; margin-bottom: 4px;
}
.ddate .d { font-size: 11.5px; font-weight: 700; color: var(--c-text); }
.ddate .s {
  font-size: 11px; color: var(--c-text-faint);
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
}

/* ---------- 搜索框 ---------- */
.dsearch {
  background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-radius: var(--r-card-sm);
  padding: 9px 13px; margin-bottom: 11px; font-size: 12px; color: var(--c-text-faint);
  box-shadow: var(--shadow-card); display: flex; align-items: center; gap: 6px;
}

/* ---------- 悬浮记账按钮 ---------- */
.dfab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  width: 52px; height: 52px; border-radius: 50%; z-index: 550;
  background: linear-gradient(135deg, #3E7BFA, #5B93FF); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; font-weight: 700; box-shadow: 0 10px 22px rgba(62, 123, 250, .4); cursor: pointer;
}
@media (min-width: 700px) {
  .dfab { right: calc(50% - var(--max-w) / 2 + 20px); }
}

/* ---------- 开关 ---------- */
.dsw { width: 38px; height: 22px; border-radius: 11px; background: var(--c-teal); position: relative; flex-shrink: 0; cursor: pointer; border: none; }
.dsw i {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: right .2s;
}
.dsw.off { background: #DFE2EB; }
.dsw.off i { right: auto; left: 2px; }

/* ---------- 统计胶囊（页面底部更新时间等） ---------- */
.dfoot { text-align: center; font-size: 10.5px; color: var(--c-text-faint); padding: 4px 0 8px; }

/* ---------- 响应式 ---------- */
@media (min-width: 700px) {
  .dhead .dt { font-size: 24px; }
}
