/* ==========================================================================
   登录 / 注册 / 找回密码 · 表单区独立样式（红色主题）
   与 site.css 同时加载，只负责 auth- 中间表单区；
   公共头尾由 site/partial/header 与 site/partial/footer 提供。
   ========================================================================== */

:root {
    --auth-red: #cf1f2e;
    --auth-red-dark: #9c131d;
    --auth-red-deep: #6d0d14;
    --auth-red-light: #f0525f;
    --auth-ink: #22262f;
    --auth-muted: #8a94a3;
    --auth-line: #e7eaf0;

    /* 让 Bootstrap 的链接 / 危险色与独立页红色统一 */
    --bs-primary: #cf1f2e;
    --bs-primary-rgb: 207, 31, 46;
    --bs-danger: #cf1f2e;
    --bs-danger-rgb: 207, 31, 46;
    --bs-link-color: #cf1f2e;
    --bs-link-hover-color: #9c131d;
}

html, body { min-height: 100%; }

body.auth-page {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--auth-ink);
    -webkit-font-smoothing: antialiased;
    background: linear-gradient(118deg, #fff5f5 0%, #f8f9fc 42%, #ffecee 100%);
}

body.auth-page::before,
body.auth-page::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 48px;
    transform: rotate(-22deg);
}

body.auth-page::before {
    top: 110px;
    right: -190px;
    width: 620px;
    height: 430px;
    background: linear-gradient(135deg, rgba(207, 31, 46, .08), rgba(207, 31, 46, 0));
}

body.auth-page::after {
    bottom: -170px;
    left: -210px;
    width: 620px;
    height: 430px;
    background: linear-gradient(135deg, rgba(207, 31, 46, .06), rgba(207, 31, 46, 0));
}

/* ---------- 主体卡片 ---------- */
.auth-main {
    position: relative;
    z-index: 1;
    padding: 34px 12px 46px;
}

/* 登录 / 注册 / 找回密码共用同一外框宽度与左右比例 */
.auth-wrap {
    display: flex;
    align-items: stretch;
    max-width: 540px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 60px -22px rgba(120, 15, 25, .42), 0 4px 16px rgba(24, 34, 48, .06);
}

/* 与 Bootstrap .container 的响应式宽度保持一致 */
@media (min-width: 768px) {
    .auth-wrap { max-width: 720px; }
}

@media (min-width: 992px) {
    .auth-wrap { max-width: 960px; }
}

@media (min-width: 1200px) {
    .auth-wrap { max-width: 1140px; }
}

@media (min-width: 1400px) {
    .auth-wrap { max-width: 1320px; }
}

/* 576px 以下 Bootstrap 容器为 100% 宽，卡片同步铺满 */
@media (max-width: 575.98px) {
    .auth-wrap { max-width: 100%; }
}

/* ---- 左：红色品牌区 ---- */
.auth-hero {
    position: relative;
    flex: 0 0 42%;
    overflow: hidden;
    padding: 46px 34px 40px;
    color: #fff;
    background: linear-gradient(135deg, #8e111b 0%, #c51b29 48%, #ec4a58 100%);
}

.auth-hero::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -110px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.auth-hero-art {
    position: absolute;
    right: -70px;
    bottom: -60px;
    width: 330px;
    height: 300px;
    pointer-events: none;
}

.auth-hero-art i {
    position: absolute;
    display: block;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    transform: rotate(-32deg);
}

.auth-hero-art i:nth-child(1) { left: 20px;  bottom: 0;   width: 78px;  height: 210px; }
.auth-hero-art i:nth-child(2) { left: 110px; bottom: 0;   width: 92px;  height: 260px; }
.auth-hero-art i:nth-child(3) { left: 210px; bottom: 0;   width: 70px;  height: 175px; }
.auth-hero-art i:nth-child(4) { left: 60px;  bottom: 190px; width: 190px; height: 26px; }

.auth-hero-inner { position: relative; z-index: 2; }

.auth-hero-title {
    margin: 0 0 20px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.auth-hero-title span { white-space: nowrap; }

.auth-hero-pill {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff9d38 0%, #ff6a34 100%);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(255, 106, 52, .28);
}

.auth-features {
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 15px;
}

.auth-features li:last-child { margin-bottom: 0; }

.auth-features li > i.fa {
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .2);
    font-size: 13px;
}

.auth-features b { font-weight: 700; letter-spacing: .5px; }

/* ---- 右：白色表单区 ---- */
.auth-panel {
    flex: 1 1 0;
    min-width: 0;
    padding: 40px 40px 34px;
}

.auth-title {
    margin: 0;
    color: #232833;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 2px;
    text-align: center;
}

.auth-subtitle {
    margin: 8px 0 26px;
    color: #3c4453;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.auth-sec {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 12px;
    color: var(--auth-red);
    font-size: 13px;
    font-weight: 700;
}

.auth-sec::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--auth-red);
}

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

.auth-full { grid-column: 1 / -1; }

.auth-field { position: relative; min-width: 0; }

.auth-field > i.fa {
    position: absolute;
    top: 24px;
    left: 14px;
    z-index: 2;
    color: #aeb6c2;
    font-size: 15px;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-control {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--auth-line);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

select.auth-control { padding-right: 10px; }

textarea.auth-control {
    height: auto;
    min-height: 68px;
    padding-top: 11px;
    resize: vertical;
}

.auth-control::placeholder { color: #adb5c1; }

.auth-control:focus {
    outline: 0;
    border-color: var(--auth-red);
    box-shadow: 0 0 0 3px rgba(207, 31, 46, .12);
}

.auth-with-btn { display: flex; }

.auth-with-btn .auth-control {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 8px 0 0 8px;
}

.auth-addon {
    flex: 0 0 auto;
    padding: 0 13px;
    border: 1px solid var(--auth-line);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #fafbfc;
    color: #7b8492;
    font-size: 13px;
    cursor: pointer;
}

.auth-addon:hover { color: var(--auth-red); }
.auth-addon:disabled { cursor: not-allowed; opacity: .6; }

.auth-hint { margin-top: 5px; color: var(--auth-muted); font-size: 11px; }
.auth-hint a { color: var(--auth-red); text-decoration: none; }

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 18px;
    font-size: 12px;
}

.auth-links a { color: var(--auth-red); text-decoration: none; }

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #7b8492;
    cursor: pointer;
}

.auth-remember input { margin: 0; accent-color: var(--auth-red); }

.auth-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 0 16px;
    color: #6b7380;
    font-size: 12px;
}

.auth-agree input { margin-top: 2px; accent-color: var(--auth-red); }
.auth-agree a { color: var(--auth-red); text-decoration: none; }

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #e03443 0%, var(--auth-red) 55%, #b81725 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: 0 10px 22px -10px rgba(207, 31, 46, .85);
    cursor: pointer;
}

.auth-submit:hover { filter: brightness(1.06); }
.auth-submit:disabled { opacity: .7; cursor: not-allowed; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
    color: #a2aab6;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

.auth-alt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-bottom: 8px;
    border: 1px solid #b7e3c4;
    border-radius: 8px;
    background: #f2fbf5;
    color: #1a8f4c;
    font-weight: 600;
    text-decoration: none;
}

.auth-alt:hover { background: #e9f7ee; color: #14723c; }

/* 微信扫码登录：点击后在原位置展开二维码，边距与表单保持一致 */
.auth-qr {
    padding: 16px 16px 12px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background: #fff;
    text-align: center;
}

.auth-qr-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--auth-line);
}

.auth-qr-frame img,
.auth-qr-frame canvas {
    display: block;
    width: 168px;
    height: 168px;
}

.auth-qr-frame #wx-login-qr {
    width: 168px;
    height: 168px;
    line-height: 0;
}

.auth-qr-tip {
    margin: 12px 0 0;
    color: #4a5260;
    font-size: 13px;
}

.auth-qr-status {
    margin: 6px 0 0;
    min-height: 18px;
    color: #1a8f4c;
    font-size: 13px;
}

.auth-qr-status.is-error {
    color: var(--auth-red);
}

.auth-qr-back {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-qr-back:hover {
    color: var(--auth-red);
}

.auth-foot {
    margin-top: 20px;
    color: var(--auth-muted);
    font-size: 13px;
    text-align: center;
}

.auth-foot a { color: var(--auth-red); font-weight: 600; text-decoration: none; }

.auth-more {
    margin-top: 14px;
    border-top: 1px dashed var(--auth-line);
    padding-top: 10px;
}

.auth-more summary {
    color: #6b7380;
    font-size: 12px;
    cursor: pointer;
    list-style: none;
}

.auth-more summary::before { content: "＋ "; color: var(--auth-red); font-weight: 700; }
.auth-more[open] summary::before { content: "－ "; }
.auth-more .auth-grid { margin-top: 12px; }

/* ---------- 省市区三联动 ---------- */
.auth-page #auth-citylist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-page #auth-citylist select {
    flex: 1 1 30%;
    min-width: 0;
    height: 44px;
    padding: 0 10px;
    border: 1px solid var(--auth-line);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 13px;
}

.auth-page #auth-citylist select:focus {
    outline: 0;
    border-color: var(--auth-red);
    box-shadow: 0 0 0 3px rgba(207, 31, 46, .12);
}

/* ---------- 密码强度条（site-ui.js 会加 level-1/2/3） ---------- */
.pwd-meter {
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: #eef1f5;
}

.pwd-meter span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--auth-red);
    transition: width .2s ease;
}

.pwd-meter span.level-1 { width: 33%; background: #e85b5b; }
.pwd-meter span.level-2 { width: 66%; background: #f0a33b; }
.pwd-meter span.level-3 { width: 100%; background: #2fa36b; }

/* ---------- 轻提示条（site-ui.js 的 siteAlert 兜底） ---------- */
.site-toast {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 2000;
    display: none;
    padding: 10px 18px;
    border-radius: 8px;
    background: #323a47;
    color: #fff;
    font-size: 13px;
    transform: translateX(-50%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.site-toast.is-error { background: #c62828; }
.site-toast.is-ok { background: #1e8e5a; }

/* ---------- 自适应 ---------- */
@media (max-width: 991.98px) {
    .auth-hero { padding: 34px 26px; }
    .auth-hero-title { font-size: 24px; }
    .auth-features li { font-size: 13px; }
    .auth-panel { padding: 30px 28px; }
}

@media (max-width: 767.98px) {
    .auth-main { padding: 18px 12px 28px; }
    .auth-wrap { flex-direction: column; border-radius: 12px; }
    .auth-hero { display: none; }
    .auth-panel { padding: 26px 20px; }
    .auth-title { font-size: 25px; }
    .auth-subtitle { margin-bottom: 20px; font-size: 13px; }
    .auth-grid { grid-template-columns: 1fr; }
    .auth-page #auth-citylist select { flex-basis: 100%; }
}
