/* ================= 巡运通 · 公众号 H5 样式 ================= */
:root {
    --navy: #0f3b5f;
    --navy-2: #1c5b88;
    --amber: #f2a33a;
    --amber-2: #e58a19;
    --bg: #f3f6fa;
    --card: #ffffff;
    --text: #1a2733;
    --muted: #7c8a99;
    --line: #e7edf3;
    --danger: #d94b4b;
    --ok: #15925f;
    --radius: 14px;
    --shadow: 0 6px 20px rgba(15, 59, 95, .08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- 顶部导航 ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.nav-title { font-size: 16px; font-weight: 600; }
.nav-back {
    width: 32px; height: 32px;
    border: none; background: transparent;
    font-size: 22px; line-height: 1;
    color: var(--navy);
    cursor: pointer;
    padding: 0;
}
.nav-right { width: 32px; }

.page { flex: 1; }
.with-nav { padding-top: 12px; }
.with-tab { padding-bottom: 76px; }

/* ---------- 底部 tab ---------- */
.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    display: flex;
    background: #fff;
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
    flex: 1;
    text-align: center;
    padding: 9px 0 8px;
    font-size: 13px;
    color: var(--muted);
    position: relative;
}
.tabbar a.active { color: var(--navy); font-weight: 600; }
.tabbar a.active::before {
    content: "";
    position: absolute;
    top: 3px; left: 50%;
    transform: translateX(-50%);
    width: 22px; height: 3px;
    border-radius: 3px;
    background: var(--amber);
}

/* ---------- 通用 ---------- */
.wrap { padding: 0 14px; }
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
}
.card-tight { padding: 12px 14px; }

.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrapflex { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.title-lg { font-size: 20px; font-weight: 700; }
.title-md { font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; }
.mt0 { margin-top: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 46px;
    padding: 0 18px;
    border-radius: 23px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    background: #fff;
    color: var(--navy);
    cursor: pointer;
    transition: .15s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--amber) 0%, var(--amber-2) 100%); color: #fff; box-shadow: 0 8px 16px rgba(229, 138, 25, .28); }
.btn-navy { background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--navy); background: #fff; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 17px; }
.btn-text { height: auto; padding: 0; background: none; color: var(--navy); font-size: 13px; font-weight: 500; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field-label { font-size: 13px; color: #4b5a68; margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.field-label .req { color: var(--danger); font-size: 12px; }
.input, .select, .textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #f9fbfd;
    border-radius: 11px;
    padding: 11px 12px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    font-family: inherit;
    transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--navy-2); background: #fff; }
.textarea { min-height: 84px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9aa8b5 50%), linear-gradient(135deg, #9aa8b5 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.form-tip { font-size: 12px; color: var(--muted); margin-top: 4px; }

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-item {
    padding: 8px 15px;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 14px;
    background: #f9fbfd;
    cursor: pointer;
}
.radio-item.active { border-color: var(--amber); background: #fff7ea; color: #b06a0a; font-weight: 600; }

.checkbox-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: #4b5a68; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--amber); flex: none; }
.link { color: var(--navy-2); text-decoration: underline; }

/* ---------- 列表 ---------- */
.list-item {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.item-title { font-size: 15.5px; font-weight: 600; }
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    background: #eef4fa;
    color: #37678f;
    margin-right: 5px;
}
.tag-amber { background: #fff3e2; color: #b06a0a; }
.tag-green { background: #e8f6ef; color: var(--ok); }
.tag-gray { background: #f0f2f5; color: var(--muted); }
.tag-red { background: #fdeaea; color: var(--danger); }

.kv { display: flex; font-size: 13.5px; padding: 5px 0; }
.kv .k { color: var(--muted); width: 88px; flex: none; }
.kv .v { flex: 1; word-break: break-all; }

/* ---------- 统计 ---------- */
.stat-row { display: flex; gap: 10px; }
.stat {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: var(--shadow);
}
.stat .num { font-size: 20px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 12px; color: var(--muted); }

/* ---------- 首页 ---------- */
.hero {
    background: radial-gradient(120% 90% at 100% 0%, #2b6f9e 0%, var(--navy) 55%, #0b2f4c 100%);
    color: #fff;
    padding: 26px 20px 22px;
    border-radius: 0 0 22px 22px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    right: -40px; bottom: -60px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(242, 163, 58, .16);
}
.hero .kicker { font-size: 12.5px; letter-spacing: 2px; opacity: .75; }
.hero h1 { font-size: 25px; margin: 6px 0 4px; letter-spacing: .5px; }
.hero p { margin: 0; font-size: 13.5px; opacity: .82; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; position: relative; z-index: 2; }
.hero-actions .btn { flex: 1; height: 44px; font-size: 14.5px; }

.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.entry {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    cursor: pointer;
}
.entry .ico {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: #eef4fa; color: var(--navy);
    font-size: 14px; font-weight: 700;
    margin-bottom: 10px;
}
.entry.amber .ico { background: #fff3e2; color: #b06a0a; }
.entry .t { font-size: 14.5px; font-weight: 600; }
.entry .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 名额 / 购买 ---------- */
.quota-card {
    background: linear-gradient(135deg, #123f63, #1d5f8b);
    color: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 59, 95, .22);
}
.quota-num { font-size: 34px; font-weight: 700; line-height: 1.1; }
.quota-sub { font-size: 12.5px; opacity: .8; }

.pkg {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    flex: 1;
}
.pkg.active { border-color: var(--amber); background: #fffaf1; box-shadow: 0 6px 16px rgba(242, 163, 58, .18); }
.pkg .q { font-size: 22px; font-weight: 700; color: var(--navy); }
.pkg .p { color: var(--amber-2); font-weight: 700; margin-top: 4px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed; inset: 0; background: rgba(12, 28, 44, .48);
    z-index: 100;
    display: flex; align-items: flex-end;
}
.sheet {
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.sheet-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-close { border: none; background: #f2f4f7; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 16px; }

/* ---------- 状态 / 空 ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); font-size: 13.5px; }
.loading { text-align: center; padding: 26px; color: var(--muted); font-size: 13px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

.notice {
    background: #fff7e8;
    border: 1px solid #ffe3b5;
    color: #8a5b18;
    border-radius: 11px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.6;
}
.notice.red { background: #fdeeee; border-color: #f8d3d3; color: #a33; }

.center-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 20px;
}

/* ---------- 登录 ---------- */
.login-card { text-align: center; }
.login-badge {
    width: 64px; height: 64px; margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    color: #fff; font-size: 26px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.login-title { font-size: 22px; font-weight: 700; }
.login-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- 协议 ---------- */
.agreement-body { white-space: pre-wrap; font-size: 14px; line-height: 1.85; color: #34424f; }

/* ---------- toast ---------- */
.toast {
    position: fixed;
    left: 50%; bottom: 92px;
    transform: translateX(-50%);
    background: rgba(20, 32, 44, .9);
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    max-width: 78vw;
    z-index: 200;
    text-align: center;
    animation: toast-in .18s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.skeleton { background: linear-gradient(90deg, #eceff3 25%, #f5f7fa 37%, #eceff3 63%); background-size: 400% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 菜单行 ---------- */
.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px;
    font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item .arrow { color: var(--muted); font-size: 14px; }

