/* 民政专项服务政企协同数据大屏（亲民暖阳民生风 · 3套布局方案） */
.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: linear-gradient(180deg, #faf3e8 0%, #f5eadb 100%);
  color: #2d1e17;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.screen-overlay.open {
  display: flex;
}

/* 顶部亲民暖红金政务大屏横幅 */
.ds-header {
  position: relative;
  height: 62px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: linear-gradient(90deg, #a73420 0%, #ca492a 48%, #dc6538 100%);
  border-bottom: 3px solid #f5be6b;
  box-shadow: 0 4px 18px rgba(145, 52, 28, 0.22);
  flex-shrink: 0;
  z-index: 30;
}

.ds-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 246, 236, 0.92);
}

.ds-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff6d6;
  white-space: nowrap;
}

.ds-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 240, 210, 0.35);
  color: #fffaf0;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ds-title-center {
  text-align: center;
  padding: 0 18px;
}

.ds-title-center h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(96, 24, 12, 0.25);
  white-space: nowrap;
}

.ds-title-center p {
  font-size: 11px;
  color: #ffe8cc;
  margin-top: 1px;
  white-space: nowrap;
}

.ds-header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

/* 3套布局方案切换胶囊 */
.ds-layout-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(84, 22, 12, 0.28);
  border: 1px solid rgba(255, 236, 208, 0.35);
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
}

.ds-layout-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255, 244, 230, 0.88);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.ds-layout-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ds-layout-btn.active {
  background: #fff7e6;
  color: #a73420;
  box-shadow: 0 2px 6px rgba(96, 24, 12, 0.2);
}

.ds-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid rgba(255, 236, 210, 0.52);
  background: rgba(255, 255, 255, 0.14);
  color: #fffaf4;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.ds-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.ds-btn.primary {
  background: #fff7e6;
  border-color: #fde4b4;
  color: #a73420;
}

.ds-btn.primary:hover {
  background: #ffffff;
}

/* 大屏主舞台容器 */
.ds-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

/* ================= 2.5D 暖色高精矢量地图样式 ================= */
.map-canvas-full {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, #fffaf2 0%, #f7ecdd 58%, #efe0cc 100%);
  overflow: hidden;
}

.map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-zone-shadow {
  fill: rgba(154, 72, 34, 0.2);
  pointer-events: none;
}

.map-zone-poly {
  stroke: #ffffff;
  stroke-width: 2.2;
  cursor: pointer;
  transition: all 0.22s ease;
}

.map-zone-poly:hover {
  filter: brightness(0.96) drop-shadow(0 6px 14px rgba(190, 72, 38, 0.25));
}

.map-zone-poly.active {
  stroke: #b23a22;
  stroke-width: 3;
  filter: drop-shadow(0 8px 18px rgba(178, 58, 34, 0.34));
}

@keyframes mapPulse {
  0% {
    r: 6;
    opacity: 0.65;
  }
  100% {
    r: 20;
    opacity: 0;
  }
}

.pulse-ring {
  animation: mapPulse 2.4s ease-out infinite;
  pointer-events: none;
}

/* 地图上的跟随式毛玻璃聚焦气泡卡 */
.map-popup-card {
  position: absolute;
  z-index: 16;
  width: 234px;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(12px);
  border: 1.5px solid #e79e72;
  box-shadow: 0 10px 28px rgba(138, 58, 24, 0.18);
  pointer-events: auto;
  transform: translate(-50%, -118%);
  transition: left 0.28s ease, top 0.28s ease;
}

.map-popup-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(255, 253, 249, 0.96);
  border-right: 1.5px solid #e79e72;
  border-bottom: 1.5px solid #e79e72;
}

.map-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.map-popup-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #3a2319;
}

.map-popup-rate {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fdebe2;
  color: #b83f22;
}

.map-popup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px 8px;
  font-size: 11.5px;
  color: #7c5b48;
}

.map-popup-grid strong {
  color: #2d1e17;
  font-weight: 700;
}

/* ================= 通用毛玻璃浮窗面板 ================= */
.glass-panel {
  background: rgba(255, 252, 247, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(232, 198, 166, 0.85);
  border-radius: 14px;
  padding: 13px 15px;
  box-shadow: 0 8px 28px rgba(132, 66, 30, 0.11);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.glass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(232, 206, 182, 0.65);
  flex-shrink: 0;
}

.glass-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #3a2319;
  display: flex;
  align-items: center;
  gap: 7px;
}

.glass-title::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #cf4e2e, #f2994a);
}

.glass-sub {
  font-size: 11px;
  color: #9b6b4e;
  font-weight: 500;
}

/* ================= 方案一：全屏地图 + 浮动窗口驾驶舱 ================= */
.s1-top-kpis {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 10px;
}

.s1-kpi-pill {
  min-width: 148px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(235, 198, 162, 0.9);
  box-shadow: 0 6px 20px rgba(132, 66, 30, 0.12);
  text-align: center;
}

.s1-kpi-pill small {
  display: block;
  font-size: 11px;
  color: #7c5b48;
  font-weight: 600;
}

.s1-kpi-pill strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #c84b31;
}

.s1-kpi-pill strong.green { color: #257a5c; }
.s1-kpi-pill strong.amber { color: #d97706; }
.s1-kpi-pill strong.purple { color: #9b4d6f; }

.s1-kpi-pill span {
  display: block;
  font-size: 10.5px;
  color: #9c8273;
  margin-top: 1px;
}

.s1-float-left,
.s1-float-right {
  position: absolute;
  top: 14px;
  bottom: 14px;
  width: 312px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.s1-float-left {
  left: 14px;
}

.s1-float-right {
  right: 14px;
}

.s1-float-left.collapsed {
  transform: translateX(-340px);
  opacity: 0;
  pointer-events: none;
}

.s1-float-right.collapsed {
  transform: translateX(340px);
  opacity: 0;
  pointer-events: none;
}

/* 底部居中地图控制悬浮条 */
.s1-bottom-bar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(232, 194, 158, 0.95);
  box-shadow: 0 8px 24px rgba(132, 66, 30, 0.16);
}

.map-layer-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #6b4f3f;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.map-layer-btn:hover {
  background: #fdebe2;
  color: #b23a22;
}

.map-layer-btn.active {
  background: linear-gradient(135deg, #cf4e2e, #ea8244);
  color: #fff;
  box-shadow: 0 2px 8px rgba(207, 78, 46, 0.3);
}

.bar-divider {
  width: 1px;
  height: 16px;
  background: #e6d2bf;
}

/* 独立热力图例胶囊（按各方案安全区放置，永不遮挡） */
.map-legend-pill {
  position: absolute;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #e6d1bc;
  font-size: 11px;
  color: #7c5b48;
  box-shadow: 0 4px 12px rgba(132, 66, 30, 0.08);
  white-space: nowrap;
}

.map-legend-pill i {
  display: inline-block;
  width: 12px;
  height: 9px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 3px;
}

.legend-s1 {
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
}

.legend-s2 {
  left: 14px;
  bottom: 12px;
}

.legend-s3 {
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
}

/* 可展开的迷你趋势浮窗（方案一） */
.s1-trend-popover {
  position: absolute;
  left: 50%;
  bottom: 98px;
  transform: translateX(-50%);
  width: 560px;
  z-index: 21;
}

/* ================= 方案二：政务汇报 · 上图下表稳重版 ================= */
.s2-wrap {
  height: 100%;
  padding: 14px 18px 16px;
  display: grid;
  grid-template-rows: 1.55fr 1fr;
  gap: 14px;
}

.s2-top {
  display: grid;
  grid-template-columns: 1.68fr 1fr;
  gap: 14px;
  min-height: 0;
}

.s2-map-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid #e9d2bc;
  overflow: hidden;
  background: radial-gradient(circle at 50% 48%, #fffaf2 0%, #f5e8d7 100%);
  box-shadow: 0 6px 20px rgba(132, 66, 30, 0.08);
}

.s2-map-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid #ecd4be;
  font-size: 13px;
  font-weight: 700;
  color: #3a2319;
}

.s2-map-layers {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 12;
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid #ecd4be;
}

.s2-right-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.s2-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  flex-shrink: 0;
}

.s2-bottom {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 14px;
  min-height: 0;
}

/* ================= 方案三：极简全景 + 底部互动 Dock 版 ================= */
.s3-top-left {
  position: absolute;
  top: 14px;
  left: 16px;
  width: 310px;
  z-index: 20;
}

.s3-top-right {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 320px;
  z-index: 20;
}

.s3-dock {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  height: 196px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 1fr;
  gap: 12px;
}

/* ================= 公共内部图表/条形/播报样式 ================= */
.ds-bar-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  flex: 1;
  overflow-y: auto;
  padding-right: 3px;
}

.ds-bar-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}

.ds-bar-name {
  color: #3a2319;
  font-weight: 600;
}

.ds-bar-val {
  color: #9b5a3c;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
}

.ds-track {
  height: 7px;
  border-radius: 999px;
  background: #f3e6d8;
  overflow: hidden;
}

.ds-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #cf4e2e, #f2994a);
}

.ds-fill.green { background: linear-gradient(90deg, #257a5c, #52b788); }
.ds-fill.amber { background: linear-gradient(90deg, #d97706, #f6ba54); }

.ds-donut-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.ds-donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ds-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.ds-legend-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5c4335;
}

.ds-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.ds-feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(207, 78, 46, 0.28) transparent;
}

.ds-feed-list::-webkit-scrollbar,
.ds-bar-list::-webkit-scrollbar {
  width: 4px;
}

.ds-feed-list::-webkit-scrollbar-thumb,
.ds-bar-list::-webkit-scrollbar-thumb {
  background: rgba(207, 78, 46, 0.28);
  border-radius: 999px;
}

.ds-feed-item {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255, 248, 239, 0.9);
  border: 1px solid #f1dfd0;
  font-size: 11.5px;
  line-height: 1.38;
}

.ds-feed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.ds-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.ds-tag.cyan { background: #fdebe2; color: #b84224; }
.ds-tag.green { background: #e6f5ee; color: #216e52; }
.ds-tag.amber { background: #fff1d6; color: #b86207; }
.ds-tag.purple { background: #f8e8ef; color: #8f3e60; }

.ds-feed-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: #a68d7d;
}

.ds-feed-text {
  color: #3f2b21;
}

.ds-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
  flex-shrink: 0;
}

.ds-mini-box {
  background: #fff6ec;
  border: 1px solid #f1d9c1;
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
}

.ds-mini-box strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.ds-mini-box span {
  display: block;
  font-size: 10px;
  color: #8c6c58;
  margin-top: 1px;
}

/* 常规后台顶部进入大屏按钮 */
.btn-screen-launch {
  height: 32px;
  padding: 0 13px;
  border-radius: 7px;
  border: none;
  background: linear-gradient(135deg, #c84b31, #ea7d43);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(200, 75, 49, 0.28);
  white-space: nowrap;
}

.btn-screen-launch:hover {
  filter: brightness(1.06);
}

@media (max-width: 1180px) {
  .ds-header-left .ds-live-pill {
    display: none;
  }
  .s1-top-kpis {
    gap: 6px;
  }
  .s1-kpi-pill {
    min-width: 116px;
    padding: 7px 8px;
  }
  .s1-float-left,
  .s1-float-right {
    width: 268px;
  }
}
