/* =====================
   LOGIN & AUTH STYLES
   ===================== */

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 40px 20px;
    background: #f8f9fa;
}

.auth-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.auth-box h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.auth-box h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0a66c2, #004182);
    border-radius: 2px;
}

/* Error Messages */
.error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 15px;
    text-align: left;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.2);
}

.error::before {
    content: '⚠️';
    margin-right: 10px;
    font-size: 14px;
}

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

/* Auth Form */
.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-box input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
}

.auth-box input:focus {
    outline: none;
    border-color: #0a66c2;
    background: white;
    box-shadow: 0 0 0 4px rgba(10, 102, 194, 0.1);
}

.auth-box input::placeholder {
    color: #8a94a6;
}

.auth-box button {
    background: linear-gradient(135deg, #0a66c2, #004182);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.auth-box button:hover {
    background: linear-gradient(135deg, #0958a9, #003366);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 102, 194, 0.3);
}

.auth-box button:active {
    transform: translateY(0);
}

.auth-box p {
    margin-top: 25px;
    color: #666;
    font-size: 15px;
}

.auth-box a {
    color: #0a66c2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
    display: inline-block;
}

.auth-box a:hover {
    color: #004182;
    text-decoration: underline;
}

.auth-box a::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s;
}

.auth-box a:hover::after {
    transform: translateX(3px);
}

/* Password Toggle (Optional Feature) */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8a94a6;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #0a66c2;
}

/* Remember Me Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.remember-me input[type="checkbox"] {
    width: auto;
    transform: scale(1.2);
}

/* Forgot Password Link */
.forgot-password {
    text-align: right;
    margin-top: 10px;
}

.forgot-password a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.forgot-password a:hover {
    color: #0a66c2;
    text-decoration: underline;
}

/* Social Login (Optional) */
.social-login {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e1e5e9;
}

.social-login p {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #333;
}

.social-btn.google:hover {
    background: #f8f9fa;
    border-color: #db4437;
}

.social-btn.facebook:hover {
    background: #f8f9fa;
    border-color: #4267B2;
}

.social-btn i {
    font-size: 16px;
}

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

.social-btn.facebook i {
    color: #4267B2;
}

/* Responsive Design for Login */
@media (max-width: 768px) {
    .auth-box {
        padding: 30px 25px;
        margin: 0 15px;
    }
    
    .auth-box h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .auth-box input {
        padding: 14px 18px;
    }
    
    .auth-box button {
        padding: 14px 18px;
    }
    
    .social-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 25px 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    .auth-container {
        padding: 20px 15px;
    }
    
    .auth-box h2 {
        font-size: 22px;
    }
}

/* Success Message */
.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 15px;
    text-align: left;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.success::before {
    content: '✅';
    margin-right: 10px;
    font-size: 14px;
}

/* Loading State */
.auth-box button.loading {
    position: relative;
    color: transparent;
}

.auth-box button.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Registration Page Specific */
.registration-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.registration-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e1e5e9;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 10px;
    transition: all 0.3s;
}

.step.active .step-circle {
    background: linear-gradient(135deg, #0a66c2, #004182);
    color: white;
    box-shadow: 0 4px 10px rgba(10, 102, 194, 0.3);
}

.step-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.step.active .step-label {
    color: #0a66c2;
}

/* Terms Checkbox */
.terms-agreement {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: left;
}

.terms-agreement label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.terms-agreement input[type="checkbox"] {
    margin-top: 3px;
}

.terms-agreement a {
    color: #0a66c2;
    text-decoration: none;
}

.terms-agreement a:hover {
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 5px;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background 0.3s;
}

.strength-weak {
    background: #ff6b6b;
    width: 25%;
}

.strength-fair {
    background: #ffa726;
    width: 50%;
}

.strength-good {
    background: #42a5f5;
    width: 75%;
}

.strength-strong {
    background: #4CAF50;
    width: 100%;
}

.strength-text {
    font-size: 12px;
    margin-top: 5px;
    text-align: right;
    color: #666;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-box {
        background: #1e293b;
        color: #e2e8f0;
    }
    
    .auth-box h2 {
        color: #f1f5f9;
    }
    
    .auth-box input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .auth-box input:focus {
        border-color: #60a5fa;
        background: #2d3748;
        box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1);
    }
    
    .auth-box input::placeholder {
        color: #94a3b8;
    }
    
    .auth-box p {
        color: #cbd5e1;
    }
    
    .social-btn {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .terms-agreement {
        background: #2d3748;
    }
    
    .terms-agreement label {
        color: #cbd5e1;
    }
}