/* Two screen themes derived from the approved direction boards (2026-11-25).
   airy = light 雾白简约, cab = dark 曜青中控. Token-driven; no template changes. */

/* ---------- tokens ---------- */
[data-theme=airy]{
 --page:#f6f8fa;--card:#fff;--ink:#14232f;--muted:#64748b;--line:#e9eef2;--hair:#edf1f5;--soft:#f4f7fa;--soft2:#eaf7f4;
 --navy:#ffffff;--navy-active:#eaf7f4;--header:#fff;--header-ink:#14232f;
 --brand:#0e9c8c;--button-ink:#fff;--link:#0b8377;--success:#126841;--warning:#b47900;
 --danger:#c0392b;--danger-bg:#fdf1ef;--accent-blue:#2e6ff0;--shadow:0 1px 2px rgba(16,34,48,.05);
 color-scheme:light}
[data-theme=cab]{
 --page:#0b141f;--card:#121f2e;--soft:#16263a;--soft2:#102a2c;--hair:#1b2c3e;--line:#22364b;
 --ink:#e6eef7;--muted:#8fa6bc;--navy:#0b141f;--navy-active:#102a2c;--header:#101c2a;--header-ink:#e6eef7;
 --brand:#2fd9c6;--button-ink:#06231f;--link:#2fd9c6;--success:#4fd69f;--warning:#ffb02e;
 --danger:#ff6b6b;--danger-bg:#2a1720;--accent-blue:#4c9dff;--shadow:0 1px 2px rgba(0,0,0,.3);
 color-scheme:dark}

/* ---------- shared shell ---------- */
html[data-theme=airy] body.theme670 .main-wrap,
html[data-theme=cab] body.theme670 .main-wrap{background:var(--page)!important}
html[data-theme=airy] body.theme670 .content,
html[data-theme=cab] body.theme670 .content{padding:18px!important;background:var(--page)!important}
html[data-theme=airy] body.theme670 .content h1,
html[data-theme=cab] body.theme670 .content h1{font-size:22px;font-weight:700}

/* ---------- cards ---------- */
html[data-theme=airy] body.theme670 :is(.card,.stat-card,.document-form,.service-form,.chart-card,.metric-card),
html[data-theme=cab] body.theme670 :is(.card,.stat-card,.document-form,.service-form,.chart-card,.metric-card){
 border:1px solid var(--line)!important;border-radius:12px!important;box-shadow:var(--shadow)}
html[data-theme=airy] body.theme670 .card-header,
html[data-theme=cab] body.theme670 .card-header{background:var(--soft)!important;border-radius:11px 11px 0 0!important;padding:11px 16px!important;font-size:14px!important}
html[data-theme=airy] body.theme670 .card-body,
html[data-theme=cab] body.theme670 .card-body{padding:16px}

/* ---------- pills ---------- */
html[data-theme=airy] body.theme670 :is(.badge,.status-pill),
html[data-theme=cab] body.theme670 :is(.badge,.status-pill){border-radius:6px!important;font-weight:600;padding:3px 9px}
html[data-theme=airy] body.theme670 .badge.bg-secondary,
html[data-theme=cab] body.theme670 .badge.bg-secondary{background:var(--soft)!important;color:var(--muted)!important}
html[data-theme=airy] body.theme670 .badge.bg-warning,
html[data-theme=cab] body.theme670 .badge.bg-warning{background:rgba(180,121,0,.14)!important;color:var(--warning)!important}

/* ---------- buttons / inputs ---------- */
html[data-theme=airy] body.theme670 .btn,
html[data-theme=cab] body.theme670 .btn{border-radius:8px!important;min-height:36px;padding:7px 14px}
html[data-theme=airy] body.theme670 .btn-sm,
html[data-theme=cab] body.theme670 .btn-sm{min-height:30px;padding:4px 10px;border-radius:7px!important}
html[data-theme=airy] body.theme670 :is(.form-control,.form-select),
html[data-theme=cab] body.theme670 :is(.form-control,.form-select){border-radius:10px!important;min-height:38px}

/* ---------- airy: light sidebar ---------- */
html[data-theme=airy] body.theme670 .sidebar{background:#fff!important;border-right:1px solid var(--line)}
html[data-theme=airy] body.theme670 .sidebar .brand{border-bottom:1px solid var(--hair)}
html[data-theme=airy] body.theme670 .sidebar .nav-item{color:#43566a!important;font-size:13.5px;min-height:38px}
html[data-theme=airy] body.theme670 .sidebar .nav-item i{color:#8298ab!important}
html[data-theme=airy] body.theme670 .sidebar .nav-item:hover{background:#f3f7f9!important;color:var(--ink)!important}
html[data-theme=airy] body.theme670 .sidebar .nav-item.active{background:var(--soft2)!important;color:#0a7d70!important;box-shadow:inset 3px 0 var(--brand)}
html[data-theme=airy] body.theme670 .sidebar .nav-item.active i{color:var(--brand)!important}
html[data-theme=airy] body.theme670 .sidebar :is(.reference-menu-group>summary,.side-section,.module-group-title){color:#8298ab!important;font-size:11.5px!important;font-weight:700;letter-spacing:.6px}
html[data-theme=airy] body.theme670 .sidebar .reference-menu-search input{background:var(--soft)!important;border:1px solid var(--line)!important;color:var(--ink)!important;border-radius:9px!important}
html[data-theme=airy] body.theme670 .sidebar-footer{color:#93a5b6!important;border-color:var(--hair)}

/* ---------- airy: light topbar ---------- */
html[data-theme=airy] body.theme670 .topbar{border-bottom:1px solid var(--line)}
html[data-theme=airy] body.theme670 :is(.top-action,.menu-toggle){border-color:var(--line)!important;color:var(--ink)!important;background:var(--soft)!important}
html[data-theme=airy] body.theme670 :is(.top-action,.menu-toggle):hover{background:var(--soft2)!important;color:var(--link)!important}
html[data-theme=airy] body.theme670 .theme-select678{background:var(--soft)!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:8px!important}
html[data-theme=airy] body.theme670 .avatar{background:var(--brand)!important;color:#fff!important}
html[data-theme=airy] body.theme670 :is(.breadcrumb-mini,.shell-date670,.page-title){color:var(--muted)!important}
html[data-theme=airy] body.theme670 .page-title{color:var(--ink)!important}
html[data-theme=airy] body.theme670 :is(.modal-content,.dropdown-menu){box-shadow:0 12px 32px rgba(16,34,48,.12)}

/* ---------- list pages ---------- */
html[data-theme=airy] body.theme670 .list-filter670,
html[data-theme=cab] body.theme670 .list-filter670{background:var(--card)!important;border:1px solid var(--line)!important;border-radius:12px!important;padding:14px 16px!important}
html[data-theme=airy] body.theme670 .list-filter670 :is(input,select){background:var(--soft)!important;border:1px solid var(--soft)!important}
html[data-theme=airy] body.theme670 .list-filter670 :is(input,select):focus{background:#fff!important;border-color:var(--brand)!important}
html[data-theme=cab] body.theme670 .list-filter670 :is(input,select){background:#0e1b28!important;border:1px solid var(--line)!important}
html[data-theme=airy] body.theme670 :is(.table,table) th,
html[data-theme=cab] body.theme670 :is(.table,table) th{background:var(--soft)!important;font-size:12px;font-weight:600;color:var(--muted)!important;padding:12px 14px!important;border-top:0;border-bottom:1px solid var(--hair)!important}
html[data-theme=airy] body.theme670 :is(.table,table) td,
html[data-theme=cab] body.theme670 :is(.table,table) td{padding:13px 14px!important;border-top:1px solid var(--hair)!important;border-color:var(--hair)!important}
html[data-theme=airy] body.theme670 .table tbody tr:hover td,
html[data-theme=cab] body.theme670 .table tbody tr:hover td{background:var(--soft)!important}
html[data-theme=airy] body.theme670 .erp-actions .btn{border:0!important;background:transparent!important;color:var(--link)!important;padding:4px 8px!important;min-height:28px}
html[data-theme=airy] body.theme670 .erp-actions .btn:hover{background:var(--soft2)!important}
html[data-theme=airy] body.theme670 .erp-actions .btn-danger{background:transparent!important;color:var(--danger)!important;border-color:transparent!important}
html[data-theme=airy] body.theme670 .erp-actions .btn-primary{background:var(--brand)!important;color:#fff!important}

/* ---------- cockpit: retire the photo hero, keep the flow readable ---------- */
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-hero670,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-hero670{
 background:var(--card)!important;border:1px solid var(--line)!important;border-radius:14px!important;
 min-height:0!important;padding:18px!important;color:var(--ink)!important;box-shadow:var(--shadow)}
html[data-theme=airy] body.theme670 .cockpit-hero670 .hero-image670,
html[data-theme=cab] body.theme670 .cockpit-hero670 .hero-image670{display:none!important}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-hero670 h1,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-hero670 h1{color:var(--ink)!important;font-size:22px!important}
html[data-theme=airy] body.theme670 .cockpit670 :is(.hero-description670,.cockpit-period-note670),
html[data-theme=cab] body.theme670 .cockpit670 :is(.hero-description670,.cockpit-period-note670){color:var(--muted)!important}
html[data-theme=airy] body.theme670 .cockpit-controls670,
html[data-theme=cab] body.theme670 .cockpit-controls670{background:var(--soft)!important;border:1px solid var(--line)!important;border-radius:10px!important}
html[data-theme=airy] body.theme670 .cockpit-scope670,
html[data-theme=cab] body.theme670 .cockpit-scope670{color:var(--muted)!important;border-left-color:var(--line)}

/* chevron tiles -> flat pipeline pills */
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-flow670,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-flow670{max-width:none!important;gap:10px!important;margin:16px 0 0!important}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-flow670 a,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-flow670 a{
 clip-path:none!important;flex-direction:row;justify-content:flex-start;gap:10px;
 min-height:56px!important;padding:10px 14px!important;border-radius:11px!important;
 background:var(--soft)!important;border:1px solid var(--line)!important;color:var(--ink)!important;font-size:13px!important;font-weight:600}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-flow670 i,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-flow670 i{font-size:19px!important;color:var(--brand)!important}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-flow670 a:hover,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-flow670 a:hover{filter:none;background:var(--soft2)!important;border-color:var(--brand)!important}

/* KPI tiles: number leads, decorative sparkline block removed */
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-kpi670,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-kpi670{
 background:var(--card)!important;border:1px solid var(--line)!important;border-radius:12px!important;
 min-height:96px!important;padding:16px 16px!important;align-items:flex-start;flex-direction:column;gap:4px!important;
 color:var(--ink)!important;box-shadow:var(--shadow)}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-kpi670::after,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-kpi670::after{display:none}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-kpi670 .metric-icon670,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-kpi670 .metric-icon670{
 order:-1;width:30px;height:30px;font-size:15px;border-radius:9px;
 background:var(--soft2)!important;color:var(--brand)!important;border:1px solid var(--line)!important}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-kpi670 strong,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-kpi670 strong{font-size:27px;color:var(--ink)!important}
html[data-theme=airy] body.theme670 .cockpit670 :is(.cockpit-panel670,.cockpit-trend-tabs670 button),
html[data-theme=cab] body.theme670 .cockpit670 :is(.cockpit-panel670,.cockpit-trend-tabs670 button){border-radius:12px}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-trend-tabs670 button.active{background:var(--brand)!important;color:var(--button-ink)!important}

/* ---------- cockpit banner per direction board: airy light card, cab dark card ---------- */
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-hero670{background:#fff!important;border-color:var(--line)!important}
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-hero670{background:var(--soft)!important;border-color:var(--line)!important}
html[data-theme=cab] body.theme670 .cockpit670 :is(.cockpit-hero670 h1,.cockpit-flow670 a){color:var(--ink)!important}

/* cockpit controls are filled chips, not dark inset boxes */
html[data-theme=airy] body.theme670 .cockpit-controls670 :is(select,input,option){background:#fff!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=cab] body.theme670 .cockpit-controls670{background:var(--card)!important;border-color:var(--line)!important}
html[data-theme=cab] body.theme670 .cockpit-controls670 :is(select,input,option){background:#0e1b28!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-flow670 a:hover{background:var(--soft2)!important;border-color:var(--brand)!important;color:#0a7d70!important}

/* dark variant sidebar: ui-system.css ships ink-on-light nav ink, pin it light */
html[data-theme=cab] body.theme670 :is(.sidebar,.sidebar nav,.reference-menu-group,.module-group,.module-group-title,.side-section){color:var(--muted)}
html[data-theme=cab] body.theme670 .sidebar .nav-item{color:#c6d6e6!important}
html[data-theme=cab] body.theme670 .sidebar .nav-item i{color:var(--brand)!important}
html[data-theme=cab] body.theme670 .sidebar .nav-item:hover{background:var(--soft)!important;color:var(--ink)!important}
html[data-theme=cab] body.theme670 .sidebar .nav-item.active{background:var(--soft2)!important;color:var(--brand)!important;box-shadow:inset 3px 0 var(--brand)}
html[data-theme=cab] body.theme670 .sidebar .nav-item.active i{color:var(--brand)!important}
html[data-theme=cab] body.theme670 .sidebar :is(.reference-menu-group>summary,.side-section,.module-group-title){color:#9db3c8!important}
html[data-theme=cab] body.theme670 .sidebar-footer{color:#6d859b!important;border-color:var(--hair)}
html[data-theme=cab] body.theme670 .sidebar .reference-menu-search input{background:#0e1b28!important;border:1px solid var(--line)!important;color:var(--ink)!important}

/* select affordance in dark variants */
html[data-theme=cab] body.theme670 .form-select{--bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e6eef7' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}

/* KPI figures must shrink instead of overflowing their tile */
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-kpi670,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-kpi670{min-width:0;overflow:hidden}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-kpi670>div,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-kpi670>div{min-width:0}
html[data-theme=airy] body.theme670 .cockpit670 .cockpit-kpi670 strong,
html[data-theme=cab] body.theme670 .cockpit670 .cockpit-kpi670 strong{font-size:clamp(19px,1.55vw,27px)}

/* hairline row separators instead of the heavy --line rule */
html[data-theme=airy] body.theme670 .table,
html[data-theme=cab] body.theme670 .table{border-color:var(--hair)}
html[data-theme=cab] body.theme670 :is(.table,table) th{background:var(--soft)!important;border-bottom:1px solid var(--hair)!important}
html[data-theme=cab] body.theme670 .erp-actions .btn{border-color:transparent!important}
html[data-theme=cab] body.theme670 .erp-actions .btn-outline-primary,
html[data-theme=cab] body.theme670 .erp-actions .btn-outline-secondary{background:var(--soft2)!important;border:1px solid var(--line)!important;color:var(--link)!important}

/* modal / dropdown elevation in the dark variant */
html[data-theme=cab] body.theme670 .modal-content,html[data-theme=cab] body.theme670 .dropdown-menu{box-shadow:0 16px 40px rgba(0,0,0,.5)}
html[data-theme=cab] body.theme670 .avatar{background:var(--brand)!important;color:var(--button-ink)!important}

/* ---------- page-local inline styles that predate the token system ----------
   dashboard.html / modules.html / purchase_requests.html / materials/boms.html
   paint literals; remap them so both themes own their ink and surfaces. */
html[data-theme=cab] body.theme670 :is(.metric-card,.chart-card){background:var(--card)!important;border:1px solid var(--line)!important;box-shadow:0 1px 2px rgba(0,0,0,.3)}
html[data-theme=cab] body.theme670 .metric-sub{color:var(--muted)!important}
html[data-theme=cab] body.theme670 .bar-label{color:var(--ink)!important}
html[data-theme=cab] body.theme670 .bar-value{color:var(--muted)!important}
html[data-theme=cab] body.theme670 :is(.bar-track,.dual-track){background:var(--soft)!important}
html[data-theme=cab] body.theme670 :is(.bar-fill,.dual-fill){opacity:.92}
html[data-theme=cab] body.theme670 .empty-chart{color:var(--muted)!important}
html[data-theme=airy] body.theme670 :is(.metric-card,.chart-card){border:1px solid var(--line)!important;box-shadow:var(--shadow)}

/* 全部功能页：hero 与卡片 */
html[data-theme=cab] body.theme670 .module-hero{background:linear-gradient(135deg,#0d2a26,#0f3b34 58%,#11655a)!important}
html[data-theme=cab] body.theme670 .module-hero p{color:#a9cfc8!important}
html[data-theme=cab] body.theme670 .module-search{background:var(--card)!important;border:1px solid var(--line)!important;color:var(--ink)!important}
html[data-theme=cab] body.theme670 .module-group-title{border-bottom:1px solid var(--line)!important}
html[data-theme=cab] body.theme670 .module-icon{background:var(--soft2)!important;color:var(--brand)!important}
html[data-theme=cab] body.theme670 .module-item:hover{background:var(--soft)!important;border-color:var(--brand)!important;box-shadow:none}

/* 物料选择浮层（采购申请 / BOM 两页同结构） */
html[data-theme=cab] body.theme670 :is(.material-drop,.mdrop){background:var(--card)!important;border-color:var(--line);border:1px solid var(--line)!important;box-shadow:0 12px 32px rgba(0,0,0,.5)}
html[data-theme=cab] body.theme670 :is(.material-option,.mopt){border-bottom:1px solid var(--hair)!important}
html[data-theme=cab] body.theme670 :is(.material-option:hover,.material-option.active,.mopt:hover,.mopt.active){background:var(--soft2)!important}
html[data-theme=cab] body.theme670 :is(.material-meta,.material-summary,.no-result,.picker-arrow,.mopt small){color:var(--muted)!important}
html[data-theme=cab] body.theme670 .material-code{color:var(--link)!important}
html[data-theme=airy] body.theme670 .country-options6733 button:hover{background:var(--brand)!important;color:#fff!important}

/* 客户地图：第三方浅色地图与深色卡面之间加一道明确分界，不改地图自身配色 */
html[data-theme=cab] body.theme670 #map{border:1px solid var(--line)!important;border-radius:10px}




