/**
 * 登录页面样式
 */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-box {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.4s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.back-home-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.back-home-link:hover {
    color: var(--accent-primary-hover);
    text-decoration: underline;
}

.login-form {
    width: 100%;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.75rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group label .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.login-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.login-btn.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.login-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

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

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.25rem;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: var(--accent-primary-hover);
    text-decoration: underline;
}

/* Toast 提示样式 */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 250px;
    animation: toastSlideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
}

.toast.warning {
    background: rgba(234, 179, 8, 0.95);
    color: #fff;
}

.toast.info {
    background: rgba(59, 130, 246, 0.95);
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }

    .login-box {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

