/* ================================================================
   ILEXDIGITAL - AUTHENTICATION PAGES STYLESHEET
   Login, Logout, Register, Password Reset styled to match site theme
   ================================================================ */

/* ----------------------------------------
   1. Auth Section Base
   ---------------------------------------- */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darken) 0%, var(--secondary-color) 100%);
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.auth-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0),
        radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    opacity: 0.6;
}

/* ----------------------------------------
   2. Auth Card
   ---------------------------------------- */
.auth-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25),
                0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    animation: authCardSlideIn 0.5s ease-out;
}

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

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

.auth-logo {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.auth-logo .logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.auth-logo .text-accent {
    color: var(--accent-color);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0;
}

/* ----------------------------------------
   4. Auth Form
   ---------------------------------------- */
.auth-form .form-label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.auth-form .form-label i {
    color: var(--accent-color);
}

.auth-form .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.25s ease;
    background: #f8fafc;
}

.auth-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 54, 93, 0.1);
    background: white;
}

.auth-form .form-control.is-invalid {
    border-color: var(--danger-color);
    background: #fff5f5;
}

.auth-form .form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.auth-form .invalid-feedback {
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Remember & Forgot */
.form-check-input {
    width: 1.15em;
    height: 1.15em;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--text-color);
    font-size: 0.9rem;
}

.forgot-password-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    transition: all 0.3s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.3);
}

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

/* ----------------------------------------
   5. Auth Footer
   ---------------------------------------- */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.auth-back-home {
    text-align: center;
    margin-top: 1.25rem;
}

.auth-back-home a {
    color: var(--text-light);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-back-home a:hover {
    color: var(--primary-color);
}

/* ----------------------------------------
   6. Logout Page Specific
   ---------------------------------------- */
.logout-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoutIconPop 0.5s ease-out;
}

.logout-icon-wrapper i {
    font-size: 2.5rem;
    color: white;
}

@keyframes logoutIconPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.logout-actions {
    margin-top: 2rem;
}

.logout-quick-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.quick-links-title {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.quick-link-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.quick-link-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.quick-link-item i {
    color: var(--accent-color);
    font-size: 1rem;
}

.quick-link-item:hover i {
    color: white;
}

/* ----------------------------------------
   7. Alerts Styling
   ---------------------------------------- */
.auth-card .alert {
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    border: none;
    margin-bottom: 1.5rem;
}

.auth-card .alert-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.auth-card .alert-success {
    background: #ecfdf5;
    color: #047857;
}

.auth-card .alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

/* ----------------------------------------
   8. Responsive Design
   ---------------------------------------- */
@media (max-width: 767.98px) {
    .auth-section {
        padding: 1.5rem 1rem;
    }
    
    .auth-card {
        padding: 1.75rem 1.5rem;
        border-radius: 16px;
    }
    
    .auth-logo .logo-text {
        font-size: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .auth-form .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    .logout-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .logout-icon-wrapper i {
        font-size: 2rem;
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }
    
    .auth-title {
        font-size: 1.35rem;
    }
    
    .auth-form .form-group.d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }
}

/* ----------------------------------------
   9. Register Page Enhancements
   ---------------------------------------- */
.auth-form .password-requirements {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.8rem;
}

.auth-form .password-requirements ul {
    margin: 0;
    padding-left: 1.25rem;
}

.auth-form .password-requirements li {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.auth-form .password-requirements li.valid {
    color: #059669;
}

/* Social Login Buttons (if needed in future) */
.social-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.social-login-divider::before {
    margin-right: 1rem;
}

.social-login-divider::after {
    margin-left: 1rem;
}

.social-login-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.25s ease;
}

.btn-social:hover {
    border-color: var(--primary-color);
    background: #f8fafc;
}

/* ----------------------------------------
   10. Print Styles
   ---------------------------------------- */
@media print {
    .auth-section {
        background: white !important;
    }
    
    .auth-bg-pattern {
        display: none;
    }
    
    .auth-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}
