* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Header con 130px de alto */
.header {
    height: 160px;
    width: 100%;
    position: relative;
}

/* Parte superior del header (100px con fondo amarillo) */
.header-top {
    height: 100px;
    background-color: #d5b44f;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
}

/* Estilos para el logo/texto del header */
.header-logo {
    color: white;
    font-family: Arial, sans-serif;
}

.header-logo h1 {
    font-size: 2.2em;
    font-weight: bold;
    margin: 0;
    line-height: 1;
}

.header-logo p {
    font-size: 1.1em;
    font-weight: normal;
    margin: 0;
    margin-top: 2px;
}

/* Contenedor de la derecha del header */
.header-right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

/* Estilos para el texto EXPEDIENTES */
.header-expedientes {
    color: white;
    font-family: Arial, sans-serif;
}

.header-expedientes span {
    font-size: 1.1em;
    font-weight: normal;
    margin: 0;
}

/* Estilos para el indicador de usuario */
.user-indicator {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.user-avatar i {
    font-size: 18px;
    color: white;
}

.user-greeting {
    color: white;
    font-size: 14px;
    font-weight: normal;
    margin-right: 8px;
}

.dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid white;
    transition: transform 0.3s ease;
}

.user-indicator:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.user-indicator:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: black;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-icon i {
    font-size: 14px;
    color: black;
    font-weight: normal;
}

.dropdown-separator {
    height: 1px;
    background-color: #e0e0e0;
    margin: 4px 0;
}

/* Parte inferior del header (30px sin color) */
.header-bottom {
    height: 60px;
    background-color: white;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
}

/* Controles de la derecha */
.header-right-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Campo de búsqueda */
.header-search {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    width: 300px;
    height: 32px;
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: white;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #d5b44f;
}

.search-input::placeholder {
    color: #999;
}

.search-clear {
    position: absolute;
    right: 8px;
    font-size: 14px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: #666;
}

/* Iconos del header */
.header-icons {
    display: flex;
    gap: 20px;
}

.header-icons i {
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    border-radius: 50%;
    border: 1px solid #dee2e6;
}

.header-icons i:hover {
    background-color: #d5b44f;
    color: white;
    transform: scale(1.05);
}

/* Main container */
.main {
    flex: 1;
    display: flex;
}

/* Aside - 20% del ancho */
.aside {
    width: 20%;
    background-color: #fcfcfc;
    padding: 0 0 20px 20px;
    border-right: 1px solid #ddd;
    position: relative;
    transition: width 0.3s ease;
    overflow: hidden;
}

/* Botón de toggle del aside */
.aside-toggle {
    position: absolute;
    top: 60px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    z-index: 10;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.aside-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Contenido del aside */
.aside-content {
    transition: opacity 0.3s ease;
}

/* Pestañas del aside */
.aside-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    background-color: white;
    color: #333;
    font-weight: normal;
    border-right: 1px solid #ddd;
    transition: all 0.3s ease;
}

.tab:last-child {
    border-right: none;
}

.tab.active {
    background-color: #d5b44f;
    color: white;
    font-weight: bold;
}

.tab:hover:not(.active) {
    background-color: #f8f9fa;
}

/* Contenido de las pestañas */
.tab-content {
    margin-top: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Estado colapsado del aside */
.aside.collapsed {
    width: 50px;
    padding: 20px 5px;
}

.aside.collapsed .aside-content {
    opacity: 0;
    pointer-events: none;
}

.aside.collapsed .aside-toggle {
    top: 20px;
    right: 50%;
    transform: translateX(50%);
}

/* Content - 80% del ancho */
.content {
    width: 80%;
    background-color: white;
    padding: 20px;
    transition: width 0.3s ease;
}

/* Content expandido cuando el aside está colapsado */
.content.expanded {
    width: calc(100% - 50px);
}

/* Footer fijo de 30px */
.footer {
    height: 30px;
    background-color: white;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-top: 1px solid #ddd;
    margin: 0;
    padding: 0;
}

.footer p {
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }
    
    .aside, .content {
        width: 100%;
    }
    
    .aside {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
}