/* ========================================
   登录/注册页面样式
   ======================================== */

.login-page {
    min-height: calc(100vh - 64px - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f4f0 0%, #e8f5e9 100%);
}

.login-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    min-height: 560px;
}

/* —— 左侧品牌区 —— */
.login-brand {
    flex: 1;
    background: linear-gradient(135deg, #004d40 0%, #00695c 50%, #00796b 100%);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.brand-content {
    text-align: center;
    max-width: 320px;
}

.brand-logo-large {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
}

.brand-slogan {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 16px 0;
    letter-spacing: 4px;
}

.brand-desc {
    font-size: 18px;
    opacity: 0.9;
    margin: 0 0 48px 0;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    opacity: 0.95;
}

.feature-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

/* —— 右侧表单区 —— */
.login-form-wrapper {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-box {
    width: 100%;
    max-width: 400px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-title {
    font-size: 32px;
    font-weight: 700;
    color: #2a2a2a;
    margin: 0 0 12px 0;
}

.form-subtitle {
    font-size: 16px;
    color: #5c5c5c;
    margin: 0;
}

/* —— 表单控件 —— */
.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 8px;
}

.label-icon {
    font-size: 18px;
}

.input-wrapper {
    position: relative;
}

.login-form .form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.login-form .form-input:focus {
    outline: none;
    border-color: #004d40;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 77, 64, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

/* —— 表单选项 —— */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #5c5c5c;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    font-size: 14px;
    color: #004d40;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #00796b;
    text-decoration: underline;
}

/* —— 登录按钮 —— */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #004d40 0%, #00695c 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #00352c 0%, #004d40 100%);
    box-shadow: 0 8px 20px rgba(0, 77, 64, 0.3);
    transform: translateY(-2px);
}

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

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

.btn-login .btn-loading {
    display: none;
}

/* —— 消息提示 —— */
.auth-msg {
    text-align: center;
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.auth-msg.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.auth-msg.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* —— 表单页脚 —— */
.form-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.register-prompt {
    font-size: 15px;
    color: #5c5c5c;
    margin: 0;
}

.register-link {
    color: #004d40;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.register-link:hover {
    color: #00796b;
    text-decoration: underline;
}

/* —— 抖动动画 —— */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* —— 响应式 —— */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 440px;
    }

    .login-brand {
        padding: 40px 30px;
        min-height: auto;
    }

    .brand-slogan {
        font-size: 32px;
    }

    .brand-desc {
        font-size: 15px;
        margin-bottom: 32px;
    }

    .brand-features {
        display: none;
    }

    .login-form-wrapper {
        padding: 40px 30px;
    }

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

@media (max-width: 480px) {
    .login-page {
        padding: 20px 12px;
    }

    .login-brand {
        padding: 30px 20px;
    }

    .brand-logo-large {
        width: 80px;
        height: 80px;
    }

    .brand-slogan {
        font-size: 28px;
    }

    .login-form-wrapper {
        padding: 30px 20px;
    }
}
