/* Approved shared visual components. Existing content, event handlers and role navigation stay intact. */
.crm-ui #pageRoot .stats{background:#fff;border:1px solid #e1e7f0;border-radius:8px;box-shadow:none}
.crm-ui #pageRoot .stats>.stat{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;position:relative;min-width:0;min-height:0;margin:0;padding:11px 14px 9px;background:transparent;border:0;border-radius:0;box-shadow:inset 1px 0 #e8edf4}
.crm-ui #pageRoot .stats>.stat[data-crm-row-start]{box-shadow:none}
.crm-ui #pageRoot .stats>.stat[data-crm-next-row]{border-top:1px solid #e8edf4}
.crm-ui #pageRoot .stat>div:last-child{display:grid;column-gap:6px;row-gap:3px;width:100%;min-width:0;order:0}
.crm-ui #pageRoot .stat small{grid-column:1/-1;font-size:13px;line-height:1.45;color:#60718a;font-weight:450;overflow-wrap:anywhere}
.crm-ui #pageRoot .stat strong{grid-column:1/-1;font-size:26px;line-height:1.3;font-weight:650;color:#253a59;letter-spacing:-.3px;margin:0;font-variant-numeric:tabular-nums;overflow-wrap:normal;white-space:nowrap}
.crm-ui #pageRoot .stat-summary-badge{grid-column:1;font-size:11px;line-height:1.45;color:#7b889c;font-weight:400;margin-top:0}
.crm-ui #pageRoot .stat .stat-icon{display:block;order:1;background:transparent;border-radius:0;width:auto;height:auto;padding:0;font-size:11px;line-height:1.45;color:#708098;font-weight:400;overflow-wrap:anywhere}
.crm-ui #pageRoot .stats>.stat:has(.stat-summary-badge){padding-bottom:9px}
.crm-ui #pageRoot .stats>.stat:has(.stat-summary-badge) .stat-icon{font-size:11px}
.crm-ui #pageRoot button.stat:hover,.crm-ui #pageRoot .stat[data-drilldown-key]:hover{background:#f4f8ff}
.crm-ui #pageRoot button.stat:is(.active,[aria-pressed=true]){background:#eff5ff;border-bottom:2px solid #1769f4}
/* The same responsive grid is applied to actual metric component families. */
.crm-ui #pageRoot :is(.service-drilldown-cards,.service-task-summary,.city-task-summary,.hrbp-metric-grid,.service-kpi-grid,.service-visit-grid),.crm-ui #page-teachers .teacher-resource-stats{background:#fff;border:1px solid #e1e7f0;border-radius:8px}
.crm-ui #pageRoot :is(.service-drilldown-card,.service-task-card,.city-task-card,.hrbp-metric-card,.service-kpi),.crm-ui #page-teachers .teacher-resource-metric{min-width:0;min-height:0;border:0;border-radius:0;background:transparent;padding:11px 14px;box-shadow:inset 1px 0 #e8edf4;gap:4px}
.crm-ui #pageRoot [data-crm-row-start],.crm-ui #page-teachers [data-crm-row-start]{box-shadow:none}
.crm-ui #pageRoot [data-crm-next-row],.crm-ui #page-teachers [data-crm-next-row]{border-top:1px solid #e8edf4}
.crm-ui #pageRoot :is(.service-drilldown-card,.service-task-card,.city-task-card) strong,.crm-ui #pageRoot .hrbp-metric-card b,.crm-ui #pageRoot .service-kpi b,.crm-ui #page-teachers .teacher-resource-metric strong{font-size:26px;line-height:1.35;font-weight:650;letter-spacing:-.3px;white-space:nowrap;font-variant-numeric:tabular-nums}
.crm-ui #pageRoot :is(.service-drilldown-card,.service-task-card,.city-task-card,.hrbp-metric-card,.service-kpi) small,.crm-ui #page-teachers .teacher-resource-metric small{font-size:12px;line-height:1.5}
.crm-ui #pageRoot .service-drilldown-card small{font-size:11px;color:#6b7d95}
.crm-ui #pageRoot .service-task-card.active{background:#eff5ff;border-bottom:2px solid #1769f4;padding:11px 14px}
.crm-ui #pageRoot .city-task-card:is(.pending,.warn,.done){background:transparent}
/* Compact consistent headings, tables and filters; no sidebar recoloring. */
.crm-ui #pageRoot .page-head{margin-bottom:12px}.crm-ui #pageRoot .page-head h1{font-size:28px;line-height:1.4;font-weight:700}
.crm-ui #pageRoot .page-head p{font-size:13px;line-height:1.6}
.crm-ui #pageRoot .panel-head{min-height:45px;padding:12px 15px 10px;gap:10px}.crm-ui #pageRoot .panel-head h2{font-size:18px;font-weight:650}
.crm-ui #pageRoot .panel-head>span,.crm-ui #pageRoot .panel-head small{font-size:12px;line-height:1.5;color:#71829a}
.crm-ui #pageRoot .boss-dashboard-heading{margin:18px 0 10px}.crm-ui #pageRoot .boss-dashboard-heading h2{font-size:19px}.crm-ui #pageRoot .boss-dashboard-heading p{font-size:12px;line-height:1.55;color:#657993}
.crm-ui #pageRoot .toolbar{gap:8px;margin-bottom:12px;align-items:center}.crm-ui #pageRoot .toolbar input,.crm-ui #pageRoot .toolbar select{height:34px;font-size:13px;border-radius:5px;border-color:#dce4ef}
.crm-ui .btn{font-size:13px;font-weight:550;padding:7px 12px;line-height:1.45;min-height:33px;border-radius:5px}.crm-ui .btn.small{font-size:12px;min-height:29px;padding:5px 9px}
.crm-ui th{font-size:12px;line-height:1.5;color:#60728f;background:#f3f6fb;font-weight:550}
.crm-ui td{font-size:13px;line-height:1.55;color:#334966}.crm-ui td small{font-size:11px;line-height:1.5;color:#71839b}
.crm-ui .table-wrap .btn:not(.danger){font-size:12px;min-height:27px;padding:3px 7px}
.crm-ui .table-wrap{overflow:auto;max-width:100%}.crm-ui .notice{font-size:12px;line-height:1.6;padding:9px 11px}
.crm-ui #pageRoot .admin-task-center :is(th,td){font-size:13px;padding:10px 12px}
.crm-ui #page-teachers th{font-size:12px;padding:10px 12px}.crm-ui #page-teachers td{font-size:13px;padding:11px 12px}
.crm-ui #page-teachers .teacher-resource-metric.sold{background:transparent}.crm-ui #page-teachers .teacher-name-link{font-size:14px}
/* Form layout and existing scroll owners remain; align controls and explanatory text. */
.crm-ui .modal-head{padding:14px 17px 11px}.crm-ui .modal-head h3{font-size:20px;font-weight:650}.crm-ui .modal-body{padding:14px 17px}.crm-ui .modal-foot{padding:11px 17px}
.crm-ui .form-grid{gap:12px}.crm-ui .field label,.crm-ui .fields label{font-size:13px;font-weight:550;color:#536a89;line-height:1.5}
.crm-ui :is(.field,.fields) :is(input,select,textarea){font-size:14px;border-color:#d8e2ef;border-radius:5px;line-height:1.5}
.crm-ui .field small{font-size:12px;line-height:1.55;color:#72839b}
.crm-ui .form-grid>*{min-width:0}.crm-ui .modal-body .table-wrap{max-width:100%;overflow:auto}
.crm-ui #pageRoot .lead-info-item small{font-size:12px}.crm-ui #pageRoot .lead-info-item>b{font-size:14px;line-height:1.6}
@media(max-width:1100px){.crm-ui #pageRoot .stats>.stat{padding:10px 12px 8px}.crm-ui #pageRoot .stat strong{font-size:24px}.crm-ui #pageRoot .stat small{font-size:12px}.crm-ui #pageRoot :is(.service-drilldown-card,.service-task-card,.city-task-card,.hrbp-metric-card,.service-kpi),.crm-ui #page-teachers .teacher-resource-metric{padding:10px 12px}.crm-ui #pageRoot :is(.service-drilldown-card,.service-task-card,.city-task-card) strong,.crm-ui #page-teachers .teacher-resource-metric strong{font-size:24px}}
/* Existing white panels do not acquire a second decorative metric box. */
.crm-ui #pageRoot .panel :is(.stats,.service-drilldown-cards,.service-task-summary,.city-task-summary,.hrbp-metric-grid,.service-kpi-grid,.service-visit-grid){border:0;border-radius:0;box-shadow:none;background:transparent}
.crm-ui #pageRoot .service-overview-grid{align-items:start}
/* Visually join the existing title / scope / summary siblings without moving content. */
.crm-ui #pageRoot [data-crm-surface-head]{border-bottom:0;border-radius:8px 8px 0 0}
.crm-ui #pageRoot [data-crm-surface-note]{padding:8px 15px 12px;background:#fff;border-left:1px solid #e1e7f0;border-right:1px solid #e1e7f0;border-radius:0;color:#63768f;font-size:12px}
.crm-ui #pageRoot [data-crm-surface-gap]{line-height:0}
.crm-ui #pageRoot .stats[data-crm-surface-stats]{border-top:0;border-radius:0 0 8px 8px;padding:0 2px 3px}
.crm-ui #pageRoot .lead-completeness-card{border-radius:8px}.crm-ui #pageRoot .lead-entry-panel{box-shadow:none;border-radius:8px;margin-bottom:12px}
.crm-ui #pageRoot .lead-entry-actions .btn{min-height:34px;font-size:13px;padding:7px 12px;box-shadow:none}
.crm-ui #pageRoot .customer-service-context{padding:8px 0 11px}.crm-ui #pageRoot .customer-service-context p{font-size:12px}
.crm-ui #pageRoot .customer-query-field input{height:36px;border-width:1px;border-radius:5px;font-size:13px;font-weight:450}
.crm-ui #pageRoot .customer-query-actions .btn.primary{min-height:36px;font-size:13px;min-width:70px;padding:7px 12px;box-shadow:none}
.crm-ui #pageRoot .customer-query-actions .btn:not(.primary){min-height:32px;font-size:12px}

/* Long status values retain every word at a readable body size. */
.crm-ui #pageRoot [data-crm-long-value],.crm-ui #page-teachers [data-crm-long-value]{font-size:14px!important;line-height:1.6!important;white-space:normal!important;overflow-wrap:anywhere;letter-spacing:0!important;min-width:0;max-width:100%}

/* 2026-09-09: recover existing category markers without recoloring metric values. */
.crm-ui #pageRoot .stats>.stat{--crm-category:var(--blue);--crm-category-bg:var(--blue-bg)}
.crm-ui #pageRoot .stats>.stat:nth-child(2){--crm-category:var(--green);--crm-category-bg:var(--green-bg)}
.crm-ui #pageRoot .stats>.stat:nth-child(3){--crm-category:var(--amber);--crm-category-bg:var(--amber-bg)}
.crm-ui #pageRoot .stats>.stat:nth-child(4){--crm-category:#7b56bd;--crm-category-bg:#f2edff}
.crm-ui #pageRoot .stats>.stat small{color:var(--crm-category);font-weight:600}
/* UI 第一批（沐九 11-06 拍）：去掉统计卡短角标（原两条把短角标绝对定位到右上角，和 unified-ui.css 的同元素样式叠在一起压字）；角标文字回到卡内普通小字，crm-layout.js 照旧打标记。 */
.crm-ui #pageRoot .boss-dashboard-heading>span{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;background:var(--blue-bg);color:var(--blue);border-radius:7px;font-size:12px;font-weight:750;box-shadow:none}
.crm-ui #pageRoot .boss-dashboard-heading h2{color:var(--blue)}
/* Existing status hues remain attached to their original semantic classes. */
.crm-ui :is(.tag,.days,.traffic-preview-summary span).green{color:var(--green)}
.crm-ui :is(.tag,.days,.traffic-preview-summary span).red{color:var(--red)}
.crm-ui :is(.tag,.days,.traffic-preview-summary span).amber{color:var(--amber)}
.crm-ui .tag{font-size:11px;line-height:1.5}
.crm-ui #pageRoot .city-task-card.done strong{color:var(--green)}
.crm-ui #pageRoot .city-task-card.pending strong{color:var(--red)}
.crm-ui #pageRoot .city-task-card.visits strong{color:var(--blue)}
.crm-ui #pageRoot .stats>.stat small{min-height:24px}
@media(max-width:1100px){.crm-ui #pageRoot .stats>.stat small{min-height:38px}}
.crm-ui #pageRoot :is(.service-drilldown-card,.service-kpi,.hrbp-metric-card)>small,.crm-ui #page-teachers .teacher-resource-metric>small{color:var(--blue);font-weight:600}
.crm-ui #page-teachers .teacher-resource-metric.sold>small{color:var(--green)}
