/* Authentication pages styles (login, register) */

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

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-header h1 {
    color: #1a202c;
    margin-bottom: 0.8rem;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.auth-header h1 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.auth-header p {
    color: #4a5568;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.5;
}

.auth-form {
    padding: 2rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 700;
    color: #2d3748;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-weight: 500;
    color: #2d3748;
}

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

.form-control.is-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.invalid-feedback {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.auth-links {
    text-align: center;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.social-auth {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.btn-social {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-social:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}

.btn-social i {
    margin-right: 0.5rem;
    font-size: 1.125rem;
}

.divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
}

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

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.remember-me label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.forgot-password {
    text-align: right;
    margin-bottom: 1.5rem;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Django Allauth specific styles */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.errorlist li {
    background: #fed7d7;
    color: #c53030;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    border-left: 3px solid #e53e3e;
}

.field-errors {
    margin-top: 0.5rem;
}

.field-errors span {
    display: block;
    color: #e53e3e;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    background: #fed7d7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Form validation states */
.form-control.is-invalid {
    border-color: #e53e3e;
    box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2);
}

.form-control.is-valid {
    border-color: #48bb78;
    box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.2);
}

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

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: currentColor;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Success messages */
.success-message {
    text-align: center;
    color: #2f855a;
}

.success-message i {
    font-size: 3rem;
    color: #48bb78;
    margin-bottom: 1rem;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-weak { background: #e53e3e; width: 25%; }
.password-strength-fair { background: #ed8936; width: 50%; }
.password-strength-good { background: #ecc94b; width: 75%; }
.password-strength-strong { background: #48bb78; width: 100%; }

/* Interactive animations */
.auth-card {
    animation: slideInUp 0.5s ease-out;
}

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

.form-control:focus {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.btn:active {
    transform: translateY(1px);
}

/* Responsive design improvements */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        max-width: 100%;
    }
    
    .auth-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .auth-header {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    .form-control {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-control:focus {
        border-color: #667eea;
        background: #2d3748;
    }
}

/* Butoanele principale */
.btn-primary, .btn.btn-primary {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    margin-bottom: 1rem;
}

.btn-primary:hover, .btn.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Checkbox styling îmbunătățit */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    transform: scale(1.3);
}

.form-check {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    padding: 0.5rem;
}

.form-check label {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    margin-left: 0.5rem;
}

/* Link styling pentru paginile de autentificare */
.auth-footer a,
.auth-form a {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.3rem 0;
}

.auth-footer a:hover,
.auth-form a:hover {
    color: #5a67d8;
    text-decoration: underline;
    transform: translateY(-2px);
}

.auth-footer p,
.auth-form p {
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    margin: 1.5rem 0;
}

/* Text de jos mai vizibil */
.auth-footer {
    text-align: center;
    padding: 1.5rem 2rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Butoane secundare */
.btn-secondary {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #e2e8f0;
    color: #2d3748;
    border: 2px solid #cbd5e0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #1a202c;
}
