.sistema-carregamento-barra {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10020;
    height: 4px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity .16s ease, transform .16s ease;
}

.sistema-carregamento-barra::before {
    content: "";
    display: block;
    width: 38%;
    height: 100%;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, #176b73, #35a5ad, #7c5cff);
    box-shadow: 0 0 14px rgba(23, 107, 115, .45);
    animation: sistema-carregamento-deslocar 1.15s ease-in-out infinite;
}

.sistema-carregamento-barra.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sistema-carregamento-barra.is-determinado::before {
    width: var(--sistema-carregamento-progresso, 0%);
    animation: none;
    transition: width .18s ease;
}

.sistema-carregamento-aviso {
    position: fixed;
    top: 16px;
    right: 18px;
    z-index: 10019;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(390px, calc(100vw - 32px));
    padding: 10px 14px;
    border: 1px solid rgba(23, 107, 115, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .97);
    color: #172026;
    box-shadow: 0 10px 30px rgba(23, 32, 38, .16);
    font: 600 14px/1.35 Arial, Helvetica, sans-serif;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .16s ease, transform .16s ease;
}

.sistema-carregamento-aviso.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sistema-carregamento-spinner {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 3px solid rgba(23, 107, 115, .2);
    border-top-color: #176b73;
    border-radius: 50%;
    animation: sistema-carregamento-girar .78s linear infinite;
}

.sistema-carregamento-overlay {
    position: fixed;
    inset: 0;
    z-index: 10018;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease, visibility .16s ease;
}

.sistema-carregamento-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.sistema-carregamento-painel {
    width: min(430px, 100%);
    padding: 26px;
    border: 1px solid #d7dee5;
    border-radius: 14px;
    background: #fff;
    color: #172026;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}

.sistema-carregamento-painel .sistema-carregamento-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 17px;
    border-width: 4px;
}

.sistema-carregamento-titulo {
    display: block;
    margin: 0;
    font-size: 19px;
    line-height: 1.35;
}

.sistema-carregamento-detalhe {
    display: block;
    margin-top: 8px;
    color: #60707d;
    font-size: 14px;
    line-height: 1.5;
}

body.sistema-carregamento-bloqueado {
    cursor: progress;
}

@keyframes sistema-carregamento-deslocar {
    0% { transform: translateX(-115%); }
    55% { transform: translateX(145%); }
    100% { transform: translateX(270%); }
}

@keyframes sistema-carregamento-girar {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .sistema-carregamento-aviso {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        justify-content: center;
        border-radius: 9px;
    }

    .sistema-carregamento-painel {
        padding: 22px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sistema-carregamento-barra,
    .sistema-carregamento-aviso,
    .sistema-carregamento-overlay,
    .sistema-carregamento-barra.is-determinado::before {
        transition: none;
    }

    .sistema-carregamento-barra::before,
    .sistema-carregamento-spinner {
        animation-duration: 2.4s;
    }
}
