html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWFsZXJ0LXRyaWFuZ2xlIj48cGF0aCBkPSJNMTAuMjkgMy44NkwxLjgyIDE4YTIgMiAwIDAgMCAxLjcxIDNoMTYuOTRhMiAyIDAgMCAwIDEuNzEtM0wxMy43MSAzLjg2YTIgMiAwIDAgMC0zLjQyIDB6IiAvPjxsaW5lIHgxPSIxMiIgeTE9IjkiIHgyPSIxMiIgeTI9IjEzIiAvPjxsaW5lIHgxPSIxMiIgeTE9IjE3IiB4Mj0iMTIuMDEiIHkyPSIxNyIgLz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/*===================================================================
  SISTEMA DE DISEÑO "IRIDISCENTE" — Variables globales
  Paleta centralizada para todo el proyecto A.P.T.M.
===================================================================*/
:root {
    --primary: #2C4C6B;
    --primary-dark: #1D3450;
    --accent: #C98A3B;
    --bg: #F4F6F8;
    --surface: #FFFFFF;
    --border: #E3E7EC;
    --text: #1B2530;
    --text-muted: #6B7686;
    --radius: 10px;
    --shadow-md: 0 12px 40px rgba(20,30,45,0.14);
}

/*===================================================================
  LOGIN — estilos de la página A_Principal/Paginas/Login.razor
===================================================================*/
.contenedor-layout-vacio {
    display: flex;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text);
}

.panel-marca {
    flex: 1.1;
    background: radial-gradient(circle at 20% 20%, rgba(201,138,59,0.18), transparent 40%), radial-gradient(circle at 80% 75%, rgba(255,255,255,0.06), transparent 45%), linear-gradient(155deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 56px;
    position: relative;
    overflow: hidden;
}

    .panel-marca::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
        background-size: 44px 44px;
        mask-image: radial-gradient(circle at 30% 30%, black, transparent 70%);
    }

.marca-top {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.marca-logo {
    width: 42px;
    height: 42px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary-dark);
    font-size: 19px;
    flex-shrink: 0;
}

.marca-nombre {
    font-weight: 700;
    font-size: 17px;
}

.marca-sub {
    font-size: 12px;
    color: #A9BBCE;
}

.marca-medio {
    position: relative;
    max-width: 420px;
}

.marca-frase {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.4px;
}

    .marca-frase span {
        color: var(--accent);
    }

.marca-desc {
    margin-top: 16px;
    font-size: 14px;
    color: #B7C6D7;
    line-height: 1.6;
}

.marca-stats {
    display: flex;
    gap: 32px;
    position: relative;
}

.stat-valor {
    font-family: 'Roboto Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 11.5px;
    color: #93A7BC;
    margin-top: 2px;
}

.panel-formulario {
    flex: 1;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.caja-formulario {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 40px 36px;
}

.encabezado-formulario {
    margin-bottom: 28px;
}

.titulo-formulario {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.desc-formulario {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 5px;
}

.campo {
    margin-bottom: 18px;
}

    .campo label {
        display: block;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 7px;
    }

.input-envoltorio {
    position: relative;
}

    .input-envoltorio svg {
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
    }

.campo input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    background: var(--surface);
}

    .campo input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(44,76,107,0.12);
    }

    .campo input::placeholder {
        color: #A9B3BE;
    }

.mensaje-error {
    background: rgba(229,0,0,0.08);
    border: 1px solid rgba(229,0,0,0.25);
    color: #C41E1E;
    font-size: 12.5px;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.fila-entre {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-size: 12.5px;
}

.recordarme {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    cursor: pointer;
}

    .recordarme input {
        width: 14px;
        height: 14px;
        accent-color: var(--primary);
    }

.olvide {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

    .olvide:hover {
        text-decoration: underline;
    }

.boton-ingresar {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(44,76,107,0.25);
    transition: background .15s ease, transform .1s ease;
}

    .boton-ingresar:hover:not(:disabled) {
        background: var(--primary-dark);
    }

    .boton-ingresar:active:not(:disabled) {
        transform: translateY(1px);
    }

    .boton-ingresar:disabled {
        opacity: .7;
        cursor: default;
    }

.separador {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    font-size: 11.5px;
    color: var(--text-muted);
}

    .separador::before, .separador::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

.fila-ayuda {
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

    .fila-ayuda a {
        color: var(--primary);
        font-weight: 600;
        text-decoration: none;
    }

        .fila-ayuda a:hover {
            text-decoration: underline;
        }

.nota-pie {
    margin-top: 24px;
    text-align: center;
    font-size: 11.5px;
    color: #9AA5B1;
}

@media (max-width: 880px) {
    .panel-marca {
        display: none;
    }

    .panel-formulario {
        flex: 1;
    }
}



/*===================================================================
  PANTALLA DE CARGA — reemplaza el spinner circular por defecto de
  Blazor WASM mientras descarga el runtime (.NET + DLLs, ~30 MB).
  Usa --blazor-load-percentage, variable que Blazor actualiza solo
  durante la descarga, para que la barra avance de verdad.
===================================================================*/
.pantalla-carga {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: var(--bg);
    z-index: 9999;
}


.carga-nombre {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    color: var(--text-muted);
}

.carga-barra-contenedor {
    width: 220px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.carga-barra-contenedor {
    width: 220px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
    position: relative;
}



.carga-barra-relleno {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--menu-resplandor-activo), #85C1E9, var(--menu-resplandor-activo), transparent);
    border-radius: 4px;
    animation: recorrer-barra 1.3s ease-in-out infinite;
    will-change: transform;
}

@keyframes recorrer-barra {
    0% {
        transform: translateX(-150%);
    }

    100% {
        transform: translateX(350%);
    }
}

@keyframes deslizar-brillo {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}


/*---------------------------------------------------------------
  Una vez que Blazor termina de cargar, agrega la clase "loaded"
  al <html> (comportamiento propio del framework). Usamos eso para
  ocultar la pantalla de carga con un fade suave.
---------------------------------------------------------------*/
html.loaded .pantalla-carga {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
}



/*===================================================================
  VARIABLES DE ENTORNO GENERAL — menú lateral (MainLayout)
  No son de una página puntual: van acá para poder reusarse y
  experimentar cambiando un solo valor.
===================================================================*/
:root {
    --menu-resplandor-activo: #5DADE2;
    /* --menu-resplandor-activo: #C98A3B; alternativa naranja, descomentar para probar */

    --menu-vidrio-activo: rgba(184, 196, 208, 0.16);
    --menu-vidrio-blur: 8px;
}

/*===================================================================
  ÍCONOS ANIMADOS — clases utilitarias reutilizables en toda la app.
  Se aplican sobre el <svg> que arma MudIcon (Icon="@IconosPhosphor.X").
  No van atadas a ningún componente puntual: cualquier ícono nuevo
  que necesite el mismo tipo de transición usa la misma clase.
===================================================================*/

/*----- Rotación suave genérica (chevrons, flechas de expandir/colapsar) -----*/
.icono-transicion-suave {
    transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .2s ease;
}

/*----- Morph hamburguesa <-> X del botón de menú. El truco es animar las -----*/
/*----- DOS líneas EXTREMAS (arriba/abajo) hacia el centro con rotación, -----*/
/*----- y ocultar la línea del medio con opacity — así "list" y "x" -----*/
/*----- comparten el mismo <svg> contenedor sin cambiar de ícono a los saltos. -----*/
.icono-menu-linea {
    transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .18s ease;
    transform-origin: 50% 50%;
}

    .icono-menu-linea:nth-child(2) {
        /* línea del medio: solo se desvanece, nunca rota */
        transition: opacity .15s ease;
    }

/*----- Hover del botón de menú del TopBar — puntual, no global (Opción 2). -----*/
/*----- Si más adelante se confirma que se ve bien, es la misma línea que -----*/
/*----- escalar a ".mud-icon-button:hover" para aplicarla a toda la app. -----*/
.boton-menu-topbar:hover {
    background-color: var(--menu-vidrio-activo) !important;
}

.boton-menu-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: #ffffff;
}

/*===================================================================
  LOGIN — versión limpia (solo tarjeta centrada, sin panel de marca)
===================================================================*/
.pantalla-login {
    min-height: 100vh;
    width: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .pantalla-login::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: linear-gradient(rgba(44,76,107,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(44,76,107,0.035) 1px, transparent 1px);
        background-size: 44px 44px;
        mask-image: radial-gradient(circle at 50% 40%, black, transparent 75%);
        pointer-events: none;
    }

.login-logo-superior {
    position: absolute;
    top: 44px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .login-logo-superior .marca-logo {
        width: 36px;
        height: 36px;
        background: var(--accent);
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        color: var(--primary-dark);
        font-size: 16px;
    }

    .login-logo-superior .marca-nombre {
        font-weight: 700;
        font-size: 15px;
        color: var(--text);
    }