/* ==========================================================================
   1. RESET Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    background-color: #f4f6f9;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
    text-decoration: none;
}

/* ==========================================================================
   2. LAYOUT PRINCIPAL (ESTRUCTURA)
   ========================================================================== */
.page {
    display: flex;
    height: 100vh;
}

.content {
    padding-top: 1.1rem;
    flex: 1;
}

.sidebar {
    width: 240px;
    background-color: #ffffff !important;
    border-right: 1px solid #dee2e6;
    transition: width 0.2s ease;
    overflow-x: hidden;
}

    .sidebar.collapsed {
        width: 60px;
    }

        .sidebar.collapsed .nav-link span,
        .sidebar.collapsed .v-link-content span,
        .sidebar.collapsed .v-arrow {
            display: none;
        }

/* ==========================================================================
   3. NAVMENU (ESTILO ADMINLTE NORMALIZADO)
   ========================================================================== */

/* Unificación de tamaños y colores base */
.nav-item .nav-link,
.v-dropdown-btn,
.sub-link,
.sub-link-3 {
    font-size: 12.5px !important; /* Tamaño estandarizado */
    color: #4b545c !important; /* Gris AdminLTE */
    background: transparent !important;
    border: none !important;
    display: flex;
    align-items: center;
    padding: 8px 15px !important;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
}

/* Control de Iconos */
.nav-item i,
.v-link-content i {
    width: 25px;
    text-align: center;
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Corrección de HOVER: Evita que el texto se pierda */
.v-dropdown-btn:hover,
.nav-item .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #007bff !important; /* El texto se vuelve azul en lugar de blanco para visibilidad */
}

/* Flechas de menú */
.v-arrow {
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.3s ease;
}

    .v-arrow.rotate {
        transform: rotate(-90deg);
    }

/* Jerarquía de Submenús */
.v-submenu {
    padding-left: 5px;
    background: rgba(0, 0, 0, 0.02);
}

.v-submenu-level-3 {
    padding-left: 15px;
    margin-bottom: 2px;
}

/* ==========================================================================
   4. COMPONENTES DE FORMULARIO Y BOTONES
   ========================================================================== */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .form-control:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

code {
    color: #c02d76;
}

/* ==========================================================================
   5. BLAZOR UI (ERRORES Y LOADING)
   ========================================================================== */
#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;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

.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, "Cargando");
    }
.navbar .nav-link:hover {
    color: #fff !important;
    background-color: #444;
}