/* ==========================================================
 * 资讯门户版（首页版本2）— 登录 / 注册 专属样式
 * 风格：浅灰底 + 纯白卡片 + 红色标题带；全部边角方正（无圆角）
 * 适用：themes/v2/login.php、themes/v2/register.php（PC / 手机自适应）
 * ========================================================== */

:root {
    --va-brand: #c9151e;
    --va-brand-dark: #9e0f18;
    --va-brand-soft: #fdecec;
    --va-border: #dcdcdc;
    --va-border-light: #ececec;
    --va-text: #1a1a1a;
    --va-text-sec: #444;
    --va-text-light: #999;
    --va-page: #f0f1f3;
}

body.v2-auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--va-page);
    color: var(--va-text);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}
body.v2-auth-body a { color: inherit; text-decoration: none; }
body.v2-auth-body img { display: block; max-width: 100%; }
body.v2-auth-body * { box-sizing: border-box; }

/* ---------------- 外层容器 ---------------- */
.v2-auth-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 16px;
}
.v2-auth-box {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .08);
    overflow: hidden;
}

/* ---------------- 红色标题带 ---------------- */
.v2-auth-band {
    background: var(--va-brand);
    color: #fff;
    text-align: center;
    padding: 24px 24px 22px;
}
.v2-auth-logo {
    max-height: 44px;
    width: auto;
    margin: 0 auto 12px;
    object-fit: contain;
}
.v2-auth-title {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 1.5px;
}
.v2-auth-sub {
    margin: 7px 0 0;
    font-size: 13px;
    letter-spacing: .5px;
    opacity: .92;
}

/* ---------------- 卡片内容区 ---------------- */
.v2-auth-inner { padding: 0 26px 26px; }

/* 双 Tab */
.v2-auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--va-border);
    margin-bottom: 22px;
}
.v2-auth-tab {
    flex: 1;
    text-align: center;
    padding: 16px 0 12px;
    font-size: 15px;
    color: var(--va-text-sec);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .18s, border-color .18s;
}
.v2-auth-tab:hover { color: var(--va-brand); }
.v2-auth-tab.active {
    color: var(--va-brand);
    border-bottom-color: var(--va-brand);
    font-weight: 700;
}

/* 提示条 */
.v2-auth-alert {
    background: var(--va-brand-soft);
    color: var(--va-brand-dark);
    border: 1px solid #f6d5d5;
    padding: 9px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}
.v2-auth-ok {
    background: #f1fbf4;
    color: #1a7a3c;
    border: 1px solid #b7e4c7;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}
.v2-auth-demo {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #8a5a00;
    padding: 10px 12px;
    font-size: 12.5px;
    margin-bottom: 14px;
    text-align: center;
}
.v2-auth-notice {
    background: #fafafa;
    border: 1px solid var(--va-border-light);
    color: #777;
    padding: 9px 12px;
    font-size: 12.5px;
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ---------------- 输入项 ---------------- */
.v2-auth-field {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 12px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--va-border);
    border-radius: 0;
    transition: border-color .18s;
}
.v2-auth-field:focus-within { border-color: var(--va-brand); }
.v2-auth-field .ico {
    font-size: 16px;
    line-height: 1;
    color: #8c8c8c;
    flex-shrink: 0;
}
.v2-auth-field input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: none;
    outline: none;
    border-radius: 0;
    background: transparent;
    color: var(--va-text);
    font-size: 14px;
    font-family: inherit;
    -webkit-appearance: none;
}
.v2-auth-field input::placeholder { color: #a8a8a8; }

/* 验证码 */
.v2-auth-captcha { padding-right: 6px; }
.v2-auth-captcha-img {
    height: 34px;
    width: 104px;
    flex-shrink: 0;
    object-fit: contain;
    cursor: pointer;
    background: #f8f8f8;
    border: 1px solid var(--va-border);
    border-radius: 0;
}

/* ---------------- 按钮 ---------------- */
.v2-auth-submit {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 6px;
    border: none;
    border-radius: 0;
    background: var(--va-brand);
    color: #fff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 6px;
    text-indent: 6px;
    cursor: pointer;
    transition: background .18s;
}
.v2-auth-submit:hover { background: var(--va-brand-dark); }
.v2-auth-submit:disabled { opacity: .65; cursor: not-allowed; }

/* 微信登录 */
.v2-auth-wx {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-top: 12px;
    background: #07c160;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 0;
    transition: background .18s;
}
.v2-auth-wx:hover { background: #06ad56; color: #fff; }

/* ---------------- 底部链接 ---------------- */
.v2-auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 13.5px;
    color: var(--va-text-light);
}
.v2-auth-links a { color: var(--va-text-light); }
.v2-auth-links a:hover { color: var(--va-brand); }

.v2-auth-home {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 10px;
    border: 1px solid var(--va-border);
    border-radius: 0;
    font-size: 13.5px;
    color: #666;
    transition: border-color .18s, color .18s;
}
.v2-auth-home:hover { border-color: var(--va-brand); color: var(--va-brand); }

/* ---------------- 底部版权 / 备案号 ---------------- */
.v2-auth-foot {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--va-border-light);
    text-align: center;
    font-size: 12px;
    color: var(--va-text-light);
    line-height: 1.8;
}
.v2-auth-foot p { margin: 0; }
.v2-auth-foot a { color: var(--va-text-light); }
.v2-auth-foot a:hover { color: var(--va-brand); }

/* ---------------- 注册页：分组与普通输入 ---------------- */
.v2-auth-sec {
    font-size: 12.5px;
    color: #a0a0a0;
    margin: 2px 0 12px;
    padding-top: 14px;
    border-top: 1px solid var(--va-border-light);
}
.v2-auth-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}
.v2-auth-label {
    display: block;
    font-size: 12.5px;
    color: #777;
    margin: 0 0 6px;
}
.v2-auth-plain {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--va-border);
    border-radius: 0;
    color: var(--va-text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
}
.v2-auth-plain:focus { border-color: var(--va-brand); }
select.v2-auth-plain {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}
.v2-auth-hint {
    display: block;
    margin: 6px 0 0;
    font-size: 12px;
    color: #a0a0a0;
    line-height: 1.6;
}
.v2-auth-mb { margin-bottom: 14px; }

/* ---------------- 找回密码：标题与步骤指示器 ---------------- */
.v2-auth-h {
    margin: 4px 0 16px;
    font-size: 19px;
    font-weight: 700;
    color: var(--va-text);
    text-align: center;
    letter-spacing: 2px;
}
.v2-auth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    font-size: 12px;
    color: var(--va-text-light);
}
.v2-auth-step {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.v2-auth-step span {
    width: 22px;
    height: 22px;
    border: 1px solid var(--va-border);
    background: #fff;
    color: var(--va-text-light);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s, border-color .2s, color .2s;
}
.v2-auth-step.active span {
    background: var(--va-brand);
    border-color: var(--va-brand);
    color: #fff;
}
.v2-auth-step.done span {
    background: var(--va-brand-dark);
    border-color: var(--va-brand-dark);
    color: #fff;
}
.v2-auth-step.active { color: var(--va-brand); font-weight: 700; }
.v2-auth-step-line {
    flex: 1;
    height: 1px;
    margin: 0 10px;
    background: var(--va-border);
    transition: background .2s;
}
.v2-auth-step-line.active { background: var(--va-brand); }

/* ---------------- 注册成功态 ---------------- */
.v2-auth-done { text-align: center; padding: 6px 0 2px; }
.v2-auth-done-icon { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.v2-auth-done-title { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.v2-auth-done-tip { font-size: 13px; color: var(--va-text-light); margin: 0; }

/* ---------------- 手机端 ---------------- */
@media (max-width: 560px) {
    .v2-auth-wrap {
        padding: 0;
        justify-content: flex-start;
    }
    .v2-auth-box {
        max-width: 100%;
        min-height: 100vh;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .v2-auth-band { padding: 30px 20px 26px; }
    .v2-auth-title { font-size: 21px; }
    .v2-auth-inner { padding: 0 18px calc(24px + env(safe-area-inset-bottom)); }
    .v2-auth-tabs { margin-bottom: 18px; }
    .v2-auth-tab { font-size: 14.5px; padding: 15px 0 11px; }
    .v2-auth-field { height: 48px; margin-bottom: 12px; }
    .v2-auth-field input { height: 46px; font-size: 16px; }
    .v2-auth-captcha-img { height: 36px; width: 100px; }
    .v2-auth-submit { height: 48px; font-size: 17px; }
    .v2-auth-wx { height: 46px; }
    .v2-auth-grid2 { grid-template-columns: 1fr; gap: 12px; }
    .v2-auth-hint { font-size: 11.5px; }
}

@media (max-width: 360px) {
    .v2-auth-inner { padding: 0 14px 22px; }
    .v2-auth-title { font-size: 19px; }
    .v2-auth-captcha-img { width: 86px; }
}
