﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.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;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    padding-top: 70px; /* ajusta según el alto de tu navbar */
}

.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;
}

.bg-anexo76 {
    background-color: #0B3D91; /* Azul más oscuro y elegante */
}

/* Texto blanco en enlaces y marca */
.navbar .navbar-brand,
.navbar .nav-link {
    color: #ffffff !important;
}

    /* Hover más claro para contraste */
    .navbar .nav-link:hover {
        color: #f0f0f0 !important;
    }

/* Íconos o dropdowns si los usas */
.navbar .dropdown-menu {
    background-color: #1265E4;
}

.navbar .dropdown-item {
    color: #ffffff;
}

    .navbar .dropdown-item:hover {
        background-color: #0f4fc1;
        color: #ffffff;
    }

.navbar {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1030; /* Bootstrap usa este valor para elementos sticky */
}

    .navbar.nav-link {
        transition: color 0.3s ease;
    }

    .navbar.navbar-brand img {
        max-height: 40px;
        filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    }

.btn-register {
    background-color: #ffffff;
    color: #1265E4;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

    .btn-register:hover {
        background-color: #e6e6e6;
        color: #0f4fc1;
    }

/*Menu Lateral*/
.menu-lateral {
    min-height: 100vh;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    box-shadow: inset -1px 0 0 rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

    .menu-lateral h6 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid #e0e0e0;
        color: #495057;
    }

    .menu-lateral .nav-link {
        color: #343a40;
        font-weight: 500;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        transition: background-color 0.2s ease;
    }

        .menu-lateral .nav-link:hover {
            background-color: #e9ecef;
            text-decoration: none;
        }

        .menu-lateral .nav-link.active {
            background-color: #dee2e6;
            font-weight: 600;
            color: #212529;
        }

#toggleMenuBtn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    #toggleMenuBtn i {
        font-size: 1.2rem;
    }

.nav-link.active {
    background-color: #dee2e6;
    font-weight: 600;
    color: #212529;
    border-left: 4px solid #0d6efd;
}

.menu-lateral .nav-link i {
    font-size: 1rem;
    vertical-align: middle;
    color: #6c757d;
}

.menu-lateral .nav-link.active i {
    color: #0d6efd;
}
/* Aplica el azul de la navbar (clase bg-anexo76) al login */
.login-form {
    background-color: #0d6efd; /* el mismo azul de bootstrap BG */
    padding: 2rem;
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

    .login-form .form-control {
        border-radius: 8px;
    }

    .login-form .btn-primary {
        background-color: #084298;
        border: none;
    }
/* ===== LAYOUT PRINCIPAL RESPONSIVO ===== */

.main-layout-container {
    display: flex;
    min-height: calc(100vh - 56px); /* Altura total menos navbar */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Contenedor del botón toggle */
.toggle-button-container {
    position: fixed;
    top: 56px; /* Altura del navbar */
    left: 0;
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-layout-container.menu-hidden .toggle-button-container {
    left: 10px;
}

/* Contenedor del menú lateral */
.menu-container {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    z-index: 1000;
}

    .menu-container.hidden {
        width: 0;
        min-width: 0;
        max-width: 0;
        opacity: 0;
        transform: translateX(-100%);
    }

/* Contenido principal */
.contenido-principal {
    flex: 1;
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    margin-left: 60px; /* Espacio para el botón toggle */
    width: calc(100% - 300px); /* 240px menú + 60px botón */
}

/* Cuando el menú está oculto */
.main-layout-container.menu-hidden .contenido-principal {
    margin-left: 60px; /* Solo espacio para el botón */
    width: calc(100% - 60px);
    max-width: none;
}

/* Ajustes para el menú lateral dentro del contenedor */
#menuLateral {
    width: 100% !important;
    height: calc(100vh - 56px) !important;
    position: relative !important;
}

/* Animaciones de entrada mejoradas */
.menu-container:not(.hidden) {
    animation: slideInMenu 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInMenu {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Efecto de expansión del contenido */
.contenido-principal {
    animation: expandContent 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes expandContent {
    from {
        opacity: 0.8;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive para tablets */
@media (max-width: 992px) {
    .menu-container {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }

    .contenido-principal {
        width: calc(100% - 260px); /* 200px menú + 60px botón */
    }

    .main-layout-container.menu-hidden .contenido-principal {
        width: calc(100% - 60px);
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .main-layout-container {
        flex-direction: column;
    }

    .toggle-button-container {
        position: relative;
        top: auto;
        left: auto;
        align-self: flex-start;
        margin: 10px;
    }

    .menu-container {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        position: fixed;
        top: 56px;
        left: 0;
        z-index: 1050;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }

        .menu-container.hidden {
            transform: translateX(-100%);
        }

    .contenido-principal {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }

    .main-layout-container.menu-hidden .contenido-principal {
        margin-left: 0;
        width: 100%;
    }

    #menuLateral {
        height: calc(100vh - 56px) !important;
        max-height: calc(100vh - 56px);
    }
}

/* Overlay para móvil cuando el menú está abierto */
@media (max-width: 768px) {
    .main-layout-container:not(.menu-hidden)::before {
        content: '';
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
        opacity: 0;
        animation: fadeInOverlay 0.3s ease forwards;
    }
}

@keyframes fadeInOverlay {
    to {
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

.menu-hidden .contenido-principal {
    margin-left: 0 !important;
}
/* Fondo general (área autenticada) */
body {
    background-image: url('/img/imgFondolight.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #0A2A66; /* respaldo */
}

    /* Fondo especial para Login/Register */
    body.login-body {
        background-image: url('/img/imgFondolight.png'); /* 👈 la nueva imagen clara */
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-color: #E6F0FA;
    }

        /* Opcional: oscurecer capa sutil solo en login si necesitas más contraste */
        body.login-body::before {
            content: '';
            position: fixed;
            inset: 0;
            background: rgba(255, 255, 255, 0.25); /* filtro suave/blanco */
            pointer-events: none;
            z-index: 0;
        }
.icon-rotate {
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed) .icon-rotate {
    transform: rotate(90deg);
}