

/* --- ESTILOS GENERALES Y DE LAYOUT --- */
body.layout-sidebar { 
    display: flex;
    min-height: 100vh; 
}
.main-content {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
    background-color: #f4f7f6;
    transition: margin-left 0.3s ease-in-out;
}

/* --- ESTILOS PARA EL LOGIN --- */
.body-login {
    background-image: url('../img/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- ESTILOS DEL MENÚ LATERAL (SIDEBAR) --- */
.sidebar {
    width: 250px;
    background-color: #0E51E1;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease-in-out;
}
.sidebar .logo-container { 
    padding: 1.5rem 1rem; 
    text-align: center; 
    margin-bottom: 1rem;
}
.sidebar .logo-container img { 
    max-width: 220px; 
    height: auto; 
}
.sidebar-divider { 
    border-color: rgba(233, 228, 228, 0.76); 
    margin: 1rem 1rem; 
}
.sidebar .nav-link { 
    color: rgba(255, 255, 255, 0.8); 
    padding: 0.75rem 1.5rem; 
    margin-bottom: 0.5rem; 
    border-radius: 0.5rem; 
    transition: all 0.2s ease; 
    display: flex; 
    align-items: center; 
    white-space: nowrap; 
}
.sidebar .nav-link:hover { 
    background-color: rgba(255, 255, 255, 0.1); 
    color: #ffffff; 
}
.sidebar .nav-link.active { 
    background-color: #ffffff; 
    color: #0E51E1; 
    font-weight: bold; 
}
.sidebar .user-info { 
    margin-top: auto; 
    padding: 1rem; 
    overflow: hidden;
}

/* --- ESTILOS PARA EL SUBMENÚ --- */
.sidebar .sub-menu {
    padding-left: 2rem; /* Indentación para que se note que es un submenú */
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    margin: 0 0.5rem 0.5rem 0.5rem;
}

.sidebar .sub-menu .nav-link {
    font-size: 0.9rem; /* Texto un poco más pequeño */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* --- ESTILOS PARA EL MENÚ COLAPSADO --- */
body.sidebar-collapsed .sidebar { 
    width: 80px; 
}
body.sidebar-collapsed .main-content { 
    margin-left: 80px; 
}
body.sidebar-collapsed #sidebarToggle { 
    left: 65px; 
}
body.sidebar-collapsed .sidebar .nav-link span,
body.sidebar-collapsed .sidebar .user-info .user-text,
body.sidebar-collapsed .sidebar .logo-container img {
    display: none;
}
body.sidebar-collapsed .sidebar .logo-container::after {
    content: 'G';
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
}

/* --- ESTILO DEL BOTÓN PARA OCULTAR --- */
#sidebarToggle {
    transition: left 0.3s ease-in-out;
}

/* Color para el estado 'Pendiente' de los tickets */
.bg-custom-purple {
    background-color: #6f42c1; /* Tono de morado */
    color: white;
}

/* --- ESTILOS PARA LA VERSIÓN MÓVIL (RESPONSIVE) --- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px; /* Oculto por defecto fuera de la pantalla */
        height: 100vh;
        z-index: 1051;
        transition: left 0.3s ease-in-out;
    }

    .sidebar.visible {
        left: 0; /* Lo mostramos al añadir la clase 'visible' */
    }

    .main-content {
        width: 100%;
        margin-left: 0 !important; /* Aseguramos que no haya margen en móvil */
    }

    /* Botón de hamburguesa visible solo en móvil */
    #mobileSidebarToggle {
        display: block;
    }
}

/* --- ESTILOS PARA IMPRESIÓN --- */
@media print {
    body.layout-sidebar .sidebar, .main-header, .card-header, .card-footer, .modal, form, .btn {
        display: none !important;
    }
    body.layout-sidebar {
        display: block;
    }
    .main-content {
        padding: 0;
        margin: 0;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    table {
        width: 100%;
    }
    thead {
        background-color: #eee !important;
    }
    th, td {
        border: 1px solid #ccc !important;
        color: #000 !important;
    }
    .badge {
        background-color: transparent !important;
        color: #000 !important;
        border: 1px solid #ccc;
    }
}