/**
 * ============================================================================
 * JSBILLING — Application Logicielle sous Licence Commerciale Payante
 * JSBILLING — Premium Commercial Software License
 * Reproduction ou distribution non autorisée strictement interdite.
 * Unauthorized reproduction or distribution strictly prohibited.
 * ============================================================================
 */

/* ============================================ */
/* AUTH PAGE */
/* ============================================ */
.auth-page {
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 1100px;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 650px;
}

.auth-container-wide {
    max-width: 1200px;
}

.auth-container-small {
    grid-template-columns: 1fr;
    max-width: 500px;
}

/* ============================================ */
/* BRANDING PANEL */
/* ============================================ */
.auth-branding {
    background: var(--gradient-primary);
    color: #fff;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(9, 132, 227, 0.15) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.branding-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.brand-logo i {
    font-size: 2.5rem;
    color: #fff;
}

.auth-branding h1 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.branding-tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.branding-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.branding-feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.branding-feature i {
    font-size: 1.3rem;
    color: var(--primary-accent);
    background: rgba(9, 132, 227, 0.2);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.branding-feature span {
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
}

.branding-footer {
    position: relative;
    z-index: 1;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.branding-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0;
}

/* ============================================ */
/* FORM CONTAINER */
/* ============================================ */
.auth-form-container {
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-header {
    margin-bottom: 30px;
}

.auth-form-header h2 {
    color: var(--primary-dark);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-form-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.auth-icon-large {
    width: 70px;
    height: 70px;
    background: rgba(9, 132, 227, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary-accent);
}

.auth-icon-large.admin-icon {
    background: rgba(214, 48, 49, 0.1);
    color: var(--danger);
}

.auth-icon-large.auth-icon-success {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.auth-icon-large.auth-icon-danger {
    background: rgba(214, 48, 49, 0.1);
    color: var(--danger);
}

/* ============================================ */
/* FORM ELEMENTS */
/* ============================================ */
.auth-form .form-control,
.auth-form .form-select {
    padding: 12px 16px;
    border-radius: var(--radius-md);
}

.auth-form .input-group-text {
    background: var(--gray-100);
    border: 1.5px solid var(--gray-300);
    border-right: none;
    color: var(--primary-accent);
}

.auth-form .input-group .form-control {
    border-left: none;
}

.auth-form .input-group .form-control:focus {
    border-color: var(--primary-accent);
    box-shadow: none;
}

.auth-form .input-group .form-control:focus + .toggle-password,
.auth-form .input-group .form-control:focus ~ .toggle-password {
    border-color: var(--primary-accent);
}

.auth-form .toggle-password {
    border: 1.5px solid var(--gray-300);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--gray-100);
    color: var(--text-light);
}

.auth-form .toggle-password:hover {
    background: var(--gray-200);
    color: var(--primary-accent);
}

.auth-submit {
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
}

/* ============================================ */
/* LINKS & DIVIDERS */
/* ============================================ */
.auth-link {
    color: var(--primary-accent);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--primary-accent-hover);
    text-decoration: underline;
}

.auth-link-small {
    color: var(--primary-accent);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

.auth-link-small:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-300);
}

.auth-divider span {
    padding: 0 15px;
}

.auth-register-link {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-back {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.auth-back a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.auth-back a:hover {
    color: var(--primary-accent);
}

/* ============================================ */
/* PASSWORD STRENGTH */
/* ============================================ */
.password-strength span {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-block;
}

.strength-weak { color: #d63031; background: rgba(214, 48, 49, 0.1); }
.strength-fair { color: #e17055; background: rgba(225, 112, 85, 0.1); }
.strength-good { color: #fdcb6e; background: rgba(253, 203, 110, 0.15); }
.strength-strong { color: #00b894; background: rgba(0, 184, 148, 0.1); }
.strength-excellent { color: #00a884; background: rgba(0, 168, 132, 0.15); }

/* ============================================ */
/* ADMIN LOGIN SPECIFIC */
/* ============================================ */
.admin-login-page .auth-form-container {
    padding: 50px 40px;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 991px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 550px;
    }
    
    .auth-branding {
        display: none;
    }
    
    .auth-form-container {
        padding: 40px 30px;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 10px;
    }
    
    .auth-form-container {
        padding: 30px 20px;
    }
    
    .auth-form-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-container-small {
        max-width: 100%;
    }
}