/* static/css/auth.css */
/* Auth Pages Styling */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0c4a6e 0%, #1e3a8a 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Animated Background Elements */
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    top: -250px;
    right: -250px;
    animation: float 20s ease-in-out infinite;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(56, 189, 248, 0.05) 100%);
    bottom: -200px;
    left: -200px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, 10px) rotate(5deg); }
    50% { transform: translate(-5px, 15px) rotate(-5deg); }
    75% { transform: translate(-10px, 5px) rotate(3deg); }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 420px;
    z-index: 10;
    animation: slideUp 0.8s ease-out;
}

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

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 32px rgba(14, 165, 233, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 24px 24px 0 0;
}

/* Logo Section */
.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeIn 1s ease-out 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 
        0 10px 20px rgba(245, 158, 11, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(90deg, #0c4a6e 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
}

/* Form Styling */
.auth-form {
    animation: fadeIn 1s ease-out 0.4s both;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.form-label:focus-within {
    color: #0c4a6e;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    transition: color 0.3s ease;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05);
    background: white;
}

.form-input:focus + .input-icon {
    color: #3b82f6;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
    z-index: 1;
}

.password-toggle:hover {
    color: #6b7280;
}

/* Remember Me */
.remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper {
    position: relative;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #6b7280;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #374151;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-input:checked + .checkbox-label .checkbox-custom {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    border-color: transparent;
}

.checkbox-input:checked + .checkbox-label .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.forgot-link {
    font-size: 0.875rem;
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.forgot-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #0c4a6e 0%, #1e40af 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 
        0 4px 6px rgba(12, 74, 110, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px rgba(12, 74, 110, 0.25),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn i {
    font-size: 1.25rem;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider-text {
    padding: 0 1rem;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-btn.google i {
    color: #db4437;
}

.social-btn.microsoft i {
    color: #00a4ef;
}

/* Signup Link */
.signup-link {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 1.5rem;
}

.signup-link a {
    color: #0c4a6e;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-left: 0.5rem;
}

.signup-link a:hover {
    color: #f59e0b;
    text-decoration: underline;
}

/* Error Messages */
.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message i {
    margin-top: 0.125rem;
    font-size: 1.25rem;
}

.error-message-content {
    flex: 1;
}

.error-message-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.error-message-text {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Floating Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    animation: floatParticle 15s linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-wrapper {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 1.875rem;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: rgba(17, 24, 39, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .auth-subtitle {
        color: #d1d5db;
    }
    
    .form-label {
        color: #f3f4f6;
    }
    
    .form-input {
        background: rgba(31, 41, 55, 0.8);
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-input:focus {
        background: #1f2937;
        border-color: #3b82f6;
    }
    
    .checkbox-label {
        color: #d1d5db;
    }
    
    .checkbox-custom {
        border-color: #4b5563;
    }
    
    .forgot-link {
        color: #60a5fa;
    }
    
    .divider::before,
    .divider::after {
        background: #4b5563;
    }
    
    .divider-text {
        color: #9ca3af;
    }
    
    .social-btn {
        background: #1f2937;
        border-color: #4b5563;
        color: #f3f4f6;
    }
    
    .social-btn:hover {
        background: #374151;
        border-color: #3b82f6;
    }
    
    .signup-link {
        color: #d1d5db;
    }
    
    .signup-link a {
        color: #60a5fa;
    }
}