/* Reset básico y fuente */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Barra Lateral (Sidebar) */
.sidebar {
    width: 280px;
    background-color: #ffffff;
    padding: 25px 20px;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Ya no necesita position: relative ni z-index para marca de agua */
}

/* === INICIO: Estilos para el Logo === */
.sidebar-logo {
    display: block; /* Necesario para poder usar margin: auto */
    width: 100px;   /* Ajusta el ancho del logo según necesites */
    height: auto;   /* Mantiene la proporción del logo */
    margin-left: auto;  /* Centrado horizontal */
    margin-right: auto; /* Centrado horizontal */
    margin-bottom: 20px; /* Espacio entre el logo y el título 'Documentos' */
}
/* === FIN: Estilos para el Logo === */

.sidebar h1 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 25px; /* Ajustado si es necesario por el logo */
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    text-align: center; /* Centra el título si lo deseas */
    /* Ya no necesita position: relative ni z-index */
}

#pdf-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    /* Ya no necesita position: relative ni z-index */
}

#pdf-list li {
    margin-bottom: 8px;
}

.pdf-button {
    background-color: transparent;
    border: none;
    color: #495057;
    padding: 12px 15px;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: block;
}

.pdf-button:hover {
    background-color: #e9ecef;
    color: #ff0000;
}

.pdf-button.active {
    background-color: #ff0000;
    color: #ffffff;
    font-weight: 500;
}

/* Área de Contenido Principal */
.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

#viewer-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

#pdf-viewer {
    width: 100%;
    height: 100%;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background-color: #fff;
}

#placeholder-text {
    position: absolute;
    color: #6c757d;
    font-size: 1.1rem;
    z-index: -1;
    text-align: center;
}

#pdf-viewer[src]:not([src=""]) + #placeholder-text {
    display: none;
}
#pdf-viewer:not([src]) + #placeholder-text {
     display: block;
}

/* Media Query (sin cambios) */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }

    .content {
         min-height: 60vh;
    }

     #viewer-container {
        padding: 10px;
         min-height: inherit;
    }
}