/* 双碳成果看板样式 */

/* 覆盖 components.css 中的默认样式 */
.carbon-hero {
  min-height: 280px !important;
  height: auto !important;
  overflow: visible !important;
  padding: 1rem !important;
  margin: 1.5rem !important;
  text-align: left !important;
}

.hero-section {
  padding: 0 !important;
}

.hero-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 1rem !important;
  min-height: 250px !important;
}

.hero-grid-v2 {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

.hero-row {
  display: flex !important;
  gap: 1rem !important;
}

.hero-row-summary {
  flex-direction: row !important;
}

.hero-row-visualization {
  flex-direction: row !important;
}

.hero-col {
  border-radius: 12px !important;
  padding: 1rem !important;
  background: var(--surface) !important;
  border: 1px solid var(--border-color) !important;
  min-height: 230px !important;
  display: flex !important;
  flex-direction: column !important;
}

.hero-col-main {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  background: var(--surface) !important;
  border: 2px solid var(--primary-30) !important;
  backdrop-filter: blur(10px);
}

.hero-col-main-full {
  width: 100% !important;
  min-height: 140px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  background: var(--surface) !important;
  border: 2px solid var(--primary-30) !important;
  backdrop-filter: blur(10px);
}

.hero-col-map-large {
  flex: 1 !important;
  min-height: 480px !important;
}

.hero-col-globe-large {
  flex: 1 !important;
  min-height: 480px !important;
}

.hero-content {
  align-items: flex-start !important;
  gap: 0.5rem !important;
}

.hero-actions {
  justify-content: flex-start !important;
  gap: 0.5rem !important;
  margin-top: 0.8rem !important;
}

.hero-title {
  font-size: 1.15rem !important;
  background: linear-gradient(135deg, var(--green) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700 !important;
}

.hero-desc {
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
}

.hero-meta {
  color: var(--muted) !important;
  font-size: 0.75rem !important;
}

.hero-actions .btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  font-size: 0.82rem !important;
}

.hero-actions .btn:hover {
  background: var(--primary-10) !important;
  border-color: var(--primary-30) !important;
  color: var(--green) !important;
  transform: translateY(-2px);
}

/* 中国地图容器 */
.map-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
}

.map-container-large {
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
  background: var(--surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
}

.map-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.map-legend {
  display: flex;
  gap: 0.5rem;
  font-size: 0.65rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.hot { background: var(--danger, #ef4444); }
.legend-dot.medium { background: var(--warning, #f59e0b); }
.legend-dot.cool { background: var(--green); }

.map-3d-view {
  flex: 1;
  min-height: 140px;
  background: var(--bg-base) !important;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  margin: 0 0.5rem;
}

.china-map-svg {
  width: 100% !important;
  height: 100% !important;
  background: transparent;
}

.china-map-svg .terrain-layer path {
  transition: all 0.3s ease;
}

.china-map-svg .terrain-layer path:hover {
  opacity: 0.8;
}

.china-map-svg .province {
  cursor: pointer;
  transition: all 0.3s ease;
}

.china-map-svg .province:hover {
  filter: brightness(1.3);
}

.map-tooltip {
  position: absolute;
  background: var(--bg-overlay, rgba(0, 0, 0, 0.9));
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  pointer-events: none;
  z-index: 100;
  border: 1px solid var(--primary-30);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 0.5rem;
}

.map-stats-large {
  display: flex !important;
  justify-content: space-around !important;
  padding: 0.75rem !important;
  border-top: 1px solid var(--border-color) !important;
}

.map-3d-view-large {
  flex: 1 !important;
  min-height: 380px !important;
  background: var(--bg-base) !important;
  border-radius: 8px;
  margin: 0 0.5rem;
  overflow: hidden;
  position: relative;
}

.map-stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
}

.stat-label {
  font-size: 0.65rem;
  color: var(--muted);
}

/* 3D地球容器 */
.globe-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
}

.globe-container-large {
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
  background: var(--surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
}

.globe-3d-view-large {
  flex: 1 !important;
  min-height: 380px !important;
  background: var(--bg-base) !important;
  border-radius: 8px;
  margin: 0 0.5rem;
  overflow: hidden;
  cursor: grab;
  position: relative;
}

.globe-3d-view-large:active {
  cursor: grabbing;
}



.globe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
}

.globe-rotation-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(34, 197, 94, 0.1);
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
}

.rotation-icon {
  font-size: 0.8rem;
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.globe-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.globe-control {
  background: var(--primary-10);
  border: 1px solid var(--primary-30);
  border-radius: 6px;
  padding: 0.3rem;
  cursor: pointer;
  transition: all 0.2s;
}

.globe-control:hover {
  background: var(--primary-20);
}

.globe-3d-view {
  flex: 1;
  min-height: 140px;
  background: var(--bg-base) !important;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: grab;
  margin: 0 0.5rem;
}

.globe-3d-view:active {
  cursor: grabbing;
}

.globe-stats {
  display: flex !important;
  justify-content: space-around !important;
  padding: 0.75rem !important;
  border-top: 1px solid var(--border-color) !important;
  background: rgba(34, 197, 94, 0.05);
}

.globe-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.globe-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
}

.globe-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* 3D地球样式 */
.globe-container-3d {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  perspective: 1000px !important;
  position: relative !important;
}

.atmosphere-layer {
  position: absolute !important;
  width: 140px !important;
  height: 140px !important;
  pointer-events: none !important;
}

.atmosphere-inner {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 35% 35%,
    rgba(100, 200, 255, 0.35) 0%,
    rgba(100, 200, 255, 0.12) 45%,
    transparent 75%) !important;
  animation: atmospherePulse 4s ease-in-out infinite !important;
}

.atmosphere-outer {
  position: absolute !important;
  inset: -8px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(100, 200, 255, 0.25) !important;
  animation: atmosphereRotate 35s linear infinite !important;
}

@keyframes atmospherePulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}

@keyframes atmosphereRotate {
  from { transform: rotateX(75deg) rotateZ(0deg); }
  to { transform: rotateX(75deg) rotateZ(360deg); }
}

/* 地球主体 */
.earth-3d {
  width: 110px !important;
  height: 110px !important;
  border-radius: 50% !important;
  position: relative !important;
  transform-style: preserve-3d !important;
  animation: earthRotate 25s linear infinite !important;
  box-shadow:
    inset -18px -12px 35px rgba(0, 0, 0, 0.7),
    inset 18px 12px 35px rgba(255, 255, 255, 0.08),
    0 0 35px rgba(100, 200, 255, 0.25) !important;
}

@keyframes earthRotate {
  from { transform: rotateY(0deg) rotateX(23.4deg); }
  to { transform: rotateY(360deg) rotateX(23.4deg); }
}

/* 海洋层 */
.ocean-layer {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg,
    var(--ocean-start, #0a3d5c) 0%,
    var(--ocean-mid, #0d4f70) 35%,
    var(--ocean-end, #0a3d5c) 65%,
    var(--ocean-dark, #082d42) 100%) !important;
}

/* 大陆基础样式 */
.continents-layer {
  position: absolute !important;
  inset: 4px !important;
  border-radius: 50% !important;
  transform-style: preserve-3d !important;
}

.continent-north-america,
.continent-south-america,
.continent-europe,
.continent-africa,
.continent-asia,
.continent-australia,
.continent-antarctica {
  position: absolute !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--continent-start, #2d5a3d) 0%, var(--continent-end, #1e4a2e) 100%) !important;
  box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.18),
              inset -2px -2px 5px rgba(0, 0, 0, 0.35) !important;
  transform-style: preserve-3d !important;
  left: 50% !important;
  top: 50% !important;
}

.continent-north-america { width: 26px !important; height: 36px !important; margin: -18px 0 0 -13px !important; }
.continent-south-america { width: 16px !important; height: 26px !important; margin: -13px 0 0 -8px !important; }
.continent-europe { width: 19px !important; height: 13px !important; margin: -6px 0 0 -9px !important; }
.continent-africa { width: 21px !important; height: 29px !important; margin: -14px 0 0 -10px !important; }
.continent-asia { width: 42px !important; height: 36px !important; margin: -18px 0 0 -21px !important; }
.continent-australia { width: 17px !important; height: 15px !important; margin: -7px 0 0 -8px !important; }
.continent-antarctica { width: 62px !important; height: 9px !important; margin: -4px 0 0 -31px !important; background: linear-gradient(135deg, var(--glacier-start, rgba(200, 220, 255, 0.85)) 0%, var(--glacier-end, rgba(180, 200, 240, 0.65)) 100%) !important; }

/* 山脉 */
.mountains-layer {
  position: absolute !important;
  inset: 0 !important;
  transform-style: preserve-3d !important;
}

.mountain {
  position: absolute !important;
  width: 9px !important;
  height: 9px !important;
  background: linear-gradient(135deg, var(--mountain-start, #3d6b4d), var(--mountain-end, #2d5a3d)) !important;
  border-radius: 50% !important;
  transform: rotateX(45deg) !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5) !important;
  margin: -4px 0 0 -4px !important;
  left: 50% !important;
  top: 50% !important;
}

/* 冰川 */
.glaciers-layer {
  position: absolute !important;
  inset: 0 !important;
  transform-style: preserve-3d !important;
}

.glacier {
  position: absolute !important;
  width: 32px !important;
  height: 11px !important;
  background: linear-gradient(135deg, var(--glacier-start, rgba(255, 255, 255, 0.92)), var(--glacier-end, rgba(200, 220, 255, 0.75))) !important;
  border-radius: 50% !important;
  opacity: 0.85 !important;
  margin: -5px 0 0 -16px !important;
  left: 50% !important;
  top: 50% !important;
}

/* 碳足迹热点 */
.carbon-hotspots {
  position: absolute !important;
  inset: 0 !important;
  transform-style: preserve-3d !important;
}

.hotspot {
  position: absolute !important;
  width: 7px !important;
  height: 7px !important;
  background: var(--danger, #ef4444) !important;
  border-radius: 50% !important;
  box-shadow: 0 0 12px var(--danger, #ef4444), 0 0 24px var(--danger, #ef4444) !important;
  animation: hotspotPulse 2s ease-in-out infinite !important;
  margin: -3px 0 0 -3px !important;
  left: 50% !important;
  top: 50% !important;
}

@keyframes hotspotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.6; }
}

/* 太阳光晕 */
.sun-glow {
  position: absolute !important;
  width: 65px !important;
  height: 65px !important;
  background: radial-gradient(circle, var(--sun-glow, rgba(255, 200, 100, 0.45)) 0%, transparent 75%) !important;
  transform: translateX(-55px) !important;
  filter: blur(12px) !important;
  pointer-events: none !important;
}

/* 轨道环 */
.orbit-rings {
  position: absolute !important;
  width: 160px !important;
  height: 160px !important;
  pointer-events: none !important;
}

.orbit-ring {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  border: 1px dashed rgba(100, 200, 255, 0.35) !important;
}

.orbit-ring.ring1 {
  animation: orbitRotate1 28s linear infinite !important;
}

.orbit-ring.ring2 {
  width: 145px !important;
  height: 145px !important;
  margin: 7px !important;
  animation: orbitRotate2 38s linear infinite reverse !important;
}

@keyframes orbitRotate1 {
  from { transform: rotateX(78deg) rotateZ(0deg); }
  to { transform: rotateX(78deg) rotateZ(360deg); }
}

@keyframes orbitRotate2 {
  from { transform: rotateX(62deg) rotateZ(0deg); }
  to { transform: rotateX(62deg) rotateZ(360deg); }
}

/* 地图粒子效果 */
.map-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--green);
  border-radius: 50%;
  animation: particleFloat 3s ease-in-out infinite;
}

.particle:nth-child(2) { animation-delay: 0.5s; }
.particle:nth-child(3) { animation-delay: 1s; }
.particle:nth-child(4) { animation-delay: 1.5s; }

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
}

/* Leaflet中国地图样式 */
#leaflet-china-map {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.china-map-panel {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--bg-overlay, rgba(15, 23, 42, 0.9));
  border: 1px solid var(--primary-30);
  border-radius: 8px;
  padding: 0.75rem;
  min-width: 150px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.china-map-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.china-map-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.china-map-panel .panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.china-map-panel .panel-legend {
  display: flex;
  gap: 0.5rem;
  font-size: 0.6rem;
}

.china-map-panel .legend-item {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-secondary);
}

.china-map-panel .legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.china-map-panel .legend-dot.hot { background: var(--danger, #ef4444); }
.china-map-panel .legend-dot.medium { background: var(--warning, #f59e0b); }
.china-map-panel .legend-dot.cool { background: var(--green); }

.china-map-panel .panel-content {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.china-map-panel .prov-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.china-map-panel .prov-data {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* 地图工具提示 */
.china-map-tooltip {
  background: var(--bg-overlay, rgba(15, 23, 42, 0.9)) !important;
  border: 1px solid var(--primary-30) !important;
  color: var(--text-primary) !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-size: 0.75rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* 地貌标记 */
.landform-marker {
  text-align: center;
  font-size: 14px;
}

.landform-marker .marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--surface2);
  border: 1px solid var(--border-color);
  border-radius: 50%;
}

/* Leaflet控件样式覆盖 */
.leaflet-control-zoom {
  border: none !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.leaflet-control-zoom a {
  background: var(--surface2) !important;
  border: none !important;
  color: var(--text-primary) !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--primary-10) !important;
}

.leaflet-control-zoom a:first-child {
  border-bottom: 1px solid var(--border-color) !important;
}

/* 3D地球标签容器 */
.globe-labels-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: 10;
}

.dynamic-label {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

/* 城市标记 */
.capital-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
}

.red-dot {
  width: 7px;
  height: 7px;
  background: #ff3333;
  border-radius: 50%;
  box-shadow: 0 0 15px #ff0000;
  border: 1.5px solid #fff;
}

.red-ring {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #ff4d4d;
  border-radius: 50%;
  animation: globePulse 2.5s infinite linear;
}

/* 首都标记 */
.globe-labels-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: 10;
}

.dynamic-label {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.capital-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
}

.capital-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--green);
  border: 2px solid var(--text-primary);
}

.capital-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--green);
  border-radius: 50%;
  animation: globePulse 2.5s infinite linear;
}

.capital-name {
  margin-top: 10px;
  background: var(--surface2);
  color: var(--text-primary);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

/* 城市标记 */
.city-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
}

.city-dot {
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
  border: 1.5px solid var(--text-primary);
}

.city-name {
  margin-top: 8px;
  background: var(--surface2);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

/* 海洋标注（红色）*/
.ocean-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
}

.ocean-name {
  color: #ef4444;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

/* 极点标注（红色）*/
.pole-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
}

.pole-dot {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 10px #ef4444;
  border: 2px solid #fff;
}

.pole-name {
  margin-top: 6px;
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

@keyframes globePulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}

/* 响应式适配 */
@media (max-width: 1200px) {
  .hero-row-visualization {
    flex-direction: column !important;
  }
  
  .hero-col-map-large,
  .hero-col-globe-large {
    min-height: 380px !important;
  }
  
  .map-3d-view-large,
  .globe-3d-view-large {
    min-height: 280px !important;
  }
}

@media (max-width: 768px) {
  .hero-row-summary {
    min-height: 160px !important;
  }
  
  .hero-col-map-large,
  .hero-col-globe-large {
    min-height: 320px !important;
  }
  
  .map-3d-view-large,
  .globe-3d-view-large {
    min-height: 220px !important;
  }
  
  .map-stats-large,
  .globe-stats {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  
  .map-header,
  .globe-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   模态框样式
═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

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

.modal-content {
  position: fixed;
  background: var(--surface);
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  cursor: default;
  transition: transform 0.1s ease-out, box-shadow 0.2s ease;
}

.modal-content.dragging {
  opacity: 0.9;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  transform: scale(1.02);
}

.modal-header {
  cursor: move;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close:hover {
  background: var(--surface2);
  color: var(--cream);
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   数据管理模块状态表格
═══════════════════════════════════════════════════════════════ */
.dm-module-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.dm-module-table th,
.dm-module-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.dm-module-table th {
  background: var(--surface2);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dm-module-table tr:last-child td {
  border-bottom: none;
}

.dm-module-table tr:hover td {
  background: var(--surface2);
}

.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(62, 207, 106, 0.15);
  color: var(--green);
}

.status-badge.empty {
  background: rgba(156, 163, 175, 0.15);
  color: var(--muted);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--cream);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green);
}

.form-group input::placeholder {
  color: var(--muted);
}
