:root {
    --blue: #1e7ae1;
    --deep: #221396;
    --orange: #fbb22f;
    --red: #ff5a4e;
    --green: #16a34a;
    --ink: #1f2937;
    --muted: #8a94a6;
    --line: #e8edf5;
    --bg: #f2f5fa;
    --card: #ffffff;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(30, 58, 138, .08);
}

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

html { font-size: 16px; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ---------- landing ---------- */
.landing-body {
    min-height: 100vh;
    background: url('/assets/img/shouquanma_bg.jpg') center / cover fixed no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 10px;
}

.landing-mask {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 35, 95, .58), rgba(8, 18, 48, .78));
    backdrop-filter: blur(3px);
}

.landing-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    padding: 36px 26px 26px;
    background: rgba(255, 255, 255, .97);
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
    text-align: center;
    animation: floatIn .5s ease both;
}

@keyframes floatIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.landing-logo img {
    height: 48px;
    width: auto;
    margin: 0 auto 14px;
    border-radius: 8px;
}

.landing-title {
    margin: 0;
    font-size: 24px;
    letter-spacing: 1px;
    color: var(--deep);
}

.landing-sub {
    margin: 8px 0 24px;
    color: var(--muted);
    font-size: 14px;
}

.landing-form input {
    width: 100%;
    height: 50px;
    border: 1px solid #dbe3f0;
    background: #f8fafd;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 17px;
    letter-spacing: 3px;
    text-align: center;
    outline: none;
    transition: .2s;
}

.landing-form input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 122, 225, .12);
}

.landing-form button {
    width: 100%;
    height: 50px;
    margin-top: 14px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #2b8dfb, var(--deep));
    box-shadow: 0 10px 20px rgba(34, 19, 150, .28);
    transition: transform .12s;
}

.landing-form button:active { transform: scale(.98); }

.landing-tip {
    margin: 20px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.landing-copy {
    margin: 14px 0 0;
    font-size: 11px;
    color: #b8c0cf;
}

.landing-alert {
    margin: -8px 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff1f0;
    color: #d93025;
    font-size: 13px;
}

/* ---------- app shell ---------- */
.front-body {
    background: #e9eef7;
}

.front-shell {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    box-shadow: 0 0 40px rgba(30, 58, 138, .08);
    position: relative;
    padding-bottom: 74px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-brand img {
    height: 36px;
    width: auto;
    border-radius: 6px;
}

.app-brand .brand-text {
    font-weight: 700;
    font-size: 16px;
    color: var(--deep);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-ghost, .btn-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 13px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid transparent;
}

.btn-ghost { border-color: #d7dfec; color: #5b6b82; background: #fff; }
.btn-solid { background: var(--orange); color: #5b3a00; font-weight: 600; }
.btn-soft { background: #eef4ff; color: var(--blue); }

.user-chip {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #445066;
}

/* ---------- banner ---------- */
.banner-wrap {
    position: relative;
    margin: 12px 12px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.banner-track {
    display: flex;
    transition: transform .45s ease;
}

.banner-track img {
    width: 100%;
    height: 168px;
    object-fit: cover;
    flex-shrink: 0;
}

.banner-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.banner-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    transition: .25s;
}

.banner-dots i.on {
    width: 16px;
    border-radius: 4px;
    background: #fff;
}

/* ---------- notice ---------- */
.notice-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 4px 14px rgba(30, 58, 138, .04);
}

.notice-bar img { width: 18px; height: 18px; flex-shrink: 0; }

.notice-bar .notice-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    font-size: 13px;
    color: #5b6b82;
}

.notice-bar .notice-label {
    font-size: 12px;
    color: var(--blue);
    background: #eef4ff;
    border-radius: 6px;
    padding: 2px 7px;
    flex-shrink: 0;
}

/* ---------- recharge card ---------- */
.panel {
    margin: 12px;
    padding: 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-title h2 {
    margin: 0;
    font-size: 16px;
    color: var(--ink);
}

.panel-title span {
    font-size: 12px;
    color: var(--muted);
}

.phone-field {
    display: flex;
    align-items: center;
    height: 50px;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    background: #f8fafd;
    padding: 0 14px;
    gap: 10px;
    transition: .2s;
    margin-bottom: 18px;
}

.phone-field:focus-within {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 122, 225, .1);
}

.phone-field .prefix {
    font-size: 14px;
    color: #8a94a6;
    border-right: 1px solid #e3e9f3;
    padding-right: 10px;
    white-space: nowrap;
}

.phone-field input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 17px;
    letter-spacing: 1px;
    min-width: 0;
}

.amount-label {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--muted);
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.amount-grid li { list-style: none; }

.amount-item {
    display: block;
    border: 1px solid #dfe6f2;
    background: #fff;
    border-radius: 12px;
    padding: 12px 6px 10px;
    text-align: center;
    transition: .18s;
    cursor: pointer;
    user-select: none;
}

.amount-item .face {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #2b3a55;
}

.amount-item .sell {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.amount-item.active {
    border-color: var(--red);
    background: #fff7f6;
    box-shadow: 0 6px 16px rgba(255, 90, 78, .15);
}

.amount-item.active .face { color: var(--red); }
.amount-item.active .sell { color: var(--red); }

.amount-item .hot {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    color: #c2410c;
    background: #fff3e6;
    border-radius: 4px;
    padding: 1px 5px;
}

.submit-bar {
    margin: 18px 0 4px;
}

.btn-primary-lg {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .5px;
    background: linear-gradient(135deg, #ff7a59, var(--red));
    box-shadow: 0 10px 22px rgba(255, 90, 78, .28);
}

.btn-primary-lg:active { transform: translateY(1px); }

.pay-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.promo-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px;
    padding: 13px 16px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff7e8, #fff);
    border: 1px solid #ffe6b8;
    font-size: 13px;
    color: #8a5a00;
}

.promo-line a {
    color: #b45309;
    font-weight: 600;
    font-size: 12px;
}

/* ---------- footer nav ---------- */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 640px;
    display: flex;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--line);
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    z-index: 30;
    box-shadow: 0 -6px 20px rgba(30, 58, 138, .05);
}

.footer-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #8a94a6;
    padding: 3px 0;
}

.footer-nav a img { width: 22px; height: 22px; opacity: .66; }
.footer-nav a.active { color: var(--blue); }
.footer-nav a.active img { opacity: 1; }

/* ---------- simple pages ---------- */
.page-header {
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.page-header .back {
    width: 40px;
    font-size: 20px;
    color: #5b6b82;
    display: flex;
    align-items: center;
}

.page-header h1 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    transform: translateX(-20px);
}

.page-header .header-right {
    min-width: 40px;
    text-align: right;
    font-size: 13px;
    color: var(--blue);
}

.page-body { padding: 12px; }

.form-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 16px;
    box-shadow: var(--shadow);
}

.form-card h2 {
    margin: 0 0 18px;
    text-align: center;
    font-size: 19px;
    color: var(--deep);
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #5b6b82;
}

.field input, .field select, .field textarea {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe3f0;
    background: #f8fafd;
    border-radius: 10px;
    padding: 0 13px;
    font-size: 15px;
    outline: none;
    transition: .2s;
}

.field textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 122, 225, .1);
}

.field .hint { margin-top: 5px; font-size: 11px; color: var(--muted); }

.form-actions { margin-top: 20px; }

.form-actions button {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #2b8dfb, var(--blue));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(30, 122, 225, .22);
}

.form-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.form-footer a { color: var(--blue); margin-left: 4px; }

.alert {
    margin: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-error { background: #fff1f0; color: #c62828; border: 1px solid #ffd8d4; }
.alert-success { background: #ecfdf3; color: #16794c; border: 1px solid #c7f0da; }

/* ---------- profile ---------- */
.profile-hero {
    margin: 12px;
    padding: 20px 18px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #2b8dfb 0%, #221396 75%);
    box-shadow: 0 16px 30px rgba(34, 19, 150, .22);
    position: relative;
    overflow: hidden;
}

.profile-hero::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -60px;
    top: -70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.profile-hero .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, .35);
}

.profile-hero .name { margin-top: 10px; font-size: 19px; font-weight: 600; }
.profile-hero .meta { margin-top: 4px; font-size: 12px; opacity: .8; }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 12px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 6px;
}

.profile-stats div { text-align: center; border-right: 1px solid var(--line); }
.profile-stats div:last-child { border-right: 0; }
.profile-stats strong { display: block; font-size: 19px; color: var(--ink); }
.profile-stats span { font-size: 12px; color: var(--muted); }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 14px 8px;
}

.section-head h2 { margin: 0; font-size: 15px; }
.section-head a { font-size: 12px; color: var(--blue); }

.order-card {
    display: block;
    margin: 10px 12px;
    padding: 14px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(30, 58, 138, .05);
}

.order-card .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
}

.order-card .order-no { font-size: 12px; color: var(--muted); }
.order-card .bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; }
.order-card .phone { font-size: 15px; font-weight: 600; color: #2b3a55; }
.order-card .amount { font-size: 16px; font-weight: 700; color: var(--red); }
.order-card .sub { margin-top: 4px; font-size: 12px; color: var(--muted); }

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    line-height: 1.5;
}

.badge.warn { background: #fff7e6; color: #b45309; }
.badge.info { background: #eef4ff; color: #1d4ed8; }
.badge.ok { background: #ecfdf3; color: #16794c; }
.badge.muted { background: #f1f3f7; color: #6b7280; }

.tabs {
    display: flex;
    gap: 8px;
    margin: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tabs a {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    color: #5b6b82;
    border: 1px solid var(--line);
}

.tabs a.on {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.empty {
    margin: 12px;
    padding: 40px 16px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border-radius: var(--radius);
    font-size: 13px;
}

.order-hero {
    margin: 12px;
    padding: 24px 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}

.order-hero .icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #ecfdf3;
    color: var(--green);
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-hero h2 { margin: 0; font-size: 19px; }
.order-hero p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.detail-list {
    margin: 12px;
    padding: 4px 16px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid #f1f4f9;
    font-size: 13px;
}

.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: var(--muted); }
.detail-row strong { font-weight: 500; text-align: right; color: #2b3a55; word-break: break-all; }

.service-card {
    margin: 12px;
    padding: 26px 20px;
    background: #fff;
    border-radius: 18px;
    text-align: center;
    box-shadow: var(--shadow);
}

.service-card .service-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #eef4ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card .service-icon img { width: 36px; height: 36px; opacity: .8; }
.service-card h2 { margin: 0 0 8px; font-size: 18px; }
.service-card p { margin: 6px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.service-card .contact { margin-top: 16px; padding: 12px; background: #f8fafd; border-radius: 10px; color: var(--deep); font-weight: 600; }

.pager { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.pager a, .pager span { min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: #5b6b82; }
.pager .current { background: var(--blue); color: #fff; border-color: var(--blue); }

@media (min-width: 641px) {
    .banner-track img { height: 210px; }
    .front-shell { margin: 18px auto 40px; border-radius: 18px; overflow: hidden; }
}
