:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dfe5ec;
  --line-strong: #c7d0dc;
  --text: #17202a;
  --muted: #687789;
  --primary: #1769aa;
  --primary-dark: #0f4c81;
  --primary-soft: #e7f1fb;
  --ok: #1d7f5f;
  --warn: #b7791f;
  --danger: #b83232;
  --danger-soft: #fff0f0;
  --shadow: 0 12px 30px rgba(21, 39, 64, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) 1fr;
  background: #eef3f7;
}

.icp-footer {
  position: absolute;
  left: 40px;
  bottom: 18px;
  font-size: 12px;
}

.icp-footer a,
.icp-link {
  color: var(--muted);
  text-decoration: none;
}

.icp-footer a:hover,
.icp-link:hover {
  color: var(--primary);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--surface);
}

.login-card {
  width: min(100%, 360px);
}

.brand-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.brand-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.brand-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-visual {
  display: flex;
  align-items: center;
  padding: 64px;
  background:
    linear-gradient(135deg, rgba(23, 105, 170, .92), rgba(22, 77, 121, .9)),
    url("/assets/banner-1.svg");
  background-size: cover;
  color: #fff;
}

.login-visual h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  max-width: 680px;
}

.login-visual p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, .82);
  font-size: 17px;
  line-height: 1.7;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344154;
  font-size: 13px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

.textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.6;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, .12);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  background: #152234;
  color: #d9e4ef;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar-head {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-head .brand-row {
  margin: 0;
}

.sidebar-head .brand-subtitle {
  color: #93a7bc;
}

.nav-list {
  padding: 14px 10px;
  display: grid;
  gap: 4px;
}

.icp-link {
  margin: auto 20px 18px;
  font-size: 12px;
}

.nav-item {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: transparent;
  color: #cbd8e5;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: #21344e;
  color: #fff;
}

.nav-icon {
  width: 18px;
  text-align: center;
  color: #7fb3dc;
}

.bottom-nav {
  display: none;
}

.main {
  min-width: 0;
}

.topbar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-left,
.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-title {
  margin: 0;
  font-size: 18px;
  white-space: nowrap;
}

.project-select {
  min-width: 220px;
}

.module-select {
  display: none;
}

.content {
  padding: 22px 24px 34px;
}

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

.toolbar-actions,
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.tab {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: #344154;
}

.tab:hover,
.tab.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.btn {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: #263241;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.danger {
  color: var(--danger);
  border-color: #efb6b6;
  background: var(--danger-soft);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
}

.btn.icon {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.stat-label {
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.panel-head {
  min-height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  margin: 0;
  font-size: 15px;
}

.panel-body {
  padding: 16px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #4a596b;
  background: #f7f9fb;
  font-weight: 600;
  font-size: 13px;
}

td.wrap {
  white-space: normal;
  min-width: 220px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.tag.gray {
  color: #5f6b78;
  background: #eef2f5;
}

.tag.green {
  color: var(--ok);
  background: #e9f7f1;
}

.tag.orange {
  color: var(--warn);
  background: #fff5df;
}

.tag.red {
  color: var(--danger);
  background: var(--danger-soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 220px;
  white-space: normal;
}

.product-thumb,
.banner-thumb,
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: #edf2f7;
  border: 1px solid var(--line);
}

.banner-thumb {
  width: 96px;
  height: 44px;
}

.avatar {
  border-radius: 50%;
}

.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 43, .42);
  z-index: 30;
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: min(760px, 100%);
  height: 100%;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.drawer-head {
  min-height: 62px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 0;
  font-size: 18px;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px;
}

.drawer-foot {
  min-height: 62px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-item {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #344154;
}

.check-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.check-item input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.empty {
  padding: 38px 16px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  background: #17202a;
  color: #fff;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--danger);
}

.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mono {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
}

.chart-list {
  display: grid;
  gap: 12px;
}

.workflow-tabs {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.service-catalog {
  display: grid;
  gap: 10px;
}

.service-metric {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.service-metric .muted {
  grid-column: 1;
}

.service-metric strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--primary-dark);
}

.car-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.car-info-item {
  min-height: 64px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.car-info-item.span-2 {
  grid-column: span 2;
}

.car-list {
  display: grid;
  gap: 12px;
}

.car-edit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.car-edit-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.verify-list {
  padding: 12px;
}

.verify-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.verify-code-mini {
  min-width: 92px;
  padding: 10px 12px;
  border: 1px dashed var(--primary);
  border-radius: 8px;
  color: var(--primary-dark);
  background: #ecfdf5;
  text-align: center;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
}

.car-order-actions {
  min-width: 150px;
}

.link-button {
  max-width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  word-break: break-word;
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--primary-dark);
  text-decoration: underline;
}

.link-button.strong {
  color: var(--text);
}

.detail-stack {
  display: grid;
  gap: 14px;
}

.detail-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.detail-block h3 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.4;
}

.detail-block p {
  margin: 0;
  color: #344154;
  line-height: 1.7;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.timeline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.position-summary,
.mini-list {
  display: grid;
  gap: 8px;
}

.position-summary {
  margin-top: 12px;
}

.position-summary div,
.mini-list div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.position-summary span,
.mini-list span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.personnel-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 14px;
  align-items: end;
}

.car-map {
  position: relative;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .75) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .75) 1px, transparent 1px),
    #dcebe7;
  background-size: 52px 52px;
}

.map-point {
  position: absolute;
  min-width: 74px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  line-height: 34px;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(16, 24, 32, .16);
}

.map-point.store {
  left: 9%;
  bottom: 16%;
  background: #17202a;
}

.map-point.staff {
  left: 45%;
  top: 43%;
  background: #b7791f;
}

.map-point.user {
  right: 12%;
  top: 18%;
  background: var(--danger);
}

.car-track-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  line-height: 1.5;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 46px;
  gap: 10px;
  align-items: center;
}

.bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf2f7;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.mobile-menu {
  display: none;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .icp-footer {
    left: 0;
    right: 0;
    text-align: center;
  }

  .app-shell {
    display: block;
    min-height: 100svh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    z-index: 25;
    transform: translateX(-100%);
    transition: transform .18s ease;
  }

  .icp-link {
    margin: auto 20px 18px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .module-select {
    display: block;
    min-width: 150px;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 24;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 4px;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 24px rgba(21, 39, 64, .10);
    backdrop-filter: blur(12px);
  }

  .bottom-nav-item {
    min-height: 52px;
    border: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 3px;
    padding: 6px 4px;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }

  .bottom-nav-item span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: inherit;
    background: #edf3f8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
  }

  .bottom-nav-item small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
    font-size: 11px;
    white-space: nowrap;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item.active {
    background: var(--primary-soft);
    color: var(--primary-dark);
  }

  .bottom-nav-item.active span {
    background: var(--primary);
    color: #fff;
  }

  .topbar {
    padding: 0 14px;
  }

  .content {
    padding: 16px 14px calc(86px + env(safe-area-inset-bottom));
  }

  .stats-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions,
  .filters,
  .tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .filters .input,
  .filters .select {
    flex: 1 1 160px;
  }

  .project-select {
    min-width: 0;
    max-width: 46vw;
  }

  .module-select {
    max-width: 32vw;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
    background: #f6f8fb;
  }

  .login-shell {
    min-height: 100svh;
    background: var(--surface);
  }

  .login-panel {
    align-items: flex-start;
    padding: 32px 18px 58px;
  }

  .login-card {
    width: 100%;
  }

  .brand-row {
    margin-bottom: 22px;
  }

  .brand-title {
    font-size: 18px;
  }

  .sidebar,
  .mobile-menu {
    display: none;
  }

  .topbar {
    height: auto;
    min-height: 0;
    padding: 10px 12px 8px;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .top-left,
  .top-right {
    gap: 8px;
    width: 100%;
  }

  .top-left {
    display: grid;
    grid-template-columns: 1fr;
    flex: none;
  }

  .top-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .page-title {
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
    line-height: 1.3;
  }

  .project-select {
    max-width: none;
    min-height: 42px;
    width: 100%;
  }

  .module-select {
    max-width: none;
    min-height: 42px;
    width: 100%;
  }

  .top-right .muted {
    display: none;
  }

  .top-right .btn {
    width: 100%;
    min-height: 40px;
  }

  .content {
    padding: 12px 10px calc(82px + env(safe-area-inset-bottom));
  }

  .panel-head {
    min-height: auto;
    padding: 12px;
    gap: 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head .btn,
  .panel-head .select {
    width: 100%;
    min-height: 42px;
  }

  .panel-body {
    padding: 12px;
  }

  .toolbar {
    gap: 10px;
  }

  .toolbar-actions,
  .filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tabs {
    margin-left: -10px;
    margin-right: -10px;
    padding: 0 10px 4px;
  }

  .filters .input,
  .filters .select,
  .toolbar-actions .btn,
  .filters .btn,
  .car-service-select {
    width: 100%;
    min-height: 44px;
  }

  .tab {
    border-radius: 999px;
    min-height: 40px;
    padding: 0 15px;
  }

  .stat-card {
    padding: 13px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-value {
    font-size: 22px;
  }

  .table-wrap {
    width: 100%;
    overflow: visible;
    border-radius: 0;
  }

  .table-wrap::after {
    display: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
    background: transparent;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr {
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  td {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 0;
    white-space: normal;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
  }

  td > .tag {
    justify-self: start;
  }

  td:first-child {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  td:first-child::before,
  td[data-label="操作"]::before {
    display: none;
  }

  td:last-child {
    padding-bottom: 0;
  }

  td[data-label="操作"] {
    grid-template-columns: 1fr;
  }

  .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .row-actions .btn {
    width: 100%;
    min-height: 42px;
  }

  .panel > .table-wrap {
    padding: 10px;
    background: var(--surface-soft);
  }

  .panel > .table-wrap tbody {
    gap: 10px;
  }

  .panel > .table-wrap tr {
    box-shadow: 0 1px 0 rgba(21, 39, 64, .02);
  }

  .link-row {
    align-items: flex-start;
    min-width: 0;
  }

  .input,
  .select,
  .textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }

  .car-info-grid,
  .personnel-edit,
  .service-metric,
  .verify-item {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-block {
    padding: 12px;
  }

  .mini-list div,
  .position-summary div {
    padding: 9px;
  }

  .service-metric strong {
    grid-column: auto;
    grid-row: auto;
  }

  .car-info-item.span-2 {
    grid-column: auto;
  }

  .card-actions {
    justify-content: stretch;
  }

  .card-actions .btn,
  .personnel-edit .btn,
  .verify-item .btn {
    width: 100%;
  }

  .verify-list {
    padding: 10px;
  }

  .verify-code-mini {
    width: 100%;
    box-sizing: border-box;
  }

  .car-map {
    height: 300px;
  }

  .map-point {
    min-width: auto;
    height: 30px;
    padding: 0 9px;
    line-height: 30px;
    font-size: 12px;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .drawer {
    width: 100%;
    height: min(92svh, 920px);
    border-radius: 16px 16px 0 0;
  }

  .drawer-mask {
    align-items: flex-end;
    justify-content: center;
  }

  .drawer-head {
    min-height: 56px;
    padding: 0 14px;
  }

  .drawer-head h2 {
    font-size: 16px;
  }

  .drawer-body {
    padding: 14px;
  }

  .drawer-foot {
    min-height: auto;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }

  .drawer-foot .btn {
    flex: 1;
    min-height: 44px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  td {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
  }
}
