﻿* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif; background: #F5F6FA; color: #1A1A1A; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
#app { max-width: 430px; margin: 0 auto; position: relative; min-height: 100vh; background: #F5F6FA; }

.page { display: none; padding-bottom: 80px; }
.page.active { display: block; }

/* Header */
.header { position: relative; padding: 60px 20px 90px; overflow: hidden; }
.header-bg { position: absolute; top: -30px; left: -20px; right: -20px; bottom: 0; background-image: url(static/car_alphard.png), linear-gradient(135deg, #1A1A2E, #16213E 40%, #0F3460); background-size: cover; background-position: center; background-blend-mode: overlay; border-radius: 0 0 30px 30px; }
.header-content { position: relative; display: flex; justify-content: space-between; align-items: center; z-index: 1; }
.brand-title { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: 1px; }
.brand-sub { font-size: 14px; color: rgba(255,255,255,.85); margin-top: 4px; letter-spacing: 2px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 20px; border: 2px solid rgba(255,255,255,.3); cursor: pointer; }

/* Actions */
.actions { display: flex; gap: 10px; margin: -30px 15px 15px; position: relative; z-index: 2; }
.action-card { flex: 1; background: #fff; border-radius: 16px; padding: 20px 8px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.06); cursor: pointer; }
.action-card:active { transform: scale(.96); }
.action-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 22px; }
.ac1 { background: #FFF0E6; } .ac2 { background: #E6F0FF; } .ac3 { background: #E6FFE6; }
.action-title { font-size: 14px; font-weight: 700; color: #1A1A1A; }
.action-desc { font-size: 10px; color: #999; margin-top: 4px; }

/* Features */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 15px; }
.feature { background: #fff; border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.04); }
.fi { font-size: 22px; } .ft { font-size: 14px; font-weight: 600; } .fd { font-size: 11px; color: #999; margin-top: 2px; }

/* Vehicle Showcase */
.vehicle-section { margin: 15px 0 10px 15px; }
.vh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-right: 15px; }
.vt { font-size: 17px; font-weight: 700; } .vm { font-size: 12px; color: #FF6B35; cursor: pointer; }
.vehicle-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.vehicle-card { flex-shrink: 0; width: 180px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.06); cursor: pointer; }
.vehicle-card.hero { border: 2px solid #FF6B35; }
.vi { width: 100%; height: 110px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; position: relative; background: #f5f5f5; display: flex; align-items: center; justify-content: center; }
.vi img { width: 100%; height: 100%; object-fit: cover; }
.v-badge { position: absolute; top: 4px; right: 4px; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #FF6B35, #FF8F5E); }
.vn { font-size: 14px; font-weight: 700; display: block; }
.vd { font-size: 10px; color: #999; margin-top: 2px; display: block; }
.vp { font-size: 14px; font-weight: 700; color: #FF6B35; margin-top: 6px; display: block; }

/* Steps */
.section-title { font-size: 17px; font-weight: 700; margin: 15px 15px 10px; }
.steps { display: flex; margin: 0 15px 20px; padding: 18px; background: #fff; border-radius: 14px; }
.step { flex: 1; text-align: center; position: relative; }
.sc { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #FF6B35, #FF8F5E); display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; color: #fff; font-weight: 700; font-size: 16px; }
.step span { font-size: 11px; color: #666; display: block; margin-top: 6px; }
.sl { position: absolute; top: 16px; right: -50%; width: 100%; height: 2px; background: #eee; }

/* Page Header */
.page-header { display: flex; align-items: center; justify-content: space-between; padding: 50px 16px 16px; background: #fff; position: sticky; top: 0; z-index: 99; }
.back-btn { font-size: 14px; color: #666; cursor: pointer; }
.page-title { font-size: 18px; font-weight: 700; }
.ph { width: 60px; }

/* Trip Type */
.trip-type { display: flex; padding: 12px 16px; background: #fff; gap: 10px; }
.type-btn { flex: 1; text-align: center; padding: 10px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #999; background: #F5F6FA; cursor: pointer; }
.type-btn.active { color: #fff; background: linear-gradient(135deg, #FF6B35, #FF8F5E); }

/* Form */
.form-card { background: #fff; border-radius: 14px; margin: 12px 16px; overflow: hidden; }
.form-item { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.form-item:last-child { border-bottom: none; }
.fl { font-size: 13px; color: #666; width: 70px; flex-shrink: 0; }
.fv { flex: 1; font-size: 14px; color: #1A1A1A; }
.fv.ph { color: #ccc; }
.fi { flex: 1; font-size: 14px; border: none; outline: none; background: transparent; }
.fi::placeholder { color: #ccc; }

/* Car Selection */
.car-section { margin: 12px 16px; }
.cs-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.car-list { display: flex; gap: 10px; }
.car-item { flex: 1; text-align: center; padding: 12px 8px; border-radius: 12px; border: 2px solid #F0F0F0; cursor: pointer; background: #fff; }
.car-item.active { border-color: #FF6B35; background: rgba(255,107,53,.05); }
.cn { font-size: 13px; font-weight: 600; color: #333; display: block; }
.cs { font-size: 11px; color: #999; display: block; margin-top: 2px; }
.cp { font-size: 14px; color: #FF6B35; font-weight: 700; display: block; margin-top: 4px; }

/* Bottom Bar */
.bottom-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: #fff; display: flex; align-items: center; padding: 12px 16px; padding-bottom: calc(12px + 70px); box-shadow: 0 -2px 12px rgba(0,0,0,.05); z-index: 50; }
.price-area { flex: 1; }
.pl { font-size: 11px; color: #999; display: block; }
.pv { font-size: 24px; font-weight: 800; color: #FF6B35; }
.book-btn { padding: 12px 40px; background: linear-gradient(135deg, #FF6B35, #FF8F5E); color: #fff; border: none; border-radius: 24px; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(255,107,53,.3); }
.book-btn:active { transform: scale(.97); }

/* Orders */
.order-tabs { display: flex; background: #fff; padding: 12px 0 0; position: sticky; top: 0; z-index: 10; }
.otab { flex: 1; text-align: center; padding-bottom: 12px; font-size: 14px; font-weight: 600; color: #999; cursor: pointer; position: relative; }
.otab.active { color: #FF6B35; }
.otab.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: #FF6B35; border-radius: 3px; }
.order-list { padding: 12px 16px; }
.order-card { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.04); cursor: pointer; }
.order-card:active { opacity: .8; }
.oc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.oc-service { font-size: 16px; font-weight: 700; }
.tag { padding: 2px 10px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.tag.pending { background: rgba(255,107,53,.15); color: #FF6B35; }
.tag.confirmed { background: rgba(64,169,255,.15); color: #40A9FF; }
.tag.completed { background: rgba(82,196,26,.15); color: #52C41A; }
.tag.cancelled { background: rgba(153,153,153,.15); color: #999; }
.oc-route { font-size: 13px; color: #666; margin-bottom: 8px; }
.oc-footer { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid #f5f5f5; }
.oc-date { font-size: 12px; color: #999; }
.oc-price { font-size: 18px; font-weight: 700; color: #FF6B35; }

/* Mine */
.mine-header { background: linear-gradient(135deg, #FF6B35, #FF8F5E); padding: 60px 20px 40px; display: flex; align-items: center; cursor: pointer; }
.mine-avatar { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.2); overflow: hidden; margin-right: 16px; border: 2px solid rgba(255,255,255,.4); flex-shrink: 0; }
.mine-avatar img { width: 100%; height: 100%; }
.mine-name { font-size: 18px; font-weight: 700; color: #fff; }
.mine-phone { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 4px; }
.mine-arrow { margin-left: auto; font-size: 18px; color: rgba(255,255,255,.6); }
.order-stats { display: flex; background: #fff; margin: -20px 16px 16px; border-radius: 14px; padding: 16px 0; position: relative; z-index: 1; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.stat-item { flex: 1; text-align: center; border-right: 1px solid #f5f5f5; cursor: pointer; }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 20px; font-weight: 700; color: #FF6B35; display: block; }
.stat-label { font-size: 11px; color: #999; margin-top: 4px; display: block; }
.menu-section { background: #fff; border-radius: 14px; margin: 0 16px; overflow: hidden; }
.menu-item { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #f9f9f9; }
.mi { font-size: 18px; margin-right: 12px; }
.ml { flex: 1; font-size: 14px; }
.ma { font-size: 14px; color: #ccc; }
.login-section { margin: 16px; }
.logout-btn { width: 100%; padding: 12px; text-align: center; border-radius: 20px; border: 1px solid #FF4444; color: #FF4444; font-size: 14px; cursor: pointer; background: #fff; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); }
.modal-content { position: relative; width: 100%; max-width: 430px; background: #fff; border-radius: 20px 20px 0 0; padding: 24px; max-height: 70vh; overflow-y: auto; }
.modal-close { position: absolute; top: 16px; right: 16px; font-size: 20px; color: #999; cursor: pointer; z-index: 1; }
.login-box { text-align: center; padding: 20px 0; }
.login-avatar { font-size: 60px; margin-bottom: 12px; }
.login-title { font-size: 18px; font-weight: 700; }
.login-sub { font-size: 13px; color: #999; margin: 8px 0 24px; }
.wx-login-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #07C160, #06AD56); color: #fff; border: none; border-radius: 24px; font-size: 16px; font-weight: 700; cursor: pointer; }
.phone-login { padding: 16px 0; font-size: 13px; color: #666; cursor: pointer; text-decoration: underline; }

/* Admin */
.admin-layout { background: #1A1A2E !important; min-height: 100vh; }
.admin-header { background: #16213E; padding: 50px 16px 16px; display: flex; justify-content: space-between; align-items: center; }
.admin-title { font-size: 18px; font-weight: 700; color: #fff; }
.admin-logout { padding: 6px 16px; border: 1px solid rgba(255,255,255,.3); border-radius: 16px; font-size: 12px; color: rgba(255,255,255,.6); cursor: pointer; }
.admin-nav { display: flex; gap: 6px; padding: 12px; background: #16213E; overflow-x: auto; }
.admin-nav button { padding: 8px 14px; border-radius: 16px; font-size: 12px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); cursor: pointer; border: none; white-space: nowrap; }
.admin-nav button.active { background: linear-gradient(135deg, #FF6B35, #FF8F5E); color: #fff; font-weight: 600; }
.admin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.admin-card { background: rgba(255,255,255,.06); border-radius: 14px; padding: 16px; border: 1px solid rgba(255,255,255,.06); }
.admin-card .icon { font-size: 22px; }
.admin-card .val { font-size: 26px; font-weight: 800; color: #fff; margin-top: 6px; display: block; }
.admin-card .lbl { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 2px; display: block; }
.admin-section { background: rgba(255,255,255,.06); border-radius: 14px; padding: 16px; margin: 0 12px 12px; border: 1px solid rgba(255,255,255,.06); }
.admin-section .stitle { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 12px; }

/* Tab Bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: #fff; display: flex; padding: 6px 0 12px; border-top: 1px solid #eee; z-index: 100; }
.tab-item { flex: 1; text-align: center; font-size: 10px; color: #999; cursor: pointer; }
.tab-item.active { color: #FF6B35; }
.ti-icon { font-size: 20px; display: block; margin-bottom: 2px; }
.tab-item .ti-icon { color: #999; }
.tab-item.active .ti-icon { color: #FF6B35; }

/* Empty State */
.empty-state { text-align: center; padding: 80px 0; color: #ccc; }
.empty-state .e-icon { font-size: 48px; }
.empty-state .e-text { font-size: 14px; margin-top: 12px; }

/* Detail Modal */
.detail-row { display: flex; padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.dl { font-size: 13px; color: #999; width: 80px; flex-shrink: 0; }
.dv { flex: 1; font-size: 14px; }
.detail-actions { display: flex; gap: 10px; margin-top: 16px; }
.detail-actions button { flex: 1; padding: 12px; border-radius: 20px; font-size: 14px; font-weight: 700; border: none; cursor: pointer; }
.pay-btn { background: linear-gradient(135deg, #FF6B35, #FF8F5E); color: #fff; }
.cancel-btn { background: rgba(255,68,68,.1); color: #FF4444; border: 1px solid rgba(255,68,68,.2) !important; }

/* Admin Login */
.admin-login-form { display: flex; justify-content: center; padding: 40px 16px; }
.admin-login-box { background: rgba(255,255,255,.95); border-radius: 20px; padding: 32px 24px; width: 100%; max-width: 360px; }
.admin-login-box h3 { text-align: center; margin-bottom: 20px; color: #1A1A2E; }
.admin-login-box input { width: 100%; padding: 12px 16px; background: #F5F6FA; border-radius: 12px; border: 1px solid transparent; font-size: 14px; outline: none; margin-bottom: 12px; }
.admin-login-box input:focus { border-color: #FF6B35; }
.admin-login-box button { width: 100%; padding: 14px; background: linear-gradient(135deg, #FF6B35, #FF8F5E); color: #fff; border: none; border-radius: 24px; font-size: 16px; font-weight: 700; cursor: pointer; }


/* ==================== CALENDAR ==================== */
.cal-header { display:flex; justify-content:space-between; align-items:center; padding:0 0 16px; }
.cal-nav { font-size:20px; color:#FF6B35; font-weight:700; cursor:pointer; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:50%; user-select:none; }
.cal-nav:active { background:#f5f5f5; }
.cal-title { font-size:17px; font-weight:700; color:#333; }
.cal-weekdays { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-bottom:8px; }
.cal-weekdays span { text-align:center; font-size:12px; color:#999; padding:6px 0; font-weight:600; }
.cal-days { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.cal-day { text-align:center; padding:10px 0; font-size:15px; color:#333; border-radius:50%; cursor:pointer; aspect-ratio:1; display:flex; align-items:center; justify-content:center; }
.cal-day:active { background:#FFF0E6; }
.cal-day.cal-empty { cursor:default; }
.cal-day.cal-today { background:#FF6B35; color:#fff; font-weight:700; }
.cal-day.cal-past { color:#ddd; cursor:not-allowed; }
.cal-day:not(.cal-empty):not(.cal-past):hover { background:#FFF0E6; }
.cal-footer { display:flex; gap:10px; margin-top:16px; padding-top:12px; border-top:1px solid #f0f0f0; }
.cal-today-btn, .cal-cancel-btn { flex:1; padding:12px; border-radius:20px; font-size:14px; font-weight:600; cursor:pointer; border:none; }
.cal-today-btn { background:linear-gradient(135deg,#FF6B35,#FF8F5E); color:#fff; }
.cal-cancel-btn { background:#f5f5f5; color:#666; }

/* ==================== LOCATION PICKER ==================== */
.loc-modal-body { height:65vh; display:flex; flex-direction:column; }
.loc-header { display:flex; justify-content:space-between; align-items:center; padding-bottom:12px; border-bottom:1px solid #eee; margin-bottom:12px; flex-shrink:0; }
.loc-title { font-size:17px; font-weight:700; }
.loc-close { font-size:20px; color:#999; cursor:pointer; }
.loc-search-wrap { position:relative; margin-bottom:12px; flex-shrink:0; }
.loc-search-icon { position:absolute; left:14px; top:50%; transform:translateY(-50%); font-size:16px; z-index:1; }
.loc-search-input { width:100%; padding:12px 16px 12px 40px; border-radius:12px; border:2px solid #eee; font-size:14px; outline:none; transition:border-color .2s; }
.loc-search-input:focus { border-color:#FF6B35; }
.loc-results { flex:1; overflow-y:auto; }
.loc-hint { text-align:center; padding:40px 0; }
.loc-hint-icon { font-size:40px; margin-bottom:8px; }
.loc-hint-text { font-size:14px; color:#999; margin-bottom:4px; }
.loc-hint-sub { font-size:11px; color:#ccc; }
.loc-loading { text-align:center; padding:40px 0; color:#999; }
.loc-spinner { width:24px; height:24px; border:3px solid #f0f0f0; border-top-color:#FF6B35; border-radius:50%; animation:spin .6s linear infinite; margin:0 auto 8px; }
@keyframes spin { to { transform:rotate(360deg); } }
.loc-error { text-align:center; padding:40px 0; }
.loc-error-icon { font-size:36px; margin-bottom:8px; }
.loc-error-text { font-size:14px; color:#999; margin-bottom:4px; }
.loc-error-sub { font-size:11px; color:#ccc; }
.loc-noresult { text-align:center; padding:40px 0; }
.loc-noresult-icon { font-size:36px; margin-bottom:8px; }
.loc-noresult-text { font-size:14px; color:#999; margin-bottom:4px; }
.loc-noresult-sub { font-size:11px; color:#ccc; }
.loc-item { display:flex; align-items:center; padding:14px 0; border-bottom:1px solid #f5f5f5; cursor:pointer; gap:12px; }
.loc-item:active { background:#fafafa; }
.loc-item-icon { font-size:18px; flex-shrink:0; }
.loc-item-info { flex:1; min-width:0; }
.loc-item-name { font-size:14px; font-weight:600; color:#333; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.loc-item-addr { font-size:11px; color:#999; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.loc-item-meta { display:flex; flex-direction:column; align-items:flex-end; gap:2px; flex-shrink:0; }
.loc-item-dist { font-size:10px; color:#40A9FF; }
.loc-item-select { font-size:12px; color:#FF6B35; font-weight:600; }
.loc-footer { text-align:center; padding-top:10px; margin-top:8px; border-top:1px solid #f0f0f0; flex-shrink:0; }
.loc-powered { font-size:11px; color:#ccc; }
.loc-powered strong { color:#40A9FF; }

/* ==================== PORT SELECTOR ==================== */
.port-header { display:flex; justify-content:space-between; align-items:center; padding-bottom:12px; border-bottom:1px solid #eee; margin-bottom:12px; }
.port-title { font-size:17px; font-weight:700; }
.port-close { font-size:20px; color:#999; cursor:pointer; }
.port-search-wrap { position:relative; margin-bottom:12px; }
.port-search-icon { position:absolute; left:14px; top:50%; transform:translateY(-50%); font-size:16px; z-index:1; }
.port-search-input { width:100%; padding:12px 16px 12px 40px; border-radius:12px; border:2px solid #eee; font-size:14px; outline:none; transition:border-color .2s; }
.port-search-input:focus { border-color:#FF6B35; }
.port-list { max-height:400px; overflow-y:auto; }
.port-item { display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid #f5f5f5; cursor:pointer; }
.port-item:active { background:#fafafa; }
.port-item-left { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.port-item-icon { font-size:18px; flex-shrink:0; }
.port-item-info { flex:1; min-width:0; }
.port-item-name { font-size:14px; font-weight:600; color:#333; }
.port-item-desc { font-size:11px; color:#999; margin-top:2px; }
.port-item-select { font-size:12px; color:#FF6B35; font-weight:600; flex-shrink:0; }
.port-empty { text-align:center; padding:40px; color:#999; font-size:14px; }

/* ==================== LOCATION BUILT-IN DATABASE ==================== */
.loc-section-title { font-size:13px; font-weight:700; color:#333; padding:12px 0 6px; }
.loc-divider { height:1px; background:#f0f0f0; margin:8px 0; }
.loc-region-btn { display:flex; align-items:center; padding:14px 0; border-bottom:1px solid #f5f5f5; cursor:pointer; gap:10px; }
.loc-region-btn:active { background:#fafafa; }
.loc-region-icon { font-size:18px; }
.loc-region-count { margin-left:auto; font-size:11px; color:#bbb; }
.loc-region-arrow { font-size:14px; color:#ccc; margin-left:4px; }
.loc-back { font-size:13px; color:#FF6B35; cursor:pointer; padding:8px 0; font-weight:600; }
.loc-cat-title { font-size:12px; font-weight:700; color:#666; padding:10px 0 4px; border-bottom:1px solid #f5f5f5; margin-top:4px; }
.loc-tip { font-size:11px; color:#bbb; padding:4px 0 8px; }
.loc-custom-input-area { padding:8px 0 16px; }
.loc-custom-input { width:100%; padding:12px 14px; border:2px solid #eee; border-radius:12px; font-size:14px; outline:none; margin-bottom:8px; }
.loc-custom-input:focus { border-color:#FF6B35; }
.loc-custom-btn { width:100%; padding:12px; background:linear-gradient(135deg,#FF6B35,#FF8F5E); color:#fff; border:none; border-radius:20px; font-size:14px; font-weight:600; cursor:pointer; }
