/* Estrada / GLPI: apenas a pagina que contem o formulario de login. */
body.welcome-anonymous:has(#login_name) {
 min-height:100vh;
 background:linear-gradient(90deg,rgba(7,23,48,.72) 0%,rgba(7,23,48,.42) 30%,rgba(7,23,48,.03) 65%),url('./background.png') center center / cover no-repeat fixed !important;
 color:#fff;
}
body:has(#login_name) .page-anonymous { min-height:100vh; }
body:has(#login_name) .page-anonymous > .flex-fill { margin-top:0 !important; min-height:100vh; padding:2rem 0 !important; }
body:has(#login_name) .container-tight {
 width:390px !important; max-width:calc(100% - 40px) !important;
 margin-left:clamp(24px,6vw,110px) !important; margin-right:auto !important; padding:0 !important;
}
body:has(#login_name) .glpi-logo {
 display:block !important; width:100% !important; height:136px !important;
 background: url('./logo.png') center center / 205% auto no-repeat !important;
 mask:none !important; -webkit-mask:none !important; margin-bottom:1.2rem !important;
}
body:has(#login_name) .glpi-logo::before, body:has(#login_name) .glpi-logo::after { content:none !important; }
body:has(#login_name) .main-content-card,
body:has(#login_name) .main-content-card .card-body,
body:has(#login_name) .main-content-card .card-header {
 background:transparent !important; border:0 !important; box-shadow:none !important; color:#fff !important;
}
body:has(#login_name) .main-content-card .card-body { padding:0 !important; }
body:has(#login_name) .main-content-card > .card-header:empty { display:none; }
body:has(#login_name) .main-content-card form > .row > .col-md-5 { flex:0 0 100%; width:100%; max-width:100%; }
body:has(#login_name) .main-content-card form .card-header { padding:0 0 12px !important; min-height:0 !important; }
body:has(#login_name) .main-content-card h2 { color:#fff !important; font-size:1.25rem; }
body:has(#login_name) .form-label,
body:has(#login_name) .form-check-label { color:#fff !important; text-shadow:0 1px 3px #142336; }
body:has(#login_name) .form-control,
body:has(#login_name) .form-select { min-height:44px; background:rgba(255,255,255,.94) !important; color:#172842 !important; border:1px solid rgba(255,255,255,.6); border-radius:7px; }
body:has(#login_name) .form-control:focus { outline:3px solid #ffcf3f; outline-offset:2px; }
body:has(#login_name) .select2-container { max-width:100%; }
body:has(#login_name) .select2-container .select2-selection { background:#fff !important; color:#172842 !important; }
body:has(#login_name) .btn-primary { min-height:46px; background:#ffcb32 !important; border-color:#ffcb32 !important; color:#142d60 !important; font-weight:700; border-radius:7px; }
body:has(#login_name) .btn-primary:hover { background:#ffda65 !important; }
body:has(#login_name) .container-tight a { color:#fff; text-decoration:underline; text-underline-offset:3px; }
body:has(#login_name) .container-tight .text-muted { color:rgba(255,255,255,.85) !important; font-size:12px; }
body:has(#login_name) .form-footer { margin-top:24px; }
@media(max-width:600px) {
 body:has(#login_name) .container-tight { margin-left:20px !important; margin-right:20px !important; }
 body.welcome-anonymous:has(#login_name) { background-attachment:scroll !important; }
}

/* Remove o conteudo original da logo, preservando o fundo Estrada. */
body.welcome-anonymous:has(#login_name) .glpi-logo {
    content: normal !important;
    font-size: 0 !important;
    color: transparent !important;
}

/* ESTRADA — identidade visual do menu interno */
body:not(.welcome-anonymous) .navbar-brand {
    display: block;
    width: 100%;
    max-width: 180px;
    min-width: 0;
    margin-inline: auto;
    container-type: inline-size;
    container-name: estrada-marca;
}

body:not(.welcome-anonymous) .navbar-brand .glpi-logo {
    display: block !important;
    content: normal !important;
    width: 100% !important;
    max-width: 180px !important;
    height: 64px !important;
    margin: 0 auto !important;
    background: url('./logo.png') center / 205% auto no-repeat !important;
    mask: none !important;
    -webkit-mask: none !important;
    font-size: 0 !important;
    color: transparent !important;
}

body:not(.welcome-anonymous) .navbar-brand .glpi-logo::before,
body:not(.welcome-anonymous) .navbar-brand .glpi-logo::after {
    content: none !important;
}

/* Usa o simbolo quando a area da marca fica estreita. */
@container estrada-marca (max-width: 85px) {
    body:not(.welcome-anonymous) .navbar-brand .glpi-logo {
        height: 44px !important;
        background-image: url('./favicon.png') !important;
        background-size: contain !important;
    }
}

/* Menu lateral */
body:not(.welcome-anonymous) .navbar-vertical {
    background: #19377b !important;
    border-right: 1px solid rgba(255,255,255,.12) !important;
}

body:not(.welcome-anonymous) .navbar-vertical .nav-link {
    color: #fff !important;
    border-radius: 6px;
    transition: background-color .15s ease;
}

body:not(.welcome-anonymous) .navbar-vertical .nav-link:hover {
    background-color: rgba(255,255,255,.12) !important;
}

body:not(.welcome-anonymous) .navbar-vertical .nav-link.active,
body:not(.welcome-anonymous) .navbar-vertical .nav-item.active > .nav-link {
    background-color: rgba(255,255,255,.18) !important;
    box-shadow: inset 3px 0 0 #ffcb32;
    font-weight: 600;
}

body:not(.welcome-anonymous) .navbar-vertical .nav-link:focus-visible {
    outline: 2px solid #ffcb32;
    outline-offset: -2px;
}

/* ESTRADA — fundo fotografico da area interna */
body:not(.welcome-anonymous) {
    --estrada-fundo-interno: url('./fundo-tarde.png');
}

body:not(.welcome-anonymous) .page-wrapper {
    min-height: 100vh;
    background:
        linear-gradient(rgba(245,247,251,.78), rgba(245,247,251,.78)),
        var(--estrada-fundo-interno)
        center center / cover no-repeat fixed !important;
}

body:not(.welcome-anonymous) .page-wrapper > .page-body {
    background-color: transparent !important;
}

@media print {
    body:not(.welcome-anonymous) .page-wrapper {
        background: white !important;
    }
}

/* INICIO ESTRADA RECUPERACAO */
body.welcome-anonymous:has(#estrada-password-page) {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(8,23,48,.88), rgba(8,23,48,.55) 42%, rgba(8,23,48,.12)),
        url('./fundo-dia.png') center / cover no-repeat fixed !important;
    color: #fff;
}

body:has(#estrada-password-page) .page-anonymous > .flex-fill {
    min-height: 100vh;
    margin-top: 0 !important;
    padding: 2rem 0 !important;
}

body:has(#estrada-password-page) .container-tight {
    width: 460px !important;
    max-width: calc(100% - 40px) !important;
    margin-left: clamp(20px, 6vw, 110px) !important;
    margin-right: auto !important;
    padding: 0 !important;
}

body:has(#estrada-password-page) .glpi-logo {
    display: block !important;
    content: normal !important;
    width: 100% !important;
    height: 150px !important;
    background: url('./logo.png') center / 205% auto no-repeat !important;
    mask: none !important;
    -webkit-mask: none !important;
    font-size: 0 !important;
    color: transparent !important;
    margin-bottom: 1.25rem !important;
}

body:has(#estrada-password-page) .glpi-logo::before,
body:has(#estrada-password-page) .glpi-logo::after {
    content: none !important;
}

body:has(#estrada-password-page) .main-content-card,
body:has(#estrada-password-page) .main-content-card > .card-header,
body:has(#estrada-password-page) .main-content-card > .card-body {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #fff;
}

body:has(#estrada-password-page) .main-content-card > .card-header:empty {
    display: none;
}

body:has(#estrada-password-page) .main-content-card > .card-body {
    padding: 0 !important;
}

body:has(#estrada-password-page) .card-title,
body:has(#estrada-password-page) .form-label,
body:has(#estrada-password-page) .text-muted {
    color: #fff !important;
}

body:has(#estrada-password-page) .form-control {
    background: #fff !important;
    color: #172842 !important;
    min-height: 44px;
    border-radius: 7px;
}

body:has(#estrada-password-page) .form-control:focus {
    outline: 3px solid #ffcb32;
    outline-offset: 2px;
}

body:has(#estrada-password-page) .form-footer > .btn-primary {
    width: 100%;
    min-height: 46px;
    background: #ffcb32 !important;
    border-color: #ffcb32 !important;
    color: #142d60 !important;
    font-weight: 700;
    border-radius: 7px;
}

body:has(#estrada-password-page) .container-tight > .text-center a {
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body:has(#estrada-password-page) .alert {
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    body.welcome-anonymous:has(#estrada-password-page) {
        background-attachment: scroll !important;
    }
    body:has(#estrada-password-page) .container-tight {
        margin-left: 20px !important;
        margin-right: 20px !important;
    }
}
/* FIM ESTRADA RECUPERACAO */

/* Centraliza somente a recuperacao de senha. */
body.welcome-anonymous:has(#estrada-password-page) .container-tight {
    margin-left: auto !important;
    margin-right: auto !important;
}

body.welcome-anonymous:has(#estrada-password-page) {
    background:
        linear-gradient(rgba(8,23,48,.65), rgba(8,23,48,.65)),
        url('./fundo-dia.png') center / cover no-repeat fixed !important;
}

@media (max-width: 600px) {
    body.welcome-anonymous:has(#estrada-password-page) {
        background-attachment: scroll !important;
    }
}
