/* GLPI Polyexcel - Personalização da tela de login */

body.welcome-anonymous:has(form[action*="login.php"]) {
    background: linear-gradient(135deg, #eef3f8 0%, #dce7f2 100%);
    min-height: 100vh;
}

body.welcome-anonymous:has(form[action*="login.php"]) .page-anonymous {
    min-height: 100vh;
}

body.welcome-anonymous:has(form[action*="login.php"]) .container-tight {
    max-width: 1100px !important;
    width: calc(100% - 40px);
}

body.welcome-anonymous:has(form[action*="login.php"]) .glpi-logo {
    display: block;
    width: 280px;
    height: 100px;
    margin: 0 auto 24px;
    background: url('/logo.png') center / contain no-repeat !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) .card {
    border: 0;
    border-radius: 24px;
    box-shadow: 0 20px 65px rgba(22, 47, 77, .13);
    overflow: hidden;
}

body.welcome-anonymous:has(form[action*="login.php"]) .card-body {
    padding: 48px;
}

body.welcome-anonymous:has(form[action*="login.php"]) .card-header {
    border: 0;
    background: transparent;
}

body.welcome-anonymous:has(form[action*="login.php"]) .form-control {
    min-height: 48px;
    border-radius: 12px;
}

body.welcome-anonymous:has(form[action*="login.php"]) .btn-primary {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: #17558b;
    font-weight: 600;
}

body.welcome-anonymous:has(form[action*="login.php"]) .btn-primary:hover {
    background: #103e67;
}

@media (max-width: 768px) {
    body.welcome-anonymous:has(form[action*="login.php"]) .container-tight {
        width: calc(100% - 24px);
    }

    body.welcome-anonymous:has(form[action*="login.php"]) .card-body {
        padding: 24px;
    }
}

/* Ocultar logo superior na tela de login */
body.welcome-anonymous:has(form[action*="login.php"]) .glpi-logo {
    display: none !important;
}

/* Logo oficial Polyexcel - unica e centralizada */
body.welcome-anonymous:has(form[action*="login.php"]) .glpi-logo {
    display: block !important;
    width: 280px !important;
    height: 100px !important;
    margin: 0 auto 24px !important;
    background: url('/logo.png') center / contain no-repeat !important;
}

/* Ocultar logo superior na tela de login */
body.welcome-anonymous:has(form[action*="login.php"]) .glpi-logo {
    display: none !important;
}

/* GLPI Polyexcel - Ajustes visuais */

/* Ocultar link Esqueceu sua senha */
body.welcome-anonymous:has(form[action*="login.php"]) .form-label-description {
    display: none !important;
}

/* Botão Entrar - Laranja Polyexcel */
body.welcome-anonymous:has(form[action*="login.php"]) .btn-primary {
    background-color: #f08c20 !important;
    color: #ffffff !important;
    border: none !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) .btn-primary:hover {
    background-color: #d97810 !important;
    color: #ffffff !important;
}

/* Quadro principal com 50% de transparência */
body.welcome-anonymous:has(form[action*="login.php"]) .card {
    background-color: rgba(255, 255, 255, 0.5) !important;
}


/* Polyexcel - Efeito vidro com maior transparencia */
body.welcome-anonymous:has(form[action*="login.php"]) .card {
    background-color: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

/* Polyexcel - Painel de login compacto e vertical */
body.welcome-anonymous:has(form[action*="login.php"]) .container-tight {
    max-width: 460px !important;
    width: calc(100% - 32px) !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) .card {
    border-radius: 20px !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) .card-body {
    padding: 32px 24px !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) form .row.justify-content-center > .col-md-5 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* Polyexcel - Fundo abstrato corporativo */
body.welcome-anonymous:has(form[action*="login.php"]) {
    background: #27465b url('/fundo-polyexcel.png') center center / cover no-repeat fixed !important;
    min-height: 100vh;
}

/* Manter painel com efeito de vidro */
body.welcome-anonymous:has(form[action*="login.php"]) .card {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Polyexcel - Transparencia premium */
body.welcome-anonymous:has(form[action*="login.php"]) .card {
    background: rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.20) !important;
}

/* Titulos e textos em branco */
body.welcome-anonymous:has(form[action*="login.php"]) .card-header h2,
body.welcome-anonymous:has(form[action*="login.php"]) .form-label,
body.welcome-anonymous:has(form[action*="login.php"]) .form-check-label {
    color: #ffffff !important;
}


/* Polyexcel - Padronizacao dos campos de login */
body.welcome-anonymous:has(form[action*="login.php"]) .form-control,
body.welcome-anonymous:has(form[action*="login.php"]) .form-select,
body.welcome-anonymous:has(form[action*="login.php"]) select {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

/* CAPTCHA ALTCHA - alinhamento e cantos arredondados */
body.welcome-anonymous:has(form[action*="login.php"]) altcha-widget {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    --altcha-border-radius: 12px;
    --altcha-max-width: 100%;
}

/* Manter o botao alinhado aos campos */
body.welcome-anonymous:has(form[action*="login.php"]) .form-footer,
body.welcome-anonymous:has(form[action*="login.php"]) .form-footer .btn {
    width: 100% !important;
}

/* Polyexcel - Checkbox Lembrar de mim */
body.welcome-anonymous:has(form[action*="login.php"]) #login_remember {
    accent-color: #f08c20 !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) #login_remember:checked {
    background-color: #f08c20 !important;
    border-color: #f08c20 !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) #login_remember:focus {
    box-shadow: 0 0 0 3px rgba(240, 140, 32, 0.25) !important;
}

/* Polyexcel - botao Entrar com 50% de transparencia */
body.welcome-anonymous:has(form[action*="login.php"]) button[type="submit"] {
    background-color: rgba(240, 140, 32, 0.50) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

/* Mantem o destaque ao passar o mouse */
body.welcome-anonymous:has(form[action*="login.php"]) button[type="submit"]:hover {
    background-color: rgba(240, 140, 32, 0.70) !important;
}

/* Polyexcel - correcao definitiva do botao Entrar */
body.welcome-anonymous:has(form[action*="login.php"]) .btn-primary[type="submit"] {
    background: rgba(240, 140, 32, 0.50) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) .btn-primary[type="submit"]:hover {
    background: rgba(240, 140, 32, 0.70) !important;
}

/* Polyexcel - restaurar botao Entrar original */
body.welcome-anonymous:has(form[action*="login.php"]) .btn-primary[type="submit"] {
    background: #f08c20 !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

body.welcome-anonymous:has(form[action*="login.php"]) .btn-primary[type="submit"]:hover {
    background: #d97810 !important;
}


/* POLYEXCEL SERVICE HUB - INICIO */
body.welcome-anonymous:has(form[action*="login.php"])
.polyexcel-teams-banner {
    padding: 18px;
    margin: 0 0 22px;
    border-radius: 16px;
    background: rgba(13, 54, 95, 0.90);
    border: 1px solid rgba(255,255,255,0.18);
    color: #ffffff;
    text-align: left;
    box-sizing: border-box;
}

.polyexcel-teams-eyebrow {
    color: #ffab52;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.polyexcel-teams-title {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 10px;
}

.polyexcel-teams-description {
    color: #e1ebf5;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}





@media (max-width: 480px) {
    .polyexcel-teams-banner {
        padding: 14px;
    }

    .polyexcel-teams-title {
        font-size: 16px;
    }
}
/* POLYEXCEL SERVICE HUB - FIM */


/* Polyexcel Service Hub - Logo Teams */
.polyexcel-teams-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.polyexcel-teams-logo {
    flex: 0 0 52px;
}

.polyexcel-teams-logo img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.polyexcel-teams-text {
    flex: 1;
    min-width: 0;
}

@media (max-width: 420px) {
    .polyexcel-teams-content {
        gap: 10px;
    }

    .polyexcel-teams-logo,
    .polyexcel-teams-logo img {
        width: 40px;
        height: 40px;
    }

    .polyexcel-teams-logo {
        flex-basis: 40px;
    }
}


/* POLYEXCEL TEAMS - BANNER COMPACTO V3 */
.polyexcel-teams-banner {
    padding: 16px 18px;
    margin-bottom: 22px;
}
.polyexcel-teams-content {
    display: flex;
    align-items: center;
    gap: 14px;
}
.polyexcel-teams-logo {
    flex: 0 0 52px;
}
.polyexcel-teams-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.polyexcel-teams-text {
    flex: 1;
    min-width: 0;
}
.polyexcel-teams-eyebrow {
    margin-bottom: 6px;
}
.polyexcel-teams-title {
    margin-bottom: 0;
    line-height: 1.3;
}
@media (max-width: 420px) {
    .polyexcel-teams-banner {
        padding: 14px;
    }
    .polyexcel-teams-content {
        gap: 10px;
    }
    .polyexcel-teams-logo {
        flex-basis: 40px;
    }
    .polyexcel-teams-logo img {
        width: 40px;
        height: 40px;
    }
}
