/* ============================================================
   京办主题皮肤 —— 让轻应用内部与京办壳同一套设计语言
   仅当 html.jb-theme 存在时生效（jingban.js 添加；?jb=0 不加载壳则不加类）。
   原则：token 级覆盖为主，不改布局骨架；?jb=0 下 App 保持原墨绿主题。
   ============================================================ */

/* ---- 交互主色：墨绿 → 京办蓝 ---- */
html.jb-theme {
  --cta: #2e62e6;
  --cta-line: #2e62e6;
  --cta-ink: #ffffff;
  --cyan: #2e62e6;
  --cyan-2: #1f4ecf;
  --surface-3: rgba(46, 98, 230, .07);
}
html.jb-theme .primary-btn { box-shadow: 0 8px 18px rgba(46, 98, 230, .22); }
html.jb-theme .nav-item.active { color: #2e62e6; background: #eef3fe; }
html.jb-theme .status-icons b::before { background: #2e62e6; }
html.jb-theme button:focus-visible,
html.jb-theme input:focus-visible,
html.jb-theme select:focus-visible,
html.jb-theme textarea:focus-visible,
html.jb-theme [tabindex]:focus-visible { outline-color: rgba(46, 98, 230, .5); }
html.jb-theme .app-header p { color: #2e62e6; }
html.jb-theme .role-pick .role-avatar { background: #eef3fe; color: #2e62e6; }

/* ---- 轻应用态顶部 chrome：状态栏 + 返回栏连成一块京办蓝 ---- */
html.jb-theme .device-surface.jb-inapp .status-bar {
  background: linear-gradient(180deg, #2b5de0, #2f66e9);
  color: #fff;
}
html.jb-theme #jbMiniBar {
  background: linear-gradient(180deg, #2f66e9, #3b7cf5);
  border-bottom: 0;
  color: #fff;
}
html.jb-theme #jbMiniBar .jb-mini-title { color: #fff; }
html.jb-theme #jbMiniBar .jb-capsule {
  border-color: rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .16);
}
html.jb-theme #jbMiniBar .jb-capsule i { background: rgba(255, 255, 255, .45); }

/* ---- 轻应用态 App 头部瘦身：返回栏已有应用名，头部去冗余 ---- */
html.jb-theme .device-surface.jb-inapp { grid-template-rows: 35px 36px 62px minmax(0, 1fr) auto; }
@media (max-width: 520px) and (max-height: 650px) {
  html.jb-theme .device-surface.jb-inapp { grid-template-rows: 30px 36px 58px minmax(0, 1fr) auto; }
}
html.jb-theme .device-surface.jb-inapp .app-header { padding: 6px 20px 10px; }
html.jb-theme .device-surface.jb-inapp .app-header p { display: none; }
html.jb-theme .device-surface.jb-inapp .app-header h1 { font-size: 19px; }
html.jb-theme .device-surface.jb-inapp .round-icon { width: 42px; height: 42px; }
html.jb-theme .device-surface.jb-inapp .app-header { grid-template-columns: 44px minmax(0, 1fr) 44px; }

/* ---- SLA 倒计时降噪：不再比标题还大，非紧急态用主题蓝 ---- */
html.jb-theme .job-sla b { font-size: 22px; letter-spacing: 0; }
html.jb-theme .job-sla:not(.is-urgent) b { color: #2e62e6; }

/* ---- “导航 · 扫码”等裸链接 → 次级按钮 ---- */
html.jb-theme .job-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
html.jb-theme .job-links .job-dot { display: none; }
html.jb-theme .job-links .wb-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border: 1px solid #ccdbfb;
  border-radius: 999px;
  background: #f0f5ff;
  color: #2e62e6;
  font-weight: 500;
  font-size: 13.5px;
  text-decoration: none;
}

/* ---- 卡片语言与壳统一：12px 圆角白卡已接近，微调阴影 ---- */
html.jb-theme .job-sheet,
html.jb-theme .task-card,
html.jb-theme .map-card { border-radius: 12px; }

/* ---- 浮点在主题下同色系 ---- */
html.jb-theme #demoFab { color: #7186ad; border-color: #d9e2f5; }

/* ---- 步骤条与检查项的墨绿残留 → 京办蓝 ---- */
html.jb-theme .step-track span.is-done { color: #2e62e6; }
html.jb-theme .step-track span.is-current { border-bottom-color: #2e62e6; }
html.jb-theme .job-checks li.is-focus::before { border-color: #2e62e6; background: #eef3fe; }
html.jb-theme .job-checks li::before { border-color: #b9c9ec; }

/* ---- 绿色残留总清扫：--aqua 全局转京办蓝 ---- */
html.jb-theme { --aqua: #2e62e6; }

/* “应急资源”语义色补回绿（地图点位/图例/关联行/缩略图需与蓝色断面区分） */
html.jb-theme .map-point.resource { color: #0d8a68; }
html.jb-theme .preview-point.resource { fill: #0d8a68; }
html.jb-theme .map-related-row > i.resource { background: #0d8a68; }
html.jb-theme .map-legend span:last-child i { --c: #0d8a68 !important; }

/* ---- 轻应用态状态栏图标白化（蓝底可读） ---- */
html.jb-theme .device-surface.jb-inapp .status-icons i:first-child { background: #fff; }
html.jb-theme .device-surface.jb-inapp .status-icons i:nth-child(2) { border-color: #fff; }
html.jb-theme .device-surface.jb-inapp .status-icons b { border-color: #fff; }
html.jb-theme .device-surface.jb-inapp .status-icons b::before { background: #fff; }
html.jb-theme .device-surface.jb-inapp .status-icons b::after { background: rgba(255,255,255,.9); }

/* 弹层“关闭”按钮写死墨绿 #0a5f56 → 蓝 */
html.jb-theme .sheet-close-text { color: #2e62e6; background: #f0f5ff; }

/* 地图行政边界写死墨绿 → 政务蓝系 */
html.jb-theme .district-path { fill: rgba(46, 98, 230, .06); stroke: #4a78e0; }
html.jb-theme .district-path-glow { fill: rgba(46, 98, 230, .03); stroke: rgba(46, 98, 230, .14); }
