@import '_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

body {
    --body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
}

.navmenu-icon {
    display: none;
}

:root {
    --app-header-height: 86px; /* default para MainLayout */
}

.main {
    min-height: calc(100dvh - var(--app-header-height));
    color: var(--neutral-foreground-rest);
    align-items: stretch !important;
}

.body-content {
    align-self: stretch;
    height: calc(100dvh - var(--app-header-height)) !important;
    display: flex;
}

.content {
    padding: 0;
    align-self: stretch !important;
    width: 100%;
    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
}

.manage {
    width: 100dvw;
}

/* ============================================================
   Utilities globales del sistema de diseno GICAL
   Ver: .claude/skills/reglas-de-diseno.md
   ============================================================ */

.boton-naranja {
    --accent-fill-rest: #fd7e13;
    --accent-fill-hover: #ff6900;
    --accent-fill-active: #e66b00;
    --accent-stroke-control-rest: rgba(253, 126, 19, 0.7);
    --foreground-on-accent-rest: #ffffff;
    --foreground-on-accent-hover: #ffffff;
    --foreground-on-accent-active: #ffffff;
    border-radius: 10px;
    min-height: 38px;
    font-weight: 600;
}

.boton-oscuro {
    --neutral-fill-rest: rgba(9, 27, 57, 0.52);
    --neutral-fill-hover: rgba(17, 43, 83, 0.72);
    --neutral-fill-active: rgba(12, 34, 68, 0.8);
    --neutral-stroke-rest: rgba(201, 220, 247, 0.3);
    --neutral-foreground-rest: rgba(241, 248, 255, 0.96);
    border-radius: 10px;
    min-height: 36px;
    font-weight: 600;
}

.boton-blanco {
    --accent-fill-rest: #ffffff;
    --accent-fill-hover: rgba(245, 245, 245, 1);
    --accent-fill-active: rgba(235, 235, 235, 1);
    --accent-stroke-control-rest: rgba(201, 220, 247, 0.35);
    --foreground-on-accent-rest: #1e1e1e;
    --foreground-on-accent-hover: #1e1e1e;
    border-radius: 10px;
    min-height: 38px;
    font-weight: 600;
}

.input-blanco {
    --neutral-fill-input-rest: #ffffff;
    --neutral-fill-input-hover: #ffffff;
    --neutral-fill-input-focus: #ffffff;
    --neutral-foreground-rest: #1e1e1e;
    --neutral-stroke-rest: rgba(201, 220, 247, 0.35);
    --neutral-stroke-hover: rgba(253, 126, 19, 0.5);
    --neutral-stroke-focus: #fd7e13;
    --accent-fill-rest: #fd7e13;
    --accent-fill-hover: #ff6900;
    --focus-stroke-outer: #fd7e13;
    --focus-stroke-inner: #fd7e13;
    border-radius: 10px;
}

.dialog-sin-resultados {
    font-size: 0.85rem;
    color: rgba(216, 231, 251, 0.85);
    font-style: italic;
}

.paginador-oscuro {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0;
    background: transparent;
    color: rgba(238, 246, 255, 0.96);
    --neutral-foreground-rest: rgba(238, 246, 255, 0.96);
    --neutral-foreground-hover: #fd7e13;
    --neutral-foreground-active: #fd7e13;
    --neutral-foreground-hint: rgba(218, 232, 251, 0.9);
    --neutral-fill-stealth-hover: rgba(253, 126, 19, 0.12);
    --neutral-fill-stealth-active: rgba(253, 126, 19, 0.18);
    --neutral-stroke-hover: rgba(253, 126, 19, 0.5);
    --accent-fill-rest: #fd7e13;
    --accent-foreground-rest: rgba(238, 246, 255, 0.96);
}

.scroll-oscuro {
    scrollbar-width: thin;
    scrollbar-color: rgba(253, 126, 19, 0.35) transparent;
}

.scroll-oscuro::-webkit-scrollbar {
    width: 8px;
}

.scroll-oscuro::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-oscuro::-webkit-scrollbar-thumb {
    background: rgba(209, 224, 248, 0.18);
    border-radius: 8px;
}

.scroll-oscuro::-webkit-scrollbar-thumb:hover {
    background: rgba(253, 126, 19, 0.45);
}

.checkbox-oscuro {
    --neutral-foreground-rest: rgba(241, 248, 255, 0.96);
    --neutral-foreground-hover: #fd7e13;
    --neutral-stroke-rest: rgba(201, 220, 247, 0.45);
    --neutral-stroke-hover: rgba(253, 126, 19, 0.6);
    --accent-fill-rest: #fd7e13;
    --accent-fill-hover: #fd7e13;
    --accent-fill-active: #ff6900;
    --foreground-on-accent-rest: #ffffff;
    color: rgba(241, 248, 255, 0.96);
}

.checkbox-oscuro::part(label) {
    color: rgba(241, 248, 255, 0.96);
}

.tabs-naranja {
    --neutral-foreground-rest: rgba(236, 245, 255, 0.96);
    --neutral-foreground-hover: #ffffff;
    --neutral-foreground-active: #ffffff;
    --accent-foreground-rest: #fd7e13;
    --accent-fill-rest: #fd7e13;
    --accent-fill-hover: #ff6900;
    --accent-stroke-control-rest: #fd7e13;
}

.pill-naranja {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(253, 126, 19, 0.15);
    color: #fd7e13;
    border: 1px solid rgba(253, 126, 19, 0.35);
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.2;
}

/* FluentBadge Appearance.Accent tintado a naranja */
.badge-naranja {
    --accent-fill-rest: rgba(253, 126, 19, 0.18);
    --accent-foreground-rest: #fd7e13;
    --accent-stroke-control-rest: rgba(253, 126, 19, 0.45);
}

/* Botón toggle ojo/ojo-oculto dentro de FluentTextField type="password" */
.password-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0 4px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: rgba(30, 30, 30, 0.7);
    transition: color 140ms ease, background-color 140ms ease;
}

.password-toggle-btn:hover {
    color: #fd7e13;
    background: rgba(253, 126, 19, 0.1);
}

.password-toggle-btn:focus-visible {
    outline: 2px solid rgba(253, 126, 19, 0.5);
    outline-offset: 1px;
}

.password-toggle-btn svg,
.password-toggle-btn fluent-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Spinner: FluentProgressRing con color de marca en toda la app */
fluent-progress-ring {
    --accent-fill-rest: #fd7e13;
    --accent-fill-hover: #ff6900;
    --accent-fill-active: #e66b00;
    --accent-foreground-rest: #fd7e13;
}

/* Contenedor de carga centrado para bloques grandes */
.spinner-naranja {
    min-height: 220px;
    width: 100%;
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
    gap: 0.65rem;
    color: rgba(232, 242, 255, 0.9);
    font-size: 0.95rem;
    --accent-fill-rest: #fd7e13;
    --accent-fill-hover: #ff6900;
}

/* Variante inline (sin altura minima) para spinners en listas o inline */
.spinner-naranja--inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(232, 242, 255, 0.9);
    --accent-fill-rest: #fd7e13;
    --accent-fill-hover: #ff6900;
}

.alert {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
    margin: 10px 0;
}

.alert-danger {
    border: 1px dashed var(--error);
}

.alert-success {
    border: 1px dashed var(--success);
}

.alert-warning {
    border: 1px dashed var(--warning);
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 20px 0;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdG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NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::before {
        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;
}
/* Clase que sirve param resaltar principalmente las filas defs un FluentDataGrid */
tr.fluent-data-grid-row.highlighted,
tr.fluent-data-grid-row.highlighted > td {
    background-color: color-mix(in srgb, var(--accent-fill-rest) 15%, transparent) !important;
    color: var(--neutral-foreground-rest) !important;
}

/* Limita la altura del listbox de cualquier <fluent-select> y habilita scroll vertical.
   Aplica globalmente para que listas largas no se salgan del viewport ni del dialogo. */
fluent-select::part(listbox) {
    max-height: 240px;
    overflow-y: auto;
}

/* Reemplaza el acento azul del navegador por el naranja del sistema de diseño
   en todos los <select> nativos de la aplicacion. */
select {
    accent-color: #fd7e13 !important;
}

select:focus,
select:focus-visible {
    border-color: #fd7e13 !important;
    outline: 2px solid rgba(253, 126, 19, 0.5) !important;
    outline-offset: 1px;
}

@media (max-width: 600px) {
    .header-gutters {
        margin: 0.5rem 3rem 0.5rem 1.5rem !important;
    }

    [dir="rtl"] .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 3rem !important;
    }

    .main {
        flex-direction: column !important;
        row-gap: 0 !important;
    }

    nav.sitenav {
        width: 100%;
        height: 100%;
    }

    #main-menu {
        width: 100% !important;
    }

        #main-menu > div:first-child:is(.expander) {
            display: none;
        }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

        #navmenu-toggle ~ nav {
            display: none;
        }

        #navmenu-toggle:checked ~ nav {
            display: block;
        }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset;
    }
}

/* Table */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

    table td,
    table th {
        padding: var(--spacingVerticalS) var(--spacingHorizontalM);
        text-align: left;
        vertical-align: middle;
        border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
    }

/* Authentication Hero Login */
.auth-layout {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0f1c3f 0%, #162a5e 45%, #1b3a7a 100%);
}

.auth-layout__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: linear-gradient(135deg, rgba(8, 18, 40, 0.72) 0%, rgba(20, 42, 89, 0.48) 100%), url('/images/auth/login-hero-clean.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
}

.auth-layout__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 16% 18%, rgba(108, 180, 255, 0.18) 0%, rgba(108, 180, 255, 0) 42%),
        linear-gradient(140deg, rgba(5, 10, 24, 0.62) 0%, rgba(5, 10, 24, 0.28) 45%, rgba(5, 10, 24, 0.62) 100%);
}

.auth-layout__content {
    position: relative;
    z-index: 2;
    width: min(1200px, 100%);
    margin-inline: auto;
    padding: clamp(1rem, 2.8vw, 2.4rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-hero {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(1rem, 2.4vw, 2rem);
    align-items: stretch;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(7, 17, 37, 0.35);
    backdrop-filter: blur(6px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.auth-hero__left {
    padding: clamp(1.4rem, 3vw, 2.8rem);
    color: #f5f8ff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.auth-hero__brand {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 0.65rem 0;
}

.auth-hero__logo {
    display: block;
    width: clamp(150px, 23vw, 260px);
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

.auth-hero__title {
    margin: 0 auto;
    font-size: clamp(1.85rem, 3.6vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 18ch;
    display: inline-block;
    text-align: left;
}

.auth-hero__text {
    margin: 0 auto;
    max-width: 44ch;
    font-size: clamp(0.98rem, 1.4vw, 1.12rem);
    line-height: 1.55;
    color: rgba(245, 248, 255, 0.88);
    text-align: center;
}

.auth-hero__social {
    margin-top: 0.45rem;
    font-size: 0.95rem;
    letter-spacing: 0.5em;
    color: rgba(245, 248, 255, 0.76);
    text-align: center;
}

.auth-hero__right {
    padding: clamp(1rem, 2.2vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-login-card {
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(253, 126, 19, 0.4);
    box-shadow: 0 20px 40px rgba(4, 12, 32, 0.4);
    padding: clamp(1rem, 1.8vw, 1.6rem);
    color: rgba(216, 231, 251, 0.9);
}

.auth-login-card label,
.auth-login-card .fluent-input-label,
.auth-login-card fluent-text-field::part(label),
.auth-login-card fluent-checkbox::part(label) {
    color: #ffffff !important;
}

.auth-login-card__title {
    margin: 0 0 0.9rem 0;
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 700;
    color: #f4f9ff;
}

.auth-login-card__form {
    width: 100%;
    gap: 0.75rem;
}

.auth-login-card__links {
    margin-top: 1rem;
    display: grid;
    gap: 0.45rem;
    --neutral-foreground-rest: rgba(253, 126, 19, 0.85);
    --neutral-foreground-hover: #fd7e13;
    --accent-foreground-rest: rgba(253, 126, 19, 0.85);
    --accent-foreground-hover: #fd7e13;
}

.auth-login-card__links p {
    margin: 0;
}

.auth-login-card__links a {
    text-decoration: none;
    color: rgba(253, 126, 19, 0.85);
}

.auth-login-card__links a:hover,
.auth-login-card__links a:focus-visible {
    text-decoration: underline;
    color: #fd7e13;
}

@media (max-width: 980px) {
    .auth-layout__content {
        padding: 1rem;
    }

    .auth-hero {
        grid-template-columns: 1fr;
    }

    .auth-hero__left {
        padding: 1.2rem 1.2rem 0.4rem 1.2rem;
    }

    .auth-hero__right {
        padding: 0.8rem 1.2rem 1.2rem 1.2rem;
    }
}

@media (max-width: 640px) {
    .auth-layout__content {
        padding: 0.75rem;
    }

    .auth-hero {
        border-radius: 16px;
    }

    .auth-login-card {
        max-width: none;
        padding: 1rem;
    }

    .auth-hero__social {
        letter-spacing: 0.35em;
    }

    .auth-hero__logo {
        width: clamp(130px, 52vw, 220px);
    }
}

/* Requisitos de contraseña — validación visual en tiempo real */
.pw-req-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pw-req {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: color 0.2s;
}

.pw-req-icon {
    font-size: 13px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.pw-req--ok {
    color: #22c55e;
}

.pw-req--ok .pw-req-icon {
    color: #22c55e;
}

.pw-req--fail {
    color: rgba(216, 231, 251, 0.6);
}

.pw-req--fail .pw-req-icon {
    color: #ef4444;
}
