/* Base globale — Madist Backoffice */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--madist-text-primary, #1a2a22);
    background: var(--madist-bg, #f3f6f4);
}

h1:focus {
    outline: none;
}

a {
    color: var(--madist-primary, #4a705a);
}

code {
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    font-size: 0.875em;
    background: rgba(26, 42, 34, 0.06);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

/* Splash WASM / bootstrap auth — evita flash del logo a risoluzione piena */
.bo-boot-splash {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: #f3f6f4;
}

.bo-boot-splash__logo {
    display: block;
    width: 4.5rem;
    height: 4.5rem;
    max-width: 4.5rem;
    max-height: 4.5rem;
    object-fit: contain;
    border-radius: 12px;
}

.bo-boot-splash__bar {
    width: 7rem;
    height: 3px;
    border-radius: 999px;
    background: rgba(26, 42, 34, 0.1);
    overflow: hidden;
    position: relative;
}

.bo-boot-splash__bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    border-radius: inherit;
    background: #4a705a;
    animation: bo-boot-bar 1.1s ease-in-out infinite;
}

@keyframes bo-boot-bar {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(280%);
    }
}
