:root {
    --navy: #08224f;
    --blue: #0099ff;
    --blue2: #6591ff;
    --field-border: #ededed;
    --label-gray: #9aa0a6;
    --text-dark: #1a1a1a;
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, "system-ui", "Helvetica Neue", Helvetica, "Segoe UI", Arial, Roboto, "PingFang SC", miui, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
    background-color: var(--navy);
    color: var(--text-dark);
    min-height: 100vh;
}

/* 居中容器：手机端满宽，桌面端限制最大宽度并居中 */
.app {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--navy);
    background-image: url("../../image/bg.png");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 顶部在线客服按钮 */
.online-service {
    position: absolute;
    top: 12px;
    right: 0;
    z-index: 5;
}
.online-service img {
    display: block;
    height: 36px;
    width: auto;
}

/* 顶部 Logo */
.logo-wrap {
    padding: 64px 24px 28px;
    text-align: center;
}
.logo-wrap img {
    width: 70%;
    max-width: 300px;
    height: auto;
}

/* 白色卡片 */
.card {
    background: #fff;
    border-radius: 18px;
    margin: 4px 16px 24px;
    padding: 22px 20px 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Tab 切换 */
.tabs {
    display: flex;
    gap: 26px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 22px;
}
.tab {
    position: relative;
    padding: 6px 2px 14px;
    font-size: 17px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}
.tab.active {
    color: var(--blue);
    font-weight: 600;
}
.tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60%;
    height: 3px;
    border-radius: 3px;
    background: var(--blue);
}

/* 字段 */
.field {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--field-border);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 16px;
    background: #fff;
}
.field .icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: #c9ccd1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.field .icon svg {
    width: 100%;
    height: 100%;
}
.field .field-body {
    flex: 1;
    min-width: 0;
}
.field .field-label {
    display: block;
    font-size: 12px;
    color: var(--label-gray);
    line-height: 1.4;
}
.field input {
    width: 100%;
    border: 0;
    outline: none;
    padding: 2px 0 0;
    font-size: 15px;
    color: var(--text-dark);
    background: transparent;
}
.field input::placeholder {
    color: #c4c8cd;
}
.field .captcha-img {
    flex: 0 0 auto;
    height: 34px;
    width: 92px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    background: #eef0ff;
}

/* 提示行（去注册 / 去登陆） */
.switch-line {
    text-align: center;
    font-size: 13px;
    color: #9aa0a6;
    margin: 4px 0 18px;
}
.switch-line a {
    color: var(--blue);
    text-decoration: none;
    margin-left: 2px;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    background-image: linear-gradient(0deg, var(--blue2), var(--blue));
    cursor: pointer;
    transition: opacity 0.2s;
}
.submit-btn:active {
    opacity: 0.85;
}
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 协议勾选 */
.agreement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 13px;
    color: #9aa0a6;
}
.agreement input {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
}
.agreement .link {
    color: var(--blue);
}

/* Toast 提示 */
.toast {
    position: fixed;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 999;
    max-width: 80%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.toast.show {
    opacity: 1;
}

/* 用户协议弹窗 */
.agreement-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 0 18px;
}
.agreement-mask.show {
    display: flex;
}
.agreement-dialog {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    background: #fff;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.agreement-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    flex: 0 0 auto;
}
.agreement-logo {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    height: 22px;
    width: auto;
    object-fit: contain;
}
.agreement-title {
    font-size: 15px;
    color: #3264ed;
    font-weight: 500;
    text-align: center;
}
.agreement-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    line-height: 1;
    color: #969799;
    cursor: pointer;
}
.agreement-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 18px 12px;
    font-size: 13px;
    line-height: 1.75;
    color: #555;
}
.agreement-body p {
    margin: 0 0 8px;
    text-align: justify;
}
.agreement-body h4 {
    margin: 14px 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}
.agreement-footer {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
    padding: 12px 16px 16px;
}
.agreement-btn {
    flex: 1;
    height: 42px;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    color: #fff;
    cursor: pointer;
}
.agreement-btn.reject {
    background: #c8c9cc;
}
.agreement-btn.agree {
    background-image: linear-gradient(0deg, var(--blue2), var(--blue));
}
.agreement-btn:active {
    opacity: 0.85;
}

/* 大屏适配：保持移动端布局并居中，两侧补深色 */
@media (min-width: 481px) {
    body {
        background-color: var(--navy);
    }
    .app {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
    }
}

/* 极小屏适配 */
@media (max-width: 360px) {
    .logo-wrap {
        padding-top: 52px;
    }
    .card {
        margin-left: 12px;
        margin-right: 12px;
        padding: 18px 16px 26px;
    }
    .tab {
        font-size: 16px;
    }
}
