﻿
.validation-error {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.error-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}
/* 登录页面专用样式 */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px 20px;
    margin: -30px -30px 0 -30px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, #ee0025 0%, #B00A25 100%);
    color: white;
    padding: 20px 10px 10px 10px;
    text-align: center;
    position: relative;
}

    .login-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #ff7e5f, #feb47b);
    }

.school-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

    .school-logo img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
    }

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px;
    color: white;
}

.login-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.login-body {
    padding: 10px 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

    .form-control:focus {
        outline: none;
        border-color: #ee0025;
        background: white;
        box-shadow: 0 0 0 3px rgba(238, 0, 37, 0.1);
    }

    .form-control::placeholder {
        color: #999;
    }

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

.input-with-icon .form-control {
    padding-left: 50px;
}

.remember-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.remember-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.custom-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

    .custom-checkbox input[type="checkbox"] {
        opacity: 0;
        position: absolute;
        cursor: pointer;
        width: 20px;
        height: 20px;
        z-index: 2;
    }

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 1;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background-color: #ee0025;
    border-color: #ee0025;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.forgot-password {
    color: #ee0025;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

    .forgot-password:hover {
        color: #B00A25;
        text-decoration: underline;
    }

.button-container {
    background: linear-gradient(135deg, #ee0025 0%, #B00A25 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* 动画和按钮之间的间距 */
}

.login-button {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background-color: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(238, 0, 37, 0.3);
}

.button-container:active {
    transform: translateY(0);
}

.button-container:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #ffeaea;
    color: #d32f2f;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
    display: none;
    animation: fadeIn 0.3s ease;
}

    .error-message.show {
        display: block;
    }

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.register-link {
    color: #ee0025;
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
}

    .register-link:hover {
        text-decoration: underline;
    }

/* 响应式设计 */
@media (max-width: 768px) {
    .login-page {
        padding: 20px 10px;
        margin: -20px -20px 0 -20px;
    }

    .login-card {
        max-width: 100%;
        margin: 10px;
    }

    /*.login-header {
                padding: 1px 1px 1px;
            }
            */
    .login-body {
        padding: 30px 20px;
    }

    .school-logo {
        width: 70px;
        height: 70px;
    }

        .school-logo img {
            width: 70px;
            height: 70px;
        }
}

@media (max-width: 480px) {
    .login-page {
        padding: 10px;
        margin: -10px -10px 0 -10px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .form-control {
        padding: 12px 14px;
    }

    .login-button {
        padding: 14px;
    }
}

/* 加载动画 */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

