/* bf-analytics.css — analytics filters, scope bar and table tools (2026-09).
   Loaded after the analytics page's own styles. Brand tokens from theme.css. */

/* ── Scope bar ─────────────────────────────────────────────────────── */
.bf-scope { background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; margin: 0 0 14px; padding: 10px 14px; }
.bf-scope[hidden] { display: none; }
.bf-scope-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bf-scope-lead { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bf-muted, #56655D); padding-right: 12px; border-right: 1px solid var(--bf-line, #DCE3DF); }
.bf-scope-lead .bi { color: var(--bf-green, #007A3D); font-size: 14px; }
.bf-scope-facets { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.bf-facet { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--bf-line, #DCE3DF); background: #fff; font-size: 13px; color: var(--bf-ink, #15201A); cursor: pointer; transition: border-color .12s, background .12s; }
.bf-facet:hover { border-color: #9FC7B1; }
.bf-facet:focus-visible { outline: 2px solid rgba(0,122,61,.45); outline-offset: 1px; }
.bf-facet .bi { color: var(--bf-muted, #56655D); font-size: 14px; }
.bf-facet-label { color: var(--bf-muted, #56655D); }
.bf-facet-value { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-facet-caret { font-size: 11px !important; margin-left: 2px; }
.bf-facet.on { background: var(--bf-green-soft, #E6F2EC); border-color: #9FC7B1; }
.bf-facet.on .bi, .bf-facet.on .bf-facet-value { color: var(--bf-green-dark, #005C2E); }
.bf-facet[aria-expanded="true"] { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.bf-scope-end { margin-left: auto; display: flex; align-items: center; }
.bf-scope-note { font-size: 12px; color: var(--bf-muted, #56655D); }
.bf-scope-clear { border: 0; background: transparent; color: var(--bf-green-dark, #005C2E); font-size: 13px; font-weight: 600; padding: 6px 8px; border-radius: 6px; }
.bf-scope-clear:hover { background: var(--bf-green-soft, #E6F2EC); }
.bf-scope-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--bf-line, #DCE3DF); }
.bf-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 10px; border-radius: 13px; background: #F3F5F4; font-size: 12px; color: var(--bf-ink, #15201A); }
.bf-chip-k { color: var(--bf-muted, #56655D); }
.bf-chip-x { width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--bf-muted, #56655D); padding: 0; }
.bf-chip-x:hover { background: #DCE3DF; color: var(--bf-ink, #15201A); }

/* Popover */
.bf-pop { position: fixed; z-index: 2000; width: 320px; background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; box-shadow: 0 12px 32px rgba(21,32,26,.16); display: flex; flex-direction: column; font-size: 13px; }
.bf-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; font-weight: 600; font-size: 14px; }
.bf-pop-count { font-size: 12px; font-weight: 500; color: var(--bf-muted, #56655D); }
.bf-pop-search { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; padding: 0 10px; height: 34px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 8px; color: var(--bf-muted, #56655D); }
.bf-pop-search:focus-within { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.bf-pop-search input { border: 0; outline: 0; flex: 1; font-size: 13px; min-width: 0; }
.bf-pop-list { flex: 0 1 auto; min-height: 48px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; padding: 0 6px 6px; }
.bf-pop { overflow: hidden; }
.bf-pop > :not(.bf-pop-list) { flex-shrink: 0; }
.bf-opt { display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; margin: 0; }
.bf-opt:hover { background: #F3F5F4; }
.bf-opt.on { background: var(--bf-green-soft, #E6F2EC); }
.bf-opt input { margin-top: 2px; accent-color: var(--bf-green, #007A3D); }
.bf-opt-main { display: flex; flex-direction: column; min-width: 0; }
.bf-opt-l { font-weight: 500; color: var(--bf-ink, #15201A); }
.bf-opt-d { font-size: 12px; color: var(--bf-muted, #56655D); }
.bf-pop-empty { padding: 14px 10px; color: var(--bf-muted, #56655D); }
.bf-pop-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--bf-line, #DCE3DF); }
.bf-grow { flex: 1; }
.bf-link { border: 0; background: transparent; color: var(--bf-green-dark, #005C2E); font-size: 12px; font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.bf-link:hover { background: var(--bf-green-soft, #E6F2EC); }
.bf-btn { height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid transparent; }
.bf-btn-primary { background: var(--bf-green, #007A3D); color: #fff; }
.bf-btn-primary:hover { background: var(--bf-green-dark, #005C2E); }
.bf-btn-ghost { background: #fff; border-color: var(--bf-line, #DCE3DF); color: var(--bf-ink, #15201A); }

/* One scope UI: hide the older per-module scope bars (their state is synced) */
.bf-scope-on #dht-global-filters,
.bf-scope-on #jls-scope-filters,
.bf-scope-on [id^="an-fp-welltype-"],
.bf-scope-on [id^="an-fp-cat-wrap-"] { display: none !important; }

/* ── Date / run panel: calmer, consistent ─────────────────────────── */
.an-filter-panel { border: 1px solid var(--bf-line, #DCE3DF) !important; border-left-width: 1px !important; box-shadow: none !important; border-radius: 10px !important; padding: 10px 14px !important; }
.an-fp-row { gap: 12px !important; }
.an-fp-presets { display: inline-flex !important; gap: 2px !important; padding: 3px; background: #F3F5F4; border-radius: 8px; }
.an-fp-preset { border: 0 !important; background: transparent !important; color: var(--bf-muted, #56655D) !important; border-radius: 6px !important; padding: 5px 10px !important; font-size: 13px !important; font-weight: 500; }
.an-fp-preset:hover { color: var(--bf-ink, #15201A) !important; background: rgba(255,255,255,.6) !important; }
.an-fp-preset.active { background: #fff !important; color: var(--bf-green-dark, #005C2E) !important; font-weight: 600; box-shadow: 0 1px 2px rgba(21,32,26,.14); }
.an-fp-dates { gap: 8px; }
.an-fp-dates label { font-size: 12px; color: var(--bf-muted, #56655D); }
.an-fp-date, .an-fp-rig-sel { height: 34px; border: 1px solid var(--bf-line, #DCE3DF) !important; border-radius: 8px !important; font-size: 13px !important; padding: 0 10px !important; }
.an-fp-date:focus, .an-fp-rig-sel:focus { border-color: var(--bf-green, #007A3D) !important; box-shadow: 0 0 0 3px rgba(0,122,61,.12); outline: 0; }
.an-fp-run { height: 36px; border-radius: 8px !important; padding: 0 16px !important; font-size: 13px !important; font-weight: 600 !important; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.an-fp-badge { font-size: 12px !important; }

/* ── Table tools ──────────────────────────────────────────────────── */
.bf-tt-bar { display: flex; align-items: center; gap: 8px; padding: 8px 2px; flex-wrap: wrap; }
.bf-tt-count { font-size: 12px; color: var(--bf-muted, #56655D); font-variant-numeric: tabular-nums; }
.bf-tt-count strong { color: var(--bf-ink, #15201A); font-weight: 600; }
.bf-tt-hint { font-size: 12px; color: #8A988F; }
.bf-tt-search { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 7px; background: #fff; color: var(--bf-muted, #56655D); margin: 0; transition: border-color .12s, box-shadow .12s; }
.bf-tt-search:focus-within { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.bf-tt-search input { border: 0; outline: 0; width: 160px; font-size: 12px; background: transparent; }
.bf-tt-clear { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--bf-green-soft, #E6F2EC); font-size: 12px; font-weight: 600; color: var(--bf-green-dark, #005C2E); height: 30px; padding: 0 10px; border-radius: 7px; }
.bf-tt-clear:hover { background: #D3E9DD; }
.bf-tt-clear[hidden] { display: none; }
.bf-tt-xlsx { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid #9FC7B1; background: #fff; color: var(--bf-green-dark, #005C2E); font-size: 12px; font-weight: 600; transition: background .12s; }
.bf-tt-xlsx:hover { background: var(--bf-green-soft, #E6F2EC); }
.bf-tt-xlsx:disabled { opacity: .6; }

/* Clickable headers */
table.bf-tt th.bf-th { cursor: pointer; user-select: none; position: sticky; padding-right: 26px !important; transition: background-color .12s; }
table.bf-tt th.bf-th:hover { background-image: linear-gradient(rgba(0,0,0,.07), rgba(0,0,0,.07)); }
table.bf-tt th.bf-th:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.bf-th-ic { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 2px; font-size: 10px; line-height: 1; opacity: 0; transition: opacity .12s; pointer-events: none; }
.bf-th-ic .bi { display: none; }
.bf-th-ic .bi-funnel-fill { display: inline; }
table.bf-tt th.bf-th:hover .bf-th-ic, table.bf-tt th.bf-th:focus-visible .bf-th-ic { opacity: .7; }
table.bf-tt th.bf-th-on .bf-th-ic, table.bf-tt th.bf-th-asc .bf-th-ic, table.bf-tt th.bf-th-desc .bf-th-ic { opacity: 1; }
table.bf-tt th.bf-th-on { box-shadow: inset 0 -3px 0 #F5C451; }
table.bf-tt th.bf-th-asc .bf-th-ic .bi-arrow-up, table.bf-tt th.bf-th-desc .bf-th-ic .bi-arrow-down { display: inline; }
table.bf-tt th.bf-th-asc:not(.bf-th-on) .bf-th-ic .bi-funnel-fill, table.bf-tt th.bf-th-desc:not(.bf-th-on) .bf-th-ic .bi-funnel-fill { display: none; }
table.bf-tt tr.bf-tt-hide { display: none !important; }
table.bf-tt tr.bf-tt-empty td { text-align: center; color: var(--bf-muted, #56655D); padding: 18px !important; font-size: 12px; background: #FAFBFA; }
table.bf-tt tr.bf-tt-empty .bf-link { margin-left: 4px; }

/* Header menu */
.bf-thm { position: fixed; z-index: 2100; width: 284px; max-height: min(460px, calc(100vh - 80px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; box-shadow: 0 14px 36px rgba(21,32,26,.18), 0 2px 6px rgba(21,32,26,.08); font-size: 13px; color: var(--bf-ink, #15201A); animation: bf-in .12s ease-out; }
@keyframes bf-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.bf-thm-title { padding: 12px 14px 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--bf-muted, #56655D); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-thm-sort { display: flex; flex-direction: column; padding: 0 6px 6px; border-bottom: 1px solid var(--bf-line, #DCE3DF); }
.bf-thm-sort button { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border: 0; background: transparent; border-radius: 6px; font-size: 13px; color: var(--bf-ink, #15201A); text-align: left; }
.bf-thm-sort button:hover { background: #F3F5F4; }
.bf-thm-sort .bi { color: var(--bf-green, #007A3D); font-size: 15px; }
.bf-thm-cond { display: flex; flex-direction: column; gap: 4px; margin: 10px 12px 0; font-size: 12px; color: var(--bf-muted, #56655D); }
.bf-thm-cond input { height: 32px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 7px; padding: 0 10px; font-size: 13px; outline: 0; }
.bf-thm-cond input:focus { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.bf-thm-search { display: flex; align-items: center; gap: 8px; margin: 10px 12px 6px; padding: 0 10px; height: 32px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 7px; color: var(--bf-muted, #56655D); }
.bf-thm-search:focus-within { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.bf-thm-search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 13px; }
.bf-thm-all { display: flex; align-items: center; gap: 10px; margin: 0 6px; padding: 6px 8px; border-bottom: 1px solid #EEF2EF; font-weight: 600; cursor: pointer; }
.bf-thm-all input, .bf-thm-opt input { accent-color: var(--bf-green, #007A3D); width: 15px; height: 15px; flex-shrink: 0; }
.bf-thm-n { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--bf-muted, #56655D); }
.bf-thm-list { flex: 1; min-height: 60px; overflow-y: auto; padding: 4px 6px; }
.bf-thm-opt { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; cursor: pointer; margin: 0; }
.bf-thm-opt:hover { background: #F3F5F4; }
.bf-thm-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-thm-c { font-size: 11px; color: var(--bf-muted, #56655D); font-variant-numeric: tabular-nums; background: #F3F5F4; border-radius: 9px; padding: 1px 7px; }
.bf-thm-more { padding: 10px 8px; font-size: 12px; color: var(--bf-muted, #56655D); }
.bf-thm-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--bf-line, #DCE3DF); }
.bf-muted { color: var(--bf-muted, #56655D); font-style: italic; }

/* Service Analytics: its own Department picker duplicates the global filter */
.bf-scope-on .fa-filter-group:has(> #fa-filter-dept) { display: none !important; }

/* ── release 20260924c: panels stay on screen, date filters, Job Log Search ── */
.bf-thm { overflow: hidden; }
.bf-thm > :not(.bf-thm-list) { flex-shrink: 0; }
.bf-thm-list { flex: 1 1 auto; overscroll-behavior: contain; }
.bf-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Date column menu */
.bf-thm.bf-thm-date { width: 316px; }
.bf-thm-range { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 4px; }
.bf-thm-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.bf-thm-presets button { height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--bf-line, #DCE3DF); background: #fff; font-size: 12px; color: var(--bf-ink, #15201A); transition: background .12s, border-color .12s; }
.bf-thm-presets button:hover { border-color: var(--bf-green, #007A3D); }
.bf-thm-presets button.on { background: var(--bf-green-soft, #E6F2EC); border-color: var(--bf-green, #007A3D); color: var(--bf-green-dark, #005C2E); font-weight: 600; }
.bf-thm-fromto { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bf-thm-fromto label { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 11px; font-weight: 600; color: var(--bf-muted, #56655D); text-transform: uppercase; letter-spacing: .04em; }
.bf-thm-fromto input { height: 32px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 7px; padding: 0 8px; font-size: 13px; color: var(--bf-ink, #15201A); outline: 0; min-width: 0; }
.bf-thm-fromto input:focus { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.bf-thm-note { font-size: 11px; line-height: 1.4; color: var(--bf-muted, #56655D); padding: 0 12px 6px; }
.bf-thm-range .bf-thm-note { padding: 0; }
.bf-thm-date .bf-thm-search { margin-top: 6px; }
.bf-thm-y, .bf-thm-m { gap: 4px; padding-left: 2px; }
.bf-thm-y { font-weight: 600; }
.bf-thm-m { padding-left: 20px; }
.bf-thm-d { padding-left: 50px; }
.bf-thm-y label, .bf-thm-m label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; margin: 0; cursor: pointer; }
.bf-thm-tog { width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 5px; color: var(--bf-muted, #56655D); font-size: 11px; padding: 0; }
.bf-thm-tog:hover { background: #E8EEEA; color: var(--bf-ink, #15201A); }

/* Job Log Search results */
.jls-card { overflow: visible; }
.jls-bar { padding: 10px 14px; border-bottom: 1px solid var(--bf-line, #DCE3DF); }
.jls-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--bf-line, #DCE3DF); background: #FAFBFA; }
.jls-export-msg { margin: 8px 14px 0; padding: 8px 10px; border-radius: 7px; background: #FDECEC; color: #9B1C1C; font-size: 12px; }
.jls-export-msg[hidden] { display: none; }
.jls-table-wrap { max-height: calc(100vh - 260px); min-height: 180px; }
table.jls-table { width: 100%; }
table.jls-table th, table.jls-table td { vertical-align: top; }
table.jls-table th { white-space: nowrap; }
table.jls-table th.jls-th { cursor: pointer; user-select: none; position: sticky; padding-right: 24px !important; }
table.jls-table th.jls-th .bf-th-ic { opacity: .55; }
table.jls-table th.jls-th:hover .bf-th-ic, table.jls-table th.jls-th[aria-expanded="true"] .bf-th-ic, table.jls-table th.bf-th-on .bf-th-ic { opacity: 1; }
table.jls-table th.bf-th-on .bf-th-ic { color: #F5C451; }
table.jls-table th[aria-expanded="true"] { background-image: linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.12)); }
.jls-th-n { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; margin-left: 5px; padding: 0 4px; border-radius: 8px; background: #F5C451; color: #3D2E00; font-size: 10px; font-weight: 700; vertical-align: 1px; }
td.jls-c-date, td.jls-c-nw { white-space: nowrap; }
td.jls-c-date { font-variant-numeric: tabular-nums; }
td.jls-c-sum { min-width: 280px; max-width: 460px; white-space: normal; line-height: 1.45; }
mark.jls-hit { background: #FFE9A8; color: inherit; padding: 0 1px; border-radius: 2px; }
.jls-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--bf-line, #DCE3DF); font-size: 12px; color: var(--bf-muted, #56655D); }

/* ── Service market (Service Analytics) — release 20260925 ─────────────── */
.sm-wrap { display: flex; flex-direction: column; gap: 14px; color: var(--bf-ink, #15201A); font-size: 13px; }
.sm-wrap * { box-sizing: border-box; }
.sm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sm-title h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.sm-title p { margin: 4px 0 0; max-width: 640px; font-size: 13px; line-height: 1.45; color: var(--bf-muted, #56655D); }
.sm-controls { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.sm-ctl { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--bf-muted, #56655D); }
.sm-ctl select { height: 36px; min-width: 220px; max-width: 300px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 8px; padding: 0 30px 0 10px; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--bf-ink, #15201A); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2356655D' d='M1.6 5.1 8 11.5l6.4-6.4-1.1-1.1L8 9.3 2.7 4z'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; outline: 0; }
.sm-ctl select:focus { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.sm-xlsx { height: 36px; }
.sm-period { font-size: 12px; color: var(--bf-muted, #56655D); min-height: 18px; }
.sm-period b { color: var(--bf-ink, #15201A); font-weight: 600; }
.sm-loading { display: inline-flex; align-items: center; gap: 8px; }
.sm-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #DCE3DF; border-top-color: var(--bf-green, #007A3D); animation: sm-rot .8s linear infinite; }
@keyframes sm-rot { to { transform: rotate(360deg); } }

.sm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; transition: opacity .15s; }
.sm-kpis.sm-busy { opacity: .55; }
@media (max-width: 1400px) { .sm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .sm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sm-kpi { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; min-width: 0; }
.sm-kpi > span { font-size: 12px; font-weight: 500; color: var(--bf-muted, #56655D); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-kpi > b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-kpi > i { font-style: normal; font-size: 12px; color: var(--bf-muted, #56655D); line-height: 1.35; }
.sm-kpi-focus { border-color: #9EC5F4; background: #F4F8FE; }
.sm-skel span, .sm-skel b, .sm-skel i { display: block; border-radius: 4px; background: linear-gradient(90deg, #EEF2EF, #F7F9F8, #EEF2EF); background-size: 200% 100%; animation: sm-sh 1.2s infinite; }
.sm-skel span { height: 10px; width: 60%; } .sm-skel b { height: 22px; width: 45%; } .sm-skel i { height: 10px; width: 80%; }
@keyframes sm-sh { to { background-position: -200% 0; } }
.sm-d { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-d .bi { font-size: 10px; }
.sm-d-up { color: #1c5cab; } .sm-d-down { color: #b3261e; } .sm-d-flat, .sm-d-na { color: var(--bf-muted, #56655D); font-weight: 500; }
.sm-empty { padding: 28px 16px; text-align: center; color: var(--bf-muted, #56655D); background: #fff; border: 1px dashed var(--bf-line, #DCE3DF); border-radius: 10px; grid-column: 1 / -1; }
.sm-empty-s { padding: 12px; font-size: 12px; }
.sm-error { grid-column: 1 / -1; padding: 12px 14px; border-radius: 10px; background: #FDECEC; color: #9B1C1C; }
.sm-error-inline { color: #9B1C1C; }
.sm-note { color: #8a5a00; }

.sm-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--bf-line, #DCE3DF); overflow-x: auto; }
.sm-tab { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 13px; font-weight: 500; color: var(--bf-muted, #56655D); white-space: nowrap; margin-bottom: -1px; }
.sm-tab:hover { color: var(--bf-ink, #15201A); }
.sm-tab.on { color: var(--bf-green-dark, #005C2E); border-bottom-color: var(--bf-green, #007A3D); font-weight: 600; }
.sm-tab-n { font-size: 11px; font-weight: 600; color: var(--bf-muted, #56655D); background: #EEF2EF; border-radius: 9px; padding: 0 6px; line-height: 17px; }
.sm-tab-n:empty { display: none; }
.sm-panel[hidden] { display: none !important; }

.sm-mapgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .sm-mapgrid { grid-template-columns: 1fr; } }
.sm-mapbox { position: relative; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; overflow: hidden; background: #E9EEF2; }
#sm-map { height: 620px; width: 100%; }
.sm-views { position: absolute; top: 10px; left: 56px; z-index: 500; display: flex; background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 8px; padding: 3px; gap: 2px; box-shadow: 0 2px 8px rgba(21,32,26,.12); flex-wrap: wrap; max-width: calc(100% - 180px); }
.sm-views button { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; font-size: 12px; font-weight: 500; color: var(--bf-ink, #15201A); white-space: nowrap; }
.sm-views button:hover:not(:disabled) { background: #F3F5F4; }
.sm-views button.on { background: var(--bf-green, #007A3D); color: #fff; font-weight: 600; }
.sm-views button:disabled { color: #A3A29A; cursor: not-allowed; }
.sm-basemap { position: absolute; top: 10px; right: 10px; z-index: 500; }
.sm-basemap select { height: 34px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 8px; padding: 0 8px; font-size: 12px; background: #fff; box-shadow: 0 2px 8px rgba(21,32,26,.12); }
.sm-legend { position: absolute; left: 10px; bottom: 22px; z-index: 500; background: rgba(255,255,255,.96); border: 1px solid var(--bf-line, #DCE3DF); border-radius: 8px; padding: 10px 12px; font-size: 12px; max-width: 250px; box-shadow: 0 2px 8px rgba(21,32,26,.12); }
.sm-legend b { display: block; font-size: 12px; font-weight: 600; }
.sm-legend small { display: block; font-size: 11px; color: var(--bf-muted, #56655D); margin-bottom: 6px; }
.sm-lg-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.sm-sw { width: 14px; height: 12px; border-radius: 3px; flex-shrink: 0; border: 1px solid rgba(21,32,26,.15); }
.sm-sw-hatch { background-image: repeating-linear-gradient(45deg, transparent 0 3px, rgba(21,32,26,.35) 3px 4px) !important; }
.sm-tip { font-size: 12px; line-height: 1.5; }
.sm-tip-m { color: #56655D; font-size: 11px; }

.sm-side { background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; padding: 14px; max-height: 620px; overflow-y: auto; }
.sm-side-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.sm-side-h h3 { margin: 0; font-size: 16px; font-weight: 600; }
.sm-side-h h3 span { font-weight: 400; color: var(--bf-muted, #56655D); }
.sm-side-h p { margin: 2px 0 0; font-size: 12px; color: var(--bf-muted, #56655D); }
.sm-x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--bf-muted, #56655D); flex-shrink: 0; }
.sm-x:hover { background: #F3F5F4; color: var(--bf-ink, #15201A); }
.sm-side h4 { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--bf-muted, #56655D); }
.sm-side h4 small { font-size: 11px; background: #EEF2EF; border-radius: 9px; padding: 0 6px; letter-spacing: 0; }
.sm-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sm-mini > div { background: #F7F9F8; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.sm-mini b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-mini span { font-size: 11px; color: var(--bf-muted, #56655D); }
.sm-bar { padding: 5px 6px; border-radius: 6px; }
.sm-bar.me { background: #F4F8FE; box-shadow: inset 3px 0 0 #2a78d6; }
.sm-bar-l { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.sm-bar-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-bar.me .sm-bar-n { font-weight: 600; }
.sm-bar-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-bar-t { height: 6px; background: #EEF2EF; border-radius: 3px; margin: 4px 0 3px 15px; overflow: hidden; }
.sm-bar-t span { display: block; height: 100%; border-radius: 3px; }
.sm-bar-s { font-size: 11px; color: var(--bf-muted, #56655D); margin-left: 15px; }
.sm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-right: 6px; vertical-align: 1px; }
.sm-bar-l .sm-dot { margin-right: 0; }
.sm-more, .sm-foot { font-size: 12px; color: var(--bf-muted, #56655D); margin: 8px 2px 0; line-height: 1.45; }
.sm-lost { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #FDF1E6; font-size: 12px; color: #7a4100; }
.sm-rigs { display: flex; flex-direction: column; gap: 6px; }
.sm-rig { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 7px 8px; border: 1px solid #EEF2EF; border-radius: 8px; font-size: 12px; }
.sm-rig span { color: var(--bf-muted, #56655D); text-align: right; }
.sm-rig em { grid-column: 1 / -1; font-style: normal; display: flex; flex-wrap: wrap; gap: 4px; }
.sm-chip { font-style: normal; font-size: 11px; background: #F3F5F4; border-radius: 10px; padding: 1px 8px; }
.sm-chip.me { background: #DCEAFB; color: #0d366b; font-weight: 600; }
.sm-link { margin-top: 12px; width: 100%; height: 34px; border: 1px solid #9FC7B1; border-radius: 8px; background: #fff; color: var(--bf-green-dark, #005C2E); font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sm-link:hover { background: var(--bf-green-soft, #E6F2EC); }
.sm-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sm-top button { width: 100%; border: 0; background: transparent; text-align: left; padding: 7px 8px; border-radius: 8px; display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; }
.sm-top button:hover { background: #F3F5F4; }
.sm-top-l { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sm-top-l b { font-weight: 600; }
.sm-top-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-top-b { grid-column: 1 / -1; height: 5px; background: #EEF2EF; border-radius: 3px; overflow: hidden; } .sm-top-b span { display: block; height: 100%; background: #3987e5; border-radius: 3px; }
.sm-top-s { grid-column: 1 / -1; font-size: 11px; color: var(--bf-muted, #56655D); }
.sm-open { color: #8a5a00; }

.sm-grid2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1200px) { .sm-grid2 { grid-template-columns: 1fr; } }
.sm-card { background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; padding: 14px; min-width: 0; }
.sm-card > header { margin-bottom: 8px; }
.sm-card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.sm-card header p { margin: 3px 0 0; font-size: 12px; color: var(--bf-muted, #56655D); line-height: 1.45; }
.sm-card-hx { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sm-tw { max-height: 560px; }
.sm-table td, .sm-table th { white-space: nowrap; }
.sm-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.sm-table small { color: var(--bf-muted, #56655D); font-size: 11px; }
.sm-table tr.sm-me td { background: #F4F8FE; font-weight: 600; }
.sm-click tbody tr { cursor: pointer; }
.sm-click tbody tr:hover td { background: #F3F5F4; }
.sm-cellbar { display: inline-block; width: 56px; height: 6px; background: #EEF2EF; border-radius: 3px; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.sm-cellbar span { display: block; height: 100%; border-radius: 3px; }
.sm-st { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 10px; padding: 1px 8px; }
.sm-st-youlead { background: #DCEAFB; color: #0d366b; }
.sm-st-present { background: #EEF2EF; color: #15201A; }
.sm-st-open { background: #FFF1CC; color: #6b4700; }
.sm-st-lost { background: #FDECEC; color: #9B1C1C; }
.sm-chart { position: relative; height: 340px; }
.sm-legend-h { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; }
.sm-legend-h span { display: inline-flex; align-items: center; gap: 6px; }
.sm-legend-h span.me { font-weight: 600; }
.sm-legend-h i { width: 10px; height: 10px; border-radius: 2px; }
.sm-seg { display: inline-flex; background: #F3F5F4; border-radius: 8px; padding: 3px; gap: 2px; }
.sm-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; font-size: 12px; font-weight: 500; color: var(--bf-ink, #15201A); }
.sm-seg button b { font-weight: 600; margin-left: 4px; color: var(--bf-muted, #56655D); }
.sm-seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(21,32,26,.15); font-weight: 600; }

/* 20260925b: key-free light basemap = OSM tiles in grey */
.sm-tiles-light { filter: grayscale(1) brightness(1.06) contrast(.9); }
