/* 51yche 移动端样式（移动端优先，容器限宽 480px） */
body {
  background: #f2f4f8;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.app-container {
  max-width: 480px;
  min-height: 100vh;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
}

/* 登录/注册卡片 */
.auth-card {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(31, 66, 135, .08);
  background: #fff;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 1px;
}

/* 按钮与输入框统一圆角、加大触控面积 */
.btn {
  border-radius: 12px;
}
.btn-primary {
  background: #2d6cdf;
  border-color: #2d6cdf;
}
.btn-primary:active, .btn-primary:focus {
  background: #1f56b8;
  border-color: #1f56b8;
}
.form-control, .form-select {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
}
.form-control:focus {
  box-shadow: 0 0 0 3px rgba(45, 108, 223, .15);
  border-color: #2d6cdf;
}

/* 首页 */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px;
}
.avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #e3e9f5;
}
.avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2d6cdf;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
}
.menu-card .list-group-item {
  border: 0;
  border-radius: 12px !important;
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 6px rgba(31, 66, 135, .05);
}

/* 头像选择预览 */
.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px dashed #c6d2e8;
  background: #f7f9fc;
}

/* 提示气泡 */
.toast-area {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  width: calc(100% - 48px);
  max-width: 400px;
}

/* 登录方式切换 Tab：与主色一致 */
.login-tabs .nav-link {
  border-radius: 12px;
  color: #2d6cdf;
  font-weight: 500;
}
.login-tabs .nav-link.active {
  background: #2d6cdf;
  color: #fff;
}

/* 地点检索候选列表 */
.suggest-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e3e9f5;
  border-top: none;
  border-radius: 0 0 10px 10px;
}
.suggest-list .list-group-item {
  border-left: none;
  border-right: none;
}

/* ==================== 全屏地图页 ==================== */
body.map-body {
  background: #e9eef5;
}

.map-page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.map-canvas {
  position: absolute;
  inset: 0;
}
.map-fallback {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #eef3fb, #e2eaf7);
}
.map-fallback img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fallback-tip {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  color: #4b5563;
  text-align: center;
}

/* 右上角头像 + 菜单 */
.map-avatar {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 16px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2d6cdf;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(31, 66, 135, .22);
  z-index: 30;
}
.map-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-menu {
  position: absolute;
  top: calc(68px + env(safe-area-inset-top));
  right: 16px;
  min-width: 152px;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(31, 66, 135, .2);
  z-index: 31;
}
.avatar-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1f2937;
  font-size: 14px;
  text-align: left;
}
.avatar-menu button:active {
  background: #f2f5fa;
}
.avatar-menu button.danger {
  color: #e5484d;
}
.avatar-menu .mi {
  margin-right: 8px;
  font-size: 14px;
}

/* 底部行程面板 */
.trip-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 24px rgba(31, 66, 135, .12);
  z-index: 20;
}
.panel-handle {
  width: 36px;
  height: 4px;
  margin: 2px auto 8px;
  border-radius: 2px;
  background: #e3e9f5;
}
.trip-main {
  display: flex;
  align-items: center;
}
.trip-rows {
  flex: 1;
  min-width: 0;
}
.trip-row {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
}
.trip-rows .trip-row {
  cursor: pointer;
}
.trip-divider {
  height: 1px;
  margin-left: 32px;
  background: #eef1f6;
}
.dot {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dot-origin { background: #2d6cdf; }
.dot-dest { background: #ff5a3c; }
.dot-gray { background: #9aa5b8; }

.row-label {
  flex: 1;
  min-width: 0;
  margin-left: 10px;
  color: #1f2937;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-label.placeholder { color: #a6aebb; }
.row-label-static {
  margin-left: 10px;
  color: #1f2937;
  font-size: 15px;
}
.row-value {
  margin-left: auto;
  color: #2d6cdf;
  font-size: 14px;
  font-weight: 700;
}
.row-arrow {
  margin-left: 6px;
  color: #c3cbd8;
  font-size: 18px;
  line-height: 1;
}
.swap-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin-left: 8px;
  border: 0;
  border-radius: 50%;
  background: #2d6cdf;
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

/* 出发时间行：透明 input 铺满整行，点击直接唤起原生选择器 */
.time-row #departInput {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.time-clear {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef1f6;
  color: #8b93a5;
  font-size: 11px;
  line-height: 1;
}

/* 价格区 */
.price-area { padding-top: 4px; }
.price-hint {
  padding: 16px 0 10px;
  color: #8b93a5;
  font-size: 13px;
  text-align: center;
}
.car-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.car-tab {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #eef1f6;
  color: #1f2937;
  font-size: 13px;
}
.car-tab.on {
  background: #2d6cdf;
  color: #fff;
  font-weight: 700;
}
.price-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 12px;
}
.price-value {
  color: #2d6cdf;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}
.price-desc {
  margin-top: 2px;
  color: #8b93a5;
  font-size: 12px;
}
.price-right { text-align: right; }
.price-taxi-label { color: #8b93a5; font-size: 11px; }
.price-taxi { color: #1f2937; font-size: 16px; font-weight: 700; }
.route-meta { margin-top: 8px; color: #8b93a5; font-size: 12px; }
.price-tip { margin-top: 6px; color: #a6aebb; font-size: 11px; }

/* ==================== 地址检索页 ==================== */
.search-page {
  min-height: 100vh;
  background: #f7f9fc;
}
.search-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 12px 8px;
  background: #fff;
}
.search-back {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f2937;
  font-size: 26px;
  line-height: 1;
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 22px;
  background: #f2f4f8;
}
.search-icon { margin-right: 6px; font-size: 14px; }
.search-input-wrap input {
  flex: 1;
  height: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #1f2937;
  font-size: 15px;
}
.search-clear {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #dfe5ee;
  color: #7c8698;
  font-size: 11px;
  line-height: 1;
}
.search-tip {
  padding: 8px 16px;
  color: #a6aebb;
  font-size: 12px;
}
.search-tip b { color: #2d6cdf; }
.search-results { background: #fff; }
.poi-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #f0f3f8;
  background: #fff;
  text-align: left;
}
.poi-item:active { background: #f5f8fd; }
.poi-name {
  color: #1f2937;
  font-size: 15px;
  font-weight: 600;
}
.poi-addr {
  margin-top: 3px;
  color: #8b93a5;
  font-size: 12px;
}
.search-empty {
  padding: 40px 16px;
  color: #a6aebb;
  font-size: 13px;
  text-align: center;
}

/* ==================== 通用弹窗 ==================== */
.dlg-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, .45);
}
.dlg {
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}
.dlg-title {
  padding: 18px 18px 6px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}
.dlg-body {
  padding: 0 18px 16px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}
.dlg-actions {
  display: flex;
  border-top: 1px solid #eef1f6;
}
.dlg-actions button {
  flex: 1;
  padding: 13px 0;
  border: 0;
  background: #fff;
  color: #2d6cdf;
  font-size: 15px;
}
.dlg-actions button.primary { font-weight: 700; }
.dlg-actions button.danger { color: #e5484d; }
.dlg-actions button + button { border-left: 1px solid #eef1f6; }
