/* ============================================================
   WAWA CASH — Auth Pages Design Enhancement
   Palette logo :
     Navy  #132D60  (texte "cash" + flèche)
     Sky   #4EAEE5  (texte "WAWA")
     White #FFFFFF
   Ciblé sur body.auth-page pour ne pas polluer le dashboard.
   ============================================================ */

/* ── Fond dégradé brand ───────────────────────────────────── */
body.auth-page {
    background: linear-gradient(145deg, #0d1d40 0%, #132D60 45%, #1c5591 78%, #3a9fd4 115%) !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Masquer l'overlay bg-light hérité du template (blanc semi-transparent) */
body.auth-page > .bg-overlay.bg-light {
    display: none !important;
}

/* Blob décoratif coin haut-droit */
body.auth-page::before {
    content: '';
    position: fixed;
    top: -180px;
    right: -180px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(78, 174, 229, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Blob décoratif coin bas-gauche */
body.auth-page::after {
    content: '';
    position: fixed;
    bottom: -120px;
    left: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── z-index du contenu au-dessus des blobs ───────────────── */
body.auth-page .account-pages {
    position: relative;
    z-index: 1;
}

/* ── Card principale — ombre + radius ─────────────────────── */
body.auth-page .card {
    border: none !important;
    border-radius: 20px !important;
    box-shadow:
        0 24px 72px rgba(13, 29, 64, 0.32),
        0 6px 20px rgba(19, 45, 96, 0.16) !important;
    overflow: hidden;
}

/* ── Panneau droit (carousel) ─────────────────────────────── */
body.auth-page .bg-auth {
    background-image: linear-gradient(160deg, #0d1d40 0%, #132D60 38%, #1a5c9e 72%, #4EAEE5 130%) !important;
    background-color: #132D60 !important;
    position: relative;
    overflow: hidden;
    align-items: stretch !important;
}

/* Masquer l'overlay .bg-primary hérité du template dans le panel droit */
body.auth-page .bg-auth > div > .bg-overlay.bg-primary {
    display: none !important;
}

/* Contenu du panel droit — centrage vertical natif Bootstrap */
body.auth-page .bg-auth > div {
    position: relative;
    z-index: 1;
}

/* Cercle décoratif haut-droit du panel droit */
body.auth-page .bg-auth::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    pointer-events: none;
    z-index: 0;
}

/* Cercle décoratif bas-gauche du panel droit */
body.auth-page .bg-auth::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    pointer-events: none;
    z-index: 0;
}

/* ── Logo zone ────────────────────────────────────────────── */
body.auth-page .auth-logo-wrapper img {
    filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.30));
    transition: transform 0.3s ease, filter 0.3s ease;
}

body.auth-page .auth-logo-wrapper img:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 5px 20px rgba(0, 0, 0, 0.40));
}


/* Texte carousel — lisibilité améliorée */
body.auth-page .testi-contain h5,
body.auth-page .testi-contain h5.text-white {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    font-weight: 600;
}

body.auth-page .testi-contain p,
body.auth-page .testi-contain p.text-white-50 {
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ── Sélecteur de langue ──────────────────────────────────── */
body.auth-page .language-selector .dropdown-toggle {
    background: rgba(255, 255, 255, 0.13) !important;
    border: 1px solid rgba(255, 255, 255, 0.26) !important;
    color: #ffffff !important;
    border-radius: 9px !important;
    font-size: 0.82rem;
    padding: 0.32rem 0.72rem;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

body.auth-page .language-selector .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

body.auth-page .language-selector .dropdown-toggle::after {
    border-top-color: rgba(255, 255, 255, 0.7);
}

/* ── Inputs ───────────────────────────────────────────────── */
body.auth-page .form-control {
    border-radius: 10px !important;
    border: 1.5px solid #dde3ed !important;
    background-color: #f7f9fc !important;
    font-size: 0.875rem;
    padding: 0.58rem 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.auth-page .form-control:focus {
    border-color: #4EAEE5 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(78, 174, 229, 0.16) !important;
}

body.auth-page .form-label {
    font-size: 0.815rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.38rem;
    letter-spacing: 0.01em;
}

/* Bouton afficher/masquer mot de passe */
body.auth-page .password-addon {
    color: #94a3b8 !important;
    transition: color 0.2s ease;
}

body.auth-page .password-addon:hover {
    color: #4EAEE5 !important;
}

/* ── Bouton principal ─────────────────────────────────────── */
body.auth-page .btn-primary {
    border-radius: 10px !important;
    padding: 0.65rem 1rem !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #132D60 0%, #1c4d8a 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(19, 45, 96, 0.30) !important;
    transition: all 0.25s ease !important;
}

body.auth-page .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0d1f45 0%, #132D60 100%) !important;
    box-shadow: 0 7px 22px rgba(19, 45, 96, 0.40) !important;
    transform: translateY(-1px) !important;
}

body.auth-page .btn-primary:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: 0 3px 10px rgba(19, 45, 96, 0.28) !important;
}

/* ── Titres du formulaire ─────────────────────────────────── */
body.auth-page .card h5 {
    color: #132D60 !important;
    font-weight: 700;
    font-size: 1.12rem;
}

body.auth-page .card .text-muted {
    font-size: 0.845rem;
}

/* ── Liens ────────────────────────────────────────────────── */
body.auth-page a.text-primary,
body.auth-page a.fw-medium.text-primary {
    color: #4EAEE5 !important;
}

body.auth-page a.text-primary:hover,
body.auth-page a.fw-medium.text-primary:hover {
    color: #38a0dc !important;
}

body.auth-page a.text-muted.text-decoration-underline {
    color: #4EAEE5 !important;
}

/* ── Carousel indicators (panel droit) ───────────────────── */
body.auth-page .carousel-indicators-rounded button {
    width: 22px !important;
    height: 4px !important;
    border-radius: 2px !important;
    background: rgba(255, 255, 255, 0.38) !important;
    border: none !important;
    transition: width 0.3s ease, background 0.3s ease !important;
}

body.auth-page .carousel-indicators-rounded .active {
    background: #ffffff !important;
    width: 32px !important;
}

/* ── Texte du carousel (panel droit) ─────────────────────── */
body.auth-page .testi-contain h5 {
    font-size: 1.05rem !important;
    font-weight: 600;
    line-height: 1.45;
}

body.auth-page .testi-contain p {
    font-size: 0.875rem !important;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72) !important;
}

/* ── Alertes ──────────────────────────────────────────────── */
body.auth-page .alert {
    border-radius: 10px !important;
    font-size: 0.855rem;
    border: none !important;
}

body.auth-page .alert-info {
    background: rgba(78, 174, 229, 0.10) !important;
    color: #0b5280 !important;
    border-left: 3px solid #4EAEE5 !important;
}

body.auth-page .alert-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #b91c1c !important;
    border-left: 3px solid #ef4444 !important;
}

body.auth-page .alert-success {
    background: rgba(16, 185, 129, 0.09) !important;
    color: #065f46 !important;
    border-left: 3px solid #10b981 !important;
}

body.auth-page .alert-warning {
    background: rgba(245, 158, 11, 0.09) !important;
    color: #92400e !important;
    border-left: 3px solid #f59e0b !important;
}

/* ── Pied de page ─────────────────────────────────────────── */
body.auth-page .mt-3.text-center p.text-muted {
    color: rgba(255, 255, 255, 0.58) !important;
    font-size: 0.8rem;
}

/* ── Page 2FA — input code ────────────────────────────────── */
body.auth-page .code-input {
    border-radius: 12px !important;
    font-size: 2rem !important;
    letter-spacing: 0.65rem !important;
    font-weight: 800 !important;
    color: #132D60 !important;
    border: 2px solid #dde3ed !important;
    background: #f7f9fc !important;
    padding: 0.75rem 1rem !important;
    text-align: center;
}

body.auth-page .code-input:focus {
    border-color: #4EAEE5 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(78, 174, 229, 0.18) !important;
}

/* ── Page 2FA — card avec accent bar en haut ──────────────── */
body.auth-page .auth-single-card {
    border-top: 4px solid #4EAEE5 !important;
}

/* ── Badge icône au-dessus du formulaire ──────────────────── */
.auth-icon-badge {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    background: linear-gradient(135deg, rgba(78,174,229,0.14) 0%, rgba(19,45,96,0.09) 100%);
    color: #132D60;
    margin-bottom: 0.85rem;
    box-shadow: 0 2px 10px rgba(19, 45, 96, 0.10);
}

/* ── Page password-change (modal plein écran) ─────────────── */
.password-change-container {
    background: linear-gradient(145deg, rgba(13,29,64,0.93) 0%, rgba(19,45,96,0.82) 60%, rgba(78,174,229,0.55) 130%) !important;
    backdrop-filter: blur(5px);
}

.password-change-modal {
    border-radius: 20px !important;
    border-top: 4px solid #4EAEE5 !important;
    box-shadow: 0 24px 72px rgba(13, 29, 64, 0.38) !important;
}

.password-change-modal h4 {
    color: #132D60;
    font-weight: 700;
}

.security-icon {
    font-size: 2.6rem;
    filter: drop-shadow(0 2px 8px rgba(19,45,96,0.14));
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
    /* Masquer le panneau droit carousel sur mobile */
    body.auth-page .bg-auth {
        display: none !important;
    }

    body.auth-page .card {
        border-radius: 16px !important;
    }
}

@media (max-width: 575.98px) {
    body.auth-page .card {
        border-radius: 12px !important;
        margin: 0 0.5rem;
    }

    body.auth-page .account-pages {
        padding-top: 0.75rem;
    }
}
