/* Global loader */
#global-loader {
    position: fixed;
    z-index: 50000;
    background: var(--bs-body-bg, #fff);
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#global-loader.aida-loader--hidden {
    opacity: 0;
    pointer-events: none;
}

.aida-loader-img {
    position: absolute;
    right: 0;
    bottom: 0;
    top: 43%;
    left: 0;
    margin: 0 auto;
    text-align: center;
}

/* Miscellaneous
******************************************************************************* */
.misc-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    text-align: center;
}

/* Otras vistas misc (p. ej. 403) mantienen el bloque centrado en viewport completo. */
.misc-wrapper:not(.aida-misc-page) {
    min-block-size: 100vh;
}

/* Pantallas tipo 404 dentro del admin: llenar solo el hueco bajo el navbar (sin 100vh + footer = scroll). */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page:has(.aida-misc-page) {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .content-wrapper:has(.aida-misc-page) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.misc-wrapper.aida-misc-page {
    flex: 1 1 auto;
    min-height: 0;
    justify-content: center;
    padding-block: 0.5rem;
}

.aida-misc-code {
    font-size: clamp(3rem, 10vw, 5.5rem);
    line-height: 1;
    font-weight: 600;
}

.aida-misc-illustration {
    max-height: min(28vh, 200px);
    width: auto;
    object-fit: contain;
}

@media (min-width: 992px) {
    .aida-misc-illustration {
        max-height: min(32vh, 220px);
    }
}

.misc-bg {
    position: absolute;
    inline-size: 100%;
    inset-block-end: 0;
    inset-inline-start: 0;
}

.misc-object {
    position: absolute;
    z-index: 1;
    inset-block-end: 8%;
    inset-inline-start: 16%;
}
.misc-object:dir(rtl) {
    inset-inline-start: 10%;
}

.misc-model {
    position: relative;
    inset-block-end: 3rem;
}

/* Formularios outline (Vuexy): el tema pone en el label
   `color: var(--bs-form-validation-border-color)` junto a `.is-valid`, pero esa variable
   la hereda el label desde `form` (valor por defecto = inválido/rojo), no desde el input.
   Forzamos el mismo verde/rojo que el borde; el asterisco (.text-danger) hereda con !important. */
form .form-floating.form-floating-outline > .form-control.is-valid ~ label,
form .form-floating.form-floating-outline > .form-select.is-valid ~ label {
    color: var(--bs-form-valid-border-color, var(--bs-success)) !important;
}

form .form-floating.form-floating-outline > .form-control.is-valid ~ label .text-danger,
form .form-floating.form-floating-outline > .form-select.is-valid ~ label .text-danger {
    color: inherit !important;
}

form .form-floating.form-floating-outline > .form-control.is-invalid ~ label,
form .form-floating.form-floating-outline > .form-select.is-invalid ~ label {
    color: var(--bs-form-invalid-border-color, var(--bs-danger)) !important;
}

form .form-floating.form-floating-outline > .form-control.is-invalid ~ label .text-danger,
form .form-floating.form-floating-outline > .form-select.is-invalid ~ label .text-danger {
    color: inherit !important;
}

/* Perfil > Seguridad: historial de logins — bloque y celdas más compactos verticalmente */
.aida-profile-login-history-card {
    margin-block-end: 0;
}

.aida-profile-login-history-card .aida-profile-login-history-table {
    --aida-login-history-font-size: 0.8125rem;

    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
        'Courier New', monospace;
    font-size: var(--aida-login-history-font-size);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.aida-profile-login-history-card .aida-profile-login-history-table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color);
}

.aida-profile-login-history-card .aida-profile-login-history-table tbody td {
    vertical-align: middle;
}

.aida-profile-login-history-card .aida-profile-login-history-table > :not(caption) > * > * {
    padding-block: 0.28rem;
    padding-inline: 0.5rem;
}

.aida-profile-login-history-card .aida-profile-login-history-table > thead > * > * {
    padding-block: 0.35rem;
}

.aida-profile-login-history-card .table-responsive {
    margin-block: 0;
}

.aida-profile-login-history-card .aida-profile-login-history-table .icon-base.ri {
    font-size: 1.05rem;
    line-height: 1;
}
