/* ==========================================================================
   UP MOSAICO - ESTILOS E ANIMAÇÕES DA LOGO VETORIAL 1:1
   Modos: .mode-build (Montagem), .mode-wave (Onda Mosaico), .mode-pulse (Pulso)
   ========================================================================== */

.upmosaico-logo-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.upmosaico-logo-box {
    position: relative;
    width: var(--logo-size, 180px);
    aspect-ratio: 500 / 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upmosaico-aura {
    position: absolute;
    width: 75%;
    height: 75%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(51, 217, 0, 0.28) 0%, rgba(0, 117, 59, 0.12) 50%, transparent 72%);
    filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.upmosaico-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.tile,
.up-letter,
.m-letter,
.bottom-arc,
.shield-base {
    transform-box: fill-box;
    transform-origin: center;
}

/* ==========================================================================
   MODO 1: ONDA MOSAICO (.mode-wave) - Usado na Página de Login
   ========================================================================== */
.mode-wave .upmosaico-aura {
    opacity: 0.55;
    animation: auraBreathe 3.2s ease-in-out infinite;
}

.mode-wave .tile {
    animation: tileWavePulse 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.mode-wave .t3  { animation-delay: 0.00s; }
.mode-wave .t2  { animation-delay: 0.14s; }
.mode-wave .t4  { animation-delay: 0.22s; }
.mode-wave .t1  { animation-delay: 0.30s; }
.mode-wave .t5  { animation-delay: 0.38s; }
.mode-wave .t6  { animation-delay: 0.48s; }
.mode-wave .t7  { animation-delay: 0.58s; }
.mode-wave .t8  { animation-delay: 0.72s; }
.mode-wave .t9  { animation-delay: 0.86s; }
.mode-wave .t10 { animation-delay: 0.98s; }

@keyframes tileWavePulse {
    0%, 100% {
        filter: brightness(1) saturate(1);
        transform: scale(1);
    }
    30% {
        filter: brightness(1.24) saturate(1.12) drop-shadow(0 0 8px rgba(51, 217, 0, 0.35));
        transform: scale(1.018);
    }
    65% {
        filter: brightness(1) saturate(1);
        transform: scale(1);
    }
}

.shimmer-Sweep {
    opacity: 0;
}

.mode-wave .shimmer-Sweep {
    opacity: 1;
    animation: diagonalShimmer 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes diagonalShimmer {
    0% {
        transform: translate(-650px, -650px);
    }
    75%, 100% {
        transform: translate(650px, 650px);
    }
}

.mode-wave .up-letters {
    animation: upElevationPulse 2.6s ease-in-out infinite;
}

@keyframes upElevationPulse {
    0%, 100% {
        filter: drop-shadow(0 2px 4px rgba(16, 36, 24, 0.18));
    }
    50% {
        filter: drop-shadow(0 8px 18px rgba(16, 36, 24, 0.45)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
    }
}

.mode-wave .m-letter {
    animation: mosaicoLetterWave 2.6s ease-in-out infinite;
}

.mode-wave .m-letter-0 { animation-delay: 0.10s; }
.mode-wave .m-letter-1 { animation-delay: 0.22s; }
.mode-wave .m-letter-2 { animation-delay: 0.34s; }
.mode-wave .m-letter-3 { animation-delay: 0.46s; }
.mode-wave .m-letter-4 { animation-delay: 0.58s; }
.mode-wave .m-letter-5 { animation-delay: 0.70s; }
.mode-wave .m-letter-6 { animation-delay: 0.82s; }

@keyframes mosaicoLetterWave {
    0%, 70%, 100% {
        transform: translateY(0);
        filter: drop-shadow(0 0 0px rgba(71, 168, 66, 0));
        fill: #ffffff;
    }
    35% {
        transform: translateY(-5px);
        filter: drop-shadow(0 3px 6px rgba(51, 217, 0, 0.45));
        fill: #eaffea;
    }
}

/* ==========================================================================
   MODO 2: MONTAGEM (.mode-build) - Usado nos Loadings do Sistema
   ========================================================================== */
.mode-build .shield-base {
    animation: buildShieldBase 4.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes buildShieldBase {
    0% {
        opacity: 0;
        transform: scale(0.94);
    }
    12%, 82% {
        opacity: 1;
        transform: scale(1);
    }
    95%, 100% {
        opacity: 0;
        transform: scale(0.96);
    }
}

.mode-build .t1,
.mode-build .t2,
.mode-build .t3,
.mode-build .t4,
.mode-build .t5,
.mode-build .t6 {
    animation: slideTileNW 4.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.mode-build .t7,
.mode-build .t8,
.mode-build .t9,
.mode-build .t10 {
    animation: slideTileSE 4.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.mode-build .t3  { animation-delay: 0.04s; }
.mode-build .t2  { animation-delay: 0.10s; }
.mode-build .t1  { animation-delay: 0.16s; }
.mode-build .t4  { animation-delay: 0.14s; }
.mode-build .t5  { animation-delay: 0.20s; }
.mode-build .t6  { animation-delay: 0.26s; }
.mode-build .t7  { animation-delay: 0.24s; }
.mode-build .t8  { animation-delay: 0.32s; }
.mode-build .t9  { animation-delay: 0.40s; }
.mode-build .t10 { animation-delay: 0.46s; }

@keyframes slideTileNW {
    0%, 4% {
        opacity: 0;
        transform: translate(-65px, -65px) scale(0.88);
    }
    24%, 80% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    94%, 100% {
        opacity: 0;
        transform: translate(-35px, -35px) scale(0.92);
    }
}

@keyframes slideTileSE {
    0%, 6% {
        opacity: 0;
        transform: translate(65px, -65px) scale(0.88);
    }
    28%, 80% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    94%, 100% {
        opacity: 0;
        transform: translate(35px, 35px) scale(0.92);
    }
}

.mode-build .bottom-arc {
    animation: buildBottomArc 4.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes buildBottomArc {
    0%, 24% {
        opacity: 0;
        transform: scaleX(0.2) translateY(15px);
    }
    42%, 82% {
        opacity: 1;
        transform: scaleX(1) translateY(0);
    }
    94%, 100% {
        opacity: 0;
        transform: scaleX(0.4) translateY(10px);
    }
}

.mode-build .up-letter-u {
    animation: popUpLetter 4.2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
    animation-delay: 0.08s;
}

.mode-build .up-letter-p {
    animation: popUpLetter 4.2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
    animation-delay: 0.16s;
}

@keyframes popUpLetter {
    0%, 28% {
        opacity: 0;
        transform: scale(0.55) translateY(20px);
    }
    46%, 82% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    94%, 100% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
}

.mode-build .m-letter {
    animation: buildMosaicoLetters 4.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.mode-build .m-letter-0 { animation-delay: 0.00s; }
.mode-build .m-letter-1 { animation-delay: 0.04s; }
.mode-build .m-letter-2 { animation-delay: 0.08s; }
.mode-build .m-letter-3 { animation-delay: 0.12s; }
.mode-build .m-letter-4 { animation-delay: 0.16s; }
.mode-build .m-letter-5 { animation-delay: 0.20s; }
.mode-build .m-letter-6 { animation-delay: 0.24s; }

@keyframes buildMosaicoLetters {
    0%, 38% {
        opacity: 0;
        transform: translateY(18px) scale(0.85);
    }
    54%, 82% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    94%, 100% {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
}

/* ==========================================================================
   MODO 3: PULSO CONTÍNUO (.mode-pulse) - Usado no Menu Superior / Navbar
   ========================================================================== */
.mode-pulse .upmosaico-svg {
    animation: corporatePulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.mode-pulse .upmosaico-aura {
    opacity: 0.75;
    animation: auraBreathe 2.4s ease-in-out infinite;
}

@keyframes corporatePulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 2px 8px rgba(0, 117, 59, 0.22));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 6px 16px rgba(51, 217, 0, 0.45));
    }
}

@keyframes auraBreathe {
    0%, 100% {
        transform: scale(0.9);
        opacity: 0.35;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

/* ==========================================================================
   FEEDBACK DE STATUS E PROGRESSO (LOADER)
   ========================================================================== */
.upmosaico-loader-feedback {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.upmosaico-progress-track {
    width: 160px;
    height: 4px;
    border-radius: 999px;
    background: rgba(60, 208, 112, 0.2);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(51, 217, 0, 0.15);
}

.upmosaico-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 45%;
    border-radius: 999px;
    background: linear-gradient(90deg, #00753b, #3cd070, #33d900);
    animation: progressSweep 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes progressSweep {
    0% {
        left: -45%;
        width: 35%;
    }
    50% {
        width: 55%;
    }
    100% {
        left: 105%;
        width: 35%;
    }
}

.upmosaico-status-text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e6f2eb;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   GLOBAL LOADING OVERLAY (TELA INTEIRA COM MONTAGEM 45°)
   ========================================================================== */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 35, 20, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 999999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s ease;
    pointer-events: none;
}

#loading-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

body.content-blurred > *:not(#loading-overlay) {
    filter: blur(4px);
    pointer-events: none;
    transition: filter 0.3s ease;
}

