:root {
  --theme-font: "SF Pro SC", "PingFang SC", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  --theme-light-bg: #f4f7fb;
  --theme-light-card: #ffffff;
  --theme-light-text: #172b4d;
  --theme-light-muted: #64748b;
  --theme-light-line: #d8e2ef;
  --theme-dark-bg: #081827;
  --theme-dark-card: #10283f;
  --theme-dark-text: #eaf2fa;
  --theme-dark-muted: #a8bcd0;
  --theme-dark-line: #29445c;
  --theme-brand: #2563eb;
  --theme-success: #109b81;
  --theme-warning: #f59e0b;
  --theme-danger: #ef4444;
}

html[data-allp-scene] body { font-family:var(--theme-font); letter-spacing:0; }
html[data-allp-scene] body main:not(.full) .global-header {
  min-height:64px;
  padding:0 24px;
  border-bottom:1px solid #e2e8f0;
  box-shadow:none;
  align-items:center;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header { background:#fff; color:var(--theme-light-text); }
.global-header .global-context { display:flex; align-items:center; gap:8px; min-width:0; font-size:14px; }
.global-header .global-context :is(.context-root,.context-group) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .global-context .context-root { color:#64748b; }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .global-context .context-group { color:#334155; font-weight:600; }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .global-context i { color:#9aa9bb; }
html[data-allp-scene="dark-workbench"] body main:not(.full) .global-header { background:var(--theme-dark-bg); color:var(--theme-dark-text); border-bottom-color:#20394f; box-shadow:none; }
html[data-allp-scene="dark-workbench"] body main:not(.full) .global-header .global-context .context-root { color:var(--theme-dark-muted); }
html[data-allp-scene="dark-workbench"] body main:not(.full) .global-header .global-context .context-group { color:var(--theme-dark-text); font-weight:600; }
html[data-allp-scene="dark-workbench"] body main:not(.full) .global-header .global-context i { color:#5f7b95; }
.global-header .environment-badge { color:#7a5311; font-weight:600; }

.global-tools { display:flex; align-items:center; gap:4px; margin-left:auto; }
.global-header .notification-button {
  position:relative; display:grid; place-items:center; width:40px; min-width:40px; height:40px; min-height:40px; padding:0; border:0; border-radius:6px; background:transparent; color:inherit;
}
.global-header .notification-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.global-header .notification-button:hover,
.global-header .notification-button:focus-visible { background:rgba(37,99,235,.1); color:var(--theme-brand); }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .notification-button,
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu>summary { background:transparent; color:var(--theme-light-text); }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .notification-button:hover,
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .notification-button:focus-visible,
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu>summary:hover,
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu>summary:focus-visible,
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu[open]>summary { background:#eaf2ff; color:var(--theme-brand); }
.notification-count:empty { display:none; }
.notification-count:not(:empty) { position:absolute; top:2px; right:1px; min-width:17px; height:17px; padding:0 4px; border:2px solid currentColor; border-radius:9px; background:var(--theme-danger); color:#fff; font-size:10px; line-height:13px; text-align:center; }

.global-header .user-menu { position:relative; }
.global-header .user-menu>summary {
  box-sizing:border-box; display:flex; align-items:center; gap:7px; min-height:40px; max-width:220px; padding:3px 7px; border:1px solid transparent; border-radius:6px; background:transparent; color:inherit; list-style:none; cursor:pointer;
}
.global-header .user-menu>summary::-webkit-details-marker { display:none; }
.global-header .user-menu>summary:hover,
.global-header .user-menu>summary:focus-visible,
.global-header .user-menu[open]>summary { background:rgba(37,99,235,.1); }
.global-header .user-label { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:inherit!important; font-size:14px; }
.user-chevron { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.7; transition:transform .16s ease; }
.user-menu[open] .user-chevron { transform:rotate(180deg); }
.global-user-avatar { display:grid; place-items:center; flex:0 0 auto; width:32px; height:32px; overflow:hidden; border:1px solid rgba(100,116,139,.25); border-radius:50%; background:#dce7f3; color:#36516d; font-size:13px; font-weight:700; }
.global-user-avatar.large { width:44px; height:44px; font-size:16px; }
.global-user-avatar img { width:100%; height:100%; object-fit:cover; }
.global-header .user-menu-panel {
  position:absolute; top:calc(100% + 8px); right:0; z-index:10020; display:grid; min-width:228px; padding:8px; border:1px solid var(--theme-light-line); border-radius:8px; background:#fff; color:var(--theme-light-text); box-shadow:0 14px 34px rgba(15,38,67,.14);
}
.user-menu-identity { display:flex; align-items:center; gap:10px; padding:4px 4px 10px; border-bottom:1px solid var(--theme-light-line); }
.user-menu-identity div { display:grid; gap:3px; min-width:0; }
.user-menu-identity b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:inherit; font-size:14px; }
.user-menu-identity small { color:var(--theme-light-muted); font-size:13px; }
.global-header .user-menu-panel>a { margin-top:6px; padding:10px; border-radius:6px; color:inherit; text-decoration:none; }
.global-header .user-menu-panel>a:hover { background:#f0f5fb; color:var(--theme-brand); }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu-panel { border-color:var(--theme-light-line); background:var(--theme-light-card); color:var(--theme-light-text); box-shadow:0 16px 38px rgba(15,38,67,.16); }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu-panel :is(span,small,a) { color:inherit; }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu-panel .user-menu-identity small { color:var(--theme-light-muted); }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu-panel>a:hover { background:#f0f5fb; color:var(--theme-brand); }
html[data-allp-scene="dark-workbench"] body main:not(.full) .global-header .user-menu>summary:hover,
html[data-allp-scene="dark-workbench"] body main:not(.full) .global-header .user-menu>summary:focus-visible,
html[data-allp-scene="dark-workbench"] body main:not(.full) .global-header .user-menu[open]>summary { border-color:#31506a; background:#10283f; }
html[data-allp-scene="dark-workbench"] body main:not(.full) .global-header .user-menu-panel { border-color:var(--theme-dark-line); background:var(--theme-dark-card); color:var(--theme-dark-text); box-shadow:0 16px 38px rgba(0,0,0,.38); }
html[data-allp-scene="dark-workbench"] .user-menu-identity { border-bottom-color:var(--theme-dark-line); }
html[data-allp-scene="dark-workbench"] .user-menu-identity small { color:var(--theme-dark-muted); }
html[data-allp-scene="dark-workbench"] .global-header .user-menu-panel>a:hover { background:#173752; color:#60a5fa; }

html[data-allp-scene] .notification-drawer {
  border-left:1px solid var(--theme-light-line);
  background:var(--theme-light-card);
  color:var(--theme-light-text);
}
html[data-allp-scene] .notification-drawer::backdrop { background:rgba(8,24,39,.62); }
html[data-allp-scene] .notification-head,
html[data-allp-scene] .notification-tabs,
html[data-allp-scene] .notification-item { border-color:var(--theme-light-line); }
html[data-allp-scene] .notification-head small,
html[data-allp-scene] .notification-empty,
html[data-allp-scene] .notification-item small { color:var(--theme-light-muted); }
html[data-allp-scene] .notification-item { color:var(--theme-light-text); }
html[data-allp-scene] .notification-item:hover { background:#f0f5fb; }
html[data-allp-scene] .notification-tabs button.on { border-color:var(--theme-brand); background:#eaf2ff; color:var(--theme-brand); }
html[data-allp-scene] .notification-head { min-height:72px; padding:16px 18px; }
html[data-allp-scene] .notification-head h2 { color:inherit; font-size:20px!important; }
html[data-allp-scene] .notification-head button.ghost { min-width:auto; min-height:34px; padding:5px 10px; border:1px solid var(--theme-light-line); background:transparent; color:var(--theme-light-text); }
html[data-allp-scene] .notification-head button.ghost:hover,
html[data-allp-scene] .notification-head button.ghost:focus-visible { border-color:#aac3e7; background:#eaf2ff; color:var(--theme-brand); }
html[data-allp-scene] .notification-tabs { padding:10px 14px; }
html[data-allp-scene] .notification-tabs button { min-height:32px; border:1px solid transparent; background:transparent; color:var(--theme-light-muted); }
html[data-allp-scene] .notification-tabs #markAllNotificationsRead { margin-left:auto; color:var(--theme-brand); }
html[data-allp-scene] .notification-empty { min-height:240px; }
html[data-allp-scene] .notification-empty b { display:block; margin-bottom:6px; color:var(--theme-light-text); }
html[data-allp-scene] .notification-empty small { display:block; }
html[data-allp-scene="dark-workbench"] .notification-drawer {
  border-left-color:var(--theme-dark-line);
  background:var(--theme-dark-card);
  color:var(--theme-dark-text);
}
html[data-allp-scene="dark-workbench"] .notification-head,
html[data-allp-scene="dark-workbench"] .notification-tabs,
html[data-allp-scene="dark-workbench"] .notification-item { border-color:var(--theme-dark-line); }
html[data-allp-scene="dark-workbench"] .notification-head small,
html[data-allp-scene="dark-workbench"] .notification-empty,
html[data-allp-scene="dark-workbench"] .notification-item small { color:var(--theme-dark-muted); }
html[data-allp-scene="dark-workbench"] .notification-item { color:var(--theme-dark-text); }
html[data-allp-scene="dark-workbench"] .notification-item:hover { background:#173752; }
html[data-allp-scene="dark-workbench"] .notification-tabs button.on { border-color:#60a5fa; background:#173752; color:#8ec5ff; }
html[data-allp-scene="dark-workbench"] .notification-head button.ghost { border-color:var(--theme-dark-line); color:var(--theme-dark-text); }
html[data-allp-scene="dark-workbench"] .notification-head button.ghost:hover,
html[data-allp-scene="dark-workbench"] .notification-head button.ghost:focus-visible { border-color:#4c7291; background:#173752; color:#8ec5ff; }
html[data-allp-scene="dark-workbench"] .notification-tabs button { color:var(--theme-dark-muted); }
html[data-allp-scene="dark-workbench"] .notification-tabs #markAllNotificationsRead { color:#8ec5ff; }
html[data-allp-scene="dark-workbench"] .notification-empty b { color:var(--theme-dark-text); }

html[data-allp-scene="light-workbench"] body main:not(.full) { background:var(--theme-light-bg); color:var(--theme-light-text); }
html[data-allp-scene="light-workbench"] body:has(.vin-page-header) main:not(.full) { padding:18px 24px 28px; }
html[data-allp-scene="light-workbench"] body:has(.vin-page-header) :is(.vehicle-filter,.vin-list-panel) { border:1px solid var(--theme-light-line); border-radius:8px; background:#fff; box-shadow:0 2px 8px rgba(15,38,67,.035); }

html[data-allp-scene="dark-workbench"] body main:not(.full) { background:var(--theme-dark-bg); color:var(--theme-dark-text); }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) main:not(.full) { padding:16px 20px 24px; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .panel { border-color:var(--theme-dark-line); background:var(--theme-dark-card); box-shadow:none; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .ops-head { gap:24px; padding-bottom:11px; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .ops-filter { gap:9px; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .ops-filter button { border-color:var(--theme-brand); background:var(--theme-brand); color:#fff; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .ops-filter .btn.ghost { border-color:#31506a; background:transparent; color:var(--theme-dark-text); }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .ops-filter .btn.ghost:hover,
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .ops-filter .btn.ghost:focus-visible { border-color:#4c7291; background:#173752; color:#8ec5ff; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .kpis { margin-top:3px; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .map-placeholder { background:radial-gradient(circle at center,#12324a,#0b2133); }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .map-empty-state { display:grid; justify-items:center; gap:5px; max-width:360px; padding:22px; text-align:center; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .map-empty-state svg { width:30px; height:30px; margin-bottom:3px; fill:none; stroke:#60a5fa; stroke-width:1.6; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .map-empty-state b { color:var(--theme-dark-text); font-size:15px; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .map-empty-state small { color:var(--theme-dark-muted); font-size:12px!important; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table { table-layout:fixed; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table :is(th,td) { overflow-wrap:normal; word-break:keep-all; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table th:nth-child(1) { width:9%; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table th:nth-child(2) { width:39%; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table th:nth-child(3) { width:14%; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table th:nth-child(4) { width:12%; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table th:nth-child(5) { width:16%; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table th:nth-child(6) { width:10%; }
html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table td:nth-child(2) a { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

@media(max-width:1500px) and (min-width:981px){
  html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .main-grid { grid-template-columns:minmax(0,61fr) minmax(430px,39fr)!important; }
  html[data-allp-scene="dark-workbench"] body:has(.cockpit) .cockpit .top-table :is(th,td) { padding-inline:4px; }
}

@media(max-width:900px){
  html[data-allp-scene] body main:not(.full) .global-header { padding:0 14px; }
  .global-header .global-context .context-group, .global-header .global-context i { display:none; }
  .global-header .user-label { max-width:86px; }
}
