/* Document   : login-modern
    Description: Premium modern login screen with Animated Earth Background
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #152f60; /* Azul do INTERPI */
    --accent-color: #2d6a4f;  /* Verde Terra */
    --text-main: #1a1a2e;
    --text-muted: #64748b;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-radius: 20px;
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body.login-page {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.login-page {
    font-family: 'Inter', sans-serif !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-color: #050505;
}

/* =========================================
   FUNDO ANIMADO (MAPA / TERRAS)
   ========================================= */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-image: url('../resources/assets/images/map_bg.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.9) grayscale(0.5); /* Mapa mais claro e neutro */
    animation: zoomMap 40s infinite alternate ease-in-out;
}

/* Overlay mais leve para o tema claro */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.4) 100%);
}

@keyframes zoomMap {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* =========================================
   CARTÃO DE LOGIN (PREMIUM GLASSMORPHISM)
   ========================================= */
.login-wrapper {
    width: 100%;
    max-width: 520px; /* Mais larga como solicitado */
    padding: 20px;
    z-index: 10;
}

.frm-single {
    background: rgba(255, 255, 255, 0.9); /* Mais sólido para melhor leitura */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: var(--border-radius);
    padding: 55px 50px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.frm-single:hover {
    transform: translateY(-5px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
}

/* Cabeçalho e Logos */
.login-header {
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
  
}

.logo-container img {
    max-height: 100px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.login-header h2 {
    color: #64748b;
    font-size: 28px;
    font-weight: 700;
    margin: 15px 0 10px 0;
    letter-spacing: -0.5px;
}

.login-header h2.error-title {
    color: #ef4444; /* Vermelho vibrante para erros */
}

.login-header p {
    color: #64748b;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

/* =========================================
   INPUTS E COMPONENTES PRIMEFACES
   ========================================= */
.field-container {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.login-page .ui-inputfield {
    width: 100% !important;
    border-radius: 14px !important;
    padding: 18px 20px !important;
    padding-right: 50px !important;
    border: 2px solid #cbd5e1 !important; /* Borda mais forte */
    background: #ffffff !important;
    font-size: 16px !important;
    color: #1e293b !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.login-page .ui-inputfield::placeholder {
    color: #94a3b8 !important;
}

.login-page .ui-inputfield:focus {
    border-color: #152f60 !important;
    box-shadow: 0 0 0 4px rgba(21, 47, 96, 0.1) !important;
}

.field-container i.fa.field-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
    pointer-events: none;
}

.field-container i.fa.toggle-password {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field-container i.fa.toggle-password:hover {
    color: #152f60;
    transform: translateY(-50%) scale(1.1);
}

.login-page #password.ui-inputfield {
    padding-right: 85px !important;
}

.login-page .ui-inputfield:focus ~ i.fa {
    color: #152f60;
}

/* Botão de Entrar */
.login-page button.ui-button {
    width: 100% !important;
    height: 56px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important; /* Azul mais vivo */
    border: none !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    cursor: pointer !important;
    margin-top: 20px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.login-page button.ui-button:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.5) !important;
}

.login-page button.ui-button:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.login-exit-link {
    text-decoration: none;
    color: #152f60;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.login-exit-link:hover {
    color: #0d1e3d;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .frm-single {
        padding: 40px 30px;
    }
    .login-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 15px;
    }
    .frm-single {
        padding: 30px 20px;
    }
    .login-header h2 {
        font-size: 20px;
    }
    .login-header p {
        font-size: 14px;
    }
    .logo-container img {
        max-height: 70px;
    }
    .login-page .ui-inputfield {
        padding: 15px 18px !important;
        font-size: 15px !important;
    }
    .login-page button.ui-button {
        height: 50px !important;
        font-size: 16px !important;
    }
}