html, body {
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.topbar,
.topbar-sistema,
.topbar-login {
    width: 100%;
    height: 78px;
    background: #c62828;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 90px 0 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    overflow: visible;
}

.topbar-left {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 0;
}

.topbar-left h1 {
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    
}

.logo-topbar {
    width: 65px;
    height: 65px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    flex-shrink: 0;
}

.topbar-right {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
}

.user-menu-container {
    position: relative;
}

.user-btn {
    width: 52px;
    height: 52px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    background: transparent;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 58px;
    right: 0;
    width: 200px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.22);
    overflow: hidden;
    z-index: 999999;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #fff3cd;
    color: #c62828;
}

/* CELULAR */
@media (max-width: 600px) {
    .topbar,
    .topbar-sistema,
    .topbar-login {
        height: 76px;
        padding: 0 58px 0 10px;
    }

    .topbar-left {
        gap: 8px;
    }

    .logo-topbar {
        width: 38px;
        height: 38px;
    }

    .topbar-left h1 {
        font-size: 14px;
        max-width: 240px;
        line-height: 1.15;
    }

    .topbar-right {
        right: 10px;
    }

    .user-btn {
        width: 42px;
        height: 42px;
    }

    .user-icon {
        width: 38px;
        height: 38px;
    }

    .user-dropdown {
        top: 48px;
        width: 180px;
    }
}




/* FORZAR TEXTO BLANCO EN TODOS LOS MÓDULOS */
header.topbar .topbar-left h1,
.topbar .topbar-left h1,
.topbar-sistema .topbar-left h1 {
    color: #ffffff;
}

/* SEPARAR LOGO DEL TÍTULO */
.topbar-left {
    gap: 28px ;
}

/* AJUSTAR LOGO */
.logo-topbar {
    width: 65px;
    height: 65px;
    margin-right: 6px;
}