/* 登录区域样式 */
.login-section {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
}

/* 登录表单 */
.login-form {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    color: var(--police-blue);
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 表单元素 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--light-blue);
    width: 16px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-dark);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.input-with-icon i.fa-id-card,
.input-with-icon i.fa-key {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.show-password {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.show-password:hover {
    color: var(--light-blue);
}

/* 记住我和忘记密码 */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 2px solid var(--medium-gray);
    cursor: pointer;
}

.remember-me label {
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.forgot-password {
    color: var(--light-blue);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--police-blue);
    text-decoration: underline;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--light-blue), var(--police-blue));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    background: var(--medium-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误提示 */
.login-error {
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid rgba(229, 62, 62, 0.2);
    border-radius: var(--radius);
    padding: 12px 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--alert-red);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-error i {
    font-size: 1rem;
}

/* 分割线 */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--medium-gray);
}

.divider span {
    padding: 0 15px;
}

/* 替代登录方式 */
.alternative-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-alternative {
    padding: 12px;
    background: white;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius);
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-alternative:hover {
    border-color: var(--light-blue);
    background: rgba(66, 153, 225, 0.05);
    transform: translateY(-1px);
}

/* 注册链接 */
.register-link {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 20px;
}

.register-link a {
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: var(--police-blue);
    text-decoration: underline;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--alert-red);
}

.qr-code-placeholder {
    text-align: center;
    margin: 20px 0;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: var(--light-gray);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--medium-gray);
}

.qr-placeholder {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-blue);
    font-size: 4rem;
}

.qr-instructions {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 20px;
}

.qr-instructions h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.qr-instructions ol {
    color: var(--text-light);
    padding-left: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 系统状态 */
.system-status {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-indicator.online i {
    color: var(--success-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.current-time {
    color: var(--text-dark);
    font-family: monospace;
    background: var(--light-gray);
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

/* 版本信息 */
.version-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    z-index: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .login-section {
        padding: 20px;
        border-radius: 0;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .alternative-login {
        grid-template-columns: 1fr;
    }

    .system-status {
        position: relative;
        bottom: auto;
        right: auto;
        justify-content: center;
        margin-top: 20px;
    }

    .version-info {
        position: relative;
        text-align: center;
        margin-top: 20px;
    }
}