/* ============================================================
   NAVBAR - COLABORADORES ONLINE
============================================================ */

.navbar-custom .nav-online-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
}

.navbar-custom .nav-online-btn {
    width: 46px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.navbar-custom .nav-online-btn i {
    font-size: 1rem;
    color: #e5e7eb;
}

.navbar-custom .nav-online-btn span {
    font-size: 0.78rem;
    color: #ffffff;
    line-height: 1;
}

.navbar-custom .online-dropdown {
    position: absolute;
    top: 44px;
    right: 0;
    width: 320px;
    max-width: 320px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
    padding: 12px;
    z-index: 5000;
    display: none;
}

.navbar-custom .online-dropdown.show {
    display: block;
}

.navbar-custom .online-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid #edf2f7;
}

.navbar-custom .online-dropdown-header strong {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.navbar-custom .online-dropdown-header small {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
}

.navbar-custom .online-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
}

.navbar-custom .online-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 6px;
    border-radius: 12px;
}

.navbar-custom .online-user-item:hover {
    background: #f8fafc;
}

.navbar-custom .online-user-avatar,
.navbar-custom .online-user-avatar-fallback {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 999px;
}

.navbar-custom .online-user-avatar {
    object-fit: cover;
    background: #e2e8f0;
}

.navbar-custom .online-user-avatar-fallback {
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.navbar-custom .online-user-info {
    flex: 1;
    min-width: 0;
}

.navbar-custom .online-user-name {
    font-size: 0.86rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-custom .online-user-page {
    font-size: 0.74rem;
    color: #64748b;
}

.navbar-custom .online-status-dot {
    width: 9px;
    height: 9px;
    min-width: 9px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.navbar-custom .online-empty {
    padding: 18px 8px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Correção forte para avatar do dropdown online */
.navbar-custom #onlineUsuariosDropdown img.online-user-avatar,
#onlineUsuariosDropdown img.online-user-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* USER ONLINE - correção definitiva do dropdown */
.navbar-custom .nav-online-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    height: 40px !important;
}

.navbar-custom #onlineUsuariosDropdown {
    position: absolute !important;
    top: 42px !important;
    right: 0 !important;
    left: auto !important;

    width: 320px !important;
    max-width: 320px !important;
    min-width: 320px !important;

    height: auto !important;
    max-height: none !important;

    background: #fff !important;
    color: #0f172a !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22) !important;
    padding: 12px !important;
    z-index: 5000 !important;
    display: none !important;
}

.navbar-custom #onlineUsuariosDropdown.show {
    display: block !important;
}

.navbar-custom #onlineUsuariosLista {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 320px !important;
    overflow-y: auto !important;
}

.navbar-custom #onlineUsuariosLista .online-user-item {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 6px !important;
    border-radius: 12px !important;
}

.navbar-custom #onlineUsuariosLista img.online-user-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    flex: 0 0 36px !important;
}