* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    margin: 0 !important;
    overflow: hidden;
    background: #101820 !important;
    font-family: Arial, sans-serif;
}

body.welcome-anonymous {
    display: block !important;
}

#bg-video {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover !important;
    z-index: -2 !important;
    opacity: 0.9 !important;
}

.page-anonymous,
.page-anonymous > .flex-fill {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.15) !important;
}

.page-anonymous > .flex-fill,
.container-tight {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.container-tight {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.container-tight > .text-center {
    display: none !important;
}

.main-content-card,
.main-content-card .card-body,
.main-content-card .card-header {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.main-content-card .card-header {
    display: none !important;
}

.login-container {
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
}

.login-overlay {
    width: auto !important;
    min-height: auto !important;
    padding: 46px 58px !important;
    border-radius: 18px !important;
    background: rgba(40, 48, 48, 0.42) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35) !important;
}

.login-card {
    width: 370px !important;
    max-width: 88vw !important;
    padding: 32px 40px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
    text-align: center !important;
}

.login-logo img {
    display: block;
    max-width: 240px;
    width: 80%;
    margin: 0 auto 22px auto;
}

.login-card h2 {
    margin: 0 0 24px 0;
    color: #333;
    font-size: 28px;
    font-weight: 700;
}

.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #444;
    font-size: 14px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input,
select {
    width: 100%;
    height: 42px;
    padding: 8px 38px 8px 12px;
    border: 1px solid #ff4050;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 15px;
}

.input-wrapper.right-icon i {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
    pointer-events: none;
}

.form-group.checkbox {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: right;
    margin: 14px 0 22px 0;
}

.form-group.checkbox input {
    justify-self: center;
    width: 16px;
    height: 16px;
}

.form-group.checkbox label {
    margin: 0;
    font-size: 14px;
}

.form-actions button {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 5px;
    background: #1976f3;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.login-footer {
    margin-top: 18px;
    color: #666;
    font-size: 14px;
}

.login-footer a {
    color: #1976f3;
    text-decoration: none;
}

.glpi-login-error {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #cc0000;
    border-radius: 6px;
    background: #ffe0e0;
    color: #900;
    text-align: left;
}

@media (max-width: 600px) {
    .login-overlay {
        padding: 22px !important;
        width: 94vw !important;
    }

    .login-card {
        width: 100% !important;
        padding: 28px 24px !important;
    }

    .login-card h2 {
        font-size: 24px;
    }
}

/* Corregir capa del video */
#bg-video {
    z-index: 0 !important;
    opacity: 1 !important;
}

.page-anonymous {
    position: relative !important;
    z-index: 1 !important;
    background: rgba(0, 0, 0, 0.25) !important;
}

.page-anonymous > .flex-fill {
    background: transparent !important;
}

.login-container,
.login-overlay,
.login-card {
    position: relative !important;
    z-index: 2 !important;
}

html,
body {
    background: transparent !important;
}

/* ConsolCargo: opciones del selector de autenticacion */
.login-card select option:checked,
.login-card select option:hover,
.login-card select option:focus {
    background: #6ee7e0 !important;
    color: #0f172a !important;
}

.login-card select:focus {
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25) !important;
    outline: none !important;
}

/* Forzar color agua marina en opciones del selector */
select option,
.login-card select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

select option:checked,
select option:hover,
select option:focus,
.login-card select option:checked,
.login-card select option:hover,
.login-card select option:focus {
    background-color: #6ee7e0 !important;
    color: #0f172a !important;
    box-shadow: 0 0 0 9999px #6ee7e0 inset !important;
}

select:focus,
.login-card select:focus {
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25) !important;
    outline: none !important;
}


/* Selector nativo */
.login-card select {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 12px !important;
    border: 1px solid #d9dee8 !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 15px !important;
}

.login-card select:focus {
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25) !important;
    outline: none !important;
}


/* Selector nativo */
.login-card select {
    display: block !important;
    width: 100% !important;
    height: 42px !important;
    padding: 8px 12px !important;
    border: 1px solid #d9dee8 !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 15px !important;
}

.login-card select:focus {
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25) !important;
    outline: none !important;
}
