/* ==========================================================
   英伦出行原型 · Web 后台组件库（管理端 A 专用）
   Ant Design 视觉规范 · 1440 栅格 · App Shell 冻结版：
   body[data-shell=web] > aside.app-nav + main.app-main
   ========================================================== */

body.web {
  margin: 0; min-height: 100vh;
  background: var(--web-bg); color: var(--web-text);
  font-family: var(--web-font); font-size: 14px;
  display: block; padding: 0;
}

/* ---------- App Shell：固定侧边栏 + 内容区（所有 Web 页面逐字一致） ---------- */
.app-nav {
  position: fixed; inset: 0 auto 0 0; width: 220px; z-index: 100;
  background: var(--web-sidebar-bg); color: #CBD5E1;
  display: flex; flex-direction: column;
}
.app-nav .brand {
  display: flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 18px; color: #fff; font-size: 15px; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.08); flex: none;
}
.app-nav .brand .logo {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800;
}
.app-nav .nav-group { padding: 14px 10px; overflow-y: visible; }
.app-nav .nav-caption {
  font-size: 11px; color: #64748B; padding: 10px 10px 6px; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; border-radius: 6px;
}
.app-nav .nav-caption:hover { color: #94A3B8; }
.app-nav .nav-caption svg { opacity: .6; transition: transform .26s ease; }
.app-nav .nav-group.grp-collapsed .nav-caption svg { transform: rotate(-90deg); }
.app-nav .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 2px 0; border-radius: 8px;
  color: #CBD5E1; font-size: 14px; overflow: hidden;
  transition: background .15s, color .15s,
    max-height .26s ease, opacity .2s ease, margin .26s ease, padding .26s ease, transform .26s ease;
}
.app-nav .nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-nav .nav-item.active { background: var(--web-sidebar-active); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(255,107,53,.35); }
.app-nav .nav-item svg { width: 17px; height: 17px; flex: none; }
/* 折叠动画：高度/内边距收起 + 淡出 + 轻微左移；展开时按序级联浮现 */
.app-nav .nav-group.grp-collapsed .nav-item {
  max-height: 0; opacity: 0; margin-top: 0; margin-bottom: 0;
  padding-top: 0; padding-bottom: 0;
  transform: translateX(-6px); pointer-events: none;
}
.app-nav .nav-group:not(.grp-collapsed) .nav-item:nth-of-type(2) { transition-delay: 0s, 0s, .04s, 0s, .04s, .04s, .04s; }
.app-nav .nav-group:not(.grp-collapsed) .nav-item:nth-of-type(3) { transition-delay: 0s, 0s, .08s, 0s, .08s, .08s, .08s; }
.app-nav .nav-group:not(.grp-collapsed) .nav-item:nth-of-type(4) { transition-delay: 0s, 0s, .12s, 0s, .12s, .12s, .12s; }
.app-nav .nav-foot {
  margin-top: auto; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: #94A3B8; flex: none;
}
.app-nav .nav-foot .avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #475569, #1F3A5F); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}

/* 内容区：与侧边栏宽度严格对应，所有页面一致 */
.app-main { margin-left: 220px; min-height: 100vh; display: flex; flex-direction: column; }

/* 顶栏 */
.topbar {
  height: 60px; background: var(--web-surface); border-bottom: 1px solid var(--web-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 90; flex: none;
}
.topbar .tb-title { font-size: 17px; font-weight: 700; }
.topbar .tb-sub { font-size: 12px; color: var(--web-text-sub); margin-top: 2px; }
.topbar .tb-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--web-text-sub); }

.page-body { padding: 20px 24px 32px; flex: 1; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ---------- Web 按钮 ---------- */
.wbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px; border-radius: 6px;
  font-size: 13px; font-weight: 500; transition: all .15s; user-select: none;
}
.wbtn svg { width: 15px; height: 15px; }
.wbtn-primary { background: var(--web-primary); color: #fff; }
.wbtn-primary:hover { background: var(--web-primary-hover); }
.wbtn-orange { background: var(--c-primary); color: #fff; }
.wbtn-orange:hover { background: var(--c-primary-deep); }
.wbtn-ghost { background: #fff; color: var(--web-text); border: 1px solid var(--web-border); }
.wbtn-ghost:hover { color: var(--web-primary); border-color: var(--web-primary); }
.wbtn-danger { background: #fff; color: var(--c-danger); border: 1px solid rgba(229,72,77,.4); }
.wbtn-danger:hover { background: rgba(229,72,77,.06); }
.wbtn-success { background: var(--c-success); color: #fff; }
.wbtn-sm { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 5px; }

/* ---------- 状态胶囊 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.7;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-blue   { background: rgba(62,123,250,.1);  color: #2F5FD9; }
.pill-green  { background: rgba(22,163,74,.1);   color: var(--c-success); }
.pill-orange { background: rgba(255,107,53,.12); color: var(--c-primary-deep); }
.pill-red    { background: rgba(229,72,77,.1);   color: var(--c-danger); }
.pill-gray   { background: #EEF1F5;             color: var(--web-text-sub); }
.pill-gold   { background: rgba(255,184,0,.14);  color: #B07800; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--web-surface); border: 1px solid var(--web-border);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.filter-bar .flabel { font-size: 13px; color: var(--web-text-sub); }
.wselect {
  height: 34px; padding: 0 12px; border: 1px solid var(--web-border); border-radius: 6px;
  background: #fff; font-size: 13px; color: var(--web-text); min-width: 130px;
}
.winput {
  height: 34px; padding: 0 12px; border: 1px solid var(--web-border); border-radius: 6px;
  font-size: 13px; min-width: 200px; transition: border-color .15s;
}
.winput:focus { border-color: var(--web-primary); }

/* ---------- 表格 ---------- */
.wtable-wrap { background: var(--web-surface); border: 1px solid var(--web-border); border-radius: 10px; overflow: hidden; }
.wtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.wtable th {
  text-align: left; padding: 12px 14px; background: #F8FAFC;
  color: var(--web-text-sub); font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--web-border);
}
.wtable td { padding: 13px 14px; border-bottom: 1px solid #F1F4F8; vertical-align: middle; }
.wtable tr:last-child td { border-bottom: none; }
.wtable tr:hover td { background: #FAFBFD; }
.wtable .num { font-variant-numeric: tabular-nums; }
.wtable .actions { display: flex; gap: 8px; white-space: nowrap; }
.wtable .link { color: var(--web-primary); cursor: pointer; }
.wtable .link:hover { text-decoration: underline; }
.wtable .link.warn { color: var(--c-danger); }

/* ---------- 统计卡片（看板） ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: var(--web-surface); border: 1px solid var(--web-border); border-radius: 10px;
  padding: 18px; position: relative; overflow: hidden;
}
.stat-card .sc-label { font-size: 13px; color: var(--web-text-sub); display: flex; align-items: center; gap: 6px; }
.stat-card .sc-label svg { width: 15px; height: 15px; }
.stat-card .sc-value { font-size: 28px; font-weight: 800; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-card .sc-trend { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-card .sc-trend.up { color: var(--c-success); }
.stat-card .sc-trend.down { color: var(--c-danger); }
.stat-card::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,107,53,.10), transparent 70%);
}
.stat-card.hero { background: linear-gradient(135deg, var(--web-primary), #2C4E7A); border: none; color: #fff; }
.stat-card.hero .sc-label { color: rgba(255,255,255,.75); }
.stat-card.hero .sc-trend { color: #9FDBB4; }

/* ---------- 面板 / 分栏 ---------- */
.panel { background: var(--web-surface); border: 1px solid var(--web-border); border-radius: 10px; margin-bottom: 16px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--web-border); font-weight: 700; font-size: 14px;
}
.panel-body { padding: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---------- 步骤条（审核流程） ---------- */
.wsteps { display: flex; align-items: center; gap: 0; padding: 8px 0 4px; }
.wsteps .wstep { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--web-text-sub); }
.wsteps .wstep b {
  width: 24px; height: 24px; border-radius: 50%; background: #E8ECF2; color: var(--web-text-sub);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.wsteps .wstep.done b { background: var(--c-success); color: #fff; }
.wsteps .wstep.cur b { background: var(--web-primary); color: #fff; box-shadow: 0 0 0 4px rgba(31,58,95,.12); }
.wsteps .wstep.cur { color: var(--web-text); font-weight: 600; }
.wsteps .wstep-line { flex: 1; height: 2px; background: #E8ECF2; margin: 0 10px; min-width: 30px; }
.wsteps .wstep-line.done { background: var(--c-success); }

/* ---------- 弹窗 ---------- */
.wmodal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center; animation: fadeIn .2s;
}
.wmodal {
  width: 520px; max-width: 92vw; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: riseIn .25s ease;
}
.wmodal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--web-border); font-weight: 700; font-size: 15px;
}
.wmodal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.wmodal-foot { padding: 14px 20px; border-top: 1px solid var(--web-border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 描述列表（详情查看） ---------- */
.wdesc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; font-size: 13px; }
.wdesc .wd { display: flex; padding: 9px 0; border-bottom: 1px solid #F1F4F8; }
.wdesc .wd .wdt { width: 110px; color: var(--web-text-sub); flex: none; }
.wdesc .wd .wdd { flex: 1; font-weight: 500; }

/* ---------- 提醒条 ---------- */
.alert-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,184,0,.10); border: 1px solid rgba(255,184,0,.35);
  color: #8A6200; border-radius: 10px; padding: 11px 16px; font-size: 13px; margin-bottom: 16px;
}
.alert-bar svg { width: 17px; height: 17px; flex: none; }
.alert-bar.urgent { background: rgba(229,72,77,.07); border-color: rgba(229,72,77,.3); color: var(--c-danger); }
.alert-bar.info { background: rgba(62,123,250,.07); border-color: rgba(62,123,250,.25); color: #2F5FD9; }
.alert-bar.success { background: rgba(22,163,74,.07); border-color: rgba(22,163,74,.3); color: var(--c-success); }

/* ---------- Web 端纯 CSS 柱状图（数据看板） ---------- */
.wbars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding: 8px 4px 0; }
.wbars .wbar { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #5B7BA8, var(--web-primary)); min-height: 8px; position: relative; animation: riseIn .5s ease both; }
.wbars .wbar.hot { background: linear-gradient(180deg, #FF8A5C, var(--c-primary-deep)); }
.wbars .wbar .wv { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--web-text-sub); white-space: nowrap; }
.wbars-x { display: flex; gap: 8px; font-size: 11px; color: var(--web-text-sub); margin-top: 6px; }
.wbars-x span { flex: 1; text-align: center; }

/* ---------- 业务结构占比条（网约车 vs 班车 vs 机场） ---------- */
.mix-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; font-size: 11px; color: #fff; }
.mix-bar div { display: flex; align-items: center; justify-content: center; font-weight: 600; white-space: nowrap; }

/* ---------- TOP 榜 ---------- */
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.rank-item + .rank-item { border-top: 1px solid #F1F4F8; }
.rank-item .rk {
  width: 22px; height: 22px; border-radius: 6px; flex: none; font-size: 12px; font-weight: 700;
  background: #EEF1F5; color: var(--web-text-sub);
  display: flex; align-items: center; justify-content: center;
}
.rank-item:nth-child(1) .rk { background: #FFE3D6; color: var(--c-primary-deep); }
.rank-item:nth-child(2) .rk { background: #FFF0D9; color: #B07800; }
.rank-item:nth-child(3) .rk { background: #E8ECF2; color: #5B7BA8; }
.rank-item .rn { flex: 1; font-size: 13px; font-weight: 500; }
.rank-item .rv { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 页内 Tab（A04 地图/热力图切换） ---------- */
.tab-pills { display: inline-flex; background: #EEF1F5; border-radius: 8px; padding: 3px; gap: 2px; }
.tab-pills a { padding: 5px 16px; border-radius: 6px; font-size: 13px; color: var(--web-text-sub); font-weight: 500; }
.tab-pills a.active { background: #fff; color: var(--web-primary); font-weight: 700; box-shadow: 0 1px 4px rgba(15,23,42,.12); }

/* ---------- 地图容器（Web 版：实时调度 / 围栏绘制 / 热力图） ---------- */
.web-map {
  position: relative; height: 460px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--web-border); background: #E8EDE4;
}
.web-map svg { width: 100%; height: 100%; display: block; }
.web-map .map-legend {
  position: absolute; z-index: 10; right: 12px; bottom: 12px;
  background: rgba(255,255,255,.94); border-radius: 8px; box-shadow: var(--shadow-sm);
  padding: 10px 14px; font-size: 12px; color: var(--web-text-sub); line-height: 1.9;
}
.web-map .map-legend .lg-row { display: flex; align-items: center; gap: 8px; }
.web-map .map-legend .lg-ic { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.web-map .map-badge {
  position: absolute; z-index: 10; left: 12px; top: 12px;
  background: rgba(255,255,255,.94); border-radius: 8px; box-shadow: var(--shadow-sm);
  padding: 8px 14px; font-size: 12px; color: var(--web-text); display: flex; gap: 16px;
}
.web-map .map-badge b { font-size: 15px; }
/* 在线司机点 / 订单点 */
.web-map .m-driver { position: absolute; z-index: 8; width: 12px; height: 12px; border-radius: 50%; background: var(--c-success); border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.3); transform: translate(-50%,-50%); cursor: pointer; }
.web-map .m-driver.busy { background: var(--c-warning); }
.web-map .m-driver.off { background: #94A3B8; }
.web-map .m-order { position: absolute; z-index: 9; width: 16px; height: 16px; border-radius: 50% 50% 50% 0; background: var(--c-danger); border: 2px solid #fff; transform: translate(-50%,-100%) rotate(-45deg); box-shadow: 0 1px 5px rgba(0,0,0,.3); }
/* 热力点 */
.web-map .m-heat { position: absolute; z-index: 5; border-radius: 50%; transform: translate(-50%,-50%); pointer-events: none; }

/* ---------- 排班日历（A07） ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-head { text-align: center; font-size: 12px; color: var(--web-text-sub); padding: 4px 0; font-weight: 600; }
.cal-cell { min-height: 108px; background: #FAFBFD; border: 1px solid var(--web-border); border-radius: 8px; padding: 6px; font-size: 11px; }
.cal-cell.today { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(255,107,53,.15); }
.cal-cell .cd { font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.cal-cell .shift {
  border-radius: 5px; padding: 3px 6px; margin-bottom: 3px;
  background: rgba(22,163,74,.1); color: var(--c-success); font-size: 10.5px;
  display: flex; justify-content: space-between; gap: 4px; align-items: center;
}
.cal-cell .shift.unassigned { background: rgba(229,72,77,.08); color: var(--c-danger); }
.cal-cell .shift .st-driver { font-weight: 600; }

/* ---------- 权限矩阵（A12） ---------- */
.perm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.perm-dot.y { background: var(--c-success); }
.perm-dot.n { background: #E2E8F0; }

/* ---------- 页面编号徽章（评审走查用，所有 Web 页右上角） ---------- */
.page-badge-web {
  position: fixed; right: 18px; top: 14px; z-index: 300;
  background: var(--c-primary); color: #fff; border-radius: 8px;
  padding: 4px 12px; font-size: 12px; font-weight: 700; box-shadow: var(--shadow-md);
}

/* ---------- Web 工具类 ---------- */
.wrow { display: flex; align-items: center; gap: 10px; }
.wbetween { display: flex; align-items: center; justify-content: space-between; }
.wsub { color: var(--web-text-sub); font-size: 12px; }
.wmoney { color: var(--c-danger); font-weight: 600; font-variant-numeric: tabular-nums; }
.wmoney.green { color: var(--c-success); }
