/* 笔记本首页：地图占据视口余量，设备与协同信息栏独立滚动。 */
body.monitor-compact {
  height: 100dvh;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  --muted: #abc0b3;
}

body.monitor-compact #app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  min-height: 0;
}

body.monitor-compact .site-header {
  display: flex;
  align-items: center;
  flex: 0 0 56px;
  gap: 24px;
  min-width: 0;
  padding: 0 16px;
  background: #12251f;
  z-index: 40;
}

body.monitor-compact .header-top { display: contents; }
body.monitor-compact .brand { order: 0; flex-shrink: 0; gap: 8px; }
body.monitor-compact .brand-symbol { width: 32px; height: 32px; border-radius: 7px; }
body.monitor-compact .brand-logo { width: 28px; height: 28px; }
body.monitor-compact .brand-name { font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
body.monitor-compact .brand-caption { display: none !important; }
body.monitor-compact .header-tools { order: 2; margin-left: auto; gap: 10px; flex-shrink: 0; }
body.monitor-compact .header-clock { font-size: 11px; }
body.monitor-compact .account-trigger { padding: 3px; gap: 6px; min-height: 32px; }
body.monitor-compact .account-name { max-width: 74px; font-size: 12px; }
body.monitor-compact .avatar { width: 28px; height: 28px; }
body.monitor-compact .site-nav {
  order: 1;
  margin: 0;
  flex-wrap: nowrap;
  gap: 18px;
  min-width: 0;
  min-height: 56px;
}
body.monitor-compact .site-nav a { min-height: 56px; gap: 6px; padding: 0 1px; white-space: nowrap; font-size: 12px; }
body.monitor-compact .site-nav svg { width: 17px; height: 17px; }
body.monitor-compact .nav-end,
body.monitor-compact .site-footer,
body.monitor-compact .monitor-page > .page-head { display: none; }

body.monitor-compact .monitor-page,
body.monitor-compact .monitor-page.single {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 10px;
  overflow: hidden;
}

body.monitor-compact .monitor-stats {
  flex: 0 0 58px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  height: 58px;
  margin: 0;
}

body.monitor-compact .monitor-stats .metric {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 7px 13px;
  border-radius: 7px;
  background: #172b23;
}
body.monitor-compact .metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: #294536;
  color: #bce4a1;
}
body.monitor-compact .metric-icon svg { width: 26px; height: 26px; }
body.monitor-compact .metric-copy { min-width: 0; }
body.monitor-compact .metric label { margin: 0 0 2px; font-size: 11px; line-height: 1.25; }
body.monitor-compact .metric strong { font-size: 23px; line-height: 1.1; white-space: nowrap; }
body.monitor-compact .metric small { font-size: 11px; margin-left: 5px; }
body.monitor-compact .metric-context { display: none; }

body.monitor-compact .monitor-notice { flex: 0 0 auto; min-height: 0; }
body.monitor-compact .monitor-notice:empty { display: none; }
body.monitor-compact .monitor-notice .error-banner {
  margin: 0;
  padding: 5px 10px;
  max-height: 58px;
  overflow: auto;
  font-size: 12px;
}

body.monitor-compact .monitor-page .monitor-grid,
body.monitor-compact .monitor-page.single .monitor-grid {
  position: relative;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr) 244px;
  flex: 1 1 0;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 0;
  min-width: 0;
  align-items: stretch;
}

body.monitor-compact .fleet-panel,
body.monitor-compact .relation-panel {
  display: flex;
  flex-direction: column;
  grid-column: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border-radius: 7px;
  background: #182b24;
}
body.monitor-compact .panel-head { flex: 0 0 auto; gap: 8px; min-height: 39px; padding: 8px 11px; }
body.monitor-compact .panel-head h2 { font-size: 13px; line-height: 1.4; }
body.monitor-compact .panel-head .muted { font-size: 11px; }
body.monitor-compact .panel-head .badge { padding: 2px 5px; font-size: 11px; }
body.monitor-compact .fleet-tools { gap: 7px; padding: 9px 10px; }
body.monitor-compact .fleet-tools input { height: 32px; padding: 6px 8px; font-size: 12px; }
body.monitor-compact .fleet-selects { gap: 6px; }
body.monitor-compact .fleet-selects select { height: 32px; padding: 4px; font-size: 12px; }
body.monitor-compact .fleet-list { padding: 0 6px; overflow: auto; overscroll-behavior: contain; }
body.monitor-compact .fleet-row { align-items: center; min-height: 66px; padding: 9px 7px; gap: 8px; border-radius: 5px; }
body.monitor-compact .machine-symbol { display: grid; place-items: center; width: 28px; padding: 0; }
body.monitor-compact .machine-symbol svg { width: 25px; height: 25px; }
body.monitor-compact .fleet-row-main { flex: 1; min-width: 0; }
body.monitor-compact .fleet-row-main strong { font-size: 12px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.monitor-compact .fleet-row-head,
body.monitor-compact .fleet-identity { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
body.monitor-compact .fleet-row-main .badge { margin: 0; padding: 1px 4px; font-size: 10px; line-height: 1.4; }
body.monitor-compact .fleet-readings,
body.monitor-compact .fleet-row-main p { display: flex; justify-content: space-between; gap: 6px; margin: 5px 0 0; font-size: 11px; line-height: 1.35; color: #b4c8ba; }
body.monitor-compact .fleet-readings span { white-space: nowrap; }
body.monitor-compact .fleet-pagination { flex: 0 0 auto; min-height: 44px; padding: 6px 9px; gap: 5px; }
body.monitor-compact .fleet-pagination button { width: 32px; height: 32px; padding: 0; font-size: 20px; }
body.monitor-compact .fleet-loading { padding: 24px 9px; line-height: 1.8; }

body.monitor-compact .monitor-page .map-panel { min-width: 0; min-height: 0; height: 100%; border-radius: 7px; }
body.monitor-compact .live-map { inset: 0; }
body.monitor-compact .map-toolbar,
body.monitor-compact .map-tools-top { position: absolute; top: 10px; display: flex; align-items: center; gap: 6px; z-index: 30; }
body.monitor-compact .map-toolbar { left: 10px; }
body.monitor-compact .map-tools-top { right: 10px; }
body.monitor-compact .map-toolbar .btn,
body.monitor-compact .map-tools-top .btn {
  min-height: 32px;
  height: 32px;
  gap: 5px;
  padding: 5px 9px;
  border-color: #567361;
  background: #172c22f5;
  box-shadow: 0 2px 8px #0003;
  color: #ebf5ed;
  font-size: 12px;
  white-space: nowrap;
}
body.monitor-compact .map-toolbar .btn[aria-pressed="true"],
body.monitor-compact .map-toolbar .btn.primary { color: #12261c; background: #a4d6a2; border-color: #a4d6a2; }
body.monitor-compact .map-toolbar .btn svg,
body.monitor-compact .map-tools-top .btn svg { width: 16px; height: 16px; }
body.monitor-compact .map-tools-top .icon-button { width: 32px; padding: 0; }
body.monitor-compact .map-overlay-title { top: 52px; left: 10px; max-width: calc(100% - 20px); padding: 4px 8px; border: 0; }
body.monitor-compact .map-overlay-title h2 { font-size: 12px; font-weight: 500; }
body.monitor-compact .map-overlay-title p { display: none; }
body.monitor-compact .map-controls { right: 10px; bottom: 68px; gap: 5px; }
body.monitor-compact .map-controls .btn { display: grid; place-items: center; width: 34px; height: 34px; min-height: 34px; max-width: 34px; padding: 0; border-radius: 5px; }
body.monitor-compact .map-controls .btn svg { width: 18px; height: 18px; }
body.monitor-compact .map-bottom { left: 10px; right: 10px; bottom: 32px; gap: 7px; flex-wrap: nowrap; font-size: 10px; white-space: nowrap; }
body.monitor-compact .map-bottom span { padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; }
body.monitor-compact .map-bottom span:first-child { flex-shrink: 0; }
body.monitor-compact .map-fallback { padding: 85px 20px 75px; }
body.monitor-compact .map-fallback h3 { font-size: 16px; }
body.monitor-compact .map-fallback p { font-size: 12px; }
body.monitor-compact .map-marker-symbol { width: 35px; height: 35px; }
body.monitor-compact .map-marker-symbol svg { width: 25px; height: 25px; }
body.monitor-compact .map-marker-name { max-width: 145px; }

body.monitor-compact .relation-body { display: block; padding: 10px; overflow: auto; overscroll-behavior: contain; }
body.monitor-compact .selected-summary { grid-template-columns: 1fr 1fr; grid-column: auto; gap: 8px; padding: 0 0 10px; margin: 0 0 8px; border-bottom: 1px solid var(--line); }
body.monitor-compact .selected-summary label { font-size: 11px; }
body.monitor-compact .selected-summary strong { font-size: 23px; line-height: 1.2; margin-top: 3px; }
body.monitor-compact .selected-summary small { font-size: 11px; }
body.monitor-compact .location-caption { display: flex; align-items: center; gap: 5px; grid-column: auto; margin: 0 0 10px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.monitor-compact .location-caption svg { width: 13px; height: 13px; }
body.monitor-compact .relation-section { margin-top: 12px; }
body.monitor-compact .relation-section:first-child { margin-top: 0; }
body.monitor-compact .relation-section h3 { align-items: center; gap: 6px; margin-bottom: 7px; font-size: 12px; }
body.monitor-compact .truck-card { padding: 9px; margin-bottom: 7px; border-radius: 6px; }
body.monitor-compact .truck-card-top { align-items: center; gap: 5px; }
body.monitor-compact .truck-card-top strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.monitor-compact .truck-identity { display: flex; align-items: center; gap: 6px; min-width: 0; }
body.monitor-compact .truck-identity svg { width: 23px; height: 23px; }
body.monitor-compact .truck-card-top .badge { font-size: 10px; padding: 1px 4px; }
body.monitor-compact .load-bar-row { gap: 7px; margin-top: 9px; font-size: 12px; }
body.monitor-compact .load-track { height: 5px; }
body.monitor-compact .truck-card-bottom,
body.monitor-compact .truck-card-data { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 11px; margin-top: 7px; }
body.monitor-compact .truck-card-bottom .task-link { margin: 0; }
body.monitor-compact .task-link { font-size: 11px; }
body.monitor-compact .task-snapshot-time { font-size: 10px; margin-top: 5px; }
body.monitor-compact .relation-empty { padding: 9px; font-size: 12px; }
body.monitor-compact .selected-footer { flex: 0 0 auto; padding: 7px 10px; font-size: 12px; }
body.monitor-compact .selected-footer .btn { width: 100%; min-height: 32px; padding: 5px 9px; font-size: 12px; }
body.monitor-compact .no-selection { padding: 24px 13px; font-size: 12px; }

body.monitor-compact .monitor-strip { flex: 0 0 24px; min-height: 24px; margin: 0; padding: 0 7px; gap: 10px; border: 0; border-radius: 0; background: transparent; font-size: 11px; flex-wrap: nowrap; white-space: nowrap; }
body.monitor-compact .monitor-strip .phase-counts { gap: 14px; flex-wrap: nowrap; }
body.monitor-compact .monitor-strip > span { overflow: hidden; text-overflow: ellipsis; }
body.monitor-compact .monitor-strip b { margin-left: 3px; }
body.monitor-compact .operation-info { flex: 0 0 auto; max-height: 110px; overflow: auto; margin: 0; padding: 10px 13px; gap: 10px 15px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.monitor-compact .operation-info p { margin-top: 3px; font-size: 12px; }
body.monitor-compact .operation-info .wide { grid-column: span 2; }

body.monitor-compact .monitor-page.focus-map .monitor-grid { grid-template-columns: minmax(0, 1fr); }
body.monitor-compact .monitor-page.focus-map .fleet-panel,
body.monitor-compact .monitor-page.focus-map .relation-panel { display: none; }
body.monitor-compact .monitor-page.focus-map .map-panel { grid-column: 1; }
body.monitor-compact .btn:focus-visible,
body.monitor-compact .fleet-row:focus-visible { outline: 2px solid #c9f3ba; outline-offset: -3px; }
body.monitor-compact .btn.small { min-height: 32px; }

@media (min-width: 1680px) {
  body.monitor-compact .site-header { padding-inline: 20px; gap: 32px; }
  body.monitor-compact .site-nav { gap: 24px; }
  body.monitor-compact .monitor-page .monitor-grid,
  body.monitor-compact .monitor-page.single .monitor-grid { grid-template-columns: 228px minmax(0, 1fr) 264px; }
}

/* 125% 缩放时优先收起设备栏，不压缩地图到狭长小窗。 */
@media (max-width: 1199px) {
  body.monitor-compact .site-header { gap: 18px; padding-inline: 12px; }
  body.monitor-compact .header-clock { display: none; }
  body.monitor-compact .site-nav { gap: 13px; }
  body.monitor-compact .brand-name { font-size: 14px; }
  body.monitor-compact .monitor-page .monitor-grid,
  body.monitor-compact .monitor-page.single .monitor-grid { grid-template-columns: minmax(0, 1fr) 244px; }
  body.monitor-compact .fleet-panel { display: none; }
  body.monitor-compact .monitor-page.fleet-open:not(.focus-map) .fleet-panel {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 35;
    display: flex;
    width: min(280px, calc(100% - 44px));
    height: 100%;
    box-shadow: 12px 0 28px #0008;
  }
}

@media (max-width: 799px) {
  body.monitor-compact .site-header { flex-basis: 50px; gap: 12px; padding-inline: 10px; }
  body.monitor-compact .site-nav { gap: 9px; min-height: 50px; }
  body.monitor-compact .site-nav a { min-height: 50px; }
  body.monitor-compact .brand-name { font-size: 13px; }
  body.monitor-compact .account-name,
  body.monitor-compact .header-tools > #fullscreen { display: none; }
  body.monitor-compact .monitor-page,
  body.monitor-compact .monitor-page.single { padding: 7px; gap: 7px; }
  body.monitor-compact .monitor-stats { height: 54px; flex-basis: 54px; gap: 7px; }
  body.monitor-compact .monitor-stats .metric { padding: 6px 8px; gap: 7px; }
  body.monitor-compact .metric-icon { flex-basis: 28px; width: 28px; height: 32px; background: none; }
  body.monitor-compact .metric-icon svg { width: 25px; height: 25px; }
  body.monitor-compact .metric strong { font-size: 20px; }
  body.monitor-compact .monitor-page .monitor-grid,
  body.monitor-compact .monitor-page.single .monitor-grid { grid-template-columns: minmax(0, 1fr); }
  body.monitor-compact .relation-panel { display: none; }
  body.monitor-compact .monitor-page.relations-open:not(.focus-map) .relation-panel {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 35;
    display: flex;
    width: min(280px, calc(100% - 44px));
    height: 100%;
    box-shadow: -12px 0 28px #0008;
  }
  body.monitor-compact .monitor-strip .phase-counts { gap: 9px; }
  body.monitor-compact .operation-info { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 94px; }
}

@media (max-width: 649px) {
  body.monitor-compact .site-header { gap: 10px; }
  body.monitor-compact .brand > span:not(.brand-symbol) { display: none; }
  body.monitor-compact .site-nav { justify-content: space-evenly; flex: 1; gap: 5px; }
  body.monitor-compact .site-nav a { font-size: 0; min-width: 32px; justify-content: center; }
  body.monitor-compact .site-nav svg { width: 20px; height: 20px; }
  body.monitor-compact .header-tools { gap: 0; }
  body.monitor-compact .monitor-stats { height: 112px; flex-basis: 112px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.monitor-compact .monitor-stats .metric { padding: 6px 11px; }
  body.monitor-compact .map-toolbar { top: 8px; left: 8px; gap: 4px; }
  body.monitor-compact .map-toolbar .btn { padding-inline: 7px; }
  body.monitor-compact .map-tools-top { top: 46px; right: 8px; }
  body.monitor-compact .map-overlay-title { top: 46px; left: 8px; max-width: calc(100% - 112px); }
  body.monitor-compact .map-bottom { gap: 4px; left: 8px; right: 8px; }
  body.monitor-compact .map-bottom span { padding-inline: 4px; }
  body.monitor-compact .monitor-strip { font-size: 10px; gap: 5px; }
  body.monitor-compact .monitor-strip .phase-counts { gap: 7px; }
}

@media (max-height: 560px) and (min-width: 650px) {
  body.monitor-compact .site-header { flex-basis: 46px; }
  body.monitor-compact .site-nav,
  body.monitor-compact .site-nav a { min-height: 46px; }
  body.monitor-compact .monitor-stats { height: 50px; flex-basis: 50px; }
  body.monitor-compact .monitor-stats .metric { padding-block: 5px; }
  body.monitor-compact .metric strong { font-size: 21px; }
  body.monitor-compact .operation-info { max-height: 80px; }
}

/* 专注地图始终高于各断点的列布局；抽屉关闭入口保持键盘可访问。 */
body.monitor-compact .monitor-page.focus-map .monitor-grid { grid-template-columns: minmax(0, 1fr); }
body.monitor-compact .panel-close { width: 32px; height: 32px; min-height: 32px; padding: 0; }
body.monitor-compact .fleet-position-note { display:block; margin-top:4px; font-size:10px; color:var(--gold); }
body.monitor-compact .fleet-readings small { font-size:9px; margin-left:2px; }
body.monitor-compact .telemetry-more { margin-left:auto; display:grid; place-items:center; border:1px solid #45634f; border-radius:4px; background:transparent; color:var(--muted); min-width:28px; min-height:28px; cursor:pointer; }
body.monitor-compact .target-cue { display:flex; align-items:center; gap:5px; margin-top:6px; font-size:11px; color:var(--gold); }
@media(min-width:1200px){body.monitor-compact #toggle-fleet,body.monitor-compact .fleet-close{display:none}}
@media(min-width:800px){body.monitor-compact #toggle-relations,body.monitor-compact .relation-close{display:none}}
body.monitor-compact .compact-search { position:relative; }
body.monitor-compact .compact-search>svg { position:absolute; left:9px; top:9px; color:var(--muted); pointer-events:none; }
body.monitor-compact .compact-search input { padding-left:30px; }
@media(max-height:560px) and (min-width:650px){
  body.monitor-compact .map-controls { display:flex; right:10px; bottom:64px; flex-direction:row; gap:5px; }
}

/* 地块是独立配置范围，状态只占一行，详情可折叠查看。 */
body.monitor-compact .field-caption{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:-3px 0 10px;font-size:11px;color:var(--muted);min-height:28px;}
body.monitor-compact .field-caption>span{display:flex;align-items:center;gap:4px;min-width:0;}
body.monitor-compact .field-caption .btn{padding:3px 7px;min-height:28px;font-size:11px;flex-shrink:0;}
