@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   GERAL
   ========================================================================== */

html,
body{
    width:100%;
    min-height:100%;
    margin:0;
    padding:0;
    overflow-x:hidden;
    font-family:'Inter',sans-serif;
    background:#fbf9f6;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{

    --altura-acessibilidade:0px;

    --cor-primaria:#490e15;
    --cor-secundaria:#691010;
    --cor-destaque:#981915;

    --cor-texto:#000;
    --cor-texto-secundario:#9ca3af;

    --cor-borda:#e6e6e6;

    --radius:28px;

}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.login-wrapper{

    width:100%;
    height:calc(100vh - var(--altura-acessibilidade));

    margin-top:var(--altura-acessibilidade);

    display:flex;

    background:#fbf9f6;

}

/* ==========================================================================
   PAINEL ESQUERDO
   ========================================================================== */

.login-illustration{

    flex:1 1 60%;

    position:relative;

    display:flex;
    align-items:center;
    justify-content:center;

    overflow:hidden;

    padding:clamp(24px,4vw,72px);

    background:linear-gradient(
        to bottom right,
        var(--cor-primaria) 10%,
        var(--cor-secundaria) 50%,
        var(--cor-destaque) 80%
        );

    animation:slideLeft .9s cubic-bezier(.77,0,.18,1);

}

.illustration-content{

    position:relative;

    z-index:2;

    width:100%;
    max-width:900px;

    color:#fff;

}

.top-content{

    display:flex;

    align-items:center;
    justify-content:center;

    gap:24px;

    margin-bottom:22px;

}

.left-info{

    flex:0 0 55%;
    max-width:55%;

}

.right-hero{

    flex:0 0 45%;
    max-width:45%;

    display:flex;
    align-items:center;
    justify-content:center;

}

/* ==========================================================================
   IMAGENS
   ========================================================================== */

.hero-image{

    width:auto;

    max-width:100%;

    max-height:35vh;

    filter:drop-shadow(0 25px 40px rgba(0,0,0,.45));

    animation:floatHero 2s ease-in-out infinite;

}

/* ==========================================================================
   TEXTOS
   ========================================================================== */

.illustration-title{

    font-size:clamp(34px,3rem,64px);

    line-height:.95;

    font-weight:800;

    letter-spacing:-1px;

    margin-bottom:18px;

    animation:fadeUp .7s .55s ease both;

}

.title-small{

    font-size:.68em;

    font-weight:700;

}

.title-big{

    font-size:1em;

    font-weight:800;

}

.illustration-text{

    max-width:520px;

    color:rgba(255,255,255,.78);

    font-size:clamp(14px,1.1vw,20px);

    line-height:1.7;

    margin-bottom:28px;

    animation:fadeUp .7s .7s ease both;

}

/* ==========================================================================
   CARDS
   ========================================================================== */

.feature-list{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:10px;

}

.feature-item{

    display:flex;

    gap:14px;

    padding:18px;

    min-height:100px;

    border-radius:18px;

    background:rgba(255,255,255,.06);

    border:1px solid rgba(255,255,255,.08);

    backdrop-filter:blur(18px);

    transition:.25s;

}

.feature-item:hover{

    transform:translateY(-4px);

    background:rgba(255,255,255,.10);

}

.feature-icon{

    width:48px;
    height:48px;

    min-width:48px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:14px;

    background:linear-gradient(135deg,#c1121f,#7f1d1d);

    box-shadow:0 10px 24px rgba(193,18,31,.35);

}

.feature-icon i{

    color:#fff;

    font-size:18px;

}

.feature-item strong{

    display:block;

    margin-bottom:4px;

    font-size:15px;

    color:#fff;

}

.feature-item p{

    color:#d6d9df;

    font-size:13px;

    line-height:1.55;

}

/* ==========================================================================
   PAINEL DIREITO
   ========================================================================== */

.login-form-section{

    flex:1 1 40%;

    display:flex;

    align-items:center;
    justify-content:center;

    padding:30px;

    overflow-y:auto;

    background:#fbf9f6;

    animation:slideRight .9s cubic-bezier(.77,0,.18,1);

}

.login-container {
    width: 100%;
    max-width: 450px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow:
        0 25px 55px rgba(0,0,0,.40),
        inset 0 1px 0 rgba(255,255,255,.05);
}

/* ==========================================================================
   CABEÇALHO LOGIN
   ========================================================================== */

.titulo{
    margin:-20px -20px 20px;
    display:flex;
    align-items:center;
    gap:16px;
}

.titulo-logo{
    width:72px;
    height:72px;
    border-radius:50%;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;

}

.titulo-logo img{
    width:100%;
    height:100%;
    border-radius:50%;
    object-fit:cover;

}

.titulo-texto{
    display:flex;
    flex-direction:column;
}

.titulo-texto .empresa{
    color:#000;
    font-size:14px;
    font-weight:700;
}

.titulo-texto .filial{
    margin-top:5px;
    color:#9ca3af;
    font-size:13px;
}

.login-container h3{
    font-size:25px;
    font-weight:800;
    color:#000;
    margin-bottom:8px;
    margin-top:-20px;

}

.login-subtitle{

    color:#9ca3af;

    font-size:14px;

}

/* ==========================================================================
   FORMULÁRIO
   ========================================================================== */

.input-wrapper{
    margin-bottom:15px;
}

.input-wrapper label{
    display:block;
    margin-bottom:0px;
    font-size:14px;
    font-weight:600;
}

label[for="formLogin:senha"]{
    margin-top:14px;
}

.input-icon-wrapper{
    position:relative;
    width:100%;

}

/* ==========================================================================
   ÍCONES
   ========================================================================== */

.input-icon{
    position:absolute;
    left:14px;
    top:50%;
    transform:translateY(-50%);
    color:#6b7280;
}

/* Ícone de mostrar/ocultar senha do PrimeFaces */
.ui-password-icon {
    font-family: 'primeicons' !important;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    z-index: 30;
}

.ui-password-icon::before {
    content: "\e966"; /* código do ícone pi-eye */
}

/* Quando a senha está mascarada (oculta), muda pra "eye-slash" */
.ui-password-masked .ui-password-icon::before {
    content: "\e965"; /* código do ícone pi-eye-slash */
}

.ui-password-icon:hover {
    color: #490e15;
}

/* ==========================================================================
   PRIMEFACES PASSWORD
   ========================================================================== */

.input-icon-wrapper .ui-password{
    display:block;
    width:100%;

}

.input-icon-wrapper .ui-password input{
    width:100%;

}

/* ==========================================================================
   CAMPOS
   ========================================================================== */

/* Sobrescreve o tema Poseidon */

.login-container .ui-inputfield,
.login-container .ui-inputtext,
.login-container .ui-password input,
.login-container input[type="password"]{

    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;

    width:100% !important;
    height:54px !important;
    min-height:54px !important;
    max-height:54px !important;
    box-sizing:border-box !important;
    padding-left:42px !important;
    padding-right:42px !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
    line-height:54px !important;
    background:#fff !important;
    color:#000 !important;
    border:2px solid #e6e6e6 !important;
    border-radius:12px !important;
    font-size:14px !important;
    box-shadow:0 3px 8px rgba(0,0,0,.05);
    transition:.25s;
}

.login-container .ui-inputfield:focus,
.login-container .ui-inputtext:focus,
.login-container .ui-password input:focus,
.login-container input[type="password"]:focus{

    border-color:#c1121f !important;
    box-shadow:0 0 0 4px rgba(193,18,31,.18) !important;

}

/* Remove estilos internos do PrimeFaces */

.login-container input{
    outline:none;

}

.login-container .ui-password{
    display:block !important;
    width:100% !important;
    border:none !important;
    background:none !important;
}

/* ==========================================================================
   BOTÃO
   ========================================================================== */

.botaoLogin {
    width: 100% !important;
    height: 42px !important;
    margin-top: 16px !important;

    border: none !important;
    border-radius: 12px !important;

    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;

    transition: transform .25s ease, box-shadow .25s ease;
}

.botaoLogin:hover {
    transform: translateY(-2px);
}

/* ===========================
   Botão Entrar
   =========================== */

.btnAcessar {
    background: linear-gradient(
        to bottom right,
        #490e15 10%,
        #691010 50%,
        #981915 100%
    ) !important;
}

.btnAcessar:hover {
    box-shadow: 0 20px 35px rgba(105, 16, 16, .35);
}

/* ===========================
   Botão Cadastrar
   =========================== */

.btnCadastrar {
    background: linear-gradient(
        to bottom right,
        #1e3a8a 0%,
        #24589c 50%,
        #1d4ed8 100%
    ) !important;
}

.btnCadastrar:hover {
    box-shadow: 0 20px 35px rgba(30, 58, 138, .35);
}

/* ===========================
   Botão Voltar
   =========================== */

.btnVoltar {
    background: linear-gradient(
        to bottom right,
        #2b3038 0%,
        #3d4652 50%,
        #566170 100%
    ) !important;
}

.btnVoltar:hover {
    box-shadow: 0 20px 35px rgba(43, 48, 56, .35);
}

.tipoAcesso.ui-selectonebutton {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
}

.tipoAcesso.ui-selectonebutton .ui-button {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 100px;
    height: 28px;
    border-radius: 10px !important;
    color: #5f6368 !important;
    opacity: 1 !important;
}

.tipoAcesso.ui-selectonebutton .ui-button span.ui-button-text {
    color: #fff !important;
    font-weight: 600;
}

.tipoAcesso.ui-selectonebutton .ui-button.ui-state-active {
    /*background: linear-gradient(#22c55e,#16a34a) !important;*/
    background:linear-gradient(
        to bottom right,
        var(--cor-primaria) 10%,
        var(--cor-secundaria) 50%,
        var(--cor-destaque) 80%
        );
}




/* ==========================================================================
   RECUPERAR SENHA
   ========================================================================== */

.recuperar-senha{
    display:block;
    margin-top:-8px;
    margin-bottom: 1px;
    text-align:right;
    color:#000;
    text-decoration:none;
    font-size:12px;
    font-weight:600;
}

.login-qrcode:hover,
.recuperar-senha:hover{
    text-decoration:underline;
}

.login-qrcode{
    display:block;
    margin-top:20px;
    text-align:center;
    color:#000;
    text-decoration:none;
    font-size:12px;
    font-weight:600;
}


/* ==========================================================================
   RODAPÉ
   ========================================================================== */

.rodape{
    margin-top:15px;
    display:flex;
    align-items:center;
    justify-content: center;
    gap:-10px;
}

.rodape img{
    height:30px;
    width:auto;
}

.rodape-texto{
    text-align: center;
    display:flex;
    flex-direction:column;
    font-size:12px;
}

.rodape-texto p{
    margin:0px;
}

.versao-sistema{
    text-align: left;
    display:flex;
    margin-top: 1px;
    margin-bottom: -10px;
    font-size:11px;
}

.versao-sistema i{
   margin-right: 4px;
}

/* Dialog QRCode */

.dialogQRCode {
    border: none !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 18px 45px rgba(0,0,0,.28) !important;
}

/* Cabeçalho */
.dialogQRCode .ui-dialog-titlebar {
    background: linear-gradient(135deg, #4c020d 0%, #6d020a 50%, #980901 100%) !important;
    border: none !important;
    padding: 18px 22px !important;
    position: relative;
}

/* Centraliza o título */
.dialogQRCode .ui-dialog-title {
    width: 100%;
    display: block;
    text-align: center;
    color: #FFF !important;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .5px;
    margin: 0 !important;
}

/* Botão fechar */
.dialogQRCode .ui-dialog-titlebar-close{
    position:absolute !important;
    top:50% !important;
    right:12px !important;

    width:34px !important;
    height:34px !important;

    margin-top:-17px !important;
    padding:0 !important;
    border:none !important;
    border-radius:50% !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    background:rgba(255,255,255,.18) !important;
    transition:.25s;
}

.dialogQRCode .ui-dialog-titlebar-close:hover{
    background:rgba(255,255,255,.30) !important;
    transform:scale(1.08);
}

/* Centraliza o X */
.dialogQRCode .ui-dialog-titlebar-close .ui-icon{
    position:static !important;
    margin:0 !important;
    left:auto !important;
    top:auto !important;

    width:16px !important;
    height:16px !important;

    transform:none !important;
}

/* Conteúdo */
.dialogQRCode .ui-dialog-content {
    background: #f7f8fb !important;
    padding: 28px !important;
    text-align: center;
}

/* Caixa do QRCode */
.qrcode-box {
    background: #FFF;
    border-radius: 16px;
    padding: 22px;
    display: inline-block;
    box-shadow:
        0 8px 25px rgba(0,0,0,.08),
        inset 0 0 0 1px rgba(0,0,0,.05);
}

.qrcode-box h3 {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    color: #444;
}

/* QRCode */
#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 180px;
    min-height: 180px;
}

.dialogQRCode.ui-dialog {
    animation: dialogQRCode .25s ease-out;
}



/* ==========================================================================
   ANIMAÇÕES
   ========================================================================== */

@keyframes floatHero {
    0%, 100% {
        transform: translateY(0) rotate(0deg); /* Começa reta na base */
    }

    50% {
        transform: translateY(0px) rotate(-1deg); /* Sobe e inclina levemente para a esquerda */
    }
}

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

@keyframes slideLeft{

    from{

        opacity:0;

        transform:translateX(-80px);

    }

    to{

        opacity:1;

        transform:translateX(0);

    }

}

@keyframes slideRight{

    from{

        opacity:0;

        transform:translateX(80px);

    }

    to{

        opacity:1;

        transform:translateX(0);

    }

}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

@media (max-width:1024px){

    .login-wrapper{

        flex-direction:column;

        height:auto;

    }

    .login-illustration{

        display:none;

    }

    .login-form-section{

        width:100%;

        padding:24px;

    }

}

/* ==========================================================================
   IMPRESSÃO
   ========================================================================== */

@media print{

    .login-illustration{
        display:none;
    }

    .login-container{

        box-shadow:none;

        border:1px solid #000;

    }

}



@keyframes dialogQRCode {

    from{
        opacity:0;
        transform:translateY(-25px) scale(.95);
    }

    to{
        opacity:1;
        transform:translateY(0) scale(1);
    }

}
