* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: #eef5ff; color: #1c2b42; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.hidden { display: none !important; }
.app-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; background: #eef5ff; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, #1677ff, #0757d9); box-shadow: 0 8px 24px rgba(22,119,255,.22); }
.topbar .eyebrow { display: block; color: rgba(255,255,255,.75); font-size: 10px; letter-spacing: 1.4px; }
.topbar h1 { margin: 3px 0 0; font-size: 20px; line-height: 1.2; }
.topbar-actions { display: flex; gap: 8px; }
.ghost-btn, .primary-btn, .small-btn { border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 700; }
.ghost-btn { color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }
.primary-btn { color: #fff; background: #1677ff; box-shadow: 0 8px 18px rgba(22,119,255,.2); }
.small-btn { padding: 7px 11px; color: #1677ff; background: #eaf3ff; }
.main { padding: 16px; }
.page-title { margin: 0 0 12px; font-size: 22px; }
.muted { color: #7b8798; font-size: 12px; }
.card { background: #fff; border: 1px solid #e6eefc; border-radius: 18px; box-shadow: 0 10px 28px rgba(27,64,130,.07); overflow: hidden; }
.card + .card { margin-top: 14px; }
.card-body { padding: 16px; }
.hero { padding: 20px; color: #fff; background: linear-gradient(135deg, #1677ff 0%, #0a55c9 55%, #083b91 100%); }
.hero h2 { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 700; }
.hero p { margin: 8px 0 0; color: rgba(255,255,255,.8); font-size: 13px; line-height: 1.6; }
.search-row { display: flex; gap: 9px; margin: 14px 0; }
.search-row input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid #dfe9fb; border-radius: 14px; outline: none; }
.brand-filter { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; padding-bottom: 2px; }
.brand-chip { flex: 0 0 auto; padding: 8px 12px; color: #52637b; background: #fff; border: 1px solid #e1eaf8; border-radius: 999px; font-size: 12px; }
.brand-chip.active { color: #1677ff; border-color: #1677ff; background: #eaf3ff; }
.vehicle-card { margin-bottom: 14px; }
.vehicle-cover { position: relative; height: 190px; background: #dfe9f8; }
.vehicle-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vehicle-cover .badge { position: absolute; top: 12px; left: 12px; padding: 6px 10px; color: #fff; background: rgba(13,74,166,.82); border-radius: 999px; font-size: 11px; }
.vehicle-content { padding: 15px; }
.vehicle-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.vehicle-name { font-size: 17px; font-weight: 800; }
.vehicle-meta { margin-top: 5px; color: #7b8798; font-size: 12px; }
.price { color: #1677ff; font-weight: 800; white-space: nowrap; }
.price small { color: #8c98aa; font-weight: 500; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag { padding: 5px 9px; color: #4f6b99; background: #f2f7ff; border-radius: 999px; font-size: 11px; }
.tag.blue { color: #1677ff; background: #eaf3ff; }
.vehicle-actions { display: flex; gap: 9px; margin-top: 14px; }
.vehicle-actions button { flex: 1; padding: 11px; border-radius: 13px; font-weight: 700; }
.btn-light { color: #1677ff; background: #eaf3ff; }
.btn-blue { color: #fff; background: #1677ff; }
.btn-outline { color: #52637b; background: #fff; border: 1px solid #dfe9fb; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.detail-item { padding: 12px; background: #f6f9ff; border-radius: 14px; }
.detail-item .label { display: block; color: #8a97aa; font-size: 11px; }
.detail-item .value { display: block; margin-top: 4px; font-size: 15px; font-weight: 800; }
.section-title { margin: 0 0 12px; font-size: 16px; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid #eef2f8; }
.form-row:last-child { border-bottom: 0; }
.form-row label { color: #66758a; font-size: 13px; }
.form-row input, .form-row select, .form-row textarea { flex: 1; min-width: 0; padding: 10px 0; color: #1c2b42; background: transparent; border: 0; outline: none; text-align: right; }
.form-row textarea { min-height: 72px; text-align: left; resize: vertical; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 10px 0 14px; }
.choice { padding: 13px; color: #52637b; background: #f6f9ff; border: 1px solid #e4ecfa; border-radius: 14px; text-align: left; }
.choice.active { color: #1677ff; background: #eaf3ff; border-color: #1677ff; }
.choice b { display: block; font-size: 14px; }
.choice span { display: block; margin-top: 4px; color: #8a97aa; font-size: 11px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 34px; height: 34px; color: #1677ff; background: #eaf3ff; border-radius: 10px; font-size: 20px; }
.stepper b { min-width: 56px; text-align: center; }
.upload-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.upload-box { position: relative; min-height: 100px; overflow: hidden; background: #f6f9ff; border: 1px dashed #b9cdf0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #6d7d95; font-size: 12px; }
.upload-box input { position: absolute; inset: 0; opacity: 0; }
.upload-box img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.upload-box .cover-label { position: absolute; bottom: 6px; left: 6px; z-index: 2; padding: 3px 7px; color: #fff; background: rgba(0,0,0,.55); border-radius: 999px; font-size: 10px; }
.cost-row { display: flex; justify-content: space-between; padding: 9px 0; color: #64748b; font-size: 13px; }
.cost-total { margin-top: 8px; padding-top: 13px; border-top: 1px solid #e7eef9; font-size: 16px; font-weight: 800; }
.cost-total span:last-child { color: #1677ff; }
.notice { padding: 12px; color: #70653d; background: #fff9df; border-radius: 14px; font-size: 12px; line-height: 1.6; }
.contract-text { white-space: pre-wrap; color: #435168; font-size: 13px; line-height: 1.8; }
.installment { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eef2f8; font-size: 13px; }
.installment:last-child { border-bottom: 0; }
.status { color: #1677ff; font-weight: 700; }
.order-card { margin-bottom: 14px; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-head b { font-size: 15px; }
.order-head span { color: #1677ff; font-size: 12px; }
.order-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; color: #66758a; font-size: 12px; }
.order-line span:last-child { color: #26364f; text-align: right; }
.empty { padding: 40px 20px; color: #8592a5; text-align: center; }
.bottom-bar { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(27,64,130,.08); backdrop-filter: blur(10px); }
.bottom-bar .amount { color: #1677ff; font-size: 21px; font-weight: 900; }
.bottom-bar button { min-width: 150px; padding: 13px 18px; }
.toast { position: fixed; left: 50%; bottom: 82px; z-index: 100; max-width: 82vw; padding: 10px 15px; color: #fff; background: rgba(20,34,58,.9); border-radius: 999px; font-size: 13px; opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal-mask { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: rgba(17,31,54,.42); }
.modal-panel { width: 100%; max-width: 560px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); background: #fff; border-radius: 22px 22px 0 0; }
.modal-panel h3 { margin: 0 0 14px; }
.modal-actions { display: flex; gap: 9px; margin-top: 16px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 13px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.admin-tabs button { flex: 1; padding: 10px; color: #617087; background: #fff; border: 1px solid #dfe9fb; border-radius: 12px; }
.admin-tabs button.active { color: #1677ff; border-color: #1677ff; background: #eaf3ff; }
@media (min-width: 620px) { .app-shell { margin-top: 16px; margin-bottom: 16px; min-height: calc(100vh - 32px); border-radius: 24px; overflow: hidden; } .topbar { position: static; } }

/* 门店联系方式与照片/视频预览 */
.form-static { color: #1c2b42; font-size: 13px; font-weight: 700; }
.contact-list { display: grid; gap: 9px; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 14px; color: #52637b; background: #f6f9ff; border: 1px solid #e4ecfa; border-radius: 14px; text-align: left; }
.contact-row span { flex: 0 0 auto; color: #7b8798; font-size: 12px; }
.contact-row b { min-width: 0; color: #1677ff; font-size: 13px; text-align: right; word-break: break-all; }
.contact-list.compact { margin-top: 12px; }
.wechat-id-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; padding: 14px; background: #eaf3ff; border-radius: 14px; }
.wechat-id-box span { color: #6a7c98; font-size: 12px; }
.wechat-id-box b { color: #095dcc; font-size: 18px; word-break: break-all; }
.wechat-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; padding: 14px; background: #f7faff; border: 1px dashed #b9cdf0; border-radius: 16px; color: #73829a; font-size: 12px; text-align: center; }
.wechat-qr { width: 190px; height: 190px; object-fit: contain; border-radius: 12px; background: #fff; }
.modal-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.preview-label { margin: 14px 0 7px; color: #65758d; font-size: 12px; font-weight: 700; }
.media-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; align-items: center; }
.media-preview { position: relative; display: inline-flex; width: 72px; height: 72px; overflow: hidden; border-radius: 12px; background: #eaf0f8; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-preview > span { position: absolute; right: 4px; bottom: 4px; padding: 2px 5px; color: #fff; background: rgba(0,0,0,.58); border-radius: 999px; font-size: 9px; }

/* 首页推荐与详细筛选 */
.home-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 10px; }
.sort-pill, .filter-pill { padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.sort-pill { color: #1677ff; background: #eaf3ff; }
.filter-pill { color: #52637b; background: #fff; border: 1px solid #dfe9fb; }
.filter-pill.active { color: #fff; background: #1677ff; border-color: #1677ff; }

.tag.special { color: #b42318; background: #fff0ed; }
.special-pill.active { color: #fff; background: #ff5b45; }
.checkbox-input { flex: 0 0 auto !important; width: 22px !important; height: 22px; accent-color: #1677ff; }

/* 备选车辆入口 */
.backup-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 12px 14px; color: #1677ff; background: #eaf3ff; border-radius: 14px; }
.backup-banner b { font-size: 15px; }
.backup-banner button { padding: 8px 12px; color: #1677ff; background: #fff; border: 1px solid #cfe0ff; border-radius: 999px; font-size: 12px; font-weight: 700; }

/* 愿望车辆 */
.wish-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.wish-card h3 { margin: 0; }
.wish-card p { margin: 7px 0 0; line-height: 1.55; }
.wish-card button { flex: 0 0 auto; white-space: nowrap; }

.required-star { margin-left: 3px; color: #e5484d; }

/* 简化版备选车辆页 */
.backup-back { margin-bottom: 14px; }
.backup-list { display: grid; gap: 12px; }
.backup-list-card { display: flex; gap: 12px; padding: 12px; }
.backup-list-cover { flex: 0 0 82px; width: 82px; height: 82px; overflow: hidden; background: #e7eef8; border-radius: 14px; }
.backup-list-cover img { width: 100%; height: 100%; object-fit: cover; }
.backup-list-body { display: flex; flex: 1; min-width: 0; flex-direction: column; justify-content: center; }
.backup-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.backup-list-head b { overflow: hidden; color: #17243a; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.backup-list-head span { flex: 0 0 auto; color: #7b8798; font-size: 12px; }
.backup-list-meta { margin-top: 6px; color: #7b8798; font-size: 12px; }
.backup-list-price { margin-top: 6px; color: #1677ff; font-size: 13px; font-weight: 700; }
.backup-list .vehicle-actions { margin-top: 10px; }
.backup-list .vehicle-actions button { padding: 8px; border-radius: 10px; font-size: 12px; }

.pickup-label { font-size: 14px; font-weight: 700; }

.home-mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 14px; }
.home-contact-hint {
  margin: 10px 0 0;
  color: #6b7c93;
  font-size: 12px;
  text-align: center;
}

.mode-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mode-button { width: 100%; padding: 16px 8px; border-radius: 16px; font-size: 16px; font-weight: 700; }
.mode-label { color: #6b7c93; font-size: 12px; }
.mode-button--short { color: #1677ff; background: #eaf3ff; }
.mode-button--long { color: #7a4b00; background: #fff4d6; }
.mode-button--full { color: #0d7a64; background: #e7f8f3; }

.mode-button.active { box-shadow: inset 0 0 0 2px rgba(22,119,255,.35); }

.mode-info-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-info-card { margin-top: 14px; }


.media-preview .media-remove { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0; color: #fff; background: rgba(220,38,38,.92); border: 0; border-radius: 50%; font-size: 13px; line-height: 1; cursor: pointer; }

/* 访问统计 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: #f6f9ff; border-radius: 14px; }
.stat-num { color: #1677ff; font-size: 22px; font-weight: 800; }
.stat-label { color: #7b8798; font-size: 12px; }
.stat-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 140px; padding-top: 6px; }
.stat-bar-wrap { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.stat-bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #4a9dff, #1677ff); border-radius: 6px 6px 2px 2px; }
.stat-bar-value { color: #52637b; font-size: 11px; font-weight: 700; }
.stat-bar-label { color: #8a97aa; font-size: 10px; }

/* 车辆详情图片轮播（左右滑动查看下一张） */
.vehicle-cover { overflow: hidden; }
.detail-gallery { display: flex; height: 190px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.detail-gallery::-webkit-scrollbar { display: none; }
.detail-gallery img { flex: 0 0 100%; width: 100%; height: 190px; object-fit: cover; scroll-snap-align: center; scroll-snap-stop: always; display: block; user-select: none; -webkit-user-drag: none; }
.gallery-counter { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; color: #fff; background: rgba(0,0,0,.55); border-radius: 999px; font-size: 12px; }
.vehicle-cover-empty { display: flex; align-items: center; justify-content: center; height: 190px; color: #8a97aa; font-size: 13px; background: #dfe9f8; }

/* 图片全屏预览 */
.viewer-mask { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.95); }
.viewer-track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; scroll-snap-stop: always; display: block; user-select: none; -webkit-user-drag: none; }
.viewer-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; color: #fff; font-size: 13px; background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,0)); }
.viewer-close { padding: 6px 16px; color: #fff; background: rgba(255,255,255,.2); border: 0; border-radius: 999px; font-size: 13px; }

/* 左上角返回按钮 */
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.back-btn { flex: 0 0 auto; width: 34px; height: 34px; padding: 0 0 3px; color: #1677ff; background: #eaf3ff; border: 0; border-radius: 50%; font-size: 22px; line-height: 1; }
