/* =========================================================
   Nimbus Gate · 幻构云筑 - 认证页样式（玻璃态）
   参考工作台原型 index.html 显示效果架构：
   毛玻璃卡片 + 背景光晕 + Apple 缓动
   ========================================================= */

:root {
    --blue: #3f6df6;
    --blue-dark: #2c58d6;
    --blue-soft: #edf2ff;
    --ink: #162033;
    --text: #202b3e;
    --muted: #788399;
    --line: rgba(60, 60, 67, 0.13);
    --canvas: #f5f7fb;
    --paper: rgba(255, 255, 255, 0.73);
    --green: #1ba784;
    --shadow: 0 20px 55px rgba(25, 40, 68, 0.12);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

.auth-body {
    margin: 0;
    color: var(--text);
    background: var(--canvas);
    font: 14px/1.5 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ---------- 页面容器（仿 index.html） ---------- */

.login-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 38px;
    background: linear-gradient(135deg, #eef3fb 0%, #f9fafc 50%, #e9effa 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before,
.login-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-page::before {
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(63, 109, 246, 0.12), transparent 68%);
    left: -200px;
    top: -240px;
}

.login-page::after {
    width: 720px;
    height: 720px;
    background: radial-gradient(circle, rgba(71, 153, 255, 0.12), transparent 66%);
    right: -230px;
    bottom: -300px;
}

/* 背景图层（登录/注册各自一张，切换淡入淡出） */
.login-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.55s ease;
    pointer-events: none;
    z-index: 0;
}

.bg-login {
    background-image: url("/assets/img/bg/login.jpg");
}

.bg-register {
    background-image: url("/assets/img/bg/register.jpg");
}

.login-bg.active {
    opacity: 1;
}

.login-shell {
    width: 1060px;
    min-height: 650px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 0;
    position: relative;
    z-index: 1;
    background: var(--paper);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    backdrop-filter: blur(18px) saturate(130%);
    border: 1px solid rgba(220, 226, 236, 0.9);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.auth-panel {
    min-height: 100%;
}

/* 面板叠放切换（仿 index.html，与 grid 第 2 列精确对齐） */
.login-panel {
    position: absolute;
    left: 47.6%;
    top: 0;
    bottom: 0;
    width: 52.4%;
    min-width: 0;
    padding: 40px 52px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(26px, 0, 0);
    pointer-events: none;
    transition: opacity 0.32s ease, transform 0.46s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.46s;
}

.login-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    transition: opacity 0.34s ease, transform 0.46s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}

/* ---------- 左侧品牌区（仿 index.html：深蓝渐变 + 右下圆环装饰） ---------- */

.login-side {
    padding: 48px 52px;
    background: linear-gradient(150deg, #172842 0%, #122137 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-side::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(128, 174, 255, 0.25);
    border-radius: 50%;
    right: -205px;
    bottom: -245px;
    box-shadow: 0 0 0 52px rgba(118, 168, 255, 0.045), 0 0 0 104px rgba(118, 168, 255, 0.03);
    pointer-events: none;
}

.brand {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 16px;
}

.brand-svg {
    display: block;
    height: 76px;
    width: auto;
}

.login-side h1 {
    margin: 16px 0 14px;
    font-size: 38px;
    line-height: 1.32;
    letter-spacing: 0.5px;
    font-weight: 800;
}

.login-side .lead {
    margin: 0;
    color: #b9c9dd;
    font-size: 15px;
    line-height: 1.9;
    max-width: 420px;
}

.product-points {
    margin-top: 42px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
    position: relative;
    z-index: 1;
}

.product-point {
    border: 1px solid rgba(174, 202, 240, 0.18);
    background: rgba(255, 255, 255, 0.055);
    border-radius: 11px;
    padding: 13px 11px;
    color: #c9d8ea;
    font-size: 12px;
    line-height: 1.65;
}

.product-point b {
    display: block;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
}

/* ---------- 右侧表单 ---------- */

.login-panel {
    padding: 52px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-head { position: relative; margin-bottom: 16px; }

/* 登录错误提示 */
.auth-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    background: rgba(255, 69, 58, 0.08);
    border: 1px solid rgba(255, 69, 58, 0.25);
    color: #d93a2e;
    font-size: 13px;
    margin-bottom: 18px;
}

.auth-error i { font-size: 15px; }

/* 注册关闭提醒（中性蓝，与 auth-error 视觉一致但不表示报错） */
.auth-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    background: rgba(63, 109, 246, 0.08);
    border: 1px solid rgba(63, 109, 246, 0.25);
    color: #3f6df6;
    font-size: 13px;
    margin-bottom: 18px;
}

.auth-tip i { font-size: 15px; }

.auth-eyebrow {
    display: block;
    color: var(--blue);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.6px;
    margin-bottom: 6px;
}

.auth-head h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.auth-head .intro {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
}

/* 字段 */

.field { margin-bottom: 13px; }

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    font: inherit;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(63, 109, 246, 0.14);
}

.field input::placeholder { color: #b0b6c3; }

/* 登录选项 */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 12.5px;
    color: var(--muted);
}

.login-options a {
    color: var(--blue);
    text-decoration: none;
}

.login-options a:hover { text-decoration: underline; }

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.checkbox input {
    accent-color: var(--blue);
    width: 14px;
    height: 14px;
}

/* 按钮 */

.btn-primary {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(63, 109, 246, 0.32);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(63, 109, 246, 0.4);
}

.btn-primary:active { transform: translateY(0); }

/* 切换登录/注册面板按钮 */

.auth-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 13px;
    padding: 9px;
    border: 0;
    background: transparent;
    color: #71717a;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.auth-switch b {
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
}

.auth-switch span {
    font-size: 18px;
    line-height: 10px;
    color: var(--blue);
}

.back-auth {
    position: absolute;
    right: 0;
    top: -4px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(118, 118, 128, 0.12);
    color: #4a4a51;
    font-size: 24px;
    line-height: 22px;
    text-decoration: none;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s var(--ease);
}

.back-auth:hover { background: rgba(118, 118, 128, 0.22); }

/* 协议文案 */

.agreement {
    margin: 12px 0 0;
    font-size: 11.5px;
    color: #a5aab8;
    text-align: center;
    line-height: 1.7;
}

.agreement a { color: #8a93a6; text-decoration: none; }
.agreement a:hover { color: var(--blue); }

/* 验证码行 */

.verify-line {
    display: flex;
    gap: 10px;
}

.verify-line input { flex: 1; }

.verify-button {
    flex-shrink: 0;
    padding: 0 16px;
    border: 1px solid rgba(63, 109, 246, 0.35);
    border-radius: 10px;
    background: var(--blue-soft);
    color: var(--blue);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s var(--ease);
}

.verify-button:hover { background: rgba(63, 109, 246, 0.15); }

/* Toast */

.toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(16px);
    background: rgba(22, 32, 51, 0.92);
    color: #fff;
    font-size: 13px;
    padding: 12px 22px;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(22, 32, 51, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
    z-index: 99;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-side { display: none; }
    .login-panel { padding: 44px 32px; }
}

@media (max-width: 480px) {
    .auth-body { padding: 12px; }
    .login-panel { padding: 36px 22px; }
}

/* 验证码输入行 */
.code-row {
    display: flex;
    gap: 10px;
}

.code-row input {
    flex: 1;
    min-width: 0;
}

.code-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3f6df6, #5b82f7);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
}

.code-btn:hover { box-shadow: 0 8px 18px rgba(63, 109, 246, 0.3); }

.code-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}
