.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    text-align: center;
    margin-bottom: 10px;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 30px;
}

/*
|--------------------------------------------------------------------------
| AUTH PAGES
|--------------------------------------------------------------------------
*/

/* PAGE */

.auth-page {
    min-height: 100vh;
    padding: 60px 20px;
    background:
        linear-gradient(
            135deg,
            rgba(245, 183, 0, 0.08),
            rgba(255, 255, 255, 1)
        );
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CARTE */

.auth-card {
    width: 100%;
    max-width: 720px;
    margin: auto;

    background: var(--white);

    border-radius: 28px;

    padding: 50px;

    box-shadow: var(--shadow-lg);

    position: relative;

    overflow: hidden;
}

.auth-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 6px;

    background: var(--primary);
}

/* HEADER */

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    width: 90px;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 2.3rem;
    margin-bottom: 12px;
}

.auth-header p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* ROLE */

.role-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
}

.role-option {
    flex: 1;
    cursor: pointer;
}

.role-option input {
    display: none;
}

.role-option span {
    display: block;

    padding: 18px;

    border-radius: var(--radius-lg);

    border: 2px solid var(--gray-200);

    text-align: center;

    font-weight: 600;

    transition: var(--transition);
}

.role-option input:checked + span {
    border-color: var(--primary);

    background: rgba(245, 183, 0, 0.15);

    color: var(--dark);
}

/* FORM */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;

    font-weight: 600;

    color: var(--dark);
}

.form-group input,
.form-group select {
    width: 100%;

    padding: 15px 18px;

    border-radius: 14px;

    border: 2px solid var(--gray-200);

    background: var(--white);

    font-size: 1rem;

    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;

    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(245, 183, 0, 0.18);
}

/* LIVREURS */

.rider-fields {
    padding: 25px;

    border-radius: 20px;

    background: rgba(245, 183, 0, 0.06);

    border: 1px solid rgba(245, 183, 0, 0.2);
}

.rider-fields h3 {
    margin-bottom: 25px;
}

/* BOUTON PRINCIPAL */

.auth-submit {
    width: 100%;

    margin-top: 10px;

    padding: 18px;

    font-size: 1rem;

    font-weight: 700;
}

/* DIVIDER */

.auth-divider {
    display: flex;

    align-items: center;

    margin: 35px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: var(--gray-300);
}

.auth-divider span {
    padding: 0 20px;

    color: var(--gray-600);

    font-weight: 600;
}

/* GOOGLE */

.btn-google {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    padding: 16px;

    border: 2px solid var(--gray-200);

    border-radius: 14px;

    background: var(--white);

    cursor: pointer;

    font-weight: 600;

    transition: var(--transition);
}

.btn-google:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow);
}

.btn-google img {
    width: 24px;
}

/* FOOTER */

.auth-footer {
    text-align: center;
    margin-top: 35px;
}

.auth-footer p {
    color: var(--gray-600);
}

.auth-footer a {
    color: var(--primary-dark);

    font-weight: 700;

    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ERREURS */

.auth-error {
    padding: 14px 18px;

    border-radius: 14px;

    background: rgba(220, 53, 69, 0.08);

    border: 1px solid rgba(220, 53, 69, 0.2);

    color: #dc3545;

    font-weight: 500;
}

/* ANIMATION */

.auth-card {
    animation: authFadeIn .6s ease;
}

@keyframes authFadeIn {

    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* ==================================================
   LOGIN PAGE
================================================== */

.auth-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    background: var(--white);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 193, 7, 0.08),
            transparent 35%
        );
    pointer-events: none;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 90px;
    margin-bottom: 18px;
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--black);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--gray-600);
    line-height: 1.6;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--black);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.25s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15);
}


.role-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.role-option {
    flex: 1;
    cursor: pointer;
}

.role-option input {
    display: none;
}

.role-option span {
    display: block;
    padding: 14px;
    border-radius: 14px;
    text-align: center;
    border: 2px solid var(--gray-200);
    font-weight: 600;
    transition: all 0.25s ease;
}

.role-option input:checked + span {
    background: var(--primary);
    color: var(--black);
    border-color: var(--primary);
}


.auth-submit {
    margin-top: 10px;
    width: 100%;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 14px 18px;

    border: 2px solid var(--gray-200);

    background: var(--white);

    border-radius: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.25s ease;
}

.btn-google:hover {
    transform: translateY(-2px);

    border-color: var(--primary);

    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.btn-google img {
    width: 22px;
    height: 22px;
}


.auth-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: var(--gray-500);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    padding: 0 16px;
    font-size: 0.9rem;
    font-weight: 600;
}


.auth-error {
    background: rgba(220, 53, 69, 0.1);

    color: #dc3545;

    border: 1px solid rgba(220, 53, 69, 0.2);

    padding: 14px;

    border-radius: 12px;

    font-size: 0.95rem;
}

.hidden {
    display: none !important;
}


.auth-footer {
    text-align: center;
    margin-top: 28px;
}

.auth-footer a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}


@media (max-width: 576px) {

    .auth-card {
        padding: 30px 22px;
    }

    .auth-header h1 {
        font-size: 1.7rem;
    }

    .role-selector {
        flex-direction: column;
    }

}