body {
  display: flex;
  flex-direction: column;
  justify-content: center; /* 水平居中 */
  align-items: center;
  min-height: 100vh;
  padding-top: env(safe-area-inset-top, 20px);
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  overflow-y: auto;
  background: none; /* 移除 body 的背景图 */
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/back.jpg') no-repeat center center;
  background-size: cover;
  z-index: -1; /* 已经设置，但确认生效 */
}
/* 新添加：媒体查询针对手机(窄屏≤768px)，覆盖背景为手机优化图，防止拉伸/模糊 */
@media screen and (max-width: 768px) { /* 新添加：查询起点，768px为常见手机/PC分界，可调整 */
  body::before { /* 新添加：针对::before覆盖 */
    background: url('/mobileback.jpg') no-repeat center center; /* 新添加：手机专用背景，建议用低分辨率/竖版图 */
    background-size: cover; /* 新添加：保持cover，但可改contain若需完整显示 */
  }
}

/* 开关和以下所有元素外框 */
  .container {
  display: none;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.2);
  padding: 20px 10px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 10px 0; /* 一致的间距和居中 */
  position: relative;
  margin-top: 10px; /* 原有外边距 */
  padding-top: 10px; /* 可选：增加内部填充 */
  background: transparent; /* 完全透明背景 */
  backdrop-filter: none; /* 移除模糊效果 */
  box-shadow: none; /* 移除阴影（如果需要完全透明） */
  border: none; /* 如果有边框也移除 */
  }
.password-container {
  display: flex; /* 默认显示 */
  flex-direction: column;
  gap: 15px;
  width: 90%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.5); /* 提高透明度以确保可见 */
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 0vh auto 10px; /* 从顶部留出空间 */
  align-items: center;
  text-align: center;
  z-index: 9999;
  position: relative;
}

.confirm-btn {
  padding: 8px 16px;
  background: #007aff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.3s;
}
.confirm-btn:hover {
  opacity: 0.9;
}
.confirm-btn.disabled {
  background: #ccc;
  cursor: not-allowed;
}
/* 只包含开关的外层盒子 */
.switch-box {
  box-sizing: border-box;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 5px;
}
.switch-item {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.switch-item .label {
  font-size: 0.8rem;
  color: #333;
  margin-bottom: 5px;
  white-space: normal; /* 允许换行 */
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.toggle-switch {
  position: relative;
  width: 44px; /* 55px * 0.8 */
  height: 25.6px; /* 32px * 0.8 */
  border-radius: 26.4px; /* 33px * 0.8 */
  background-color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s;
}
.toggle-switch::before {
  content: '';
  position: absolute;
  top: 1.6px;  /* 2px * 0.8 */
  left: 1.6px; /* 2px * 0.8 */
  width: 22.4px; /* 28px * 0.8 */
  height: 22.4px; /* 28px * 0.8 */
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}
.toggle-switch.on {
  background-color: #34c759;
}
.toggle-switch.on::before {
  transform: translateX(17.6px); /* 22px * 0.8 */
}

.material-checkbox {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #000000;
  cursor: pointer;
  user-select: none;
}

.material-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  position: relative;
  display: inline-block;
  width: 16px; /* 原 20px * 0.8 */
  height: 16px; /* 原 20px * 0.8 */
  margin-right: 5px; /* 原 1px，可改为 0.8px */
  border: 1.6px solid #454B00; /* 原 2px * 0.8 */
  border-radius: 4px;
  transition: all 0.3s;
}

.material-checkbox input[type="checkbox"]:checked ~ .checkmark {
  background-color: #2F3300;
}

.material-checkbox input[type="checkbox"]:checked ~ .checkmark:after {
  content: "";
  position: absolute;
  top: 1.6px; /* 原 2px * 0.8 */
  left: 4.8px; /* 原 6px * 0.8 */
  width: 3.2px; /* 原 4px * 0.8 */
  height: 8px; /* 原 10px * 0.8 */
  border: solid white;
  border-width: 0 1.6px 1.6px 0; /* 原 2px * 0.8 */
  transform: rotate(45deg);
}

.material-checkbox input[type="checkbox"]:focus ~ .checkmark {
  box-shadow: 0 0 0 2px #dfec5065;
}

.material-checkbox:hover input[type="checkbox"]:not(:checked) ~ .checkmark {
  border-color: #C3CF34;
}

.material-checkbox input[type="checkbox"]:disabled ~ .checkmark {
  opacity: 0.5;
  cursor: not-allowed;
}

.material-checkbox input[type="checkbox"]:disabled:hover ~ .checkmark {
  border-color: #4d4d4d;
}

/* ... 其他样式保持不变 ... */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
  justify-content: center;
}
.action-buttons button {
  padding: 10px 20px;
  font-size: 0.8rem;
  background-color: #007aff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  flex: 0 0 calc(50% - 15px);
}
.action-buttons button:hover {
  background-color: #0056d2;
}
.valueDisplay {
  font-size: 0.8rem;
  margin-bottom: 0px;
}
#error-message {
  color: red;
  display: none;
}
#toast {
  position: fixed;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}
#toast.show {
  bottom: 20px;
}

/* 状态和地图主外框 */
  .message-frame {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 0px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0; /* 水平居中并添加上下间距 */
  overflow: visible; /* 确保子元素可以溢出 */
  background: transparent; /* 完全透明背景 */
  backdrop-filter: none; /* 移除模糊效果 */
  box-shadow: none; /* 移除阴影（如果需要完全透明） */
  border: none; /* 如果有边框也移除 */
}

/* 电池和驾驶数据主外框 */
#message-frame-2 {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0; /* 水平居中并添加上下间距 */
  overflow: visible; /* 确保子元素可以溢出 */
  background: transparent; /* 完全透明背景 */
  backdrop-filter: none; /* 移除模糊效果 */
  box-shadow: none; /* 移除阴影（如果需要完全透明） */
  border: none; /* 如果有边框也移除 */
}

.message-content {
  font-size: 0.9rem;
  color: #333;
  white-space: pre-wrap;
  line-height: 1;
  text-align: center;
}

#message-content-2 {
  font-size: 0.9rem;
  color: #333;
  white-space: pre-wrap;
  line-height: 2;
  text-align: center;
}

.gps-map-container {
  position: relative;
  width: 100%;
  padding: 0;
}

#map-container {
  width: 100%;
  height: 200px; /* 默认高度改为 200px，与你的实际需求一致 */
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

#map-container.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh !important; /* 提高优先级 */
  z-index: 1000;
  border-radius: 0;
}

/* --- 地图按钮样式 (带文字版) --- */

/* 1. 基础容器设置 (取消固定宽高，改为自适应) */
.btn, .fullscreen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;          /* 宽度自适应内容 */
  height: auto;         /* 高度自适应内容 */
  min-width: 44px;      /* 设置最小宽度，保证点击区域 */
  padding: 4px 6px;     /* 内边距 */
  background: #ffffff;
  color: #333333;
  border: none;
  border-radius: 8px;   /* 圆角稍微加大一点 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1001;
}

/* 2. 上方三个按钮：垂直排列 (图标在上，文字在下) */
.btn-vertical {
  flex-direction: column; /* 关键：垂直布局 */
  gap: 1px;               /* 图标和文字的间距 */
}

/* 3. 全屏按钮：水平排列 (图标在左，文字在右) */
.btn-horizontal {
  flex-direction: row;    /* 关键：水平布局 */
  gap: 6px;               /* 间距稍大 */
  padding: 6px 12px;      /* 整体大一点 */
}

/* 4. SVG 图标尺寸 */
.btn svg, .fullscreen-btn svg {
  width: 24px;            /* 图标稍微调大，更清晰 */
  height: 24px;
  display: block;         /* 消除底部留白 */
}

/* 5. 文字样式 */
.btn-text {
  font-size: 10px;        /* 小字 */
  font-weight: 600;       /* 稍微加粗 */
  color: #555;            /* 深灰色，比纯黑柔和 */
  line-height: 1;
  white-space: nowrap;    /* 防止文字换行 */
}

/* 6. 悬停和激活状态 */
.btn:hover, .fullscreen-btn:hover {
  background-color: #f7f7f7;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn.active-btn {
  background: #f0f8ff;    /* 激活时背景微蓝 */
}
.btn.active-btn .btn-text {
  color: #007aff;         /* 激活时文字变蓝 */
}

/* 7. 定位保持 */
.btn {
  position: absolute;
  top: 10px;
  left: 10px;
}

.fullscreen-btn {
  position: absolute;
  bottom: 10%;
  left: auto;
  right: 10px;
  transform: none;
}


.battery-bar {
  position: relative;
  width: 100%;
  height: 20px;
  background: #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  margin: 0px 0;
}

.battery-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  /* 模拟从后端传来的内联样式：背景和宽度 */
  transition: width 0.4s ease;
  z-index: 1;
}

.battery-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 20px;
  font-size: 12px;
  color: white;
  z-index: 2;
}
.btn-left.active-btn {
  background: #ff4444; /* 点击后变为红色 */
}


/* 上传框 */
#upload-frame {
  width: 100%; /* 与其他 .message-frame 一致 */
  max-width: 600px; /* 与其他 .message-frame 一致 */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 0px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
}
#upload-content {
  display: flex;
  align-items: center;
  justify-content: center; /* 水平居中 */
  gap: 10px;
  width: 100%; /* 撑满父容器 */
}
#upload-btn {
  padding: 7px 20px;
  background: #007aff;
  font-size: 0.8rem;
  color: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.3s;
}
#upload-btn:hover {
  opacity: 0.9;
}
#upload-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}
#preview {
    margin-top: 10px;
    max-width: 300px;
  }


/* 电池和驾驶数据 */
.section {
    margin-bottom: 10px;
}
.card {
    background:rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 10px;
    margin: 10px auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}
.data-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.5; /* 减小行高 */
}
.data-item:last-child {
    border-bottom: none;
}
.data-label {
    font-weight: 600;
    color: #1f2937;
}
.data-value {
    color: #4b5563;
}
.sub-item {
    padding: 2px 0 2px 10px;
    color: #6b7280;
    font-size: 0.95em;
    line-height: 1.2; /* 减小行高 */
    text-align: left;
}
@media (max-width: 600px) {
    .card {
        padding: 5px;
    }
    .data-item {
        flex-direction: row; /* 保持横向排列（默认值） */
        align-items: left; /* 垂直居中 */
        gap: 5px; /* 调整间距 */
        overflow: hidden; /* 防止内容溢出 */
        padding: 5px 10px; 
    }
    .data-value {
        white-space: nowrap; /* 禁止文本换行 */
        text-overflow: ellipsis; /* 超出显示省略号 */
        overflow: hidden; /* 隐藏溢出内容 */
    }
    .data-label {
        padding-left: 0px;   
    }
    .data-value {
        flex: 1; /* 值部分自动填充剩余空间 */
        text-align: right; /* 数值右对齐 */
    }
}

/* 简化版单选按钮 - 只保留基本样式 */
.radio-inputs {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  border-radius: 5px;
  background: #f0f0f0;
  padding: 0.5rem;
  width: 90%;
  font-size: 0.8rem;
  gap: 0.5rem;
}

.radio-inputs .radio {
  flex: 1 1 auto;
  text-align: center;
  min-width: 0;
}

.radio-inputs .radio input {
  display: none;
}

.radio-inputs .radio .name {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid #ccc;
  padding: 6px;
  color: #2d3748;
  font-weight: 500;
  font-family: inherit;
  background: #ffffff;
  transition: background 0.2s ease;
}

.radio-inputs .radio input:checked + .name {
  background: #ff8c00; /* 纯色背景替代渐变 */
  color: white;
  font-weight: 600;
}

/* 只保留基本的悬停效果 */
.radio-inputs .radio:hover .name {
  background: #f0f0f0;
}

/* 微信4个内框标题 */
.custom-title {
  text-align: center;
  font-size: 1rem;
  padding: 0px;
}

/* From Uiverse.io by Nawsome */
.pl {
  width: 6em;
  height: 6em;
}
.pl__ring {
  animation: ringA 2s linear infinite;
}
.pl__ring--a {
  stroke: #f42f25;
}
.pl__ring--b {
  animation-name: ringB;
  stroke: #f49725;
}
.pl__ring--c {
  animation-name: ringC;
  stroke: #255ff4;
}
.pl__ring--d {
  animation-name: ringD;
  stroke: #f42582;
}
/* Animations */
@keyframes ringA {
  from, 4% {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -330;
  }
  12% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -335;
  }
  32% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -595;
  }
  40%, 54% {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -660;
  }
  62% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -665;
  }
  82% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -925;
  }
  90%, to {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -990;
  }
}
@keyframes ringB {
  from, 12% {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -110;
  }
  20% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -115;
  }
  40% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -195;
  }
  48%, 62% {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  70% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  90% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -305;
  }
  98%, to {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -330;
  }
}
@keyframes ringC {
  from {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: 0;
  }
  8% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -5;
  }
  28% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -175;
  }
  36%, 58% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  66% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  86% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -395;
  }
  94%, to {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -440;
  }
}
@keyframes ringD {
  from, 8% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: 0;
  }
  16% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -5;
  }
  36% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -175;
  }
  44%, 50% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  58% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  78% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -395;
  }
  86%, to {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -440;
  }
}

/* 居中加载动画容器，仅显示动画和 body::before 背景图 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent; /* 透明背景，依赖 body::before 的背景图 */
  z-index: 10001; /* 高 z-index，覆盖所有元素 */
  visibility: hidden; /* 默认隐藏 */
}
.loading-overlay.show {
  visibility: visible; /* 显示加载动画 */
}

/* 当加载动画显示时，提高 body::before 的 z-index */
.loading-overlay.show ~ body::before {
  z-index: 10000; /* 提高到仅次于加载动画，确保覆盖其他元素 */
}

/* =========================================
   科技感车辆状态面板 (Final Consolidated)
   ========================================= */

/* --- 1. 基础容器 --- */
#tech-status-container {
  padding: 5px 5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333;
  border-bottom: 1px solid #eee;
  margin-bottom: 0px;
  background: transparent;
  animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- 2. 头部区域 (名称/状态) --- */
.tech-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0px;
}
.tech-car-info { display: flex; flex-direction: column; }
.tech-car-name { font-size: 1.5rem; font-weight: 800; color: #1d1d1f; }
.tech-car-detail {
  font-size: 0.75rem; margin-top: 4px; font-weight: 500;
  border-radius: 4px; align-self: flex-start;
}

/* 状态徽章 */
.tech-state-badge {
  font-size: 0.8rem; padding: 6px 12px; border-radius: 20px;
  background: #f5f5f7; color: #86868b; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
/* 状态颜色 */
.tech-state-badge.online { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.tech-state-badge.sleeping { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.tech-state-badge.driving { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; }

/* 呼吸灯动画 */
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.animate-pulse { animation: tech-pulse 1.5s infinite; }
@keyframes tech-pulse { 0% {opacity: 1; transform: scale(1);} 50% {opacity: 0.4; transform: scale(0.9);} 100% {opacity: 1; transform: scale(1);} }

/* --- 3. 核心数据区 (左右分栏布局) --- */
.tech-main-stats {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 左右各50% */
  gap: 0;
  align-items: center;
  padding: 0px 10px; /* 紧凑内边距 */
  margin-bottom: 0px;
  min-height: 80px;
}

/* 左侧：圆环 + 里程 */
.tech-stats-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* SVG 圆环容器 (60px) */
.battery-ring-container { position: relative; width: 60px; height: 60px; }
.battery-ring-svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.battery-circle-bg { fill: none; stroke: #eee; stroke-width: 4; }
.battery-circle-progress {
  fill: none; stroke: #4CAF50; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 100 100; transition: stroke-dashoffset 1s ease-in-out, stroke 0.3s;
}
.battery-text-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 0.9rem; font-weight: 800; color: #1d1d1f;
}
.battery-sub-text { font-size: 0.6rem; font-weight: normal; color: #86868b; margin-left: 1px; }

/* 里程文字组 (靠右对齐) */
.tech-range-group {
  display: flex; flex-direction: column; justify-content: center;
  align-items: flex-end; /* 强制靠右 */
  text-align: right;
}
.tech-range-val { font-size: 1.4rem; font-weight: 800; color: #1d1d1f; line-height: 1; letter-spacing: -0.5px; }
.tech-odometer { font-size: 0.8rem; color: #888; margin-top: 3px; font-family: Courier New; }

/* 右侧：信息列表 */
.tech-stats-right {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 56px; /* 匹配左侧视觉高度 */
  padding-left: 20px;
  border-left: 1px solid #e0e0e0; /* 分割线 */
  font-size: 0.7rem; color: #666; line-height: 1.2;
}
.tech-info-row {
  display: flex; justify-content: space-between;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* --- 4. 网格卡片区 (强制等宽) --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 强制两列等宽 */
  gap: 12px;
}

/* 通用卡片容器 */
.tech-card-item {
  background: #fbfbfd;
  padding: 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e5e5;
  box-sizing: border-box;
  min-height: 72px; /* 保证一致高度 */
  height: 100%;
}

/* 图标 */
.tech-icon {
  width: 32px; height: 32px;
  background: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  border: 1px solid #f0f0f0;
}

/* 右侧数据列 (垂直居中) */
.tech-data-col {
  display: flex; flex-direction: column; justify-content: center;
  flex: 1; overflow: hidden;
}

/* 右侧数据容器 (用于复杂布局) */
.tech-data-wrapper {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  height: 100%; gap: 4px; /* 行间距 */
}

/* --- 5. 文本与状态样式 --- */
.tech-label {
  font-size: 0.65rem; color: #86868b; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 2px;
}
.tech-value {
  font-size: 0.85rem; font-weight: 600; color: #1d1d1f;
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
/* 状态颜色 */
.tech-value.alert { color: #F44336; }  /* 红 */
.tech-value.safe { color: #4CAF50; }   /* 绿 */
.tech-value.warn { color: #FF9800; }   /* 橙 */

.tech-value-mono { font-family: monospace; font-size: 0.8rem; letter-spacing: -0.5px; line-height: 1.2; }

/* 胎压数值专用 */
.tech-tpms-val { font-size: 0.9rem !important; font-weight: bold; }
.tech-unit-text { font-size: 0.6rem; color: #999; font-weight: normal; margin-left: 2px; }

/* --- 6. 紧凑行布局 (车门/外部接口/胎压) --- */
.tech-compact-row {
  display: flex; justify-content: space-between;
  width: 100%; align-items: center; padding: 1px 0;
}

/* 小数据块 (标签+数值 横向排列) */
.tech-mini-block {
  display: flex; flex-direction: row; align-items: baseline;
  gap: 4px; white-space: nowrap;
}
.tech-mini-block .tech-label { margin-bottom: 0; opacity: 0.8; font-size: 0.65rem; }
.tech-mini-block .tech-value { font-size: 0.8rem; }

/* 对齐修正：右侧列靠右对齐 */
.tech-compact-row .tech-mini-block:last-child {
  justify-content: flex-end;
}

/* --- 7. 开关样式 (仅用于保留代码兼容性，若不使用可忽略) --- */
.tech-switch-wrapper { display: flex; align-items: center; justify-content: flex-end; }
.tech-switch-track {
  width: 32px; height: 18px; background: #e0e0e0; border-radius: 9px;
  position: relative; transition: background 0.3s ease;
}
.tech-switch-track.active { background: #4CAF50; }
.tech-switch-knob {
  width: 14px; height: 14px; background: #ffffff; border-radius: 50%;
  position: absolute; top: 2px; left: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.tech-switch-track.active .tech-switch-knob { transform: translateX(14px); }

/* --- 布局最终修正：间距对齐 & 强制右靠 --- */

/* 1. 主容器：间距与下方 Grid gap (12px) 保持一致 */
.tech-main-stats {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  padding: 0px 10px !important;
  margin-bottom: 0px !important; /* 关键：从 15px 改为 12px */
  min-height: 80px;
}

/* 2. 左侧区域：弹性布局 */
.tech-stats-left {
  display: flex;
  align-items: center;
  /* 移除 gap，改用 justify-content 或 margin 控制 */
  gap: 0; 
  height: 100%;
}

/* 3. 圆环：保持 60px */
.battery-ring-container {
  width: 60px !important;
  height: 60px !important;
  flex-shrink: 0; /* 防止被压缩 */
}

/* 4. 里程文字组：变成“隐形框”自动撑满剩余空间 */
.tech-range-group {
  flex: 1; /* 关键：占据左侧剩余所有宽度 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end; /* 内容靠右对齐 */
  text-align: right;     /* 文字靠右对齐 */
  padding-right: 20px;   /* 关键：增加右侧呼吸空间，与右半部分的 padding-left 对应 */
}

/* 字体保持 */
.tech-range-val {
  font-size: 1.4rem !important;
  line-height: 1;
  letter-spacing: -0.5px;
}
.tech-odometer {
  font-size: 0.7rem;
  color: #999;
  margin-top: 3px;
  font-family: monospace;
}

/* 5. 右侧信息框：保持不变，确保视觉对称 */
.tech-stats-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 56px;
  padding-left: 20px; /* 与左侧的 padding-right 对称 */
  border-left: 1px solid #e0e0e0;
  font-size: 0.7rem;
  color: #666;
  line-height: 1.2;
}

