﻿:root {
    --primary-color: #1a73e8;
    --secondary-color: #4285f4;
    --dark-blue: #0d47a1;
    --light-blue: #bbdefb;
    --white: #ffffff;
    --gray: #f5f5f5;
    --dark-gray: #757575;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    background-color: var(--gray);
    color: #333;
    line-height: 1.6;
}

#app {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.page {
    display: none;
    height: 100vh;
    width: 100vw;
    flex-direction: column;
    background-color: var(--white);
}

.page.active {
    display: flex;
}

.header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.header button {
    background: none;
    border: none;
    color: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
}

/* 登录页面样式 */
#login-page {
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
    color: var(--white);
}

#login-page h1 {
    margin-bottom: 30px;
    font-size: 1.8rem;
    text-align: center;
}

.login-form {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

#login-btn:hover {
    background-color: var(--dark-blue);
}

/* 车辆列表样式 */
#vehicle-list-page {
    display: flex;
    flex-direction: column;
}

.list-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.vehicle-item {
    background-color: var(--white);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vehicle-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.vehicle-plate {
    font-weight: bold;
    font-size: 1.1rem;
}

.vehicle-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.map-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 25.8.4开通轨迹回放 */
.track-btn {
    background-color: #34a853;
    color: var(--white);
}

/* 25.8.28开通TTS指令 */
.tts-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 26.4.15开通温度报表 */
.report-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 26.6.20屏蔽视频按钮
.video-btn {
    background-color: #34a853;
    color: var(--white);
}
*/

/* 26.6.27开通报表查询 */
.report-query-btn {
    background-color: #34a853;
    color: var(--white);
}

 .record-btn {
    background-color: var(--dark-gray);
    color: var(--white);
    display: none; /* 隐藏轨迹回放和录像回放按钮 */
}

.vehicle-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vehicle-info {
    margin-bottom: 8px;
}

.vehicle-plate {
    font-weight: bold;
    font-size: 16px;
    color: #1a73e8;
    display: block;
}

.vehicle-id, .vehicle-gbcode {
    font-size: 12px;
    color: #666;
    display: block;
}

.vehicle-actions {
    display: flex;
    gap: 8px;
}
.status-info {
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-top: 10px;
}

.status-section {
    margin-top: 10px;
    font-weight: bold;
    color: #1a73e8;
}

.status-row {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.status-bit {
    margin-left: 15px;
    color: #555;
    font-size: 14px;
}

.error {
    color: #d32f2f;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #888;
}

.error {
    text-align: center;
    padding: 20px;
    color: #d32f2f;
}
/* 地图页面样式 */
#map-page {
    display: flex;
    flex-direction: column;
}

.map-container {
    flex: 4;
    position: relative;
}

#map-frame {
    width: 100%;
    height: 100%;
}

.status-container {
    flex: 1;
    padding: 10px;
    background-color: var(--white);
    overflow-y: auto;
}

.status-row {
    margin-bottom: 8px;
    padding: 8px;
    background-color: var(--light-blue);
    border-radius: 4px;
}

/* 视频页面样式 */
#video-page {
    display: flex;
    flex-direction: column;
}

.video-container {
    flex: 1;
    position: relative;
}

#video-frame {
    width: 100%;
    height: 100%;
}

/* 车辆列表容器 */
#vehicle-list {
    padding: 10px;
    overflow-y: auto;
}

/* 单个车辆项 */
.vehicle-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 12px;
    padding: 12px;
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.vehicle-plate {
    font-weight: bold;
    color: #1a73e8;
    font-size: 16px;
}

.vehicle-id {
    color: #666;
    font-size: 14px;
}

.vehicle-actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #f0f0f0;
    cursor: pointer;
}

.btn:hover {
    background: #e0e0e0;
}

/* 状态提示 */
.no-vehicles, .error {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error {
    color: #d32f2f;
}

.status-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1px;
    margin: 8px 10px 10px 10px;  /* 增加外边距，调整位置 */
    margin-bottom: 10px;
}

.status-row {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.label {
    font-weight: bold;
    min-width: 100px;
    color: #555;
}

.value {
    flex: 1;
}

.status-section {
    font-size: 16px;
    font-weight: bold;
    margin: 15px 0 10px;
    color: #1a73e8;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2px;   /* 实时监控下状态行间距6px，列间距12px */
    padding: 6px 12px;
}

.status-item {
    background: #f8f8f8;
    padding: 2px 10px;
    border-radius: 4px;
}

.online, .active {
    color: #4caf50;
}

.offline, .inactive {
    color: #f44336;
}

.error {
    color: #f44336;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
}


.offline {
    color: #999;
    opacity: 0.7;
}

/* 按钮横向滑动优化 */
.action-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 5px;
}
.vehicle-actions {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  width: max-content !important;
}
.action-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}