/* ============================================================
   RobotV3.12 H5 全局样式（由 MiniProgram 各页 WXSS 转换，rpx ÷2 → px）
   ============================================================ */

/* ---------- 全局重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 手机安全区（刘海屏 / 底部 Home 条） */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}
html, body { height: 100%; }
body {
  background: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; }

/* 手机优先：桌面端限宽居中 */
.page { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: #f5f5f5; }

.container { padding: 10px; }

/* ---------- 全局按钮 ---------- */
.btn-primary { background: #1a73e8; color: #fff; border-radius: 4px; padding: 8px 16px; font-size: 14px; border: none; }
.btn-warning { background: #ff9800; color: #fff; border-radius: 4px; padding: 8px 16px; font-size: 14px; border: none; }
.btn-danger  { background: #e53935; color: #fff; border-radius: 4px; padding: 8px 16px; font-size: 14px; border: none; }
.btn-disabled { background: #bdbdbd; color: #fff; border-radius: 4px; padding: 8px 16px; font-size: 14px; border: none; }

/* ---------- 状态色 ---------- */
.status-idle       { color: #4caf50; }
.status-patrolling { color: #2196f3; }
.status-offline    { color: #9e9e9e; }
.status-error      { color: #e53935; }

/* ---------- 通用卡片 ---------- */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.page-title { font-size: 17px; font-weight: bold; margin-bottom: 4px; }
.page-subtitle { font-size: 12px; color: #888; display: block; margin-bottom: 12px; }
.empty { text-align: center; padding: 50px 0; color: #999; }
.empty-hint { display: block; font-size: 11px; color: #bbb; margin-top: 6px; }

/* ---------- 登录页 ---------- */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh; height: 100dvh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
}
.logo-area { display: flex; flex-direction: column; align-items: center; margin-bottom: 60px; }
.logo {
  width: 80px; height: 80px; margin-bottom: 15px;
  background: rgba(255,255,255,0.1); border-radius: 50%;
}
.title { font-size: 22px; font-weight: bold; color: #fff; margin-bottom: 5px; }
.subtitle { font-size: 13px; color: rgba(255,255,255,0.6); }
.login-btn {
  width: 80%; height: 44px; line-height: 44px;
  background: #07c160; border-radius: 22px; font-size: 16px; color: #fff;
  text-align: center; border: none;
}
.login-btn[disabled] { opacity: 0.6; }
.dev-area { margin-top: 30px; width: 80%; padding: 15px; background: rgba(255,255,255,0.08); border-radius: 8px; }
.dev-hint { font-size: 12px; color: rgba(255,255,255,0.5); display: block; margin-bottom: 8px; }
.dev-input {
  background: rgba(255,255,255,0.15); color: #fff; border: none;
  border-radius: 4px; padding: 8px; font-size: 14px; margin-bottom: 8px; width: 100%;
}
.dev-input::placeholder { color: rgba(255,255,255,0.4); }
.dev-login-btn { background: #ff9800; color: #fff; border: none; border-radius: 4px; padding: 8px 16px; font-size: 14px; width: 100%; }

/* ---------- 首页 ---------- */
.home-container { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(8px + var(--safe-top)) 15px 8px; background: #1a1a2e; color: #fff; flex-shrink: 0;
}
.bar-title { font-size: 16px; font-weight: bold; }
.bar-user { font-size: 12px; color: rgba(255,255,255,0.7); }
.main-map { flex: 0 0 40%; min-height: 0; width: 100%; background: #e0e0e0; }
.robot-list {
  height: 80px; white-space: nowrap; overflow-x: auto; overflow-y: hidden;
  background: #fff; padding: 8px 10px; flex-shrink: 0;
}
.robot-card {
  display: inline-flex; align-items: center; width: 130px;
  padding: 10px; margin-right: 8px; background: #f0f4ff;
  border-radius: 6px; border: 1px solid #e0e0e0; cursor: pointer; vertical-align: top;
}
.robot-card.offline { background: #f5f5f5; opacity: 0.6; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; flex-shrink: 0; }
.status-dot.idle { background: #4caf50; }
.status-dot.patrolling { background: #2196f3; animation: pulse 1.5s infinite; }
.status-dot.offline { background: #9e9e9e; }
.status-dot.error { background: #e53935; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.robot-info { display: flex; flex-direction: column; overflow: hidden; }
.robot-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.robot-status { font-size: 11px; }
.robot-battery { font-size: 10px; color: #888; }
.action-panel {
  background: #fff; padding: 12px 15px calc(20px + var(--safe-bottom)); border-top: 1px solid #eee; flex-shrink: 0;
}
.panel-title { font-size: 16px; font-weight: 600; }
.panel-subtitle { font-size: 11px; color: #888; display: block; margin-bottom: 8px; }
.action-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.act-btn {
  flex: 1; min-width: 70px; height: 36px; line-height: 36px;
  font-size: 13px; border-radius: 4px; border: none; text-align: center;
}
.act-btn.vision { background: #e3f2fd; color: #1565c0; }
.act-btn.patrol { background: #e8f5e9; color: #2e7d32; }
.act-btn.return { background: #fff3e0; color: #e65100; }
.act-btn.record { background: #f3e5f5; color: #6a1b9a; }
.act-btn.media  { background: #e0f7fa; color: #00838f; }
.act-btn[disabled] { background: #f5f5f5; color: #bdbdbd; cursor: not-allowed; }

/* ---------- 指令控制面板 ---------- */
.cmd-panel { margin-top: 12px; border-top: 1px dashed #e0e0e0; padding-top: 10px; }
.cmd-title { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 8px; }
.cmd-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.cmd-select {
  flex: 1; min-width: 120px; height: 34px; font-size: 13px;
  border: 1px solid #ddd; border-radius: 4px; padding: 0 6px; background: #fff;
}
.cmd-btn {
  height: 34px; padding: 0 12px; font-size: 13px; border-radius: 4px; border: none;
  background: #eceff1; color: #37474f; white-space: nowrap;
}
.cmd-btn.confirm { background: #e8f5e9; color: #2e7d32; }
.cmd-btn.cancel { background: #ffebee; color: #c62828; }
.cmd-hint { font-size: 12px; color: #1565c0; margin-bottom: 8px; }

/* ---------- 机器人视觉 ---------- */
.vision-container { padding: 8px; background: #000; min-height: 100vh; min-height: 100dvh; }
.vision-header { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + var(--safe-top)) 10px 10px; }
.vision-title { color: #fff; font-size: 15px; font-weight: bold; }
.video-main {
  position: relative; width: 100%; height: 210px; margin-bottom: 10px;
  border-radius: 4px; overflow: hidden; background: #222;
}
.video-main video { width: 100%; height: 100%; object-fit: cover; }
.stream-label {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 11px;
  padding: 2px 6px; border-radius: 2px;
}
.stream-label.small { font-size: 9px; padding: 1px 4px; }
.fullscreen-icon {
  position: absolute; top: 4px; right: 4px; color: #fff; font-size: 18px;
  background: rgba(0,0,0,0.4); width: 24px; height: 24px; text-align: center; line-height: 24px;
  border-radius: 50%;
}
.sound-toggle {
  position: absolute; bottom: 8px; right: 8px; z-index: 10;
  display: flex; align-items: center; gap: 4px;
  color: #fff; font-size: 13px; line-height: 1;
  background: rgba(0,0,0,0.6);
  padding: 8px 12px; border-radius: 16px; border: none; cursor: pointer;
}
.sound-toggle.global { position: static; }
#v-audio { display: none; }
.lock-controls {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  padding: 8px; background: #111; border-radius: 4px; flex-wrap: wrap;
}
.lock-btn {
  height: 34px; padding: 0 14px; font-size: 13px; border-radius: 16px; border: none;
  background: #263238; color: #cfd8dc; white-space: nowrap; cursor: pointer;
}
.lock-btn.active { background: #d32f2f; color: #fff; }
.zoom-row { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 180px; }
.zoom-label { color: #aaa; font-size: 12px; white-space: nowrap; }
.zoom-slider { flex: 1; }
.zoom-value { color: #fff; font-size: 13px; min-width: 36px; text-align: right; }
.surround-section { margin-bottom: 10px; }
.section-title { color: #aaa; font-size: 12px; padding: 4px 0; display: block; }
.surround-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.video-surround { position: relative; height: 120px; background: #222; border-radius: 2px; overflow: hidden; }
.video-surround video { width: 100%; height: 100%; object-fit: cover; }
.thermal-section { margin-bottom: 10px; }
.video-thermal { position: relative; height: 160px; background: #222; border-radius: 4px; overflow: hidden; }
.video-thermal video { width: 100%; height: 100%; object-fit: cover; }
.video-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #555; font-size: 12px;
}

/* ---------- 全屏视频 ---------- */
.fullscreen-container { position: relative; background: #000; height: 100vh; height: 100dvh; }
.fullscreen-video { width: 100%; height: 100vh; height: 100dvh; object-fit: contain; }
.back-btn {
  position: fixed; top: calc(30px + var(--safe-top)); left: 15px; z-index: 100;
  background: rgba(0,0,0,0.5); color: #fff; font-size: 14px;
  padding: 6px 12px; border-radius: 16px; border: none;
}
.stream-name {
  position: fixed; bottom: calc(20px + var(--safe-bottom)); left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.6); font-size: 12px;
}

/* ---------- 巡逻路线 ---------- */
.route-item { cursor: pointer; }
.route-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.route-name { font-size: 15px; font-weight: 600; }
.route-count { font-size: 11px; color: #2196f3; background: #e3f2fd; padding: 2px 6px; border-radius: 6px; }
.route-desc { font-size: 12px; color: #666; display: block; margin-bottom: 4px; }
.route-waypoints span { display: block; font-size: 10px; color: #aaa; line-height: 1.6; }

/* ---------- 巡逻记录 ---------- */
.record-item { cursor: pointer; }
.record-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.record-route { font-size: 14px; font-weight: 600; }
.record-status { font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.record-status.pending     { background: #fff3e0; color: #e65100; }
.record-status.in_progress { background: #e3f2fd; color: #1565c0; }
.record-status.completed   { background: #e8f5e9; color: #2e7d32; }
.record-status.aborted     { background: #fce4ec; color: #c62828; }
.record-meta { display: flex; justify-content: space-between; font-size: 11px; color: #888; margin-bottom: 2px; }
.record-progress { display: flex; justify-content: space-between; font-size: 11px; color: #aaa; }
.load-more { text-align: center; padding: 10px; }
.load-more button { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 4px 16px; font-size: 13px; color: #555; }

/* ---------- 巡逻记录详情 ---------- */
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.info-row .label { color: #888; font-size: 13px; }
.info-row span:last-child { font-size: 13px; font-weight: 500; }
.status.pending     { color: #e65100; }
.status.in_progress { color: #1565c0; }
.status.completed   { color: #2e7d32; }
.status.aborted     { color: #c62828; }

/* ---------- 录像回放 ---------- */
.media-container { min-height: 100vh; min-height: 100dvh; background: #f5f5f5; padding: calc(10px + var(--safe-top)) 10px calc(10px + var(--safe-bottom)); }
.header { margin-bottom: 10px; }
.player { position: relative; background: #000; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.player-video { width: 100%; height: 210px; }
.player-close {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; line-height: 24px;
  text-align: center; color: #fff; font-size: 16px; background: rgba(0,0,0,0.5);
  border-radius: 50%; border: none; cursor: pointer;
}
.player-name {
  position: absolute; bottom: 4px; left: 6px; color: #fff; font-size: 11px;
  background: rgba(0,0,0,0.5); padding: 2px 6px; border-radius: 2px;
}
.item {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border-radius: 6px; padding: 12px; margin-bottom: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06); cursor: pointer;
}
.item-main { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.item-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-time { font-size: 11px; color: #888; margin-top: 3px; }
.item-side { display: flex; flex-direction: column; align-items: flex-end; margin-left: 8px; }
.item-duration { font-size: 11px; color: #666; }
.item-status { font-size: 11px; margin-top: 3px; }
.item-status.ready { color: #4caf50; }
.item-status.pending_transcode,
.item-status.pending_upload { color: #ff9800; }
.item-status.failed { color: #e53935; }

/* 录像筛选栏 + 行内操作按钮 */
.filter-bar {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  background: #fff; border-radius: 6px; padding: 8px; margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.filter-bar select, .filter-bar input[type="date"] {
  flex: 1; min-width: 80px; height: 30px; font-size: 12px;
  border: 1px solid #ddd; border-radius: 4px; padding: 0 6px; background: #fff; color: #333;
}
.btn-mini {
  height: 26px; padding: 0 10px; font-size: 12px; border-radius: 4px; border: none;
  background: #e3f2fd; color: #1565c0; white-space: nowrap;
}
.btn-mini-danger { background: #ffebee; color: #c62828; }
.item-actions { display: flex; gap: 6px; margin-left: 8px; align-items: center; }

/* ---------- Toast ---------- */
.app-toast {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0,0,0,0.8); color: #fff; font-size: 14px; padding: 10px 20px;
  border-radius: 6px; z-index: 9999; opacity: 0; transition: all 0.25s ease; max-width: 80%;
  text-align: center;
}
.app-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.app-toast-success { background: rgba(0,0,0,0.75); }

/* ---------- 确认框 ---------- */
.app-modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9998;
  display: flex; align-items: center; justify-content: center;
}
.app-modal { background: #fff; border-radius: 10px; width: 80%; max-width: 320px; overflow: hidden; }
.app-modal-title { padding: 16px 16px 4px; font-size: 16px; font-weight: bold; text-align: center; }
.app-modal-content { padding: 8px 16px 16px; font-size: 14px; color: #555; text-align: center; white-space: pre-wrap; }
.app-modal-actions { display: flex; border-top: 1px solid #eee; }
.app-modal-cancel, .app-modal-ok {
  flex: 1; padding: 12px; font-size: 15px; border: none; background: #fff;
}
.app-modal-cancel { color: #888; border-right: 1px solid #eee; }
.app-modal-ok { color: #1a73e8; font-weight: 600; }

/* ---------- Leaflet 适配 ---------- */
.leaflet-container { font-family: inherit; }
.leaflet-div-icon { background: transparent; border: none; }

/* ---------- 顶部栏按钮 ---------- */
.bar-actions { display: flex; align-items: center; gap: 10px; }
.bar-btn {
  color: #fff; font-size: 12px; text-decoration: none;
  padding: 4px 10px; border: 1px solid rgba(255,255,255,0.4); border-radius: 14px;
}
.bar-btn:hover { background: rgba(255,255,255,0.15); }

/* ---------- 接收数据表格 ---------- */
.table-container { max-width: none; padding: 12px 15px; }
.table-wrap {
  overflow-x: auto; background: #fff; border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.robot-table { border-collapse: collapse; width: 100%; min-width: 1120px; font-size: 12px; }
.robot-table th, .robot-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; text-align: left; white-space: nowrap; }
.robot-table th { background: #fafafa; color: #666; font-weight: 600; position: sticky; top: 0; }
.robot-table tbody tr:hover td { background: #f8fbff; }
.tbl-sub { font-size: 10px; color: #aaa; margin-top: 2px; }
.tbl-status { padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.tbl-status.idle       { background: #e8f5e9; color: #2e7d32; }
.tbl-status.patrolling { background: #e3f2fd; color: #1565c0; }
.tbl-status.remote     { background: #fff3e0; color: #e65100; }
.tbl-status.offline    { background: #f5f5f5; color: #9e9e9e; }
.tbl-link { color: #1a73e8; text-decoration: none; white-space: nowrap; }
.tbl-link:hover { text-decoration: underline; }

/* ---------- 喊话（对讲）大按钮 ---------- */
.talk-btn {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%);
  z-index: 200;
  width: 72%; max-width: 300px; height: 56px;
  background: #07c160; color: #fff; font-size: 18px; font-weight: 600;
  border: none; border-radius: 28px;
  box-shadow: 0 4px 16px rgba(7, 193, 96, 0.4);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none;
}
.talk-btn:active, .talk-btn.recording {
  background: #e53935; box-shadow: 0 4px 16px rgba(229, 57, 53, 0.5);
  transform: translateX(-50%) scale(0.98);
}

/* ---------- 竖屏提示遮罩（横屏时引导用户转竖屏） ---------- */
.orientation-mask {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.orientation-mask.show { display: flex; }
.orientation-icon { font-size: 64px; line-height: 1; margin-bottom: 18px; }
.orientation-text { font-size: 18px; letter-spacing: 2px; }

/* ---------- 首页竖排机器人列表 ---------- */
.robot-panel { flex: 1; overflow-y: auto; background: #fff; border-top: 1px solid #eee; -webkit-overflow-scrolling: touch; }
.robot-list-v { padding: 8px 10px; }
.robot-row { background: #fafafa; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.robot-row.active { border-color: #1a73e8; }
.robot-row-head { display: flex; align-items: center; padding: 13px 12px; cursor: pointer; gap: 8px; }
.robot-no { font-weight: 600; font-size: 14px; flex: 1; }
.robot-status { font-size: 12px; }
.robot-status.idle { color: #4caf50; }
.robot-status.patrolling { color: #2196f3; }
.robot-status.remote { color: #ff9800; }
.robot-status.offline { color: #9e9e9e; }
.robot-battery { font-size: 12px; color: #666; white-space: nowrap; }
.status-dot.remote { background: #ff9800; }

.robot-detail { border-top: 1px solid #eee; background: #fff; padding: 12px; }

/* 信息栏：信息区 */
.detail-section-title { font-size: 12px; color: #888; margin: 10px 0 6px; font-weight: 600; }
.detail-section-title:first-child { margin-top: 0; }
.detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13px; }
.di-item { display: flex; gap: 6px; }
.di-item.full { grid-column: 1 / -1; }
.di-item .k { color: #888; flex-shrink: 0; }
.di-item .v { font-weight: 500; word-break: break-all; }

/* 巡逻路线选择行 */
.route-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.route-picker { flex: 1; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 12px; border: 1px solid #ddd; border-radius: 4px; background: #fff; font-size: 15px; cursor: pointer; }
.route-picker-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #37474f; }
.route-picker-arrow { color: #999; flex-shrink: 0; }
.route-row .cmd-btn { height: 44px; padding: 0 20px; font-size: 15px; }

/* 路线选择下滑展开面板（锚定到路线选择控件下边缘，最大高度=下边缘到视口底边距离） */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.2); z-index: 1000; display: none; }
.sheet-mask.show { display: block; }
.route-sheet { position: fixed; background: #fff; border-radius: 0 0 12px 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: sheetDrop .22s ease; }
.route-sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #eee; font-weight: 600; font-size: 15px; flex-shrink: 0; }
.route-sheet-close { color: #999; font-weight: 400; }
.route-sheet-list { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0; min-height: 0; }
.route-sheet-item { padding: 13px 14px; font-size: 15px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.route-sheet-item:active { background: #f0f0f0; }
.route-sheet-item.active { color: #1a73e8; font-weight: 600; }
@keyframes sheetDrop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* 开关行 */
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f0f0f0; }
.switch-label { font-size: 14px; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; background: #ccc; border-radius: 26px; transition: .2s; cursor: pointer; }
.switch-slider:before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .switch-slider { background: #1a73e8; }
.switch input:checked + .switch-slider:before { transform: translateX(18px); }

/* 分类按钮 */
.cat-buttons { display: flex; gap: 8px; margin-top: 4px; }
.cat-btn { flex: 1; height: 38px; border-radius: 6px; border: none; font-size: 13px; text-align: center; }
.cat-btn.vision { background: #e3f2fd; color: #1565c0; }
.cat-btn.record { background: #f3e5f5; color: #6a1b9a; }
.cat-btn.media { background: #e0f7fa; color: #00838f; }

/* 信息区与指令区之间的分隔横线 */
.detail-divider { height: 1px; background: #eee; margin: 10px 0; }

/* ---------- 路线编辑 / 进度可视化 ---------- */
.form-label { display: block; font-size: 13px; color: #555; margin: 8px 0 4px; font-weight: 600; }
.form-label:first-child { margin-top: 0; }
.form-input {
  width: 100%; height: 36px; font-size: 14px; border: 1px solid #ddd;
  border-radius: 4px; padding: 0 10px; margin-bottom: 4px; background: #fff;
}
.route-actions { display: flex; gap: 6px; margin-top: 8px; }
.route-edit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.route-edit-actions { display: flex; gap: 10px; margin-top: 12px; }
.route-edit-actions button { flex: 1; height: 40px; font-size: 15px; }
.wp-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.wp-index { width: 48px; font-size: 12px; color: #888; flex-shrink: 0; }
.wp-input {
  flex: 1; min-width: 0; height: 34px; font-size: 13px; border: 1px solid #ddd;
  border-radius: 4px; padding: 0 8px; background: #fff;
}
.progress-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.progress-num { font-size: 13px; color: #1a73e8; font-weight: 600; }
.progress-bar {
  height: 8px; background: #eee; border-radius: 4px; overflow: hidden; margin-bottom: 12px;
}
.progress-fill { height: 100%; background: #1a73e8; border-radius: 4px; transition: width .3s; }
.wp-progress-list { display: flex; flex-direction: column; gap: 6px; }
.wp-progress-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #999; }
.wp-progress-item.done { color: #2e7d32; }
.wp-dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; flex-shrink: 0; }
.wp-progress-item.done .wp-dot { background: #4caf50; }
.wp-coord { margin-left: auto; color: #aaa; }

/* ---------- 告警中心 ---------- */
.alert-item { padding: 10px 12px; }
.alert-item.read { opacity: 0.6; }
.alert-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.alert-level { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.alert-level.level-info    { background: #e3f2fd; color: #1565c0; }
.alert-level.level-warning { background: #fff3e0; color: #e65100; }
.alert-level.level-error   { background: #ffebee; color: #c62828; }
.alert-type { font-size: 13px; font-weight: 600; }
.alert-time { margin-left: auto; font-size: 11px; color: #aaa; }
.alert-body { font-size: 13px; color: #555; margin-bottom: 4px; }
.alert-robot { font-size: 11px; color: #999; }
