/* 登录页面样式 - login.css */
/* 分屏布局 + 渐变品牌面板 */

.login-screen {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ====== 左侧品牌面板 ====== */
.brand-panel {
    position: relative;
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    background: linear-gradient(135deg, #6C5CE7 0%, #4834D4 40%, #341f97 100%);
    overflow: hidden;
    color: #fff;
}

.brand-panel::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(162, 155, 254, 0.3) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    pointer-events: none;
}

.brand-panel::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 184, 148, 0.15) 0%, transparent 70%);
    bottom: -80px;
    left: -60px;
    pointer-events: none;
}

.brand-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 420px;
    animation: brandFadeUp 0.8s var(--ease-out) both;
}

@keyframes brandFadeUp {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand-logo {
    height: 72px;
    width: auto;
    margin-bottom: 32px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.brand-headline {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.brand-sub {
    font-size: 15px;
    opacity: 0.75;
    line-height: 1.6;
    font-weight: 400;
}

.brand-features {
    margin-top: 48px;
    display: flex;
    gap: 36px;
    justify-content: center;
}

.brand-feat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brand-feat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.brand-feat-icon svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-feat-label {
    font-size: 12px;
    opacity: 0.7;
    font-weight: 500;
}

/* ====== 右侧表单面板 ====== */
.form-panel {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--surface);
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 380px;
    animation: formSlideIn 0.6s var(--ease-out) 0.15s both;
}

@keyframes formSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-header {
    margin-bottom: 36px;
}

.form-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ====== 输入框 ====== */
.field {
    margin-bottom: 22px;
    position: relative;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface-alt);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.field-input::placeholder {
    color: var(--text-muted);
}

.field-input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.field-input.has-error {
    border-color: var(--red);
    background: #FFF5F3;
    animation: fieldShake 0.35s var(--ease-out);
}

@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
}

.field-error {
    font-size: 12px;
    color: var(--red);
    margin-top: 6px;
    animation: errorIn 0.25s var(--ease-out);
}

@keyframes errorIn {
    from { opacity: 0; transform: translateY(-4px); }
}

/* 密码框眼睛按钮 */
.field-input-wrap {
    position: relative;
}

.field-input-wrap .field-input {
    padding-right: 48px;
}

.toggle-pwd {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    border-radius: var(--radius-sm);
}

.toggle-pwd:hover {
    color: var(--text-secondary);
}

.toggle-pwd svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ====== 按钮 ====== */
.btn-login {
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-login:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-login .btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* ====== 底部链接 ====== */
.form-footer {
    margin-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-footer a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.form-footer a:hover {
    color: var(--accent);
}

.footer-sep {
    width: 1px;
    height: 12px;
    background: var(--divider);
    display: inline-block;
    margin: 0 12px;
    vertical-align: middle;
}

/* ====== 底部版权 ====== */
.form-copyright {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* 通知居中在右侧表单面板 */
.login-screen .toast-wrap {
    left: 77.5%;
}

/* ====== 响应式：移动端 ====== */
@media (max-width: 900px) {
    .login-screen {
        flex-direction: column;
    }

    .login-screen .toast-wrap {
        left: 50%;
    }

    .brand-panel {
        flex: none;
        padding: 48px 24px 36px;
        min-height: auto;
    }

    .brand-headline {
        font-size: 22px;
    }

    .brand-features {
        margin-top: 28px;
        gap: 24px;
    }

    .form-panel {
        flex: 1;
        padding: 36px 24px 80px;
    }

    .form-copyright {
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .brand-panel {
        padding: 36px 20px 28px;
    }

    .brand-logo {
        height: 52px;
        margin-bottom: 20px;
    }

    .brand-headline {
        font-size: 19px;
    }

    .brand-sub {
        font-size: 13px;
    }

    .brand-features {
        gap: 16px;
    }

    .brand-feat-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .form-panel {
        padding: 28px 20px 72px;
    }

    .form-title {
        font-size: 22px;
    }

    .field-input {
        height: 44px;
        font-size: 14px;
    }

    .btn-login {
        height: 44px;
        font-size: 14px;
    }
}
