/* ==========================================================================
   圆梦鸿途 · 登录 / 退出页（品牌化）
   复用 console/base.css 设计 token
   ========================================================================== */

html, body { min-height: 100%; }
body.console-login {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* 背景：淡蓝径向光晕 + 细网格 */
body.console-login::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        radial-gradient(1100px 560px at 12% -10%, #E9F0FD 0%, rgba(233, 240, 253, 0) 62%),
        radial-gradient(900px 520px at 108% 112%, #E8EFFA 0%, rgba(232, 239, 250, 0) 58%);
    pointer-events: none;
    z-index: 0;
}
body.console-login::after {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image:
        linear-gradient(var(--line-2) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: .35;
    pointer-events: none;
    z-index: 0;
}
body.console-login.has-bg { background-size: cover; background-position: center; background-repeat: no-repeat; }
body.console-login.has-bg::before { background: rgba(244, 246, 249, .78); }
body.console-login.has-bg::after { opacity: .25; }

body.console-login svg.i {
    width: 16px;
    height: 16px;
    flex: none;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- card ---------- */
.lg-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
}
.lg-card {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 16px 48px rgba(20, 26, 36, .08);
    animation: lg-in .32s ease both;
}
@keyframes lg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* brand */
.lg-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lg-brand .logo {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 7px;
    background: var(--pri);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.lg-brand b {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .04em;
    color: var(--ink);
}
.lg-brand small {
    display: block;
    font-size: 11.5px;
    color: var(--ink-3);
    line-height: 1.3;
    letter-spacing: 0;
}

/* 企业 Logo 品牌区（登录页，仅显示 logo 图片） */
.lg-brand.logo-only {
    justify-content: center;
    min-height: 64px;
}
.lg-brand .brand-logo {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
}
.lg-brand .brand-logo-dark { display: none; }
body.darktheme .lg-brand .brand-logo-light { display: none; }
body.darktheme .lg-brand .brand-logo-dark { display: block; }

.lg-card h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .01em;
    margin: 26px 0 0;
    color: var(--ink);
}
.lg-sub {
    font-size: 13px;
    color: var(--ink-3);
    margin: 6px 0 0;
    line-height: 1.5;
}
.lg-form { margin-top: 24px; }

/* fields */
.lg-field {
    position: relative;
    margin-bottom: 14px;
}
.lg-field > svg.i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--ink-3);
    pointer-events: none;
    z-index: 2;
}
.lg-field > .form-control {
    height: 40px;
    padding: 0 12px 0 38px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    font-size: 13px;
    color: var(--ink);
    box-shadow: none;
    width: 100%;
}
.lg-field > .form-control::placeholder { color: #A6AFBD; }
.lg-field > .form-control:focus {
    border-color: var(--pri);
    box-shadow: 0 0 0 3px var(--pri-2);
    outline: none;
}
.lg-field .input-group-addon {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 100px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}
.lg-field .input-group-addon img {
    display: block;
    height: 30px;
    width: 100px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
}
/* 验证码输入框给右侧图片留出空间 */
.lg-field > input[name="captcha"] { padding-right: 116px; }
.lg-field.has-error > .form-control,
.lg-field .has-error > .form-control {
    border-color: var(--err);
    box-shadow: 0 0 0 3px var(--err-bg);
}

/* keep-login row */
.lg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 18px;
}
.lg-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--ink-2);
    font-weight: 400;
    cursor: pointer;
    margin: 0;
}
.lg-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--pri);
    margin: 0;
}

/* submit */
.lg-btn {
    width: 100%;
    height: 40px;
    border-radius: var(--r);
    background: var(--pri);
    border: 1px solid var(--pri);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
    box-shadow: none;
}
.lg-btn:hover, .lg-btn:focus {
    background: var(--pri-ink);
    border-color: var(--pri-ink);
    color: #fff;
    outline: none;
}
.lg-btn:active { background: #0B337F; border-color: #0B337F; }

/* error / tips */
#errtips { margin-bottom: 10px; }
#errtips.msg-container { position: static; }
#errtips .msg-box { font-size: 12.5px; color: var(--err); margin: 0 0 6px; }

/* footer */
.lg-copy {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-3);
    line-height: 1.6;
}
.lg-copy a { color: var(--ink-3); text-decoration: none; }
.lg-copy a:hover { color: var(--pri); text-decoration: none; }

/* ---------- logout page ---------- */
body.console-logout .lg-card { text-align: center; }
body.console-logout .lg-brand { justify-content: center; }
body.console-logout .lg-ico {
    width: 56px;
    height: 56px;
    margin: 26px auto 0;
    border-radius: 50%;
    background: var(--pri-2);
    color: var(--pri);
    display: grid;
    place-items: center;
}
body.console-logout .lg-ico svg.i { width: 26px; height: 26px; }
body.console-logout h1 { margin-top: 16px; }
body.console-logout .lg-form { margin-top: 22px; }
body.console-logout .lg-btn + .lg-btn { margin-top: 10px; }
body.console-logout .lg-btn.ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--ink-2);
}
body.console-logout .lg-btn.ghost:hover { background: var(--bg); color: var(--ink); border-color: #C9D1DD; }

/* responsive */
@media (max-width: 640px) {
    body.console-login { padding: 20px 16px; }
    .lg-card { padding: 24px 20px; }
    .lg-card h1 { font-size: 18px; margin-top: 20px; }
}

/* legacy elements kept for JS compatibility but hidden */
#profile-img, #profile-name { display: none !important; }


/* 企业微信扫码登录 */
.lg-wecom { margin-top: 16px; }
.lg-wecom-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 14px;
    font-size: 12px;
    color: var(--ink-3);
}
.lg-wecom-divider::before,
.lg-wecom-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line-2);
}
.lg-wecom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.lg-wecom-btn svg.i { width: 16px; height: 16px; }
.lg-btn.ghost {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-2);
}
.lg-btn.ghost:hover,
.lg-btn.ghost:focus {
    background: var(--bg);
    border-color: #C9D1DD;
    color: var(--ink);
}
body.darktheme .lg-btn.ghost {
    background: #182230;
    border-color: var(--line);
    color: var(--ink-2);
}
body.darktheme .lg-btn.ghost:hover,
body.darktheme .lg-btn.ghost:focus {
    background: #1E2A3A;
    border-color: #344054;
    color: var(--ink);
}

/* 企业微信绑定页 */
.lg-bind-tip {
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #FAFBFC;
    font-size: 12px;
    color: var(--ink-2);
    line-height: 1.6;
}
body.darktheme .lg-bind-tip {
    background: #101722;
    border-color: var(--line);
    color: var(--ink-2);
}
.lg-bind-tip b { color: var(--ink); }
.lg-back {
    display: block;
    margin-top: 14px;
    text-align: center;
    font-size: 12.5px;
    color: var(--ink-3);
    text-decoration: none;
}
.lg-back:hover { color: var(--primary); text-decoration: none; }
