/* =============================================
   IMPROVED AUTHENTICATION STYLES
   Clean, modern styling for login/signup pages
   ============================================= */

/* Auth Page Layout */
body.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
}

/* Auth Header Section */
.auth-header-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.auth-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.auth-page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
}

/* Auth Main Content */
.auth-main-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 3rem;
    animation: slideUp 0.4s ease-out;
}

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

/* Auth Form */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 1.125rem;
}

/* Form Elements */
.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.auth-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.auth-form .form-control:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.auth-form .form-control::placeholder {
    color: #adb5bd;
}

/* Remember Me Checkbox */
.form-check {
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    border: 2px solid #dee2e6;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-label {
    margin-left: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

/* Links */
.auth-link {
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Social Login Divider */
.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e9ecef;
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-weight: 500;
}

/* Social Login Buttons */
.social-login-buttons {
    margin-bottom: 2rem;
}

.social-login-buttons .btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-width: 2px;
}

.social-login-buttons .btn img {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    object-fit: contain;
}

.social-login-buttons .btn-outline-dark {
    border-color: #dee2e6;
    color: #212529;
    background: white;
}

.social-login-buttons .btn-outline-dark:hover {
    background: #f8f9fa;
    border-color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-login-buttons .btn-outline-danger {
    border-color: #dee2e6;
    color: #212529;
    background: white;
}

.social-login-buttons .btn-outline-danger:hover {
    background: #fff5f5;
    border-color: #dc3545;
    color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.alert-dismissible .btn-close {
    padding: 1.125rem;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .auth-page-title {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .social-login-buttons .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .social-login-buttons .btn img {
        width: 20px;
        height: 20px;
    }
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #667eea;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.skip-to-content:focus {
    left: 0;
}

/* Error States */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: #dc3545;
}

/* Success States */
.form-control.is-valid {
    border-color: #198754;
}

.form-control.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.valid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: #198754;
}