/* ===================================================================
   Login moderno — Nordeste Dedetizações
   Escopo: exclusivo da página de login (body.login-modern-page).
   Este arquivo é carregado só em index.php, então não afeta o resto
   do painel — pode sobrescrever à vontade sem medo de vazar estilo.
=================================================================== */

body.login-modern-page {
    background: linear-gradient(135deg, #eef4fb 0%, #fbeae7 35%, #eaeffb 65%, #fdf2ef 100%) !important;
    background-size: 260% 260% !important;
    animation: loginGradientShift 24s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

@keyframes loginGradientShift {
    0% { background-position: 0% 30%; }
    50% { background-position: 100% 70%; }
    100% { background-position: 0% 30%; }
}

/* vinheta suave: aprofunda levemente os cantos para o card de vidro se destacar */
body.login-modern-page::after {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(180, 60, 70, 0.08) 100%);
    pointer-events: none;
    z-index: 0;
}

/* textura sutil em pontos, dá profundidade sem pesar */
body.login-modern-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(20, 50, 90, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

/* ---------- Blobs de fundo (reaproveita os <div> vazios do .square-box) ---------- */
body.login-modern-page .square-box {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

body.login-modern-page .square-box .background99 {
    opacity: 0.08;
    filter: grayscale(0.3);
}

body.login-modern-page .square-box div {
    display: none;
}

body.login-modern-page .square-box div:nth-of-type(1),
body.login-modern-page .square-box div:nth-of-type(2),
body.login-modern-page .square-box div:nth-of-type(3) {
    display: block;
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.4;
    animation: loginBlobFloat 22s ease-in-out infinite;
}

body.login-modern-page .square-box div:nth-of-type(1) {
    width: 460px;
    height: 460px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle at 30% 30%, #bcd6fb, transparent 70%);
    animation-duration: 24s;
}

body.login-modern-page .square-box div:nth-of-type(2) {
    width: 520px;
    height: 520px;
    bottom: -180px;
    right: -140px;
    background: radial-gradient(circle at 60% 40%, #b7ece6, transparent 70%);
    animation-duration: 28s;
    animation-delay: -6s;
}

body.login-modern-page .square-box div:nth-of-type(3) {
    width: 380px;
    height: 380px;
    top: 40%;
    left: 58%;
    background: radial-gradient(circle at 50% 50%, #f6b8ae, transparent 70%);
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes loginBlobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(24px, -20px) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
    body.login-modern-page,
    body.login-modern-page .square-box div {
        animation: none !important;
    }
}

/* ---------- Layout geral ---------- */
body.login-modern-page .page,
body.login-modern-page .page-single {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* ---------- Card de vidro ---------- */
body.login-modern-page .card-sigin {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 25px 55px -20px rgba(30, 60, 110, 0.28), 0 8px 20px -10px rgba(30, 60, 110, 0.12);
    border-radius: 24px !important;
    width: 380px;
    padding: 0 !important;
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.login-modern-page .card-sigin::before {
    content: "";
    display: block;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #2f6fed, #12b3c4, #e35b52);
    background-size: 200% 100%;
    animation: loginBarShift 6s linear infinite;
}

@keyframes loginBarShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

body.login-modern-page .panel-body.tabs-menu-body {
    padding: 34px 32px 28px !important;
}

/* logo mobile antiga fica redundante com o novo .login-logo-wrap (que já é responsivo) */
body.login-modern-page .my_Logo_Mobile {
    display: none !important;
}

/* ---------- Logo ---------- */
body.login-modern-page .login-logo-wrap {
    position: relative;
    text-align: center;
    margin-bottom: 8px;
    padding-top: 6px;
}

body.login-modern-page .login-logo-wrap::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 220px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(47, 111, 237, 0.28), rgba(18, 179, 196, 0.12) 55%, transparent 75%);
    filter: blur(6px);
    animation: loginLogoGlow 4.5s ease-in-out infinite;
    z-index: 0;
}

body.login-modern-page .login-logo-wrap img {
    position: relative;
    z-index: 1;
    max-width: 230px;
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.3));
    animation: loginLogoFloat 4.5s ease-in-out infinite;
}

@keyframes loginLogoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.03); }
}

@keyframes loginLogoGlow {
    0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

body.login-modern-page .login-heading {
    text-align: center;
    margin-bottom: 22px;
}

body.login-modern-page .login-heading h4 {
    font-weight: 700;
    color: #10263b;
    margin-bottom: 2px;
    font-size: 20px;
}

body.login-modern-page .login-heading p {
    color: #7a8ba0;
    font-size: 13px;
    margin: 0;
}

/* ---------- Campos com ícone ---------- */
body.login-modern-page .input-icon-wrap {
    position: relative;
}

body.login-modern-page .input-icon-wrap .field-left-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa9bd;
    font-size: 15px;
    pointer-events: none;
    transition: color .2s ease;
    z-index: 2;
}

body.login-modern-page .input-icon-wrap:focus-within .field-left-icon {
    color: #2f6fed;
}

body.login-modern-page .form-group {
    margin-bottom: 16px;
}

body.login-modern-page input.form-control,
body.login-modern-page input#usuario-email,
body.login-modern-page input#password-field {
    width: 100% !important;
    border: 1.5px solid #e6ebf2 !important;
    background: #f6f8fb !important;
    border-radius: 14px !important;
    padding: 12px 16px 12px 44px !important;
    font-size: 14px;
    color: #1c2b3a;
    box-shadow: none !important;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

body.login-modern-page input.form-control::placeholder {
    color: #9aa9bd;
}

body.login-modern-page input.form-control:focus,
body.login-modern-page input#usuario-email:focus,
body.login-modern-page input#password-field:focus {
    background: #fff !important;
    border-color: #2f6fed !important;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.15) !important;
    outline: none;
}

body.login-modern-page #password-field {
    padding-right: 42px !important;
}

body.login-modern-page .toggle-password.field-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa9bd;
    cursor: pointer;
    transition: color .2s ease;
}

body.login-modern-page .toggle-password.field-icon:hover {
    color: #2f6fed;
}

/* ---------- Switch "Salvar Acesso" ---------- */
body.login-modern-page .login-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 20px;
}

body.login-modern-page .login-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex: none;
}

body.login-modern-page .login-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

body.login-modern-page .login-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d7dee8;
    border-radius: 22px;
    transition: background-color .25s ease;
}

body.login-modern-page .login-switch .slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform .25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

body.login-modern-page .login-switch input:checked+.slider {
    background-color: #2f6fed;
}

body.login-modern-page .login-switch input:checked+.slider::before {
    transform: translateX(18px);
}

body.login-modern-page .login-switch-label {
    font-size: 13px;
    font-weight: 600;
    color: #5c6b80;
    margin: 0;
}

/* ---------- Botão Entrar ---------- */
body.login-modern-page #myButton_login {
    width: 100% !important;
    background: linear-gradient(90deg, #2f6fed, #12b3c4) !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 13px 20px !important;
    font-weight: 600;
    letter-spacing: .3px;
    box-shadow: 0 10px 25px -8px rgba(47, 111, 237, 0.65);
    transition: transform .18s ease, box-shadow .18s ease, background-position .3s ease;
    background-size: 160% 100%;
    background-position: 0% 0%;
}

body.login-modern-page #myButton_login:hover {
    background: linear-gradient(90deg, #2f6fed, #12b3c4) !important;
    background-position: 100% 0% !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -8px rgba(47, 111, 237, 0.8);
}

body.login-modern-page #myButton_login:active {
    transform: translateY(0);
}

/* ---------- Rodapé / recuperar senha ---------- */
body.login-modern-page .main-signin-footer {
    margin-top: 18px !important;
}

body.login-modern-page #txt_recuperar {
    color: #5c6b80 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

body.login-modern-page #txt_recuperar::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 1.5px;
    background: #2f6fed;
    transition: width .2s ease;
}

body.login-modern-page #txt_recuperar:hover {
    color: #2f6fed !important;
}

body.login-modern-page #txt_recuperar:hover::after {
    width: 100%;
}

/* ---------- Alerta de erro ---------- */
body.login-modern-page .alert-danger {
    border-radius: 12px;
    border: none;
    background: #fdeceb;
    color: #b3261e;
    font-size: 13px;
}

/* ---------- Modal "Recuperar Senha" ---------- */
/* Este arquivo só é carregado em index.php, então pode mirar o modal
   direto pelo ID sem risco de vazar estilo para o resto do sistema. */
#exampleModal .modal-content {
    border-radius: 18px;
    overflow: hidden;
    border: none;
}

@media (max-width: 576px) {
    body.login-modern-page .card-sigin {
        width: 100%;
    }

    body.login-modern-page .square-box div:nth-of-type(1),
    body.login-modern-page .square-box div:nth-of-type(2),
    body.login-modern-page .square-box div:nth-of-type(3) {
        filter: blur(40px);
        opacity: 0.35;
    }
}
