* {
    box-sizing: border-box;
}

html {
    min-height: 100%;

    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: "Segoe UI", Arial, sans-serif;

    background: var(--color-fondo);
    color: var(--color-texto);
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: inherit;
}

.oculto {
    display: none !important;
}

.pantalla-carga {
    position: fixed;

    inset: 0;

    z-index: 20000;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    gap: 16px;

    background: var(--color-fondo);

    opacity: 1;
    visibility: visible;

    pointer-events: auto;

    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

html.fireadmin-listo
.pantalla-carga {
    opacity: 0;
    visibility: hidden;

    pointer-events: none;
}

.pantalla-estado {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    gap: 16px;

    background: var(--color-fondo);
}

.spinner {
    width: 38px;
    height: 38px;

    border:
        4px solid
        var(--color-borde);

    border-top-color:
        var(--color-primario);

    border-radius: 50%;

    animation:
        girar
        0.8s
        linear
        infinite;
}

@keyframes girar {
    to {
        transform: rotate(360deg);
    }
}

.estado-card {
    max-width: 460px;

    margin: 20px;
    padding: 32px;

    background: var(--color-panel);

    border:
        1px solid
        var(--color-borde);

    border-radius: 12px;

    text-align: center;
}

.estado-card a {
    display: inline-block;

    margin-top: 16px;

    padding:
        10px
        16px;

    background: var(--color-primario);

    color: white;

    border-radius: 7px;

    text-decoration: none;
}

.alerta-global {
    min-width: 280px;

    max-width:
        min(
            420px,
            calc(100vw - 36px)
        );

    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 30000;

    padding:
        13px
        16px;

    display: flex;
    align-items: center;

    gap: 11px;

    border:
        1px solid
        transparent;

    border-radius: 10px;

    box-shadow:
        0
        12px
        35px
        rgba(0, 0, 0, 0.18);

    font-size: 13px;
    font-weight: 600;

    opacity: 0;

    transform:
        translateY(12px);

    pointer-events: none;

    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.alerta-global[hidden] {
    display: none;
}

.alerta-global.visible {
    opacity: 1;

    transform:
        translateY(0);
}

.alerta-global.exito {
    border-color: #b8e0c7;

    background: #e5f5eb;
    color: #146c3a;
}

.alerta-global.error {
    border-color: #efbbbb;

    background: #fde7e7;
    color: #9b1c1c;
}

.alerta-global-icono {
    width: 24px;
    height: 24px;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(
            255,
            255,
            255,
            0.65
        );

    font-size: 13px;
    font-weight: 900;
}

.alerta-global-texto {
    min-width: 0;

    line-height: 1.4;
}

@media (max-width: 650px) {

    .alerta-global {
        right: 16px;
        bottom: 16px;
        left: 16px;

        min-width: 0;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .spinner {
        animation: none;
    }

    .pantalla-carga,
    .alerta-global {
        transition: none;
    }
}
