:root {
    --ink: #151b24;
    --muted: #667386;
    --line: #e4e9f1;
    --panel: #ffffff;
    --soft: #f6f8fc;
    --brand: #0967d8;
    --brand-dark: #064fa6;
    --cyan: #14b8f4;
    --coral: #ff5b52;
    --green: #08b66c;
    --red: #d4423a;
    --shadow: 0 24px 70px rgba(21, 27, 36, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--soft);
    letter-spacing: 0;
}

a {
    color: inherit;
}

.btn,
.button-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover,
.button-link:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 14px 30px rgba(21, 27, 36, 0.18);
}

.btn-primary:hover {
    background: #000;
}

.btn-muted {
    color: var(--ink);
    background: #f0f3f8;
    border-color: #e2e8f0;
}

.btn-muted:hover {
    background: #e8edf5;
}

.btn-alipay {
    background: #1677ff;
    color: #fff;
    box-shadow: 0 14px 28px rgba(22, 119, 255, 0.22);
}

.btn-wechat {
    background: var(--green);
    color: #fff;
    box-shadow: 0 14px 28px rgba(8, 182, 108, 0.18);
}

.site-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-logos {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    padding: 5px 8px 5px 10px;
    border: 1px solid rgba(228, 233, 241, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 12px 28px rgba(21, 27, 36, 0.05);
}

.partner-logo {
    width: 126px;
    height: 46px;
    object-fit: contain;
    flex: 0 0 auto;
}

.logo-divider {
    width: 1px;
    height: 32px;
    background: rgba(102, 115, 134, 0.18);
    flex: 0 0 auto;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.alert.error {
    background: #fff0ef;
    color: #9f3128;
    border: 1px solid #ffd2cd;
}

.alert.success {
    background: #e9f9f1;
    color: #0b6f49;
    border: 1px solid #c4eed8;
}

.alert.info {
    background: #edf6ff;
    color: #244c74;
    border: 1px solid #c9ddf4;
}

/* Login */
.login-body {
    background: #fff;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 42%, rgba(255, 255, 255, 0.62) 68%, rgba(255, 255, 255, 0.24) 100%),
        url("/static/login-bg-ai-service.png") center / cover no-repeat;
}

.public-nav {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-size: 18px;
    font-weight: 850;
}

.public-links {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3b4656;
    font-size: 14px;
}

.public-links span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(228, 233, 241, 0.86);
}

.login-hero {
    width: min(1240px, calc(100% - 48px));
    min-height: calc(100vh - 92px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 420px);
    gap: clamp(28px, 6vw, 84px);
    align-items: center;
    padding: 24px 0 72px;
}

.login-copy {
    max-width: 720px;
}

.login-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    font-weight: 850;
    letter-spacing: 0;
}

.login-copy p:not(.eyebrow) {
    max-width: 600px;
    margin: 22px 0 0;
    color: #445166;
    font-size: 18px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.hero-note {
    color: var(--muted);
    font-size: 14px;
}

.login-card,
.pay-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(228, 233, 241, 0.96);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.login-card {
    padding: 34px;
}

.login-card h2,
.pay-card h1 {
    margin: 0;
    font-size: 28px;
}

.login-card p,
.pay-card p {
    margin: 10px 0 22px;
    color: var(--muted);
    line-height: 1.65;
}

.login-card .btn {
    width: 100%;
}

.form-field {
    margin-bottom: 14px;
}

.form-field input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font-size: 15px;
}

.form-field input:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(9, 103, 216, 0.14);
}

/* VIP dashboard */
.app-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 78% 8%, rgba(20, 184, 244, 0.16), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f6f8fc 46%, #edf3fb 100%);
}

.topbar {
    width: min(1320px, calc(100% - 48px));
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-copy {
    min-width: 0;
}

.brand-title {
    margin: 0;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.2;
}

.brand-subtitle {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.page-wrap {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 18px 0 56px;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 28px;
    align-items: center;
    min-height: 360px;
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.82)),
        url("/static/login-bg-ai-service.png") right center / cover no-repeat;
    box-shadow: var(--shadow);
}

.dashboard-copy {
    max-width: 720px;
}

.dashboard-copy h2 {
    margin: 0;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.02;
    font-weight: 850;
}

.dashboard-copy p:not(.eyebrow) {
    max-width: 680px;
    margin: 18px 0 0;
    color: #445166;
    font-size: 17px;
    line-height: 1.8;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.hero-metrics div {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.hero-metrics span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.hero-metrics strong {
    display: block;
    margin-top: 6px;
    font-size: 17px;
}

.dashboard-visual {
    min-height: 260px;
    display: grid;
    place-items: center;
}

.dashboard-visual img {
    width: min(260px, 76%);
    height: auto;
    filter: drop-shadow(0 22px 36px rgba(9, 103, 216, 0.22));
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.status-card,
.plan-card,
.service-card,
.pay-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 34px rgba(21, 27, 36, 0.07);
}

.status-card {
    padding: 24px;
}

.status-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.status-title {
    margin: 0;
    font-size: 17px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
}

.badge-ok {
    color: #0b6f49;
    background: #e9f9f1;
}

.badge-warn {
    color: #a63a31;
    background: #fff0ef;
}

.date-value {
    margin: 0;
    font-size: 30px;
    font-weight: 850;
}

.date-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.section-block {
    margin-top: 24px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.section-title {
    margin: 0;
    font-size: 28px;
}

.section-heading > p {
    max-width: 430px;
    margin: 0 0 4px;
    color: var(--muted);
    line-height: 1.6;
    text-align: right;
}

.plan-grid,
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.plan-card {
    overflow: hidden;
}

.plan-card-inner {
    padding: 24px;
}

.plan-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.plan-title {
    margin: 0;
    font-size: 19px;
}

.price,
.service-price {
    color: var(--red);
    font-weight: 850;
}

.price {
    white-space: nowrap;
    font-size: 28px;
}

.plan-desc {
    min-height: 44px;
    margin: 12px 0 18px;
    color: var(--muted);
    line-height: 1.6;
}

.pay-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.notice {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #c9ddf4;
    border-radius: 8px;
    color: #244c74;
    background: #edf6ff;
    font-size: 13px;
    line-height: 1.65;
}

.service-card {
    position: relative;
    min-height: 230px;
    padding: 24px;
    overflow: hidden;
}

.service-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 244, 0.18), transparent 70%);
}

.service-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #eef7ff;
    color: var(--brand);
    font-weight: 850;
}

.service-card h3 {
    margin: 18px 0 6px;
    font-size: 20px;
}

.service-price {
    margin: 0 0 12px;
    font-size: 20px;
}

.service-card p:not(.service-price) {
    margin: 0;
    color: #445166;
    line-height: 1.68;
}

.service-card small {
    display: block;
    margin-top: 14px;
    color: var(--muted);
    line-height: 1.5;
}

/* Payment pages */
.payment-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.54)),
        url("/static/login-bg-ai-service.png") center / cover no-repeat;
}

.pay-card {
    width: min(440px, 100%);
    padding: 32px;
    text-align: center;
}

.pay-amount {
    margin: 18px 0;
    color: var(--red);
    font-size: 42px;
    font-weight: 850;
}

.loader {
    width: 58px;
    height: 58px;
    margin: 10px auto 18px;
    border: 5px solid #dbeafe;
    border-top-color: #1677ff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.qr-box {
    margin: 18px auto;
    padding: 16px;
    width: min(260px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.qr-box img {
    display: block;
    width: 100%;
    height: auto;
}

.status-message {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 920px) {
    .public-links {
        display: none;
    }

    .login-hero,
    .dashboard-hero,
    .grid-2,
    .plan-grid,
    .service-grid {
        grid-template-columns: 1fr;
    }

    .login-shell {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.78)),
            url("/static/login-bg-ai-service.png") center / cover no-repeat;
    }

    .dashboard-visual {
        min-height: 180px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .section-heading > p {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .public-nav,
    .topbar,
    .login-hero,
    .page-wrap {
        width: min(100% - 28px, 1180px);
    }

    .public-nav,
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }

    .brand {
        gap: 10px;
        width: 100%;
    }

    .brand-logos {
        gap: 7px;
        padding: 4px 6px 4px 7px;
    }

    .partner-logo {
        width: 88px;
        height: 34px;
    }

    .site-logo {
        width: 48px;
        height: 48px;
    }

    .logo-divider {
        height: 26px;
    }

    .brand-title {
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .login-hero {
        min-height: auto;
        padding: 28px 0 42px;
    }

    .login-copy h1 {
        font-size: 42px;
    }

    .login-card,
    .status-card,
    .plan-card-inner,
    .service-card,
    .pay-card,
    .dashboard-hero {
        padding: 20px;
    }

    .hero-metrics,
    .pay-actions {
        grid-template-columns: 1fr;
    }

    .nav-actions,
    .nav-actions .btn,
    .pay-actions .btn {
        width: 100%;
    }
}
