/* 认证页全屏：html/body 占满视口，避免手机下方大片空白 */
html.auth-screen-active,
html.auth-screen-active body {
    height: 100%;
    min-height: 100%;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}
body.auth-screen-active {
    padding-bottom: 0;
    min-height: 100vh;
    min-height: 100dvh;
}
html.auth-screen-active #app {
    min-height: 100%;
}

.login-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 16px 20px 20px;
    box-sizing: border-box;
}
@media (min-width: 360px) {
    .login-container {
        padding: 18px 24px 24px;
    }
}
@media (min-width: 414px) {
    .login-container {
        padding: 20px 28px 28px;
    }
}

.login-container.auth-shell {
    flex: 1;
    width: 100%;
}

.auth-shell {
    --auth-accent: #16c6c0;
    --auth-accent-dark: #0b9c98;
    --auth-text: #101828;
    --auth-muted: #667085;
    --auth-border: #d6e3ea;
    --auth-card-bg: rgba(255, 255, 255, 0.95);
    --auth-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    width: 100%;
    max-width: min(360px, 100% - 40px);
    margin: 0 auto;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background:
        radial-gradient(circle at top left, rgba(130, 217, 239, 0.46), transparent 34%),
        radial-gradient(circle at center right, rgba(169, 226, 229, 0.42), transparent 34%),
        linear-gradient(180deg, #eefafd 0%, #f9fbfd 30%, #ffffff 100%);
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.auth-shell::before {
    width: 204px;
    height: 204px;
    right: -110px;
    top: -98px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.18) 66%, transparent 100%);
}

.auth-shell::after {
    width: 150px;
    height: 150px;
    left: -84px;
    top: 212px;
    background: radial-gradient(circle, rgba(22, 198, 192, 0.14) 0%, rgba(22, 198, 192, 0.02) 72%, transparent 100%);
}

.auth-topbar,
.auth-hero,
.auth-cookie-banner,
.auth-card {
    position: relative;
    z-index: 2;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    min-height: 38px;
}

.auth-brand-lockup {
    min-width: 0;
    max-width: calc(100% - 96px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-brand-logo {
    display: block;
    width: auto;
    max-width: 180px;
    height: 40px;
    object-fit: contain;
    object-position: left center;
}

.auth-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #101828;
    letter-spacing: 0.02em;
}

.auth-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.auth-topbar-btn {
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 227, 234, 0.94);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.auth-lang-trigger,
.auth-theme-toggle {
    cursor: pointer;
}

.auth-lang-trigger {
    padding: 0 8px;
    color: var(--auth-text);
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
}

.auth-lang-label {
    white-space: nowrap;
}

.auth-icon-earth,
.auth-icon-theme {
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    transition: opacity 0.35s ease;
}
.auth-icon-earth {
    width: 20px;
    height: 20px;
}
.auth-icon-theme {
    width: 18px;
    height: 18px;
}

.auth-hero {
    margin-top: 28px;
    margin-bottom: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-kicker-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 10px;
}

.auth-kicker-line {
    flex: 1;
    height: 1px;
    min-width: 20px;
    background: #c5d0d9;
}
.auth-theme-dark .auth-kicker-line {
    background: rgba(255, 255, 255, 0.35);
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0;
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(212, 236, 235, 0.9);
    color: var(--auth-accent-dark);
    font-size: 12px;
    font-weight: 600;
}

.auth-heading {
    max-width: 280px;
    text-align: center;
}

.auth-title {
    margin: 0 0 4px;
    color: var(--auth-text);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.auth-subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.45;
}

.auth-cookie-banner {
    margin-bottom: 10px;
    padding: 14px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--auth-border);
    border-left: 4px solid var(--auth-accent);
    box-shadow: var(--auth-shadow);
}

.auth-cookie-banner-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-cookie-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 999px;
    background: #f5f7fa;
    color: #3c4858;
}

.auth-cookie-copy {
    min-width: 0;
}

.auth-cookie-title {
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.auth-cookie-text {
    margin-top: 4px;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.5;
}

.auth-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.auth-cookie-btn {
    flex: 1 1 100px;
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid #d7dee5;
    background: #ffffff;
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.auth-cookie-btn-primary {
    background: linear-gradient(135deg, #15c6c1 0%, #09aaa5 100%);
    border-color: transparent;
    color: #ffffff;
}

.auth-card {
    background: var(--auth-card-bg);
    border: 2px solid var(--auth-border);
    border-radius: 16px;
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: min(320px, 100%);
    margin-left: auto;
    margin-right: auto;
}
.auth-card .auth-form-group {
    flex: 0 0 auto;
}

.auth-card-header {
    padding: 16px 14px 0;
}

.auth-card-title {
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.auth-card-caption {
    margin-top: 4px;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.auth-card-caption:empty {
    display: none;
}

.auth-step-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--auth-accent-dark);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.auth-form-group {
    padding: 14px;
    margin-bottom: 0;
}

.auth-login-switch {
    display: flex;
    margin-bottom: 14px;
    border-bottom: 1px solid #dde4ea;
}

.auth-login-switch-btn {
    position: relative;
    flex: 1;
    padding: 0 0 12px;
    border: 0;
    background: transparent;
    color: #465467;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.auth-login-switch-btn-active {
    color: var(--auth-accent-dark);
    font-weight: 700;
}

.auth-login-switch-btn-active::after {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: var(--auth-accent);
}

.auth-step-account-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f5fbfb;
    border: 1px solid #dceff0;
    color: var(--auth-accent-dark);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.auth-step-account-chip span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-field-row {
    display: flex;
    gap: 10px;
}

.auth-country-box {
    width: 96px;
    flex-shrink: 0;
}

.auth-shell .input-field {
    width: 100%;
    min-height: 46px;
    margin-bottom: 12px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid #d7e3ea;
    background: #ffffff;
    color: var(--auth-text);
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.auth-phone-input {
    flex: 1;
}

.auth-country-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    font-weight: 600;
    cursor: pointer;
}

.auth-shell .input-field::placeholder {
    color: #98a2b3;
}

.auth-shell .input-field:focus {
    outline: none;
    border-color: rgba(22, 198, 192, 0.52);
    box-shadow: 0 0 0 4px rgba(22, 198, 192, 0.1);
}

.auth-inline-action {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 0;
}

.auth-inline-link,
.auth-footer-link,
.auth-shell .text-primary {
    color: var(--auth-accent-dark) !important;
    font-weight: 700;
    cursor: pointer;
}

.auth-submit-btn {
    height: 44px;
    margin-top: 2px;
    border-radius: 14px;
    border-color: transparent !important;
    background: linear-gradient(135deg, #18c8c2 0%, #0eb4af 100%) !important;
    box-shadow: 0 14px 24px rgba(22, 198, 192, 0.22);
    font-size: 14px;
    font-weight: 700;
}

.auth-submit-btn.van-button--disabled {
    opacity: 1;
    background: #acdedd !important;
    color: rgba(16, 24, 40, 0.45) !important;
    box-shadow: none;
}

.auth-footer-switch {
    padding: 14px 14px 16px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.55;
}

.auth-footer-extra {
    margin-top: 6px;
}

.auth-footer-link {
    margin-left: 6px;
}

.auth-footer-link-inline {
    margin-left: 0;
}

.auth-country-popup {
    overflow: hidden;
}

.auth-country-popup-inner,
.auth-cookie-popup-inner {
    background: #ffffff;
}

.auth-country-popup-inner {
    padding: 18px 16px 16px;
}

.auth-country-title,
.auth-cookie-popup-title {
    color: var(--auth-text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.auth-country-title {
    text-align: center;
    margin-bottom: 12px;
}

.auth-country-search {
    margin-bottom: 12px;
    background: #f8fafc !important;
}

.auth-country-custom-card {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #e8eef3;
    border-radius: 14px;
    box-shadow: none;
}

.auth-country-custom-label {
    flex: 1;
}

.auth-country-list {
    max-height: calc(60vh - 130px);
    overflow-y: auto;
}

.auth-country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 4px;
    border-bottom: 1px solid #e8eef3;
    color: var(--auth-text);
    cursor: pointer;
}

.auth-country-item:last-child {
    border-bottom: none;
}

.auth-cookie-popup {
    overflow: hidden;
}

.auth-cookie-popup-inner {
    padding: 16px 14px 18px;
}

.auth-cookie-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-cookie-popup-desc {
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.55;
}

.auth-cookie-popup-close {
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    font-size: 18px;
    cursor: pointer;
}

.auth-cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #e8eef3;
}

.auth-cookie-option:last-of-type {
    border-bottom: none;
}

.auth-cookie-option-copy {
    flex: 1;
}

.auth-cookie-option-title {
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.auth-cookie-option-desc {
    margin-top: 4px;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.55;
}

.auth-cookie-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.auth-cookie-popup-actions .auth-cookie-btn {
    flex: 1 1 140px;
}

.auth-theme-dark {
    --auth-accent: #1bd7d0;
    --auth-accent-dark: #18d1cb;
    --auth-text: #f8fafc;
    --auth-muted: #a5afbd;
    --auth-border: rgba(73, 82, 95, 0.78);
    --auth-card-bg: rgba(23, 25, 31, 0.96);
    --auth-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
    background:
        radial-gradient(circle at top left, rgba(22, 198, 192, 0.1), transparent 34%),
        linear-gradient(180deg, #0b1217 0%, #0f141a 28%, #121820 100%);
}

.auth-theme-dark::before {
    width: 250px;
    height: 250px;
    right: -130px;
    top: -112px;
    background: radial-gradient(circle, rgba(255,255,255,0.98) 0%, rgba(247,249,250,0.92) 54%, rgba(247,249,250,0.14) 76%, transparent 86%);
}

.auth-theme-dark::after {
    background: radial-gradient(circle, rgba(22,198,192,0.12) 0%, rgba(22,198,192,0.02) 72%, transparent 100%);
}

.auth-theme-dark .auth-topbar-btn {
    border-color: rgba(255, 255, 255, 0.12);
    background: #0f172a;
}
.auth-theme-dark .auth-lang-trigger {
    color: rgba(255, 255, 255, 0.95);
}
.auth-theme-dark .auth-brand-name {
    color: #ffffff;
    font-weight: 700;
}

.auth-theme-dark .auth-kicker {
    background: rgba(8, 19, 24, 0.72);
    border-color: rgba(27, 215, 208, 0.18);
    color: var(--auth-accent);
}

.auth-theme-dark .auth-cookie-banner,
.auth-theme-dark .auth-card,
.auth-theme-dark .auth-trust-panel {
    border-color: rgba(73, 82, 95, 0.78);
}

.auth-theme-dark .auth-cookie-banner,
.auth-theme-dark .auth-card,
.auth-theme-dark .auth-country-popup-inner,
.auth-theme-dark .auth-cookie-popup-inner {
    background: rgba(23, 25, 31, 0.96);
}

.auth-theme-dark .auth-cookie-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.auth-theme-dark .auth-cookie-title,
.auth-theme-dark .auth-country-title,
.auth-theme-dark .auth-cookie-popup-title,
.auth-theme-dark .auth-cookie-option-title,
.auth-theme-dark .auth-country-item {
    color: #f8fafc;
}

.auth-theme-dark .auth-cookie-text,
.auth-theme-dark .auth-cookie-popup-desc,
.auth-theme-dark .auth-cookie-option-desc,
.auth-theme-dark .auth-footer-switch,
.auth-theme-dark .auth-subtitle,
.auth-theme-dark .auth-card-caption {
    color: #a5afbd;
}

.auth-theme-dark .auth-cookie-btn {
    border-color: rgba(73, 82, 95, 0.78);
    background: #181d24;
    color: #f8fafc;
}

.auth-theme-dark .auth-cookie-btn-primary {
    color: #ffffff;
}

.auth-theme-dark .auth-login-switch {
    border-bottom-color: rgba(73, 82, 95, 0.78);
}

.auth-theme-dark .auth-login-switch-btn {
    color: #cbd5e1;
}

.auth-theme-dark .input-field,
.auth-theme-dark .auth-shell .input-field {
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: #0f172a !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

.auth-theme-dark .input-field::placeholder,
.auth-theme-dark .auth-shell .input-field::placeholder {
    color: #94a3b8 !important;
}

.auth-theme-dark .auth-country-trigger,
.auth-theme-dark .auth-country-trigger span {
    color: #ffffff !important;
}
.auth-theme-dark .auth-country-trigger .van-icon {
    color: #ffffff !important;
}

.auth-theme-dark .auth-country-search {
    background: #161d24 !important;
}

.auth-theme-dark .auth-country-item,
.auth-theme-dark .auth-cookie-option {
    border-bottom-color: rgba(73, 82, 95, 0.64);
}

.auth-theme-dark .auth-country-custom-card {
    border-color: rgba(73, 82, 95, 0.7);
    background: #161c23;
}

@media (max-width: 420px) {
    .login-container {
        padding: 8px 10px 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    }

    .auth-shell {
        max-width: none;
    }

    .auth-topbar {
        margin-bottom: 6px;
        min-height: 34px;
    }

    .auth-hero {
        margin-top: 20px;
        margin-bottom: 4px;
    }

    .auth-kicker-row {
        max-width: 280px;
        gap: 10px;
        margin-bottom: 8px;
    }

    .auth-kicker {
        padding: 4px 10px;
        font-size: 10px;
    }

    .auth-heading {
        max-width: 198px;
    }

    .auth-title {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .auth-subtitle {
        font-size: 12px;
    }

    .auth-brand-logo {
        max-width: 140px;
        height: 32px;
    }
    .auth-brand-name {
        font-size: 16px;
    }

    .auth-topbar-btn {
        min-width: 32px;
        min-height: 32px;
    }

    .auth-lang-trigger {
        padding: 0 8px;
    }

    .auth-lang-label {
        display: none;
    }

    .auth-cookie-banner {
        margin-bottom: 8px;
        padding: 12px 10px;
    }

    .auth-card-header {
        padding: 14px 12px 0;
    }

    .auth-country-box {
        width: 82px;
    }

    .auth-shell .input-field {
        min-height: 44px;
        margin-bottom: 10px;
        padding: 10px 12px;
    }

    .auth-submit-btn {
        height: 42px;
    }

    .auth-footer-switch {
        padding: 12px 12px 14px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
    }
}
