body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f4f7f6;
}

/* Contenedor general */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 60px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    height: 50px;
    overflow: hidden;
}

.nav-icon {
    min-width: 45px; /* Esto asegura que el icono siempre ocupe lo mismo */
    display: flex;
    justify-content: center;
    font-size: 20px;
}

.nav-item:hover {
    background: rgba(0,0,0,0.15);
}

.nav-text {
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.nav-separator {
    height: 1px;
    background: rgba(255,255,255,0.25);
    margin: 10px 12px;
}

.nav-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-top {
    flex: 1;
    overflow: hidden;
}

.nav-bottom {
    padding-bottom: 10px;
}

.nav-item.logout {
    color: #f87171;
}

.nav-item.logout:hover {
    background-color: rgba(248, 113, 113, 0.1);
}

/* ==========================
   MODAL PERFIL (SIN BOOTSTRAP)
   ========================== */

.profile-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.profile-modal {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.profile-modal h2 {
    margin-bottom: 15px;
}

.profile-modal input {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
@media (min-width: 992px) {
    .sidebar {
        width: 260px;
        transition: width 0.3s ease;
    }
    .sidebar:not(:hover) {
        width: 70px;
    }
    .sidebar:not(:hover) .nav-text {
        display: none;
    }
}

@media (max-width: 991px) {
    .sidebar {
        width: 70px; 
        left: 0;
    }

    .nav-text {
        display: none; 
    }

    .main-content {
        padding: 15px; 
    }
}

.sidebar-logo {
    padding: 20px;
    text-align: center;
}

.sidebar-logo img {
    max-width: 100%;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar nav a {
    padding: 14px 20px;
    color: white;
    text-decoration: none;
    font-size: 15px;
    white-space: nowrap;
    transition: background 0.3s;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.15);
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    pointer-events: none;
    width: 0;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
}

/* Contenido */
.main-content {
    flex: 1;
    padding: 30px;
    background: #f4f7f6;
}
/* Ajustes para Sub-menús */
.submenu {
    background: rgba(0, 0, 0, 0.05); /* Un tono ligeramente distinto */
    border-radius: 4px;
    margin: 2px 10px;
}

.nav-item.ps-4 {
    padding-left: 1.5rem !important;
}

/* Efecto de rotación en la flecha si decides usar iconos de Bootstrap */
.has-submenu[aria-expanded="true"]::after {
    transform: rotate(90deg);
}

/* Ocultar submenús si el sidebar está colapsado y no hay hover */
#sidebar.collapsed .submenu {
    display: none !important;
}
