/* Caminho crítico: splash + landing estática (antes do MudBlazor / app.css completo) */
html,
body {
    margin: 0;
    min-height: 100%;
    background: #12121c;
    color: #f5f5f7;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#blazor-root {
    position: relative;
    z-index: 2;
}

body.app-static-shell-active #blazor-root .mud-layout {
    background: transparent;
}

body.app-static-shell-active .mud-main-content {
    background: transparent !important;
}

#app-static-shell {
    display: none;
}

html.app-route-home #app-static-shell {
    display: block;
}

.app-static-shell {
    box-sizing: border-box;
    max-width: 36rem;
    margin: 0 auto;
    padding: 5.5rem 1.25rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.app-static-shell-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    padding: 0.65rem 1.75rem;
    border-radius: 4px;
    background: #00aeef;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(0, 174, 239, 0.35);
}

.app-static-shell-cta:hover {
    background: #0099d6;
}

.app-wasm-loading {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body.app-static-shell-active .app-wasm-loading {
    z-index: 3;
}

body:not(.app-static-shell-active) .app-wasm-loading {
    z-index: 1;
}

body.app-blazor-ready .app-wasm-loading {
    display: none !important;
    visibility: hidden !important;
}

/* Assim que o Blazor monta conteúdo, oculta o splash sem depender só de JS. */
#blazor-root:not(:empty) ~ #app-loading-indicator {
    display: none !important;
    visibility: hidden !important;
}

.app-static-shell-hero,
.home-hero-logo {
    display: block;
    max-width: min(100%, 420px);
    height: auto;
    max-height: 160px;
    margin: 0 auto 1.5rem;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(0, 174, 239, 0.18));
}

.app-static-shell-title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
}

.app-static-shell-sub {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #a8a8b3;
}

.loading-progress-simple {
    position: absolute;
    width: 2.75rem;
    height: 2.75rem;
    inset: auto 0 14vh 0;
    left: 0;
    right: 0;
    margin: auto;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #00aeef;
    border-radius: 50%;
    animation: app-wasm-spin 0.85s linear infinite;
    will-change: transform;
}

@keyframes app-wasm-spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-progress-label {
    position: absolute;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #a8a8b3;
    inset: auto 0 calc(14vh - 2.25rem) 0;
    left: 0;
    right: 0;
    margin: 0;
}

.app-site-footer {
    margin-top: 2.5rem;
    padding: 1.25rem 1rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-site-footer-brand {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #c8c8d4;
}

.app-site-footer-legal {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    line-height: 1.45;
    color: #7a7a88;
}

.app-site-footer-copy {
    margin: 0;
    font-size: 0.6875rem;
    color: #6a6a78;
}

body.app-static-shell-active .app-main-content .app-site-footer {
    display: none;
}

/* Login — primeiro paint antes do app.css (mesmo visual, sem FOUC de layout) */
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 100% 70% at 50% -15%, rgba(0, 174, 239, 0.22), transparent 55%),
        linear-gradient(165deg, #07070c 0%, #12121c 42%, #0b0b12 100%);
}

.login-page-inner {
    min-height: 100vh;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    box-sizing: border-box;
}

.login-card {
    border-radius: 18px;
    border: 1px solid rgba(0, 174, 239, 0.22);
    background: rgba(20, 20, 31, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-logo-horizontal {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
}
