.vehicle-monitor-layout {
  display: flex;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.vehicle-monitor-main {
  flex: 1;
  min-width: 0;
  display: flex;
}

.vehicle-monitor-layout .page-list-shell {
  flex: 1;
}

.vehicle-rule-aside {
  width: 292px;
  flex: 0 0 292px;
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vehicle-rule-aside__body {
  padding: 12px;
  overflow: auto;
}

.vehicle-rule-title {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.vehicle-rule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  font-size: 12px;
}

.vehicle-rule-table--help {
  margin-top: 10px;
}

.vehicle-rule-table th,
.vehicle-rule-table td {
  padding: 8px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: top;
  line-height: 1.45;
}

.vehicle-rule-table tr:last-child td {
  border-bottom: 0;
}

.vehicle-rule-table th {
  background: #f8fafc;
  color: #4b5563;
  font-weight: 600;
  text-align: left;
}

.vehicle-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(142px, 1fr));
  gap: 10px;
  padding: 12px 12px 0;
  background: #fff;
}

.vehicle-kpi {
  border: 1px solid #edf0f5;
  border-radius: 8px;
  padding: 12px;
  min-height: 76px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.vehicle-kpi:hover {
  border-color: rgba(24, 144, 255, 0.45);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.vehicle-kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
}

.vehicle-kpi__icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vehicle-kpi__value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #111827;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.vehicle-kpi__value span {
  font-size: 12px;
  color: #8a94a6;
  font-weight: 500;
}

.vehicle-kpi--blue .vehicle-kpi__icon { color: #1677ff; background: rgba(22, 119, 255, .08); }
.vehicle-kpi--green .vehicle-kpi__icon { color: #16a34a; background: rgba(22, 163, 74, .08); }
.vehicle-kpi--gray .vehicle-kpi__icon { color: #64748b; background: rgba(100, 116, 139, .1); }
.vehicle-kpi--cyan .vehicle-kpi__icon { color: #0891b2; background: rgba(8, 145, 178, .09); }
.vehicle-kpi--orange .vehicle-kpi__icon { color: #f97316; background: rgba(249, 115, 22, .1); }
.vehicle-kpi--red .vehicle-kpi__icon { color: #e11d48; background: rgba(225, 29, 72, .09); }

.vehicle-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 0;
  background: #fff;
  color: #64748b;
  font-size: 12px;
}

.vehicle-sync-bar strong {
  color: #1f2937;
  font-weight: 600;
}

.vehicle-sync-bar button {
  color: #1677ff;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  line-height: 30px;
}

.vehicle-sync-bar button:hover {
  color: #4096ff;
}

.vehicle-sync-bar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.vehicle-list-toolbar-period {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  margin-right: 4px;
  border-radius: 8px;
  background: #eef4ff;
  color: #1890ff;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.vehicle-list-monitor-head {
  background: #fff;
}

.vehicle-detail-shell {
  height: 100%;
  overflow: auto;
  background: #f4f5f7;
  padding: 0 16px 14px;
}

.vehicle-detail-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 12px;
  min-height: 100%;
}

.vehicle-detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vehicle-detail-header,
.vehicle-panel {
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: 8px;
}

.vehicle-detail-header {
  padding: 14px 16px;
}

.vehicle-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-detail-title h1 {
  margin: 0;
  font-size: 20px;
  color: #111827;
  font-weight: 700;
}

.vehicle-detail-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #64748b;
  font-size: 12px;
}

.vehicle-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.vehicle-overview-item {
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.vehicle-overview-item span {
  display: block;
  color: #8a94a6;
  font-size: 12px;
}

.vehicle-overview-item strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.vehicle-panel__head {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #f0f2f5;
}

.vehicle-panel__head h2 {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.vehicle-panel__body {
  padding: 14px;
}

.vehicle-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-info-cell {
  min-height: 58px;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.vehicle-info-cell span {
  display: block;
  color: #8a94a6;
  font-size: 12px;
}

.vehicle-info-cell strong {
  display: block;
  margin-top: 6px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

.vehicle-mini-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.vehicle-mini-table th,
.vehicle-mini-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
  white-space: nowrap;
}

.vehicle-mini-table th {
  color: #64748b;
  background: #f8fafc;
  font-weight: 600;
}

.vehicle-mini-table tr:last-child td {
  border-bottom: 0;
}

.vehicle-table-wrap {
  overflow: auto;
  border: 1px solid #eef1f5;
  border-radius: 8px;
}

.vehicle-track-card {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
}

.vehicle-map {
  position: relative;
  min-height: 240px;
  border: 1px solid #e6eef8;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(22,119,255,.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(22,119,255,.06) 1px, transparent 1px),
    #f8fbff;
  background-size: 32px 32px;
}

.vehicle-route-line {
  position: absolute;
  left: 12%;
  top: 52%;
  width: 76%;
  height: 3px;
  background: linear-gradient(90deg, #1677ff, #10b981, #f97316);
  transform: rotate(-10deg);
  border-radius: 999px;
}

.vehicle-map-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #1677ff;
  box-shadow: 0 0 0 5px rgba(22,119,255,.14);
}

.vehicle-stop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vehicle-stop {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.vehicle-stop i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-top: 6px;
  background: #1677ff;
  flex: 0 0 7px;
}

.vehicle-empty {
  padding: 20px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

.vehicle-detail-drawer {
  width: min(1180px, 96vw);
}

.vehicle-detail-drawer .drawer-header {
  height: auto;
  min-height: 50px;
  padding: 10px 20px;
  align-items: center;
}

.vehicle-detail-drawer .drawer-header-title {
  line-height: 1.4;
}

.vehicle-drawer-header-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-drawer-header-title__plate {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1;
}

.vehicle-drawer-header-title__driver {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  line-height: 1;
}

.vehicle-drawer-header-title__branch {
  font-size: 12px;
  color: #64748b;
  line-height: 1;
}

.vehicle-drawer-overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.vehicle-drawer-overview-toolbar .vehicle-drawer-hero__meta {
  min-width: 0;
  flex: 1;
  text-align: right;
  color: #8a94a6;
  font-size: 12px;
  line-height: 1.5;
}

.vehicle-drawer-overview-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.vehicle-drawer-overview-toolbar__actions button[data-action="刷新GPS"] {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #1677ff;
  font-weight: 500;
  font-size: 12px;
  padding: 0;
  line-height: 30px;
}

.vehicle-drawer-overview-toolbar__actions button[data-action="刷新GPS"]:hover {
  color: #4096ff;
}

.vehicle-drawer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f2f5;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}

.vehicle-drawer-hero__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #1f2937;
  font-size: 13px;
}

.vehicle-drawer-hero__title strong {
  font-size: 15px;
}

.vehicle-drawer-hero__title span {
  color: #64748b;
}

.vehicle-drawer-hero__meta {
  color: #8a94a6;
  font-size: 12px;
}

.vehicle-drawer-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
}

.vehicle-drawer-summary div {
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfe;
}

.vehicle-drawer-summary span {
  display: block;
  color: #8a94a6;
  font-size: 12px;
}

.vehicle-drawer-summary strong {
  display: block;
  margin-top: 5px;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.vehicle-drawer-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  border-bottom: 1px solid #f0f2f5;
}

.vehicle-drawer-tabs {
  border-right: 1px solid #f0f2f5;
  background: #fafbfc;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vehicle-drawer-tab {
  width: 100%;
  height: 36px;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 10px;
  border-radius: 6px;
  border: 0;
  color: #475569;
  background: transparent;
  font-size: 13px;
}

.vehicle-drawer-tab:hover {
  color: #1677ff;
  background: #eef6ff;
}

.vehicle-drawer-tab.brand-tab-active {
  color: #1677ff;
  background: #eaf3ff;
  font-weight: 600;
}

.vehicle-drawer-tab.brand-tab-active::after {
  display: none;
}

.vehicle-drawer-body {
  padding: 16px 20px;
}

.vehicle-drawer-section + .vehicle-drawer-section {
  margin-top: 16px;
}

.vehicle-drawer-filter-section.drawer-summary-section {
  padding: 0;
  margin: 0 0 12px;
  background: transparent;
}

.vehicle-drawer-body > .vehicle-drawer-filter-section.drawer-summary-section {
  margin-left: 0;
  margin-right: 0;
}

.vehicle-drawer-filter-section .drawer-date-filter {
  margin-top: 0;
  padding-top: 0;
}

.vehicle-drawer-filter-section .drawer-filter-error {
  margin-top: 8px;
}

.vehicle-kpi-strip--drawer {
  padding: 0;
  background: transparent;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vehicle-kpi--drawer {
  cursor: default;
}

.vehicle-kpi--drawer:hover {
  transform: none;
  box-shadow: none;
  border-color: #edf0f5;
}

.vehicle-kpi__value--drawer {
  font-size: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.vehicle-kpi__value--drawer .tag {
  font-size: 13px;
}

.vehicle-drawer-section--kpi .drawer-section-title {
  margin-bottom: 10px;
}

#drawer-vehicle-overview-list {
  margin-top: 20px;
}

.vehicle-drawer-section--today-list .drawer-section-title {
  margin-bottom: 10px;
  margin-top: 4px;
}

.vehicle-drawer-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.vehicle-drawer-section-head .drawer-section-title {
  margin-bottom: 0;
}

.vehicle-detail-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 10px;
}

.vehicle-detail-overview-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2733;
}

.vehicle-overview-period {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.vehicle-overview-period__btn {
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: #f6f8fb;
  color: #424b59;
  font-size: 12px;
  line-height: 30px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.vehicle-overview-period__btn:hover {
  background: #eef6ff;
  color: #1890ff;
}

.vehicle-overview-period__btn.is-active {
  background: #eef4ff;
  color: #1890ff;
  font-weight: 600;
}

.vehicle-drawer-list-panel.list-panel {
  margin: 0;
}

.vehicle-drawer-today-table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--office-border, #edf0f5);
  border-radius: 8px;
}

.vehicle-drawer-today-table-wrap .expense-grid-table th,
.vehicle-drawer-today-table-wrap .expense-grid-table td {
  white-space: nowrap;
}

.vehicle-overview-grid--drawer {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0;
}

.vehicle-overview-grid--drawer .vehicle-overview-item strong.vehicle-overview-value--ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
}

.vehicle-overview-grid--drawer .vehicle-overview-item strong.vehicle-overview-value--tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  font-weight: normal;
}

.vehicle-overview-grid--drawer .vehicle-overview-item strong.vehicle-overview-value--tag > .tag {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;
}

.vehicle-info-grid--drawer {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vehicle-info-grid--track {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-evidence-grid div {
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfe;
}

.vehicle-evidence-grid span,
.vehicle-evidence-grid em {
  display: block;
  color: #8a94a6;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.vehicle-evidence-grid strong {
  display: block;
  margin: 6px 0;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.vehicle-drawer-table-wrap {
  max-height: calc(100vh - 280px);
  overflow: auto;
}

.vehicle-track-card--drawer {
  grid-template-columns: 1fr 1fr;
}

.vehicle-week-summary {
  margin-top: 12px;
  color: #475569;
  font-size: 13px;
}

.vehicle-week-summary strong {
  color: #111827;
}

@media (max-width: 1280px) {
  .vehicle-rule-aside,
  .vehicle-detail-page > .vehicle-rule-aside {
    display: none;
  }

  .vehicle-detail-page {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .vehicle-kpi-strip {
    grid-template-columns: repeat(3, minmax(142px, 1fr));
  }

  .vehicle-overview-grid,
  .vehicle-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-track-card {
    grid-template-columns: 1fr;
  }

  .vehicle-drawer-layout {
    grid-template-columns: 1fr;
  }

  .vehicle-drawer-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #f0f2f5;
  }

  .vehicle-drawer-tab {
    width: auto;
    flex: 0 0 auto;
  }

  .vehicle-drawer-summary,
  .vehicle-overview-grid--drawer,
  .vehicle-info-grid--drawer,
  .vehicle-evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
