/* 圆梦行动 - 登录/注册页样式 参照Pencil设计稿 */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Alibaba PuHuiTi','PingFang SC','Helvetica Neue','Microsoft YaHei',sans-serif;
    background-color: #fbf2e3;
    color: #000;
    min-height: 100vh;
}

/* 手机屏幕容器 */
.page-wrapper {
    width: 100%;
    min-height: 100vh;
    background: #fbf2e3;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* 顶部背景 */
.header-bg {
    position: relative;
    width: 100%;
    height: 386px;
    overflow: hidden;
}
.header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.header-bg::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to top, #fbf2e3 0%, rgba(251,242,227,0) 100%);
}

/* Logo头像 */
.logo-container {
    display: flex;
    justify-content: center;
    margin-top: -268px;
    margin-bottom: 5px;
    position: relative;
    z-index: 10;
}
.logo-avatar {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 2px solid #efbf71;
    object-fit: cover;
    background: #fff;
}

/* 表单区域 */
.form-section {
    padding: 18px 25px 0;
}

/* 输入组 */
.input-group {
    margin-bottom: 14px;
}
.input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}
.input-label .label-icon {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.input-label .label-icon svg {
    width: 17px; height: 17px; fill: #000;
}
.input-label span {
    font-size: 14px;
    font-weight: 400;
    color: #000;
    line-height: 1.57;
}
.input-field {
    width: 100%;
    height: 34px;
    background: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 14px;
    color: #333;
    outline: none;
    font-family: inherit;
}
.input-field::placeholder {
    color: #727272;
    font-size: 14px;
}
.input-field:focus {
    box-shadow: 0 0 0 1.5px #dd020066;
}

/* 验证码行 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.captcha-row .input-field {
    flex: 1;
}
.captcha-img {
    height: 40px;
    width: 110px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}

/* 提交按钮 */
.btn-submit {
    display: block;
    width: 324px;
    height: 51px;
    margin: 22px auto 0;
    background: #dd0200;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 20px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .2s;
    letter-spacing: 2px;
}
.btn-submit:active {
    opacity: .8;
}

/* 切换链接区 */
.switch-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 16px;
}
.switch-row a, .switch-row span {
    font-size: 16px;
    font-family: 'Alibaba PuHuiTi', sans-serif;
    text-decoration: none;
    line-height: 1.25;
}
.switch-row .link-muted {
    color: #7f7f7f;
}
.switch-row .link-active {
    color: #dd0200;
}
.switch-divider {
    display: inline-block;
    width: 0.5px;
    height: 14px;
    background: #808080;
    margin: 0 14px;
}

/* 协议勾选 */
.agreement-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 14px;
    padding: 0 19px;
}
.agreement-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}
.agreement-row input[type="checkbox"]:checked {
    background: #dd0200;
    border-color: #dd0200;
}
.agreement-row input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -1px; left: 1px;
    font-size: 10px;
    color: #fff;
}
.agreement-row label {
    font-size: 12px;
    color: #878787;
    line-height: 1.67;
    cursor: pointer;
}
.agreement-row label a {
    color: #dd0200;
    text-decoration: none;
}

/* 表单区撑满剩余空间 */
.form-section {
    flex: 1;
    position: relative;
    z-index: 10;
}

/* 底部备案信息 */
.footer-section {
    margin-top: auto;
    width: 100%;
    position: relative;
}
.footer-bg {
    width: 100%;
    background: #e1251b;
    padding: 14px 20px 18px;
    text-align: center;
}
.footer-bg p {
    font-size: 12px;
    color: #fff;
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
    word-break: break-all;
}
.footer-bg p a {
    color: #fff;
    text-decoration: none;
}
.footer-icon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}
.footer-icon-row img {
    width: 22px; height: 22px;
}

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

/* Loading 遮罩 */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}
.loading-overlay.active { display: flex; }
.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 协议弹窗 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    width: 100%;
    max-width: 350px;
    max-height: 80vh;
    background: #fbf2e3;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.modal-header {
    background: #dd0200;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.modal-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.modal-close {
    width: 28px; height: 28px;
    background: rgba(255,255,255,.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.modal-close:active { background: rgba(255,255,255,.35); }
.modal-body {
    padding: 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}
.modal-body h4 {
    font-size: 14px;
    color: #dd0200;
    margin: 16px 0 8px;
    font-weight: 600;
}
.modal-body h4:first-child { margin-top: 0; }
.modal-body p {
    font-size: 13px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 8px;
    text-align: justify;
}
.modal-footer {
    padding: 12px 18px 16px;
    flex-shrink: 0;
    text-align: center;
}
.modal-btn-agree {
    width: 100%;
    height: 42px;
    background: #dd0200;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 1px;
}
.modal-btn-agree:active { opacity: .8; }

/* 响应式 */
/* 桌面端居中限宽 */
@media (min-width: 480px) {
    body {
        background: #f0e6d3;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }
    .page-wrapper {
        max-width: 393px;
    }
}
