/* 恋租 H5 样式 */
:root {
  --brand: #9b2fd6;
  --brand2: #e93a8c;
  --grad: linear-gradient(135deg, #7b2ff7, #e93a8c);
  --bg: #f6f5f8;
  --card: #ffffff;
  --text: #26232b;
  --sub: #8a8694;
  --line: #efeaf3;
  --red: #ff4d4f;
  --orange: #ff7a1a;
  --green: #22b07d;
  --blue: #2f80ed;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body { background: #e9e4ee; color: var(--text); font-family: -apple-system, "PingFang SC", "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; box-shadow: 0 0 24px rgba(60,20,90,.12); }
.page { min-height: 100vh; padding-bottom: 70px; }
.page.no-tab { padding-bottom: 20px; }

/* ===== 通用组件 ===== */
.navbar { position: sticky; top: 0; z-index: 50; background: var(--card); display: flex; align-items: center; height: 48px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.navbar .back { font-size: 20px; width: 32px; color: var(--text); display: flex; align-items: center; }
.navbar .back .ico-svg { vertical-align: 0; }
.navbar .title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.navbar .right { width: 48px; text-align: right; font-size: 13px; color: var(--brand); }

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 14px; padding: 8px 18px; }
.btn-primary { background: var(--grad); color: #fff; font-weight: 600; }
.btn-plain { border: 1px solid #d8cbe6; color: var(--brand); background: #fff; }
.btn-gray { background: #f0edf3; color: var(--sub); }
.btn-block { display: flex; width: 100%; padding: 13px; font-size: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.card { background: var(--card); border-radius: var(--radius); margin: 10px 12px; padding: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 16px 14px 8px; }
.section-title h3 { font-size: 16px; font-weight: 700; position: relative; padding-left: 10px; }
.section-title h3::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 2px; background: var(--grad); }
.section-title .more { font-size: 12px; color: var(--sub); }

.tag { display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-right: 4px; background: #f6ecfd; color: var(--brand); }
.tag.pink { background: #fdeaf3; color: var(--brand2); }
.tag.orange { background: #fff2e6; color: var(--orange); }
.tag.green { background: #e6f7f1; color: var(--green); }
.tag.gray { background: #f0edf3; color: var(--sub); }
.tag.blue { background: #e8f1fd; color: var(--blue); }

.empty { text-align: center; color: var(--sub); padding: 60px 0 40px; font-size: 13px; }
.empty .ico { font-size: 44px; display: block; margin-bottom: 10px; opacity: .5; }

.price { color: var(--brand2); font-weight: 700; }
.price small { font-size: 11px; font-weight: 400; }
.muted { color: var(--sub); font-size: 12px; }
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }

/* toast & modal */
#toast { position: fixed; left: 50%; top: 45%; transform: translate(-50%,-50%); background: rgba(0,0,0,.78); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; z-index: 999; max-width: 76%; text-align: center; display: none; line-height: 1.5; }
.mask { position: fixed; inset: 0; background: rgba(20,8,30,.5); z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.mask.center { align-items: center; }
.sheet { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 480px; max-height: 82vh; overflow-y: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .25s ease; }
.sheet.center { border-radius: 16px; width: 86%; animation: pop .2s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes pop { from { transform: scale(.9); opacity: .4; } }
.sheet h4 { font-size: 16px; margin-bottom: 12px; text-align: center; }
.sheet-close { position: absolute; right: 14px; top: 12px; font-size: 18px; color: var(--sub); }

/* tabbar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 100; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; padding: 7px 0 5px; font-size: 11px; color: var(--sub); }
.tabbar a .ic { font-size: 21px; display: block; margin-bottom: 1px; }
.tabbar a.on { color: var(--brand); font-weight: 600; }

/* ===== 首页 ===== */
.home-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; }
.home-head .logo { height: 38px; width: 38px; border-radius: 10px; box-shadow: 0 2px 8px rgba(123,47,247,.3); }
.home-head .brand-name { font-size: 18px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: 8px; }
.home-head .city { font-size: 13px; color: var(--text); background: #fff; border-radius: 999px; padding: 6px 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

.swiper { position: relative; overflow: hidden; border-radius: 14px; margin: 8px 12px 0; }
.swiper-track { display: flex; transition: transform .4s ease; }
.swiper-track img { width: 100%; flex-shrink: 0; height: 180px; object-fit: cover; }
.swiper .dots { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; }
.swiper .dots i { display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.55); margin: 0 3px; transition: .3s; }
.swiper .dots i.on { width: 16px; background: #fff; }
.swiper .b-title { position: absolute; left: 12px; bottom: 10px; color: #fff; font-size: 15px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.5); }

.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.svc-grid .svc { text-align: center; font-size: 11px; color: var(--text); }
.svc-grid .svc .ic { width: 44px; height: 44px; margin: 0 auto 5px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: linear-gradient(135deg, #f4e9fd, #fde9f3); }

.cat-scroll { display: flex; overflow-x: auto; gap: 8px; padding: 4px 12px 8px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-pill { flex-shrink: 0; padding: 8px 16px; border-radius: 999px; background: #fff; font-size: 13px; color: var(--text); border: 1px solid var(--line); }
.cat-pill.on { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }

.doll-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 12px 12px; }
.doll-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 6px rgba(80,40,120,.06); }
.doll-card img.cover { width: 100%; height: 150px; object-fit: cover; }
.doll-card .info { padding: 8px 10px 10px; }
.doll-card .name { font-size: 14px; font-weight: 600; }
.doll-card .sub { font-size: 11px; color: var(--sub); margin: 3px 0; }

/* ===== 列表页 ===== */
.list-head { position: sticky; top: 0; z-index: 60; background: var(--bg); padding: 10px 12px 6px; }
.search-row { display: flex; gap: 8px; align-items: center; }
.search-box { flex: 1; display: flex; align-items: center; background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; }
.search-box input { flex: 1; border: none; margin-left: 6px; }
.filter-btn { background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; color: var(--text); }
.doll-item { display: flex; gap: 10px; }
.doll-item img.cover { width: 110px; height: 132px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.doll-item .info { flex: 1; min-width: 0; }
.doll-item .name { font-size: 15px; font-weight: 700; }
.doll-item .spec { font-size: 12px; color: var(--sub); margin: 3px 0; }
.doll-item .stats { font-size: 11px; color: var(--sub); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 详情页 ===== */
.detail-swiper img { height: 340px; border-radius: 0; }
.detail-swiper { margin: 0; border-radius: 0; }
.detail-price { display: flex; align-items: baseline; gap: 12px; }
.detail-price .dp { font-size: 24px; }
.spec-row { display: flex; font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.spec-row .k { width: 76px; color: var(--sub); flex-shrink: 0; }
.svc-tags { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.svc-tags .st { text-align: center; font-size: 11px; color: var(--text); }
.svc-tags .st .ic { font-size: 22px; display: block; margin-bottom: 4px; }
.detail-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); z-index: 100; }
.detail-bar .fav { width: 52px; text-align: center; font-size: 11px; color: var(--sub); }
.detail-bar .fav .ic { font-size: 21px; display: block; }
.detail-bar .fav.on { color: var(--brand2); }
.detail-imgs img { width: 100%; margin-bottom: 2px; }

/* ===== 下单 ===== */
.addr-card { display: flex; gap: 10px; align-items: center; }
.addr-card .ic { font-size: 26px; color: var(--brand); }
.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.opt.on { border-color: var(--brand); color: var(--brand); background: #f9f2fe; font-weight: 600; }
.opt .sub { display: block; font-size: 11px; color: var(--sub); font-weight: 400; margin-top: 2px; }
.opt.on .sub { color: var(--brand); }
.date-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.date-scroll::-webkit-scrollbar { display: none; }
.date-cell { flex-shrink: 0; width: 64px; text-align: center; padding: 9px 0; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 12px; }
.date-cell b { display: block; font-size: 14px; margin-bottom: 2px; }
.date-cell.on { background: var(--grad); color: #fff; border-color: transparent; }
.date-cell.dis { opacity: .35; pointer-events: none; }
.addon-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.checkbox { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #cfc4dd; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; flex-shrink: 0; }
.checkbox.on { background: var(--grad); border-color: transparent; }
.tips { background: #fdf3e7; color: #9a6a2f; font-size: 12px; border-radius: 10px; padding: 10px 12px; line-height: 1.7; }
.bottom-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); z-index: 100; }

.fee-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; }
.fee-row.total { font-size: 15px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* ===== 支付弹窗 ===== */
.wx-pay { text-align: center; }
.wx-pay .logo { font-size: 44px; color: #07c160; }
.wx-pay .logo.subtle { color: var(--sub); }
.wx-pay .amt { font-size: 30px; font-weight: 800; margin: 8px 0; }
.pay-qr { width: 226px; margin: 12px auto 4px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.pay-qr svg { display: block; width: 100%; height: auto; }
.pay-spin { width: 34px; height: 34px; margin: 4px auto 14px; border: 3px solid #eadcf7; border-top-color: var(--brand); border-radius: 50%; animation: paySpin .8s linear infinite; }
@keyframes paySpin { to { transform: rotate(360deg); } }
.pay-alert { margin-top: 12px; padding: 10px 12px; text-align: left; font-size: 11.5px; line-height: 1.7; color: #8a6a1f; background: #fdf6e3; border: 1px solid #f0e0b0; border-radius: 10px; }

/* ===== 我的 ===== */
.mine-head { background: var(--grad); padding: 26px 16px 40px; color: #fff; }
.mine-head .avatar { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; flex-shrink: 0; }
.mine-card { margin: -28px 12px 0; position: relative; z-index: 2; }
.order-tabs5 { display: flex; }
.order-tabs5 a { flex: 1; text-align: center; font-size: 11px; color: var(--text); position: relative; }
.order-tabs5 a .ic { font-size: 22px; display: block; margin-bottom: 3px; }
.func-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; }
.func-grid a { text-align: center; font-size: 12px; }
.func-grid a .ic { font-size: 24px; display: block; margin-bottom: 4px; }

/* 登录 */
.login-box { padding: 30px 20px; }
.login-box input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; margin-bottom: 12px; background: #faf9fc; }
.code-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: stretch; }
.code-row input { flex: 1; margin-bottom: 0 !important; }
.code-btn { flex-shrink: 0; border-radius: 10px; padding: 0 14px; background: #f4e9fd; color: var(--brand); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }

/* 启动 / 云端连接 */
.boot-wrap { text-align: center; padding: 24vh 30px 0; }
.boot-wrap img { width: 80px; height: 80px; border-radius: 22px; margin: 0 auto; box-shadow: 0 4px 18px rgba(123, 47, 247, .3); }
.boot-title { margin-top: 14px; font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-msg { margin-top: 12px; font-size: 13px; line-height: 1.7; }
.boot-dots { margin-top: 18px; }
.boot-dots i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .35; margin: 0 3px; animation: bootBlink 1.2s infinite; }
.boot-dots i:nth-child(2) { animation-delay: .2s; }
.boot-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes bootBlink { 0%, 100% { opacity: .25; transform: translateY(0) } 50% { opacity: 1; transform: translateY(-3px) } }
.boot-wrap .btn { margin-top: 18px; }

/* ===== 订单 ===== */
.status-tabs { display: flex; overflow-x: auto; background: #fff; position: sticky; top: 48px; z-index: 50; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs a { flex-shrink: 0; padding: 11px 14px; font-size: 13px; color: var(--sub); position: relative; }
.status-tabs a.on { color: var(--brand); font-weight: 700; }
.status-tabs a.on::after { content: ''; position: absolute; bottom: 0; left: 18px; right: 18px; height: 3px; border-radius: 2px; background: var(--grad); }
.order-card .oc-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.order-card .oc-status { color: var(--brand2); font-weight: 600; }
.order-prod { display: flex; gap: 10px; padding: 10px 0; }
.order-prod img { width: 72px; height: 86px; border-radius: 8px; object-fit: cover; }
.oc-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* 物流 */
.timeline { padding-left: 18px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 18px 12px; font-size: 13px; }
.tl-item::before { content: ''; position: absolute; left: -17px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #cfc4dd; }
.tl-item:first-child::before { background: var(--brand); box-shadow: 0 0 0 3px #f0e2fc; }
.tl-item .t { font-size: 11px; color: var(--sub); margin-top: 2px; }

/* 评价 */
.star { color: #ffb400; font-size: 18px; letter-spacing: 2px; }
/* 扁平化图标 */
.ico-svg { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
.star-row { display: inline-flex; align-items: center; gap: 2px; letter-spacing: 0; }
.star-row .ico-svg { vertical-align: 0; }
.ic > .ico-svg, .ico > .ico-svg, .ic-slot > .ico-svg { display: block; margin: 0 auto; }
.inline-icon { display: inline-flex; align-items: center; gap: 6px; }
.inline-icon .ico-svg { vertical-align: 0; }
.review-item { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.review-item .rh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.review-item .rav { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
textarea.ta { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 90px; background: #faf9fc; resize: none; }

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #faf9fc; }

/* ===== 管理后台 ===== */
.admin-wrap { max-width: 1100px; margin: 0 auto; display: flex; min-height: 100vh; background: #f4f2f7; }
.admin-side { width: 180px; background: #241533; color: #cbb9e0; padding: 16px 0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .lg { color: #fff; font-weight: 800; font-size: 17px; padding: 0 18px 16px; }
.admin-side a { display: block; padding: 11px 18px; font-size: 13px; color: #cbb9e0; }
.admin-side a.on { background: var(--grad); color: #fff; border-radius: 0 999px 999px 0; margin-right: 12px; }
.admin-main { flex: 1; padding: 18px; min-width: 0; }
.admin-main h2 { font-size: 18px; margin-bottom: 14px; }
.a-card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.a-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.a-table th { text-align: left; color: var(--sub); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.a-table td { padding: 9px 8px; border-bottom: 1px solid #f5f2f8; vertical-align: middle; }
.a-table img.th { width: 44px; height: 54px; object-fit: cover; border-radius: 6px; }
.a-btn { font-size: 12px; padding: 4px 10px; border-radius: 6px; margin: 2px; background: #f4e9fd; color: var(--brand); display: inline-block; }
.a-btn.danger { background: #ffe9e9; color: var(--red); }
.a-btn.green { background: #e6f7f1; color: var(--green); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-box { background: #fff; border-radius: 12px; padding: 16px; }
.stat-box .n { font-size: 24px; font-weight: 800; }
.stat-box .l { font-size: 12px; color: var(--sub); margin-top: 4px; }
.a-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.a-form .full { grid-column: 1 / -1; }
.switch { display: inline-block; width: 40px; height: 22px; border-radius: 11px; background: #d8d2e0; position: relative; transition: .2s; vertical-align: middle; }
.switch::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; }
.switch.on { background: var(--brand); }
.switch.on::after { left: 20px; }

@media (max-width: 720px) {
  .admin-side { width: 64px; }
  .admin-side .lg { font-size: 12px; padding: 0 8px 14px; }
  .admin-side a { padding: 11px 8px; font-size: 11px; text-align: center; }
  .admin-side a.on { margin-right: 4px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .a-form { grid-template-columns: 1fr; }
  .a-table { font-size: 12px; }
}
