/* ── Header ─────────────────────────────────────────────────────────────── */
.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #4E4E4E;
    color: white;
    padding: 0 28px 0 12px;
    position: fixed;
    top: 0;
    /* left/right en vez de width:100vw — 100vw incluye el ancho de la barra de
       scroll, así que el header se pasaba del área visible y el usuario quedaba
       pegado al borde derecho. */
    left: 0;
    right: 0;
    height: 52px;
    z-index: 1000;
}

.logo1 {
    width: 90px;
    display: block;
}

.title-header { display: none; }

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.help-icon {
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    transition: color .15s;
}
.help-icon:hover { color: #fff; }

.avatar-header {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.logout-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    position: relative;
}

.user-name-header {
    font-size: 12px;
    font-weight: 600;
    color: #e5e7eb;
    white-space: nowrap;
}

/* ── Sidebar (siempre colapsado, solo íconos) ───────────────────────────── */
.sidebar {
    position: fixed;
    top: 52px;
    left: 0;
    width: 56px;
    height: calc(100% - 52px);
    background-color: #111827;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar ul li {
    width: 100%;
}

.sidebar ul li a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    color: #9ca3af;
    text-decoration: none;
    transition: color .15s, background .15s;
    position: relative;
}

.sidebar ul li a:hover {
    color: #ffffff;
    background: rgba(255,255,255,.07);
}

.sidebar ul li a .icon {
    margin: 0;
    font-size: 17px;
}

/* Tooltip al hover del sidebar */
.sidebar ul li a::after {
    content: attr(title);
    position: absolute;
    left: 62px;
    background: #1f2937;
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 2000;
}
.sidebar ul li a:hover::after { opacity: 1; }

/* ── Contenido principal ─────────────────────────────────────────────────── */
.main-content {
    margin-left: 56px;
    margin-top: 52px;
    min-height: calc(100vh - 52px);
}

/* ── User menu desplegable ───────────────────────────────────────────────── */
.user-menu {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background-color: #1f2937;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
    z-index: 1;
}

.logout-container:hover .user-menu { display: block; }

.user-menu ul {
    list-style: none;
    padding: 4px 0;
    margin: 0;
}

.user-menu li {
    padding: 0;
}

.user-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e5e7eb;
    text-decoration: none;
    padding: 10px 16px;
    transition: background .15s;
}

.user-menu li a:hover { background: rgba(255,255,255,.08); }

/* ── Overlay y utilidades ────────────────────────────────────────────────── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 200;
}

.hidden  { display: none; }
.show    { display: block; }

/* ── Notificaciones (Toast) ──────────────────────────────────────────────── */
#notification-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 15px 20px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateX(100%);
    animation: slideIn .5s forwards;
}
.notification.success { background: #16a34a; }
.notification.error   { background: #dc2626; }

@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}
