/* ==========================================================================
   JessManage — Pages d'authentification (login, register, etc.)
   Mobile-first. Réutilise les variables de dashboard.css si chargé avant,
   sinon retombe sur ces valeurs par défaut.
   ========================================================================== */

:root {
    --auth-blue-start: #162b90;
    --auth-blue-end: #161f4a;
}

body.auth-body {
    min-height: 100vh;
    background: #eef0fb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.auth-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(50px);
    opacity: .55;
    z-index: 0;
    pointer-events: none;
}

.auth-blob-1 {
    width: 340px;
    height: 340px;
    top: -120px;
    left: -100px;
    background: #dfe3fb;
}

.auth-blob-2 {
    width: 420px;
    height: 420px;
    top: -140px;
    right: -160px;
    background: #e4e8fc;
}

.auth-blob-3 {
    width: 380px;
    height: 380px;
    bottom: -160px;
    right: -120px;
    background: #dfe3fb;
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(60, 70, 150, .16);
    display: flex;
    flex-direction: column;
}

.auth-side {
    background: linear-gradient(160deg, var(--auth-blue-start), var(--auth-blue-end));
    color: #fff;
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: .35rem;
}

.auth-logo-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    margin-bottom: .5rem;
}

.auth-logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.auth-logo-text .light {
    font-weight: 400;
    opacity: .92;
}

.auth-divider-line {
    width: 36px;
    height: 2px;
    background: rgba(255, 255, 255, .5);
    margin: .5rem 0 1rem;
}

.auth-tagline {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: .6rem;
}

.auth-desc {
    font-size: .82rem;
    opacity: .88;
    line-height: 1.55;
    max-width: 260px;
}

.auth-illustration {
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    opacity: .9;
}

.auth-illustration .ill-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.auth-illustration .ill-icon.small {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
}

.auth-form-side {
    padding: 2.25rem 1.5rem;
    flex: 1;
}

.auth-welcome {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .2rem;
}

.auth-welcome .brand {
    color: var(--auth-blue-end);
}

.auth-subtitle {
    color: #8b93ab;
    font-size: .87rem;
    margin-bottom: 1.4rem;
}

.auth-tabs {
    display: flex;
    background: #f4f6fb;
    border-radius: 10px;
    padding: .3rem;
    margin-bottom: 1.25rem;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: .55rem;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 600;
    color: #8b93ab;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}

.auth-tab.active {
    background: #fff;
    color: var(--auth-blue-end);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.auth-field-label {
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: .4rem;
    color: #1e2547;
}

.auth-input-group {
    position: relative;
    margin-bottom: 1.1rem;
}

.auth-input-group .icon-left {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8b93ab;
    font-size: .95rem;
    pointer-events: none;
}

.auth-input-group input {
    width: 100%;
    padding: .65rem .9rem .65rem 2.6rem;
    border: 1px solid #edf0f7;
    border-radius: 10px;
    font-size: .87rem;
    background: #fff;
}

.auth-input-group input:focus {
    outline: none;
    border-color: var(--auth-blue-end);
    box-shadow: 0 0 0 3px rgba(75, 87, 224, .12);
}

.auth-input-group .toggle-visibility {
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8b93ab;
    font-size: .95rem;
}

.auth-row-between {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 1.4rem;
    font-size: .82rem;
}

.auth-row-between a {
    color: var(--auth-blue-end);
    font-weight: 600;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #1e2547;
}

.auth-checkbox input {
    width: 16px;
    height: 16px;
}

.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--auth-blue-start), var(--auth-blue-end));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .75rem;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 8px 20px rgba(75, 87, 224, .28);
}

.auth-submit-btn:hover {
    opacity: .95;
    color: #fff;
}

.auth-or {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #8b93ab;
    font-size: .78rem;
    margin: 1.2rem 0;
}

.auth-or::before,
.auth-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #edf0f7;
}

.auth-guest-btn {
    width: 100%;
    background: #fff;
    border: 1px solid #edf0f7;
    border-radius: 10px;
    padding: .68rem;
    font-weight: 600;
    font-size: .86rem;
    color: #1e2547;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.auth-guest-btn:hover {
    background: #f8f9fd;
}

.auth-page-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #8b93ab;
    font-size: .78rem;
    margin-top: 1.5rem;
    width: 100%;
}

/* ---------------------------------------------------------------------- */
/* RESPONSIVE                                                              */
/* ---------------------------------------------------------------------- */
@media (min-width: 768px) {
    .auth-shell {
        flex-direction: row;
        min-height: calc(100vh - 4rem);
        max-height: calc(100vh - 4rem);
    }

    .auth-side {
        width: 42%;
        padding: 3rem 2.25rem;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .auth-form-side {
        padding: 3rem 3.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-welcome {
        font-size: 1.45rem;
    }
}

@media (max-width: 767.98px) {
    .auth-side {
        display: none;
    }
}

@media (max-width: 420px) {
    .auth-tabs {
        flex-direction: column;
        gap: .25rem;
    }

    .auth-blob {
        display: none;
    }
}
